From b4f6c4cb48c259e61ce7110a9a8eeda12a22fc3e Mon Sep 17 00:00:00 2001 From: Jack Andersen Date: Tue, 28 May 2019 13:35:07 -1000 Subject: [PATCH] Update README.md --- CMakeSettings.json | 30 +++++++++++++ README.md | 103 +++++++++++++++++++++++++++++++++++++++------ dew.cmake | 2 +- dewfile.json | 7 --- 4 files changed, 122 insertions(+), 20 deletions(-) create mode 100644 CMakeSettings.json diff --git a/CMakeSettings.json b/CMakeSettings.json new file mode 100644 index 00000000..358e8099 --- /dev/null +++ b/CMakeSettings.json @@ -0,0 +1,30 @@ +{ + "configurations": [ + { + "name": "x64-Debug", + "generator": "Ninja", + "configurationType": "Debug", + "inheritEnvironments": [ + "msvc_x64_x64" + ], + "buildRoot": "${env.USERPROFILE}\\CMakeBuilds\\${workspaceHash}\\build\\${name}", + "installRoot": "${env.USERPROFILE}\\CMakeBuilds\\${workspaceHash}\\install\\${name}", + "cmakeCommandArgs": "-DCMAKE_PREFIX_PATH=C:/Qt/5.12.3/msvc2017_64/lib/cmake/Qt5", + "buildCommandArgs": "-v", + "ctestCommandArgs": "" + }, + { + "name": "x64-Release", + "generator": "Ninja", + "configurationType": "RelWithDebInfo", + "inheritEnvironments": [ + "msvc_x64_x64" + ], + "buildRoot": "${env.USERPROFILE}\\CMakeBuilds\\${workspaceHash}\\build\\${name}", + "installRoot": "${env.USERPROFILE}\\CMakeBuilds\\${workspaceHash}\\install\\${name}", + "cmakeCommandArgs": "-DCMAKE_PREFIX_PATH=C:/Qt/5.12.3/msvc2017_64/lib/cmake/Qt5", + "buildCommandArgs": "-v", + "ctestCommandArgs": "" + } + ] +} \ No newline at end of file diff --git a/README.md b/README.md index c1d4547b..676daf10 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,95 @@ # Prime World Editor -Prime World Editor is a custom editor suite for Retro Studios' GameCube and Wii games, including the Metroid Prime series and Donkey Kong Country Returns. +Prime World Editor is a custom editor suite for Retro Studios' GameCube and Wii games, including the +Metroid Prime series and Donkey Kong Country Returns. -# Build Requirements -On Windows: -* Visual Studio 2017 64-bit -* Qt 5.10 installation -* Qt Creator -* LLVM 6.0.1 installation; currently must be installed to `C:\Program Files\LLVM\` -* Python 3+ -* Python packages `clang` and `mako` -* You'll also need to download glew 2.1.0 and extract it into the externals folder (so you have `externals/glew-2.1.0/`). +# Building on Windows -In addition you'll need to compile assimp and nod separately with CMake. The build system is kind of a pain right now, sorry. +## Requirements -Most of the project code is cross-platform, but currently has only been tested on Windows, and parts of the build process most likely will not work correctly on other platforms. +* [Visual Studio 2017](https://visualstudio.microsoft.com/vs/) (Desktop development with C++) +* [Qt 5.10+](https://download.qt.io/official_releases/qt/) (MSVC 2017 64-bit specification) +* [LLVM 6.0.1 64-bit](http://releases.llvm.org/6.0.1/LLVM-6.0.1-win64.exe) installation; currently must be installed to `C:\Program Files\LLVM\` +* [Python 3](https://www.python.org/downloads/windows/) + +## Build using Qt Creator + +**Compiler Note:** Before starting, it is wise to select the 64-bit compiler by opening *Tools* > *Kits* > *Kits* tab. +The C and C++ compilers should be set to *Microsoft Visual C++ Compiler 15.0 (amd64)*. + +**CMake Note:** At the time of writing, Qt Creator will search for a user-installed CMake but this is not necessary. +The CMake that comes with Visual Studio may be manually selected by opening *Tools* > *Kits* > *CMake* tab, then adding +a manual CMake with the path: +`C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe`. + +**Debugger Note:** To use Qt Creator for debugging, *Debugging Tools for Windows* must be installed from the +[Windows SDK package](https://developer.microsoft.com/en-us/windows/downloads/windows-10-sdk). Once installed, +the Qt Creator kit should automatically detect CDB. Make sure the x64 version is selected. + +1. *File* > *Open File or Project* +2. Select *CMakeLists.txt* at root of cloned PrimeWorldEditor +3. Select desired build configurations within the Desktop Qt Kit. It is generally fine to just check *Debug* and *Release*. +4. Click *Configure Project* +5. Wait for dependencies to build and CMake project to generate (this may take a while). +6. Edit/Build/Debug/Run + +## Build using Visual Studio + +**Qt Note:** It may be necessary to edit both CMAKE_PREFIX_PATH entries in the *CMakeSettings.json* file. +They should be set to `C:/Qt//msvc2017_64/lib/cmake/Qt5`. + +1. *File* > *Open* > *CMake* +2. Select *CMakeLists.txt* at root of cloned PrimeWorldEditor +3. Wait for dependencies to build and CMake project to generate (this may take a while). +4. Edit/Build/Debug/Run + +## Build using Command Line + +1. Launch *x64 Native Tools Command Prompt for VS 2017* +2. `cd ` +3. `mkdir build` +4. `cd build` +5. `cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=C:/Qt//msvc2017_64/lib/cmake/Qt5 ..` +6. `ninja` +7. *PrimeWorldEditor.exe* is found in the `build/bin` directory. + +# Building on macOS + +## Requirements + +* [Xcode 10.2+](https://developer.apple.com/xcode/) +* [Qt 5.10+](https://download.qt.io/official_releases/qt/) (Clang 64-bit specification) +* *cmake*, *ninja* and *python* installed using [Homebrew](https://brew.sh/) + +## Build using Xcode + +1. `cd ` +2. `mkdir build` +3. `cd build` +4. `cmake -G Xcode -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=~/Qt//clang_64/lib/cmake/Qt5 ..` +5. Open *PrimeWorldEditor.xcodeproj* +6. Edit/Build/Debug/Run + +## Build using Command Line + +1. `cd ` +2. `mkdir build` +3. `cd build` +4. `cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=~/Qt//clang_64/lib/cmake/Qt5 ..` +5. `ninja` +6. *PrimeWorldEditor.app* is found in the `build/bin` directory. + +# Building on Linux + +## Requirements + +* A working compiler toolchain (GCC or Clang) +* *cmake*, *ninja*, *python3*, *clang* (library) packages + +## Build using Command Line + +1. `cd ` +2. `mkdir build` +3. `cd build` +4. `cmake -G Ninja -DCMAKE_BUILD_TYPE=Release ..` +5. `ninja` +6. *PrimeWorldEditor* is found in the `build/bin` directory. diff --git a/dew.cmake b/dew.cmake index 788ea0e7..f829ba7f 100644 --- a/dew.cmake +++ b/dew.cmake @@ -16,7 +16,7 @@ function(integrate_dew) if ($ENV{INVOKED_BY_DEW}) return() endif() - + # # Run dew update # diff --git a/dewfile.json b/dewfile.json index 12d9ecad..4e0d45f7 100644 --- a/dewfile.json +++ b/dewfile.json @@ -43,13 +43,6 @@ "head": "dew", "ref": "a36312e91be8d6489d6b34447281dabb5422f96f" }, - { - "name": "lzo", - "url": "https://github.com/nemequ/lzo", - "type": "git", - "head": "master", - "ref": "0083878c235a89ef96a009d1ff0b500f3a364e4b" - }, { "name": "lzokay", "url": "https://github.com/sfuller/lzokay",