Compare commits

..

No commits in common. "ce29b8647b07804bf2d257556faaf441ad83028d" and "e0080233b463b6ceb8807e14398c17fb55796163" have entirely different histories.

4 changed files with 30 additions and 65 deletions

View File

@ -1,52 +0,0 @@
name: build
on:
push:
jobs:
windows:
runs-on: ubuntu-latest
steps:
- uses: https://github.com/actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: 1.24
- name: install apt dependencies
run: apt-get update && apt-get install -y mingw-w64 nsis nodejs libgtk-3-dev libwebkit2gtk-4.1-dev
- name: install pnpm
uses: pnpm/action-setup@v4
with:
version: 10
- name: install wails
run: go install github.com/wailsapp/wails/v2/cmd/wails@latest
- name: build
run: env GOOS=windows GOARCH=amd64 CGO_ENABLED=1 CC=x86_64-w64-mingw32-gcc CXX=x86_64-w64-mingw32-g++ CGO_CXXFLAGS="-IC:\msys64\mingw64\include" wails build -ldflags '-extldflags "-static"' -skipbindings -nsis
- name: Archive bins
uses: actions/upload-artifact@v3
with:
name: windows-bins
path: build/bin
linux:
runs-on: ubuntu-latest
steps:
- uses: https://github.com/actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: 1.24
- name: install apt dependencies
run: apt-get update && apt-get install -y nodejs libgtk-3-dev libwebkit2gtk-4.1-dev
- name: install pnpm
uses: pnpm/action-setup@v4
with:
version: 10
- name: install wails
run: go install github.com/wailsapp/wails/v2/cmd/wails@latest
- name: build
run: wails build -tags webkit2_41
- name: Archive bins
uses: actions/upload-artifact@v3
with:
name: linux-bins
path: build/bin

View File

@ -0,0 +1,28 @@
name: build-linux
on:
push:
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: https://github.com/actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: 1.24
- name: install X-Compile dependencies
run: apt-get update && apt-get install -y mingw-w64 nsis
- name: install wails
run: go install github.com/wailsapp/wails/v2/cmd/wails@latest
- name: build
run: wails build
- name: Archive bins
uses: actions/upload-artifact@v4
with:
name: dist-without-markdown
path: |
dist

View File

@ -1,10 +1,5 @@
# wails template
This is my wails-template i am using for the *ICT-Regiomeisterschaften 2025*.
It uses vanilla svelte with vite in the Frontend. For styling i use Flowbyte and TailwindCSS. I have setup a pipeline to build windows and linux binaries. For windows i have a working installer.
Feel free to use this template on your own. To set it up just run ```setup.sh```. If you're not using gitea you will have to rename the ```.gitea``` folder to ```.github```, to use the pipelines. # README
Enjoy :)
## Links ## Links

View File

@ -2,8 +2,6 @@ package model
import ( import (
"log" "log"
"os"
"path"
"gorm.io/driver/sqlite" "gorm.io/driver/sqlite"
"gorm.io/gorm" "gorm.io/gorm"
@ -22,11 +20,7 @@ type SubThing struct {
} }
func InitDB() *gorm.DB { func InitDB() *gorm.DB {
home, err := os.UserHomeDir() db, err := gorm.Open(sqlite.Open("things.db"))
if err != nil {
panic(err)
}
db, err := gorm.Open(sqlite.Open(path.Join(home, "things.db")))
if err != nil { if err != nil {
log.Panic(err) log.Panic(err)
} }