Skip to content

Commit 3019d2e

Browse files
committed
Restore icon package
1 parent 9c2ede4 commit 3019d2e

11 files changed

+4783
-0
lines changed

icon/icon_hiber.ico

30.9 KB
Binary file not shown.

icon/icon_hiber.png

1.88 KB
Loading

icon/icon_linux.png

1.08 KB
Loading

icon/icon_mac.png

3.71 KB
Loading

icon/icon_mac_light.png

846 Bytes
Loading

icon/icon_win.ico

14.7 KB
Binary file not shown.

icon/icondarwin.go

Lines changed: 483 additions & 0 deletions
Large diffs are not rendered by default.

icon/iconlinux.go

Lines changed: 307 additions & 0 deletions
Large diffs are not rendered by default.

icon/iconwin.go

Lines changed: 3916 additions & 0 deletions
Large diffs are not rendered by default.

icon/make_icon.bat

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
@ECHO OFF
2+
3+
IF "%GOPATH%"=="" GOTO NOGO
4+
IF NOT EXIST %GOPATH%\bin\2goarray.exe GOTO INSTALL
5+
:POSTINSTALL
6+
IF "%1"=="" GOTO NOICO
7+
IF NOT EXIST %1 GOTO BADFILE
8+
ECHO Creating iconwin.go
9+
ECHO //+build windows > iconwin.go
10+
ECHO. >> iconwin.go
11+
TYPE %1 | %GOPATH%\bin\2goarray Data icon >> iconwin.go
12+
GOTO DONE
13+
14+
:CREATEFAIL
15+
ECHO Unable to create output file
16+
GOTO DONE
17+
18+
:INSTALL
19+
ECHO Installing 2goarray...
20+
go get github.com/cratonica/2goarray
21+
IF ERRORLEVEL 1 GOTO GETFAIL
22+
GOTO POSTINSTALL
23+
24+
:GETFAIL
25+
ECHO Failure running go get github.com/cratonica/2goarray. Ensure that go and git are in PATH
26+
GOTO DONE
27+
28+
:NOGO
29+
ECHO GOPATH environment variable not set
30+
GOTO DONE
31+
32+
:NOICO
33+
ECHO Please specify a .ico file
34+
GOTO DONE
35+
36+
:BADFILE
37+
ECHO %1 is not a valid file
38+
GOTO DONE
39+
40+
:DONE
41+

icon/make_icon.sh

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
#/bin/sh
2+
3+
if [ -z "$GOPATH" ]; then
4+
echo GOPATH environment variable not set
5+
exit
6+
fi
7+
8+
if [ ! -e "$GOPATH/bin/2goarray" ]; then
9+
echo "Installing 2goarray..."
10+
go get github.com/cratonica/2goarray
11+
if [ $? -ne 0 ]; then
12+
echo Failure executing go get github.com/cratonica/2goarray
13+
exit
14+
fi
15+
fi
16+
17+
if [ -z "$1" ]; then
18+
echo Please specify a PNG file
19+
exit
20+
fi
21+
22+
if [ ! -f "$1" ]; then
23+
echo $1 is not a valid file
24+
exit
25+
fi
26+
27+
OUTPUT=iconunix.go
28+
echo Generating $OUTPUT
29+
echo "//+build linux darwin" > $OUTPUT
30+
echo >> $OUTPUT
31+
cat "$1" | $GOPATH/bin/2goarray Data icon >> $OUTPUT
32+
if [ $? -ne 0 ]; then
33+
echo Failure generating $OUTPUT
34+
exit
35+
fi
36+
echo Finished

0 commit comments

Comments
 (0)