Starting.html 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. <!DOCTYPE html>
  2. <HTML lang=en>
  3. <HEAD>
  4. <style>
  5. body { background-color: #FFFFEE; font-size: 16px; font-family: Arial;
  6. color: #000000; margin: 0px;
  7. padding-left: 0px; padding-right: 0px;
  8. padding-top: 0px; padding-bottom: 0px; }
  9. H1 { padding-left: 10px; padding-top: 10px; padding-bottom: 10px; font-size: 26px; }
  10. H2 { padding-left: 10px; padding-top: 10px; font-size: 20px; }
  11. blockquote {
  12. color: #FFFFFF; background: #000000;
  13. font-size: 20px; font-family: monospace;
  14. padding-left: 5px; padding-right: 5px;
  15. padding-top: 5px; padding-bottom: 5px;
  16. }
  17. P { padding-left: 10px; }
  18. IMG { padding-left: 0px; padding-right: 0px;
  19. padding-top: 0px; padding-bottom: 0px; }
  20. A { font-size: 18px; font-family: Arial; color: #0000A0; text-decoration: none; }
  21. A:hover { color: #000070; background: #AAffAA; }
  22. A:active { color: #00A0A0; }
  23. .normal { font-size: 18px; color: #00A0A0; }
  24. .sub { font-size: 18px; color: #ffffdf; }
  25. </style>
  26. </HEAD>
  27. <BODY>
  28. <IMG SRC="Images/Title.png" alt="Logo titled DFPSR">
  29. <P>
  30. <A href="../Manual.html">Back to main page</A>
  31. </P>
  32. <H1>Getting started</H1>
  33. <IMG SRC="Images/Border.png">
  34. <H2>Working in Linux</H2>
  35. <P>
  36. 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.
  37. </P>
  38. <P>
  39. <IMG SRC="Images/Warning.png"> A light-weight Linux distribution, might require you to install GNU's compiler toolchain <B>"gcc"</B> and X11 headers <B>"libx11-dev"</B>.
  40. </P>
  41. <P>
  42. <IMG SRC="Images/Warning.png"> 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.
  43. </P>
  44. <H2>Build and run an example program:</H2>
  45. <P>
  46. <IMG SRC="Images/SmallDot.png"> Select an SDK example and open its folder in a terminal.
  47. </P>
  48. <P>
  49. <IMG SRC="Images/SmallDot.png"> Give permission to execute the build script.
  50. </P>
  51. <P>
  52. <blockquote>chmod +x build.sh</blockquote>
  53. </P>
  54. <P>
  55. <IMG SRC="Images/SmallDot.png"> Run the build script.
  56. </P>
  57. <P>
  58. <blockquote>./build.sh</blockquote>
  59. </P>
  60. <H2>If no example runs, try regression tests to diagnose:</H2>
  61. <P>
  62. <IMG SRC="Images/SmallDot.png"> Open the source folder in a terminal and run the test script:
  63. </P>
  64. <P>
  65. <blockquote>chmod +x test.sh</blockquote>
  66. </P>
  67. <P>
  68. <blockquote>./test.sh</blockquote>
  69. </P>
  70. <P>
  71. This will stop with a clearly visible error message if any of the tests fail.
  72. </P>
  73. <H2>Create your own project</H2>
  74. <P>
  75. <IMG SRC="Images/SmallDot.png"> Copy one of the SDK examples to use as a template.
  76. </P>
  77. <P>
  78. <IMG SRC="Images/SmallDot.png"> 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.
  79. </P>
  80. <P>
  81. <IMG SRC="Images/SmallDot.png"> Update header include paths to the library from the new folder location.
  82. </P>
  83. <P>
  84. <IMG SRC="Images/SmallDot.png"> Add your own external dependencies to LINKER_FLAGS within a quote with -l in front of each library name.
  85. </P>
  86. <P>
  87. <H2>Create a command line application</H2>
  88. </P>
  89. <P>
  90. If your application doesn't create any window, you can make it more portable by replacing "WINDOW_MANAGER=X11" with "WINDOW_MANAGER=NONE". This will compile with NoWindow.cpp instead of X11Window.cpp so that you cannot create a window.
  91. </P>
  92. <IMG SRC="Images/Border.png">
  93. <H2>Compiling a project on Microsoft Windows</H2>
  94. <P>
  95. Create a project from existing code:
  96. </P>
  97. <P>
  98. <IMG SRC="Images/SmallDot.png"> Download a mingw edition of CodeBlocks from their website. <A href="http://www.codeblocks.org/downloads/26#windows">www.codeblocks.org/downloads</A>
  99. </P>
  100. <P>
  101. <IMG SRC="Images/SmallDot.png"> 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.
  102. </P>
  103. <P>
  104. <IMG SRC="Images/Warning.png"> If not starting as an administrator, certain parts of the file system may lack necessary permissions needed for creating executable binaries.
  105. </P>
  106. <P>
  107. <IMG SRC="Images/SmallDot.png"> 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.
  108. </P>
  109. <P>
  110. <IMG SRC="Images/SmallDot.png"> Import all source files from <B>dfpsr/Source/DFPSR</B>.
  111. </P>
  112. <P>
  113. <IMG SRC="Images/SmallDot.png"> Import all source files from <B>the project you want to build</B>.
  114. </P>
  115. <P>
  116. <IMG SRC="Images/SmallDot.png"> Import <B>dfpsr/Source/windowManagers/Win32Window.cpp</B>.
  117. </P>
  118. <P>
  119. <IMG SRC="Images/SmallDot.png"> Save your project, so that you can continue working on the project.
  120. </P>
  121. <P>
  122. <IMG SRC="Images/SmallDot.png"> Build and run the project.
  123. </P>
  124. <P>
  125. 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.
  126. </P>
  127. <IMG SRC="Images/Border.png">
  128. </BODY>
  129. </HTML>