Skip to content

Commit

Permalink
add build script on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
missdeer committed Jan 19, 2024
1 parent f185cb7 commit c66ab97
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions build.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
@echo off
set PATH=%PATH%;H:\msys64\mingw64\bin
set CGO_ENABLED=1
for /F "tokens=*" %%R in ('git rev-parse --short HEAD') do set REV=%%R
for /F "tokens=*" %%A in ('date /T') do set TODAY=%%A
@echo on
go build -ldflags="-s -w -X main.sha1ver=%REV% -X 'main.buildTime=%TODAY%'" -tags lua51 -o getnovel-lua51.exe
go build -ldflags="-s -w -X main.sha1ver=%REV% -X 'main.buildTime=%TODAY%'" -tags lua52 -o getnovel-lua52.exe
go build -ldflags="-s -w -X main.sha1ver=%REV% -X 'main.buildTime=%TODAY%'" -tags lua53 -o getnovel-lua53.exe
go build -ldflags="-s -w -X main.sha1ver=%REV% -X 'main.buildTime=%TODAY%'" -tags lua54 -o getnovel-lua54.exe
go build -ldflags="-s -w -X main.sha1ver=%REV% -X 'main.buildTime=%TODAY%'" -tags luajit -o getnovel-luajit.exe

0 comments on commit c66ab97

Please sign in to comment.