added build scripts for OS X
This commit is contained in:
parent
951f3d05c0
commit
67dfcf09ee
5 changed files with 33 additions and 4 deletions
13
.travis/osx_build.sh
Executable file
13
.travis/osx_build.sh
Executable file
|
@ -0,0 +1,13 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Creating folders
|
||||||
|
cd ${PROJECT_DIR} && \
|
||||||
|
echo "gta5view build version is ${APPLICATION_VERSION}" && \
|
||||||
|
mkdir build && \
|
||||||
|
mkdir assets && \
|
||||||
|
cd build && \
|
||||||
|
|
||||||
|
/usr/local/opt/qt/bin/qmake ${QMAKE_FLAGS_QT5} DEFINES+=GTA5SYNC_BUILDTYPE_RC "DEFINES+=GTA5SYNC_APPVER=\\\\\\\"${APPLICATION_VERSION}\\\\\\\"" DEFINES+=GTA5SYNC_TELEMETRY "DEFINES+=GTA5SYNC_TELEMETRY_WEBURL=\\\\\\\"https://dev.syping.de/gta5view-userstats/\\\\\\\"" ../gta5view.pro && \
|
||||||
|
make -j 4 && \
|
||||||
|
/usr/local/opt/qt/bin/macdeployqt gta5view.app -dmg && \
|
||||||
|
cp -Rf gta5view.dmg ../assets/gta5view.dmg
|
4
.travis/osx_install.sh
Executable file
4
.travis/osx_install.sh
Executable file
|
@ -0,0 +1,4 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Install packages
|
||||||
|
brew install qt
|
8
.travis/osx_script.sh
Executable file
8
.travis/osx_script.sh
Executable file
|
@ -0,0 +1,8 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Install packages
|
||||||
|
.travis/osx_install.sh && \
|
||||||
|
|
||||||
|
# Build gta5view
|
||||||
|
.travis/osx_build.sh && \
|
||||||
|
cd ${PROJECT_DIR}
|
|
@ -1,14 +1,18 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Install lua
|
# Install lua
|
||||||
sudo apt-get update -qq && \
|
if [ "${TRAVIS_OS_NAME}" == "linux" ]; then
|
||||||
sudo apt-get install -qq lua5.2
|
sudo apt-get update -qq && \
|
||||||
|
sudo apt-get install -qq lua5.2
|
||||||
|
elif [ "${TRAVIS_OS_NAME}" == "osx" ]; then
|
||||||
|
brew install lua
|
||||||
|
fi
|
||||||
|
|
||||||
if [ `git name-rev --tags --name-only $(git rev-parse HEAD)` == "undefined" ]; then export APPLICATION_VERSION=`lua5.2 -e 'for line in io.lines("config.h") do local m = string.match(line, "#define GTA5SYNC_APPVER \"(.+)\"$"); if m then print(m); os.exit(0) end end'`; else export APPLICATION_VERSION=`git name-rev --tags --name-only $(git rev-parse HEAD)`; fi
|
if [ `git name-rev --tags --name-only $(git rev-parse HEAD)` == "undefined" ]; then export APPLICATION_VERSION=`lua -e 'for line in io.lines("config.h") do local m = string.match(line, "#define GTA5SYNC_APPVER \"(.+)\"$"); if m then print(m); os.exit(0) end end'`; else export APPLICATION_VERSION=`git name-rev --tags --name-only $(git rev-parse HEAD)`; fi
|
||||||
export PACKAGE_VERSION=$(grep -oE '^[^\-]*' <<< $APPLICATION_VERSION)
|
export PACKAGE_VERSION=$(grep -oE '^[^\-]*' <<< $APPLICATION_VERSION)
|
||||||
export PACKAGE_BUILD=$(grep -oP '\-\K.+' <<< $APPLICATION_VERSION)
|
export PACKAGE_BUILD=$(grep -oP '\-\K.+' <<< $APPLICATION_VERSION)
|
||||||
export EXECUTABLE_VERSION=${PACKAGE_VERSION}${PACKAGE_BUILD}
|
export EXECUTABLE_VERSION=${PACKAGE_VERSION}${PACKAGE_BUILD}
|
||||||
if [ "$PACKAGE_BUILD" == "" ]; then export PACKAGE_BUILD=${TRAVIS_BUILD_NUMBER}; fi
|
if [[ ! ${PACKAGE_BUILD} ]]; then export PACKAGE_BUILD=${TRAVIS_BUILD_NUMBER}; fi
|
||||||
export PROJECT_DIR=$(pwd)
|
export PROJECT_DIR=$(pwd)
|
||||||
|
|
||||||
.travis/${BUILD_SCRIPT}
|
.travis/${BUILD_SCRIPT}
|
||||||
|
|
Loading…
Reference in a new issue