Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Some bug fixes, changed the way the OpenGL/SDL headers are handled to…
… make things more consistent. Should build and run on windows.
- Loading branch information
1 parent
6f99462
commit e3ef4fb
Showing
79 changed files
with
678 additions
and
239 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
cmake_minimum_required(VERSION 2.8) | ||
project(Frogatto) | ||
|
||
find_package(GLUT) | ||
find_package(OpenGL) | ||
find_package(SDL) | ||
find_package(SDL_mixer) | ||
find_package(SDL_image) | ||
find_package(SDL_ttf) | ||
SET( CMAKE_THREAD_PREFER_PTHREAD 1 ) | ||
find_package(Threads) | ||
|
||
set( BOOST_COMPONENTS_NEEDED regex thread system ) | ||
|
||
# The following verifyies that BOOST_ROOT is set properly. | ||
if(NOT BOOST_ROOT AND NOT $ENV{BOOST_ROOT} STREQUAL "") | ||
FILE( TO_CMAKE_PATH $ENV{BOOST_ROOT} BOOST_ROOT ) | ||
if( NOT EXISTS ${BOOST_ROOT} ) | ||
MESSAGE( STATUS ${BOOST_ROOT} " does not exist. Checking if BOOST_ROOT was a quoted string.." ) | ||
STRING( REPLACE "\"" "" BOOST_ROOT ${BOOST_ROOT} ) | ||
if( EXISTS ${BOOST_ROOT} ) | ||
MESSAGE( STATUS "After removing the quotes " ${BOOST_ROOT} " was now found by CMake" ) | ||
endif( EXISTS ${BOOST_ROOT}) | ||
endif( NOT EXISTS ${BOOST_ROOT} ) | ||
|
||
# Save the BOOST_ROOT in the cache | ||
if( NOT EXISTS ${BOOST_ROOT} ) | ||
MESSAGE( WARNING ${BOOST_ROOT} " does not exist." ) | ||
else(NOT EXISTS ${BOOST_ROOT}) | ||
SET (BOOST_ROOT ${BOOST_ROOT} CACHE STRING "Set the value of BOOST_ROOT to point to the root folder of your boost install." FORCE) | ||
#SET (BOOST_INCLUDEDIR ${BOOST_ROOT}) | ||
#SET (BOOST_LIBRARYDIR ${BOOST_ROOT}/lib) | ||
endif( NOT EXISTS ${BOOST_ROOT} ) | ||
|
||
endif(NOT BOOST_ROOT AND NOT $ENV{BOOST_ROOT} STREQUAL "") | ||
|
||
if( WIN32 AND NOT BOOST_ROOT ) | ||
MESSAGE( WARNING "Please set the BOOST_ROOT environment variable." ) | ||
endif( WIN32 AND NOT BOOST_ROOT ) | ||
|
||
set(Boost_ADDITIONAL_VERSIONS "1.47" "1.47.0") | ||
set(Boost_DEBUG ON) | ||
set(Boost_USE_STATIC_LIBS OFF) | ||
set(Boost_USE_MULTITHREADED ON) | ||
set(Boost_USE_STATIC_RUNTIME OFF) | ||
FIND_PACKAGE(Boost 1.47.0 COMPONENTS ${BOOST_COMPONENTS_NEEDED}) | ||
if( Boost_FOUND ) | ||
include_directories( ${Boost_INCLUDE_DIRS} ) | ||
link_directories( ${Boost_LIBRARY_DIRS} ) | ||
endif( Boost_FOUND ) | ||
|
||
if( SDL_FOUND STREQUAL "YES" ) | ||
MESSAGE( STATUS "SDL FOUND: " ${SDL_INCLUDE_DIR} " : " ${SDL_LIBRARY} ) | ||
#include_directories( ${SDL_INCLUDE_DIR} ) | ||
link_directories( ${SDL_LIBRARY} ) | ||
#add_library( SDL_image.lib SHARED IMPORTED ) | ||
#add_library( SDL_mixer.lib SHARED IMPORTED ) | ||
#add_library( SDL_ttf.lib SHARED IMPORTED ) | ||
else( SDL_FOUND STREQUAL "NO" ) | ||
MESSAGE( STATUS "SDL NOT FOUND: " ${SDL_INCLUDE_DIR} " : " ${SDL_LIBRARY} ) | ||
endif( SDL_FOUND STREQUAL "YES" ) | ||
|
||
if( OPENGL_FOUND ) | ||
include_directories( ${OPENGL_INCLUDE_DIR} ) | ||
endif( OPENGL_FOUND ) | ||
|
||
add_subdirectory( src ) | ||
|
||
if( WIN32 ) | ||
set_target_properties( frogatto PROPERTIES | ||
COMPILE_DEFINITIONS "_WIN32_WINNT=0x0501;NOMINMAX;DISABLE_FORMULA_PROFILER" | ||
COMPILE_FLAGS "/EHsc /GR" | ||
LINK_FLAGS "/SUBSYSTEM:WINDOWS" ) | ||
set_target_properties( server PROPERTIES | ||
COMPILE_DEFINITIONS "_WIN32_WINNT=0x0501" | ||
COMPILE_FLAGS "/EHsc /GR" | ||
LINK_FLAGS "/SUBSYSTEM:CONSOLE" ) | ||
endif( WIN32 ) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,138 @@ | ||
;Frogatto Windows Installer Script for NSIS | ||
;Written by Kristina | ||
|
||
;-------------------------------- | ||
;Include Modern UI | ||
|
||
!include "MUI2.nsh" | ||
|
||
;------------------------------- | ||
; Test if Visual Studio Redistributables 2005+ SP1 installed | ||
; Returns -1 if there is no VC redistributables intstalled | ||
Function CheckVCRedist | ||
Push $R0 | ||
ClearErrors | ||
#ReadRegDword $R0 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{196BB40D-1578-3D01-B289-BEFC77A11A1E}" "Version" | ||
ReadRegDword $R0 HKLM "SOFTWARE\Microsoft\VisualStudio\10.0\VC\VCRedist\x86" "Installed" | ||
|
||
; if VS 2010 redist not installed, install it | ||
IfErrors 0 VSRedistInstalled | ||
StrCpy $R0 "-1" | ||
File "c:\projects\Frogatto\vcredist_x86.exe" | ||
ExecWait '"$INSTDIR\vcredist_x86.exe" /q' $0 | ||
|
||
VSRedistInstalled: | ||
Exch $R0 | ||
FunctionEnd | ||
|
||
;-------------------------------- | ||
;General | ||
|
||
;Name and file | ||
Name "Frogatto & Friends" "Frogatto && Friends" | ||
OutFile "Frogatto-installer.exe" | ||
|
||
;Default installation folder | ||
InstallDir "$PROGRAMFILES\Frogatto" | ||
|
||
;Get installation folder from registry if available | ||
InstallDirRegKey HKCU "Software\Frogatto" "" | ||
|
||
;Request application privileges for Windows Vista | ||
RequestExecutionLevel user | ||
|
||
;-------------------------------- | ||
;Variables | ||
|
||
Var StartMenuFolder | ||
|
||
;-------------------------------- | ||
;Interface Settings | ||
|
||
!define MUI_ABORTWARNING | ||
|
||
;-------------------------------- | ||
;Pages | ||
|
||
!insertmacro MUI_PAGE_LICENSE "c:\projects\Frogatto\LICENSE" | ||
!insertmacro MUI_PAGE_COMPONENTS | ||
!insertmacro MUI_PAGE_DIRECTORY | ||
|
||
;Start Menu Folder Page Configuration | ||
!define MUI_STARTMENUPAGE_REGISTRY_ROOT "HKCU" | ||
!define MUI_STARTMENUPAGE_REGISTRY_KEY "Software\Frogatto" | ||
!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "Start Menu Folder" | ||
|
||
!insertmacro MUI_PAGE_STARTMENU Application $StartMenuFolder | ||
|
||
!insertmacro MUI_PAGE_INSTFILES | ||
|
||
!insertmacro MUI_UNPAGE_CONFIRM | ||
!insertmacro MUI_UNPAGE_INSTFILES | ||
|
||
;-------------------------------- | ||
;Languages | ||
|
||
!insertmacro MUI_LANGUAGE "English" | ||
|
||
;-------------------------------- | ||
;Installer Sections | ||
|
||
Section "Frogatto & Friends" SecInstaller | ||
|
||
SetOutPath "$INSTDIR" | ||
|
||
File /a /r "C:\Projects\frogatto-build\src\Release\*.*" | ||
|
||
;Store installation folder | ||
WriteRegStr HKCU "Software\Frogatto" "" $INSTDIR | ||
|
||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Frogatto" \ | ||
"DisplayName" "Frogatto & Friends" | ||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Frogatto" \ | ||
"UninstallString" "$\"$INSTDIR\uninstall.exe$\"" | ||
;Create uninstaller | ||
WriteUninstaller "$INSTDIR\Uninstall.exe" | ||
|
||
!insertmacro MUI_STARTMENU_WRITE_BEGIN Application | ||
;Create shortcuts | ||
CreateDirectory "$SMPROGRAMS\$StartMenuFolder" | ||
CreateShortCut "$SMPROGRAMS\$StartMenuFolder\Frogatto.lnk" "$INSTDIR\Frogatto.exe" | ||
CreateShortCut "$SMPROGRAMS\$StartMenuFolder\Uninstall.lnk" "$INSTDIR\Uninstall.exe" | ||
!insertmacro MUI_STARTMENU_WRITE_END | ||
|
||
Call CheckVCRedist | ||
SectionEnd | ||
|
||
;-------------------------------- | ||
;Descriptions | ||
|
||
;Language strings | ||
;LangString DESC_SecDummy ${LANG_ENGLISH} "A test section." | ||
|
||
;Assign language strings to sections | ||
;!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN | ||
; !insertmacro MUI_DESCRIPTION_TEXT ${SecDummy} $(DESC_SecDummy) | ||
;!insertmacro MUI_FUNCTION_DESCRIPTION_END | ||
|
||
;-------------------------------- | ||
;Uninstaller Section | ||
|
||
Section "Uninstall" | ||
|
||
;ADD YOUR OWN FILES HERE... | ||
|
||
Delete "$INSTDIR\Uninstall.exe" | ||
|
||
RMDir /r "$INSTDIR" | ||
|
||
!insertmacro MUI_STARTMENU_GETFOLDER Application $StartMenuFolder | ||
|
||
Delete "$SMPROGRAMS\$StartMenuFolder\Frogatto.lnk" | ||
Delete "$SMPROGRAMS\$StartMenuFolder\Uninstall.lnk" | ||
RMDir "$SMPROGRAMS\$StartMenuFolder" | ||
|
||
DeleteRegKey /ifempty HKCU "Software\Frogatto" | ||
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Frogatto" | ||
|
||
SectionEnd |
Binary file not shown.
Oops, something went wrong.