diff options
| author | Felix Queißner <git@mq32.de> | 2020-06-30 10:19:26 -0700 |
|---|---|---|
| committer | Felix Queißner <git@mq32.de> | 2020-06-30 10:19:26 -0700 |
| commit | ef6e2f513cde84fcd86795259830df364d5994b2 (patch) | |
| tree | 1e7631008824e5d1195e98b92f30ef4500ac41d8 | |
| parent | 16a4956a298e36e118478cef7359c6acb87e77f0 (diff) | |
| download | kristall-ef6e2f513cde84fcd86795259830df364d5994b2.tar.gz | |
Makes windows build possible.
| -rw-r--r-- | ci/.gitignore | 6 | ||||
| -rw-r--r-- | ci/7z/7za.dll | bin | 0 -> 381952 bytes | |||
| -rw-r--r-- | ci/7z/7za.exe | bin | 0 -> 1152000 bytes | |||
| -rw-r--r-- | ci/7z/7zxa.dll | bin | 0 -> 209408 bytes | |||
| -rw-r--r-- | ci/7z/License.txt | 31 | ||||
| -rw-r--r-- | ci/build-and-deploy.bat | 39 | ||||
| -rw-r--r-- | src/kristall.pro | 10 |
7 files changed, 83 insertions, 3 deletions
diff --git a/ci/.gitignore b/ci/.gitignore index b97a986..17c6c2d 100644 --- a/ci/.gitignore +++ b/ci/.gitignore @@ -1,2 +1,4 @@ -build/ -output/ +build/
+output/
+kristall/
+kristall-nightly.zip
\ No newline at end of file diff --git a/ci/7z/7za.dll b/ci/7z/7za.dll Binary files differnew file mode 100644 index 0000000..bc2b47a --- /dev/null +++ b/ci/7z/7za.dll diff --git a/ci/7z/7za.exe b/ci/7z/7za.exe Binary files differnew file mode 100644 index 0000000..9f27b20 --- /dev/null +++ b/ci/7z/7za.exe diff --git a/ci/7z/7zxa.dll b/ci/7z/7zxa.dll Binary files differnew file mode 100644 index 0000000..d51e3f0 --- /dev/null +++ b/ci/7z/7zxa.dll diff --git a/ci/7z/License.txt b/ci/7z/License.txt new file mode 100644 index 0000000..e5d33d7 --- /dev/null +++ b/ci/7z/License.txt @@ -0,0 +1,31 @@ + 7-Zip Extra
+ ~~~~~~~~~~~
+ License for use and distribution
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+ Copyright (C) 1999-2019 Igor Pavlov.
+
+ 7-Zip Extra files are under the GNU LGPL license.
+
+
+ Notes:
+ You can use 7-Zip Extra on any computer, including a computer in a commercial
+ organization. You don't need to register or pay for 7-Zip.
+
+
+ GNU LGPL information
+ --------------------
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You can receive a copy of the GNU Lesser General Public License from
+ http://www.gnu.org/
+
diff --git a/ci/build-and-deploy.bat b/ci/build-and-deploy.bat new file mode 100644 index 0000000..40825fe --- /dev/null +++ b/ci/build-and-deploy.bat @@ -0,0 +1,39 @@ +@ECHO OFF
+
+REM This script builds Kristall for windows and creates a deployment
+
+SET "DEPLOY=%CD%\kristall"
+SET "ROOT=%CD%"
+CALL "C:\Qt\5.15.0\mingw81_64\bin\qtenv2.bat"
+CD /D "%ROOT%"
+
+IF NOT EXIST build MKDIR build || GOTO ERR
+CD build || GOTO ERR
+
+ECHO Compiling...
+qmake ..\..\src\kristall.pro || GOTO ERR
+mingw32-make || GOTO ERR
+cd ..
+
+RMDIR /S /Q "%DEPLOY%" || GOTO ERR
+MKDIR "%DEPLOY%" || GOTO ERR
+
+ECHO Deployment...
+COPY build\release\kristall.exe "%DEPLOY%\kristall.exe" || GOTO ERR
+COPY "C:\Qt\Tools\OpenSSL\Win_x64\bin\libcrypto-1_1-x64.dll" "%DEPLOY%\libcrypto-1_1-x64.dll" || GOTO ERR
+COPY "C:\Qt\Tools\OpenSSL\Win_x64\bin\libssl-1_1-x64.dll" "%DEPLOY%\libssl-1_1-x64.dll" || GOTO ERR
+
+windeployqt %DEPLOY%\kristall.exe || GOTO ERR
+
+CD "%ROOT% || GOTO ERR
+
+ECHO Creating package...
+DEL /Q kristall-nightly.zip || GOTO ERR
+.\7z\7za.exe a kristall-nightly.zip %DEPLOY% || GOTO ERR
+
+EXIT /B 0
+
+:ERR
+ECHO There was a error building kristall!
+PAUSE
+EXIT /B 1
\ No newline at end of file diff --git a/src/kristall.pro b/src/kristall.pro index d860340..917c212 100644 --- a/src/kristall.pro +++ b/src/kristall.pro @@ -16,7 +16,7 @@ DEFINES += KRISTALL_VERSION="\"$(shell cd $$PWD; git describe --tags)\"" # You can also select to disable deprecated APIs only up to a certain version of Qt. #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 -LIBS += -lcrypto +!win32: LIBS += -lcrypto # We need iconv on non-linux platforms !linux: LIBS += -liconv @@ -29,6 +29,7 @@ QMAKE_CXXFLAGS += -std=c++17 CONFIG += c++17 win32-msvc { + # message("Use windows/msvc build") QMAKE_CFLAGS -= -Wno-unused-parameter QMAKE_CXXFLAGS -= -Wno-unused-parameter @@ -39,6 +40,13 @@ win32-msvc { INCLUDEPATH += "C:\Program Files\OpenSSL\include" } +win32-g++ { + # message("Use windows/mingw build") + INCLUDEPATH += $$quote("C:\Qt\Tools\OpenSSL\Win_x64\include") + LIBS += -L$$quote(C:\Qt\Tools\OpenSSL\Win_x64\lib) + LIBS += -llibcrypto +} + android: include(/home/felix/projects/android-hass/android-sdk/android_openssl/openssl.pri) # android { |
