proton:linux_setup
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
proton:linux_setup [2012/02/26 14:42] – aki | proton:linux_setup [2023/06/08 07:42] – [Grabbing Proton SDK] seth | ||
---|---|---|---|
Line 3: | Line 3: | ||
In order to build the examples on Linux you first need some dependencies installed on your system. All of the needed dependencies are common in Linux distributions so you'll probably find everything needed through your distribution' | In order to build the examples on Linux you first need some dependencies installed on your system. All of the needed dependencies are common in Linux distributions so you'll probably find everything needed through your distribution' | ||
- | The build scripts available for Linux use [[http:// | + | The build scripts available for Linux use [[http:// |
- | ==== Compiling and running RTBareBones | + | ==== Grabbing Proton SDK ==== |
- | This is the process I follow when compiling the examples. You may vary this to your needs if you want since cmake is quite flexible in what it can do. But it's a safe bet to follow these quidelines if you are not yet too familiar with cmake. | + | Ok, this was tested on a Raspberry Pi with Stretch, but normal linux distributions should be roughly |
+ | |||
+ | <code bash> | ||
+ | sudo apt install git | ||
+ | cd ~ | ||
+ | git clone https:// | ||
+ | </ | ||
- | It's a good practice to do so called out-of-source builds. This way the compiled object and other files don't pollute the source directory but instead they are put to a directory | + | Projects you compile |
- | So fire up your console | + | There is no lib/dll to make for Proton, the .cpp files are just used directly in the projects. |
- | First let's make a directory where the building will happen. | + | Let's make the RTPack tool now. |
<code bash> | <code bash> | ||
- | cd RTBareBones/linux | + | cd proton/ |
- | mkdir build | + | sh linux_compile.sh |
</ | </ | ||
- | Then enter that directory, call cmake and then make. | + | Hopefully |
- | <code bash> | + | **Note:** By default, RTPack is compiled with the RT_NO_PVR flag, so support for a weird texture format called PVRTC isn't included. If you really want that, you an go download the PVRTC libs. [[proton: |
- | cd build | + | |
- | cmake .. | + | |
- | make | + | |
- | </ | + | |
- | The argument to cmake (..) tells where it's supposed to search for the CMakeLists.txt build file that tells it what to do. If you make your build directory somewhere else than shown above you would need to adjust this argument accordingly but other than that the process should be exactly the same as here. | ||
- | If the build finishes without errors you'll end up with a binary called '' | + | ==== Compiling |
- | In order to run the compiled program | + | This is the process I follow when compiling the examples. You may vary this to your needs if you want since cmake is quite flexible in what it can do. But it's a safe bet to follow these quidelines if you are not yet too familiar with cmake. |
+ | |||
+ | Generally with linux stuff, you make a " | ||
+ | |||
+ | So to compile RTBareBones, | ||
<code bash> | <code bash> | ||
- | cd ../../bin | + | cd proton/RTBareBones/linux |
- | ../ | + | sh linux_compile.sh |
</ | </ | ||
- | Now you should see the application window. | + | (If you look at linux_compile.sh, |
- | ==== Compiling and running | + | If the build finishes without errors you'll end up with a binary called '' |
- | The compilation process for the other examples is exactly the same that what was explained for RTBareBones above. But in addition the other examples than RTBareBones need resources to be built as explained here: [[proton: | + | To try it: |
- | + | ||
- | Compiling RTPack is a similar process to compiling the examples. The build script here is also for cmake. There is a helper script that chooses a correct build directory for you so that the resource building in future steps will go smoothly. Do these commands in your console: | + | |
<code bash> | <code bash> | ||
- | cd tools/RTPack | + | cd ../bin |
- | ./build.sh | + | ./RTBareBones |
</ | </ | ||
- | The resulting binary called '' | + | On my Raspberry Pi I see a spinning triangle fullscreen. |
- | Now let's build RTSimpleApp just like RTBareBones: | + | ====Compiling and running the other examples==== |
- | <code bash> | + | The compilation process for the other examples is exactly the same that what was explained for RTBareBones above. |
- | cd RTSimpleApp/ | + | |
- | mkdir build | + | |
- | cd build | + | |
- | cmake .. | + | |
- | make | + | |
- | </ | + | |
- | Next we'll build the resources. There is a helper script available that can be used in Linux to do this. There are similar helper scripts for Windows | + | But in addition |
- | Run the script | + | To do this in linux using RTPack, you need to move into your projects media directory |
- | <code bash> | + | Let's build RTSimpleApp, |
- | cd ../../media | + | |
- | ../ | + | |
- | </ | + | |
- | + | ||
- | This will convert the fonts and images to correct format and copy the converted resources to the '' | + | |
<code bash> | <code bash> | ||
+ | cd RTSimpleApp/ | ||
+ | sh linux_compile.sh | ||
+ | cd ../media | ||
+ | sh build_media.sh | ||
cd ../bin | cd ../bin | ||
- | ../linux/ | + | ./RTSimpleApp |
</ | </ | ||
- | The rest of the examples can be compiled | + | If that worked, |
- | === How update_media.sh works === | + | ===How update_media.sh works=== |
The resource building script goes to the subdirectories of the '' | The resource building script goes to the subdirectories of the '' | ||
- | |||
==== Debug builds | ==== Debug builds | ||
Line 107: | Line 102: | ||
==== Command line arguments ==== | ==== Command line arguments ==== | ||
+ | |||
+ | **Note 7/ | ||
The Linux versions of the examples accept a few command line arguments. You can choose the video mode and emulated environment (e.g. iOS, Android, | The Linux versions of the examples accept a few command line arguments. You can choose the video mode and emulated environment (e.g. iOS, Android, | ||
<code bash> | <code bash> | ||
- | [user@localhost]$ ./rtsimpleapp | + | [user@localhost]$ ./RTSimpleApp |
Available video modes: | Available video modes: | ||
Line 128: | Line 125: | ||
<code bash> | <code bash> | ||
- | ./rtsimpleapp | + | ./RTSimpleApp |
</ | </ | ||
proton/linux_setup.txt · Last modified: 2023/06/08 13:21 by seth