diff --git a/commandLine/src/defines.h b/commandLine/src/defines.h index a72e02bd..ac63ee45 100644 --- a/commandLine/src/defines.h +++ b/commandLine/src/defines.h @@ -1,5 +1,5 @@ #define OFPROJECTGENERATOR_MAJOR_VERSION "0" -#define OFPROJECTGENERATOR_MINOR_VERSION "127" +#define OFPROJECTGENERATOR_MINOR_VERSION "128" #define OFPROJECTGENERATOR_PATCH_VERSION "0" #define PG_VERSION (OFPROJECTGENERATOR_MAJOR_VERSION "." OFPROJECTGENERATOR_MINOR_VERSION "." OFPROJECTGENERATOR_PATCH_VERSION) diff --git a/frontend/npm-shrinkwrap.json b/frontend/npm-shrinkwrap.json index 8c2dfb9d..2198ff73 100644 --- a/frontend/npm-shrinkwrap.json +++ b/frontend/npm-shrinkwrap.json @@ -1,12 +1,12 @@ { "name": "projectGenerator", - "version": "0.122.0", + "version": "0.123.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "projectGenerator", - "version": "0.122.0", + "version": "0.123.0", "license": "MIT", "dependencies": { "@types/jquery": "^3.5.34", diff --git a/frontend/package.json b/frontend/package.json index 79f1a71a..97591fcc 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,7 +1,7 @@ { "name": "projectGenerator", "productName": "projectGenerator", - "version": "0.122.0", + "version": "0.123.0", "description": "Build electron GUI openFrameworks projectGenerator", "license": "MIT", "main": "index.js", @@ -58,7 +58,8 @@ }, "linux": { "icon": "static/icon", - "target": "tar.gz" + "target": "tar.gz", + "executableName": "projectGenerator" }, "files": [ "index.html", diff --git a/scripts/test_asar_package.cjs b/scripts/test_asar_package.cjs index 2e73f388..eca9fd3b 100644 --- a/scripts/test_asar_package.cjs +++ b/scripts/test_asar_package.cjs @@ -7,6 +7,31 @@ const { pathToFileURL } = require('node:url'); const { spawnSync } = require('node:child_process'); const { bundledGeneratorPath } = require('../frontend/packaged-paths'); +function verifyGuiExecutable(resourcesDir) { + // On Linux and Windows, electron-builder places the GUI binary alongside + // resources/. The openFrameworks installer expects the case-sensitive + // name `projectGenerator` (.exe on Windows). A lowercase executable + // breaks installation on case-sensitive filesystems before the bundled + // CLI fallback is reached. Use a directory listing so the check holds + // on case-sensitive (Linux ext4) and still catches regressions. + if (process.platform !== 'linux' && process.platform !== 'win32') return; + const unpacked = path.resolve(resourcesDir, '..'); + const expectedName = process.platform === 'win32' ? 'projectGenerator.exe' : 'projectGenerator'; + const wrongName = process.platform === 'win32' ? 'projectgenerator.exe' : 'projectgenerator'; + const entries = fs.readdirSync(unpacked); + assert.ok(entries.includes(expectedName), `GUI executable missing or wrongly cased: expected ${expectedName} in ${unpacked} (found: ${entries.join(', ')})`); + if (expectedName !== wrongName) { + assert.ok(!entries.includes(wrongName), `Lowercase GUI executable must not exist: ${path.join(unpacked, wrongName)}`); + } + const target = path.join(unpacked, expectedName); + const stat = fs.statSync(target); + assert.ok(stat.isFile(), `GUI executable is not a regular file: ${target}`); + if (process.platform === 'linux') { + assert.ok((stat.mode & 0o111) !== 0, `GUI executable missing execute bit: ${target} (mode ${stat.mode.toString(8)})`); + } + console.log(`GUI executable verified: ${target}`); +} + async function main() { assert.ok(process.argv[2], 'Pass the packaged app resources directory'); const archive = path.resolve(process.argv[2], 'app.asar'); @@ -23,6 +48,7 @@ async function main() { if (result.error) throw result.error; assert.equal(result.status, 0, result.stderr || result.stdout); assert.match(result.stdout, /version/); + verifyGuiExecutable(process.argv[2]); console.log('ASAR assets, unpacked native generator and spawn --version passed'); console.log(result.stdout.trim()); }