瀏覽代碼

macOS: full rework of Mac packaging process

- Most of outdated CMakeLists code removed.
- All Mac-specific code is removed include Sparkle support and vcmibuilder app.
- DMG buidling reimplemented using macdeployqt command.
Arseniy Shestakov 8 年之前
父節點
當前提交
56f89270db

+ 36 - 38
CMakeLists.txt

@@ -18,8 +18,6 @@ option(ENABLE_ERM "Enable compilation of ERM scripting module" OFF)
 option(ENABLE_LAUNCHER "Enable compilation of launcher" ON)
 option(ENABLE_TEST "Enable compilation of unit tests" ON)
 option(ENABLE_PCH "Enable compilation using precompiled headers" ON)
-# TODO: default to ON when we start distributing macOS binaries
-option(ENABLE_SPARKLE "Enable auto-updating with Sparkle on macOS" OFF)
 
 # Allow to pass package name from Travis CI
 set(PACKAGE_NAME_SUFFIX "" CACHE STRING "Suffix for CPack package name")
@@ -84,40 +82,6 @@ if(WIN32)
 	endif()
 endif(WIN32)
 
-if(APPLE)
-	# Default location for thirdparty libs
-	set(CMAKE_INCLUDE_PATH "../include" "${CMAKE_OSX_SYSROOT}/usr/include")
-	set(CMAKE_LIBRARY_PATH "../lib")
-	set(CMAKE_FRAMEWORK_PATH "../Frameworks")
-	set(BOOST_ROOT "../")
-
-	set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_HOME_DIRECTORY}/bin")
-	set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_HOME_DIRECTORY}/bin")
-	set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_HOME_DIRECTORY}/bin")
-
-	set(CMAKE_XCODE_ATTRIBUTE_CONFIGURATION_BUILD_DIR "${CMAKE_HOME_DIRECTORY}/bin/$(CONFIGURATION)")
-	set(CMAKE_XCODE_ATTRIBUTE_LD_RUNPATH_SEARCH_PATHS "@executable_path/../Frameworks @executable_path/")
-
-	# Build with clang ang libc++
-	set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LANGUAGE_STANDARD "c++11")
-	set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LIBRARY "libc++")
-
-	if(ENABLE_SPARKLE)
-		# so that OSX_checkForUpdates knows whether to be a noop
-		add_definitions(-DSPARKLE)
-
-		# On OS X we use Sparkle framework for updates
-		find_path(SPARKLE_INCLUDE_DIR Sparkle.h)
-		find_library(SPARKLE_FRAMEWORK NAMES Sparkle)
-	endif()
-
-	# Xcode 5.0 fix
-	set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ftemplate-depth=256")
-
-	# Link with iconv
-	set(SYSTEM_LIBS ${SYSTEM_LIBS} libiconv.dylib)
-endif(APPLE)
-
 if(NOT WIN32)
 	INCLUDE(CheckLibraryExists)
 
@@ -227,7 +191,7 @@ if(ENABLE_ERM)
 	add_subdirectory(scripting/erm)
 endif()
 if(NOT MINIZIP_FOUND)
-	add_subdirectory(lib/minizip)
+	add_subdirectory_with_folder("3rdparty" lib/minizip)
 	set(MINIZIP_LIBRARIES minizip)
 endif()
 add_subdirectory(lib)
@@ -317,9 +281,43 @@ if(WIN32)
 	configure_file("${CMAKE_SOURCE_DIR}/cmake_modules/CMakeCPackOptions.cmake.in" "${CMAKE_BINARY_DIR}/CMakeCPackOptions.cmake" @ONLY)
 	set(CPACK_PROJECT_CONFIG_FILE "${CMAKE_BINARY_DIR}/CMakeCPackOptions.cmake")
 elseif(APPLE)
-	set(CPACK_GENERATOR DragNDrop)
+	set(CPACK_MONOLITHIC_INSTALL 1)
+	set(CPACK_GENERATOR "DragNDrop")
 	set(CPACK_DMG_BACKGROUND_IMAGE "${CMAKE_SOURCE_DIR}/osx/dmg_background.png")
 	set(CPACK_DMG_DS_STORE "${CMAKE_SOURCE_DIR}/osx/dmg_DS_Store")
+
+	if(ENABLE_LAUNCHER)
+		set(MACOSX_BUNDLE_EXECUTABLE_NAME "vcmilauncher")
+	else()
+		set(MACOSX_BUNDLE_EXECUTABLE_NAME "vcmiclient")
+	endif()
+	set(MACOSX_BUNDLE_ICON_FILE "vcmi.icns")
+
+	install(DIRECTORY ${CMAKE_SOURCE_DIR}/config/ DESTINATION ${APP_BUNDLE_CONTENTS_DIR}/Data/config/)
+	install(DIRECTORY ${CMAKE_SOURCE_DIR}/Mods/vcmi/ DESTINATION ${APP_BUNDLE_CONTENTS_DIR}/Data/Mods/vcmi/)
+	install(DIRECTORY ${CMAKE_SOURCE_DIR}/launcher/icons/ DESTINATION ${APP_BUNDLE_CONTENTS_DIR}/Data/launcher/icons/)
+
+	install(FILES ${CMAKE_SOURCE_DIR}/osx/vcmi.icns DESTINATION ${APP_BUNDLE_RESOURCES_DIR})
+
+	configure_file(${CMAKE_SOURCE_DIR}/osx/Info.plist.in
+		"${APP_BUNDLE_CONTENTS_DIR}/Info.plist")
+
+	if(ENABLE_LAUNCHER)
+		find_program(TOOL_MACDEPLOYQT NAMES macdeployqt PATHS ${qt_base_dir}/bin)
+		if(NOT TOOL_MACDEPLOYQT)
+			message(FATAL_ERROR "Could not find macdeployqt")
+		endif()
+		string(REPLACE " " "\\ " ESCAPED_BUNDLE_DIR ${APP_BUNDLE_DIR})
+		install(CODE "execute_process(COMMAND ${TOOL_MACDEPLOYQT} ${ESCAPED_BUNDLE_DIR} -verbose=2)")
+	endif()
+
+	INSTALL(CODE "
+	set(BU_CHMOD_BUNDLE_ITEMS ON)
+	include(BundleUtilities)
+	fixup_bundle(\"${APP_BUNDLE_DIR}\" \"\" \"\")
+	" COMPONENT Runtime)
+
+	install(DIRECTORY ${APP_BUNDLE_DIR} DESTINATION "." USE_SOURCE_PERMISSIONS)
 else()
 	set(CPACK_GENERATOR TGZ)
 endif()

+ 0 - 11
client/Autoupdate.mm

@@ -1,11 +0,0 @@
-#ifdef SPARKLE
-#import <Cocoa/Cocoa.h>
-#import "Sparkle.h"
-#endif
-
-void OSX_checkForUpdates() {
-#ifdef SPARKLE
-    SUUpdater* updater = [[SUUpdater alloc] init];
-    [[SUUpdater sharedUpdater] checkForUpdatesInBackground];
-#endif
-}

+ 0 - 15
client/CMT.cpp

@@ -219,10 +219,6 @@ static void SDLLogCallback(void*           userdata,
 	logGlobal->debug("SDL(category %d; priority %d) %s", category, priority, message);
 }
 
-#ifdef VCMI_APPLE
-void OSX_checkForUpdates();
-#endif
-
 #if defined(VCMI_WINDOWS) && !defined (__GNUC__)
 int wmain(int argc, wchar_t* argv[])
 #elif defined(VCMI_APPLE) || defined(VCMI_ANDROID)
@@ -240,17 +236,6 @@ int main(int argc, char * argv[])
     std::string executablePath = argv[0];
     std::string workDir = executablePath.substr(0, executablePath.rfind('/'));
     chdir(workDir.c_str());
-
-    // Check for updates
-    OSX_checkForUpdates();
-
-    // Check that game data is prepared. Otherwise run vcmibuilder helper application
-    FILE* check = fopen((VCMIDirs::get().userDataPath() / "game_data_prepared").string().c_str(), "r");
-    if (check == nullptr) {
-        system("open ./vcmibuilder.app");
-        return 0;
-    }
-    fclose(check);
 #endif
     std::cout << "Starting... " << std::endl;
 	po::options_description opts("Allowed options");

+ 10 - 66
client/CMakeLists.txt

@@ -120,69 +120,14 @@ if(ANDROID) # android needs client/server to be libraries, not executables, so w
 endif()
 
 if(APPLE)
-	# OS X specific source files
-	set(client_SRCS ${client_SRCS} SDLMain.m Autoupdate.mm Info.plist vcmi.icns ../osx/vcmi_dsa_public.pem)
-
-	if(ENABLE_SPARKLE)
-		# OS X specific includes
-		include_directories(${SPARKLE_INCLUDE_DIR})
-
-		# OS X specific libraries
-		target_link_libraries(vcmiclient ${SPARKLE_FRAMEWORK})
-	endif()
-
-	# Because server and AI libs would be copies to bundle they need to be built before client
-	add_dependencies(vcmiclient vcmiserver VCAI EmptyAI StupidAI BattleAI minizip)
-
-	# Custom Info.plist
-	set_target_properties(vcmiclient PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist)
-
-	# Copy icon file and public key for Sparkle
-	set_source_files_properties(vcmi.icns PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
-	set_source_files_properties(../osx/vcmi_dsa_public.pem PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
-
-	set_target_properties(vcmiclient PROPERTIES XCODE_ATTRIBUTE_LD_RUNPATH_SEARCH_PATHS "@executable_path/../Frameworks @executable_path/")
-
-	# Copy server executable, libs and game data to bundle
-	set(BUNDLE_PATH ${CMAKE_HOME_DIRECTORY}/bin/$(CONFIGURATION)/vcmiclient.app/Contents)
-
-	set(CopyVendoredMinizip
-		mkdir -p ${BUNDLE_PATH}/MacOS && cp ${CMAKE_BINARY_DIR}/build/$(CONFIGURATION)/lib/libminizip.dylib ${BUNDLE_PATH}/MacOS/libminizip.dylib)
-
-	set(MakeVCMIBundle
-		# Copy all needed binaries
-		mkdir -p ${BUNDLE_PATH}/MacOS/AI &&
-		cp ${CMAKE_BINARY_DIR}/build/$(CONFIGURATION)/vcmiserver ${BUNDLE_PATH}/MacOS/vcmiserver &&
-		cp ${CMAKE_BINARY_DIR}/build/$(CONFIGURATION)/vcmiclient.app/Contents/MacOS/vcmiclient ${BUNDLE_PATH}/MacOS/vcmiclient &&
-		cp ${CMAKE_BINARY_DIR}/build/$(CONFIGURATION)/libvcmi.dylib ${BUNDLE_PATH}/MacOS/libvcmi.dylib &&
-		cp ${CMAKE_BINARY_DIR}/build/$(CONFIGURATION)/AI/libVCAI.dylib ${BUNDLE_PATH}/MacOS/AI/libVCAI.dylib &&
-		cp ${CMAKE_BINARY_DIR}/build/$(CONFIGURATION)/AI/libStupidAI.dylib ${BUNDLE_PATH}/MacOS/AI/libStupidAI.dylib &&
-		cp ${CMAKE_BINARY_DIR}/build/$(CONFIGURATION)/AI/libEmptyAI.dylib ${BUNDLE_PATH}/MacOS/AI/libEmptyAI.dylib &&
-		cp ${CMAKE_BINARY_DIR}/build/$(CONFIGURATION)/AI/libBattleAI.dylib ${BUNDLE_PATH}/MacOS/AI/libBattleAI.dylib &&
-		cp -r ${CMAKE_HOME_DIRECTORY}/osx/vcmibuilder.app ${BUNDLE_PATH}/MacOS/vcmibuilder.app &&
-
-		# Copy frameworks
-		sh -c 'cp -r ${CMAKE_HOME_DIRECTORY}/${CMAKE_FRAMEWORK_PATH} ${BUNDLE_PATH}/Frameworks/ || true' &&
-
-		# Copy vcmi data
-		mkdir -p ${BUNDLE_PATH}/Data &&
-		mkdir -p ${BUNDLE_PATH}/Data/Mods &&
-		mkdir -p ${BUNDLE_PATH}/Data/launcher &&
-		cp -r ${CMAKE_HOME_DIRECTORY}/config/ ${BUNDLE_PATH}/Data/config/ &&
-		cp -r ${CMAKE_HOME_DIRECTORY}/Mods/vcmi/ ${BUNDLE_PATH}/Data/Mods/vcmi/ &&
-		sh -c 'cp -r ${CMAKE_HOME_DIRECTORY}/Mods/WoG/ ${BUNDLE_PATH}/Data/Mods/WoG/ || echo "Download WoG mod from http://wiki.vcmi.eu/index.php?title=Mod_list" ' &&
-		sh -c 'cp -r ${CMAKE_HOME_DIRECTORY}/Mods/hota/ ${BUNDLE_PATH}/Data/Mods/hota/ || echo "Download HOTA mod from http://wiki.vcmi.eu/index.php?title=Mod_list" ' &&
-		cp -r ${CMAKE_HOME_DIRECTORY}/launcher/icons/ ${BUNDLE_PATH}/Data/launcher/icons/)
-
-	if(NOT MINIZIP_FOUND)
-		add_custom_command(TARGET vcmiclient POST_BUILD COMMAND ${CopyVendoredMinizip})
-	endif()
-
-	add_custom_command(TARGET vcmiclient POST_BUILD COMMAND ${MakeVCMIBundle})
-endif(APPLE)
+	set(client_SRCS ${client_SRCS} SDLMain.m)
+elseif(WIN32)
+	set(client_ICON "VCMI_client.rc")
+endif()
+
+add_executable(vcmiclient WIN32 ${client_SRCS} ${client_HEADERS} ${client_ICON})
 
 if(WIN32)
-	set(client_ICON VCMI_client.rc)
 	set_target_properties(vcmiclient
 		PROPERTIES
 			OUTPUT_NAME "VCMI_client"
@@ -190,14 +135,13 @@ if(WIN32)
 	)
 endif()
 
-add_executable(vcmiclient WIN32 MACOSX_BUNDLE ${client_SRCS} ${client_HEADERS} ${client_ICON})
-
-target_link_libraries(vcmiclient vcmi ${Boost_LIBRARIES} ${SDL_LIBRARY} ${SDLIMAGE_LIBRARY} ${SDLMIXER_LIBRARY} ${SDLTTF_LIBRARY} ${ZLIB_LIBRARIES} ${FFMPEG_LIBRARIES} ${SYSTEM_LIBS})
+target_link_libraries(vcmiclient vcmi ${Boost_LIBRARIES} ${SDL_LIBRARY} ${SDLIMAGE_LIBRARY} ${SDLMIXER_LIBRARY} ${SDLTTF_LIBRARY} ${ZLIB_LIBRARIES} ${FFMPEG_LIBRARIES} ${FFMPEG_EXTRA_LINKING_OPTIONS} ${SYSTEM_LIBS})
 
 vcmi_set_output_dir(vcmiclient "")
 
 set_target_properties(vcmiclient PROPERTIES ${PCH_PROPERTIES})
 cotire(vcmiclient)
 
-
-install(TARGETS vcmiclient DESTINATION ${BIN_DIR})
+if(NOT APPLE) # Already inside vcmiclient bundle
+	install(TARGETS vcmiclient DESTINATION ${BIN_DIR})
+endif(NOT APPLE)

+ 0 - 16
client/Info.plist

@@ -1,16 +0,0 @@
-<?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>CFBundleIconFile</key>
-	<string>vcmi.icns</string>
-	<key>CFBundleVersion</key>
-    <string>${VCMI_VERSION_MAJOR}.${VCMI_VERSION_MINOR}</string>
-	<key>CFBundleIdentifier</key>
-	<string>com.vcmi.vcmiclient</string>
-	<key>SUFeedURL</key>
-	<string>https://vcmi.eu/sparkle_appcast.xml</string>
-	<key>SUPublicDSAKeyFile</key>
-	<string>vcmi_dsa_public.pem</string>
-</dict>
-</plist>

+ 1 - 1
cmake_modules/FindFFmpeg.cmake

@@ -156,7 +156,7 @@ endforeach ()
 
 # On OS X we ffmpeg libraries depend on VideoDecodeAcceleration and CoreVideo frameworks
 IF (APPLE)
-    SET(FFMPEG_LIBRARIES ${FFMPEG_LIBRARIES} "-framework VideoDecodeAcceleration -framework CoreVideo -lbz2")
+	SET(FFMPEG_EXTRA_LINKING_OPTIONS "-framework VideoDecodeAcceleration -framework CoreVideo -lbz2")
 ENDIF()
 
 # Give a nice error message if some of the required vars are missing.

+ 43 - 15
cmake_modules/VCMIUtils.cmake

@@ -1,26 +1,43 @@
 #######################################
-#       Output directories            #
+#          Output directories         #
 #######################################
+if(APPLE)
+	set(MACOSX_BUNDLE_NAME "${CMAKE_PROJECT_NAME}")
+	set(MACOSX_BUNDLE_BUNDLE_NAME "${CMAKE_PROJECT_NAME}")
+	set(APP_BUNDLE_NAME "${CMAKE_PROJECT_NAME}.app")
+	set(APP_BUNDLE_DIR "${CMAKE_BINARY_DIR}/build/${APP_BUNDLE_NAME}")
+	set(APP_BUNDLE_CONTENTS_DIR "${APP_BUNDLE_DIR}/Contents")
+	set(APP_BUNDLE_BINARY_DIR "${APP_BUNDLE_CONTENTS_DIR}/MacOS")
+	set(APP_BUNDLE_RESOURCES_DIR "${APP_BUNDLE_CONTENTS_DIR}/Resources")
+endif()
 
 macro(vcmi_set_output_dir name dir)
-	# multi-config builds (e.g. msvc)
+	# Multi-config builds for Visual Studio, Xcode
 	foreach (OUTPUTCONFIG ${CMAKE_CONFIGURATION_TYPES})
-		string(TOUPPER ${OUTPUTCONFIG} OUTPUTCONFIGUPPERCASE)
-		set_target_properties(${name} PROPERTIES RUNTIME_OUTPUT_DIRECTORY_${OUTPUTCONFIGUPPERCASE} ${CMAKE_BINARY_DIR}/${OUTPUTCONFIG}/${dir})
-		set_target_properties(${name} PROPERTIES LIBRARY_OUTPUT_DIRECTORY_${OUTPUTCONFIGUPPERCASE} ${CMAKE_BINARY_DIR}/${OUTPUTCONFIG}/${dir})
-		set_target_properties(${name} PROPERTIES ARCHIVE_OUTPUT_DIRECTORY_${OUTPUTCONFIGUPPERCASE} ${CMAKE_BINARY_DIR}/${OUTPUTCONFIG}/${dir})
+		 string(TOUPPER ${OUTPUTCONFIG} OUTPUTCONFIGUPPERCASE)
+		 set_target_properties(${name} PROPERTIES RUNTIME_OUTPUT_DIRECTORY_${OUTPUTCONFIGUPPERCASE} ${CMAKE_BINARY_DIR}/${OUTPUTCONFIG}/${dir})
+		 set_target_properties(${name} PROPERTIES LIBRARY_OUTPUT_DIRECTORY_${OUTPUTCONFIGUPPERCASE} ${CMAKE_BINARY_DIR}/${OUTPUTCONFIG}/${dir})
+		 set_target_properties(${name} PROPERTIES ARCHIVE_OUTPUT_DIRECTORY_${OUTPUTCONFIGUPPERCASE} ${CMAKE_BINARY_DIR}/${OUTPUTCONFIG}/${dir})
 	endforeach()
 
-	# generic no-config case (e.g. with mingw or MacOS)
-	set_target_properties(${name} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/build/${dir})
-	set_target_properties(${name} PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/build/${dir})
-	set_target_properties(${name} PROPERTIES ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/build/${dir})
+	# Generic no-config case for Makefiles, Ninja.
+	# This is what Qt Creator is using
+	if(APPLE)
+		set_target_properties(${name} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${APP_BUNDLE_BINARY_DIR}/${dir})
+		set_target_properties(${name} PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${APP_BUNDLE_BINARY_DIR}/${dir})
+		set_target_properties(${name} PROPERTIES ARCHIVE_OUTPUT_DIRECTORY ${APP_BUNDLE_BINARY_DIR}/${dir})
+	else()
+		set_target_properties(${name} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/build/${dir})
+		set_target_properties(${name} PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/build/${dir})
+		set_target_properties(${name} PROPERTIES ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/build/${dir})
+	endif()
 endmacro()
 
 #######################################
-#    Better Visual Studio solution    #
+#      Better project generation      #
 #######################################
 
+# Let us have proper tree-like structure in IDEs such as Visual Studio
 function(assign_source_group)
 	foreach(_source IN ITEMS ${ARGN})
 		if(IS_ABSOLUTE "${_source}")
@@ -34,10 +51,8 @@ function(assign_source_group)
 	endforeach()
 endfunction(assign_source_group)
 
-#######################################
-#    Setting folders for 3rd-party    #
-#######################################
-
+# Options to enable folders in CMake generated projects for Visual Studio, Xcode, etc
+# Very useful to put 3rd-party libraries such as Minizip, GoogleTest and FuzzyLite in their own folders
 set_property(GLOBAL PROPERTY USE_FOLDERS TRUE)
 define_property(
 	TARGET
@@ -51,3 +66,16 @@ function(add_subdirectory_with_folder _folder_name _folder)
 	add_subdirectory(${_folder} ${ARGN})
 	set_property(DIRECTORY "${_folder}" PROPERTY FOLDER "${_folder_name}")
 endfunction()
+
+# Macro for Xcode Projects generation
+# Slightly outdated, but useful reference for all options available here:
+# https://pewpewthespells.com/blog/buildsettings.html
+# https://github.com/samdmarshall/Xcode-Build-Settings-Reference
+if(${CMAKE_GENERATOR} MATCHES "Xcode")
+
+	macro(set_xcode_property TARGET XCODE_PROPERTY XCODE_VALUE)
+		set_property(TARGET ${TARGET} PROPERTY
+			XCODE_ATTRIBUTE_${XCODE_PROPERTY} ${XCODE_VALUE})
+	endmacro(set_xcode_property)
+
+endif(${CMAKE_GENERATOR} MATCHES "Xcode")

+ 0 - 5
launcher/CMakeLists.txt

@@ -67,10 +67,6 @@ set(CMAKE_AUTOMOC ON)
 # to always look for includes there:
 set(CMAKE_INCLUDE_CURRENT_DIR ON)
 
-#### We need add -DQT_WIDGETS_LIB when using QtWidgets in Qt 5.
-###add_definitions(${Qt5Widgets_DEFINITIONS})
-###add_definitions(${Qt5Network_DEFINITIONS})
-
 if("${CMAKE_VERSION}" VERSION_LESS 2.8.12)
 	# Executables fail to build with Qt 5 in the default configuration
 	# without -fPIE. We add that here.
@@ -114,4 +110,3 @@ if(NOT APPLE) # Already inside bundle
 	# copy whole directory
 	install(DIRECTORY icons DESTINATION ${DATA_DIR}/launcher)
 endif()
-

+ 0 - 3
lib/CMakeLists.txt

@@ -288,9 +288,6 @@ set(lib_HEADERS
 assign_source_group(${lib_SRCS} ${lib_HEADERS})
 
 add_library(vcmi SHARED ${lib_SRCS} ${lib_HEADERS})
-if(APPLE)
-	set_target_properties(vcmi PROPERTIES XCODE_ATTRIBUTE_LD_DYLIB_INSTALL_NAME "@rpath/libvcmi.dylib")
-endif()
 set_target_properties(vcmi PROPERTIES COMPILE_DEFINITIONS "VCMI_DLL=1")
 target_link_libraries(vcmi ${MINIZIP_LIBRARIES} ${Boost_LIBRARIES} ${SDL_LIBRARY} ${ZLIB_LIBRARIES} ${SYSTEM_LIBS})
 

+ 1 - 14
lib/minizip/CMakeLists.txt

@@ -13,22 +13,9 @@ set(lib_SRCS
 add_library(minizip SHARED ${lib_SRCS})
 if(MSVC)
     set_target_properties(minizip PROPERTIES COMPILE_DEFINITIONS "MINIZIP_DLL;ZLIB_DLL;ZLIB_INTERNAL")
-elseif(APPLE)
-    set_target_properties(minizip PROPERTIES XCODE_ATTRIBUTE_LD_DYLIB_INSTALL_NAME "@rpath/libminizip.dylib")
 endif()
 
-# multi-config builds (e.g. msvc)
-foreach (OUTPUTCONFIG ${CMAKE_CONFIGURATION_TYPES})
-	string(TOUPPER ${OUTPUTCONFIG} OUTPUTCONFIGUPPERCASE)
-	set_target_properties(minizip PROPERTIES RUNTIME_OUTPUT_DIRECTORY_${OUTPUTCONFIGUPPERCASE} ${CMAKE_BINARY_DIR}/${OUTPUTCONFIG}/lib)
-	set_target_properties(minizip PROPERTIES LIBRARY_OUTPUT_DIRECTORY_${OUTPUTCONFIGUPPERCASE} ${CMAKE_BINARY_DIR}/${OUTPUTCONFIG}/lib)
-	set_target_properties(minizip PROPERTIES ARCHIVE_OUTPUT_DIRECTORY_${OUTPUTCONFIGUPPERCASE} ${CMAKE_BINARY_DIR}/${OUTPUTCONFIG}/lib)
-endforeach()
-
-# generic no-config case (e.g. with mingw)
-set_target_properties(minizip PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/build/lib)
-set_target_properties(minizip PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/build/lib)
-set_target_properties(minizip PROPERTIES ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/build/lib)
+vcmi_set_output_dir(minizip "")
 
 target_link_libraries(minizip ${ZLIB_LIBRARIES})
 

+ 34 - 0
osx/Info.plist.in

@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//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>${MACOSX_BUNDLE_EXECUTABLE_NAME}</string>
+	<key>CFBundleGetInfoString</key>
+	<string>${MACOSX_BUNDLE_INFO_STRING}</string>
+	<key>CFBundleIconFile</key>
+	<string>${MACOSX_BUNDLE_ICON_FILE}</string>
+	<key>CFBundleIdentifier</key>
+	<string>${MACOSX_BUNDLE_GUI_IDENTIFIER}</string>
+	<key>CFBundleLongVersionString</key>
+	<string>${MACOSX_BUNDLE_LONG_VERSION_STRING}</string>
+	<key>CFBundleName</key>
+	<string>${MACOSX_BUNDLE_BUNDLE_NAME}</string>
+	<key>CFBundlePackageType</key>
+	<string>APPL</string>
+	<key>CFBundleShortVersionString</key>
+	<string>${MACOSX_BUNDLE_SHORT_VERSION_STRING}</string>
+	<key>CFBundleVersion</key>
+	<string>${MACOSX_BUNDLE_BUNDLE_VERSION}</string>
+	<key>CSResourcesFileMapped</key>
+	<true/>
+	<key>NSHumanReadableCopyright</key>
+	<string>${MACOSX_BUNDLE_COPYRIGHT}</string>
+	<key>NSPrincipalClass</key>
+	<string>NSApplication</string>
+	<key>NSHighResolutionCapable</key>
+	<string>True</string>
+</dict>
+</plist>

+ 0 - 15
osx/download_dependencies.sh

@@ -1,15 +0,0 @@
-if [ -f ../.osx_dependencies_installed ];
-then
-   echo "OS X prebuilt dependencies are already installled"
-else
-	# Download and unpack OS X prebuilt dependencies
-	curl -o ../xcode-pack.zip -L http://download.vcmi.eu/xcode-pack.zip
-	unzip ../xcode-pack.zip -d ../
-	rm -rf ../__MACOSX
-
-	# Build vcmibuilder
-	xcodebuild -project osx/osx-vcmibuilder/vcmibuilder.xcodeproj/ -configuration Release
-	mv osx/osx-vcmibuilder/build/Release/vcmibuilder.app osx/vcmibuilder.app
-
-	touch ../.osx_dependencies_installed
-fi

二進制
osx/osx-vcmibuilder/innoextract


二進制
osx/osx-vcmibuilder/unshield


二進制
osx/osx-vcmibuilder/vcmibuilder.icns


+ 0 - 307
osx/osx-vcmibuilder/vcmibuilder.xcodeproj/project.pbxproj

@@ -1,307 +0,0 @@
-// !$*UTF8*$!
-{
-	archiveVersion = 1;
-	classes = {
-	};
-	objectVersion = 46;
-	objects = {
-
-/* Begin PBXBuildFile section */
-		A8467DFF16760A4E00A9F095 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A8467DFE16760A4E00A9F095 /* Cocoa.framework */; };
-		A8467E0916760A4E00A9F095 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = A8467E0716760A4E00A9F095 /* InfoPlist.strings */; };
-		A8467E0B16760A4E00A9F095 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = A8467E0A16760A4E00A9F095 /* main.m */; };
-		A8467E1216760A4E00A9F095 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = A8467E1116760A4E00A9F095 /* AppDelegate.m */; };
-		A8467E1516760A4E00A9F095 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = A8467E1316760A4E00A9F095 /* MainMenu.xib */; };
-		A866001516760C5B00DBFB19 /* vcmibuilder.icns in Resources */ = {isa = PBXBuildFile; fileRef = A866001416760C5B00DBFB19 /* vcmibuilder.icns */; };
-		A8F36836167632DC0009832A /* innoextract in Resources */ = {isa = PBXBuildFile; fileRef = A8F36834167632DC0009832A /* innoextract */; };
-		A8F36837167632DC0009832A /* unshield in Resources */ = {isa = PBXBuildFile; fileRef = A8F36835167632DC0009832A /* unshield */; };
-/* End PBXBuildFile section */
-
-/* Begin PBXFileReference section */
-		A8467DFA16760A4E00A9F095 /* vcmibuilder.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = vcmibuilder.app; sourceTree = BUILT_PRODUCTS_DIR; };
-		A8467DFE16760A4E00A9F095 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; };
-		A8467E0116760A4E00A9F095 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; };
-		A8467E0216760A4E00A9F095 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = System/Library/Frameworks/CoreData.framework; sourceTree = SDKROOT; };
-		A8467E0316760A4E00A9F095 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
-		A8467E0616760A4E00A9F095 /* vcmibuilder-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "vcmibuilder-Info.plist"; sourceTree = "<group>"; };
-		A8467E0816760A4E00A9F095 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
-		A8467E0A16760A4E00A9F095 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
-		A8467E0C16760A4E00A9F095 /* vcmibuilder-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "vcmibuilder-Prefix.pch"; sourceTree = "<group>"; };
-		A8467E1016760A4E00A9F095 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
-		A8467E1116760A4E00A9F095 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
-		A8467E1416760A4E00A9F095 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/MainMenu.xib; sourceTree = "<group>"; };
-		A866001416760C5B00DBFB19 /* vcmibuilder.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = vcmibuilder.icns; sourceTree = "<group>"; };
-		A8F36834167632DC0009832A /* innoextract */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; path = innoextract; sourceTree = "<group>"; };
-		A8F36835167632DC0009832A /* unshield */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; path = unshield; sourceTree = "<group>"; };
-/* End PBXFileReference section */
-
-/* Begin PBXFrameworksBuildPhase section */
-		A8467DF716760A4E00A9F095 /* Frameworks */ = {
-			isa = PBXFrameworksBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				A8467DFF16760A4E00A9F095 /* Cocoa.framework in Frameworks */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXFrameworksBuildPhase section */
-
-/* Begin PBXGroup section */
-		A8467DEF16760A4E00A9F095 = {
-			isa = PBXGroup;
-			children = (
-				A8F36834167632DC0009832A /* innoextract */,
-				A8F36835167632DC0009832A /* unshield */,
-				A866001416760C5B00DBFB19 /* vcmibuilder.icns */,
-				A8467E0416760A4E00A9F095 /* vcmibuilder */,
-				A8467DFD16760A4E00A9F095 /* Frameworks */,
-				A8467DFB16760A4E00A9F095 /* Products */,
-			);
-			sourceTree = "<group>";
-		};
-		A8467DFB16760A4E00A9F095 /* Products */ = {
-			isa = PBXGroup;
-			children = (
-				A8467DFA16760A4E00A9F095 /* vcmibuilder.app */,
-			);
-			name = Products;
-			sourceTree = "<group>";
-		};
-		A8467DFD16760A4E00A9F095 /* Frameworks */ = {
-			isa = PBXGroup;
-			children = (
-				A8467DFE16760A4E00A9F095 /* Cocoa.framework */,
-				A8467E0016760A4E00A9F095 /* Other Frameworks */,
-			);
-			name = Frameworks;
-			sourceTree = "<group>";
-		};
-		A8467E0016760A4E00A9F095 /* Other Frameworks */ = {
-			isa = PBXGroup;
-			children = (
-				A8467E0116760A4E00A9F095 /* AppKit.framework */,
-				A8467E0216760A4E00A9F095 /* CoreData.framework */,
-				A8467E0316760A4E00A9F095 /* Foundation.framework */,
-			);
-			name = "Other Frameworks";
-			sourceTree = "<group>";
-		};
-		A8467E0416760A4E00A9F095 /* vcmibuilder */ = {
-			isa = PBXGroup;
-			children = (
-				A8467E1016760A4E00A9F095 /* AppDelegate.h */,
-				A8467E1116760A4E00A9F095 /* AppDelegate.m */,
-				A8467E1316760A4E00A9F095 /* MainMenu.xib */,
-				A8467E0516760A4E00A9F095 /* Supporting Files */,
-			);
-			path = vcmibuilder;
-			sourceTree = "<group>";
-		};
-		A8467E0516760A4E00A9F095 /* Supporting Files */ = {
-			isa = PBXGroup;
-			children = (
-				A8467E0616760A4E00A9F095 /* vcmibuilder-Info.plist */,
-				A8467E0716760A4E00A9F095 /* InfoPlist.strings */,
-				A8467E0A16760A4E00A9F095 /* main.m */,
-				A8467E0C16760A4E00A9F095 /* vcmibuilder-Prefix.pch */,
-			);
-			name = "Supporting Files";
-			sourceTree = "<group>";
-		};
-/* End PBXGroup section */
-
-/* Begin PBXNativeTarget section */
-		A8467DF916760A4E00A9F095 /* vcmibuilder */ = {
-			isa = PBXNativeTarget;
-			buildConfigurationList = A8467E1816760A4E00A9F095 /* Build configuration list for PBXNativeTarget "vcmibuilder" */;
-			buildPhases = (
-				A8467DF616760A4E00A9F095 /* Sources */,
-				A8467DF716760A4E00A9F095 /* Frameworks */,
-				A8467DF816760A4E00A9F095 /* Resources */,
-			);
-			buildRules = (
-			);
-			dependencies = (
-			);
-			name = vcmibuilder;
-			productName = vcmibuilder;
-			productReference = A8467DFA16760A4E00A9F095 /* vcmibuilder.app */;
-			productType = "com.apple.product-type.application";
-		};
-/* End PBXNativeTarget section */
-
-/* Begin PBXProject section */
-		A8467DF116760A4E00A9F095 /* Project object */ = {
-			isa = PBXProject;
-			attributes = {
-				LastUpgradeCheck = 0450;
-				ORGANIZATIONNAME = "Alexey Petruchik";
-			};
-			buildConfigurationList = A8467DF416760A4E00A9F095 /* Build configuration list for PBXProject "vcmibuilder" */;
-			compatibilityVersion = "Xcode 3.2";
-			developmentRegion = English;
-			hasScannedForEncodings = 0;
-			knownRegions = (
-				en,
-			);
-			mainGroup = A8467DEF16760A4E00A9F095;
-			productRefGroup = A8467DFB16760A4E00A9F095 /* Products */;
-			projectDirPath = "";
-			projectRoot = "";
-			targets = (
-				A8467DF916760A4E00A9F095 /* vcmibuilder */,
-			);
-		};
-/* End PBXProject section */
-
-/* Begin PBXResourcesBuildPhase section */
-		A8467DF816760A4E00A9F095 /* Resources */ = {
-			isa = PBXResourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				A8467E0916760A4E00A9F095 /* InfoPlist.strings in Resources */,
-				A8467E1516760A4E00A9F095 /* MainMenu.xib in Resources */,
-				A866001516760C5B00DBFB19 /* vcmibuilder.icns in Resources */,
-				A8F36836167632DC0009832A /* innoextract in Resources */,
-				A8F36837167632DC0009832A /* unshield in Resources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXResourcesBuildPhase section */
-
-/* Begin PBXSourcesBuildPhase section */
-		A8467DF616760A4E00A9F095 /* Sources */ = {
-			isa = PBXSourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				A8467E0B16760A4E00A9F095 /* main.m in Sources */,
-				A8467E1216760A4E00A9F095 /* AppDelegate.m in Sources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXSourcesBuildPhase section */
-
-/* Begin PBXVariantGroup section */
-		A8467E0716760A4E00A9F095 /* InfoPlist.strings */ = {
-			isa = PBXVariantGroup;
-			children = (
-				A8467E0816760A4E00A9F095 /* en */,
-			);
-			name = InfoPlist.strings;
-			sourceTree = "<group>";
-		};
-		A8467E1316760A4E00A9F095 /* MainMenu.xib */ = {
-			isa = PBXVariantGroup;
-			children = (
-				A8467E1416760A4E00A9F095 /* en */,
-			);
-			name = MainMenu.xib;
-			sourceTree = "<group>";
-		};
-/* End PBXVariantGroup section */
-
-/* Begin XCBuildConfiguration section */
-		A8467E1616760A4E00A9F095 /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ALWAYS_SEARCH_USER_PATHS = NO;
-				ARCHS = "$(ARCHS_STANDARD_64_BIT)";
-				CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
-				CLANG_CXX_LIBRARY = "libc++";
-				CLANG_ENABLE_OBJC_ARC = YES;
-				CLANG_WARN_EMPTY_BODY = YES;
-				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
-				COPY_PHASE_STRIP = NO;
-				GCC_C_LANGUAGE_STANDARD = gnu99;
-				GCC_DYNAMIC_NO_PIC = NO;
-				GCC_ENABLE_OBJC_EXCEPTIONS = YES;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				GCC_PREPROCESSOR_DEFINITIONS = (
-					"DEBUG=1",
-					"$(inherited)",
-				);
-				GCC_SYMBOLS_PRIVATE_EXTERN = NO;
-				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
-				GCC_WARN_ABOUT_RETURN_TYPE = YES;
-				GCC_WARN_INHIBIT_ALL_WARNINGS = NO;
-				GCC_WARN_UNINITIALIZED_AUTOS = YES;
-				GCC_WARN_UNUSED_VARIABLE = YES;
-				MACOSX_DEPLOYMENT_TARGET = 10.7;
-				ONLY_ACTIVE_ARCH = YES;
-				SDKROOT = macosx;
-			};
-			name = Debug;
-		};
-		A8467E1716760A4E00A9F095 /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ALWAYS_SEARCH_USER_PATHS = NO;
-				ARCHS = "$(ARCHS_STANDARD_64_BIT)";
-				CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
-				CLANG_CXX_LIBRARY = "libc++";
-				CLANG_ENABLE_OBJC_ARC = YES;
-				CLANG_WARN_EMPTY_BODY = YES;
-				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
-				COPY_PHASE_STRIP = YES;
-				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
-				GCC_C_LANGUAGE_STANDARD = gnu99;
-				GCC_ENABLE_OBJC_EXCEPTIONS = YES;
-				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
-				GCC_WARN_ABOUT_RETURN_TYPE = YES;
-				GCC_WARN_INHIBIT_ALL_WARNINGS = NO;
-				GCC_WARN_UNINITIALIZED_AUTOS = YES;
-				GCC_WARN_UNUSED_VARIABLE = YES;
-				MACOSX_DEPLOYMENT_TARGET = 10.7;
-				SDKROOT = macosx;
-			};
-			name = Release;
-		};
-		A8467E1916760A4E00A9F095 /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				COMBINE_HIDPI_IMAGES = YES;
-				GCC_PRECOMPILE_PREFIX_HEADER = YES;
-				GCC_PREFIX_HEADER = "vcmibuilder/vcmibuilder-Prefix.pch";
-				INFOPLIST_FILE = "vcmibuilder/vcmibuilder-Info.plist";
-				PRODUCT_NAME = "$(TARGET_NAME)";
-				WRAPPER_EXTENSION = app;
-			};
-			name = Debug;
-		};
-		A8467E1A16760A4E00A9F095 /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				COMBINE_HIDPI_IMAGES = YES;
-				GCC_PRECOMPILE_PREFIX_HEADER = YES;
-				GCC_PREFIX_HEADER = "vcmibuilder/vcmibuilder-Prefix.pch";
-				INFOPLIST_FILE = "vcmibuilder/vcmibuilder-Info.plist";
-				PRODUCT_NAME = "$(TARGET_NAME)";
-				WRAPPER_EXTENSION = app;
-			};
-			name = Release;
-		};
-/* End XCBuildConfiguration section */
-
-/* Begin XCConfigurationList section */
-		A8467DF416760A4E00A9F095 /* Build configuration list for PBXProject "vcmibuilder" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				A8467E1616760A4E00A9F095 /* Debug */,
-				A8467E1716760A4E00A9F095 /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Release;
-		};
-		A8467E1816760A4E00A9F095 /* Build configuration list for PBXNativeTarget "vcmibuilder" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				A8467E1916760A4E00A9F095 /* Debug */,
-				A8467E1A16760A4E00A9F095 /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Release;
-		};
-/* End XCConfigurationList section */
-	};
-	rootObject = A8467DF116760A4E00A9F095 /* Project object */;
-}

+ 0 - 53
osx/osx-vcmibuilder/vcmibuilder/AppDelegate.h

@@ -1,53 +0,0 @@
-#import <Cocoa/Cocoa.h>
-
-@interface AppDelegate : NSObject <NSApplicationDelegate, NSURLDownloadDelegate>
-{
-    NSString* outputDir;
-    NSString* tempDir;
-    NSString* dataDir;
-    NSString* currentArchiveName;
-    NSString* currentArchiveFilename;
-    
-    NSMutableArray* actions;
-    
-    int64_t bytesRecieved;
-    int64_t bytesExpected;
-    
-    BOOL installationCompleted;
-}
-
-@property (strong) IBOutlet NSWindow *window;
-@property (weak) IBOutlet NSButton *cd1Button;
-@property (weak) IBOutlet NSTextField *cd1TextField;
-@property (weak) IBOutlet NSButton *cd2Button;
-@property (weak) IBOutlet NSTextField *cd2TextField;
-@property (weak) IBOutlet NSProgressIndicator *progressIndicator;
-@property (weak) IBOutlet NSTextField *progressLabel;
-@property (weak) IBOutlet NSButton *installButton;
-@property (weak) IBOutlet NSTextField *errorLabel;
-
-@property (strong) NSURLDownload* download;
-
-- (IBAction)selectCD1:(id)sender;
-- (IBAction)selectCD2:(id)sender;
-- (IBAction)install:(id)sender;
-
-- (void)selectFile:(NSArray*)fileTypes withTextField:(NSTextField*)textField;
-- (void)showProgressText:(NSString*)text;
-- (void)showErrorText:(NSString*)text;
-- (void)showNotification:(NSString*)text;
-- (void)nextAction;
-- (int)runTask:(NSString*)executable withArgs:(NSArray*)args withWorkingDir:(NSString*)workingDir withPipe:(NSPipe*)pipe;
-
-- (void)downloadWogArchive;
-- (void)unzipWogArchive;
-- (void)downloadVcmiArchive;
-- (void)unzipVcmiArchive;
-- (void)extractGameData;
-- (void)innoexctract;
-- (NSString*)attachDiskImage:(NSString*)path;
-- (void)unshield;
-- (void)detachDiskImage:(NSString*)mountedPath;
-- (void)extractionCompleted;
-
-@end

+ 0 - 395
osx/osx-vcmibuilder/vcmibuilder/AppDelegate.m

@@ -1,395 +0,0 @@
-#import "AppDelegate.h"
-
-@implementation AppDelegate
-
-- (void)applicationDidFinishLaunching:(NSNotification*)aNotification
-{
-    installationCompleted = NO;
-    outputDir = [[[NSBundle mainBundle] bundlePath] stringByAppendingString:@"/../../Data"];
-    tempDir = NSTemporaryDirectory();
-
-    // Output to Application Support
-    NSArray* appSupportDirs = [[NSFileManager defaultManager] URLsForDirectory:NSApplicationSupportDirectory inDomains:NSUserDomainMask];
-    outputDir = [[appSupportDirs[0] path] stringByAppendingString:@"/vcmi"];
-}
-
-- (BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication*)sender
-{
-    return YES;
-}
-
-- (void)download:(NSURLDownload*)download didReceiveResponse:(NSURLResponse*)response
-{
-    self->bytesRecieved = 0;
-    self->bytesExpected = [response expectedContentLength];
-}
-
-- (void)download:(NSURLDownload*)download didReceiveDataOfLength:(NSUInteger)length
-{
-    self->bytesRecieved += length;
-    [self showProgressText:[NSString stringWithFormat:@"Downloading %@ archive: %3.1f Mb / %3.1f Mb", self->currentArchiveName,
-                            self->bytesRecieved / 1024.0f / 1024.0f, self->bytesExpected / 1024.0f / 1024.0f]];
-}
-
-- (void)download:(NSURLDownload*)download decideDestinationWithSuggestedFilename:(NSString*)filename
-{
-    [download setDestination:[tempDir stringByAppendingString:currentArchiveFilename] allowOverwrite:YES];
-}
-
-- (void)downloadDidFinish:(NSURLDownload*)download
-{
-    [self showProgressText:[NSString stringWithFormat:@"Downloading %@ archive: completed", self->currentArchiveName]];
-    [self nextAction];
-}
-
-- (void)download:(NSURLDownload*)download didFailWithError:(NSError*)error
-{
-    [self showProgressText:[NSString stringWithFormat:@"Downloading %@ archive: failed", self->currentArchiveName]];
-    [self showErrorText:[error localizedDescription]];
-}
-
-- (void)nextAction
-{
-    dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
-        if ([actions count] > 0) {
-            SEL sel = NSSelectorFromString(actions[0]);
-            [actions removeObjectAtIndex:0];
-            @try {
-                [self performSelector:sel];
-            }
-            @catch (NSException* e) {
-                [self showErrorText:[e name]];
-            }
-        }
-    });
-}
-
-- (int)runTask:(NSString*)executable withArgs:(NSArray*)args withWorkingDir:(NSString*)workingDir withPipe:(NSPipe*)pipe
-{
-    if (![executable hasPrefix:@"/usr/"]) {
-        executable = [[[NSBundle mainBundle] resourcePath] stringByAppendingString:executable];
-    }
-
-    NSTask* task = [[NSTask alloc] init];
-    [task setLaunchPath:executable];
-    if (workingDir != nil) {
-        [task setCurrentDirectoryPath:workingDir];
-    }
-    if (pipe != nil) {
-        [task setStandardOutput:pipe];
-    }
-    [task setArguments:args];
-
-    [task launch];
-    [task waitUntilExit];
-
-    return [task terminationStatus];
-}
-
-- (void)validateAction
-{
-    // Before starting anything run validations
-    if (![[NSFileManager defaultManager] fileExistsAtPath:[self.cd1TextField stringValue]]) {
-        return [self showErrorText:@"Please select existing file"];
-    }
-
-    // Show progress controls
-    [self.progressIndicator setHidden:NO];
-    [self.progressIndicator startAnimation:self];
-    [self showProgressText:@"Installing VCMI..."];
-
-    [self nextAction];
-}
-
-- (void)downloadWogArchive
-{
-    // First of all we need to download WoG archive
-    // Downloading should be done on main thread because of callbacks
-    dispatch_async(dispatch_get_main_queue(), ^{
-        self->currentArchiveName = @"WoG";
-        self->currentArchiveFilename = @"/wog.zip";
-        NSURL* url = [NSURL URLWithString:@"https://download.vcmi.eu/WoG/wog.zip"];
-        self.download = [[NSURLDownload alloc] initWithRequest:[NSURLRequest requestWithURL:url] delegate:self];
-    });
-}
-
-- (void)unzipWogArchive
-{
-    // Then we unzip downloaded WoG archive
-    [self showProgressText:@"Unzipping WoG archive"];
-    if ([self runTask:@"/usr/bin/unzip" withArgs:@[@"-qo", [tempDir stringByAppendingString:currentArchiveFilename], @"-d", outputDir] withWorkingDir:nil withPipe:nil] != 0) {
-        return [self showErrorText:@"Failed to unzip WoG archive"];
-    }
-
-    [self nextAction];
-}
-
-- (void)downloadVcmiArchive
-{
-    // Than we need to download VCMI archive
-    // Downloading should be done on main thread because of callbacks
-    dispatch_async(dispatch_get_main_queue(), ^{
-        self->currentArchiveName = @"VCMI";
-        self->currentArchiveFilename = @"/core.zip";
-        NSURL* url = [NSURL URLWithString:@"https://download.vcmi.eu/core.zip"];
-        self.download = [[NSURLDownload alloc] initWithRequest:[NSURLRequest requestWithURL:url] delegate:self];
-    });
-}
-
-- (void)unzipVcmiArchive
-{
-    // Then we unzip downloaded VCMI archive
-    [self showProgressText:@"Unzipping VCMI archive"];
-    if ([self runTask:@"/usr/bin/unzip" withArgs:@[@"-qo", [tempDir stringByAppendingString:currentArchiveFilename], @"-d", outputDir, @"-x", @"*.json", @"*.txt", @"*.PAL"] withWorkingDir:nil withPipe:nil] != 0) {
-        return [self showErrorText:@"Failed to unzip VCMI archive"];
-    }
-
-    [self nextAction];
-}
-
-- (void)extractGameData
-{
-    // Then we extract game data from provided iso files using unshield or from innosetup exe
-    if ([[self.cd1TextField stringValue] hasSuffix:@".exe"]) {
-        [self innoexctract];
-    } else {
-        [self unshield];
-    }
-
-    [self nextAction];
-}
-
-- (void)innoexctract
-{
-    // Extraction via innoextact is pretty straightforward
-    [self showProgressText:@"Extracting game data using innoextract..."];
-    if ([self runTask:@"/innoextract" withArgs:@[[self.cd1TextField stringValue]] withWorkingDir:tempDir withPipe:nil] != 0) {
-        [self showErrorText:@"Failed to exctract game data using innoextract"];
-    }
-
-    dataDir = [tempDir stringByAppendingString:@"/app"];
-}
-
-- (NSString*)attachDiskImage:(NSString*)path
-{
-    [self showProgressText:[NSString stringWithFormat:@"Mounting image \"%@\"", path]];
-
-    // Run hdiutil to mount specified disk image
-    NSPipe* pipe = [NSPipe pipe];
-    if ([self runTask:@"/usr/bin/hdiutil" withArgs:@[@"attach", path] withWorkingDir:nil withPipe:pipe] != 0) {
-        [NSException raise:[NSString stringWithFormat:@"Failed to mount \"%@\"", path] format:nil];
-    }
-
-    // Capture hdiutil output to get mounted disk image filesystem path
-    NSFileHandle* file = [pipe fileHandleForReading];
-    NSString* output = [[NSString alloc] initWithData:[file readDataToEndOfFile] encoding:NSUTF8StringEncoding];
-
-    NSRegularExpression* regex = [NSRegularExpression regularExpressionWithPattern:@"(/Volumes/.*)$" options:0 error:nil];
-    NSTextCheckingResult* match = [regex firstMatchInString:output options:0 range:NSMakeRange(0, [output length])];
-
-    return [output substringWithRange:[match range]];
-}
-
-- (void)detachDiskImage:(NSString*)mountedPath
-{
-    if ([self runTask:@"/usr/bin/hdiutil" withArgs:@[@"detach", mountedPath] withWorkingDir:nil withPipe:nil] != 0) {
-        [NSException raise:[NSString stringWithFormat:@"Failed to unmount \"%@\"", mountedPath] format:nil];
-    }
-}
-
-- (void)unshield
-{
-    // In case of iso files we should mount them first
-    // If CD2 is not specified use the same path as for CD1
-    NSString* cd1 = [self attachDiskImage:[self.cd1TextField stringValue]];
-    NSString* cd2 = [[self.cd2TextField stringValue] isEqualToString:@""] ? cd1 : [self attachDiskImage:[self.cd2TextField stringValue]];
-
-    // Extract
-    [self showProgressText:@"Extracting game data using unshield..."];
-
-    NSArray* knownLocations = @[
-        @"/_setup/data1.cab",
-        @"/Autorun/Setup/data1.cab"
-    ];
-
-    bool success = false;
-    for (NSString* location in knownLocations) {
-        NSString* cabLocation = [cd1 stringByAppendingString:location];
-        if ([[NSFileManager defaultManager] fileExistsAtPath:cabLocation]) {
-            int result = [self runTask:@"/unshield" withArgs:@[@"-d", tempDir, @"x", cabLocation] withWorkingDir:tempDir  withPipe:nil];
-
-            if (result == 0) {
-                success = true;
-                break;
-            }
-        }
-    }
-
-    if (!success) {
-        return [self showErrorText:@"Failed to extract game data using unshield"];
-    }
-
-    NSArray* knownDataDirs = @[
-        @"/Heroes3",
-        @"/Program_Files",
-        @"/Data",
-    ];
-
-    success = false;
-    for (NSString* knownDir in knownDataDirs) {
-        dataDir = [tempDir stringByAppendingString:knownDir];
-        if ([[NSFileManager defaultManager] fileExistsAtPath:dataDir]) {
-            success = true;
-            break;
-        }
-    }
-
-    if (!success) {
-        return [self showErrorText:@"Failed to extract game data using unshield"];
-    }
-
-    // Unmount CD1. Unmount CD2 if needed
-    [self detachDiskImage:cd1];
-    if (![cd1 isEqualToString:cd2]) {
-        [self detachDiskImage:cd2];
-    }
-}
-
-- (void)extractionCompleted
-{
-    // After game data is extracted we should move it to destination place
-    [self showProgressText:@"Moving items into place"];
-
-    NSFileManager* fileManager = [NSFileManager defaultManager];
-
-    [fileManager moveItemAtPath:[dataDir stringByAppendingString:@"/Data"] toPath:[outputDir stringByAppendingString:@"/Data"] error:nil];
-    [fileManager moveItemAtPath:[dataDir stringByAppendingString:@"/Maps"] toPath:[outputDir stringByAppendingString:@"/Maps"] error:nil];
-
-    if ([fileManager fileExistsAtPath:[dataDir stringByAppendingString:@"/MP3"] isDirectory:nil]) {
-        [fileManager moveItemAtPath:[dataDir stringByAppendingString:@"/MP3"] toPath:[outputDir stringByAppendingString:@"/Mp3"] error:nil];
-    } else {
-        [fileManager moveItemAtPath:[dataDir stringByAppendingString:@"/Mp3"] toPath:[outputDir stringByAppendingString:@"/Mp3"] error:nil];
-    }
-
-    // After everythin is complete we create marker file. VCMI will look for this file to exists on startup and
-    // will run this setup otherwise
-    system([[NSString stringWithFormat:@"touch \"%@/game_data_prepared\"", outputDir] UTF8String]);
-
-    [self showProgressText:@"Installation complete"];
-    [self.installButton setTitle:@"Run VCMI"];
-    [self.progressIndicator stopAnimation:self];
-
-    // Notify user that installation completed
-    [self showNotification:@"Installation completed"];
-
-    // Hide all progress related controls
-    [self.progressIndicator setHidden:YES];
-    [self.progressIndicator stopAnimation:self];
-    [self.progressLabel setHidden:YES];
-
-    [self.installButton setEnabled:YES];
-    installationCompleted = YES;
-}
-
-- (void)selectFile:(NSArray*)fileTypes withTextField:(NSTextField*)textField
-{
-    NSOpenPanel* openPanel = [NSOpenPanel openPanel];
-    [openPanel setCanChooseFiles:YES];
-    [openPanel setAllowedFileTypes:fileTypes];
-    [openPanel setAllowsMultipleSelection:NO];
-
-    if ([openPanel runModal] == NSOKButton) {
-        NSString* path = [[openPanel URL] path];
-        [textField setStringValue:path];
-    }
-}
-
-- (IBAction)selectCD1:(id)sender
-{
-    [self selectFile:@[@"iso", @"exe"] withTextField:self.cd1TextField];
-}
-
-- (IBAction)selectCD2:(id)sender
-{
-    [self selectFile:@[@"iso"] withTextField:self.cd2TextField];
-}
-
-- (IBAction)install:(id)sender
-{
-    if (installationCompleted) {
-        // Run vcmi
-        system([[NSString stringWithFormat:@"open %@/../../..", [[NSBundle mainBundle] bundlePath]] UTF8String]);
-        [NSApp terminate: nil];
-    } else {
-        // Run installation
-        [self.cd1Button setEnabled:NO];
-        [self.cd2Button setEnabled:NO];
-        [self.installButton setEnabled:NO];
-
-        actions = [NSMutableArray arrayWithObjects:
-            @"validateAction",
-            @"downloadWogArchive",
-            @"unzipWogArchive",
-            @"downloadVcmiArchive",
-            @"unzipVcmiArchive",
-            @"extractGameData",
-            @"extractionCompleted",
-            nil
-        ];
-
-        [self nextAction];
-    }
-}
-
-- (void)showNotification:(NSString*)text
-{
-    // Notification Center is supported only on OS X 10.8 and newer
-    NSUserNotification* notification = [[NSUserNotification alloc] init];
-    if (notification != nil) {
-        notification.title = @"VCMI";
-        notification.informativeText = text;
-        notification.deliveryDate = [NSDate dateWithTimeInterval:0 sinceDate:[NSDate date]];
-        notification.soundName = NSUserNotificationDefaultSoundName;
-
-        [[NSUserNotificationCenter defaultUserNotificationCenter] scheduleNotification:notification];
-    } else {
-        // On older OS X version force dock icon to jump
-        [NSApp requestUserAttention:NSCriticalRequest];
-    }
-}
-
-- (void)showProgressText:(NSString*)text
-{
-    // All GUI updates should be done on main thread
-    dispatch_async(dispatch_get_main_queue(), ^{
-        [self.progressLabel setHidden:NO];
-        [self.progressLabel setStringValue:text];
-    });
-}
-
-- (void)showErrorText:(NSString*)text
-{
-    // All GUI updates should be done on main thread
-    dispatch_async(dispatch_get_main_queue(), ^{
-        [self showNotification:@"Installation failed"];
-
-        // Show error alert
-        NSAlert *alert = [[NSAlert alloc] init];
-        [alert setMessageText:@"Error"];
-        [alert setInformativeText:text];
-        [alert beginSheetModalForWindow:self.window modalDelegate:nil didEndSelector:nil contextInfo:nil];
-
-        // Enable select file buttons again
-        [self.cd1Button setEnabled:YES];
-        [self.cd2Button setEnabled:YES];
-        [self.installButton setEnabled:YES];
-
-        // Hide all progress related controls
-        [self.progressIndicator setHidden:YES];
-        [self.progressIndicator stopAnimation:self];
-
-        [self.progressLabel setHidden:YES];
-    });
-}
-
-@end

+ 0 - 2
osx/osx-vcmibuilder/vcmibuilder/en.lproj/InfoPlist.strings

@@ -1,2 +0,0 @@
-/* Localized versions of Info.plist keys */
-

+ 0 - 772
osx/osx-vcmibuilder/vcmibuilder/en.lproj/MainMenu.xib

@@ -1,772 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="8.00">
-	<data>
-		<int key="IBDocument.SystemTarget">1070</int>
-		<string key="IBDocument.SystemVersion">11G63</string>
-		<string key="IBDocument.InterfaceBuilderVersion">2844</string>
-		<string key="IBDocument.AppKitVersion">1138.51</string>
-		<string key="IBDocument.HIToolboxVersion">569.00</string>
-		<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
-			<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin</string>
-			<string key="NS.object.0">2844</string>
-		</object>
-		<array key="IBDocument.IntegratedClassDependencies">
-			<string>NSButton</string>
-			<string>NSButtonCell</string>
-			<string>NSCustomObject</string>
-			<string>NSMenu</string>
-			<string>NSMenuItem</string>
-			<string>NSProgressIndicator</string>
-			<string>NSTextField</string>
-			<string>NSTextFieldCell</string>
-			<string>NSView</string>
-			<string>NSWindowTemplate</string>
-		</array>
-		<array key="IBDocument.PluginDependencies">
-			<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-		</array>
-		<object class="NSMutableDictionary" key="IBDocument.Metadata">
-			<string key="NS.key.0">PluginDependencyRecalculationVersion</string>
-			<integer value="1" key="NS.object.0"/>
-		</object>
-		<array class="NSMutableArray" key="IBDocument.RootObjects" id="1048">
-			<object class="NSCustomObject" id="1021">
-				<string key="NSClassName">NSApplication</string>
-			</object>
-			<object class="NSCustomObject" id="1014">
-				<string key="NSClassName">FirstResponder</string>
-			</object>
-			<object class="NSCustomObject" id="1050">
-				<string key="NSClassName">NSApplication</string>
-			</object>
-			<object class="NSMenu" id="649796088">
-				<string key="NSTitle">AMainMenu</string>
-				<array class="NSMutableArray" key="NSMenuItems">
-					<object class="NSMenuItem" id="694149608">
-						<reference key="NSMenu" ref="649796088"/>
-						<string key="NSTitle">vcmibuilder</string>
-						<string key="NSKeyEquiv"/>
-						<int key="NSKeyEquivModMask">1048576</int>
-						<int key="NSMnemonicLoc">2147483647</int>
-						<object class="NSCustomResource" key="NSOnImage" id="35465992">
-							<string key="NSClassName">NSImage</string>
-							<string key="NSResourceName">NSMenuCheckmark</string>
-						</object>
-						<object class="NSCustomResource" key="NSMixedImage" id="502551668">
-							<string key="NSClassName">NSImage</string>
-							<string key="NSResourceName">NSMenuMixedState</string>
-						</object>
-						<string key="NSAction">submenuAction:</string>
-						<object class="NSMenu" key="NSSubmenu" id="110575045">
-							<string key="NSTitle">vcmibuilder</string>
-							<array class="NSMutableArray" key="NSMenuItems">
-								<object class="NSMenuItem" id="238522557">
-									<reference key="NSMenu" ref="110575045"/>
-									<string key="NSTitle">About vcmibuilder</string>
-									<string key="NSKeyEquiv"/>
-									<int key="NSMnemonicLoc">2147483647</int>
-									<reference key="NSOnImage" ref="35465992"/>
-									<reference key="NSMixedImage" ref="502551668"/>
-								</object>
-								<object class="NSMenuItem" id="1056857174">
-									<reference key="NSMenu" ref="110575045"/>
-									<bool key="NSIsDisabled">YES</bool>
-									<bool key="NSIsSeparator">YES</bool>
-									<string key="NSTitle"/>
-									<string key="NSKeyEquiv"/>
-									<int key="NSKeyEquivModMask">1048576</int>
-									<int key="NSMnemonicLoc">2147483647</int>
-									<reference key="NSOnImage" ref="35465992"/>
-									<reference key="NSMixedImage" ref="502551668"/>
-								</object>
-								<object class="NSMenuItem" id="632727374">
-									<reference key="NSMenu" ref="110575045"/>
-									<string key="NSTitle">Quit vcmibuilder</string>
-									<string key="NSKeyEquiv">q</string>
-									<int key="NSKeyEquivModMask">1048576</int>
-									<int key="NSMnemonicLoc">2147483647</int>
-									<reference key="NSOnImage" ref="35465992"/>
-									<reference key="NSMixedImage" ref="502551668"/>
-								</object>
-							</array>
-							<string key="NSName">_NSAppleMenu</string>
-						</object>
-					</object>
-				</array>
-				<string key="NSName">_NSMainMenu</string>
-			</object>
-			<object class="NSWindowTemplate" id="972006081">
-				<int key="NSWindowStyleMask">7</int>
-				<int key="NSWindowBacking">2</int>
-				<string key="NSWindowRect">{{335, 390}, {572, 194}}</string>
-				<int key="NSWTFlags">1954021376</int>
-				<string key="NSWindowTitle">VCMI Install</string>
-				<string key="NSWindowClass">NSWindow</string>
-				<nil key="NSViewClass"/>
-				<nil key="NSUserInterfaceItemIdentifier"/>
-				<string key="NSWindowContentMinSize">{572, 207}</string>
-				<object class="NSView" key="NSWindowView" id="439893737">
-					<reference key="NSNextResponder"/>
-					<int key="NSvFlags">256</int>
-					<array class="NSMutableArray" key="NSSubviews">
-						<object class="NSTextField" id="84390780">
-							<reference key="NSNextResponder" ref="439893737"/>
-							<int key="NSvFlags">12</int>
-							<string key="NSFrame">{{20, 83}, {483, 22}}</string>
-							<reference key="NSSuperview" ref="439893737"/>
-							<reference key="NSWindow"/>
-							<reference key="NSNextKeyView" ref="528248641"/>
-							<string key="NSReuseIdentifierKey">_NS:9</string>
-							<bool key="NSEnabled">YES</bool>
-							<object class="NSTextFieldCell" key="NSCell" id="679319045">
-								<int key="NSCellFlags">-2074083263</int>
-								<int key="NSCellFlags2">272631872</int>
-								<string key="NSContents"/>
-								<object class="NSFont" key="NSSupport" id="745107099">
-									<string key="NSName">LucidaGrande</string>
-									<double key="NSSize">13</double>
-									<int key="NSfFlags">1044</int>
-								</object>
-								<string key="NSPlaceholderString">CD1 ISO disk image or installer executable</string>
-								<string key="NSCellIdentifier">_NS:9</string>
-								<reference key="NSControlView" ref="84390780"/>
-								<bool key="NSDrawsBackground">YES</bool>
-								<object class="NSColor" key="NSBackgroundColor" id="485513480">
-									<int key="NSColorSpace">6</int>
-									<string key="NSCatalogName">System</string>
-									<string key="NSColorName">textBackgroundColor</string>
-									<object class="NSColor" key="NSColor">
-										<int key="NSColorSpace">3</int>
-										<bytes key="NSWhite">MQA</bytes>
-									</object>
-								</object>
-								<object class="NSColor" key="NSTextColor" id="216028668">
-									<int key="NSColorSpace">6</int>
-									<string key="NSCatalogName">System</string>
-									<string key="NSColorName">textColor</string>
-									<object class="NSColor" key="NSColor" id="167214173">
-										<int key="NSColorSpace">3</int>
-										<bytes key="NSWhite">MAA</bytes>
-									</object>
-								</object>
-							</object>
-						</object>
-						<object class="NSTextField" id="768593036">
-							<reference key="NSNextResponder" ref="439893737"/>
-							<int key="NSvFlags">12</int>
-							<string key="NSFrame">{{20, 51}, {483, 22}}</string>
-							<reference key="NSSuperview" ref="439893737"/>
-							<reference key="NSWindow"/>
-							<reference key="NSNextKeyView" ref="722999995"/>
-							<string key="NSReuseIdentifierKey">_NS:9</string>
-							<bool key="NSEnabled">YES</bool>
-							<object class="NSTextFieldCell" key="NSCell" id="827292020">
-								<int key="NSCellFlags">-2074083263</int>
-								<int key="NSCellFlags2">272631872</int>
-								<string key="NSContents"/>
-								<reference key="NSSupport" ref="745107099"/>
-								<string key="NSPlaceholderString">CD2 ISO disk image (optional)</string>
-								<string key="NSCellIdentifier">_NS:9</string>
-								<reference key="NSControlView" ref="768593036"/>
-								<bool key="NSDrawsBackground">YES</bool>
-								<reference key="NSBackgroundColor" ref="485513480"/>
-								<reference key="NSTextColor" ref="216028668"/>
-							</object>
-						</object>
-						<object class="NSTextField" id="977326994">
-							<reference key="NSNextResponder" ref="439893737"/>
-							<int key="NSvFlags">268</int>
-							<string key="NSFrame">{{17, 140}, {538, 34}}</string>
-							<reference key="NSSuperview" ref="439893737"/>
-							<reference key="NSWindow"/>
-							<reference key="NSNextKeyView" ref="84390780"/>
-							<string key="NSReuseIdentifierKey">_NS:1535</string>
-							<bool key="NSEnabled">YES</bool>
-							<object class="NSTextFieldCell" key="NSCell" id="907438656">
-								<int key="NSCellFlags">68157504</int>
-								<int key="NSCellFlags2">272630784</int>
-								<string key="NSContents">In order to complete VCMI installation you need original Heroes III: Shadow of Death
game data. Please select ISO disk image or installer executable and press Install.</string>
-								<reference key="NSSupport" ref="745107099"/>
-								<string key="NSCellIdentifier">_NS:1535</string>
-								<reference key="NSControlView" ref="977326994"/>
-								<object class="NSColor" key="NSBackgroundColor" id="548777339">
-									<int key="NSColorSpace">6</int>
-									<string key="NSCatalogName">System</string>
-									<string key="NSColorName">controlColor</string>
-									<object class="NSColor" key="NSColor">
-										<int key="NSColorSpace">3</int>
-										<bytes key="NSWhite">MC42NjY2NjY2NjY3AA</bytes>
-									</object>
-								</object>
-								<object class="NSColor" key="NSTextColor" id="136788794">
-									<int key="NSColorSpace">6</int>
-									<string key="NSCatalogName">System</string>
-									<string key="NSColorName">controlTextColor</string>
-									<reference key="NSColor" ref="167214173"/>
-								</object>
-							</object>
-						</object>
-						<object class="NSButton" id="528248641">
-							<reference key="NSNextResponder" ref="439893737"/>
-							<int key="NSvFlags">268</int>
-							<string key="NSFrame">{{505, 76}, {53, 32}}</string>
-							<reference key="NSSuperview" ref="439893737"/>
-							<reference key="NSWindow"/>
-							<reference key="NSNextKeyView" ref="768593036"/>
-							<string key="NSReuseIdentifierKey">_NS:9</string>
-							<bool key="NSEnabled">YES</bool>
-							<object class="NSButtonCell" key="NSCell" id="664923606">
-								<int key="NSCellFlags">67108864</int>
-								<int key="NSCellFlags2">134217728</int>
-								<string key="NSContents">...</string>
-								<reference key="NSSupport" ref="745107099"/>
-								<string key="NSCellIdentifier">_NS:9</string>
-								<reference key="NSControlView" ref="528248641"/>
-								<int key="NSButtonFlags">-2038284288</int>
-								<int key="NSButtonFlags2">129</int>
-								<string key="NSAlternateContents"/>
-								<string key="NSKeyEquivalent"/>
-								<int key="NSPeriodicDelay">200</int>
-								<int key="NSPeriodicInterval">25</int>
-							</object>
-						</object>
-						<object class="NSButton" id="722999995">
-							<reference key="NSNextResponder" ref="439893737"/>
-							<int key="NSvFlags">268</int>
-							<string key="NSFrame">{{505, 44}, {53, 32}}</string>
-							<reference key="NSSuperview" ref="439893737"/>
-							<reference key="NSWindow"/>
-							<reference key="NSNextKeyView" ref="812825571"/>
-							<string key="NSReuseIdentifierKey">_NS:9</string>
-							<bool key="NSEnabled">YES</bool>
-							<object class="NSButtonCell" key="NSCell" id="870085374">
-								<int key="NSCellFlags">67108864</int>
-								<int key="NSCellFlags2">134217728</int>
-								<string key="NSContents">...</string>
-								<reference key="NSSupport" ref="745107099"/>
-								<string key="NSCellIdentifier">_NS:9</string>
-								<reference key="NSControlView" ref="722999995"/>
-								<int key="NSButtonFlags">-2038284288</int>
-								<int key="NSButtonFlags2">129</int>
-								<string key="NSAlternateContents"/>
-								<string key="NSKeyEquivalent"/>
-								<int key="NSPeriodicDelay">200</int>
-								<int key="NSPeriodicInterval">25</int>
-							</object>
-						</object>
-						<object class="NSButton" id="715543543">
-							<reference key="NSNextResponder" ref="439893737"/>
-							<int key="NSvFlags">268</int>
-							<string key="NSFrame">{{461, 12}, {97, 32}}</string>
-							<reference key="NSSuperview" ref="439893737"/>
-							<reference key="NSWindow"/>
-							<reference key="NSNextKeyView"/>
-							<string key="NSReuseIdentifierKey">_NS:9</string>
-							<bool key="NSEnabled">YES</bool>
-							<object class="NSButtonCell" key="NSCell" id="750074650">
-								<int key="NSCellFlags">67108864</int>
-								<int key="NSCellFlags2">134217728</int>
-								<string key="NSContents">Install</string>
-								<reference key="NSSupport" ref="745107099"/>
-								<string key="NSCellIdentifier">_NS:9</string>
-								<reference key="NSControlView" ref="715543543"/>
-								<int key="NSButtonFlags">-2038284288</int>
-								<int key="NSButtonFlags2">129</int>
-								<string key="NSAlternateContents"/>
-								<string key="NSKeyEquivalent"/>
-								<int key="NSPeriodicDelay">200</int>
-								<int key="NSPeriodicInterval">25</int>
-							</object>
-						</object>
-						<object class="NSProgressIndicator" id="812825571">
-							<reference key="NSNextResponder" ref="439893737"/>
-							<int key="NSvFlags">-2147483380</int>
-							<string key="NSFrame">{{20, 22}, {16, 16}}</string>
-							<reference key="NSSuperview" ref="439893737"/>
-							<reference key="NSWindow"/>
-							<reference key="NSNextKeyView" ref="231983332"/>
-							<string key="NSReuseIdentifierKey">_NS:945</string>
-							<int key="NSpiFlags">20746</int>
-							<double key="NSMaxValue">100</double>
-						</object>
-						<object class="NSTextField" id="231983332">
-							<reference key="NSNextResponder" ref="439893737"/>
-							<int key="NSvFlags">-2147483380</int>
-							<string key="NSFrame">{{41, 22}, {419, 17}}</string>
-							<reference key="NSSuperview" ref="439893737"/>
-							<reference key="NSWindow"/>
-							<reference key="NSNextKeyView" ref="715543543"/>
-							<string key="NSReuseIdentifierKey">_NS:1535</string>
-							<bool key="NSEnabled">YES</bool>
-							<object class="NSTextFieldCell" key="NSCell" id="101005403">
-								<int key="NSCellFlags">67108928</int>
-								<int key="NSCellFlags2">272631808</int>
-								<string key="NSContents">Label</string>
-								<reference key="NSSupport" ref="745107099"/>
-								<string key="NSCellIdentifier">_NS:1535</string>
-								<reference key="NSControlView" ref="231983332"/>
-								<reference key="NSBackgroundColor" ref="548777339"/>
-								<reference key="NSTextColor" ref="136788794"/>
-							</object>
-						</object>
-					</array>
-					<string key="NSFrameSize">{572, 194}</string>
-					<reference key="NSSuperview"/>
-					<reference key="NSWindow"/>
-					<reference key="NSNextKeyView" ref="977326994"/>
-				</object>
-				<string key="NSScreenRect">{{0, 0}, {1680, 1028}}</string>
-				<string key="NSMinSize">{572, 229}</string>
-				<string key="NSMaxSize">{10000000000000, 10000000000000}</string>
-				<bool key="NSWindowIsRestorable">YES</bool>
-			</object>
-			<object class="NSCustomObject" id="976324537">
-				<string key="NSClassName">AppDelegate</string>
-			</object>
-			<object class="NSCustomObject" id="755631768">
-				<string key="NSClassName">NSFontManager</string>
-			</object>
-		</array>
-		<object class="IBObjectContainer" key="IBDocument.Objects">
-			<array class="NSMutableArray" key="connectionRecords">
-				<object class="IBConnectionRecord">
-					<object class="IBActionConnection" key="connection">
-						<string key="label">terminate:</string>
-						<reference key="source" ref="1050"/>
-						<reference key="destination" ref="632727374"/>
-					</object>
-					<int key="connectionID">449</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBActionConnection" key="connection">
-						<string key="label">orderFrontStandardAboutPanel:</string>
-						<reference key="source" ref="1021"/>
-						<reference key="destination" ref="238522557"/>
-					</object>
-					<int key="connectionID">142</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBOutletConnection" key="connection">
-						<string key="label">delegate</string>
-						<reference key="source" ref="1021"/>
-						<reference key="destination" ref="976324537"/>
-					</object>
-					<int key="connectionID">495</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBOutletConnection" key="connection">
-						<string key="label">window</string>
-						<reference key="source" ref="976324537"/>
-						<reference key="destination" ref="972006081"/>
-					</object>
-					<int key="connectionID">532</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBOutletConnection" key="connection">
-						<string key="label">cd1Button</string>
-						<reference key="source" ref="976324537"/>
-						<reference key="destination" ref="528248641"/>
-					</object>
-					<int key="connectionID">615</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBOutletConnection" key="connection">
-						<string key="label">cd2Button</string>
-						<reference key="source" ref="976324537"/>
-						<reference key="destination" ref="722999995"/>
-					</object>
-					<int key="connectionID">616</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBOutletConnection" key="connection">
-						<string key="label">cd1TextField</string>
-						<reference key="source" ref="976324537"/>
-						<reference key="destination" ref="84390780"/>
-					</object>
-					<int key="connectionID">617</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBOutletConnection" key="connection">
-						<string key="label">cd2TextField</string>
-						<reference key="source" ref="976324537"/>
-						<reference key="destination" ref="768593036"/>
-					</object>
-					<int key="connectionID">618</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBActionConnection" key="connection">
-						<string key="label">selectCD1:</string>
-						<reference key="source" ref="976324537"/>
-						<reference key="destination" ref="528248641"/>
-					</object>
-					<int key="connectionID">619</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBActionConnection" key="connection">
-						<string key="label">selectCD2:</string>
-						<reference key="source" ref="976324537"/>
-						<reference key="destination" ref="722999995"/>
-					</object>
-					<int key="connectionID">620</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBOutletConnection" key="connection">
-						<string key="label">progressLabel</string>
-						<reference key="source" ref="976324537"/>
-						<reference key="destination" ref="231983332"/>
-					</object>
-					<int key="connectionID">622</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBOutletConnection" key="connection">
-						<string key="label">progressIndicator</string>
-						<reference key="source" ref="976324537"/>
-						<reference key="destination" ref="812825571"/>
-					</object>
-					<int key="connectionID">623</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBOutletConnection" key="connection">
-						<string key="label">installButton</string>
-						<reference key="source" ref="976324537"/>
-						<reference key="destination" ref="715543543"/>
-					</object>
-					<int key="connectionID">624</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBActionConnection" key="connection">
-						<string key="label">install:</string>
-						<reference key="source" ref="976324537"/>
-						<reference key="destination" ref="715543543"/>
-					</object>
-					<int key="connectionID">625</int>
-				</object>
-			</array>
-			<object class="IBMutableOrderedSet" key="objectRecords">
-				<array key="orderedObjects">
-					<object class="IBObjectRecord">
-						<int key="objectID">0</int>
-						<array key="object" id="0"/>
-						<reference key="children" ref="1048"/>
-						<nil key="parent"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">-2</int>
-						<reference key="object" ref="1021"/>
-						<reference key="parent" ref="0"/>
-						<string key="objectName">File's Owner</string>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">-1</int>
-						<reference key="object" ref="1014"/>
-						<reference key="parent" ref="0"/>
-						<string key="objectName">First Responder</string>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">-3</int>
-						<reference key="object" ref="1050"/>
-						<reference key="parent" ref="0"/>
-						<string key="objectName">Application</string>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">29</int>
-						<reference key="object" ref="649796088"/>
-						<array class="NSMutableArray" key="children">
-							<reference ref="694149608"/>
-						</array>
-						<reference key="parent" ref="0"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">56</int>
-						<reference key="object" ref="694149608"/>
-						<array class="NSMutableArray" key="children">
-							<reference ref="110575045"/>
-						</array>
-						<reference key="parent" ref="649796088"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">57</int>
-						<reference key="object" ref="110575045"/>
-						<array class="NSMutableArray" key="children">
-							<reference ref="238522557"/>
-							<reference ref="632727374"/>
-							<reference ref="1056857174"/>
-						</array>
-						<reference key="parent" ref="694149608"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">58</int>
-						<reference key="object" ref="238522557"/>
-						<reference key="parent" ref="110575045"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">136</int>
-						<reference key="object" ref="632727374"/>
-						<reference key="parent" ref="110575045"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">149</int>
-						<reference key="object" ref="1056857174"/>
-						<reference key="parent" ref="110575045"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">371</int>
-						<reference key="object" ref="972006081"/>
-						<array class="NSMutableArray" key="children">
-							<reference ref="439893737"/>
-						</array>
-						<reference key="parent" ref="0"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">372</int>
-						<reference key="object" ref="439893737"/>
-						<array class="NSMutableArray" key="children">
-							<reference ref="977326994"/>
-							<reference ref="84390780"/>
-							<reference ref="768593036"/>
-							<reference ref="528248641"/>
-							<reference ref="722999995"/>
-							<reference ref="715543543"/>
-							<reference ref="812825571"/>
-							<reference ref="231983332"/>
-						</array>
-						<reference key="parent" ref="972006081"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">420</int>
-						<reference key="object" ref="755631768"/>
-						<reference key="parent" ref="0"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">494</int>
-						<reference key="object" ref="976324537"/>
-						<reference key="parent" ref="0"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">536</int>
-						<reference key="object" ref="84390780"/>
-						<array class="NSMutableArray" key="children">
-							<reference ref="679319045"/>
-						</array>
-						<reference key="parent" ref="439893737"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">537</int>
-						<reference key="object" ref="679319045"/>
-						<reference key="parent" ref="84390780"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">541</int>
-						<reference key="object" ref="768593036"/>
-						<array class="NSMutableArray" key="children">
-							<reference ref="827292020"/>
-						</array>
-						<reference key="parent" ref="439893737"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">542</int>
-						<reference key="object" ref="827292020"/>
-						<reference key="parent" ref="768593036"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">549</int>
-						<reference key="object" ref="977326994"/>
-						<array class="NSMutableArray" key="children">
-							<reference ref="907438656"/>
-						</array>
-						<reference key="parent" ref="439893737"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">550</int>
-						<reference key="object" ref="907438656"/>
-						<reference key="parent" ref="977326994"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">562</int>
-						<reference key="object" ref="528248641"/>
-						<array class="NSMutableArray" key="children">
-							<reference ref="664923606"/>
-						</array>
-						<reference key="parent" ref="439893737"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">563</int>
-						<reference key="object" ref="664923606"/>
-						<reference key="parent" ref="528248641"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">569</int>
-						<reference key="object" ref="722999995"/>
-						<array class="NSMutableArray" key="children">
-							<reference ref="870085374"/>
-						</array>
-						<reference key="parent" ref="439893737"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">570</int>
-						<reference key="object" ref="870085374"/>
-						<reference key="parent" ref="722999995"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">581</int>
-						<reference key="object" ref="715543543"/>
-						<array class="NSMutableArray" key="children">
-							<reference ref="750074650"/>
-						</array>
-						<reference key="parent" ref="439893737"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">582</int>
-						<reference key="object" ref="750074650"/>
-						<reference key="parent" ref="715543543"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">587</int>
-						<reference key="object" ref="812825571"/>
-						<reference key="parent" ref="439893737"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">593</int>
-						<reference key="object" ref="231983332"/>
-						<array class="NSMutableArray" key="children">
-							<reference ref="101005403"/>
-						</array>
-						<reference key="parent" ref="439893737"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">594</int>
-						<reference key="object" ref="101005403"/>
-						<reference key="parent" ref="231983332"/>
-					</object>
-				</array>
-			</object>
-			<dictionary class="NSMutableDictionary" key="flattenedProperties">
-				<string key="-1.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
-				<string key="-2.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
-				<string key="-3.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
-				<string key="136.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
-				<string key="149.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
-				<string key="29.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
-				<boolean value="YES" key="371.IBNSWindowAutoPositionCentersHorizontal"/>
-				<boolean value="YES" key="371.IBNSWindowAutoPositionCentersVertical"/>
-				<string key="371.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
-				<string key="371.IBWindowTemplateEditedContentRect">{{380, 496}, {480, 360}}</string>
-				<integer value="1" key="371.NSWindowTemplate.visibleAtLaunch"/>
-				<string key="372.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
-				<string key="420.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
-				<string key="494.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
-				<string key="536.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
-				<string key="537.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
-				<string key="541.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
-				<string key="542.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
-				<string key="549.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
-				<string key="550.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
-				<string key="56.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
-				<string key="562.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
-				<string key="563.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
-				<string key="569.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
-				<string key="57.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
-				<string key="570.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
-				<string key="58.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
-				<string key="581.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
-				<string key="582.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
-				<string key="587.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
-				<string key="593.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
-				<string key="594.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
-			</dictionary>
-			<dictionary class="NSMutableDictionary" key="unlocalizedProperties"/>
-			<nil key="activeLocalization"/>
-			<dictionary class="NSMutableDictionary" key="localizations"/>
-			<nil key="sourceID"/>
-			<int key="maxID">730</int>
-		</object>
-		<object class="IBClassDescriber" key="IBDocument.Classes">
-			<array class="NSMutableArray" key="referencedPartialClassDescriptions">
-				<object class="IBPartialClassDescription">
-					<string key="className">AppDelegate</string>
-					<string key="superclassName">NSObject</string>
-					<dictionary class="NSMutableDictionary" key="actions">
-						<string key="install:">id</string>
-						<string key="selectCD1:">id</string>
-						<string key="selectCD2:">id</string>
-					</dictionary>
-					<dictionary class="NSMutableDictionary" key="actionInfosByName">
-						<object class="IBActionInfo" key="install:">
-							<string key="name">install:</string>
-							<string key="candidateClassName">id</string>
-						</object>
-						<object class="IBActionInfo" key="selectCD1:">
-							<string key="name">selectCD1:</string>
-							<string key="candidateClassName">id</string>
-						</object>
-						<object class="IBActionInfo" key="selectCD2:">
-							<string key="name">selectCD2:</string>
-							<string key="candidateClassName">id</string>
-						</object>
-					</dictionary>
-					<dictionary class="NSMutableDictionary" key="outlets">
-						<string key="cd1Button">NSButton</string>
-						<string key="cd1TextField">NSTextField</string>
-						<string key="cd2Button">NSButton</string>
-						<string key="cd2TextField">NSTextField</string>
-						<string key="errorLabel">NSTextField</string>
-						<string key="installButton">NSButton</string>
-						<string key="progressIndicator">NSProgressIndicator</string>
-						<string key="progressLabel">NSTextField</string>
-						<string key="window">NSWindow</string>
-					</dictionary>
-					<dictionary class="NSMutableDictionary" key="toOneOutletInfosByName">
-						<object class="IBToOneOutletInfo" key="cd1Button">
-							<string key="name">cd1Button</string>
-							<string key="candidateClassName">NSButton</string>
-						</object>
-						<object class="IBToOneOutletInfo" key="cd1TextField">
-							<string key="name">cd1TextField</string>
-							<string key="candidateClassName">NSTextField</string>
-						</object>
-						<object class="IBToOneOutletInfo" key="cd2Button">
-							<string key="name">cd2Button</string>
-							<string key="candidateClassName">NSButton</string>
-						</object>
-						<object class="IBToOneOutletInfo" key="cd2TextField">
-							<string key="name">cd2TextField</string>
-							<string key="candidateClassName">NSTextField</string>
-						</object>
-						<object class="IBToOneOutletInfo" key="errorLabel">
-							<string key="name">errorLabel</string>
-							<string key="candidateClassName">NSTextField</string>
-						</object>
-						<object class="IBToOneOutletInfo" key="installButton">
-							<string key="name">installButton</string>
-							<string key="candidateClassName">NSButton</string>
-						</object>
-						<object class="IBToOneOutletInfo" key="progressIndicator">
-							<string key="name">progressIndicator</string>
-							<string key="candidateClassName">NSProgressIndicator</string>
-						</object>
-						<object class="IBToOneOutletInfo" key="progressLabel">
-							<string key="name">progressLabel</string>
-							<string key="candidateClassName">NSTextField</string>
-						</object>
-						<object class="IBToOneOutletInfo" key="window">
-							<string key="name">window</string>
-							<string key="candidateClassName">NSWindow</string>
-						</object>
-					</dictionary>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBProjectSource</string>
-						<string key="minorKey">./Classes/AppDelegate.h</string>
-					</object>
-				</object>
-			</array>
-		</object>
-		<int key="IBDocument.localizationMode">0</int>
-		<string key="IBDocument.TargetRuntimeIdentifier">IBCocoaFramework</string>
-		<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
-		<int key="IBDocument.defaultPropertyAccessControl">3</int>
-		<dictionary class="NSMutableDictionary" key="IBDocument.LastKnownImageSizes">
-			<string key="NSMenuCheckmark">{11, 11}</string>
-			<string key="NSMenuMixedState">{10, 3}</string>
-		</dictionary>
-	</data>
-</archive>

+ 0 - 6
osx/osx-vcmibuilder/vcmibuilder/main.m

@@ -1,6 +0,0 @@
-#import <Cocoa/Cocoa.h>
-
-int main(int argc, char *argv[])
-{
-    return NSApplicationMain(argc, (const char **)argv);
-}

+ 0 - 34
osx/osx-vcmibuilder/vcmibuilder/vcmibuilder-Info.plist

@@ -1,34 +0,0 @@
-<?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>en</string>
-	<key>CFBundleExecutable</key>
-	<string>${EXECUTABLE_NAME}</string>
-	<key>CFBundleIconFile</key>
-	<string>vcmibuilder</string>
-	<key>CFBundleIdentifier</key>
-	<string>com.vcmi.${PRODUCT_NAME:rfc1034identifier}</string>
-	<key>CFBundleInfoDictionaryVersion</key>
-	<string>6.0</string>
-	<key>CFBundleName</key>
-	<string>${PRODUCT_NAME}</string>
-	<key>CFBundlePackageType</key>
-	<string>APPL</string>
-	<key>CFBundleShortVersionString</key>
-	<string>1.0</string>
-	<key>CFBundleSignature</key>
-	<string>????</string>
-	<key>CFBundleVersion</key>
-	<string>1</string>
-	<key>LSMinimumSystemVersion</key>
-	<string>${MACOSX_DEPLOYMENT_TARGET}</string>
-	<key>NSHumanReadableCopyright</key>
-	<string>Copyright © 2012 Alexey Petruchik. All rights reserved.</string>
-	<key>NSMainNibFile</key>
-	<string>MainMenu</string>
-	<key>NSPrincipalClass</key>
-	<string>NSApplication</string>
-</dict>
-</plist>

+ 0 - 7
osx/osx-vcmibuilder/vcmibuilder/vcmibuilder-Prefix.pch

@@ -1,7 +0,0 @@
-//
-// Prefix header for all source files of the 'vcmibuilder' target in the 'vcmibuilder' project
-//
-
-#ifdef __OBJC__
-    #import <Cocoa/Cocoa.h>
-#endif

+ 0 - 15
osx/package.sh

@@ -1,15 +0,0 @@
-# Clean previous build
-rm -rf build
-rm -rf bin
-rm -rf osx/osx-vcmibuilder/build
-rm -rf osx/vcmibuilder.app
-
-# Build vcmibuilder
-xcodebuild -project osx/osx-vcmibuilder/vcmibuilder.xcodeproj/ -configuration Release
-mv osx/osx-vcmibuilder/build/Release/vcmibuilder.app osx/vcmibuilder.app
-
-# Build vcmi
-mkdir build
-cd build
-cmake -G Xcode .. -DENABLE_LAUNCHER=OFF
-xcodebuild -project vcmi.xcodeproj/ -configuration Release -target package

+ 0 - 30
osx/sparkle_appcast.xml

@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<rss version="2.0" xmlns:sparkle="http://vcmi.eu/xml-namespaces/sparkle"  xmlns:dc="http://purl.org/dc/elements/1.1/">
-   <channel>
-      <title>VCMI App Changelog</title>
-      <link>https://vcmi.eu/sparkle_appcast.xml</link>
-      <description>Most recent changes with links to updates.</description>
-      <language>en</language>
-         <item>
-            <title>Version 0.94</title>
-            <description>Version 0.94</description>
-            <pubDate>Wed, 09 Jan 2006 19:20:11 +0000</pubDate>
-            <sparkle:releaseNotesLink>http://vcmi.eu/sparkle_release_notes.html</sparkle:releaseNotesLink>
-            <enclosure url="http://download.vcmi.eu/vcmi-0.94.dmg" sparkle:version="0.94" length="35355069" type="application/octet-stream" sparkle:dsaSignature="MC0CFC13LTYNtAd5Nzq3Xu5R7Sle8aRuAhUA56mj9AAiYWARBkw07emy68HBUt8=" />
-         </item>
-         <item>
-            <title>Version 0.93</title>
-            <description>Version 0.93</description>
-            <pubDate>Wed, 09 Jan 2006 19:20:11 +0000</pubDate>
-            <sparkle:releaseNotesLink>http://vcmi.eu/sparkle_release_notes.html</sparkle:releaseNotesLink>
-            <enclosure url="http://download.vcmi.eu/vcmi-0.93.dmg" sparkle:version="0.93" length="35355069" type="application/octet-stream" sparkle:dsaSignature="MC0CFAkKqQ3J9lRjmNbtL7YaiTEmTs/VAhUAuADhN+gNPwXNwrJOVY6NXtPpLfk=" />
-         </item>
-         <item>
-            <title>Version 0.92</title>
-            <description>Version 0.92</description>
-            <pubDate>Wed, 09 Jan 2006 19:20:11 +0000</pubDate>
-            <sparkle:releaseNotesLink>http://vcmi.eu/sparkle_release_notes.html</sparkle:releaseNotesLink>
-            <enclosure url="http://download.vcmi.eu/vcmi-0.92.dmg" sparkle:version="0.92" length="34906250" type="application/octet-stream" sparkle:dsaSignature="MC0CFF75UKfXunY2GNSW4hs1O6MaWycLAhUA3YiRM9uUrnoS/PhWHgjRjwWcHo4=" />
-         </item>
-   </channel>
-</rss>

+ 0 - 171
osx/sparkle_release_notes.html

@@ -1,171 +0,0 @@
-<html>
-<body>
-    <h2>0.94</h2>
-    <b>GENERAL</b>
-    <ul>
-        <li>Filesystem now supports zip archives. They can be loaded similarly to other archives in filesystem.json. Mods can use Content.zip instead of Content/ directory.</li>
-        <li>fixed "get txt" console command</li>
-        <li>command "extract" to extract file by name</li>
-        <li>command "def2bmp" to convert def into set of frames.</li>
-        <li>fixed crash related to cammander's SPELL_AFTER_ATTACK spell id not initialized properly (text id was resolved on copy of bonus)</li>
-        <li>fixed duels, added no-GUI mode for automatic AI testing</li>
-        <li>Sir Mullich is available at the start of the game</li>
-        <li>Upgrade cost will never be negative.</li>
-        <li>support for Chinese fonts (GBK 2-byte encoding)</li>
-    </ul>
-    <b>ADVENTURE MAP</b>
-    <ul>
-        <li>if Quick Combat option is turned on, battles will be resolved by AI</li>
-        <li>first hero is awakened on new turn</li>
-        <li>fixed 3000 gems reward in shipwreck</li>
-    </ul>
-    <b>BATTLES</b>
-    <ul>
-        <li>autofight implemented</li>
-        <li>most of the animations is time-based</li>
-        <li>simplified postioning of units in battle, should fix remaining issues with unit positioning</li>
-        <li>synchronized attack/defence animation</li>
-        <li>spell animation speed uses game settings</li>
-        <li>fixed disrupting ray duration</li>
-        <li>added logging domain for battle animations</li>
-        <li>Fixed crashes on Land Mines / Fire Wall casting.</li>
-        <li>UI will be correctly greyed-out during opponent turn</li>
-        <li>fixed remaining issues with blit order</li>
-        <li>Catapult attacks should be identical to H3. Catapult may miss and attack another part of wall instead (this is how it works in H3)</li>
-        <li>Fixed Remove Obstacle.</li>
-        <li>defeating hero will yield 500 XP</li>
-        <li>Added lots of missing spell immunities from Strategija</li>
-        <li>Added stone gaze immunity for Troglodytes (did you know about it?)</li>
-        <li>damage done by turrets is properly increased by built buldings</li>
-        <li>Wyverns will cast Poison instead of Stone Gaze.</li>
-    </ul>
-    <b>TOWN</b>
-    <ul>
-        <li>Fixed issue that allowed to build multiple boats in town.</li>
-        <li>fix for lookout tower</li>
-    </ul>
-    <br>
-
-    <h2>0.93</h2>
-    <b>GENERAL</b>
-    <ul>
-        <li>Support for SoD-only installations, WoG becomes optional addition</li>
-        <li>New logging framework</li>
-        <li>Negative luck support, disabled by default</li>
-        <li>Several new icons for creature abilities (Fire Shield, Non-living, Magic Mirror, Spell-like Attack)</li>
-        <li>Fixed stack artifact (and related buttons) not displaying in creature window.</li>
-        <li>Fixed crash at month of double population.</li>
-    </ul>
-    <b>MODS</b>
-    <ul>
-        <li>See http://wiki.vcmi.eu/index.php?title=Modding_changelog#0.92_-.3E_0.93 for compatibility info.</li>
-        <li>Improved json validation. Now it support most of features from latest json schema draft.</li>
-        <li>Icons use path to icon instead of image indexes.</li>
-        <li>It is possible to edit data of another mod or H3 data via mods.</li>
-        <li>Mods can access only ID's from dependenies, virtual "core" mod and itself (optional for some mods compatibility)</li>
-        <li>Removed no longer needed field "projectile spins"</li>
-        <li>Heroes: split heroes.json in manner similar to creatures\factions; string ID's for H3 heroes; h3 hero classes and artifacts can be modified via json.</li>
-    </ul>
-    <b>BATTLES</b>
-    <ul>
-        <li>Fixed Death Stare of Commanders</li>
-        <li>Projectile blitting should be closer to original H3. But still not perfect.</li>
-        <li>Fixed missing Mirth effects</li>
-        <li>Stack affected by Berserk should not try to attack itself</li>
-        <li>Fixed several cases of incorrect positioning of creatures in battles</li>
-        <li>Fixed abilities of Efreet.</li>
-        <li>Fixed broken again palette in some battle backgrounds</li>
-    </ul>
-    <b>TOWN</b>
-    <ul>
-        <li>VCMI will not crash if building selection area is smaller than def</li>
-        <li>Detection of transparency on selection area is closer to H3</li>
-        <li>Improved handling buildings with mode "auto":
-            <ul>
-                <li>they will be properly processed (new creatures will be added if dwelling, spells learned if mage guild, and so on)</li>
-                <li>transitive dependencies are handled (A makes B build, and B makes C and D)</li>
-            </ul>
-        </li>
-    </ul>
-    <b>SOUND</b>
-    <ul>
-        <li>Added missing WoG creature sounds (from Kuririn).</li>
-        <li>The Windows package comes with DLLs needed to play .ogg files</li>
-        <li>(linux) convertMP3 option for vcmibuilder for systems where SDL_Mixer can't play mp3's</li>
-        <li>some missing sounds for battle effects</li>
-    </ul>
-    <b>ARTIFACTS</b>
-    <ul>
-        <li>Several fixes to combined artifacts added via mods.</li>
-        <li>Fixed Spellbinder's Hat giving level 1 spells instead of 5.</li>
-        <li>Fixed incorrect components of Cornucopia.</li>
-        <li>Cheat code with grant all artifacts, including the ones added by mods</li>
-    </ul>
-    <br>
-    
-    <h2>0.92</h2>
-    <b>GENERAL</b>
-    <ul>
-        <li>hero crossover between missions in campaigns</li>
-        <li>introduction before missions in campaigns</li>
-    </ul>
-    <b>MODS</b>
-    <ul>
-        <li>Added CREATURE_SPELL_POWER for commanders</li>
-        <li>Added spell modifiers to various spells: Hypnotize (Astral), Firewall (Luna), Landmine </li>
-        <li>Fixed ENEMY_DEFENCE_REDUCTION, GENERAL_ATTACK_REDUCTION</li>
-        <li>Extended usefulness of ONLY_DISTANCE_FIGHT, ONLY_MELEE_FIGHT ranges</li>
-        <li>Double growth creatures are configurable now</li>
-        <li>Drain Life now has % effect depending on bonus value</li>
-        <li>Stack can use more than 2 attacks. Additional attacks can now be separated as "ONLY_MELEE_FIGHT and "ONLY_DISTANCE_FIGHT".</li>
-        <li>Moat damage configurable</li>
-        <li>More config options for spells:
-            <ul>
-                <li>mind immunity handled by config</li>
-                <li>direct damage immunity handled by config</li>
-                <li>immunity icon configurable</li>
-                <li>removed mind_spell flag</li>
-            </ul>
-        </li>
-        <li>creature config use string ids now.</li>
-        <li>support for string subtype id in short bonus format</li>
-        <li>primary skill identifiers for bonuses</li>
-    </ul>
-    <h2>0.91</h2>
-    <b>GENERAL</b>
-    <ul>
-        <li>VCMI build on OS X is now supported</li>
-        <li>Completely removed autotools</li>
-        <li>Added RMG interace and ability to generate simplest working maps</li>
-        <li>Added loading screen</li>
-    </ul>
-    <b>MODS</b>
-    <ul>
-        <li>Simplified mod structure. Mods from 0.9 will not be compatible.</li>
-        <ul>
-            <li>Mods can be turned on and off in config/modSettings.json file</li>
-            <li>Support for new factions, including:</li>
-        </ul>
-        <li>New towns</li>
-        <li>New hero classes</li>
-        <li>New heroes</li>
-        <li>New town-related external dwellings</li>
-        <ul>
-            <li>Support for new artifact, including combined, commander and stack artifacts</li>
-            <li>Extended configuration options</li>
-        </ul>
-        <li>All game objects are referenced by string identifiers</li>
-        <li>Subtype resolution for bonuses</li>
-    </ul>
-    <b>BATTLES</b>
-    <ul>
-        <li>Support for "enchanted" WoG ability</li>
-    </ul>
-    <b>ADVENTURE AI</b>
-    <ul>
-        <li>AI will try to use Subterranean Gate, Redwood Observatory and Cartographer for exploration</li>
-        <li>Improved exploration algorithm</li>
-        <li>AI will prioritize dwellings and mines when there are no opponents visible</li>
-    </ul>
-</body>
-</html>

+ 0 - 0
client/vcmi.icns → osx/vcmi.icns


+ 0 - 12
osx/vcmi_dsa_public.pem

@@ -1,12 +0,0 @@
------BEGIN PUBLIC KEY-----
-MIIBuDCCASwGByqGSM44BAEwggEfAoGBAPBRGeziJsHw0F7CM9JmSOiIOBmJ4hYl
-dbmdU1iJR7XHX5lZIUOl323cCANhzOogVAzkvEVhFedA6H4iO6VRt7nTJSgLA4hO
-gMqMJGKp4bDQIwupUK5xQUUcaXumT03Aj8jzzibW9YjNB8NeuSSMfMi5KGZw5pkf
-nSvZM0TUVVX/AhUA74nJWqRFwUPc6aPGCOgfsRzPYMsCgYEApYMP5/tIr4yrqHVM
-xHLj1s+Y/Zgs3+kRqudTLgYE20Br3Tmmi2ejM9phrEHn5mv6Ss/FYyWqKxdtzCEN
-PjRA/JkKMpoX+sy/S3OE/NrrnikVjCRvgOJcM6FPt9iaENRqjz20dZMIq42vqeE9
-K5u1XJ/YtiwU2b1fX0nNtREhjUwDgYUAAoGBAJT2cMQ2qTGecdNIjEByCFMZpWg0
-nV+jKgpthNUahwxbUN3ru9nrWMUNv1pBiS3pxqFV6ec7qozKnedwyTx+IRJXTN4T
-IrxYsgPJDHhkBeoVVAkacihkLUtwPSphorZWF4OMFmrlc5WsmYt2lEahR2TZGQrW
-5GBNP18/S/nDBe7j
------END PUBLIC KEY-----

+ 0 - 1
server/CMakeLists.txt

@@ -39,7 +39,6 @@ endif()
 vcmi_set_output_dir(vcmiserver "")
 
 set_target_properties(vcmiserver PROPERTIES ${PCH_PROPERTIES})
-set_target_properties(vcmiserver PROPERTIES XCODE_ATTRIBUTE_LD_RUNPATH_SEARCH_PATHS "@executable_path/../Frameworks @executable_path/")
 cotire(vcmiserver)
 
 if(NOT APPLE) # Already inside vcmiclient bundle

+ 1 - 1
test/CMakeLists.txt

@@ -38,7 +38,7 @@ set(mock_HEADERS
     mock/mock_UnitHealthInfo.h
 )
 
-add_subdirectory(googletest EXCLUDE_FROM_ALL)
+add_subdirectory_with_folder("3rdparty" googletest EXCLUDE_FROM_ALL)
 
 add_executable(vcmitest ${test_SRCS} ${test_HEADERS} ${mock_HEADERS} ${GTestSrc}/src/gtest-all.cc ${GMockSrc}/src/gmock-all.cc)
 target_link_libraries(vcmitest vcmi ${RT_LIB} ${DL_LIB})