diff --git a/README.md b/README.md index 83174cc..f2d524b 100644 --- a/README.md +++ b/README.md @@ -20,28 +20,26 @@ Keep in mind that I've only played with each of these, and have _not_ made a ful If you have nothing installed then you'll want to run the `scripts/windows_setup.ps1` script to install everything. This script will run and prompt you for admin passwords as it installs what you need, so be sure to stay near your computer to type passwords in when requested. To run it do this: -1. Start a _normal_ non-Administrator PowerShell window. -2. `irm https://learncodethehardway.com/cppsetup.ps1 > cppsetup.ps1` -3. `powershell -executionpolicy bypass .\cppsetup.ps1` -4. _STAY HERE_. For some dumb reason many installers have a timeout that will cause the installer to fail if you don't enter a password fast enough, so stay close until this is done. -5. Close this PowerShell window and then you can run Windows Terminal and everything should work. If not please email help@learncodethehardway.com to tell me what happened. +> NOTE: Instructions for install C++ on windows coming soon. -The `cppsetup.ps1` file and the `scripts/windows_setup.ps1` should be exactly the same. I'm having you use the `cppsetup.ps1` file since I assume you don't have `git` yet. Once that's done you should then be able to build the project: +After you have everything installed do this: -2. Run `.\setup.ps1` -3. `meson compile -C builddir` -4. `.\builddir\sfmldemo` -- That should run it and you see a window with ImGUI's demo panel. +```shell +make reset +make +make run +``` -**WARNING**: You should look in the `setup.ps1` and `reset_build.p1` files for how a build is actually configured. The most important line is at the bottom `meson setup -Ddefault_library=static builddir` which properly configures the build so that the `sfmldemo.exe` program actually runs. Without the `-Ddefault_library=static` the `sfmldemo.exe` file will not have the `.dll` files it needs and will silently fail. If it fails to start then run `start builddir` and double click on it to get the error messages. Then run `reset_build.ps1` to get a good build. +## macOS -## OSX +For macOS it's way easier. Get XCode and [Meson](https://mesonbuild.com/) installed. Once you have +XCode do this: -1. Get XCode and [Meson](https://mesonbuild.com/) installed. -2. Run `./setup.sh` -3. `meson compile -C builddir` -4. `.\builddir\sfmldemo` -- That should run it and you see a window with ImGUI's demo panel. - -I'll have more extensive instructions in a later blog post, but if you have time try this out and let me know how it went at help@learncodethehardway.com. Please let me know if you tried a different compiler, Windows version, etc. If you're on OSX or Linux it should work the same but Linux people might want to use their package manager instead. +```shell +make reset +make +make run +``` ### "Keyboard without any keys" @@ -51,7 +49,24 @@ No, this does not enhance security at all. These people have gone full on insane ## Linux -I actually don't have a Linux computer ready to test, but if you have a brand of Linux you like then try the OSX instructions and email me at [help@learncodethehardway.com](mailto:help@learncodethehardway.com). +Linux is difficult because people seem to mangle their Linux into unusable territory, so it's +assumed that you know how to install a C++ compiler and Make. The only warning I have to give you +is this: + +> __WARNING__ This project is setup to build clean on every computer, which means it will _NOT_ use +> your broke as Linux hacked mangled packages. If you get errors when linking with `fmt` that's +> probably because your Linux thinks it's smart and broke that library and you're trying to link to +> it. Don't, it won't work. Just use my `meson.build` and avoid your system's packages at all +> costs. + +After that do the same thing: + +```shell +make reset +make +make run +``` + ## Next Steps