(cmake) added Win32-specific Install and Packaging settings, as well as an Icon for...
authorChristoph Sommer <mail@christoph-sommer.de>
Fri, 23 Nov 2007 00:34:02 +0000 (00:34 +0000)
committerChristoph Sommer <mail@christoph-sommer.de>
Fri, 23 Nov 2007 00:34:02 +0000 (00:34 +0000)
increased version number to 0.3.1-SVN

SVN-Revision: 5188

CMakeLists.txt
config.h.cmake
configure.ac
data/images/engine/icons/supertux.rc [new file with mode: 0644]

index b2f0366..10dbd5a 100644 (file)
@@ -269,6 +269,21 @@ IF(CMAKE_COMPILER_IS_GNUCC)
 ENDIF(CMAKE_COMPILER_IS_GNUCC)
 
 
+## On Windows, add an icon
+
+IF(WIN32)
+  SET(SUPERTUX_SOURCES ${SUPERTUX_SOURCES} ${SUPERTUX_SOURCE_DIR}/data/images/engine/icons/supertux.rc)
+  IF(MINGW)
+    ADD_CUSTOM_COMMAND(
+    OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/supertux_rc.o
+    COMMAND windres.exe -I${CMAKE_CURRENT_SOURCE_DIR}/data/images/engine/icons -i${CMAKE_CURRENT_SOURCE_DIR}/data/images/engine/icons/supertux.rc -o ${CMAKE_CURRENT_BINARY_DIR}/supertux_rc.o)
+    SET(SUPERTUX_SOURCES ${SUPERTUX_SOURCES} ${CMAKE_CURRENT_BINARY_DIR}/supertux_rc.o)
+  ELSE(MINGW)
+    SET(SUPERTUX_EXE_SRCS ${SUPERTUX_EXE_SRCS} supertux.rc)
+  ENDIF(MINGW)
+ENDIF(WIN32)
+
+
 ## Generate supertux executable in the right place
 
 SET(EXECUTABLE_OUTPUT_PATH ${SUPERTUX_SOURCE_DIR})
@@ -281,21 +296,65 @@ ADD_EXECUTABLE(supertux2 ${SUPERTUX_SOURCES})
 
 TARGET_LINK_LIBRARIES(supertux2 squirrel)
 
-## Install stuff
-
-INSTALL(TARGETS supertux2 DESTINATION bin)
 
-INSTALL(FILES ${SUPERTUX_SOURCE_DIR}/data/images/engine/icons/supertux.png ${SUPERTUX_SOURCE_DIR}/data/images/engine/icons/supertux.xpm DESTINATION share/pixmaps)
-
-INSTALL(FILES ${SUPERTUX_SOURCE_DIR}/supertux2.desktop DESTINATION share/applications)
+## Install stuff
 
-INSTALL(FILES ${SUPERTUX_SOURCE_DIR}/INSTALL ${SUPERTUX_SOURCE_DIR}/README ${SUPERTUX_SOURCE_DIR}/COPYING ${SUPERTUX_SOURCE_DIR}/WHATSNEW.txt DESTINATION doc/supertux-0.3.x)
+IF(WIN32 AND NOT UNIX)
+
+  SET(INSTALL_SUBDIR_BIN ".")
+  SET(INSTALL_SUBDIR_SHARE "data/")
+  SET(INSTALL_SUBDIR_DOC ".")
+  SET(INSTALL_SUBDIR_ICONS ".")
+
+  INSTALL(FILES ${SUPERTUX_SOURCE_DIR}/SDL.dll DESTINATION ${INSTALL_SUBDIR_BIN})
+  INSTALL(FILES ${SUPERTUX_SOURCE_DIR}/SDL_image.dll DESTINATION ${INSTALL_SUBDIR_BIN})
+  INSTALL(FILES ${SUPERTUX_SOURCE_DIR}/iconv.dll DESTINATION ${INSTALL_SUBDIR_BIN})
+  INSTALL(FILES ${SUPERTUX_SOURCE_DIR}/libogg-0.dll DESTINATION ${INSTALL_SUBDIR_BIN})
+  INSTALL(FILES ${SUPERTUX_SOURCE_DIR}/libphysfs-1-0-0.dll DESTINATION ${INSTALL_SUBDIR_BIN})
+  INSTALL(FILES ${SUPERTUX_SOURCE_DIR}/OpenAl32.dll DESTINATION ${INSTALL_SUBDIR_BIN})
+  INSTALL(FILES ${SUPERTUX_SOURCE_DIR}/wrap_oal.dll DESTINATION ${INSTALL_SUBDIR_BIN})
+  INSTALL(FILES ${SUPERTUX_SOURCE_DIR}/libcurl-4.dll DESTINATION ${INSTALL_SUBDIR_BIN})
+
+ELSE(WIN32 AND NOT UNIX)
+
+  SET(INSTALL_SUBDIR_BIN "games/")
+  SET(INSTALL_SUBDIR_SHARE "share/games/supertux2/")
+  SET(INSTALL_SUBDIR_DOC "share/doc/supertux2/")
+  SET(INSTALL_SUBDIR_ICONS "share/pixmaps/")
+
+  INSTALL(FILES ${SUPERTUX_SOURCE_DIR}/supertux2.desktop DESTINATION share/applications)
+
+ENDIF(WIN32 AND NOT UNIX)
+
+INSTALL(TARGETS supertux2 DESTINATION ${INSTALL_SUBDIR_BIN})
+INSTALL(FILES ${SUPERTUX_SOURCE_DIR}/data/images/engine/icons/supertux.png ${SUPERTUX_SOURCE_DIR}/data/images/engine/icons/supertux.xpm DESTINATION ${INSTALL_SUBDIR_ICONS})
+INSTALL(FILES ${SUPERTUX_SOURCE_DIR}/INSTALL ${SUPERTUX_SOURCE_DIR}/README ${SUPERTUX_SOURCE_DIR}/COPYING ${SUPERTUX_SOURCE_DIR}/WHATSNEW.txt DESTINATION ${INSTALL_SUBDIR_DOC})
+INSTALL(FILES ${SUPERTUX_SOURCE_DIR}/data/credits.txt ${SUPERTUX_SOURCE_DIR}/data/camera.cfg DESTINATION ${INSTALL_SUBDIR_SHARE})
+INSTALL(DIRECTORY data/images DESTINATION ${INSTALL_SUBDIR_SHARE} PATTERN ".svn" EXCLUDE)
+INSTALL(DIRECTORY data/levels DESTINATION ${INSTALL_SUBDIR_SHARE} PATTERN ".svn" EXCLUDE)
+INSTALL(DIRECTORY data/music DESTINATION ${INSTALL_SUBDIR_SHARE} PATTERN ".svn" EXCLUDE)
+INSTALL(DIRECTORY data/scripts DESTINATION ${INSTALL_SUBDIR_SHARE} PATTERN ".svn" EXCLUDE)
+INSTALL(DIRECTORY data/speech DESTINATION ${INSTALL_SUBDIR_SHARE} PATTERN ".svn" EXCLUDE)
+INSTALL(DIRECTORY data/sounds DESTINATION ${INSTALL_SUBDIR_SHARE} PATTERN ".svn" EXCLUDE)
+INSTALL(DIRECTORY data/locale DESTINATION ${INSTALL_SUBDIR_SHARE} PATTERN ".svn" EXCLUDE)
+
+
+## CPack/Installation-specific stuff
+
+INCLUDE(InstallRequiredSystemLibraries)
+SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "SuperTux")
+SET(CPACK_PACKAGE_VENDOR "SuperTux Devel Team")
+SET(CPACK_PACKAGE_DESCRIPTION_FILE "${SUPERTUX_SOURCE_DIR}/README")
+SET(CPACK_RESOURCE_FILE_LICENSE "${SUPERTUX_SOURCE_DIR}/COPYING")
+SET(CPACK_PACKAGE_VERSION_MAJOR "0")
+SET(CPACK_PACKAGE_VERSION_MINOR "3")
+SET(CPACK_PACKAGE_VERSION_PATCH "1-SVN")
+SET(CPACK_PACKAGE_INSTALL_DIRECTORY "SuperTux ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
+SET(CPACK_PACKAGE_EXECUTABLES "..\\\\supertux2" "SuperTux ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
+IF(WIN32 AND NOT UNIX)
+  SET(CPACK_NSIS_INSTALLED_ICON_NAME "..\\\\supertux2")
+  SET(CPACK_NSIS_DISPLAY_NAME "SuperTux ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
+ELSE(WIN32 AND NOT UNIX)
+ENDIF(WIN32 AND NOT UNIX)
+INCLUDE(CPack)
 
-INSTALL(FILES ${SUPERTUX_SOURCE_DIR}/data/credits.txt ${SUPERTUX_SOURCE_DIR}/data/camera.cfg DESTINATION share/supertux2)
-INSTALL(DIRECTORY data/images DESTINATION share/supertux2 PATTERN ".svn" EXCLUDE)
-INSTALL(DIRECTORY data/levels DESTINATION share/supertux2 PATTERN ".svn" EXCLUDE)
-INSTALL(DIRECTORY data/music DESTINATION share/supertux2 PATTERN ".svn" EXCLUDE)
-INSTALL(DIRECTORY data/scripts DESTINATION share/supertux2 PATTERN ".svn" EXCLUDE)
-INSTALL(DIRECTORY data/speech DESTINATION share/supertux2 PATTERN ".svn" EXCLUDE)
-INSTALL(DIRECTORY data/sounds DESTINATION share/supertux2 PATTERN ".svn" EXCLUDE)
-INSTALL(DIRECTORY data/locale DESTINATION share/supertux2 PATTERN ".svn" EXCLUDE)
index 5e33fc1..ae8c590 100644 (file)
@@ -1,5 +1,5 @@
 #define PACKAGE_NAME "supertux"
-#define PACKAGE_VERSION "0.3.0"
+#define PACKAGE_VERSION "0.3.1-SVN"
 
 #cmakedefine DEBUG
 #cmakedefine ENABLE_SQDBG
index f6aca78..7b0c3da 100644 (file)
@@ -11,7 +11,7 @@ dnl ===========================================================================
 
 dnl Process this file with autoconf to produce a configure script.
 AC_PREREQ([2.54])
-AC_INIT(supertux2, 0.3.0-SVN)
+AC_INIT(supertux2, 0.3.1-SVN)
 AC_CONFIG_SRCDIR([src/main.cpp])
 AC_CONFIG_AUX_DIR([mk/autoconf])
 AC_CANONICAL_TARGET
diff --git a/data/images/engine/icons/supertux.rc b/data/images/engine/icons/supertux.rc
new file mode 100644 (file)
index 0000000..a0fe55e
--- /dev/null
@@ -0,0 +1 @@
+1 ICON DISCARDABLE "supertux.ico"