forked from hetianyi/godfs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
make.cmd
43 lines (31 loc) · 1.04 KB
/
make.cmd
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
34
35
36
37
38
39
40
41
42
43
@echo off
echo +-------------------------------------+
echo ^| ^>^>godfs^<^< ^|
echo ^| focus project on github: ^|
echo ^| https://github.com/hetianyi/godfs ^|
echo +-------------------------------------+
set GOPATH=
set GOROOT=
rmdir /Q /S bin>nul 2>nul
for /f %%i in ('chdir') do set pwd=%%i
for /f %%k in ('go env GOPATH') do set gp=%%k
for /f %%k in ('go env GOROOT') do set gr=%%k
set GOROOT=%gr%
set GOPATH=%gp%
echo step 1/6: create build output directory.
IF NOT EXIST bin mkdir bin
echo step 2/6: install libs...
go get github.com/mattn/go-sqlite3
go get github.com/jinzhu/gorm
go get github.com/json-iterator/go
go get github.com/urfave/cli
set GOPATH=%gp%;%pwd%
echo step 3/6: build tracker...
go build -i -o bin/tracker.exe src/tracker.go
echo step 4/6: build storage...
go build -i -o bin/storage.exe src/storage.go
REM echo step 5/6: build dashboard...
REM build -i -o bin/dashboard.exe src/dashboard.go
echo step 6/6: build client...
go build -i -o bin/client.exe src/client.go
echo build success!