A few cmake related fixes:
* Restore Windows installing to `C:\Games` by default. * Restore Windows installing to the `Program` subdirectory. * Use actual newlines in the `Build` documentation files. * Remove the text that says that cmake is unstable.
This commit is contained in:
+8
-4
@@ -4,7 +4,8 @@ Make sure you read README.md first if you have not.
|
||||
|
||||
Compiling StepMania
|
||||
==
|
||||
To use StepMania on your computer, it is first assumed that cmake is run (see README.md for more information). Then, follow the guide based on your operating system.
|
||||
To use StepMania on your computer, it is first assumed that cmake is run (see README.md for more information).
|
||||
Then, follow the guide based on your operating system.
|
||||
|
||||
Windows
|
||||
===
|
||||
@@ -16,12 +17,14 @@ Using Xcode, simply build in Xcode and it will place the .app file in the correc
|
||||
|
||||
Linux
|
||||
===
|
||||
Using the command line, simply type make and it will place stepmania and GtkModule.so (if requested) in the root StepMania directory. There is no more need to symlink the files.
|
||||
Using the command line, simply type make and it will place stepmania and GtkModule.so
|
||||
(if requested) in the root StepMania directory. There is no more need to symlink the files.
|
||||
|
||||
Installing StepMania
|
||||
==
|
||||
Installing in this context refers to placing the folders and generated binary in a standard location based on your operating system.
|
||||
This guide assumes default install locations. If you want to change the initial location, pass in `-DCMAKE_INSTALL_PREFIX=/new/path/here` when configuring your local setup.
|
||||
This guide assumes default install locations.
|
||||
If you want to change the initial location, pass in `-DCMAKE_INSTALL_PREFIX=/new/path/here` when configuring your local setup.
|
||||
|
||||
Windows
|
||||
===
|
||||
@@ -33,5 +36,6 @@ The `StepMania.app` package can be copied to `/Applications` and it will work as
|
||||
|
||||
Linux
|
||||
===
|
||||
After installing, run `sudo make install`. The files will be placed in the location specified: by default, that is now `/usr/local/stepmania-5.0`.
|
||||
After installing, run `sudo make install`. The files will be placed in the location specified:
|
||||
by default, that is now `/usr/local/stepmania-5.0`.
|
||||
|
||||
|
||||
+25
-13
@@ -1,8 +1,7 @@
|
||||
Warning
|
||||
==
|
||||
This is considered unstable. This may work on Windows and Mac. This is not guaranteed to work on Linux right now.
|
||||
|
||||
Use this at your own risk.
|
||||
Using CMake is considered stable, but not every single combination is known to work.
|
||||
Using the defaults as suggested should cause minimal problems.
|
||||
|
||||
CMake Installation
|
||||
==
|
||||
@@ -11,7 +10,8 @@ There are two ways of working with cmake: the command line and the GUI.
|
||||
CMake Command Line
|
||||
===
|
||||
|
||||
If you are unfamiliar with cmake, first run `cmake --help`. This will present a list of options and generators. The generators are used for setting up your project.
|
||||
If you are unfamiliar with cmake, first run `cmake --help`. This will present a list of options and generators.
|
||||
The generators are used for setting up your project.
|
||||
|
||||
The following steps will assume you operate from the StepMania project's Build directory.
|
||||
|
||||
@@ -21,34 +21,46 @@ For the first setup, you will want to run this command:
|
||||
|
||||
Replace {YourGeneratorHere} with one of the generator choices from `cmake --help`.
|
||||
|
||||
If any cmake project file changes, you can just run `cmake .. && cmake ..` to get up to date. If this by itself doesn't work, you may have to clean the cmake cache. Use `rm -rf CMakeCache.txt CMakeScripts/ CMakeFiles/ cmake_install.txt` to do that, and then run the generator command again.
|
||||
If any cmake project file changes, you can just run `cmake .. && cmake ..` to get up to date.
|
||||
If this by itself doesn't work, you may have to clean the cmake cache.
|
||||
Use `rm -rf CMakeCache.txt CMakeScripts/ CMakeFiles/ cmake_install.txt` to do that, and then run the generator command again.
|
||||
|
||||
The reason for running cmake at least twice is to make sure that all of the variables get set up appropriately.
|
||||
|
||||
Environment variables can be modified at this stage. If you want to pass `-ggdb` or any other flag that is not set up by default, utilize `CXXFLAGS` or any appropriate variable.
|
||||
Environment variables can be modified at this stage. If you want to pass `-ggdb` or any other flag that is not set up by default,
|
||||
utilize `CXXFLAGS` or any appropriate variable.
|
||||
|
||||
CMake GUI
|
||||
===
|
||||
|
||||
For those that use the GUI to work with cmake, you need to specify where the source code is and where the binaries will be built. The first one, counter-intuitively, is actually the parent directory of this one: the main StepMania directory. The second one for building can be this directory.
|
||||
For those that use the GUI to work with cmake, you need to specify where the source code is and where the binaries will be built.
|
||||
The first one, counter-intuitively, is actually the parent directory of this one: the main StepMania directory.
|
||||
The second one for building can be this directory.
|
||||
|
||||
Upon setting the source and build directories, you should `Configure` the build. If no errors show up, you can hit `Generate` until none of the rows on the GUI are red.
|
||||
Upon setting the source and build directories, you should `Configure` the build.
|
||||
If no errors show up, you can hit `Generate` until none of the rows on the GUI are red.
|
||||
|
||||
If the cmake project file changes, you can just generate the build to get up to date. If this by itself doesn't work, you may have to clean the cmake cache. Go to File -> Delete Cache, and then run the `Configure` and `Generate` steps again.
|
||||
If the cmake project file changes, you can just generate the build to get up to date.
|
||||
If this by itself doesn't work, you may have to clean the cmake cache.
|
||||
Go to File -> Delete Cache, and then run the `Configure` and `Generate` steps again.
|
||||
|
||||
Release vs Debug
|
||||
==
|
||||
|
||||
If you are generating makefiles with cmake, you will also need to specify your build type. Most users will want to use `RELEASE` while some developers may want to use `DEBUG`.
|
||||
If you are generating makefiles with cmake, you will also need to specify your build type.
|
||||
Most users will want to use `RELEASE` while some developers may want to use `DEBUG`.
|
||||
|
||||
When generating your cmake files for the first time (or after any cache delete), pass in `-DCMAKE_BUILD_TYPE=Debug` for a debug build. We have `RelWithDbgInfo` and `MinSizeRel` available as well.
|
||||
When generating your cmake files for the first time (or after any cache delete),
|
||||
pass in `-DCMAKE_BUILD_TYPE=Debug` for a debug build. We have `RelWithDbgInfo` and `MinSizeRel` available as well.
|
||||
|
||||
It is advised to clean your cmake cache if you switch builds.
|
||||
|
||||
Note that if you use an IDE like Visual Studio or Xcode, you do not need to worry about setting the build type. You can edit the build type directly in the IDE.
|
||||
Note that if you use an IDE like Visual Studio or Xcode, you do not need to worry about setting the build type.
|
||||
You can edit the build type directly in the IDE.
|
||||
|
||||
Last Words
|
||||
==
|
||||
|
||||
With that, you should be good to go. If there are still questions, view the resources on the parent directory's README.md file.
|
||||
With that, you should be good to go.
|
||||
If there are still questions, view the resources on the parent directory's README.md file.
|
||||
|
||||
|
||||
@@ -22,6 +22,8 @@ if(WIN32)
|
||||
# to be installed relatively cleanly.
|
||||
set(CPACK_PACKAGE_INSTALL_DIRECTORY "StepMania ${SM_VERSION_MAJOR}")
|
||||
set(CPACK_PACKAGE_INSTALL_REGISTRY_KEY "StepMania ${SM_VERSION_MAJOR}")
|
||||
set(CPACK_NSIS_EXECUTABLES_DIRECTORY "Program")
|
||||
set(CPACK_NSIS_INSTALL_ROOT "C:\\\\Games")
|
||||
endif()
|
||||
|
||||
include(CPack)
|
||||
|
||||
+15
-13
@@ -619,20 +619,22 @@ endif()
|
||||
|
||||
if(NOT APPLE)
|
||||
if(WIN32)
|
||||
set(SM_FULL_INSTALLATION_PATH_LIST "${SM_INSTALL_DESTINATION}" "Program")
|
||||
sm_join("${SM_FULL_INSTALLATION_PATH_LIST}" "/" SM_FULL_INSTALLATION_PATH)
|
||||
# Hardcoding the values for now since the foreach loop is not working as intended.
|
||||
install(TARGETS "${SM_EXE_NAME}" DESTINATION "${SM_INSTALL_DESTINATION}/bin")
|
||||
install(FILES "${SM_PROGRAM_DIR}/avcodec-53.dll" DESTINATION "${SM_INSTALL_DESTINATION}/bin")
|
||||
install(FILES "${SM_PROGRAM_DIR}/avformat-53.dll" DESTINATION "${SM_INSTALL_DESTINATION}/bin")
|
||||
install(FILES "${SM_PROGRAM_DIR}/avutil-51.dll" DESTINATION "${SM_INSTALL_DESTINATION}/bin")
|
||||
install(FILES "${SM_PROGRAM_DIR}/jpeg.dll" DESTINATION "${SM_INSTALL_DESTINATION}/bin")
|
||||
install(FILES "${SM_PROGRAM_DIR}/msvcp100.dll" DESTINATION "${SM_INSTALL_DESTINATION}/bin")
|
||||
install(FILES "${SM_PROGRAM_DIR}/msvcp110.dll" DESTINATION "${SM_INSTALL_DESTINATION}/bin")
|
||||
install(FILES "${SM_PROGRAM_DIR}/msvcr100.dll" DESTINATION "${SM_INSTALL_DESTINATION}/bin")
|
||||
install(FILES "${SM_PROGRAM_DIR}/msvcr110.dll" DESTINATION "${SM_INSTALL_DESTINATION}/bin")
|
||||
install(FILES "${SM_PROGRAM_DIR}/parallel_lights_io.dll" DESTINATION "${SM_INSTALL_DESTINATION}/bin")
|
||||
install(FILES "${SM_PROGRAM_DIR}/swscale-2.dll" DESTINATION "${SM_INSTALL_DESTINATION}/bin")
|
||||
install(FILES "${SM_PROGRAM_DIR}/vccorlib110.dll" DESTINATION "${SM_INSTALL_DESTINATION}/bin")
|
||||
install(FILES "${SM_PROGRAM_DIR}/zlib1.dll" DESTINATION "${SM_INSTALL_DESTINATION}/bin")
|
||||
install(TARGETS "${SM_EXE_NAME}" DESTINATION "${SM_FULL_INSTALLATION_PATH}")
|
||||
install(FILES "${SM_PROGRAM_DIR}/avcodec-53.dll" DESTINATION "${SM_FULL_INSTALLATION_PATH}")
|
||||
install(FILES "${SM_PROGRAM_DIR}/avformat-53.dll" DESTINATION "${SM_FULL_INSTALLATION_PATH}")
|
||||
install(FILES "${SM_PROGRAM_DIR}/avutil-51.dll" DESTINATION "${SM_FULL_INSTALLATION_PATH}")
|
||||
install(FILES "${SM_PROGRAM_DIR}/jpeg.dll" DESTINATION "${SM_FULL_INSTALLATION_PATH}")
|
||||
install(FILES "${SM_PROGRAM_DIR}/msvcp100.dll" DESTINATION "${SM_FULL_INSTALLATION_PATH}")
|
||||
install(FILES "${SM_PROGRAM_DIR}/msvcp110.dll" DESTINATION "${SM_FULL_INSTALLATION_PATH}")
|
||||
install(FILES "${SM_PROGRAM_DIR}/msvcr100.dll" DESTINATION "${SM_FULL_INSTALLATION_PATH}")
|
||||
install(FILES "${SM_PROGRAM_DIR}/msvcr110.dll" DESTINATION "${SM_FULL_INSTALLATION_PATH}")
|
||||
install(FILES "${SM_PROGRAM_DIR}/parallel_lights_io.dll" DESTINATION "${SM_FULL_INSTALLATION_PATH}")
|
||||
install(FILES "${SM_PROGRAM_DIR}/swscale-2.dll" DESTINATION "${SM_FULL_INSTALLATION_PATH}")
|
||||
install(FILES "${SM_PROGRAM_DIR}/vccorlib110.dll" DESTINATION "${SM_FULL_INSTALLATION_PATH}")
|
||||
install(FILES "${SM_PROGRAM_DIR}/zlib1.dll" DESTINATION "${SM_FULL_INSTALLATION_PATH}")
|
||||
|
||||
# foreach(SM_WINDOW_DLL "${SM_WINDOWS_PROGRAM_DLLS}")
|
||||
# install(FILES "${SM_WINDOW_DLL}" DESTINATION "${SM_INSTALL_DESTINATION}")
|
||||
|
||||
Reference in New Issue
Block a user