-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #307 from peterzen/systray
Systray module update
- Loading branch information
Showing
18 changed files
with
11,478 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 systray_iconwin.go | ||
ECHO //+build windows >systray_iconwin.go | ||
ECHO. >> systray_iconwin.go | ||
TYPE %1 | %GOPATH%\bin\2goarray Data systray_icon >> systray_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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#/bin/sh | ||
|
||
if [ -z "$GOPATH" ]; then | ||
echo GOPATH environment variable not set | ||
exit | ||
fi | ||
|
||
if [ ! -e "$GOPATH/bin/2goarray" ]; then | ||
echo "Installing 2goarray..." | ||
go get github.com/cratonica/2goarray | ||
if [ $? -ne 0 ]; then | ||
echo Failure executing go get github.com/cratonica/2goarray | ||
exit | ||
fi | ||
fi | ||
|
||
if [ -z "$1" ]; then | ||
echo Please specify a PNG file | ||
exit | ||
fi | ||
|
||
if [ ! -f "$1" ]; then | ||
echo $1 is not a valid file | ||
exit | ||
fi | ||
|
||
OUTPUT=systray_iconunix.go | ||
echo Generating $OUTPUT | ||
echo "//+build linux darwin" > $OUTPUT | ||
echo >> $OUTPUT | ||
cat "$1" | $GOPATH/bin/2goarray Data systray_icon >> $OUTPUT | ||
if [ $? -ne 0 ]; then | ||
echo Failure generating $OUTPUT | ||
exit | ||
fi | ||
echo Finished |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.