Skip to content

Instantly share code, notes, and snippets.

@edp1096
Forked from tupunco/tidb_win_build.bat
Last active December 28, 2020 23:22
Show Gist options
  • Save edp1096/0a26f80e12b45a6c38aa5804f7b07d2e to your computer and use it in GitHub Desktop.
Save edp1096/0a26f80e12b45a6c38aa5804f7b07d2e to your computer and use it in GitHub Desktop.
tidb build for windows
rem tidb build in pcbangstudio project folder - http://enjoytools.net/xe/board_vngc57/8978
rem go get tidb
go get -v github.com/pingcap/tidb
rem build goyacc
go build -v -o bin/goyacc.exe src/github.com/pingcap/tidb/parser/goyacc/main.go
rem then below error message will be shown. Just go on.
rem can't load package: package github.com/pingcap/tidb: no Go files in blahblah_directory
rem gen parser.go
bin\goyacc.exe -o NUL -xegen temp_parser_file src/github.com/pingcap/tidb/parser/parser.y
bin\goyacc.exe -o src/github.com/pingcap/tidb/parser/parser.go -xe temp_parser_file src/github.com/pingcap/tidb/parser/parser.y
del y.output
del temp_parser_file
rem build tidb-server
go build -v -o bin/tidb-server.exe src/github.com/pingcap/tidb/tidb-server/main.go
rem Set tidb path to current directory
rem tidb$ $env:tidb_path = $pwd -replace "\\", "/"
rem tidb$ $env:tidb_path
rem bin\tidb-server.exe -path $env:tidb_path/tidb
REM bin\tidb-server.exe -path tidb.bolt -store boltdb
REM bin\tidb-server.exe -path tidb.db
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment