Skip to content

System Configuration: Macintosh

Parallax Git Administrator edited this page Aug 25, 2017 · 3 revisions

Some of these configuration steps may need to be performed each time you package. Once done, follow the Package Steps.

Macintosh Configuration

  • Install Git
  • Clone the Parallax-IDE repository
  • Checkout the repackage branch
  • Install NodeJS
  • Using the Git Bash console, create a folder for packaging
    • $ mkdir c:/Temp/ParallaxIDEPkg
  • Create a subfolder for the app contents
    • $ cd c:/Temp/ParallaxIDEPkg
    • $ mkdir app
  • Using Windows Explorer, copy the drivers and package subfolders (from the local Parallax IDE repository's repackage branch) into the packaging folder c:/Temp/ParallaxIDEPkg
  • Using Windows Explorer, copy the release files from the latest Parallax IDE build into the packaging folder's app subfolder c:/Temp/ParallaxIDEPkg/app
    • The Parallax IDE release files consists of:
      • _locales (folder)
      • assets (folder)
      • fonts (folder)
      • icons (folder)
      • background.js
      • bundle.js
      • index.html
      • manifest.json
  • Initialize packaging root folder for node:
    • $ cd c:/Temp/ParallaxIDEPkg
    • $ npm init
      • Enter "parallaxide" for name
      • Enter proper version for version
      • Enter proper description for the project (can be found on the Chrome Web Store page)
      • Enter "background.js" for the entry point
      • Choose the default answer for most of the rest of the attributes
        • Except license - enter "MIT"
      • NOTE: pressing ENTER or typing "yes" and pressing ENTER on the Is this okay? (yes) prompt may seem to freeze. Just give it a moment and Ctrl-C to end it.
    • This will create a package.json file that is required for node operations.
  • Update the app subfolder's manifest.json file to include details the build settings.
    • Adjust details (some are variables that don't work in this context)
      • Update the name attribute's value to be "Parallax IDE"
      • Include a new attribute, companyName: "companyName": "Parallax Inc.",
      • Update the description attribute's value to be "Write, compile, and download code to your Parallax Boe-Bot Robot or custom BASIC Stamp microcontroller-based electronic creations."
    • Find the app section (should be near the end), locate it's ending '}', add a comma ',' after it followed by the build and window sections below
      "build": {
        "appId": "com.parallax.parallaxide",
        "outputPattern": "${NAME}-${PLATFORM}-${ARCH}",
        "win": {
          "icon": "icons/icon.ico"
        },
        "mac": {
          "icon": "icons/icon.icns"
        }
      },
      "window": {
        "icon": "icons/icon128.png"
      }
  • Here's an example of the entire manifest.json file:
    {
      "name": "Parallax IDE",
      "companyName": "Parallax Inc.",
      "description": "Write, compile, and download code to your Parallax Boe-Bot Robot or custom BASIC Stamp microcontroller-based electronic creations.",
      "version": "0.12.0",
      "manifest_version": 2,
      "default_locale": "en",
      "permissions": [
        "serial",
        "unlimitedStorage",
        "syncFileSystem",
        "storage",
        "usb",
        {
          "usbDevices": [
            {
              "vendorId": 1027,
              "productId": 24577
            },
            {
              "vendorId": 1027,
              "productId": 24597
            }
          ]
        }
      ],
      "icons": {
        "16": "icons/icon16.png",
        "48": "icons/icon48.png",
        "128": "icons/icon128.png"
      },
      "app": {
        "background": {
          "scripts": [
            "background.js"
          ]
        }
      },
      "build": {
        "appId": "com.parallax.parallaxide",
        "outputPattern": "${NAME}-${PLATFORM}-${ARCH}",
        "win": {
          "icon": "icons/icon.ico"
        },
        "mac": {
          "icon": "icons/icon.icns"
        }
      },
      "window": {
        "icon": "icons/icon128.png"
      }
    }
    
  • Install nw.js
    • $ npm install nwjs --save-dev
  • Install nwjs-builder-phoenix
    • $ npm install nwjs-builder-phoenix --save-dev
    • This will create a node_modules folder with many node libraries, including nwjs-builder-phoenix
    • It may finish with a few warnings; this is okay.

Install Setup Tool

  • Install Innosetup 5.5.9 (non-Unicode)
    • http://www.jrsoftware.org/isdl.php
    • Check Install Inno Setup Preprocessor option
    • Check Create a desktop shortcut option
    • If you chose to run Inno Setup, just close the Open dialog for now

Package

After configuration (above), follow the Package steps.

Clone this wiki locally