]> git.lizzy.rs Git - dragonfireclient.git/commitdiff
Fix OSX packaging finally
authorPavel Puchkin <i@neoascetic.me>
Mon, 15 Dec 2014 15:32:08 +0000 (17:32 +0200)
committerCraig Robbins <kde.psych@gmail.com>
Tue, 16 Dec 2014 10:33:54 +0000 (20:33 +1000)
Signed-off-by: Craig Robbins <kde.psych@gmail.com>
CMakeLists.txt
misc/Info.plist [new file with mode: 0644]
misc/minetest-icon.icns [new file with mode: 0644]
src/porting.cpp

index 6bfd4c91140c1626b73dbf8f19bb3760a5b89afa..8245e703768d98164bc4d777bd67acc4b976f56a 100644 (file)
@@ -73,7 +73,7 @@ if(WIN32)
        set(LOCALEDIR "locale")
 elseif(APPLE)
        set(SHAREDIR ".")
-       set(BINDIR "./bin")
+       set(BINDIR ".")
        set(DOCDIR "./doc/${PROJECT_NAME}")
        set(EXAMPLE_CONF_DIR ${DOCDIR})
        set(LOCALEDIR "locale")
@@ -213,13 +213,11 @@ if(WIN32)
        # This might be needed for some installer
        #set(CPACK_PACKAGE_EXECUTABLES bin/minetest.exe "Minetest" bin/minetestserver.exe "Minetest Server")
 elseif(APPLE)
-       # see http://cmake.org/Wiki/CMake:CPackPackageGenerators#Bundle_.28OSX_only.29
        set(CPACK_PACKAGE_FILE_NAME "${PROJECT_NAME}-${VERSION_STRING}-osx")
-       set(CPACK_PACKAGE_ICON ${CMAKE_CURRENT_SOURCE_DIR}/misc/mac/minetest-icon.icns)
+       set(CPACK_PACKAGE_ICON ${CMAKE_CURRENT_SOURCE_DIR}/misc/minetest-icon.icns)
        set(CPACK_BUNDLE_NAME ${PROJECT_NAME})
        set(CPACK_BUNDLE_ICON ${CPACK_PACKAGE_ICON})
-       set(CPACK_BUNDLE_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/misc/mac/Info.plist)
-       set(CPACK_BUNDLE_STARTUP_COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/misc/mac/minetest-mac.sh)
+       set(CPACK_BUNDLE_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/misc/Info.plist)
        set(CPACK_GENERATOR "Bundle")
 else()
        set(CPACK_PACKAGE_FILE_NAME "${PROJECT_NAME}-${VERSION_STRING}-linux")
diff --git a/misc/Info.plist b/misc/Info.plist
new file mode 100644 (file)
index 0000000..848ccfa
--- /dev/null
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+       <key>CFBundleDevelopmentRegion</key>
+       <string>English</string>
+       <key>CFBundleExecutable</key>
+       <string>../Resources/minetest</string>
+       <key>CFBundleIconFile</key>
+       <string>minetest.icns</string>
+       <key>CFBundleIdentifier</key>
+       <string>net.minetest.minetest</string>
+</dict>
+</plist>
diff --git a/misc/minetest-icon.icns b/misc/minetest-icon.icns
new file mode 100644 (file)
index 0000000..14731c2
Binary files /dev/null and b/misc/minetest-icon.icns differ
index e1a062ecd80aed8535f1db58b37b7531ffefb720..025e5978c7557642ed61d8b092c8f679a22f995d 100644 (file)
@@ -528,7 +528,7 @@ void initializePaths()
        {
                dstream<<"Bundle resource path: "<<path<<std::endl;
                //chdir(path);
-               path_share = std::string(path) + DIR_DELIM + "share";
+               path_share = std::string(path) + DIR_DELIM + STATIC_SHAREDIR;
        }
        else
        {