electro:simulide-macos
Differences
This shows you the differences between two versions of the page.
— | electro:simulide-macos [2023/03/31 12:17] (current) – created - external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | go back to [[electro: | ||
+ | |||
+ | If you just need to build the SimulIDE for MacOS, for example to make it available to your students, you can use a virtual machine. See [[vm: | ||
+ | |||
+ | ====Get SimulIDE source code==== | ||
+ | |||
+ | The code source can be downloaded [[https:// | ||
+ | <code bash> | ||
+ | git --version | ||
+ | git version 2.24.2 (Apple Git-127) | ||
+ | </ | ||
+ | If **git** is not installed, macos we propose to install it ... so let it install. | ||
+ | |||
+ | Find a github repository with the SimulIDE source code, e;g. https:// | ||
+ | <code bash> | ||
+ | git clone https:// | ||
+ | cd SimulIDE | ||
+ | git checkout -b macos | ||
+ | </ | ||
+ | |||
+ | ====Install QT5==== | ||
+ | |||
+ | SimulIDE GUI (Graphical user Interface) is based on QT5. So we need to install QT5, we can do it online or offline. Here we choose the offline install and we download the file **qt-opensource-mac-x64-5.14.2.dmg** [[https:// | ||
+ | <code bash> | ||
+ | hdiutil mount qt-opensource-mac-x64-5.14.2.dmg | ||
+ | sudo cp -R / | ||
+ | hdiutil unmount / | ||
+ | </ | ||
+ | Click on the qt-opensource-mac-x64-5.14.2 icon in Applications and proceed to installation. When finished QT5 will be installed where you asked for. If **/ | ||
+ | <code bash> | ||
+ | PATH=/ | ||
+ | export PATH | ||
+ | </ | ||
+ | |||
+ | ====Install libelf==== | ||
+ | Building SimulIDE will require to use libelf.a static library at link and and libelf.h when compiling. The **libelf** package is installed using **brew**. If **brew** is not installed, just type : | ||
+ | <code bash> | ||
+ | ruby -e " | ||
+ | </ | ||
+ | It will require to type your password (as for sudo). Then you can install **libelf** : | ||
+ | <code bash> | ||
+ | brew install libelf | ||
+ | </ | ||
+ | The path to libelf install must be given in the qmake project description file **SimulIDE.pro**. If the path is different on your computer, you will have to modify **SimulIDE.pro** at 2 places: | ||
+ | - in INCLUDEPATH:< | ||
+ | / | ||
+ | / | ||
+ | </ | ||
+ | - in unix {...} <code bash> | ||
+ | unix { | ||
+ | #QMAKE_LIBS += -lelf | ||
+ | QMAKE_LFLAGS += -no-pie | ||
+ | LIBS += / | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | ====Build SimulIDE==== | ||
+ | Go to the SimulIDE folder where you have cloned the source code. We will call the path to SimuIDE folder **PathToSimulIDE**. Then, make sure you are in **macos** branch | ||
+ | <code bash> | ||
+ | cd PathToSimulIDE | ||
+ | git checkout macos | ||
+ | cd build_macos | ||
+ | qmake | ||
+ | make | ||
+ | </ | ||
+ | |||
+ | If qmake command is not found , verify that the PATH is correctly set (see QT5 Install section above). The output of qmake should be something like that : | ||
+ | <code text> | ||
+ | Project MESSAGE: ----------------------------- | ||
+ | Project MESSAGE: | ||
+ | Project MESSAGE: | ||
+ | Project MESSAGE: ----------------------------- | ||
+ | </ | ||
+ | |||
+ | //Note : if you encounter compilation errors with **uint long long**, replace this type with **unsigned long long int**. // | ||
+ | |||
+ | After completed the make, the SimulIDE code can be tested in the command line : | ||
+ | <code bash> | ||
+ | cd release/ | ||
+ | ./simulide | ||
+ | </ | ||
+ | Some components like Arduino boards are missing, to get them we just need to move the **share** folder to the right place. | ||
+ | <code bash> | ||
+ | cd PathToSimulIDE # change this with the correct path to SimulIDE folder on your computer | ||
+ | cd build_macos | ||
+ | mv release/ | ||
+ | cd release/ | ||
+ | ./simulide | ||
+ | </ | ||
+ | Now you should have access to all components , you can test it by adding a Arduino board. | ||
+ | |||
+ | ====Install SimulIDE==== | ||
+ | We use **macdeployqt** to make the app independent of QT5 development environment : | ||
+ | <code bash> | ||
+ | cd PathToSimulIDE # change this with the correct path to SimulIDE folder on your computer | ||
+ | cd build_macos/ | ||
+ | macdeployqt simulide.app | ||
+ | cp -R simulide.app / | ||
+ | </ | ||
+ | |||
+ | To check that the SimulIDE application actually do not use the QT5 development environment, | ||
+ | <code bash> | ||
+ | cd / | ||
+ | otool -L simulide | ||
+ | </ | ||
+ | |||
+ | <code text> | ||
+ | simulide: | ||
+ | @rpath/ | ||
+ | @rpath/ | ||
+ | @rpath/ | ||
+ | @rpath/ | ||
+ | / | ||
+ | / | ||
+ | @rpath/ | ||
+ | @rpath/ | ||
+ | @rpath/ | ||
+ | @rpath/ | ||
+ | @rpath/ | ||
+ | @rpath/ | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | </ | ||
+ | |||
+ | |||
+ | go to [[electro: | ||