]> git.lizzy.rs Git - dragonfireclient.git/commitdiff
Make installer create its own Minetest folder (#10445)
authorLoneWolfHT <lonewolf04361@gmail.com>
Fri, 18 Dec 2020 18:38:27 +0000 (10:38 -0800)
committerGitHub <noreply@github.com>
Fri, 18 Dec 2020 18:38:27 +0000 (19:38 +0100)
This changes the installer to create its own Minetest folder instead of having the user create it themselves. This prevents spewing the contents of Minetest everywhere when users change the install directory and expect the installer to create a folder to put it in

CMakeLists.txt

index 31f548be734ca05c948e104e7b4fa0ca96829433..78d551168e3047b4eefc3aab7dac7a4a43f343a1 100644 (file)
@@ -165,7 +165,7 @@ if(RUN_IN_PLACE)
        install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/textures/texture_packs_here.txt" DESTINATION "${SHAREDIR}/textures")
 endif()
 
-install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/games/minetest_game" DESTINATION "${SHAREDIR}/games/" 
+install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/games/minetest_game" DESTINATION "${SHAREDIR}/games/"
        COMPONENT "SUBGAME_MINETEST_GAME" OPTIONAL PATTERN ".git*" EXCLUDE )
 install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/games/devtest" DESTINATION "${SHAREDIR}/games/"
        COMPONENT "SUBGAME_MINIMAL" OPTIONAL PATTERN ".git*" EXCLUDE )
@@ -278,19 +278,20 @@ if(WIN32)
                set(CPACK_GENERATOR ZIP)
 
        else()
-               set(CPACK_GENERATOR WIX ZIP)
+               set(CPACK_GENERATOR WIX)
                set(CPACK_PACKAGE_NAME "${PROJECT_NAME_CAPITALIZED}")
-               set(CPACK_PACKAGE_INSTALL_DIRECTORY "${PROJECT_NAME_CAPITALIZED}")
+               set(CPACK_PACKAGE_INSTALL_DIRECTORY ".")
                set(CPACK_PACKAGE_EXECUTABLES ${PROJECT_NAME} "${PROJECT_NAME_CAPITALIZED}")
                set(CPACK_CREATE_DESKTOP_LINKS ${PROJECT_NAME})
+               set(CPACK_PACKAGING_INSTALL_PREFIX "/${PROJECT_NAME_CAPITALIZED}")
 
                set(CPACK_WIX_PRODUCT_ICON "${CMAKE_CURRENT_SOURCE_DIR}/misc/minetest-icon.ico")
-               # Supported languages can be found at 
+               # Supported languages can be found at
                # http://wixtoolset.org/documentation/manual/v3/wixui/wixui_localization.html
                #set(CPACK_WIX_CULTURES "ar-SA,bg-BG,ca-ES,hr-HR,cs-CZ,da-DK,nl-NL,en-US,et-EE,fi-FI,fr-FR,de-DE")
                set(CPACK_WIX_UI_BANNER "${CMAKE_CURRENT_SOURCE_DIR}/misc/CPACK_WIX_UI_BANNER.BMP")
                set(CPACK_WIX_UI_DIALOG "${CMAKE_CURRENT_SOURCE_DIR}/misc/CPACK_WIX_UI_DIALOG.BMP")
-               
+
                set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/doc/lgpl-2.1.txt")
 
                # The correct way would be to include both x32 and x64 into one installer