Skip to content

Commit ef9f016

Browse files
committed
Add script to generate binaries
1 parent 23a681e commit ef9f016

File tree

3 files changed

+51
-2
lines changed

3 files changed

+51
-2
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
ARMed
22
testfile*
3+
binaries/

README.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,17 @@
88

99
![ARMed logo](https://github.com/coderick14/ARMed/blob/dev/images/logo.png "ARMed - an ARM emulator written in Golang" )
1010

11-
##### Build instructions
11+
#### Build instructions
12+
##### Build from source
1213
Requires Go to be [installed](https://golang.org/doc/install) and [configured](https://golang.org/doc/install#testing)
1314
```
1415
go get github.com/coderick14/ARMed
1516
```
16-
##### Usage
17+
18+
##### Download the compiled binary
19+
Just download the binary for your required OS and architecture from [releases](https://github.com/coderick14/ARMed/releases)
20+
21+
#### Usage
1722
`ARMed --help` will show all the usage details
1823

1924
---
@@ -24,6 +29,11 @@ Found a bug? Or maybe add support for some more instructions? Feel free to open
2429
---
2530

2631
![ARMed demo GIF](https://github.com/coderick14/ARMed/blob/dev/images/demo.gif "Simple demo of how ARMed works" )
32+
##### NOTE : On Windows, if your cmd does not support unicode characters, pipe your output to a file.
33+
```
34+
ARMed.exe myfile > output.txt
35+
```
36+
Then view the file in your favourite editor (Notepad++, Wordpad, Sublime Text etc)
2737

2838
#### Instructions supported in v1.0
2939

gen_bin.sh

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
#!/bin/bash
2+
3+
echo "Generating binary for linuxAMD64..."
4+
env GOOS=linux GOARCH=amd64 go build
5+
zip linuxAMD64.zip ARMed
6+
echo "Done."
7+
8+
echo "Generating binary for linuxARM64..."
9+
env GOOS=linux GOARCH=arm64 go build
10+
zip linuxARM64.zip ARMed
11+
echo "Done."
12+
13+
echo "Generating binary for linuxARM32..."
14+
env GOOS=linux GOARCH=arm go build
15+
zip linuxARM32.zip ARMed
16+
echo "Done."
17+
18+
echo "Generating binary for linux386..."
19+
env GOOS=linux GOARCH=386 go build
20+
zip linux386.zip ARMed
21+
echo "Done."
22+
23+
echo "Generating binary for windows64..."
24+
env GOOS=windows GOARCH=amd64 go build
25+
zip windows64.zip ARMed.exe
26+
echo "Done."
27+
28+
echo "Generating binary for windows32..."
29+
env GOOS=windows GOARCH=386 go build
30+
zip windows32.zip ARMed.exe
31+
echo "Done."
32+
33+
# Generate system binary
34+
rm -f ARMed.exe ARMed
35+
go build
36+
37+
mkdir -p binaries
38+
mv *.zip binaries

0 commit comments

Comments
 (0)