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 console, create a folder for packaging
    • $ mkdir ~/Projects/ParallaxIDEPkg
  • Create a subfolder for the app contents
    • $ cd ~/Projects/ParallaxIDEPkg
    • $ mkdir app
  • Using Finder, copy the drivers and package subfolders (from the local Parallax IDE repository's repackage branch) into the packaging folder ~/Projects/ParallaxIDEPkg
  • Using Finder, copy the release files from the latest Parallax IDE build into the packaging folder's app subfolder ~/Projects/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 ~/Projects/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"
    • 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.

Package

After configuration (above), follow the Package steps.

Clone this wiki locally