mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-02-13 08:08:42 +00:00
Add macOS builds to AppVeyor
This replaces macOS builds in Travis-ci deprecated
by e46f854b52
This commit is contained in:
@@ -9,12 +9,9 @@ language: cpp
|
||||
|
||||
cache:
|
||||
directories:
|
||||
- $HOME/Library/Caches/Homebrew
|
||||
- qwt
|
||||
- D2XX
|
||||
- site-packages
|
||||
- VLC
|
||||
- src/GoldenCheetah.app
|
||||
|
||||
env:
|
||||
global:
|
||||
|
||||
@@ -217,10 +217,10 @@ technical skills we do not provide a walkthrough for building them all but
|
||||
instead provide the configure settings and any special considerations that
|
||||
should be taken into account.
|
||||
|
||||
See src/gcconfig.pri.in for instructions and the now deprecated Travis CI scripts
|
||||
in the repository for examples the changes you need to make:
|
||||
- deprecated/osx/before_install.sh
|
||||
- deprecated/osx/before_script.sh
|
||||
See src/gcconfig.pri.in for instructions and the AppVeyor CI scripts
|
||||
in the repository for examples about the changes you need to make:
|
||||
- appveyor/macos/install.sh
|
||||
- appveyor/macos/before_build.sh
|
||||
and then rebuild.
|
||||
|
||||
If you plan to use Cloud Services, you need to obtain the proper API keys for
|
||||
|
||||
196
appveyor.yml
196
appveyor.yml
@@ -1,7 +1,9 @@
|
||||
version: ci.{build}
|
||||
image: Visual Studio 2019
|
||||
clone_depth: 1
|
||||
skip_tags: true
|
||||
image:
|
||||
- Visual Studio 2019
|
||||
- macos-monterey
|
||||
|
||||
environment:
|
||||
GC_GOOGLE_CALENDAR_CLIENT_SECRET:
|
||||
@@ -44,16 +46,24 @@ environment:
|
||||
secure: nDgxUdgLkp0+gaxKRCaAVD5WYAl9pLmOnZ9JLSx3ulqT346nieakd02V3Q7dZYEU
|
||||
|
||||
init:
|
||||
|
||||
# Windows
|
||||
# Setup QT 5.15 - 64Bit
|
||||
- set QTDIR=C:\Qt\5.15\msvc2019_64
|
||||
- set PATH=%QTDIR%\bin;%PATH%
|
||||
- qmake --version
|
||||
|
||||
- cmd: set QTDIR=C:\Qt\5.15\msvc2019_64
|
||||
- cmd: set PATH=%QTDIR%\bin;%PATH%
|
||||
- cmd: qmake --version
|
||||
# Setup MSVC - VS 2019
|
||||
- call c:\"Program Files (x86)"\"Microsoft Visual Studio"\2019\Community\VC\Auxiliary\Build\vcvarsall.bat amd64
|
||||
|
||||
- cmd: call c:\"Program Files (x86)"\"Microsoft Visual Studio"\2019\Community\VC\Auxiliary\Build\vcvarsall.bat amd64
|
||||
# Setup NSIS
|
||||
- set PATH=%PATH%;C:\"Program Files (x86)"\NSIS
|
||||
- cmd: set PATH=%PATH%;C:\"Program Files (x86)"\NSIS
|
||||
|
||||
# macOS
|
||||
# Setup QT 5.15
|
||||
- sh: export QTDIR=$HOME/Qt/5.15.2/clang_64
|
||||
- sh: export PATH=$HOME/Qt/5.15.2/clang_64/bin:$PATH
|
||||
- sh: qmake --version
|
||||
# Setup Xcode 14.2
|
||||
- sh: sudo xcode-select -s /Applications/Xcode-14.2.0.app
|
||||
|
||||
cache:
|
||||
- gc-ci-libs.zip -> appveyor.yml
|
||||
@@ -63,39 +73,44 @@ cache:
|
||||
- C:\Python -> src\Python\requirements.txt
|
||||
- c:\tools\vcpkg\installed\
|
||||
- qwt -> qwt/qwtconfig.pri.in
|
||||
- D2XX
|
||||
- VLC
|
||||
- site-packages
|
||||
|
||||
install:
|
||||
|
||||
# Windows
|
||||
# Get the libraries
|
||||
- if not exist gc-ci-libs.zip appveyor DownloadFile "https://github.com/GoldenCheetah/WindowsSDK/releases/download/v0.1.1/gc-ci-libs.zip"
|
||||
- 7z x -y gc-ci-libs.zip -oC:\libs
|
||||
- cmd: if not exist gc-ci-libs.zip appveyor DownloadFile "https://github.com/GoldenCheetah/WindowsSDK/releases/download/v0.1.1/gc-ci-libs.zip"
|
||||
- cmd: 7z x -y gc-ci-libs.zip -oC:\libs
|
||||
# GSL
|
||||
- vcpkg install gsl:x64-windows
|
||||
- cmd: vcpkg install gsl:x64-windows
|
||||
|
||||
# Get config
|
||||
- copy qwt\qwtconfig.pri.in qwt\qwtconfig.pri
|
||||
- copy c:\libs\gcconfig64-Release.appveyor.pri src\gcconfig.pri
|
||||
- cmd: copy qwt\qwtconfig.pri.in qwt\qwtconfig.pri
|
||||
- cmd: copy c:\libs\gcconfig64-Release.appveyor.pri src\gcconfig.pri
|
||||
|
||||
# Get jom
|
||||
- if not exist jom_1_1_3.zip appveyor DownloadFile "https://download.qt.io/official_releases/jom/jom_1_1_3.zip"
|
||||
- 7z x -y jom_1_1_3.zip -oc:\jom\
|
||||
- set PATH=%PATH%;c:\jom\;
|
||||
- cmd: if not exist jom_1_1_3.zip appveyor DownloadFile "https://download.qt.io/official_releases/jom/jom_1_1_3.zip"
|
||||
- cmd: 7z x -y jom_1_1_3.zip -oc:\jom\
|
||||
- cmd: set PATH=%PATH%;c:\jom\;
|
||||
|
||||
# Get R and add to config
|
||||
- ps: >-
|
||||
if (-not (Test-Path 'C:\R')) {
|
||||
if ($isWindows -And -not (Test-Path 'C:\R')) {
|
||||
# Lets use 4.1 until 4.2 issues are fixed
|
||||
#$rurl = $(ConvertFrom-JSON $(Invoke-WebRequest https://rversions.r-pkg.org/r-release-win).Content).URL
|
||||
$rurl = "https://cran.r-project.org/bin/windows/base/old/4.1.3/R-4.1.3-win.exe"
|
||||
Start-FileDownload $rurl "R-win.exe"
|
||||
Start-Process -FilePath .\R-win.exe -ArgumentList "/VERYSILENT /DIR=C:\R" -NoNewWindow -Wait
|
||||
}
|
||||
- set PATH=%PATH%;c:\R\bin\;
|
||||
- R --version
|
||||
- echo DEFINES+=GC_WANT_R >> src\gcconfig.pri
|
||||
- cmd: set PATH=%PATH%;c:\R\bin\;
|
||||
- cmd: R --version
|
||||
- cmd: echo DEFINES+=GC_WANT_R >> src\gcconfig.pri
|
||||
|
||||
# Get Python embeddable and install packages
|
||||
- ps: >-
|
||||
if (-not (Test-Path 'C:\Python')) {
|
||||
if ($isWindows -And -not (Test-Path 'C:\Python')) {
|
||||
Start-FileDownload "https://www.python.org/ftp/python/3.7.9/python-3.7.9-embed-amd64.zip" Python.zip
|
||||
7z x Python.zip -oC:\Python\
|
||||
echo python37.zip . '' 'import site' | Out-File C:\Python\python37._pth -Encoding ascii
|
||||
@@ -105,45 +120,50 @@ install:
|
||||
}
|
||||
|
||||
# Get SIP and and install on Python
|
||||
- c:\python37-x64\python --version
|
||||
- if not exist sip-4.19.8.zip appveyor DownloadFile "https://sourceforge.net/projects/pyqt/files/sip/sip-4.19.8/sip-4.19.8.zip"
|
||||
- 7z x sip-4.19.8.zip
|
||||
- cd sip-4.19.8
|
||||
- c:\python37-x64\python configure.py
|
||||
- jom -j4
|
||||
- nmake install
|
||||
- cd ..
|
||||
- cmd: c:\python37-x64\python --version
|
||||
- cmd: if not exist sip-4.19.8.zip appveyor DownloadFile "https://sourceforge.net/projects/pyqt/files/sip/sip-4.19.8/sip-4.19.8.zip"
|
||||
- cmd: 7z x sip-4.19.8.zip
|
||||
- cmd: cd sip-4.19.8
|
||||
- cmd: c:\python37-x64\python configure.py
|
||||
- cmd: jom -j4
|
||||
- cmd: nmake install
|
||||
- cmd: cd ..
|
||||
|
||||
# Add Python (avoiding collision between GC Context.h and Python context.h)
|
||||
- echo DEFINES+=GC_WANT_PYTHON >> src\gcconfig.pri
|
||||
- echo PYTHONINCLUDES=-ICore -I\"c:\python37-x64\include\" >> src\gcconfig.pri
|
||||
- echo PYTHONLIBS=-L\"c:\python37-x64\libs\" -lpython37 >> src\gcconfig.pri
|
||||
- cmd: echo DEFINES+=GC_WANT_PYTHON >> src\gcconfig.pri
|
||||
- cmd: echo PYTHONINCLUDES=-ICore -I\"c:\python37-x64\include\" >> src\gcconfig.pri
|
||||
- cmd: echo PYTHONLIBS=-L\"c:\python37-x64\libs\" -lpython37 >> src\gcconfig.pri
|
||||
|
||||
# GSL
|
||||
- echo GSL_INCLUDES=c:\tools\vcpkg\installed\x64-windows\include >> src\gcconfig.pri
|
||||
- echo GSL_LIBS=-Lc:\tools\vcpkg\installed\x64-windows\lib -lgsl -lgslcblas >> src\gcconfig.pri
|
||||
- cmd: echo GSL_INCLUDES=c:\tools\vcpkg\installed\x64-windows\include >> src\gcconfig.pri
|
||||
- cmd: echo GSL_LIBS=-Lc:\tools\vcpkg\installed\x64-windows\lib -lgsl -lgslcblas >> src\gcconfig.pri
|
||||
|
||||
# macOS
|
||||
- sh: appveyor/macos/install.sh
|
||||
|
||||
before_build:
|
||||
|
||||
# Windows
|
||||
# Define GC version string, only for tagged builds
|
||||
- if %APPVEYOR_REPO_TAG%==true echo DEFINES+=GC_VERSION=VERSION_STRING >> src\gcconfig.pri
|
||||
- cmd: if %APPVEYOR_REPO_TAG%==true echo DEFINES+=GC_VERSION=VERSION_STRING >> src\gcconfig.pri
|
||||
|
||||
# Enable CloudDB
|
||||
- echo CloudDB=active >> src\gcconfig.pri
|
||||
- cmd: echo CloudDB=active >> src\gcconfig.pri
|
||||
|
||||
# Add Train Robot
|
||||
- echo DEFINES+=GC_WANT_ROBOT >> src\gcconfig.pri
|
||||
- cmd: echo DEFINES+=GC_WANT_ROBOT >> src\gcconfig.pri
|
||||
|
||||
# Enable TrainerDay Query API; pagesize depends on the keys remote configuration
|
||||
- echo DEFINES+=GC_WANT_TRAINERDAY_API >> src\gcconfig.pri
|
||||
- echo DEFINES+=GC_TRAINERDAY_API_PAGESIZE=25 >> src\gcconfig.pri
|
||||
- cmd: echo DEFINES+=GC_WANT_TRAINERDAY_API >> src\gcconfig.pri
|
||||
- cmd: echo DEFINES+=GC_TRAINERDAY_API_PAGESIZE=25 >> src\gcconfig.pri
|
||||
|
||||
# Avoid macro redefinition warnings
|
||||
- echo DEFINES+=_MATH_DEFINES_DEFINED >> src\gcconfig.pri
|
||||
- cmd: echo DEFINES+=_MATH_DEFINES_DEFINED >> src\gcconfig.pri
|
||||
|
||||
# Add debug console
|
||||
#- echo CONFIG+=console >> src\gcconfig.pri
|
||||
# macOS
|
||||
- sh: appveyor/macos/before_build.sh
|
||||
|
||||
# Patch Secrets.h
|
||||
# Patch Secrets.h (Windows and macOS)
|
||||
- ps: (Get-Content src\Core\Secrets.h) -replace '__GC_GOOGLE_CALENDAR_CLIENT_SECRET__', $env:GC_GOOGLE_CALENDAR_CLIENT_SECRET | Set-Content src\Core\Secrets.h
|
||||
- ps: (Get-Content src\Core\Secrets.h) -replace '__GC_GOOGLE_DRIVE_CLIENT_ID__', $env:GC_GOOGLE_DRIVE_CLIENT_ID | Set-Content src\Core\Secrets.h
|
||||
- ps: (Get-Content src\Core\Secrets.h) -replace '__GC_GOOGLE_DRIVE_CLIENT_SECRET__', $env:GC_GOOGLE_DRIVE_CLIENT_SECRET | Set-Content src\Core\Secrets.h
|
||||
@@ -167,56 +187,80 @@ before_build:
|
||||
- ps: (Get-Content src\Core\Secrets.h) -replace '__GC_TRAINERDAY_API_KEY__', $env:GC_TRAINERDAY_API_KEY | Set-Content src\Core\Secrets.h
|
||||
|
||||
build_script:
|
||||
- qmake.exe build.pro -r -spec win32-msvc
|
||||
- cd qwt\
|
||||
- jom -j1
|
||||
- cd ..
|
||||
- jom -j4
|
||||
|
||||
# Windows
|
||||
- cmd: qmake.exe build.pro -r -spec win32-msvc
|
||||
- cmd: cd qwt\
|
||||
- cmd: jom -j1
|
||||
- cmd: cd ..
|
||||
- cmd: jom -j4
|
||||
|
||||
# macOS
|
||||
- sh: qmake build.pro -r QMAKE_CXXFLAGS_WARN_ON+="-Wno-unused-private-field -Wno-c++11-narrowing -Wno-deprecated-declarations -Wno-deprecated-register -Wno-nullability-completeness -Wno-sign-compare -Wno-inconsistent-missing-override" QMAKE_CFLAGS_WARN_ON+="-Wno-deprecated-declarations -Wno-sign-compare"
|
||||
- sh: make -j4
|
||||
|
||||
after_build:
|
||||
- cd src\release
|
||||
|
||||
# Windows
|
||||
- cmd: cd src\release
|
||||
|
||||
# copy dependencies
|
||||
- windeployqt --release GoldenCheetah.exe
|
||||
- copy c:\libs\10_Precompiled_DLL\usbexpress_3.5.1\USBXpress\USBXpress_API\Host\x64\SiUSBXp.dll
|
||||
- copy c:\libs\10_Precompiled_DLL\libsamplerate64\lib\libsamplerate-0.dll
|
||||
- copy c:\libs\10_Precompiled_DLL\VLC\win64\lib\libvlc*.dll
|
||||
- xcopy /s /i /e /q c:\libs\10_Precompiled_DLL\VLC\win64\plugins plugins
|
||||
- copy c:\OpenSSL-v111-Win64\bin\lib*.dll
|
||||
- copy c:\OpenSSL-v111-Win64\license.txt "OpenSSL License.txt"
|
||||
- xcopy /s /i /e /q C:\Python .
|
||||
- copy C:\Python\LICENSE.txt "PYTHON LICENSE.txt"
|
||||
- copy c:\tools\vcpkg\installed\x64-windows\bin\gsl*.dll
|
||||
- cmd: windeployqt --release GoldenCheetah.exe
|
||||
- cmd: copy c:\libs\10_Precompiled_DLL\usbexpress_3.5.1\USBXpress\USBXpress_API\Host\x64\SiUSBXp.dll
|
||||
- cmd: copy c:\libs\10_Precompiled_DLL\libsamplerate64\lib\libsamplerate-0.dll
|
||||
- cmd: copy c:\libs\10_Precompiled_DLL\VLC\win64\lib\libvlc*.dll
|
||||
- cmd: xcopy /s /i /e /q c:\libs\10_Precompiled_DLL\VLC\win64\plugins plugins
|
||||
- cmd: copy c:\OpenSSL-v111-Win64\bin\lib*.dll
|
||||
- cmd: copy c:\OpenSSL-v111-Win64\license.txt "OpenSSL License.txt"
|
||||
- cmd: xcopy /s /i /e /q C:\Python .
|
||||
- cmd: copy C:\Python\LICENSE.txt "PYTHON LICENSE.txt"
|
||||
- cmd: copy c:\tools\vcpkg\installed\x64-windows\bin\gsl*.dll
|
||||
|
||||
# ReadMe, license and icon files
|
||||
- copy ..\Resources\win32\ReadMe.txt
|
||||
- echo GoldenCheetah is licensed under the GNU General Public License v2 > license.txt
|
||||
- echo. >> license.txt
|
||||
- type ..\..\COPYING >> license.txt
|
||||
- copy ..\Resources\win32\gc.ico
|
||||
- cmd: copy ..\Resources\win32\ReadMe.txt
|
||||
- cmd: echo GoldenCheetah is licensed under the GNU General Public License v2 > license.txt
|
||||
- cmd: echo. >> license.txt
|
||||
- cmd: type ..\..\COPYING >> license.txt
|
||||
- cmd: copy ..\Resources\win32\gc.ico
|
||||
|
||||
# Installer script
|
||||
- copy ..\Resources\win32\GC3.7-Master-W64-QT5.nsi
|
||||
- cmd: copy ..\Resources\win32\GC3.7-Master-W64-QT5.nsi
|
||||
|
||||
# Build the installer
|
||||
- makensis GC3.7-Master-W64-QT5.nsi
|
||||
- move GoldenCheetah_v3.7_64bit_Windows.exe ..\..\GoldenCheetah_v3.7_x64.exe
|
||||
- cd ..\..
|
||||
- ps: Set-AppveyorBuildVariable -Name 'PUBLISH_BINARIES' -Value false
|
||||
- ps: if ($env:APPVEYOR_REPO_COMMIT_MESSAGE_EXTENDED -Match "\[publish binaries\]") { Set-AppveyorBuildVariable -Name 'PUBLISH_BINARIES' -Value true }
|
||||
- cmd: makensis GC3.7-Master-W64-QT5.nsi
|
||||
- cmd: move GoldenCheetah_v3.7_64bit_Windows.exe ..\..\GoldenCheetah_v3.7_x64.exe
|
||||
- cmd: cd ..\..
|
||||
- ps: if ($isWindows) { Set-AppveyorBuildVariable -Name 'PUBLISH_BINARIES' -Value false }
|
||||
- ps: if ($isWindows -And $env:APPVEYOR_REPO_COMMIT_MESSAGE_EXTENDED -Match "\[publish binaries\]") { Set-AppveyorBuildVariable -Name 'PUBLISH_BINARIES' -Value true }
|
||||
|
||||
# macOS
|
||||
- sh: appveyor/macos/after_build.sh
|
||||
|
||||
test_script:
|
||||
# minimum test
|
||||
- src\release\GoldenCheetah --version 2>GCversionWindows.txt
|
||||
- git log -1 >> GCversionWindows.txt
|
||||
- ps: CertUtil -hashfile GoldenCheetah_v3.7_x64.exe sha256 | Select-Object -First 2 | Add-Content GCversionWindows.txt
|
||||
- type GCversionWindows.txt
|
||||
|
||||
# Windows
|
||||
- cmd: src\release\GoldenCheetah --version 2>GCversionWindows.txt
|
||||
- cmd: git log -1 >> GCversionWindows.txt
|
||||
- ps: if ($isWindows) { CertUtil -hashfile GoldenCheetah_v3.7_x64.exe sha256 | Select-Object -First 2 | Add-Content GCversionWindows.txt }
|
||||
- cmd: type GCversionWindows.txt
|
||||
|
||||
# macOS
|
||||
- sh: src/GoldenCheetah.app/Contents/MacOS/GoldenCheetah --version 2>GCversionMacOS.txt
|
||||
- sh: git log -1 >> GCversionMacOS.txt
|
||||
- sh: shasum -a 256 GoldenCheetah_v3.7_x64.dmg | cut -f 1 -d ' ' >> GCversionMacOS.txt
|
||||
- sh: cat GCversionMacOS.txt
|
||||
|
||||
artifacts:
|
||||
# Windows
|
||||
- path: GoldenCheetah_v3.7_x64.exe
|
||||
name: GCinstaller
|
||||
name: GCinstallerWindows
|
||||
- path: GCversionWindows.txt
|
||||
name: GCversionWindows
|
||||
# macOS
|
||||
- path: GoldenCheetah_v3.7_x64.dmg
|
||||
name: GCmacOSpackage
|
||||
- path: GCversionMacOS.txt
|
||||
name: GCversionMacOS
|
||||
|
||||
deploy:
|
||||
# deploy continuous builds to GitHub release
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
#!/bin/bash
|
||||
set -ev
|
||||
cd src
|
||||
echo "Checking GoldenCheetah.app can execute"
|
||||
GoldenCheetah.app/Contents/MacOS/GoldenCheetah --version 2>GCversionMacOS.txt
|
||||
cat GCversionMacOS.txt
|
||||
|
||||
echo "About to create dmg file and fix up"
|
||||
mkdir GoldenCheetah.app/Contents/Frameworks
|
||||
@@ -32,7 +29,7 @@ rm -r GoldenCheetah.app/Contents/Frameworks/Python.framework/Versions/3.7/lib/py
|
||||
cp -R ../site-packages GoldenCheetah.app/Contents/Frameworks/Python.framework/Versions/3.7/lib/python3.7
|
||||
|
||||
# Initial deployment using macdeployqt
|
||||
/usr/local/opt/qt5/bin/macdeployqt GoldenCheetah.app -verbose=2 -executable=GoldenCheetah.app/Contents/MacOS/GoldenCheetah
|
||||
macdeployqt GoldenCheetah.app -verbose=2 -executable=GoldenCheetah.app/Contents/MacOS/GoldenCheetah
|
||||
|
||||
# Fix QtWebEngineProcess due to bug in macdployqt from homebrew
|
||||
if [ ! -f GoldenCheetah.app/Contents/Frameworks/QtWebEngineCore.framework/Helpers/QtWebEngineProcess.app/Contents/MacOS/QtWebEngineProcess ]; then
|
||||
@@ -50,31 +47,9 @@ done
|
||||
popd
|
||||
|
||||
# Final deployment to generate dmg (may take longer than 10' without output)
|
||||
python3.7 -m pip install travis-wait-improved
|
||||
/Library/Frameworks/Python.framework/Versions/3.7/bin/travis-wait-improved --timeout 30m /usr/local/opt/qt5/bin/macdeployqt GoldenCheetah.app -verbose=2 -fs=hfs+ -dmg
|
||||
macdeployqt GoldenCheetah.app -verbose=2 -fs=hfs+ -dmg
|
||||
|
||||
echo "Renaming dmg file to branch and build number ready for deploy"
|
||||
export FINAL_NAME=GoldenCheetah_v3.7_x64.dmg
|
||||
mv GoldenCheetah.dmg $FINAL_NAME
|
||||
ls -l $FINAL_NAME
|
||||
mv GoldenCheetah.dmg ../GoldenCheetah_v3.7_x64.dmg
|
||||
|
||||
# Add last commit message and SHA256 to txt file
|
||||
git log -1 >> GCversionMacOS.txt
|
||||
echo "SHA256 hash of $FINAL_NAME:" >> GCversionMacOS.txt
|
||||
shasum -a 256 $FINAL_NAME | cut -f 1 -d ' ' >> GCversionMacOS.txt
|
||||
cat GCversionMacOS.txt
|
||||
|
||||
echo "Uploading for user tests"
|
||||
### upload for testing
|
||||
if [[ $TRAVIS_PULL_REQUEST == "false" && $TRAVIS_COMMIT_MESSAGE == *"[publish binaries]"* ]]; then
|
||||
mkdir out
|
||||
mv $FINAL_NAME out
|
||||
mv GCversionMacOS.txt out
|
||||
ghr -n "Snapshot Builds" -replace snapshot out
|
||||
else
|
||||
curl --max-time 300 -F "file=@$FINAL_NAME" https://temp.sh/upload
|
||||
fi
|
||||
|
||||
echo "Make sure we are back in the Travis build directory"
|
||||
cd $TRAVIS_BUILD_DIR
|
||||
exit
|
||||
84
appveyor/macos/before_build.sh
Executable file
84
appveyor/macos/before_build.sh
Executable file
@@ -0,0 +1,84 @@
|
||||
#!/bin/bash
|
||||
set -ev
|
||||
|
||||
# Get config
|
||||
cp qwt/qwtconfig.pri.in qwt/qwtconfig.pri
|
||||
cp src/gcconfig.pri.in src/gcconfig.pri
|
||||
|
||||
# Bison
|
||||
echo QMAKE_YACC=/usr/local/opt/bison@2.7/bin/bison >> src/gcconfig.pri
|
||||
|
||||
# Enable compress library
|
||||
echo LIBZ_LIBS = -lz >> src/gcconfig.pri
|
||||
|
||||
# GSL
|
||||
echo GSL_INCLUDES = /usr/local/include >> src/gcconfig.pri
|
||||
echo GSL_LIBS = -L/usr/local/lib -lgsl -lgslcblas -lm >> src/gcconfig.pri
|
||||
|
||||
# Define GC version string, only for tagged builds
|
||||
if [ -n "$TRAVIS_TAG" ]; then echo DEFINES += GC_VERSION=VERSION_STRING >> src/gcconfig.pri; fi
|
||||
|
||||
sed -i "" "s|#\(CONFIG += release.*\)|\1 static |" src/gcconfig.pri
|
||||
sed -i "" "s|^#CloudDB|CloudDB|" src/gcconfig.pri
|
||||
sed -i "" "s|^#LIBZ|LIBZ|" src/gcconfig.pri
|
||||
|
||||
# SRMIO
|
||||
sed -i "" "s|#\(SRMIO_INSTALL =.*\)|\1 /usr/local|" src/gcconfig.pri
|
||||
|
||||
# D2XX
|
||||
sed -i "" "s|libftd2xx.dylib|@executable_path/../Frameworks/libftd2xx.1.4.24.dylib|" src/FileIO/D2XX.cpp
|
||||
sed -i "" "s|#\(D2XX_INCLUDE =.*\)|\1 ../D2XX|" src/gcconfig.pri
|
||||
sed -i "" "s|#\(D2XX_LIBS =.*\)|\1 -L../D2XX -lftd2xx|" src/gcconfig.pri
|
||||
|
||||
# ICAL
|
||||
sed -i "" "s|#\(ICAL_INSTALL =.*\)|\1 /usr/local|" src/gcconfig.pri
|
||||
sed -i "" "s|#\(ICAL_LIBS =.*\)|\1 -L/usr/local/lib -lical|" src/gcconfig.pri
|
||||
|
||||
# LIBUSB
|
||||
sed -i "" "s|#\(LIBUSB_INSTALL =\).*|\1 /usr/local|" src/gcconfig.pri
|
||||
sed -i "" "s|#\(LIBUSB_LIBS =.*\)|\1 -L/usr/local/lib -lusb-1.0|" src/gcconfig.pri
|
||||
sed -i "" "s|#\(LIBUSB_USE_V_1 = true.*\)|\1|" src/gcconfig.pri
|
||||
|
||||
# SAMPLERATE
|
||||
sed -i "" "s|#\(SAMPLERATE_INSTALL =\).*|\1 /usr/local|" src/gcconfig.pri
|
||||
sed -i "" "s|#\(SAMPLERATE_LIBS =\).*|\1 -L/usr/local/lib -lsamplerate|" src/gcconfig.pri
|
||||
|
||||
# LMFIT
|
||||
sed -i "" "s|#\(LMFIT_INSTALL =\).*|\1 /usr/local|" src/gcconfig.pri
|
||||
|
||||
sed -i "" "s|#\(DEFINES += GC_HAVE_LION*\)|\1|" src/gcconfig.pri
|
||||
|
||||
# HTTP Server
|
||||
sed -i "" "s|#\(HTPATH = ../httpserver.*\)|\1 |" src/gcconfig.pri
|
||||
|
||||
# Robot
|
||||
sed -i "" "s|#\(DEFINES += GC_WANT_ROBOT.*\)|\1 |" src/gcconfig.pri
|
||||
|
||||
# VLC & VIDEO
|
||||
sed -i "" "s|#\(VLC_INSTALL =.*\)|\1 ../VLC|" src/gcconfig.pri
|
||||
sed -i "" "s|\(DEFINES += GC_VIDEO_NONE.*\)|#\1 |" src/gcconfig.pri
|
||||
sed -i "" "s|#\(DEFINES += GC_VIDEO_VLC.*\)|\1 |" src/gcconfig.pri
|
||||
|
||||
# Enable R embedding
|
||||
sed -i "" "s|#\(DEFINES += GC_WANT_R.*\)|\1 |" src/gcconfig.pri
|
||||
|
||||
# Python (avoiding collision between GC Context.h and Python context.h)
|
||||
echo DEFINES += GC_WANT_PYTHON >> src/gcconfig.pri
|
||||
echo PYTHONINCLUDES = -ICore `python3.7-config --includes` >> src/gcconfig.pri
|
||||
echo PYTHONLIBS = `python3.7-config --ldflags` >> src/gcconfig.pri
|
||||
|
||||
# TrainerDay Query API
|
||||
echo DEFINES += GC_WANT_TRAINERDAY_API >> src/gcconfig.pri
|
||||
echo DEFINES += GC_TRAINERDAY_API_PAGESIZE=25 >> src/gcconfig.pri
|
||||
|
||||
# macOS version config
|
||||
echo "QMAKE_CXXFLAGS += -mmacosx-version-min=10.7 -arch x86_64" >> src/gcconfig.pri
|
||||
echo "QMAKE_CFLAGS_RELEASE += -mmacosx-version-min=10.7 -arch x86_64" >> src/gcconfig.pri
|
||||
echo "QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.15" >> src/gcconfig.pri
|
||||
|
||||
cat src/gcconfig.pri
|
||||
|
||||
# update translations
|
||||
lupdate src/src.pro
|
||||
|
||||
exit
|
||||
@@ -2,11 +2,10 @@
|
||||
set -ev
|
||||
|
||||
date
|
||||
# Don't update to use included Qt version
|
||||
# Don't update or cleanup
|
||||
export HOMEBREW_NO_AUTO_UPDATE=1
|
||||
export HOMEBREW_NO_INSTALL_CLEANUP=1
|
||||
|
||||
brew install qt5
|
||||
brew install bison@2.7
|
||||
brew install gsl
|
||||
brew install libical
|
||||
@@ -32,6 +31,7 @@ cd ..
|
||||
|
||||
# D2XX - refresh cache if folder is empty
|
||||
if [ -z "$(ls -A D2XX)" ]; then
|
||||
mkdir -p D2XX
|
||||
curl -O https://ftdichip.com/wp-content/uploads/2021/05/D2XX1.4.24.zip
|
||||
unzip D2XX1.4.24.zip
|
||||
hdiutil mount D2XX1.4.24.dmg
|
||||
@@ -43,6 +43,7 @@ sudo cp D2XX/libftd2xx.1.4.24.dylib /usr/local/lib
|
||||
|
||||
# VLC
|
||||
if [[ -z "$(ls -A VLC)" ]]; then
|
||||
mkdir -p VLC
|
||||
curl -O http://download.videolan.org/pub/videolan/vlc/3.0.8/macosx/vlc-3.0.8.dmg
|
||||
hdiutil mount vlc-3.0.8.dmg
|
||||
cp -R "/Volumes/VLC media player/VLC.app/Contents/MacOS/include" VLC/include
|
||||
@@ -52,7 +53,26 @@ if [[ -z "$(ls -A VLC)" ]]; then
|
||||
fi
|
||||
sudo cp VLC/lib/libvlc*.dylib /usr/local/lib
|
||||
|
||||
# GHR to updload binaries to GitHub releases
|
||||
brew install ghr
|
||||
# Python 3.7.8
|
||||
curl -O https://www.python.org/ftp/python/3.7.9/python-3.7.9-macosx10.9.pkg
|
||||
sudo installer -pkg python-3.7.9-macosx10.9.pkg -target /
|
||||
|
||||
python3.7 --version
|
||||
python3.7-config --prefix
|
||||
|
||||
# Python mandatory packages - refresh cache if folder is empty
|
||||
if [ -z "$(ls -A site-packages)" ]; then
|
||||
mkdir -p site-packages
|
||||
python3.7 -m pip install -q -r src/Python/requirements.txt -t site-packages
|
||||
fi
|
||||
|
||||
# Python SIP
|
||||
curl -k -L -O https://sourceforge.net/projects/pyqt/files/sip/sip-4.19.8/sip-4.19.8.tar.gz
|
||||
tar xf sip-4.19.8.tar.gz
|
||||
cd sip-4.19.8
|
||||
python3.7 configure.py
|
||||
make -j4
|
||||
sudo make install
|
||||
cd ..
|
||||
|
||||
exit
|
||||
@@ -1,98 +0,0 @@
|
||||
#!/bin/bash
|
||||
set -ev
|
||||
|
||||
# Python 3.7.8
|
||||
curl -O https://www.python.org/ftp/python/3.7.9/python-3.7.9-macosx10.9.pkg
|
||||
sudo installer -pkg python-3.7.9-macosx10.9.pkg -target /
|
||||
|
||||
python3.7 --version
|
||||
python3.7-config --prefix
|
||||
|
||||
# Python mandatory packages - refresh cache if folder is empty
|
||||
if [ -z "$(ls -A site-packages)" ]; then
|
||||
python3.7 -m pip install -q -r src/Python/requirements.txt -t site-packages
|
||||
fi
|
||||
|
||||
# Python SIP
|
||||
curl -k -L -O https://sourceforge.net/projects/pyqt/files/sip/sip-4.19.8/sip-4.19.8.tar.gz
|
||||
tar xf sip-4.19.8.tar.gz
|
||||
cd sip-4.19.8
|
||||
python3.7 configure.py
|
||||
make -j4
|
||||
sudo make install
|
||||
cd ..
|
||||
|
||||
cp qwt/qwtconfig.pri.in qwt/qwtconfig.pri
|
||||
cp src/gcconfig.pri.in src/gcconfig.pri
|
||||
# Bison
|
||||
echo QMAKE_YACC=/usr/local/opt/bison@2.7/bin/bison >> src/gcconfig.pri
|
||||
# Define GC version string, only for tagged builds
|
||||
if [ -n "$TRAVIS_TAG" ]; then echo DEFINES += GC_VERSION=VERSION_STRING >> src/gcconfig.pri; fi
|
||||
sed -i "" "s|#\(CONFIG += release.*\)|\1 static |" src/gcconfig.pri
|
||||
sed -i "" "s|^#CloudDB|CloudDB|" src/gcconfig.pri
|
||||
sed -i "" "s|^#LIBZ|LIBZ|" src/gcconfig.pri
|
||||
# SRMIO
|
||||
sed -i "" "s|#\(SRMIO_INSTALL =.*\)|\1 /usr/local|" src/gcconfig.pri
|
||||
# D2XX
|
||||
sed -i "" "s|libftd2xx.dylib|@executable_path/../Frameworks/libftd2xx.1.4.24.dylib|" src/FileIO/D2XX.cpp
|
||||
sed -i "" "s|#\(D2XX_INCLUDE =.*\)|\1 ../D2XX|" src/gcconfig.pri
|
||||
sed -i "" "s|#\(D2XX_LIBS =.*\)|\1 -L../D2XX -lftd2xx|" src/gcconfig.pri
|
||||
sed -i "" "s|#\(ICAL_INSTALL =.*\)|\1 /usr/local|" src/gcconfig.pri
|
||||
sed -i "" "s|#\(ICAL_LIBS =.*\)|\1 -L/usr/local/lib -lical|" src/gcconfig.pri
|
||||
sed -i "" "s|#\(LIBUSB_INSTALL =\).*|\1 /usr/local|" src/gcconfig.pri
|
||||
sed -i "" "s|#\(LIBUSB_LIBS =.*\)|\1 -L/usr/local/lib -lusb-1.0|" src/gcconfig.pri
|
||||
sed -i "" "s|#\(LIBUSB_USE_V_1 = true.*\)|\1|" src/gcconfig.pri
|
||||
sed -i "" "s|#\(SAMPLERATE_INSTALL =\).*|\1 /usr/local|" src/gcconfig.pri
|
||||
sed -i "" "s|#\(SAMPLERATE_LIBS =\).*|\1 -L/usr/local/lib -lsamplerate|" src/gcconfig.pri
|
||||
sed -i "" "s|#\(LMFIT_INSTALL =\).*|\1 /usr/local|" src/gcconfig.pri
|
||||
sed -i "" "s|#\(DEFINES += GC_HAVE_LION*\)|\1|" src/gcconfig.pri
|
||||
sed -i "" "s|#\(HTPATH = ../httpserver.*\)|\1 |" src/gcconfig.pri
|
||||
sed -i "" "s|#\(DEFINES += GC_WANT_ROBOT.*\)|\1 |" src/gcconfig.pri
|
||||
# VLC & VIDEO
|
||||
sed -i "" "s|#\(VLC_INSTALL =.*\)|\1 ../VLC|" src/gcconfig.pri
|
||||
sed -i "" "s|\(DEFINES += GC_VIDEO_NONE.*\)|#\1 |" src/gcconfig.pri
|
||||
sed -i "" "s|#\(DEFINES += GC_VIDEO_VLC.*\)|\1 |" src/gcconfig.pri
|
||||
# Enable R embedding
|
||||
sed -i "" "s|#\(DEFINES += GC_WANT_R.*\)|\1 |" src/gcconfig.pri
|
||||
# Python (avoiding collision between GC Context.h and Python context.h)
|
||||
echo DEFINES += GC_WANT_PYTHON >> src/gcconfig.pri
|
||||
echo PYTHONINCLUDES = -ICore `python3.7-config --includes` >> src/gcconfig.pri
|
||||
echo PYTHONLIBS = `python3.7-config --ldflags` >> src/gcconfig.pri
|
||||
# GSL
|
||||
echo GSL_LIBS = -lgsl -lgslcblas -lm >> src/gcconfig.pri
|
||||
# TrainerDay Query API
|
||||
echo DEFINES += GC_WANT_TRAINERDAY_API >> src/gcconfig.pri
|
||||
echo DEFINES += GC_TRAINERDAY_API_PAGESIZE=25 >> src/gcconfig.pri
|
||||
# macOS version config
|
||||
echo "QMAKE_CXXFLAGS += -mmacosx-version-min=10.7 -arch x86_64" >> src/gcconfig.pri
|
||||
echo "QMAKE_CFLAGS_RELEASE += -mmacosx-version-min=10.7 -arch x86_64" >> src/gcconfig.pri
|
||||
echo "QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.15" >> src/gcconfig.pri
|
||||
|
||||
# Patch Secrets.h
|
||||
sed -i "" "s/__GC_GOOGLE_CALENDAR_CLIENT_SECRET__/"$GC_GOOGLE_CALENDAR_CLIENT_SECRET"/" src/Core/Secrets.h
|
||||
sed -i "" "s/__GC_STRAVA_CLIENT_SECRET__/"$GC_STRAVA_CLIENT_SECRET"/" src/Core/Secrets.h
|
||||
sed -i "" "s/__GC_DROPBOX_CLIENT_SECRET__/"$GC_DROPBOX_CLIENT_SECRET"/" src/Core/Secrets.h
|
||||
sed -i "" "s/__GC_CYCLINGANALYTICS_CLIENT_SECRET__/"$GC_CYCLINGANALYTICS_CLIENT_SECRET"/" src/Core/Secrets.h
|
||||
sed -i "" "s/__GC_TWITTER_CONSUMER_SECRET__/"$GC_TWITTER_CONSUMER_SECRET"/" src/Core/Secrets.h
|
||||
sed -i "" "s/__GC_DROPBOX_CLIENT_ID__/"$GC_DROPBOX_CLIENT_ID"/" src/Core/Secrets.h
|
||||
sed -i "" "s/__GC_MAPQUESTAPI_KEY__/"$GC_MAPQUESTAPI_KEY"/" src/Core/Secrets.h
|
||||
sed -i "" "s/__GC_CLOUD_DB_BASIC_AUTH__/"$GC_CLOUD_DB_BASIC_AUTH"/" src/Core/Secrets.h
|
||||
sed -i "" "s/__GC_CLOUD_DB_APP_NAME__/"$GC_CLOUD_DB_APP_NAME"/" src/Core/Secrets.h
|
||||
sed -i "" "s/__GC_GOOGLE_DRIVE_CLIENT_ID__/"$GC_GOOGLE_DRIVE_CLIENT_ID"/" src/Core/Secrets.h
|
||||
sed -i "" "s/__GC_GOOGLE_DRIVE_CLIENT_SECRET__/"$GC_GOOGLE_DRIVE_CLIENT_SECRET"/" src/Core/Secrets.h
|
||||
sed -i "" "s/__GC_GOOGLE_DRIVE_API_KEY__/"$GC_GOOGLE_DRIVE_API_KEY"/" src/Core/Secrets.h
|
||||
sed -i "" "s/__GC_WITHINGS_CONSUMER_SECRET__/"$GC_WITHINGS_CONSUMER_SECRET"/" src/Core/Secrets.h
|
||||
sed -i "" "s/__GC_NOKIA_CLIENT_SECRET__/"$GC_NOKIA_CLIENT_SECRET"/" src/Core/Secrets.h
|
||||
sed -i "" "s/__GC_SPORTTRACKS_CLIENT_SECRET__/"$GC_SPORTTRACKS_CLIENT_SECRET"/" src/Core/Secrets.h
|
||||
sed -i "" "s/OPENDATA_DISABLE/OPENDATA_ENABLE/" src/Core/Secrets.h
|
||||
sed -i "" "s/__GC_CLOUD_OPENDATA_SECRET__/"$GC_CLOUD_OPENDATA_SECRET"/" src/Core/Secrets.h
|
||||
sed -i "" "s/__GC_NOLIO_CLIENT_ID__/"$GC_NOLIO_CLIENT_ID"/" src/Core/Secrets.h
|
||||
sed -i "" "s/__GC_NOLIO_SECRET__/"$GC_NOLIO_SECRET"/" src/Core/Secrets.h
|
||||
sed -i "" "s/__GC_RWGPS_API_KEY__/"$GC_RWGPS_API_KEY"/" src/Core/Secrets.h
|
||||
sed -i "" "s/__GC_XERT_CLIENT_SECRET__/"$GC_XERT_CLIENT_SECRET"/" src/Core/Secrets.h
|
||||
sed -i "" "s/__GC_AZUM_CLIENT_SECRET__/"$GC_AZUM_CLIENT_SECRET"/" src/Core/Secrets.h
|
||||
sed -i "" "s/__GC_TRAINERDAY_API_KEY__/"$GC_TRAINERDAY_API_KEY"/" src/Core/Secrets.h
|
||||
cat src/gcconfig.pri
|
||||
# update translations
|
||||
/usr/local/opt/qt5/bin/lupdate src/src.pro
|
||||
exit
|
||||
@@ -1,13 +0,0 @@
|
||||
#!/bin/bash
|
||||
set -ev
|
||||
# Build only if a package is not already cached
|
||||
if [ -z "$(ls -A src/GoldenCheetah.app)" ]; then
|
||||
CC=clang CXX=clang++ /usr/local/opt/qt5/bin/qmake -makefile -recursive QMAKE_CXXFLAGS_WARN_ON+="-Wno-unused-private-field -Wno-c++11-narrowing -Wno-deprecated-declarations -Wno-deprecated-register -Wno-nullability-completeness -Wno-sign-compare -Wno-inconsistent-missing-override" QMAKE_CFLAGS_WARN_ON+="-Wno-deprecated-declarations -Wno-sign-compare"
|
||||
CC=clang CXX=clang++ make qmake_all
|
||||
if [ -z "$(ls -A qwt/lib/libqwt.a)" ]; then
|
||||
CC=clang CXX=clang++ make -j4 sub-qwt
|
||||
exit # build qwt and store in the cache on the first run
|
||||
fi
|
||||
CC=clang CXX=clang++ make -j4 sub-src
|
||||
fi
|
||||
exit
|
||||
Reference in New Issue
Block a user