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 BUILD.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ The benefit of this workflow is that it allows you to always have the latest art

A production build uploads JavaScript source maps for the main process and the page when `SENTRY_ORG` and `SENTRY_AUTH_TOKEN` are set. The release name is `raxmlGUI@version`. The preload is not included, and a dev start does not upload.

Native crash symbols stay a manual upload. `sentry-symbols.js` downloads the Electron symbols and uploads them with `sentry-cli upload-dif`. After installing the SDK, and again after every Electron upgrade, run `node sentry-symbols.js`.
Native crash symbols are not uploaded. To add them, download the Electron symbols for the installed Electron version and upload them with `sentry-cli upload-dif`.

## Homepage

Expand Down
8 changes: 2 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,8 @@
"dist-pack-win": "run-s build electron-pack-win",
"publish-all": "run-s build electron-build-publish-all",
"postinstall-deps": "electron-builder install-app-deps",
"postinstall-patch": "patch-package",
"postinstall-electron": "install-electron --no",
"postinstall": "run-s postinstall-deps postinstall-patch postinstall-electron",
"postinstall": "run-s postinstall-deps postinstall-electron",
"docs-serve": "cd docs && bundle exec jekyll serve --config _config.yml,_config_dev.yml",
"typecheck": "tsc --noEmit",
"typecheck:baseline": "node scripts/typecheck-baseline.js",
Expand All @@ -73,8 +72,6 @@
"mobx-react-lite": "^5.1.3",
"mobx-utils": "^6.1.0",
"parse-filepath": "^1.0.2",
"patch-package": "^8.0.1",
"postinstall-postinstall": "^2.1.0",
"prismjs": "^1.30.0",
"prismjs-bibtex": "^2.1.0",
"react": "^19.3.1",
Expand All @@ -98,14 +95,13 @@
"@typescript-eslint/parser": "^8",
"@vitejs/plugin-react": "5.2.0",
"dotenv": "^17.4.2",
"download": "^8.0.0",
"electron": "^45.2.3",
"electron-builder": "^24.13.3",
"electron-download": "^4.1.1",
"electron-vite": "^6.0.0",
"eslint": "^8.57.0",
"eslint-config-react-app": "7.0.1",
"eslint-plugin-lodash": "^8.1.0",
"extract-zip": "^2.0.1",
"jsdom": "^29.1.1",
"npm-run-all": "^4.1.5",
"playwright": "^1.65.0",
Expand Down
44 changes: 30 additions & 14 deletions scripts/download-binaries.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
const fs = require('fs').promises;
const os = require('os');
const path = require('path');
const download = require('download');
const extract = require('extract-zip');

const osName = (() => {
switch (process.platform) {
Expand All @@ -18,26 +19,41 @@ const binariesBaseDir =
const binariesUrl = `${binariesBaseDir}/${osName}.zip`;

const binPath = path.join(__dirname, '..', 'static', 'bin');
const raxmlNgPath = path.join(binPath, 'raxml-ng');
const osBinPath = path.join(binPath, osName);

// The Mac zip carries Finder metadata the app never reads.
const removeMacMetadata = () =>
fs.rm(path.join(binPath, '__MACOSX'), { recursive: true, force: true });

(async () => {
console.log('Check binaries...');
let exist = true;
try {
await fs.access(raxmlNgPath);
} catch (_) {
exist = false;
}

if (exist) {
const osBinEntries = await fs.readdir(osBinPath).catch(() => []);
if (osBinEntries.length > 0) {
await removeMacMetadata();
console.log('Binaries exist!');
return;
}

console.log(`Binaries missing, downloading from '${binariesUrl}'...`);
const response = await fetch(binariesUrl);
if (!response.ok) {
throw new Error(
`Download failed: ${response.status} ${response.statusText}`,
);
}

await download(binariesUrl, binPath, {
extract: true,
});
const tmpDir = await fs.mkdtemp(path.join(os.tmpdir(), 'raxmlgui-bin-'));
try {
const zipPath = path.join(tmpDir, `${osName}.zip`);
await fs.writeFile(zipPath, Buffer.from(await response.arrayBuffer()));
// extract-zip keeps the execute bits stored in the zip entries.
await extract(zipPath, { dir: binPath });
} finally {
await fs.rm(tmpDir, { recursive: true, force: true });
}
await removeMacMetadata();
console.log('Done!');
})();
})().catch((error) => {
console.error(error);
process.exit(1);
});
97 changes: 0 additions & 97 deletions sentry-symbols.js

This file was deleted.

Loading
Loading