-
Notifications
You must be signed in to change notification settings - Fork 10
Package: Windows
These steps are for building and packaging using the 2023 nwjs wrapped method and are to be performed on a pre-configured development system.
The first steps (below) need to be performed only when an updated version of nwjs is needed.
- Download and touch-up desired nw.js release
- Download stable release (not -rcx, -alphax, or -betax) from http://dl.nwjs.io/
- Save it to /package/win-resources/nwjs/
- Extract it into /package/win-resources/nwjs/dependencies/ folder
- Move (don't copy) the nw.exe file from the dependencies folder up into the nwjs folder
- Rename the nw.exe file to nw-v#.##.#-win-xAA.exe ;where # and A exactly matches that of the stable release archive file and the bit-size (32 or 64 bit) of the system, respectively
- Touch-up nw-v#*.exe file's attributes
- Open the nw-v#*.exe file using Resource Tuner
- Replace the Icon Group > IDR_MAINFRAME English with the parallaxide.ico file
- Select IDR_MAINFRAME English, right-click and choose Resource Tools > Add or Replace Icon within Icon Group (or press SHIFT+CTRL+R)
- Update the Version > 1: English items as follows:
- CompanyName: Parallax Inc.
- FileDescription: Parallax IDE
- LegalCopyright: Copyright 2023, Parallax Inc., the NW.js community, and The Chromium Authors. All rights reserved.
- ProductName: Parallax IDE - packaged with NW.js
- CompanyShortName: Parallax
- ProductShortName: Parallax IDE
- Save the nw-v#*.exe file
- Copy (don't move) the touched-up nw-v#*.exe file into the /package/win-resources/nwjs/dependencies/ folder
- Rename the newly-copied nw-v#*.exe file (in the /package/win-resources/nwjs/dependencies/ folder) to ParallaxIDE.exe
- Touch up ParallaxIDE.exe product version
- Open newly-created dependencies/ParallaxIDE.exe file using Resource Tuner
- Update the Version > 1: English items as follows:
- In the explorer pane (left side), expand Version and select the 1: English (United States) item
- In the Object Inspector (lower-left), set the File Version's Major, Minor, and Release properly (do not change the Product Version)
- Click the "F" button to update the FileVersion string. Remove the build value, if desired
- Save the file, ParallaxIDE.exe
- Update the Version > 1: English items as follows:
- Code-sign the ParallaxIDE.exe
- Open newly-created dependencies/ParallaxIDE.exe file using Resource Tuner
- This file is now the target executable to run the Parallax IDE app once the app files have been placed (in the steps below)
These steps (below) need to be performed every time a new installation package is desired.
- Checkout the desired Parallax IDE version
- Open a command window
- Check out the needed branch from the Parallax-IDE repository
- in Git command line:
- $ cd C:\Users{username}{folder}\Parallax-IDE
- $ git checkout origin {branch}
- in Git command line:
- NOTE: The source can be run from here- no build process needed; however, follow extra steps below to package for Windows
- Make Release
- Run the build script from within the repository directory:
-
$ ./MakeReleaseWin
- This builds and stores the application files in the /release subfolder and also into the /package/win-resources/nwjs/dependencies/package.nw subfolder (see Note)
-
$ ./MakeReleaseWin
- Run the build script from within the repository directory:
- Package Parallax IDE
- Run Inno Setup Compiler
- Open the installer script
- File > Open the .iss file: C:\Users{username}{folder}\Parallax-IDE\package\parallaxide-installer.iss
- Find and update the MyAppVersion value according to the app version
- Save updated file
- Select Build > Compile
- Now the installer executable will be in the ./release_exe subfolder
- Rename the installer to: Setup-Parallax-IDE-v#.#.#.exe ;where # is the proper application version number
- Code-sign the installer
Note: The Chrome App must be placed in raw release form (no zipping of folder as was done in the past) so that nwjs launches it with the same chrome.runtime.id each time, in order to not break the local storage api's ability to find the previous session's files. The issue of starting each time with a different chrome.runtime.id was discussed here, which relates to the domain setting, and also here, which relates to the package your app techniques, but only the latter solution seems to solve the problem in this case.
- Inno Setup is used to create a Windows installer.
- Need to use Resource Tuner to edit the internal resources (Icons, names, versions, and descriptions) of the nw.exe (later BlocklyProp Launcher.ede).
- Need to use IcoFx (if needed) to edit the .ico (Win) and/or .icns (Mac) files to be used as resources of the above.