Starting.html 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. <!DOCTYPE html> <HTML lang=en> <HEAD> <STYLE>
  2. body { background-color: #EEFFEE; font-size: 16px; font-family: Arial;
  3. color: #000000; margin: 0px;
  4. padding-left: 0px; padding-right: 0px;
  5. padding-top: 0px; padding-bottom: 0px; }
  6. H1 { padding-left: 10px; padding-top: 10px; padding-bottom: 10px; font-size: 26px; }
  7. H2 { padding-left: 10px; padding-top: 10px; font-size: 20px; }
  8. blockquote {
  9. color: #FFFFFF; background: #000000;
  10. font-size: 20px; font-family: monospace;
  11. padding-left: 5px; padding-right: 5px;
  12. padding-top: 5px; padding-bottom: 5px;
  13. }
  14. P { padding-left: 10px; }
  15. IMG { padding-left: 0px; padding-right: 0px;
  16. padding-top: 0px; padding-bottom: 0px; }
  17. A { font-size: 18px; font-family: Arial; color: #0000A0; text-decoration: none; }
  18. A:hover { color: #000070; background: #AAffAA; }
  19. A:active { color: #00A0A0; }
  20. .normal { font-size: 18px; color: #00A0A0; }
  21. .sub { font-size: 18px; color: #ffffdf; }
  22. </STYLE> </HEAD> <BODY>
  23. <IMG SRC="Images/Title.png" ALT="Images/Title.png">
  24. <P>
  25. <A href="Manual.html">Back to main page</A>
  26. </P><P>
  27. </P><H1> Getting started</H1><P></P><IMG SRC="Images/Border.png"><P>
  28. </P><H2> Working in Linux</H2><P>
  29. </P><P>
  30. Place the library's root folder inside of a new folder. This gives room for the temporary object's folder, which will be created outside of the dfpsr folder when compiling.
  31. </P><P>
  32. <IMG SRC="Images/Warning.png" ALT="Warning">
  33. A light-weight Linux distribution for laptops (such as Linux Mint) might require you to install GNU's compiler toolchain <B>"gcc"</B> and X11 headers <B>"libx11-dev"</B>.
  34. </P><P>
  35. <IMG SRC="Images/Warning.png" ALT="Warning">
  36. Big-endian support is only theoretical and has never actually been tested, because big-endian desktops were practically extinct when the library was created. If you happen to own such a rare museum item in working condition, sending the <B>DSR_BIG_ENDIAN</B> macro to compilation should activate the big-endian mode and shift the direction of bit shift meant to be equivalent with the address space.
  37. </P><P>
  38. </P><H2> Build and run an example program:</H2><P>
  39. </P><P>
  40. <IMG SRC="Images/SmallDot.png">
  41. Select an SDK example and open its folder in a terminal.
  42. </P><P>
  43. <IMG SRC="Images/SmallDot.png">
  44. Give permission to execute the build script.
  45. </P><P>
  46. <blockquote> chmod +x build.sh</blockquote>
  47. </P><P>
  48. <IMG SRC="Images/SmallDot.png">
  49. Run the build script.
  50. </P><P>
  51. <blockquote> ./build.sh</blockquote></P><H2> If no example runs, try regression tests to diagnose:</H2><P><IMG SRC="Images/SmallDot.png">
  52. Open the source folder in a terminal and run the test script:
  53. </P><P>
  54. <blockquote>chmod +x test.sh</blockquote>
  55. </P><P>
  56. <blockquote>./test.sh</blockquote>
  57. </P><P>
  58. This will stop with a clearly visible error message if any of the tests fail.
  59. </P><P>
  60. </P><H2> Create your own project</H2><P>
  61. </P><P>
  62. <IMG SRC="Images/SmallDot.png">
  63. Copy the folder of a template program.
  64. If you want a 3D application with animations, start from basic3D.
  65. If you want graphical user interface that only redrawn when something happens, start from basicGUI.
  66. If you want a command line interface application, start from basicCLI. Command line applications are more portable by using "WINDOW_MANAGER=NONE". This compiles the dummy wrapper NoWindow.cpp so that it can run on the pure operating system without any display server.
  67. </P><P>
  68. <IMG SRC="Images/SmallDot.png">
  69. Change ROOT_PATH and TEMP_DIR in your build script to refer to the same locations from a new source path. If you don't use the build script, you can just delete it.
  70. </P><P>
  71. <IMG SRC="Images/SmallDot.png">
  72. Update header include paths to the library from the new folder location.
  73. </P><P>
  74. <IMG SRC="Images/SmallDot.png">
  75. Add your own external dependencies to LINKER_FLAGS within a quote with -l in front of each library name.
  76. </P><IMG SRC="Images/Border.png"><P>
  77. </P><H2> Compiling a project on Microsoft Windows</H2><P>
  78. </P><P>
  79. Create a project from existing code:
  80. </P><P>
  81. <IMG SRC="Images/SmallDot.png">
  82. Download a mingw edition of CodeBlocks from their website. <A href="http://www.codeblocks.org/downloads/26#windows">www.codeblocks.org/downloads</A>
  83. </P><P>
  84. <IMG SRC="Images/SmallDot.png">
  85. Start CodeBlocks with administrator rights and create a new Win32 project, just to get the correct libraries. You can then throw away the template main file.
  86. </P><P>
  87. <IMG SRC="Images/SmallDot.png">
  88. If not starting as an administrator, certain parts of the file system may lack necessary permissions needed for creating executable binaries.
  89. </P><P>
  90. <IMG SRC="Images/SmallDot.png">
  91. Select C++ 14 with G++ from the GCC toolchain, so that it will be compatible with the software renderer. Link with "-lm -pthread" to get standard C++ math and threading. This should be done for both debug and release.
  92. </P><P>
  93. <IMG SRC="Images/SmallDot.png">
  94. Import all source files from <B>dfpsr/Source/DFPSR</B>.
  95. </P><P>
  96. <IMG SRC="Images/SmallDot.png">
  97. Import all source files from <B>the project you want to build</B>.
  98. </P><P>
  99. <IMG SRC="Images/SmallDot.png">
  100. Import <B>dfpsr/Source/windowManagers/Win32Window.cpp</B>.
  101. </P><P>
  102. <IMG SRC="Images/SmallDot.png">
  103. Save your project, so that you can continue working on the project.
  104. </P><P>
  105. <IMG SRC="Images/SmallDot.png">
  106. Build and run the project.
  107. </P><P>
  108. This is not an ideal solution for development if you plan to have multiple projects depending on the same library. A better solution would be to compile the whole dfpsr folder into a static library, link to it in each of your projects and refer to includeFramework.h.
  109. </P><IMG SRC="Images/Border.png"><P>
  110. </P>
  111. </BODY> </HTML>