|
|
pl:prolog:jpl:macosx [2019/06/27 15:50] |
pl:prolog:jpl:macosx [2019/06/27 15:50] (aktualna) |
| ====== Installing SWI-Prolog (with JPL) on Mac OS X ====== |
| Now that's easy. You have two options: |
| * install using [[http://www.macports.org/|MacPorts]], or |
| * use the binary installer (which, in turn, is based on MacPorts). |
| |
| Both options will give exactly the same results. |
| |
| ===== Install SWI-Prolog using MacPorts ===== |
| * Download and install MacPorts, as described [[http://www.macports.org/install.php|here]]. |
| * In the terminal, type: |
| |
| sudo port install swi-prolog |
| |
| * You're done! |
| |
| ===== Install using the binary installer ===== |
| * Go to the [[http://www.swi-prolog.org/dl-stable.html|SWI-Prolog download page]] and download the appropriate installer for your architecture (Intel, PPC) and Mac OS X version (Tiger, Leopard). |
| * Extract the mpkg file and follow the installer instructions. |
| |
| ===== After installing... ===== |
| Both methods install SWI-Prolog in ''/opt/local/'': |
| * the binary is in ''/opt/local/bin/swipl'' (add ''/opt/local/bin'' to your PATH if you - or the MacPorts installer - haven't already done so) |
| * all the rest is to be found in ''/opt/local/lib/swipl-<version>'' |
| |
| To test if it works: |
| * go to ''/opt/local/lib/swipl-<version>/doc/packages/examples/jpl/java/Test'' |
| * just to make sure: ''rm Test.class'' |
| * ''./run.sh'' - this should compile Test.java (in the absence of Test.class) and run it. |
| * If all goes well, you should get: |
| |
| bash-3.2# ./run.sh |
| Compiling Test |
| |
| JPL demo: Test |
| |
| test 0...% test.pl compiled 0.00 sec, 4,064 bytes |
| passed. |
| test 1...passed. |
| test 2...passed. |
| test 3...passed. |
| test 4...passed. |
| test 5...passed. |
| test 6...passed. |
| test 7...passed. |
| test 8...passed. |
| test 9...passed. |
| test 10...passed. |
| test 11...passed. |
| test 101...00004567182904567231901235678312041678321528904567312936890412738905683412794156842736189057340412506823420839420831756240819623751407856239104837562910482956804237195684739158764391584763596579576799passed. |
| |