Initial commit

This commit is contained in:
Tyler
2019-05-21 00:02:20 -04:00
commit 7dec9e6fd2
11 changed files with 3308 additions and 0 deletions

BIN
icon/icon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

2884
icon/iconwin.go Normal file

File diff suppressed because it is too large Load Diff

41
icon/make_icon.bat Normal file
View File

@ -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

36
icon/make_icon.sh Normal file
View File

@ -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=iconunix.go
echo Generating $OUTPUT
echo "//+build linux darwin" > $OUTPUT
echo >> $OUTPUT
cat "$1" | $GOPATH/bin/2goarray Data icon >> $OUTPUT
if [ $? -ne 0 ]; then
echo Failure generating $OUTPUT
exit
fi
echo Finished