Quick install MacOS

   

This is a sup­ple­ment to the page Bol Processor ‘BP3’ and its PHP inter­face.

A one-click cer­ti­fied installer of Bol Processor BP3 is avail­able. It is called "BolProcessorInstaller.pkg" and it can be down­loaded from here (unique loca­tion). Geeks may pre­fer an equiv­a­lent method using a script includ­ed in this pack­age.

This installer (or the script) is used for both ini­tial instal­la­tion and updates. Each time you run it, it will down­load the lat­est ver­sions of the BP3 con­sole source files, the inter­face PHP files and the sam­ple set con­tained in the 'ctests' fold­er. Data, gram­mars and scripts that you've cre­at­ed will not be delet­ed. However, if you have mod­i­fied files in the 'ctests' fold­er, they will be revert­ed to the dis­tri­b­u­tion version.

Install MAMP or XAMPP

If you try to run the installer of Bo Processor, it will first check that a local Apache serv­er (MAMP or XAMPP) has been installed. Both are suit­able since the Bol Processor inter­face con­tains exclu­sive­ly HTML, PHP and JavaScript code. No data­base is required.

Don't try the vir­tu­al machine ver­sion of XAMPP! It won't work on Macs with M1 chips (and above). Use the native installer.

if you choose the (free) MAMP ver­sion, both MAMP and MAMP PRO will be installed, and the inter­face will occa­sion­al­ly prompt you to "upgrade" to MAMP PRO. But you don't need it for the Bol Processor!

For MAMP, the "htdocs" fold­er is in "Applications/MAMP".
For XAMPP, it is in "Applications/XAMPP/xamppfiles".

If you want Apache to start auto­mat­i­cal­ly when you start your com­put­er, this process is easy with MAMP.
For XAMPP, you can cre­ate a start­up script.

You will not be able to run both MAMP/MAMP PRO and XAMPP Apache servers at the same time if they use the same ports. This wouldn't be a good idea anyway…

MAMP PRO

Below are instruc­tions for rich peo­ple run­ning MAMP PRO.

The MAMP PRO main page on MacOS (ver­sion 5.7)
  1. Launch MAMP PRO from the Applications folder.
  2. In the MAMP main win­dow, click the Apache Enable but­ton (see image). No need for MySQL.
  3. The image shows the default set­tings for PHP, which is start­ed with Apache.
  4. In case of trou­ble, check the set­tings for ports (see image) and of hosts (gen­er­al and Apache).

XAMPP

Open the XAMPP fold­er in the Applications fold­er and launch manager-osx.app as shown below.

The XAMPP main page will appear. Click on the Manage Servers tab, then select Apache Web Server and click Configure. This is nec­es­sary to set up the port to any val­ue except "80" (or except "8888" in case you are also run­ning MAMP). Suggestion: set it to "81".
Then click the Start but­ton. If there is no con­flict with the ports, Apache will show up as "run­ning":

This image has an empty alt attribute; its file name is XAMPP.jpg
The XAMPP fold­er (in the Applications fold­er on a Mac) and the XAMPP main page

Once Apache is run­ning, you can click on the Welcome tag and the Go to Application but­ton. This should dis­play a (local) page about XAMPP in the path http://localhost/dashboard. Both the dashboard and bolprocessor fold­ers will be locat­ed in the Applications/XAMPP/xamppfiles/htdocs folder.

Install the Bol Processor

After installing MAMP or XAMPP, you can run the installer "BolProcessorInstaller.pkg" or the "install_bolprocessor.sh" script. Both are equivalent.

Using the installer

Download "BolProcessorInstaller.pkg" from here and double-click it.

This installer has been nota­rized, which means it con­tains infor­ma­tion that allows Apple to cer­ti­fy its validity.

Once that's done, go down to the sec­tion Compile the 'bp' con­sole.

Using the script (geeks only!)

An equiv­a­lent method is to run the "install_bolprocessor.sh" script found in the "macos-scripts" fold­er down­loaded here. This makes it pos­si­ble to under­stand each step of the instal­la­tion and pos­si­bly sug­gest improvements.

After down­load­ing "macos-scripts.zip", open the Terminal and type:

cd Downloads
unzip -qo macos-scripts.zip
cd macos-scripts
sudo ./install_bolprocessor.sh

Installation issues

If the installer (or the script) does not find a "htdocs" fold­er cre­at­ed by MAMP or XAMP, it will stop the instal­la­tion, warn­ing you that one of them should be installed. In case both MAMP and XAMPP are installed (a bad idea!) the installer will choose MAMP.

In the cur­rent ver­sion of the "BolProcessorInstaller.pkg" installer, the sys­tem will ask you the per­mis­sion to access System Events to dis­play the error mes­sage. Don't hes­i­tate to answer "yes"… In this case, it will still claim that "The instal­la­tion was suc­cess­ful", but don't believe it, noth­ing was installed!

Compile the 'bp' console

Now, assum­ing that the instal­la­tion was suc­cess­ful, start MAMP or XAMPP and point your brows­er to localhost/bolprocessor/php/. This will dis­play the home page of the Bol Processor.

If you see this frame in the image at the top right of the page, your life will be easy! All you have to do is click on the link to com­pile the con­sole, which will take a minute or two.

If you don't see the link to com­pile, and instead a men­tion that 'gcc' is not respon­sive, things are bad! You are prob­a­bly using an obso­lete ver­sion of MacOS. You may need to install the com­mand line devel­op­er tools in OS X (expla­na­tions) or the Xcode toolk­it on your machine. 

Install Csound

Csound is not required to run the Bol Processor, as you can work with MIDI files and real-time MIDI. However, it will give you access to a dif­fer­ent approach to sound synthesis.

Just down­load a pre-built instal­la­tion of Csound (MacOS 6.18) from its down­load page.

A frame ask­ing for a cor­rec­tion of the path to Csound

The BP3 inter­face should be able to fig­ure out the loca­tion of "csound" and fix its path accord­ing­ly. If it does not respond, you will be asked to change the path and per­haps the name of the Csound con­sole (see image).

😀  Now, the Bol Processor is ful­ly operational!

You can try exam­ples con­tained in the 'ctests' fold­er, or fol­low the guid­ed tour on page Bol Processor ‘BP3’ and its PHP inter­face.

Updating to new versions

To update the Bol Processor con­sole, its PHP inter­face and exam­ples (the con­tents of the "ctests" fold­er), sim­ply rerun the instal­la­tion. It will down­load and install the lat­est ver­sions of the soft­ware and data. It will delete the com­piled "bp" con­sole and prompt you to recom­pile it (with a sin­gle click).

The installer will not mod­i­fy or delete any data you have cre­at­ed in the "ctests" fold­er or out­side it. However, if you have mod­i­fied a sam­ple file with­out chang­ing its name, it will be revert­ed to its dis­tri­b­u­tion version.

Security

You are right to be con­cerned about secu­ri­ty. Can you be sure that you have down­loaded the cor­rect ver­sion of "BolProcessorInstaller.pkg"? Normally yes, it is safe, because this installer has been nota­rized.

The size of the "BolProcessorInstaller.pkg" file is exact­ly 19812 bytes and its MD5 is
1293c0d9877aeeaa58952e7e1fb1c8e8. You can calculate the MD5 checksum on this page. These numbers will indeed be subject to change with the release of new versions of the installer. Current version: 8 September 2024.

Please DO NOT SHARE THE INSTALLER, only its link: https://bolprocessor.org/misc/BolProcessorInstaller.pkg

Geeks may want to cus­tomise it for their own use. Just down­load this fold­er which con­tains the script files (install_bolprocessor.sh and postinstall) along with instruc­tions on how the installer has been built.

For read­ers not con­ver­sant with Unix shell scripts, the fol­low­ing is a descrip­tion of the process in human language:

Check that an Apache serv­er MAMP or XAMPP is installed by find­ing either MAMP\htdocs or xampp\htdocs on the com­put­er (not case-sensitive). If it is not found, exit with the warn­ing that either MAMP or XAMPP should be installed.

Download the lat­est dis­tri­b­u­tion files from GitHub:
https://github.com/bolprocessor/bolprocessor/archive/graphics-for-BP3.zip
https://github.com/bolprocessor/php-frontend/archive/master.zip
https://github.com/bolprocessor/bp3-ctests/archive/main.zip

Unzip these three files. They cre­ate fold­ers with names:
bolprocessor-graphics-for-BP3
php-frontend-master
bp3-ctests-main

Create a fold­er named "bol­proces­sor" (if it does not yet exist) inside the "htdocs" fold­er of the Apache server

Copy bolprocessor-graphics-for-BP3/source to htdocs/bolprocessor/
If there is already a "source" fold­er, delete it

Copy bolprocessor-graphics-for-BP3/Makefile to htdocs/bolprocessor/
Copy bolprocessor-graphics-for-BP3/BP3_help.txt to htdocs/bolprocessor/
Copy bolprocessor-graphics-for-BP3/Credits.txt to htdocs/bolprocessor/
Copy bolprocessor-graphics-for-BP3/BP3-To-Do.txt to htdocs/bolprocessor/
Copy bolprocessor-graphics-for-BP3/License.txt to htdocs/bolprocessor/
Copy bolprocessor-graphics-for-BP3/ReadMe.txt to htdocs/bolprocessor/

Copy php-frontend-master/php to htdocs/bolprocessor/
If there is already a "php" fold­er, delete it

Create a fold­er htdocs/bolprocessor/csound_resources if it does not yet exist

Copy the con­tent of php-frontend-master/csound_resources to htdocs/bolprocessor/csound_resources
Files that already exist should be replaced with their updat­ed versions

Create a fold­er htdocs/bolprocessor/ctests if it does not yet exist

Copy the con­tent of bp3-ctests-main to htdocs/bolprocessor/ctests
Files that already exist should be replaced with their updat­ed versions

Delete the tem­po­rary down­load directory

Set per­mis­sions of the bol­proces­sor fold­er recur­sive­ly to "777"

There is no secu­ri­ty risk in set­ting "777" per­mis­sions, as the MAMP or XAMPP Apache serv­er will be run­ning on your pri­vate com­put­er. The Bol Processor BP3 nev­er creates/modifies files out­side of its "bolprocessor" fold­er.

Delete htdocs/bolprocessor/bp if it exists. This ensures that the 'bp' con­sole is recom­piled after each update.

Uninstall the Bol Processor

Uninstalling the Bol Processor, and all the data down­loaded or cre­at­ed for its use, is very sim­ple: delete the "htdocs/bolprocessor" fold­er.

Bernard Bel
August 2024

Leave a Reply

Your email address will not be published. Required fields are marked *