- 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.
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()

View File

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

View File

@ -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,31 +15,42 @@ 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"
if [ $? -ne 0 ]; then
@ -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

View File

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