Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion commandLine/src/defines.h
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
4 changes: 2 additions & 2 deletions frontend/npm-shrinkwrap.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions frontend/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down Expand Up @@ -58,7 +58,8 @@
},
"linux": {
"icon": "static/icon",
"target": "tar.gz"
"target": "tar.gz",
"executableName": "projectGenerator"
},
"files": [
"index.html",
Expand Down
26 changes: 26 additions & 0 deletions scripts/test_asar_package.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand All @@ -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());
}
Expand Down
Loading