From 0e45f3c0ee556d4dee3bc81a577e4998232f491a Mon Sep 17 00:00:00 2001 From: OmniTroid Date: Wed, 31 Jul 2024 13:40:43 +0200 Subject: Universal configure script (#1022) * Init configure.sh * echo detected platform * Implement check_command * Implement install_bass_macos, plus checks * Ignore tmp * Add configure main function and bass installs * Less functions * Reformat file, add some stuff * Start adding automatic qt detection * Curl is more portable it seems * Try finding Qt's bundled cmake * fix cmake command checking * Reorder to windows first * do not download deps if already present * Add configure clean * Fix basic command checks * cmd fixes * thank you bash, very cool! * fix file shenanigans * unneccessary comment * Use qt_path instead of qt_cmake * Ignore apng folder * Rework with QT_PATH * Move find_qt to the top * move check_command near the top * Tidy up command checking * Rename QT_PATH to QT_ROOT and call the qt installation path QT_PATH instead * only clone qtapng if no dir * Cmake shenanigans * Fix build with ninja * Fix apng cp cmd * Fix apng check * Just call it cmake * Run cmake in configure.sh * Ignore generated files * Comment out mega cmake command * Fix apng check * more cmake stuff * make the cmake command we use very clear * ignore cmake_cmd.txt * Note that linux and macos is not supported * Update README * Add some stuff to windeployqt * Clone themes * macos fixes * Only call windeployqt on windows * Linux fixes * Remove linux todo comment * Remove git stuff from themes checkout * Note about vanilla content.. * Add note about formatting in readme * Remove e flag so script doesn't stop with no error messages * Note about toolchains on unix-likes * Fix cmake path on linux * Rework get_zip for better error handling and less unzipping unnecessary files * Adjust get_zip calls * Hopefully make error handling more robust * Fix bassopus on linux * linux bassopus pathing fix * Fix discord rpc linux * Add note about opengl * Ignore test_aopacket * Tidy up readme a bit again * Remove old configure scripts --- README.md | 42 ++++++++++++++++++++++++++++++++++-------- 1 file changed, 34 insertions(+), 8 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index 483e031c..ba99404d 100644 --- a/README.md +++ b/README.md @@ -8,18 +8,44 @@ ## Setting up for development +### Prerequisites + +Unix-like systems will expect a C toolchain, installed using eg.: + +Ubuntu: `sudo apt install build-essential` +macOS: `xcode-select --install` + +You may also need openGL libraries to compile QApng, eg: + +Ubuntu: `sudo apt install libgl1-mesa-dev` +macOS: `brew install glfw glew` + +### Setup + This program's main dependency is Qt and the currently recommended version for development is **6.5.3**. See [this link](https://doc.qt.io/qt-6/qt-online-installation.html) -on how to install Qt. +on how to install Qt. You will need to check off the following under "Additional Libraries": +- Qt Image formats +- Qt WebSockets + +Under "Developer and Designer tools", you may also want to check off: +- CMake +- Ninja +- If you're on Windows, a toolchain (MinGW) + +Assuming all this is in place, you should be able to run `configure.sh` to generate the necessary build files. +This also compiles the program and shows a cmake command that can be used to recreate the build files. + +### Content + +To test key features, you may need the vanilla base content, which is not included in this repository. +You can get it from https://ao-dl.b-cdn.net/vanilla_full_2023.6_4.zip -### Other dependencies +This should be put in `./bin/base` -* BASS (http://www.un4seen.com/bass.html) -* BASS Opus Plugin (http://www.un4seen.com/bass.html#addons) -* BASS Midi Plugin (http://www.un4seen.com/bass.html#addons) -* Discord Rich Presence (https://github.com/discordapp/discord-rpc/releases) -* Qt Apng Plugin (https://github.com/jurplel/QtApng/releases) +### Formatting -(see .github/workflows/build.yml for exact installation commands) +All code should be formatted according to the `.clang-format` file. +This will be checked by CI and will fail if the code is not formatted correctly. ## Running Tests Running tests requires Catch2 and cmake -- cgit