- fixes for cmake build - it works + changes in build script - still not finished

This commit is contained in:
dmytro.bogovych 2020-03-28 19:23:05 +02:00
parent ff16422a8b
commit 7ffdbcfee9
5 changed files with 48 additions and 35 deletions

View File

@ -21,6 +21,7 @@ set (CMAKE_INCLUDE_CURRENT_DIR ON)
# Instruct CMake to run moc automatically when needed. # Instruct CMake to run moc automatically when needed.
set (CMAKE_AUTOMOC ON) set (CMAKE_AUTOMOC ON)
set (CMAKE_AUTORCC ON)
set (CMAKE_INCLUDE_CURRENT_DIR ON) set (CMAKE_INCLUDE_CURRENT_DIR ON)
# Instruct CMake to run uic automatically when needed. # Instruct CMake to run uic automatically when needed.
@ -61,9 +62,9 @@ set (SOURCES
openorcreatedb_widget.cpp openorcreatedb_widget.cpp
passworddlg.cpp passworddlg.cpp
preferencesdlg.cpp preferencesdlg.cpp
qrc_mainwindow.cpp #qrc_mainwindow.cpp
qrc_media.cpp #qrc_media.cpp
qrc_style.cpp #qrc_style.cpp
settings.cpp settings.cpp
startworkdialog.cpp startworkdialog.cpp
stopworkdialog.cpp stopworkdialog.cpp
@ -97,7 +98,7 @@ set (HEADERS
initial_ui.h initial_ui.h
logger.h logger.h
mainwindow.h mainwindow.h
moc_predefs.h #moc_predefs.h
newpassworddlg.h newpassworddlg.h
openorcreatedb_widget.h openorcreatedb_widget.h
passworddlg.h passworddlg.h
@ -204,7 +205,6 @@ endif()
# List resources # List resources
qt5_add_resources(UI_RESOURCES resources/qdarkstyle/style.qrc) qt5_add_resources(UI_RESOURCES resources/qdarkstyle/style.qrc)
# Global defines # Global defines
add_definitions(-DQTKEYCHAIN_NO_EXPORT -DSQLITE_HAS_CODEC -DSQLITE_OMIT_LOAD_EXTENSION) add_definitions(-DQTKEYCHAIN_NO_EXPORT -DSQLITE_HAS_CODEC -DSQLITE_OMIT_LOAD_EXTENSION)
@ -232,7 +232,9 @@ add_executable(${EXE_NAME}
${UI_RESOURCES} ${UI_RESOURCES}
${MACOS_ICON_FILE} ${MACOS_ICON_FILE}
${RESOURCE_FILES} ${RESOURCE_FILES}
${WINDOWS_RESOURCE_PATH}) ${WINDOWS_RESOURCE_PATH}
mainwindow.qrc
)
message("OpenSSL include: ${OPENSSL_INCLUDE}") message("OpenSSL include: ${OPENSSL_INCLUDE}")
@ -254,7 +256,7 @@ if (TARGET_OSX)
set_target_properties( ${EXE_NAME} PROPERTIES MACOSX_BUNDLE_LONG_VERSION_STRING "0.7.8") set_target_properties( ${EXE_NAME} PROPERTIES MACOSX_BUNDLE_LONG_VERSION_STRING "0.7.8")
set_target_properties( ${EXE_NAME} PROPERTIES MACOSX_BUNDLE TRUE set_target_properties( ${EXE_NAME} PROPERTIES MACOSX_BUNDLE TRUE
MACOSX_BUNDLE_GUI_IDENTIFIER "biz.sevana.hasq" MACOSX_BUNDLE_GUI_IDENTIFIER "com.satorilight.litt"
RESOURCE "${RESOURCE_FILES}") RESOURCE "${RESOURCE_FILES}")
endif() endif()

View File

@ -1,2 +1,2 @@
// Auto generated file ! Please do not edit ! // Auto generated file ! Please do not edit !
#define APP_BUILD_NUMBER 41 #define APP_BUILD_NUMBER 53

View File

@ -1,4 +1,4 @@
#import "Config.h" #import "config.h"
#import "hidtrackerimpl_osx.h" #import "hidtrackerimpl_osx.h"
#include <CoreFoundation/CoreFoundation.h> #include <CoreFoundation/CoreFoundation.h>
#include <Cocoa/Cocoa.h> #include <Cocoa/Cocoa.h>
@ -17,7 +17,7 @@ HIDTrackerImplOSX::~HIDTrackerImplOSX()
bool HIDTrackerImplOSX::isPossible() bool HIDTrackerImplOSX::isPossible()
{ {
if (AXIsProcessTrustedWithOptions != NULL) if (AXIsProcessTrustedWithOptions != nullptr)
{ {
// 10.9 and later // 10.9 and later
const void * keys[] = { kAXTrustedCheckOptionPrompt }; const void * keys[] = { kAXTrustedCheckOptionPrompt };

View File

@ -1,13 +1,13 @@
##!/usr/bin/sh ##!/usr/bin/sh
# Make build or upload existing # Make build or upload existing
MAKEBUILD=YES MAKE_BUILD=YES
# Prepare publishing # Prepare publishing
PREPAREPUBLISH=YES PREPARE_PUBLISH=YES
# Upload build or no # Upload build or no
PUBLISHBUILD=YES PUBLISH_BUILD=YES
# Codesign id # Codesign id
SIGNID="Developer ID Application: Dmytro Bogovych (563QRB9S29)" SIGNID="Developer ID Application: Dmytro Bogovych (563QRB9S29)"
@ -15,31 +15,42 @@ SIGNID="Developer ID Application: Dmytro Bogovych (563QRB9S29)"
# Default values only - no need to change every run # Default values only - no need to change every run
ZIPBUILD=Litt-osx-0.9.2.dmg ZIPBUILD=Litt-osx-0.9.2.dmg
DMGBUILD=Litt-osx-0.9.2.dmg DMGBUILD=Litt-osx-0.9.2.dmg
# Find version
cd ../client cd ../client
version=`less chooka.pro | grep "VERSION =" | cut -d' ' -f 3` version=`less chooka.pro | grep "VERSION =" | cut -d' ' -f 3`
if [ "$MAKEBUILD" = "YES" ]; then echo "Found version: $version"
if [ "$MAKE_BUILD" = "YES" ]; then
# qmake # qmake
echo Remove old build echo Remove old build
rm -rf Litt.app rm -rf build
rm -rf *.o mkdir build
rm -rf Makefile
echo Running qmake echo Running cmake
QT_BINARY_DIR=/Users/anand/qt/5.12.2/clang_64/bin QT_BINARY_DIR=/Users/anand/qt/5.12.2/clang_64/bin
$QT_BINARY_DIR/qmake chooka.pro cd build
QT_CMAKE_DIR=~/qt/5.12.2/clang_64/lib/cmake
cmake .. -D Qt5Core_DIR=$QT_CMAKE_DIR/Qt5Core \
-D Qt5Widgets_DIR=$QT_CMAKE_DIR/Qt5Widgets \
-D Qt5PrintSupport_DIR=$QT_CMAKE_DIR/Qt5PrintSupport \
-D Qt5Network_DIR=$QT_CMAKE_DIR/Qt5Network \
-D Qt5OpenGL_DIR=$QT_CMAKE_DIR/Qt5OpenGL \
-D Qt5LinguistTools_DIR=$QT_CMAKE_DIR/Qt5LinguistTools
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
echo "qmake failed. Exiting." echo "cmake failed. Exiting."
exit exit
fi fi
echo Building
make clean cmake --build .
make
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
echo "make failed. Exiting." echo "cmake build failed. Exiting."
exit exit
fi fi
echo Deploying Qt libraries echo Deploying Qt libraries
$QT_BINARY_DIR/macdeployqt Litt.app -codesign="$SIGNID" $QT_BINARY_DIR/macdeployqt Litt.app -codesign="$SIGNID"
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
@ -49,21 +60,21 @@ if [ "$MAKEBUILD" = "YES" ]; then
echo "Codesign is skipped for now, please purchase a Apple developer subscription!" echo "Codesign is skipped for now, please purchase a Apple developer subscription!"
#codesign -s $CODESIGN Litt.app #codesign -s $CODESIGN Litt.app
mkdir Chooka.app/Contents/Resources # mkdir Chooka.app/Contents/Resources
echo Cleaning object files # echo Cleaning object files
rm -rf *.o #rm -rf *.o
rm -rf Makefile # rm -rf Makefile
zip -r ../Litt.zip Litt.app zip -r ../../Litt.zip Litt.app
# Rename zip file # Rename zip file
mv ../Litt.zip ../Litt-osx-$version.zip mv ../../Litt.zip ../../Litt-osx-$version.zip
ZIPBUILD=Litt-osx-$version.zip ZIPBUILD=Litt-osx-$version.zip
echo Prepare DMG file echo Prepare DMG file
cd ../redist cd ../../
dmgbuild -s dmgsettings.py "Litt application" ../Litt-osx-$version.dmg dmgbuild -s redist/dmgsettings.py "Litt application" Litt-osx-$version.dmg
DMGBUILD=Litt-osx-$version.dmg DMGBUILD=Litt-osx-$version.dmg
fi fi
@ -71,7 +82,7 @@ exit
cd ../client cd ../client
if [ "$PREPAREPUBLISH" = "YES" ]; then if [ "$PREPARE_PUBLISH" = "YES" ]; then
# Updating release notes file & application cast file # Updating release notes file & application cast file
../redist/updater.py -v $version -d ../$DMGBUILD -r ../site/releasenotes.html -c ../redist/changes.html -a ../site/LittAppCast.xml ../redist/updater.py -v $version -d ../$DMGBUILD -r ../site/releasenotes.html -c ../redist/changes.html -a ../site/LittAppCast.xml
@ -87,7 +98,7 @@ if [ "$PREPAREPUBLISH" = "YES" ]; then
fi fi
UPLOAD_ROLE=root@voipobjects.com UPLOAD_ROLE=root@voipobjects.com
if [ "$PUBLISHBUILD" = "YES" ]; then if [ "$PUBLISH_BUILD" = "YES" ]; then
# Copy to server # Copy to server
echo Copying files... echo Copying files...
scp ../$DMGBUILD $UPLOAD_ROLE:/var/www/satorilight.com/public_html/downloads scp ../$DMGBUILD $UPLOAD_ROLE:/var/www/satorilight.com/public_html/downloads

View File

@ -1,4 +1,4 @@
files=[ '../client/Litt.app' ] files=[ 'client/build/Litt.app' ]
symlinks={ 'Applications': '/Applications' } symlinks={ 'Applications': '/Applications' }
volume_name='Litt application' volume_name='Litt application'
format='UDZO' format='UDZO'