Skip to content

Commit 0e45f3c

Browse files
authored
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
1 parent 4d1b051 commit 0e45f3c

6 files changed

Lines changed: 554 additions & 149 deletions

File tree

.gitignore

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,23 @@ discord/
4444
# Jetbrains config and build dir (CLion)
4545
.idea/
4646
cmake-build-*
47+
/tmp/
48+
/qtapng/
49+
50+
# Generated files
51+
.cmake/
52+
.ninja_deps
53+
.ninja_log
54+
.qt/
55+
Attorney_Online_autogen/
56+
CMakeCache.txt
57+
CMakeFiles/
58+
Testing/
59+
build.ninja
60+
cmake_install.cmake
61+
test/CMakeFiles/
62+
test/CTestTestfile.cmake
63+
test/cmake_install.cmake
64+
test/test_aopacket_autogen/
65+
test/test_aopacket
66+
cmake_cmd.txt

README.md

Lines changed: 34 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,44 @@
88

99
## Setting up for development
1010

11+
### Prerequisites
12+
13+
Unix-like systems will expect a C toolchain, installed using eg.:
14+
15+
Ubuntu: `sudo apt install build-essential`
16+
macOS: `xcode-select --install`
17+
18+
You may also need openGL libraries to compile QApng, eg:
19+
20+
Ubuntu: `sudo apt install libgl1-mesa-dev`
21+
macOS: `brew install glfw glew`
22+
23+
### Setup
24+
1125
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)
12-
on how to install Qt.
26+
on how to install Qt. You will need to check off the following under "Additional Libraries":
27+
- Qt Image formats
28+
- Qt WebSockets
29+
30+
Under "Developer and Designer tools", you may also want to check off:
31+
- CMake
32+
- Ninja
33+
- If you're on Windows, a toolchain (MinGW)
34+
35+
Assuming all this is in place, you should be able to run `configure.sh` to generate the necessary build files.
36+
This also compiles the program and shows a cmake command that can be used to recreate the build files.
37+
38+
### Content
39+
40+
To test key features, you may need the vanilla base content, which is not included in this repository.
41+
You can get it from https://ao-dl.b-cdn.net/vanilla_full_2023.6_4.zip
1342

14-
### Other dependencies
43+
This should be put in `./bin/base`
1544

16-
* BASS (http://www.un4seen.com/bass.html)
17-
* BASS Opus Plugin (http://www.un4seen.com/bass.html#addons)
18-
* BASS Midi Plugin (http://www.un4seen.com/bass.html#addons)
19-
* Discord Rich Presence (https://github.com/discordapp/discord-rpc/releases)
20-
* Qt Apng Plugin (https://github.com/jurplel/QtApng/releases)
45+
### Formatting
2146

22-
(see .github/workflows/build.yml for exact installation commands)
47+
All code should be formatted according to the `.clang-format` file.
48+
This will be checked by CI and will fail if the code is not formatted correctly.
2349

2450
## Running Tests
2551
Running tests requires Catch2 and cmake

0 commit comments

Comments
 (0)