Skip to content

Commit 00a3502

Browse files
committed
Merge pull request woodenshark#47 from psieg/osx
OS X build adaptations
2 parents 64cf1fc + 47dd2bf commit 00a3502

File tree

5 files changed

+43
-17
lines changed

5 files changed

+43
-17
lines changed

.travis.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
language: cpp
2+
#language: objective-c
3+
4+
notifications:
5+
email: false
6+
7+
os:
8+
- osx
9+
10+
before_install:
11+
- brew update
12+
- brew install qt5
13+
- export QTDIR=/usr/local/opt/qt5/
14+
- export PATH=$PATH:$QTDIR/bin
15+
- export VERSION=`cat Software/VERSION`
16+
- qmake -v
17+
18+
script:
19+
- export QMAKE_MAC_SDK=macosx10.8
20+
- cd Software
21+
- ./update_locales.sh
22+
- qmake -r
23+
- make
24+
- macdeployqt bin/Prismatik.app -dmg
25+
- ls bin
26+
- curl -T bin/Prismatik.dmg "https://psieg.de/lightpack/osx_builds/Prismatik_${VERSION}_${TRAVIS_BUILD_NUMBER}.dmg" -u "${PSIEG_UPLOAD_USER}:${PSIEG_UPLOAD_PASSWORD}"

Software/build-vars.prf.default

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ win32: {
2121
TARGET_ARCH = x86_64
2222
}
2323

24+
# For Qt lrelease reasons, to change the MAC SDK, you have to edit src.pro directly
25+
# When using variables, lrelease complains about QMAKE_MAC_SDK not being set
2426
# You can override QMAKE_MAC_SDK value by setting this variable.
2527
# macx {
2628
# QMAKE_MAC_SDK_OVERRIDE = macosx10.8

Software/src/src.pro

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,6 @@ TRANSLATIONS += ../res/translations/ru_RU.ts \
5050
RESOURCES = ../res/LightpackResources.qrc
5151
RC_FILE = ../res/Lightpack.rc
5252

53-
# Generate .qm language files
54-
system($$[QT_INSTALL_BINS]/lrelease src.pro)
55-
5653
include(../build-config.prf)
5754

5855
# Grabber types configuration
@@ -172,20 +169,25 @@ macx{
172169

173170
QMAKE_INFO_PLIST = ./Info.plist
174171

175-
isEmpty( QMAKE_MAC_SDK_OVERRIDE ) {
176-
# Default value
177-
# For build universal binaries (native on Intel and PowerPC)
178-
QMAKE_MAC_SDK = macosx10.9
179-
} else {
180-
message( "Overriding default QMAKE_MAC_SDK with value $${QMAKE_MAC_SDK_OVERRIDE}" )
181-
QMAKE_MAC_SDK = $${QMAKE_MAC_SDK_OVERRIDE}
182-
}
172+
#see build-vars.prf
173+
#isEmpty( QMAKE_MAC_SDK_OVERRIDE ) {
174+
# # Default value
175+
# # For build universal binaries (native on Intel and PowerPC)
176+
# QMAKE_MAC_SDK = macosx10.9
177+
#} else {
178+
# message( "Overriding default QMAKE_MAC_SDK with value $${QMAKE_MAC_SDK_OVERRIDE}" )
179+
# QMAKE_MAC_SDK = $${QMAKE_MAC_SDK_OVERRIDE}
180+
#}
183181

184182
CONFIG(clang) {
185-
QMAKE_CXXFLAGS += -mmacosx-version-min=10.6 -stdlib=libstdc++ -x objective-c++
183+
QMAKE_CXXFLAGS += -mmacosx-version-min=10.6 -x objective-c++
186184
}
187185
}
188186

187+
# Generate .qm language files
188+
QMAKE_MAC_SDK = macosx10.9
189+
system($$[QT_INSTALL_BINS]/lrelease src.pro)
190+
189191
INCLUDEPATH += . \
190192
.. \
191193
./hidapi \

Software/update_locales.bat

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,5 @@ echo.
2525

2626
echo.
2727

28-
pause
29-
3028
exit 0
3129

Software/update_locales.sh

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ echo "================================================="
2929
echo "Updating translation files for Lightpack project:"
3030
echo
3131
lupdate $1 src/src.pro
32+
echo "done"
3233

3334
echo
3435
echo "==========================================================="
@@ -37,9 +38,6 @@ echo
3738
lrelease src/src.pro
3839

3940
echo
40-
echo Press enter to exit...
41-
42-
read
4341

4442
exit 0
4543

0 commit comments

Comments
 (0)