Skip to content

Commit 5485ae7

Browse files
committed
Add build.bat, setup.bat and buildsetup.bat by removing them from .gitignore
1 parent 14aee3a commit 5485ae7

File tree

4 files changed

+49
-3
lines changed

4 files changed

+49
-3
lines changed

.gitignore

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
/bin
22
/setups
33
*/rsrc.syso
4-
/setup.bat
5-
/build.bat
6-
/buildsetup.bat
74
/assets
85
/icons

build.bat

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
@echo off
2+
3+
set GOOS=%1
4+
set GOARCH=%2
5+
set EXT=
6+
7+
if "%GOOS%" == "" (
8+
FOR /F "delims=" %i IN ('go env GOOS') DO set GOOS=%%i
9+
)
10+
11+
if "%GOARCH%" == "" (
12+
FOR /F "delims=" %i IN ('go env GOARCH') DO set GOARCH=%%i
13+
)
14+
15+
16+
17+
if "%GOOS%" == "windows" (
18+
set EXT=.exe
19+
)
20+
21+
echo Building from .\src\ to .\bin\portables\GoFileEncoder_portable_%GOOS%_%GOARCH%%EXT%
22+
23+
mkdir .\bin\portables\
24+
25+
rsrc -arch=%GOARCH% -ico icons\icon_16.ico,icons\icon_32.ico,icons\icon_64.ico,icons\icon_128.ico,icons\icon_256.ico -o .\src\rsrc.syso
26+
27+
go-bindata -pkg assets -o assets/bindata.go LICENSE
28+
go build -o .\bin\portables\GoFileEncoder_portable_%GOOS%_%GOARCH%%EXT% .\src\

buildsetup.bat

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
@echo off
2+
3+
build.bat %1 %2 && setup.bat %1 %2

setup.bat

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
@echo off
2+
3+
set GOOS=%1
4+
set GOARCH=%2
5+
set EXT=
6+
7+
if "%GOOS%" == "windows" (
8+
set EXT=.exe
9+
)
10+
11+
echo Building from .\setups\setup\%GOOS%\ to .\bin\setups\GoFileEncoder_setup_%GOOS%_%GOARCH%%EXT%
12+
mkdir .\bin\setups\
13+
14+
rsrc -arch=%GOARCH% -ico icons\icon_16.ico,icons\icon_32.ico,icons\icon_64.ico,icons\icon_128.ico,icons\icon_256.ico -o .\setups\setup_%GOOS%\rsrc.syso
15+
16+
17+
go-bindata -pkg assets -o assets/bindata.go LICENSE bin\portables\GoFileEncoder_portable_%GOOS%_%GOARCH%%EXT%
18+
go build -o .\bin\setups\GoFileEncoder_setup_%GOOS%_%GOARCH%%EXT% .\setups\setup_%GOOS%\

0 commit comments

Comments
 (0)