New PAPPI: Installation

On a Mac, simply uncompress newpappi.zip and drag it to the Applications folder. Double-click newpappi to start. See illustration below.


[Click on image to enlarge.]

(I used Sveinbjorn Thordarson's free Platypus software to build the app wrapper. It also supplies that cute icon.)

Tech: it runs a shell script that starts up two independent processes. One runs using the Wish interpreter. The other is a SWI Prolog standalone program. They communicate invisibly via sockets on ports 9990, 9992 and 9994.

If the application launches successfully, you should see the following display.


(This is the GUI running under the Wish interpreter.)
[Click on image to enlarge.]

If you mouse over the blue tab on the right, it will extend slightly and the popup menu shown should appear. Select the first option "load defaults".

[To quit newpappi, select "Quit" from the pop-up window or select "Quit" from the "File" pulldown menu next to "Wish".]

If no window appears after double-clicking the application, read the following paragraphs for debugging hints, otherwise skip ahead to the next section.

(Note: demo is not operational at the moment.)

What can go wrong?

  1. Problem: Port used by newpappi is already in use.
    Tech: newpappi uses sockets for interprocess communication between the GUI and the application server.
    The port numbers claimed are 9990, 9992 and 9994.
    If newpappi is killed or crashes, sockets may not have been properly closed.
    Solution: Close any other copies of newpappi. Close all copies of Wish and Script in the dock.
    If you started the shell script manually, close the Terminal window.
    If nothing works, it's probably worth rebooting your machine.
  2. Problem: Corrupted or missing source files in /Applications/newpappi.app/Contents/Resources.
    For example, if you changed lexiconEng.pl and introduced a typo.
    Solution: Restore last known working version of lexiconEng.pl (you did save one, didn't you?) and isolate the error.
  3. Mac OS X is true bloatware. Starting newpappi causes the dynamic linker (dyld) to chase dependencies, try to locate and load approximately 348 dynamic libraries (dylibs). It could fail to find some of them. Also, there could well be bugs in some of those libraries (as well as in my own code). I've taken the liberty of bundling the required SWI Prolog dylibs inside the application. You don't need to install SWI Prolog. If you do, it can't and won't affect newpappi if dyld works properly.
    Problem: Missing library.
    Solution: Run the newpappi script directly from the command line using a Terminal window with debugging for dyld turned on. Spot the incompatible or missing library and fix it.
    cd /Applications/newpappi.app/Contents/Resources
    export DYLD_PRINT_LIBRARIES=1
    ./script

Last modified: Mon Apr 28 22:31:14 MST 2014