Commit 018d0b40 authored by Gerhard Stein's avatar Gerhard Stein

Updated Code for Win32 Build and added NSIS and ZIP to CMake

parent ba5ddc00
......@@ -4,7 +4,7 @@
cmake_minimum_required(VERSION 2.6)
MESSAGE( "Preparing the Build-System for Commander Genius" )
SET(CG_VERSION "0.3.3.1")
SET(CG_VERSION "0.3.3.1 Pre")
INCLUDE(build.cmake)
......
......@@ -169,10 +169,6 @@ SET(ALL_SRCS ${COMMON_S} ${MENU_S} ${DIALOG_S} ${ENGINE_S}
${COMPRESSION_S} ${GRAPHICS_S} ${EFFECTS_S} ${HARDWARE_S} ${SCALE2X_S} ${SDL_S} ${SDLSOUND_S} ${SDLMUSIC_S} ${SDLSYS_S}
${SDLVIDEO_S} ${ROOT_S})
IF(BUILD_TYPE STREQUAL WIN32)
SET(ALL_SRCS ${ALL_SRCS} src/CGLogo.o)
ENDIF(BUILD_TYPE STREQUAL WIN32)
IF(UNIX)
# Compilation under Linux
ADD_DEFINITIONS("-c -fmessage-length=0")
......@@ -302,7 +298,9 @@ ENDIF(TREMOR)
# The Windows Version has an icon in the executable
IF(BUILD_TYPE STREQUAL WIN32)
SET_TARGET_PROPERTIES(commandergenius PROPERTIES OUTPUT_NAME "build/${BUILD_DIR}/CGenius.exe")
ADD_CUSTOM_COMMAND(OUTPUT CGLogo.o COMMAND cp ${CMAKE_CURRENT_SOURCE_DIR}/src/CGLogo.o)
ADD_CUSTOM_COMMAND(TARGET commandergenius PRE_LINK COMMAND icotool -c -o ${CMAKE_CURRENT_SOURCE_DIR}/src/CGLogo.ico ${CMAKE_CURRENT_SOURCE_DIR}/vfsroot/cglogo512.png )
ADD_CUSTOM_COMMAND(TARGET commandergenius PRE_LINK COMMAND i586-mingw32msvc-windres ${CMAKE_CURRENT_SOURCE_DIR}/src/CGLogo.rc ${CMAKE_CURRENT_SOURCE_DIR}/src/CGLogo.o)
SET_TARGET_PROPERTIES(commandergenius PROPERTIES LINK_FLAGS "${CMAKE_CURRENT_SOURCE_DIR}/src/CGLogo.o")
MESSAGE( "Will build with the CG-Icon for Windows." )
ELSE(BUILD_TYPE STREQUAL WIN32)
SET_TARGET_PROPERTIES(commandergenius PROPERTIES OUTPUT_NAME "build/${BUILD_DIR}/CGenius")
......
########################################################################
############### Prepare the installation of the compiled stuff here!
IF(BUILD_TYPE STREQUAL WIN32)
SET(SHAREDIR CGenius)
SET(APPDIR CGenius)
ELSE(BUILD_TYPE STREQUAL WIN32)
SET(SHAREDIR share/CommanderGenius)
SET(APPDIR games)
ENDIF(BUILD_TYPE STREQUAL WIN32)
# This will install the application itself
INSTALL(TARGETS commandergenius
DESTINATION games)
DESTINATION ${APPDIR})
# This will copy the resources files to the proper directory
INSTALL(DIRECTORY vfsroot/
DESTINATION share/CommanderGenius)
DESTINATION ${SHAREDIR})
# This will copy the readme file.
INSTALL(FILES readme.txt
DESTINATION ${SHAREDIR})
# This will copy the readme file.
INSTALL(FILES changelog.txt
DESTINATION ${SHAREDIR})
# Windows might not have those dlls so we ship them with the packages
IF(BUILD_TYPE STREQUAL WIN32)
INSTALL(FILES libogg-0.dll libvorbis-0.dll libvorbisenc-2.dll libvorbisfile-3.dll SDL.dll
DESTINATION ${APPDIR})
ENDIF(BUILD_TYPE STREQUAL WIN32)
......@@ -6,45 +6,55 @@ OPTION(CREATE_DEBS "Will create Debian Packages" No)
## Generation of Packages.
# Generation of Packages. Common stuff and Basic variables
set(CPACK_COMPONENTS_ALL commandergenius resources)
SET(CPACK_PACKAGE_NAME "CGenius")
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "The ultimate Commander Keen interpreter")
SET(CPACK_PACKAGE_DESCRIPTION "Commander Genius aka CloneKeenPlus is an engine which interprets Commander Keen 1-3 (Vorticons Series).\n .\n As fans and developers we try to implement new features, improve the game play and give the feeling, you are playing the original game.\n .\n Obviously you need the game data of the games to play it.\nCommander Keen 1 comes included in this package.\nEpisode 2 and 3 are registered versions which can be purchased by 3D Realms or Apogee, or bought by someone else.\n If you still have the old games of the registered version, then give it a try. You will be surprised, how well they will look!\n Commander Keen 4 support is under heavy development. Some parts are suddenly starting to work.")
SET(CPACK_PACKAGE_VENDOR "The Commmander Genius Team")
SET(CPACK_PACKAGE_VERSION ${CG_VERSION})
SET(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/readme.txt")
SET(CPACK_PACKAGE_INSTALL_DIRECTORY "/usr/games")
SET(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${BUILD_TYPE}")
SET(CPACK_GENERATOR "TGZ")
IF(WIN32 AND NOT UNIX)
IF(BUILD_TYPE STREQUAL WIN32)
SET(CPACK_PACKAGE_INSTALL_DIRECTORY ${APPDIR})
SET(CPACK_GENERATOR "ZIP;NSIS")
ELSE(BUILD_TYPE STREQUAL WIN32)
SET(CPACK_PACKAGE_INSTALL_DIRECTORY "/usr/games")
SET(CPACK_GENERATOR "TGZ")
ENDIF(BUILD_TYPE STREQUAL WIN32)
IF(BUILD_TYPE STREQUAL WIN32)
# There is a bug in NSI that does not handle full unix paths properly. Make
# sure there is at least one set of four (4) backlasshes.
SET(CPACK_NSIS_INSTALLED_ICON_NAME "CGenius.exe")
SET(CPACK_NSIS_DISPLAY_NAME "${CPACK_PACKAGE_INSTALL_DIRECTORY} Commander Genius")
SET(CPACK_NSIS_DISPLAY_NAME "Commander Genius")
SET(CPACK_NSIS_HELP_LINK "http:\\\\\\\\clonekeenplus.sourceforge.net")
SET(CPACK_NSIS_URL_INFO_ABOUT "http:\\\\\\\\clonekeenplus.sourceforge.net")
SET(CPACK_NSIS_CONTACT "gerstrong@gmail.com")
SET(CPACK_NSIS_MODIFY_PATH ON)
ENDIF(WIN32 AND NOT UNIX)
SET(CPACK_NSIS_MODIFY_PATH OFF)
set(CPACK_NSIS_CREATE_ICONS "CreateShortCut '\$SMPROGRAMS\\\\$STARTMENU_FOLDER\\\\Commander Genius.lnk' '\$INSTDIR\\\\CGenius\\\\CGenius.exe'")
ENDIF(BUILD_TYPE STREQUAL WIN32)
SET(CPACK_PACKAGE_EXECUTABLES "CGenius" "Commander Genius")
# This section is only called if the user wants to get debian packages created
IF(CREATE_DEBS)
SET(CPACK_GENERATOR "DEB;${CPACK_GENERATOR}") # For Debian, Ubuntu etc...
SET(CPACK_DEBIAN_PACKAGE_NAME "CGenius")
SET(CPACK_DEBIAN_PACKAGE_MAINTAINER "Gerhard Stein <gerstrong@gmail.com>")
SET(CPACK_DEBIAN_PACKAGE_DESCRIPTION "${CPACK_PACKAGE_DESCRIPTION_SUMMARY}\n .\n ${CPACK_PACKAGE_DESCRIPTION}")
IF(BUILD_TYPE STREQUAL LINUX64)
SET(CPACK_DEBIAN_PACKAGE_ARCHITECTURE amd64)
ELSE(BUILD_TYPE STREQUAL LINUX64)
SET(CPACK_DEBIAN_PACKAGE_ARCHITECTURE i386)
ENDIF(BUILD_TYPE STREQUAL LINUX64)
SET(CPACK_DEBIAN_PACKAGE_DEPENDS "libvorbis0a (>= 1.2.3), libvorbisenc2 (>> 1.2.3), libvorbisfile3 (>= 1.2.3), libsdl1.2debian (>= 1.2.14), libgl1-mesa-glx (>= 7.7.1)")
SET(CPACK_DEBIAN_PACKAGE_SECTION "games")
SET(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}")
IF(BUILD_TYPE STREQUAL WIN32)
MESSAGE("WARNING: Windows does not use DEB Packages. Those won't be build here...")
ELSE(BUILD_TYPE STREQUAL WIN32)
SET(CPACK_GENERATOR "DEB;${CPACK_GENERATOR}") # For Debian, Ubuntu etc...
SET(CPACK_DEBIAN_PACKAGE_NAME "CGenius")
SET(CPACK_DEBIAN_PACKAGE_MAINTAINER "Gerhard Stein <gerstrong@gmail.com>")
SET(CPACK_DEBIAN_PACKAGE_DESCRIPTION "${CPACK_PACKAGE_DESCRIPTION_SUMMARY}\n .\n ${CPACK_PACKAGE_DESCRIPTION}")
IF(BUILD_TYPE STREQUAL LINUX64)
SET(CPACK_DEBIAN_PACKAGE_ARCHITECTURE amd64)
ELSE(BUILD_TYPE STREQUAL LINUX64)
SET(CPACK_DEBIAN_PACKAGE_ARCHITECTURE i386)
ENDIF(BUILD_TYPE STREQUAL LINUX64)
SET(CPACK_DEBIAN_PACKAGE_DEPENDS "libvorbis0a (>= 1.2.3), libvorbisenc2 (>> 1.2.3), libvorbisfile3 (>= 1.2.3), libsdl1.2debian (>= 1.2.14), libgl1-mesa-glx (>= 7.7.1)")
SET(CPACK_DEBIAN_PACKAGE_SECTION "games")
SET(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}")
ENDIF(BUILD_TYPE STREQUAL WIN32)
ENDIF(CREATE_DEBS)
INCLUDE(CPack)
......
src/CGLogo.ico

158 KB | W: | H:

src/CGLogo.ico

1.03 MB | W: | H:

src/CGLogo.ico
src/CGLogo.ico
src/CGLogo.ico
src/CGLogo.ico
  • 2-up
  • Swipe
  • Onion skin
No preview for this file type
......@@ -32,7 +32,6 @@ typedef uint8_t byte;
typedef uint16_t word;
typedef int32_t fixed;
typedef uint32_t longword;
typedef int8_t boolean;
typedef void * memptr;
......
......@@ -7,7 +7,9 @@
#include "CVideoEngine.h"
#include "CLogFile.h"
#include "sys/param.h"
#define MIN(a,b) (((a)<(b))?(a):(b))
#define MAX(a,b) (((a)>(b))?(a):(b))
CVideoEngine::CVideoEngine(const CVidConfig& VidConfig, Sint16 *&p_sbufferx, Sint16 *&p_sbuffery) :
BlitSurface(NULL),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment