Ver Fonte

After testing on two versions of MacOS, testing with a 16-bit monitor, and concluding that the fullscreen button is not essential, it is time to announce MacOS as officially supported by the media layer.

David Piuva há 4 dias atrás
pai
commit
8303a2fdcf
3 ficheiros alterados com 80 adições e 87 exclusões
  1. 34 38
      Doc/Generator/Input/Starting.txt
  2. 43 47
      Doc/Starting.html
  3. 3 2
      README.md

+ 34 - 38
Doc/Generator/Input/Starting.txt

@@ -21,9 +21,6 @@ Title2: Minimum system requirements
 Enabling SSSE3 (-mssse3) can give a performance boost in image processing and shading to textures by making vector extraction faster.
 Enabling AVX2 (-mavx2) can make texture sampling faster by enabling the gather instructions and 256-bit integer operations.
 
-*
-Truecolor (8 bits per channel) is a minimum requirement to create a window.
-
 *
 Windows XP (from year 2001) is the oldest supported version of MS-Windows because CreateProcessW is used to start other applications.
 The file API also assumes access to Unicode versions of functions from Windows 2000.
@@ -77,7 +74,40 @@ The Wizard.DsrProj build script will then build all SDK examples and templates,
 *
 Make sure to manually erase object files in your temporary folder once in a while, because the build system in Source/tools/builder keeps everything for maximum build speed.
 ---
-Title2: Create your own cross-platform project
+Title2: Buliding the wizard application on MacOS
+
+*
+Go to the Source\tools\wizard folder in a terminal.
+
+*
+Give permission to execute the build script.
+<PRE><BLOCKQUOTE>chmod +x build_macos.sh</BLOCKQUOTE></PRE>
+
+*
+Run the build script.
+<PRE><BLOCKQUOTE>./build_macos.sh</BLOCKQUOTE></PRE>
+
+If asked to install development tools during this process, accept to have a C++ compiler installed.
+
+---
+Title2: Create a new project project using the wizard application
+
+The easiest way to create a new application is to use the wizard application that you compiled according to the instructions above.
+
+*
+Select a project that you want to use as a template.
+
+*
+Press the clone button.
+
+*
+Enter the path for your new project as the target path. The new project should ideally be placed right next to the DFPSR folder, so that you can easily preserve the relative paths across computers and see the folder containing a specific version of the DFPSR library and the projects depending on it as a time capsule.
+
+*
+Press "Begin cloning" to copy the template and attempt to update relative paths.
+
+---
+Title2: Create a new project manually
 
 *
 Copy the folder of a template program to where you want it.
@@ -126,37 +156,3 @@ StartupNotify=false
 CodeEnd:
 
 You can also begin your main function with file_setCurrentPath(file_getApplicationFolder()); to move into the application's folder automatically, which is supported on both Windows and Linux, but not guaranteed to work on all Posix systems because the symbolic link /proc/self/exe is not a part of the Posix standard.
----
-Title2: Compiling a CodeBlocks project on Microsoft Windows
-
-Create a project from existing code:
-
-*
-Download a mingw edition of CodeBlocks from their website. <A href="http://www.codeblocks.org/downloads/26#windows">www.codeblocks.org/downloads</A>
-
-*
-Start CodeBlocks with administrator rights and create a new project.
-If not starting as an administrator, certain parts of the file system may lack necessary permissions needed for creating executable binaries.
-Can create a Win32 project, just to quickly get the correct libraries for Win32Window.cpp (-lgdi32 -luser32 -lkernel32 -lcomctl32).
-You can then throw away the template main file, because you probably want to start with a template using dsrMain to get input arguments converted into List<String> with Unicode support on multiple platforms.
-
-*
-Select C++ 14 with G++ from the GCC toolchain, so that it will be compatible with the framework.
-Also -O2 or higher optimization, unless you want terrible performance.
-This should be done for both debug and release.
-
-*
-Import all source files from <B>dfpsr/Source/DFPSR</B>.
-
-*
-Import all source files from <B>the project you want to build</B>.
-
-*
-Import <B>dfpsr/Source/windowManagers/Win32Window.cpp</B> if needed by the project (linking with -lgdi32 -luser32 -lkernel32 -lcomctl32).
-
-*
-Import <B>dfpsr/Source/soundManagers/WinMMSound.cpp</B> if needed by the project (linking with -lwinmm).
-
-*
-Build and run the project in debug mode, to check that your settings are correct and the compiler works.
----

+ 43 - 47
Doc/Starting.html

@@ -49,10 +49,6 @@ There are many ways to compile the examples using C++14, but the simplest way to
 Enabling SSSE3 (-mssse3) can give a performance boost in image processing and shading to textures by making vector extraction faster.
 Enabling AVX2 (-mavx2) can make texture sampling faster by enabling the gather instructions and 256-bit integer operations.
 
-</P><P>
-<IMG SRC="Images/SmallDot.png">
-Truecolor (8 bits per channel) is a minimum requirement to create a window.
-
 </P><P>
 <IMG SRC="Images/SmallDot.png">
 Windows XP (from year 2001) is the oldest supported version of MS-Windows because CreateProcessW is used to start other applications.
@@ -117,7 +113,49 @@ The Wizard.DsrProj build script will then build all SDK examples and templates,
 <IMG SRC="Images/SmallDot.png">
 Make sure to manually erase object files in your temporary folder once in a while, because the build system in Source/tools/builder keeps everything for maximum build speed.
 </P><IMG SRC="Images/Border.png"><P>
-</P><H2> Create your own cross-platform project</H2><P>
+</P><H2> Buliding the wizard application on MacOS</H2><P>
+</P><P>
+<IMG SRC="Images/SmallDot.png">
+Go to the Source\tools\wizard folder in a terminal.
+
+</P><P>
+<IMG SRC="Images/SmallDot.png">
+Give permission to execute the build script.
+<PRE><BLOCKQUOTE>chmod +x build_macos.sh</BLOCKQUOTE></PRE>
+
+</P><P>
+<IMG SRC="Images/SmallDot.png">
+Run the build script.
+<PRE><BLOCKQUOTE>./build_macos.sh</BLOCKQUOTE></PRE>
+
+</P><P>
+If asked to install development tools during this process, accept to have a C++ compiler installed.
+
+</P><P>
+</P><IMG SRC="Images/Border.png"><P>
+</P><H2> Create a new project project using the wizard application</H2><P>
+</P><P>
+The easiest way to create a new application is to use the wizard application that you compiled according to the instructions above.
+
+</P><P>
+<IMG SRC="Images/SmallDot.png">
+Select a project that you want to use as a template.
+
+</P><P>
+<IMG SRC="Images/SmallDot.png">
+Press the clone button.
+
+</P><P>
+<IMG SRC="Images/SmallDot.png">
+Enter the path for your new project as the target path. The new project should ideally be placed right next to the DFPSR folder, so that you can easily preserve the relative paths across computers and see the folder containing a specific version of the DFPSR library and the projects depending on it as a time capsule.
+
+</P><P>
+<IMG SRC="Images/SmallDot.png">
+Press "Begin cloning" to copy the template and attempt to update relative paths.
+
+</P><P>
+</P><IMG SRC="Images/Border.png"><P>
+</P><H2> Create a new project manually</H2><P>
 </P><P>
 <IMG SRC="Images/SmallDot.png">
 Copy the folder of a template program to where you want it.
@@ -171,47 +209,5 @@ StartupNotify=false
 </BLOCKQUOTE></PRE>
 </P><P>
 You can also begin your main function with file_setCurrentPath(file_getApplicationFolder()); to move into the application's folder automatically, which is supported on both Windows and Linux, but not guaranteed to work on all Posix systems because the symbolic link /proc/self/exe is not a part of the Posix standard.
-</P><IMG SRC="Images/Border.png"><P>
-</P><H2> Compiling a CodeBlocks project on Microsoft Windows</H2><P>
-</P><P>
-Create a project from existing code:
-
-</P><P>
-<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>
-
-</P><P>
-<IMG SRC="Images/SmallDot.png">
-Start CodeBlocks with administrator rights and create a new project.
-If not starting as an administrator, certain parts of the file system may lack necessary permissions needed for creating executable binaries.
-Can create a Win32 project, just to quickly get the correct libraries for Win32Window.cpp (-lgdi32 -luser32 -lkernel32 -lcomctl32).
-You can then throw away the template main file, because you probably want to start with a template using dsrMain to get input arguments converted into List<String> with Unicode support on multiple platforms.
-
-</P><P>
-<IMG SRC="Images/SmallDot.png">
-Select C++ 14 with G++ from the GCC toolchain, so that it will be compatible with the framework.
-Also -O2 or higher optimization, unless you want terrible performance.
-This should be done for both debug and release.
-
-</P><P>
-<IMG SRC="Images/SmallDot.png">
-Import all source files from <B>dfpsr/Source/DFPSR</B>.
-
-</P><P>
-<IMG SRC="Images/SmallDot.png">
-Import all source files from <B>the project you want to build</B>.
-
-</P><P>
-<IMG SRC="Images/SmallDot.png">
-Import <B>dfpsr/Source/windowManagers/Win32Window.cpp</B> if needed by the project (linking with -lgdi32 -luser32 -lkernel32 -lcomctl32).
-
-</P><P>
-<IMG SRC="Images/SmallDot.png">
-Import <B>dfpsr/Source/soundManagers/WinMMSound.cpp</B> if needed by the project (linking with -lwinmm).
-
-</P><P>
-<IMG SRC="Images/SmallDot.png">
-Build and run the project in debug mode, to check that your settings are correct and the compiler works.
-</P><IMG SRC="Images/Border.png"><P>
 </P>
 </BODY> </HTML>

+ 3 - 2
README.md

@@ -47,7 +47,7 @@ Real-time dynamic light with depth-based casted shadows and normal mapping at 45
 * **Timers** Get the double precision seconds passed since the first call to the timer, so that you won't have to worry about midnight bugs when the time of day resets.
 * **SIMD abstraction layer** Use simd.h to automatically generate highly efficient SSE, AVX and NEON intrinsics from fully readable math syntax. Your vectorized code will look like a reference implementation and compiling for an unknown target architecture will generate scalar operations that can still give a performance boost by writing your algorithm with basic operations that are most often supported directly in CPU hardware, accessing memory aligned with cache lines, keeping the instruction window packed with tasks, and making it very easy for a compiler's auto-vectorization if something similar with a different name exists in the future.
 * **Safe pointers** Use SafePointer.h to catch more errors by telling your pointer which part of an allocation it may work on. Leaves no overhead in the release version, so that you can always replace your raw pointer with SafePointer and know that you will get an informative error message with the pointer's name and detailed information when something bad happens.
-* **Strings** Use UTF-32 to store characters in memory to make sure that all algorithms work with non-latin characters (compatible with U"" string literals). Saving to files default to UTF-8 (compact storage) with BOM (explicitly saying which format is used) and CR LF line endings (so that text files encoded anywhere can be read everywhere). Uses shared memory buffers automatically to allow splitting into a list of strings without flooding the heap with small allocations.
+* **Strings** Use UTF-32 to store characters in memory to make sure that all algorithms work with non-latin characters (compatible with U"" string literals). Saving to files defaults to UTF-8 (compact storage) with BOM (explicitly saying which format is used) and CR LF line endings (so that text files encoded anywhere can be read everywhere). Uses shared memory buffers automatically to allow splitting into a list of strings without flooding the heap with small allocations.
 * **Buffers** All files are saved and loaded through Buffer objects. This makes sure that all file formats you design only have to worry about how to encode the bytes, regression tests will be easy by not involving external side-effects from the file system, and any file can be bundled into your own by using the Buffer equivalent of a save function.
 * **File management** Roughly equivalent to std::filesystem from C++17, but works with C++14, uses the same String and ReadableString types on all platforms, and can automatically correct folder separators between / (Posix) and \ (MS-Windows).
 * **Process management** Can start other applications and keep track of their status, so that you can call an application like a function writing the result to files.
@@ -80,4 +80,5 @@ Linux Mint needs the compiler and X11 headers, so run "sudo apt install g++" and
 Currently supporting X11.
 Support for Wayland will have to wait until it is possible to create a window without relying on contemporary extensions tied to specific desktop environments that come and go every month.
 * **Microsoft Windows**, but slower than on Linux and MacOS because Windows has very bad scheduling of processes.
-* **MacOS** still has features missing in the Cocoa integration, but will soon be officially supported.
+* **MacOS**, tested on Sequoia and Tahoe.
+The Cocoa wrapper is missing the button for toggling fullscreen, because there is no way of handling it that makes sense for both games and applications without adding contemporary settings that are specific to one operating system. If the button enables fullscreen for games by default, then programs not designed for fullscreen might get stuck in fullscreen without a way to disable it. If the button enables a fullscreen that shows decorations when hovering the top, players of games might accidentally interact with the window decorations when playing a game. You can still start games in fullscreen and toggle it using commands, so it is not really a problem for games that rarely need to toggle fullscreen manually.