diff --git a/.idea/go_win_template.iml b/.idea/go_win_template.iml new file mode 100644 index 0000000..7c421e3 --- /dev/null +++ b/.idea/go_win_template.iml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..fc4c765 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..35eb1dd --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/build.bat b/build.bat new file mode 100644 index 0000000..c0d985d --- /dev/null +++ b/build.bat @@ -0,0 +1,35 @@ +@echo off +chcp 65001 >nul +echo. +echo [build] Starting... +echo. + +:: 1. Build frontend +echo [1/3] Building frontend... +cd frontend +call npm install >nul 2>&1 +call npm run build >nul 2>&1 +if errorlevel 1 ( + echo [error] Frontend build failed + pause + exit /b 1 +) +cd .. + +:: 2. Build Wails app (output to build/bin/) +echo [2/3] Building Wails app... +wails build -platform windows/amd64 +if errorlevel 1 ( + echo [error] Wails build failed + pause + exit /b 1 +) + +:: 3. Copy exe to root +echo [3/3] Copying exe to root... +copy /Y build\bin\go_win_template.exe go_win_template.exe >nul + +echo. +echo [done] go_win_template.exe is ready. +echo. +pause diff --git a/go.mod b/go.mod index e557634..684a5ba 100644 --- a/go.mod +++ b/go.mod @@ -2,7 +2,10 @@ module go_win_template go 1.25.0 -require github.com/wailsapp/wails/v2 v2.16.0 +require ( + github.com/wailsapp/wails/v2 v2.16.0 + golang.org/x/sys v0.46.0 +) require ( git.sr.ht/~jackmordaunt/go-toast/v2 v2.0.3 // indirect @@ -31,7 +34,6 @@ require ( github.com/wailsapp/mimetype v1.4.1 // indirect golang.org/x/crypto v0.53.0 // indirect golang.org/x/net v0.56.0 // indirect - golang.org/x/sys v0.46.0 // indirect golang.org/x/text v0.39.0 // indirect ) diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..f5e97ba --- /dev/null +++ b/package-lock.json @@ -0,0 +1,6 @@ +{ + "name": "go_win_template", + "lockfileVersion": 3, + "requires": true, + "packages": {} +}