Fix build for windows + other small fixes qmlfrontend
authorunC0Rr
Wed, 02 Dec 2015 13:39:16 +0300
branchqmlfrontend
changeset 11439 dd1350a475d9
parent 11438 1a6148b4de3b
child 11440 330c14f4ba69
Fix build for windows + other small fixes
hedgewars/ArgParsers.pas
qmlFrontend/CMakeLists.txt
qmlFrontend/hwengine.cpp
--- a/hedgewars/ArgParsers.pas	Tue Dec 01 23:40:38 2015 +0300
+++ b/hedgewars/ArgParsers.pas	Wed Dec 02 13:39:16 2015 +0300
@@ -23,10 +23,15 @@
 
 procedure GetParams;
 {$IFDEF HWLIBRARY}
+{$IFDEF WIN32} // FIXME: what is the correct condition?
+var operatingsystem_parameter_argc: LongInt; external;
+    operatingsystem_parameter_argv: pointer; external;
+    operatingsystem_parameter_envp: pointer; external;
+{$ELSE}
 var operatingsystem_parameter_argc: LongInt = 0; export;
     operatingsystem_parameter_argv: pointer = nil; export;
     operatingsystem_parameter_envp: pointer = nil; export;
-
+{$ENDIF}
 function ParamCount: LongInt;
 function ParamStr(i: LongInt): shortstring;
 {$ENDIF}
--- a/qmlFrontend/CMakeLists.txt	Tue Dec 01 23:40:38 2015 +0300
+++ b/qmlFrontend/CMakeLists.txt	Wed Dec 02 13:39:16 2015 +0300
@@ -24,3 +24,4 @@
 include_directories(${OPENGL_INCLUDE_DIR})
 
 target_link_libraries(hedgewars Qt5::Core Qt5::Gui Qt5::Quick Qt5::Qml)
+install(PROGRAMS "${EXECUTABLE_OUTPUT_PATH}/hedgewars${CMAKE_EXECUTABLE_SUFFIX}" DESTINATION ${target_binary_install_dir})
--- a/qmlFrontend/hwengine.cpp	Tue Dec 01 23:40:38 2015 +0300
+++ b/qmlFrontend/hwengine.cpp	Wed Dec 02 13:39:16 2015 +0300
@@ -50,7 +50,11 @@
 {
     qRegisterMetaType<MessageType>("MessageType");
 
+#ifdef Q_OS_WIN    
+    QLibrary hwlib("./libhwengine.dll");
+#else
     QLibrary hwlib("./libhwengine.so");
+#endif
 
     if(!hwlib.load())
         qWarning() << "Engine library not found" << hwlib.errorString();