-
Notifications
You must be signed in to change notification settings - Fork 2
Build and Package: Windows
Parallax Git Administrator edited this page Nov 4, 2022
·
42 revisions
These steps need to be performed on a pre-configured development system every time a new installation package is desired.
- Checkout the desired BlocklyProp Launcher version
- Open a command window
- Check out the needed branch from the BlocklyPropClient_Web repository
- in Git command line:
- $ cd C:\Users{username}{folder}\BlocklyPropLauncher
- $ 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:
-
$ ./MakeRelease
- This builds and stores the application files in the ./release subfolder
- Zip up the contents of the ./release subfolder (the contents, not the folder)
- Store the zip in the root folder as file BPL_v#.#.#.zip ;where # is the proper application version number
- IMPORTANT Delete any previous BPL*.zip archives (or the script in the "Append..." step below will fail)
-
$ ./MakeRelease
- Run the build script from within the repository directory:
- 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 blocklyprop.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: BlocklyProp Launcher
- LegalCopyright: Copyright 2019, Parallax Inc., the NW.js community, and The Chromium Authors. All rights reserved.
- ProductName: BlocklyProp Launcher - packaged with NW.js
- CompanyShortName: Parallax
- ProductShortName: BP Launcher
- Save the nw-v#*.exe file
- Append the zipped-up BPL release package to the updated nw.exe and rename
- From inside the <project_folder>/package/win-resources/nwjs/dependencies/ folder...
- Open a CMD window (not Git Bash)
- Run this command:
copy /b ..\nw-v*.exe + ..\..\..\..\BPL_v*.zip BPLauncher.exe
- Choose Yes when asked to overwrite the BPLauncher.exe
- From inside the <project_folder>/package/win-resources/nwjs/dependencies/ folder...
- Touch up BPLauncher.exe product version
- Open newly-created dependencies/BPLauncher.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, BPLauncher.exe
- Update the Version > 1: English items as follows:
- Code-sign the BPLauncher.exe
- Open newly-created dependencies/BPLauncher.exe file using Resource Tuner
- Package BlocklyProp Launcher
- Run Inno Setup Compiler
- Open the installer script
- File > Open the .iss file: C:\Users{username}{folder}\BlocklyPropLauncher\package\blocklyproplauncher-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-BPLauncher-v#.#.#.exe ;where # is the proper application version number
- Code-sign the installer
- Additional Notes
- 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.