diff --git a/wails.json b/wails.json index 197e4f951..f0e87be49 100644 --- a/wails.json +++ b/wails.json @@ -18,8 +18,12 @@ "copyright": "Copyright 2026 Syngnat", "comments": "GoNavi is licensed under the Apache License, Version 2.0." }, + "preBuildHooks": { + "*/*": "node -e \"const fs=require('node:fs');const src='../../tools/stub-dist.zip';const dst='../../frontend/dist.zip';if(!fs.existsSync(dst)){fs.copyFileSync(src,dst)}\"" + }, "postBuildHooks": { - "darwin/*": "bash ../../scripts/codesign-dev-app.sh ${bin}" + "darwin/*": "bash ../../scripts/codesign-dev-app.sh ${bin}", + "*/*": "node -e \"const fs=require('node:fs');const stub=fs.readFileSync('../../tools/stub-dist.zip');const dist=fs.readFileSync('../../frontend/dist.zip');if(stub.equals(dist)){fs.rmSync(process.argv[1],{force:true});console.error('frontend/dist.zip is still a stub; build the frontend before using -s');process.exit(1)}\" ${bin}" }, "debounceMS": 100, "appargs": ""