-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.sh
33 lines (33 loc) · 2.08 KB
/
build.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/usr/bin/env bash
export GOPATH=$(go env GOPATH)
cd $GOPATH/src/github.com/syncore/qclauncher
rm -rf $GOPATH/src/github.com/syncore/qclauncher/bin 2>/dev/null
chmod +x $GOPATH/src/github.com/syncore/qclauncher/resources/bin_src/get_blff_linux.sh
./resources/bin_src/get_blff_linux.sh
cd $GOPATH/src/github.com/syncore/qclauncher
go get github.com/kardianos/govendor
go get github.com/josephspurrier/goversioninfo/cmd/goversioninfo
go get github.com/kevinburke/go-bindata/...
rm $GOPATH/src/github.com/syncore/qclauncher/qclauncher.exe 2>/dev/null
rm $GOPATH/src/github.com/syncore/qclauncher/qclauncher.log 2>/dev/null
rm $GOPATH/src/github.com/syncore/qclauncher/data.qcl 2>/dev/null
rm $GOPATH/src/github.com/syncore/qclauncher/qclaunchargs.txt 2>/dev/null
rm $GOPATH/src/github.com/syncore/qclauncher/data.qcl.lock 2>/dev/null
cp $GOPATH/bin/govendor cmd/qclauncher/
cp $GOPATH/bin/goversioninfo cmd/qclauncher/
cp $GOPATH/bin/go-bindata cmd/qclauncher/
chmod +x $GOPATH/src/github.com/syncore/qclauncher/cmd/qclauncher/govendor
chmod +x $GOPATH/src/github.com/syncore/qclauncher/cmd/qclauncher/goversioninfo
chmod +x $GOPATH/src/github.com/syncore/qclauncher/cmd/qclauncher/go-bindata
./cmd/qclauncher/goversioninfo -manifest "resources/qclauncher.manifest" -icon "resources/qclauncher.ico" -o "qclauncher_amd64.syso" -64 resources/versioninfo.json
cd $GOPATH/src/github.com/syncore/qclauncher/cmd/qclauncher
#chdir because ../../resources/img must match exactly
./go-bindata -pkg "resources" -o ../../resources/res.go ../../resources/img ../../resources/bin/blff
GOOS=windows GOARCH=amd64 govendor build -o qclauncher.exe -ldflags="-H windowsgui -s -w" main.go
rm $GOPATH/src/github.com/syncore/qclauncher/cmd/qclauncher/qclauncher_amd64.syso 2>/dev/null
rm $GOPATH/src/github.com/syncore/qclauncher/cmd/qclauncher/govendor 2>/dev/null
rm $GOPATH/src/github.com/syncore/qclauncher/cmd/qclauncher/goversioninfo 2>/dev/null
rm $GOPATH/src/github.com/syncore/qclauncher/cmd/qclauncher/go-bindata 2>/dev/null
mkdir -p $GOPATH/src/github.com/syncore/qclauncher/bin
cd ../../
mv cmd/qclauncher/qclauncher.exe bin/ 2>/dev/null