-
-
Notifications
You must be signed in to change notification settings - Fork 416
App build process
Tomasz Dziuda edited this page Oct 27, 2024
·
20 revisions
For app build you will need the following software installed:
- node.js (20.*)
- npm (>= 10.*)
- python (>= 2.5.0 && < 3.12.0)
- electron (in version used by Publii), electron-packager, node-gyp and gulp node.js modules installed globally
Only for Windows:
npm install --global --production windows-build-tools
Only for macOS:
- Install XCode
- In the root project directory run:
npm install
cd app
npm install
cd ..
npm run dev
- When the files are compiled run:
npm run prepare-editor
- Now you can run the Publii app:
npm run build
Please remember to have running the dev command in the second terminal process:
npm run dev
If you get errors regarding improper version of some node modules according to your node.js version, run the following command in the directory of these modules:
- app/node_modules/keytar
- app/node_modules/sharp
- app/node_modules/better-sqlite3
node-gyp rebuild --target=ELECTRON_VERSION --arch=x64 --dist-url=https://electronjs.org/headers
ELECTRON_VERSION - replace with current version of the Electron used in the app.
Alternatively you can use electron-rebuild
if installed globally under the app/
directory
- Post editor
After refreshing the app under development mode in the above views, the app will crash.
If you have problems with the E_ACCESS, you can try to add in the npm commands the following params: --unsafe-perm=true --allow-root
.