summaryrefslogtreecommitdiff
path: root/vendor/github.com/getlantern/systray/example/icon/make_icon.bat
diff options
context:
space:
mode:
authorkali <kali@leap.se>2018-09-26 20:36:18 +0200
committerKali Kaneko (leap communications) <kali@leap.se>2018-09-26 20:43:51 +0200
commitb26241ce8ec2b992b4209677ea75df608964cdbf (patch)
tree237b93bf1173cd4207e960cad6ff0c3c2104a75f /vendor/github.com/getlantern/systray/example/icon/make_icon.bat
parentf1e820ba1664cc1d3f69e15d0356552fecaf6fcd (diff)
[pkg] vendor getlantern/systray
this is a workaround for riseup_vpn#28
Diffstat (limited to 'vendor/github.com/getlantern/systray/example/icon/make_icon.bat')
-rw-r--r--vendor/github.com/getlantern/systray/example/icon/make_icon.bat41
1 files changed, 41 insertions, 0 deletions
diff --git a/vendor/github.com/getlantern/systray/example/icon/make_icon.bat b/vendor/github.com/getlantern/systray/example/icon/make_icon.bat
new file mode 100644
index 0000000..fa28113
--- /dev/null
+++ b/vendor/github.com/getlantern/systray/example/icon/make_icon.bat
@@ -0,0 +1,41 @@
+@ECHO OFF
+
+IF "%GOPATH%"=="" GOTO NOGO
+IF NOT EXIST %GOPATH%\bin\2goarray.exe GOTO INSTALL
+:POSTINSTALL
+IF "%1"=="" GOTO NOICO
+IF NOT EXIST %1 GOTO BADFILE
+ECHO Creating iconwin.go
+ECHO //+build windows > iconwin.go
+ECHO. >> iconwin.go
+TYPE %1 | %GOPATH%\bin\2goarray Data icon >> iconwin.go
+GOTO DONE
+
+: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
+
+:NOICO
+ECHO Please specify a .ico file
+GOTO DONE
+
+:BADFILE
+ECHO %1 is not a valid file
+GOTO DONE
+
+:DONE
+