Starting.html 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. <!DOCTYPE html> <HTML lang=en> <HEAD> <STYLE>
  2. body { background-color: #EEFFEE; font-size: 1.0rem; font-family: Arial; max-width: 50rem;
  3. color: #000000; margin: 0px;
  4. padding-left: 0px; padding-right: 0px; padding-top: 0px; padding-bottom: 0px; }
  5. H1 { padding-left: 10px; padding-right: 0px; padding-top: 10px; padding-bottom: 10px; font-size: 1.4rem; }
  6. H2 { padding-left: 10px; padding-right: 0px; padding-top: 10px; padding-bottom: 0px; font-size: 1.2rem; }
  7. blockquote {
  8. color: #FFFFFF; background: #000000;
  9. font-size: 1.2rem; font-family: monospace;
  10. padding-left: 5px; padding-right: 5px;
  11. padding-top: 5px; padding-bottom: 5px;
  12. }
  13. P { padding-left: 20px; padding-right: 0px; padding-top: 0px; padding-bottom: 0px; }
  14. IMG { padding-left: 0px; padding-right: 0px; padding-top: 2px; padding-bottom: 0px;
  15. max-width: 100%; }
  16. A { display: inline; border-radius: 4px;
  17. font-size: 1.0rem; font-family: Arial; color: #000044; text-decoration: none;
  18. padding-left: 4px; padding-right: 4px; padding-top: 4px; padding-bottom: 4px; }
  19. A:hover { color: #FFFF00; background: #000044; }
  20. A:active { color: #FFFFFF; background: #444444; }
  21. </STYLE> </HEAD> <BODY>
  22. <IMG SRC="Images/Title.png" ALT="Images/Title.png">
  23. <P>
  24. <A href="Manual.html">Back to main page</A>
  25. </P><P>
  26. </P><H1> Getting started</H1><P></P><IMG SRC="Images/Border.png"><P>
  27. </P><H2> Working in Linux</H2><P>
  28. </P><P>
  29. 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.
  30. </P><P>
  31. <IMG SRC="Images/Warning.png" ALT="Warning">
  32. 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>.
  33. </P><P>
  34. <IMG SRC="Images/Warning.png" ALT="Warning">
  35. 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.
  36. </P><P>
  37. </P><H2> Build and run an example program:</H2><P>
  38. </P><P>
  39. <IMG SRC="Images/SmallDot.png">
  40. Select an SDK example and open its folder in a terminal.
  41. </P><P>
  42. <IMG SRC="Images/SmallDot.png">
  43. Give permission to execute the build script.
  44. </P><P>
  45. <PRE><BLOCKQUOTE>chmod +x build.sh</BLOCKQUOTE></PRE>
  46. </P><P>
  47. <IMG SRC="Images/SmallDot.png">
  48. Run the build script.
  49. </P><P>
  50. <PRE><BLOCKQUOTE>./build.sh</BLOCKQUOTE></PRE>
  51. </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. <PRE><BLOCKQUOTE>chmod +x test.sh
  55. ./test.sh</blockquote></BLOCKQUOTE></PRE>
  56. </P><P>
  57. This will stop with a clearly visible error message if any of the tests fail.
  58. </P><P>
  59. </P><H2> Create your own project</H2><P>
  60. </P><P>
  61. <IMG SRC="Images/SmallDot.png">
  62. Copy the folder of a template program.
  63. If you want a 3D application with animations, start from basic3D.
  64. If you want graphical user interface that only redrawn when something happens, start from basicGUI.
  65. 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.
  66. </P><P>
  67. <IMG SRC="Images/SmallDot.png">
  68. 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.
  69. </P><P>
  70. <IMG SRC="Images/SmallDot.png">
  71. Update header include paths to the library from the new folder location.
  72. </P><P>
  73. <IMG SRC="Images/SmallDot.png">
  74. Add your own external dependencies to LINKER_FLAGS within a quote with -l in front of each library name.
  75. </P><IMG SRC="Images/Border.png"><P>
  76. </P><H2> Compiling a project on Microsoft Windows</H2><P>
  77. </P><P>
  78. Create a project from existing code:
  79. </P><P>
  80. <IMG SRC="Images/SmallDot.png">
  81. Download a mingw edition of CodeBlocks from their website. <A href="http://www.codeblocks.org/downloads/26#windows">www.codeblocks.org/downloads</A>
  82. </P><P>
  83. <IMG SRC="Images/SmallDot.png">
  84. 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.
  85. </P><P>
  86. <IMG SRC="Images/SmallDot.png">
  87. If not starting as an administrator, certain parts of the file system may lack necessary permissions needed for creating executable binaries.
  88. </P><P>
  89. <IMG SRC="Images/SmallDot.png">
  90. 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.
  91. </P><P>
  92. <IMG SRC="Images/SmallDot.png">
  93. Import all source files from <B>dfpsr/Source/DFPSR</B>.
  94. </P><P>
  95. <IMG SRC="Images/SmallDot.png">
  96. Import all source files from <B>the project you want to build</B>.
  97. </P><P>
  98. <IMG SRC="Images/SmallDot.png">
  99. Import <B>dfpsr/Source/windowManagers/Win32Window.cpp</B>.
  100. </P><P>
  101. <IMG SRC="Images/SmallDot.png">
  102. Save your project, so that you can continue working on the project.
  103. </P><P>
  104. <IMG SRC="Images/SmallDot.png">
  105. Build and run the project.
  106. </P><P>
  107. 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.
  108. </P><IMG SRC="Images/Border.png"><P>
  109. </P>
  110. </BODY> </HTML>