Add Windows build to build.sh. Switch from `ql` to `sqlite3`.

This commit is contained in:
Netscape Navigator 2020-09-27 08:25:14 -05:00
parent 214116a30d
commit 24a30d0121
3 changed files with 4 additions and 4 deletions

View File

@ -2,6 +2,7 @@
cd project cd project
go build --o=../pigeon-cli go build --o=../pigeon-cli
env GOOS=windows GOARCH=386 go build --o=../pigeon.exe
cd - cd -
PIGEON_PATH="." PIGEON_PATH="."
./pigeon-cli version ./pigeon-cli version

BIN
pigeon-windows.exe Executable file

Binary file not shown.

View File

@ -4,14 +4,13 @@ import (
"database/sql" "database/sql"
"path" "path"
"modernc.org/ql" _ "github.com/mattn/go-sqlite3"
) )
func openDB() *sql.DB { func openDB() *sql.DB {
ql.RegisterDriver()
pigeonPath := maybeSetupPigeonDir() pigeonPath := maybeSetupPigeonDir()
dbPath := path.Join(pigeonPath, "db") dbPath := path.Join(pigeonPath, "db.sqlite")
db, err0 := sql.Open("ql", dbPath) db, err0 := sql.Open("sqlite3", dbPath)
if err0 != nil { if err0 != nil {
panicf("failed to open db: %s", err0) panicf("failed to open db: %s", err0)