Permalink
Browse files

Add icon (made by JoJoe_Stinky)

add fltk convenience target
  • Loading branch information...
1 parent f059532 commit 7fe78f220652e5b5d778d1079832de1f4d22c827 learn_more committed Nov 1, 2013
Showing with 74 additions and 17 deletions.
  1. +2 −1 AUTHORS
  2. +1 −0 CMakeLists.txt
  3. +34 −0 OpenSpades.rc.in
  4. BIN Resources/Icons/OpenSpades.ico
  5. +23 −2 Sources/CMakeLists.txt
  6. +14 −14 Sources/Tests/CMakelists.txt
View
@@ -4,6 +4,7 @@ CREDITS
"yvt" - Most of the code
"Dany0" - System profiler, ideas, etc.
-"learn_more" - CMake support, server browser, ideas
+"learn_more" - CMake support, server browser, ideas, Win32 build guide
"iamgreaser" - AoS 0.76 protocol support
"Ericson2314" - Better installation guide
+"JoJoe_Stinky" - Win32 Icon
View
@@ -150,6 +150,7 @@ endif()
configure_file("${PROJECT_SOURCE_DIR}/OpenSpades.h.in" "${PROJECT_BINARY_DIR}/OpenSpades.h")
+configure_file("${PROJECT_SOURCE_DIR}/OpenSpades.rc.in" "${PROJECT_BINARY_DIR}/OpenSpades.rc")
include_directories("${PROJECT_BINARY_DIR}")
include_directories("${SDL_INCLUDE_DIR}")
if(OPENGL_INCLUDE_DIR)
View
@@ -0,0 +1,34 @@
+//This file is generated by CMake, do not edit it. (Changes will be lost)
+// Instead edit OpenSpades.rc.in, and run CMake again.
+
+#ifndef WIN32_LEAN_AND_MEAN
+#define WIN32_LEAN_AND_MEAN
+#endif
+#include <windows.h>
+
+AppIcon ICON "${OS_BASE_DIR}/Resources/Icons/OpenSpades.ico"
+
+VS_VERSION_INFO VERSIONINFO
+FILEVERSION @OpenSpades_VERSION_MAJOR@,@OpenSpades_VERSION_MINOR@,@OpenSpades_VERSION_REVISION@,0
+PRODUCTVERSION @OpenSpades_VERSION_MAJOR@,@OpenSpades_VERSION_MINOR@,@OpenSpades_VERSION_REVISION@,0
+FILEOS VOS__WINDOWS32
+FILETYPE VFT_APP
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "040904E4"
+ BEGIN
+ VALUE "CompanyName", "yvt.jp"
+ VALUE "FileDescription", "A Win32 program."
+ VALUE "FileVersion", "@OpenSpades_VERSION_MAJOR@.@OpenSpades_VERSION_MINOR@.@OpenSpades_VERSION_REVISION@.0"
+ VALUE "ProductName", "OpenSpades${OPENSPADES_EXTRATITLE}"
+ VALUE "ProductVersion", "@OpenSpades_VERSION_MAJOR@.@OpenSpades_VERSION_MINOR@.@OpenSpades_VERSION_REVISION@"
+ VALUE "LegalCopyright", "yvt.jp"
+ END
+ END
+
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x409, 1252
+ END
+END
Binary file not shown.
@@ -1,5 +1,5 @@
-set(OS_SRC_ROOT ${CMAKE_CURRENT_SOURCE_DIR})
+set(OS_SRC_DIR ${CMAKE_CURRENT_SOURCE_DIR})
file(GLOB AUDIO_FILES Audio/*.cpp Audio/*.h)
file(GLOB AUDIO_AL_FILES Audio/AL/*.cpp Audio/AL/*.h)
@@ -28,8 +28,12 @@ include_directories(".")
include_directories("json/include")
include_directories("ENet/include")
+if(WIN32)
+ set(RESOURCE_FILES ${PROJECT_BINARY_DIR}/OpenSpades.rc)
+endif()
+
add_executable(OpenSpades ${AUDIO_FILES} ${AUDIO_AL_FILES} ${BINPACK_FILES} ${CLIENT_FILES} ${CORE_FILES} ${DRAW_FILES} ${ENET_FILES} ${ENET_INCLUDE} ${GUI_FILES}
- ${IMPORTS_FILES} ${KISS_FILES} ${JSON_FILES} ${JSON_INCLUDE} ${POLY2TRI_COMMON_FILES} ${POLY2TRI_SWEEP_FILES} ${UNZIP_FILES} ${SCRIPTBINDING_FILES})
+ ${IMPORTS_FILES} ${KISS_FILES} ${JSON_FILES} ${JSON_INCLUDE} ${POLY2TRI_COMMON_FILES} ${POLY2TRI_SWEEP_FILES} ${UNZIP_FILES} ${SCRIPTBINDING_FILES} ${RESOURCE_FILES})
set_target_properties(OpenSpades PROPERTIES LINKER_LANGUAGE CXX)
set_target_properties(OpenSpades PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
set_target_properties(OpenSpades PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
@@ -38,6 +42,7 @@ set_target_properties(OpenSpades PROPERTIES ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BIN
add_dependencies(OpenSpades Angelscript Angelscript_addons)
if(WIN32)
+ source_group("Resources" ${RESOURCE_FILES})
foreach(LIB ${SDL_LIBRARY})
string(REGEX REPLACE "\\.lib$" ".dll" SDL_DLL ${LIB})
if(EXISTS "${SDL_DLL}")
@@ -78,6 +83,8 @@ source_group("libs\\unzip" FILES ${UNZIP_FILES})
target_link_libraries(OpenSpades ${SDL_LIBRARY} ${OPENGL_LIBRARIES} ${GLEW_LIBRARY} ${FLTK_OS_LIBS} ${ZLIB_LIBRARIES} ${CURL_LIBRARY} ${CMAKE_DL_LIBS} ${ANGELSCRIPT_LIBS})
+#todo: MACOSX_BUNDLE_ICON_FILE ?
+
if(OPENAL_FOUND)
target_link_libraries(OpenSpades ${OPENAL_LIBRARY})
include_directories(${OPENAL_INCLUDE_DIRS})
@@ -89,6 +96,20 @@ else()
target_link_libraries(OpenSpades Xext)
endif()
+if(FLTK_FLUID_EXECUTABLE)
+ file(GLOB_RECURSE FLTK_FORMS Gui/*.fl)
+ set(FRM_ALLFILES)
+ foreach(FRM ${FLTK_FORMS})
+ get_filename_component(FRM_FILE ${FRM} NAME_WE)
+ list(APPEND FRM_ALLFILES ${FRM_FILE}.cpp ${FRM_FILE}.h)
+ add_custom_command(OUTPUT ${FRM_FILE}.cpp ${FRM_FILE}.h COMMAND ${FLTK_FLUID_EXECUTABLE} -c ${FRM} COMMENT "Compiling ${FRM_FILE}" WORKING_DIRECTORY ${OS_SRC_DIR}/Gui)
+ endforeach()
+ add_custom_target(GenerateForms DEPENDS ${FRM_ALLFILES})
+else()
+ message(STATUS "FLTK binary not found, unable to add convenience target.")
+endif()
+
+
install(TARGETS OpenSpades DESTINATION bin)
add_subdirectory(Tests)
@@ -1,19 +1,19 @@
-set(SDL_MISCFILES ${OS_SRC_ROOT}/Gui/SDLGLDevice.cpp ${OS_SRC_ROOT}/Gui/SDLGLDevice.cpp)
-set(CORE_MISCFILES ${OS_SRC_ROOT}/Core/RefCountedObject.cpp ${OS_SRC_ROOT}/Core/RefCountedObject.h ${OS_SRC_ROOT}/Core/Math.cpp ${OS_SRC_ROOT}/Core/Math.h
- ${OS_SRC_ROOT}/Core/Debug.cpp ${OS_SRC_ROOT}/Core/Debug.h ${OS_SRC_ROOT}/Core/Exception.cpp ${OS_SRC_ROOT}/Core/Exception.h
- ${OS_SRC_ROOT}/Core/Settings.cpp ${OS_SRC_ROOT}/Core/Settings.h ${OS_SRC_ROOT}/Core/ConcurrentDispatch.cpp ${OS_SRC_ROOT}/Core/ConcurrentDispatch.h
- ${OS_SRC_ROOT}/Core/Bitmap.cpp ${OS_SRC_ROOT}/Core/Bitmap.h ${OS_SRC_ROOT}/Core/VoxelModel.cpp ${OS_SRC_ROOT}/Core/VoxelModel.h
- ${OS_SRC_ROOT}/Core/FileManager.cpp ${OS_SRC_ROOT}/Core/FileManager.h ${OS_SRC_ROOT}/Core/BitmapAtlasGenerator.cpp ${OS_SRC_ROOT}/Core/BitmapAtlasGenerator.h
- ${OS_SRC_ROOT}/Core/IStream.cpp ${OS_SRC_ROOT}/Core/IStream.h ${OS_SRC_ROOT}/Core/Stopwatch.cpp ${OS_SRC_ROOT}/Core/Stopwatch.h
- ${OS_SRC_ROOT}/Core/Thread.cpp ${OS_SRC_ROOT}/Core/Thread.h ${OS_SRC_ROOT}/Core/IBitmapCodec.cpp ${OS_SRC_ROOT}/Core/IBitmapCodec.h
- ${OS_SRC_ROOT}/Core/Mutex.cpp ${OS_SRC_ROOT}/Core/Mutex.h ${OS_SRC_ROOT}/Core/ThreadLocalStorage.cpp ${OS_SRC_ROOT}/Core/ThreadLocalStorage.h
- ${OS_SRC_ROOT}/Core/FileManager.cpp ${OS_SRC_ROOT}/Core/FileManager.h ${OS_SRC_ROOT}/Core/DirectoryFileSystem.cpp ${OS_SRC_ROOT}/Core/DirectoryFileSystem.h
- ${OS_SRC_ROOT}/Core/ZipFileSystem.cpp ${OS_SRC_ROOT}/Core/ZipFileSystem.h ${OS_SRC_ROOT}/Core/StdStream.cpp ${OS_SRC_ROOT}/Core/StdStream.h
- ${OS_SRC_ROOT}/Core/DynamicMemoryStream.cpp ${OS_SRC_ROOT}/Core/DynamicMemoryStream.h ${OS_SRC_ROOT}/Core/FltkImageReader.cpp ${OS_SRC_ROOT}/Core/TargaReader.cpp)
+set(SDL_MISCFILES ${OS_SRC_DIR}/Gui/SDLGLDevice.cpp ${OS_SRC_DIR}/Gui/SDLGLDevice.cpp)
+set(CORE_MISCFILES ${OS_SRC_DIR}/Core/RefCountedObject.cpp ${OS_SRC_DIR}/Core/RefCountedObject.h ${OS_SRC_DIR}/Core/Math.cpp ${OS_SRC_DIR}/Core/Math.h
+ ${OS_SRC_DIR}/Core/Debug.cpp ${OS_SRC_DIR}/Core/Debug.h ${OS_SRC_DIR}/Core/Exception.cpp ${OS_SRC_DIR}/Core/Exception.h
+ ${OS_SRC_DIR}/Core/Settings.cpp ${OS_SRC_DIR}/Core/Settings.h ${OS_SRC_DIR}/Core/ConcurrentDispatch.cpp ${OS_SRC_DIR}/Core/ConcurrentDispatch.h
+ ${OS_SRC_DIR}/Core/Bitmap.cpp ${OS_SRC_DIR}/Core/Bitmap.h ${OS_SRC_DIR}/Core/VoxelModel.cpp ${OS_SRC_DIR}/Core/VoxelModel.h
+ ${OS_SRC_DIR}/Core/FileManager.cpp ${OS_SRC_DIR}/Core/FileManager.h ${OS_SRC_DIR}/Core/BitmapAtlasGenerator.cpp ${OS_SRC_DIR}/Core/BitmapAtlasGenerator.h
+ ${OS_SRC_DIR}/Core/IStream.cpp ${OS_SRC_DIR}/Core/IStream.h ${OS_SRC_DIR}/Core/Stopwatch.cpp ${OS_SRC_DIR}/Core/Stopwatch.h
+ ${OS_SRC_DIR}/Core/Thread.cpp ${OS_SRC_DIR}/Core/Thread.h ${OS_SRC_DIR}/Core/IBitmapCodec.cpp ${OS_SRC_DIR}/Core/IBitmapCodec.h
+ ${OS_SRC_DIR}/Core/Mutex.cpp ${OS_SRC_DIR}/Core/Mutex.h ${OS_SRC_DIR}/Core/ThreadLocalStorage.cpp ${OS_SRC_DIR}/Core/ThreadLocalStorage.h
+ ${OS_SRC_DIR}/Core/FileManager.cpp ${OS_SRC_DIR}/Core/FileManager.h ${OS_SRC_DIR}/Core/DirectoryFileSystem.cpp ${OS_SRC_DIR}/Core/DirectoryFileSystem.h
+ ${OS_SRC_DIR}/Core/ZipFileSystem.cpp ${OS_SRC_DIR}/Core/ZipFileSystem.h ${OS_SRC_DIR}/Core/StdStream.cpp ${OS_SRC_DIR}/Core/StdStream.h
+ ${OS_SRC_DIR}/Core/DynamicMemoryStream.cpp ${OS_SRC_DIR}/Core/DynamicMemoryStream.h ${OS_SRC_DIR}/Core/FltkImageReader.cpp ${OS_SRC_DIR}/Core/TargaReader.cpp)
-set(CLIENT_MISCFILES ${OS_SRC_ROOT}/Client/GameMap.cpp ${OS_SRC_ROOT}/Client/GameMap.h ${OS_SRC_ROOT}/Client/Quake3Font.cpp ${OS_SRC_ROOT}/Client/Quake3Font.h
- ${OS_SRC_ROOT}/Client/IFont.cpp ${OS_SRC_ROOT}/Client/IFont.h)
+set(CLIENT_MISCFILES ${OS_SRC_DIR}/Client/GameMap.cpp ${OS_SRC_DIR}/Client/GameMap.h ${OS_SRC_DIR}/Client/Quake3Font.cpp ${OS_SRC_DIR}/Client/Quake3Font.h
+ ${OS_SRC_DIR}/Client/IFont.cpp ${OS_SRC_DIR}/Client/IFont.h ${OS_SRC_DIR}/Client/ChatWindow.cpp ${OS_SRC_DIR}/Client/ChatWindow.h)
add_executable(DrawTest Main.cpp Draw.cpp ${SDL_MISCFILES} ${DRAW_FILES} ${CLIENT_MISCFILES} ${CORE_MISCFILES} ${POLY2TRI_FILES} ${POLY2TRI_COMMON_FILES} ${POLY2TRI_SWEEP_FILES}
${KISS_FILES})

0 comments on commit 7fe78f2

Please sign in to comment.