diff --git a/CMakeLists.txt b/CMakeLists.txt index 64aaadc5e..b527362b1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -103,6 +103,12 @@ endif() IF (NOT WIN32) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC") +else() +set(CMAKE_WIN32_EXECUTABLE ON) +set(GUI_TYPE WIN32) +set(CMAKE_BUILD_TYPE "Release") +### Embedd Icon to Plotjuggler.exe +set(BACKWARD_ENABLE ${BACKWARD_ENABLE} ../../Plotjuggler.rc) ENDIF() find_package(ZMQ) diff --git a/Plotjuggler.rc b/Plotjuggler.rc new file mode 100644 index 000000000..194486e0f --- /dev/null +++ b/Plotjuggler.rc @@ -0,0 +1 @@ +IDI_ICON1 ICON DISCARDABLE "plotjuggler.ico" diff --git a/installer/config.xml b/installer/config.xml index 7b23cf678..2f3ec3f02 100644 --- a/installer/config.xml +++ b/installer/config.xml @@ -1,10 +1,12 @@ - PlotJuggler - 2.1.4 - PlotJuggler installer - Davide Faconti - Applications - @ApplicationsDir@/PlotJuggler + PlotJuggler + 3.0.7 + PlotJuggler installer + Davide Faconti + PlotJuggler + @ApplicationsDirX64@/PlotJuggler + true + @TargetDir@/PlotJuggler diff --git a/installer/io.plotjuggler.application/meta/installscript.qs b/installer/io.plotjuggler.application/meta/installscript.qs index b905bfc30..7e3932390 100644 --- a/installer/io.plotjuggler.application/meta/installscript.qs +++ b/installer/io.plotjuggler.application/meta/installscript.qs @@ -45,6 +45,12 @@ Component.prototype.createOperations = function() try { // call the base create operations function component.createOperations(); + if (systemInfo.productType === "windows") { + component.addOperation("CreateShortcut", "@TargetDir@/PlotJuggler.exe", "@StartMenuDir@/PlotJuggler.lnk", + "workingDirectory=@TargetDir@", "iconId=0", "description=Launch PlotJuggler"); + component.addOperation("CreateShortcut", "@TargetDir@/PlotJuggler.exe", "@DesktopDir@/PlotJuggler.lnk", + "workingDirectory=@TargetDir@", "iconId=0", "description=Launch PlotJuggler"); + } } catch (e) { console.log(e); } diff --git a/installer/io.plotjuggler.application/meta/package.xml b/installer/io.plotjuggler.application/meta/package.xml index 7e41adb12..6d5445954 100644 --- a/installer/io.plotjuggler.application/meta/package.xml +++ b/installer/io.plotjuggler.application/meta/package.xml @@ -2,8 +2,8 @@ PlotJuggler Main App Install PlotJuggler with basic plugins. - 2.1.5 - 2019-02-25 + 3.0.7 + 2021-01-28 diff --git a/plotjuggler.ico b/plotjuggler.ico new file mode 100644 index 000000000..147942907 Binary files /dev/null and b/plotjuggler.ico differ diff --git a/win32build.bat b/win32build.bat new file mode 100644 index 000000000..20b89bc68 --- /dev/null +++ b/win32build.bat @@ -0,0 +1,63 @@ +@echo off +cd %~dp0 +SET MINGW_PATH=C:/Qt/Tools/mingw730_64/bin +SET CMAKE_PATH=C:/Qt/Tools/CMake_64/bin +SET CMAKE_PREFIX_PATH=C:/Qt/5.12.10/mingw73_64 +SET PATH=%MINGW_PATH%;%CMAKE_PATH%;%PATH% +SET CMAKE_C_COMPILER=%MINGW_PATH%/gcc.exe +SET CMAKE_CXX_COMPILER=%MINGW_PATH%/g++.exe + +CLS +:MENU +CLS + +ECHO == PLOTJUGGLER BUILDER FOR WINDOWS == +ECHO ------------------------------------- +ECHO 1. COMPILE +ECHO 2. CREATE INSTALLER +ECHO 3. CLEAR BULD FOLDER +ECHO ------------------------------------- +ECHO ==========PRESS 'Q' TO QUIT========== +ECHO. + +SET INPUT= +SET /P INPUT=Please select a number: + +IF /I '%INPUT%'=='1' GOTO Selection1 +IF /I '%INPUT%'=='2' GOTO Selection2 +IF /I '%INPUT%'=='3' GOTO Selection3 +IF /I '%INPUT%'=='Q' GOTO Quit + +CLS +GOTO MENU + +:Selection1 +mkdir build +cd build +cmake -S ".." -G "MinGW Makefiles" +make -j -l 8 +PAUSE +GOTO MENU + +:Selection2 +RMDIR /S /Q %~dp0\installer\io.plotjuggler.application\data +%CMAKE_PREFIX_PATH%\bin\windeployqt.exe --release --dir %~dp0\installer\io.plotjuggler.application\data %~dp0\build\bin\PlotJuggler.exe +xcopy %~dp0\build\bin\*.* %~dp0\installer\io.plotjuggler.application\data /Y /S /f /z +C:\Qt\Tools\QtInstallerFramework\4.0\bin\binarycreator.exe --offline-only -c %~dp0\installer\config.xml -p %~dp0\installer %~dp0\PlotJugglerInstaller.exe +PAUSE +GOTO MENU + +:Selection3 +RMDIR /S /Q build +PAUSE +GOTO MENU + +:Quit +CLS + +ECHO ==============THANKYOU=============== +ECHO ------------------------------------- +ECHO ======PRESS ANY KEY TO CONTINUE====== + +PAUSE>NUL +EXIT