User Tools

Site Tools


proton:linux_setup

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Last revision Both sides next revision
proton:linux_setup [2018/07/28 09:08]
seth [Compiling and running RTBareBones]
proton:linux_setup [2018/07/28 09:13]
seth [Compiling and running RTBareBones]
Line 52: Line 52:
 cd ../bin cd ../bin
 ./​RTBareBones ./​RTBareBones
-</bash>+</code>
  
 On my Raspberry Pi I see a spinning triangle fullscreen. ​ Under Gnome or something I assume it would open in a window due to SDL2 being smart? (Not sure, didn't test it. -Seth ) On my Raspberry Pi I see a spinning triangle fullscreen. ​ Under Gnome or something I assume it would open in a window due to SDL2 being smart? (Not sure, didn't test it. -Seth )
Line 58: Line 58:
 ====Compiling and running the other examples==== ====Compiling and running the other examples====
  
-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:​win_setup2|Compiling RTSimpleApp]]. You can do this resource building in Linux as well. The difference is that you need to compile the RTPack tool before it can be done.+The compilation process for the other examples is exactly the same that what was explained for RTBareBones above. ​
  
-For instructions how to compile RTPack ​in Linux see [[proton:rtpack|instructions from here]].+But in addition the other examples than RTBareBones need resources to be built as explained here: [[proton:win_setup2|Compiling RTSimpleApp]]. 
  
-The resulting binary called ''​RTPack''​ will appear ​to a subdirectory called ''​build''​Let it stay there.+To do this in linux using RTPack, you need to move into your projects media directory and run build_media.sh, which itself runs RTPack/​linux/​build_media.sh to do the work.
  
-Now let's build RTSimpleApp ​just like RTBareBones:+Let's build RTSimpleApp, then build its media:
  
 <code bash> <code bash>
 cd RTSimpleApp/​linux cd RTSimpleApp/​linux
-mkdir build +sh linux_compile.sh 
-cd build +cd ../media 
-cmake .. +sh build_media.sh
-make +
-</​code>​ +
- +
-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 as well. The difference is that while there is a separate Windows script called update_media.bat for each example there is only one script for Linux that tries to take care of all the examples. +
- +
-Run the script and see it do its job: +
- +
-<code bash> +
-cd ../../media +
-../​../​tools/​linux/​update_media.sh +
-</​code>​ +
- +
-This will convert the fonts and images to correct format and copy the converted resources to the ''​bin''​ directory of the example. Next you can run the example: +
- +
-<code bash>+
 cd ../bin cd ../bin
-../linux/​build/​rtsimpleapp+./RTSimpleApp
 </​code>​ </​code>​
  
-The rest of the examples can be compiled ​and run in a similar way.+If that worked, ​the final stuff (.rtfont and .rttex and .rtpack files probably) will be copied into ../​bin/​interface, ​and you'​ll ​run the app.
  
 ===How update_media.sh works=== ===How update_media.sh works===
  
 The resource building script goes to the subdirectories of the ''​media''​ directory and converts fonts and images to the Proton format. It uses a configuration file called ''​texture_conversion_flags.txt''​ that contains options for converting the images. The examples'​ ''​media''​ directories already contain these configuration files but if you'll build your own applications and want to use this system make sure you have these files in place. The resource building script goes to the subdirectories of the ''​media''​ directory and converts fonts and images to the Proton format. It uses a configuration file called ''​texture_conversion_flags.txt''​ that contains options for converting the images. The examples'​ ''​media''​ directories already contain these configuration files but if you'll build your own applications and want to use this system make sure you have these files in place.
- 
 ==== Debug builds ​ ==== ==== Debug builds ​ ====
  
proton/linux_setup.txt · Last modified: 2018/07/28 09:15 by seth