Skip to content

Build and Package: Windows

Parallax Git Administrator edited this page Oct 11, 2019 · 42 revisions

These steps need to be performed on a pre-configured development system every time a new installation package is desired.

Windows Building & Packaging

These instructions are incomplete and inaccurate

  • Build the BlocklyProp Launcher
    • 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}
    • That's it! the source can be run from here- there's no need for a build process; however, releasing and packing tasks extra steps
  • 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
  • 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/
    • 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
    • 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
  • Append the zipped-up 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
  • 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 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
  • Package BlocklyProp Launcher
    • Run InnoSetup
    • Open the installer script
      • File > Open the .iss file: C:\Users{username}{folder}\BlocklyPropLauncher\package\blocklyproplauncher-installer.iss
      • Select Build > Compile
    • Now the installer executable will be in the ./dist subfolder
    • Code-sign the installer
  • Additional Notes
    • 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.
Clone this wiki locally