summaryrefslogtreecommitdiff
path: root/icon/make_icon.bat
diff options
context:
space:
mode:
authorRuben Pollan <meskio@sindominio.net>2018-03-20 23:46:40 +0100
committerRuben Pollan <meskio@sindominio.net>2018-03-20 23:46:40 +0100
commit2c56f8841b06df96ae7f2166f02e4e630dda020d (patch)
treec1c2b86f05b23a4c0ff8879384a29bb11727a5d5 /icon/make_icon.bat
parent24e77dd9ca2a9ca30c9c65823aea87c607896145 (diff)
[feat] add windows icons
Diffstat (limited to 'icon/make_icon.bat')
-rw-r--r--icon/make_icon.bat41
1 files changed, 41 insertions, 0 deletions
diff --git a/icon/make_icon.bat b/icon/make_icon.bat
new file mode 100644
index 0000000..598deca
--- /dev/null
+++ b/icon/make_icon.bat
@@ -0,0 +1,41 @@
+@ECHO OFF
+
+IF "%GOPATH%"=="" GOTO NOGO
+IF NOT EXIST %GOPATH%\bin\2goarray.exe GOTO INSTALL
+:POSTINSTALL
+call :create_go on On
+call :create_go off Off
+call :create_go blocked Blocked
+call :create_go wait_0 Wait0
+call :create_go wait_1 Wait1
+call :create_go wait_2 Wait2
+call :create_go wait_3 Wait3
+GOTO DONE
+
+:create_go
+ECHO Creating %1_win.go
+ECHO //+build windows > %1_win.go
+ECHO. >> %1_win.go
+TYPE ico\black\vpn_%1.ico | %GOPATH%\bin\2goarray %2 icon >> %1_win.go
+EXIT /B
+
+:CREATEFAIL
+ECHO Unable to create output file
+GOTO DONE
+
+:INSTALL
+ECHO Installing 2goarray...
+go get github.com/cratonica/2goarray
+IF ERRORLEVEL 1 GOTO GETFAIL
+GOTO POSTINSTALL
+
+:GETFAIL
+ECHO Failure running go get github.com/cratonica/2goarray. Ensure that go and git are in PATH
+GOTO DONE
+
+:NOGO
+ECHO GOPATH environment variable not set
+GOTO DONE
+
+:DONE
+