diff --git a/client/CMakeLists.txt b/client/CMakeLists.txt index fd6f465..8cf816f 100644 --- a/client/CMakeLists.txt +++ b/client/CMakeLists.txt @@ -21,6 +21,7 @@ set (CMAKE_INCLUDE_CURRENT_DIR ON) # Instruct CMake to run moc automatically when needed. set (CMAKE_AUTOMOC ON) +set (CMAKE_AUTORCC ON) set (CMAKE_INCLUDE_CURRENT_DIR ON) # Instruct CMake to run uic automatically when needed. @@ -61,9 +62,9 @@ set (SOURCES openorcreatedb_widget.cpp passworddlg.cpp preferencesdlg.cpp - qrc_mainwindow.cpp - qrc_media.cpp - qrc_style.cpp + #qrc_mainwindow.cpp + #qrc_media.cpp + #qrc_style.cpp settings.cpp startworkdialog.cpp stopworkdialog.cpp @@ -97,7 +98,7 @@ set (HEADERS initial_ui.h logger.h mainwindow.h - moc_predefs.h + #moc_predefs.h newpassworddlg.h openorcreatedb_widget.h passworddlg.h @@ -204,7 +205,6 @@ endif() # List resources qt5_add_resources(UI_RESOURCES resources/qdarkstyle/style.qrc) - # Global defines add_definitions(-DQTKEYCHAIN_NO_EXPORT -DSQLITE_HAS_CODEC -DSQLITE_OMIT_LOAD_EXTENSION) @@ -232,7 +232,9 @@ add_executable(${EXE_NAME} ${UI_RESOURCES} ${MACOS_ICON_FILE} ${RESOURCE_FILES} - ${WINDOWS_RESOURCE_PATH}) + ${WINDOWS_RESOURCE_PATH} + mainwindow.qrc + ) 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 TRUE - MACOSX_BUNDLE_GUI_IDENTIFIER "biz.sevana.hasq" + MACOSX_BUNDLE_GUI_IDENTIFIER "com.satorilight.litt" RESOURCE "${RESOURCE_FILES}") endif() diff --git a/client/build-number/build_number.h b/client/build-number/build_number.h index cc6df39..4c1053c 100644 --- a/client/build-number/build_number.h +++ b/client/build-number/build_number.h @@ -1,2 +1,2 @@ // Auto generated file ! Please do not edit ! -#define APP_BUILD_NUMBER 41 \ No newline at end of file +#define APP_BUILD_NUMBER 53 \ No newline at end of file diff --git a/client/platforms/osx/hidtrackerimpl_osx.mm b/client/platforms/osx/hidtrackerimpl_osx.mm index 699729a..aeb265f 100644 --- a/client/platforms/osx/hidtrackerimpl_osx.mm +++ b/client/platforms/osx/hidtrackerimpl_osx.mm @@ -1,4 +1,4 @@ -#import "Config.h" +#import "config.h" #import "hidtrackerimpl_osx.h" #include #include @@ -17,7 +17,7 @@ HIDTrackerImplOSX::~HIDTrackerImplOSX() bool HIDTrackerImplOSX::isPossible() { - if (AXIsProcessTrustedWithOptions != NULL) + if (AXIsProcessTrustedWithOptions != nullptr) { // 10.9 and later const void * keys[] = { kAXTrustedCheckOptionPrompt }; diff --git a/redist/build_osx_qt5.sh b/redist/build_osx_qt5.sh index c6ae54f..9e707a8 100755 --- a/redist/build_osx_qt5.sh +++ b/redist/build_osx_qt5.sh @@ -1,13 +1,13 @@ ##!/usr/bin/sh # Make build or upload existing -MAKEBUILD=YES +MAKE_BUILD=YES # Prepare publishing -PREPAREPUBLISH=YES +PREPARE_PUBLISH=YES # Upload build or no -PUBLISHBUILD=YES +PUBLISH_BUILD=YES # Codesign id SIGNID="Developer ID Application: Dmytro Bogovych (563QRB9S29)" @@ -15,30 +15,41 @@ SIGNID="Developer ID Application: Dmytro Bogovych (563QRB9S29)" # Default values only - no need to change every run ZIPBUILD=Litt-osx-0.9.2.dmg DMGBUILD=Litt-osx-0.9.2.dmg + +# Find version cd ../client version=`less chooka.pro | grep "VERSION =" | cut -d' ' -f 3` -if [ "$MAKEBUILD" = "YES" ]; then +echo "Found version: $version" + +if [ "$MAKE_BUILD" = "YES" ]; then # qmake echo Remove old build - rm -rf Litt.app - rm -rf *.o - rm -rf Makefile + rm -rf build + mkdir build - echo Running qmake + echo Running cmake 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 - echo "qmake failed. Exiting." + echo "cmake failed. Exiting." exit fi - echo Building - make clean - make + + cmake --build . if [ $? -ne 0 ]; then - echo "make failed. Exiting." + echo "cmake build failed. Exiting." exit fi + echo Deploying Qt libraries $QT_BINARY_DIR/macdeployqt Litt.app -codesign="$SIGNID" @@ -49,21 +60,21 @@ if [ "$MAKEBUILD" = "YES" ]; then echo "Codesign is skipped for now, please purchase a Apple developer subscription!" #codesign -s $CODESIGN Litt.app - mkdir Chooka.app/Contents/Resources + # mkdir Chooka.app/Contents/Resources - echo Cleaning object files - rm -rf *.o - rm -rf Makefile + # echo Cleaning object files + #rm -rf *.o + # rm -rf Makefile - zip -r ../Litt.zip Litt.app + zip -r ../../Litt.zip Litt.app # Rename zip file - mv ../Litt.zip ../Litt-osx-$version.zip + mv ../../Litt.zip ../../Litt-osx-$version.zip ZIPBUILD=Litt-osx-$version.zip echo Prepare DMG file - cd ../redist - dmgbuild -s dmgsettings.py "Litt application" ../Litt-osx-$version.dmg + cd ../../ + dmgbuild -s redist/dmgsettings.py "Litt application" Litt-osx-$version.dmg DMGBUILD=Litt-osx-$version.dmg fi @@ -71,7 +82,7 @@ exit cd ../client -if [ "$PREPAREPUBLISH" = "YES" ]; then +if [ "$PREPARE_PUBLISH" = "YES" ]; then # 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 @@ -87,7 +98,7 @@ if [ "$PREPAREPUBLISH" = "YES" ]; then fi UPLOAD_ROLE=root@voipobjects.com -if [ "$PUBLISHBUILD" = "YES" ]; then +if [ "$PUBLISH_BUILD" = "YES" ]; then # Copy to server echo Copying files... scp ../$DMGBUILD $UPLOAD_ROLE:/var/www/satorilight.com/public_html/downloads diff --git a/redist/dmgsettings.py b/redist/dmgsettings.py index 8746246..d4d3424 100644 --- a/redist/dmgsettings.py +++ b/redist/dmgsettings.py @@ -1,4 +1,4 @@ -files=[ '../client/Litt.app' ] +files=[ 'client/build/Litt.app' ] symlinks={ 'Applications': '/Applications' } volume_name='Litt application' format='UDZO'