1
0
mirror of https://gitlab.com/kelteseth/ScreenPlay.git synced 2024-11-22 10:42:29 +01:00

Refactor CI to only include what we currently use

Refactor osx build with universal binary support
Rename release to deploy version to make it less confusing
This commit is contained in:
Elias Steurer 2022-08-14 11:58:41 +02:00
parent 472e341440
commit cd5933a7e4
7 changed files with 135 additions and 308 deletions

View File

@ -1,14 +1,86 @@
stages:
- build
- release
- build_steam
- build_standalone
- check
- test
variables:
GIT_STRATEGY: clone
QT_VERSION: 6.3.1
PYTHON_VERSION: 3.10.1
build_standalone:windows:
stage: build
tags:
- windows10
script:
- python -m pip install -U pip wheel
- python -m pip install -U aqtinstall
- python -m aqt install-qt -O ../aqt windows desktop $QT_VERSION win64_msvc2019_64 -m all
- python -m aqt install-tool -O ../aqt windows desktop tools_ifw
- cd Tools
- python setup.py
- python build.py -type release -use-aqt -installer -deploy
artifacts:
expire_in: "never"
paths:
- build-x64-windows-release/bin/
- build-x64-windows-release/ScreenPlay-Installer.exe
build_standalone:osx:
stage: build
tags:
- osx
script:
- pip3 install -U pip
- pip3 install aqtinstall
- python3 -m aqt install-qt -O ../aqt mac desktop $QT_VERSION clang_64 -m all
- python3 -m aqt install-tool -O ../aqt mac desktop tools_ifw
- cd Tools
- python3 setup.py
- python3 build.py -type release -use-aqt -deploy -architecture x64
- python3 build.py -type release -use-aqt -deploy -architecture arm64
- python3 macos_lipo.py
artifacts:
expire_in: "never"
paths:
- build-universal-osx-release/bin/
build_steam:windows:
stage: build
tags:
- windows10
script:
- python -m pip install -U pip wheel
- python -m pip install -U aqtinstall
- python -m aqt install-qt -O ../aqt windows desktop $QT_VERSION win64_msvc2019_64 -m all
- python -m aqt install-tool -O ../aqt windows desktop tools_ifw
- cd Tools
- python setup.py
- python build.py -type release -steam -use-aqt -deploy
artifacts:
expire_in: "never"
paths:
- build-x64-windows-release/bin/
build_steam:osx:
stage: build
tags:
- osx
script:
- pip3 install -U pip
- pip3 install aqtinstall
- python3 -m aqt install-qt -O ../aqt mac desktop $QT_VERSION clang_64 -m all
- python3 -m aqt install-tool -O ../aqt mac desktop tools_ifw
- cd Tools
- python3 setup.py
- python3 build.py -type release -steam -use-aqt -deploy -architecture x64
- python3 build.py -type release -steam -use-aqt -deploy -architecture arm64
- python3 macos_lipo.py
artifacts:
expire_in: "4 weeks"
paths:
- build-universal-osx-release/bin/
check:
stage: check
allow_failure: true
@ -26,271 +98,6 @@ check:
- python clang_format.py
- python cmake_format.py
build:windows_release:
stage: build
tags:
- windows10
script:
- python -m pip install -U pip wheel
- python -m pip install -U aqtinstall
- python -m aqt install-qt -O ../aqt windows desktop $QT_VERSION win64_msvc2019_64 -m all
- python -m aqt install-tool -O ../aqt windows desktop tools_ifw
- cd Tools
- python setup.py
- python build.py -type release -use-aqt -installer
artifacts:
expire_in: "never"
paths:
- build-x64-windows-release/bin/
- build-x64-windows-release/ScreenPlay-Installer.exe
build:windows_release_steam:
stage: build
tags:
- windows10
script:
- python -m pip install -U pip wheel
- python -m pip install -U aqtinstall
- python -m aqt install-qt -O ../aqt windows desktop $QT_VERSION win64_msvc2019_64 -m all
- python -m aqt install-tool -O ../aqt windows desktop tools_ifw
- cd Tools
- python setup.py
- python build.py -type release -steam -use-aqt
artifacts:
expire_in: "never"
paths:
- build-x64-windows-release/bin/
build:osx_release:
stage: build
tags:
- osx
script:
- pip3 install -U pip
- pip3 install aqtinstall
- python3 -m aqt install-qt -O ../aqt mac desktop $QT_VERSION clang_64 -m all
- python3 -m aqt install-tool -O ../aqt mac desktop tools_ifw
- cd Tools
- python3 setup.py
- python3 build.py -type release -use-aqt -installer -architecture x64
- python3 build.py -type release -use-aqt -installer -architecture arm64
artifacts:
expire_in: "never"
paths:
- build-x64-osx-release/bin/
- build-arm-osx-release/bin/
- build-x64-osx-release/ScreenPlay-Installer.dmg
- build-arm-osx-release/ScreenPlay-Installer.dmg
build:osx_release_steam:
stage: build
tags:
- osx
script:
- pip3 install -U pip
- pip3 install aqtinstall
- python3 -m aqt install-qt -O ../aqt mac desktop $QT_VERSION clang_64 -m all
- python3 -m aqt install-tool -O ../aqt mac desktop tools_ifw
- cd Tools
- python3 setup.py
- python3 build.py -type release -steam -use-aqt -architecture x64
- python3 build.py -type release -steam -use-aqt -architecture arm64
artifacts:
expire_in: "never"
paths:
- build-x64-osx-release/bin/
- build-arm-osx-release/bin/
build:linux_release:
stage: build
image:
name: ubuntu:20.04
tags:
- gitlab-org-docker
script:
- apt update -y
# We need cmake 3.23 to fix IFW
- apt install gpg wget -y
- wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | tee /usr/share/keyrings/kitware-archive-keyring.gpg >/dev/null
- echo 'deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ focal-rc main' | tee -a /etc/apt/sources.list.d/kitware.list >/dev/null
- apt update -y
# Otherwise libglib2 needs interaction
- export DEBIAN_FRONTEND=noninteractive
- apt install mesa-common-dev libxkbcommon-* libfontconfig curl zip unzip tar git pkg-config apt-transport-https ca-certificates gnupg software-properties-common wget software-properties-common wget python3-pip build-essential libgl1-mesa-dev lld ninja-build cmake -y
- pip3 install -U pip
- pip3 install aqtinstall
- python3 -m aqt install-qt -O ../aqt linux desktop $QT_VERSION gcc_64 -m all
- python3 -m aqt install-tool -O ../aqt linux desktop tools_ifw
- cd Tools
- python3 setup.py
- python3 build.py -type release -steam -use-aqt -installer
artifacts:
expire_in: "never"
paths:
- build-x64-linux-release/bin/
release:windows_steam:
stage: build
tags:
- windows10
script:
- python -m pip install -U pip wheel
- python -m pip install -U aqtinstall
- python -m aqt install-qt -O ../aqt windows desktop $QT_VERSION win64_msvc2019_64 -m all
- python -m aqt install-tool -O ../aqt windows desktop tools_ifw
- cd Tools
- python setup.py
- python build.py -type release -use-aqt -steam
only:
- release
artifacts:
expire_in: "never"
paths:
- build-x64-windows-release/bin/
release:windows_standalone:
stage: build
tags:
- windows10
script:
- python -m pip install -U pip wheel
- python -m pip install -U aqtinstall
- python -m aqt install-qt -O ../aqt windows desktop $QT_VERSION win64_msvc2019_64 -m all
- python -m aqt install-tool -O ../aqt windows desktop tools_ifw
- cd Tools
- python setup.py
- python build.py -type release -use-aqt -installer
only:
- release
artifacts:
expire_in: "never"
paths:
- build-x64-windows-release/bin/
- build-x64-windows-release/ScreenPlay-Installer.exe
release:osx_steam:
stage: build
tags:
- osx
script:
- pip3 install -U pip
- pip3 install aqtinstall
- python -m aqt install-qt -O ../aqt mac desktop $QT_VERSION clang_64 -m all
- python -m aqt install-tool -O ../aqt mac desktop tools_ifw
- cd Tools
- python3 setup.py
- python3 build.py -type release -steam -use-aqt -sign -architecture x64
- python3 build.py -type release -steam -use-aqt -sign -architecture arm64
only:
- release
artifacts:
expire_in: "never"
paths:
- build-x64-osx-release/bin/
- build-arm-osx-release/bin/
release:osx_standalone:
stage: build
tags:
- osx
script:
- pip3 install -U pip
- pip3 install aqtinstall
- python3 -m aqt install-qt -O ../aqt mac desktop $QT_VERSION clang_64 -m all
- python3 -m aqt install-tool -O ../aqt mac desktop tools_ifw
- cd Tools
- python3 setup.py
- python3 build.py -type release -installer -use-aqt -sign
only:
- release
artifacts:
expire_in: "never"
paths:
- build-x64-osx-release/bin/
- build-arm-osx-release/bin/
- build-x64-osx-release/ScreenPlay-Installer.dmg
- build-arm-osx-release/ScreenPlay-Installer.dmg
release:linux_steam:
stage: build
image:
name: ubuntu:20.04
tags:
- gitlab-org-docker
script:
- apt update -y
# We need cmake 3.23 to fix IFW
- apt install gpg wget -y
- wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | tee /usr/share/keyrings/kitware-archive-keyring.gpg >/dev/null
- echo 'deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ focal-rc main' | tee -a /etc/apt/sources.list.d/kitware.list >/dev/null
- apt update -y
# Otherwise libglib2 needs interaction
- export DEBIAN_FRONTEND=noninteractive
- apt install mesa-common-dev libxkbcommon-* libfontconfig curl zip unzip tar git pkg-config apt-transport-https ca-certificates gnupg software-properties-common wget software-properties-common wget python3-pip build-essential libgl1-mesa-dev lld ninja-build cmake -y
- pip3 install -U pip
- pip3 install aqtinstall
- python3 -m aqt install-qt -O ../aqt linux desktop $QT_VERSION gcc_64 -m all
- python3 -m aqt install-tool -O ../aqt linux desktop tools_ifw
- curl -OL $CQTDEPLOYER_URL
- chmod +x ./CQtDeployer_*.deb
- apt install ./CQtDeployer_*.deb -y
- cd Tools
- python3 setup.py
- python3 build.py -type release -steam -use-aqt
only:
- release
artifacts:
expire_in: "never"
paths:
- build-x64-linux-release/bin/
release:linux_standalone:
stage: build
image:
name: ubuntu:20.04
tags:
- gitlab-org-docker
script:
- apt update -y
# We need cmake 3.23 to fix IFW
- apt install gpg wget -y
- wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | tee /usr/share/keyrings/kitware-archive-keyring.gpg >/dev/null
- echo 'deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ focal-rc main' | tee -a /etc/apt/sources.list.d/kitware.list >/dev/null
- apt update -y
# Otherwise libglib2 needs interaction
- export DEBIAN_FRONTEND=noninteractive
- apt install mesa-common-dev libxkbcommon-* libfontconfig curl zip unzip tar git pkg-config apt-transport-https ca-certificates gnupg software-properties-common wget software-properties-common wget python3-pip build-essential libgl1-mesa-dev lld ninja-build cmake -y
- pip3 install -U pip
- pip3 install aqtinstall
- python3 -m aqt install-qt -O ../aqt linux desktop $QT_VERSION gcc_64 -m all
- python3 -m aqt install-tool -O ../aqt linux desktop tools_ifw
- cd Tools
- python3 setup.py
- python3 build.py -type release -installer -use-aqt
only:
- release
artifacts:
expire_in: "never"
paths:
- build-x64-linux-release/bin/
test:windows_release:
stage: test
tags:
- shared-windows
dependencies:
- build:windows_release
needs:
- build:windows_release
script:
- ./build-x64-windows-release/bin/ScreenPlay.exe --no-run=false --exit=true --reporters=junit --out=test-report-junit.xml
artifacts:
expire_in: "never"
when: always
reports:
junit: test-report-junit.xml
build_docs:
stage: .post
script:

View File

@ -42,7 +42,7 @@ set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CMake" ${CMAKE_MODULE_PATH})
# they both need other QML dependencies like ScreenPlayUtil.
# The fastest way is to use a shared QML module path for development
# and add this path to the qml engines import pah.
# For the SCREENPLAY_RELEASE we copy them into the matching dirs
# For the SCREENPLAY_DEPLOY we copy them into the matching dirs
# via the build.py
#
# This subdirectoy is needed for OSX and Linux to fix linker errors because
@ -61,7 +61,7 @@ set(VCPKG_INSTALLED_PATH "${VCPKG_PATH}/installed/${VCPKG_ARCH}")
set(VCPKG_BIN_PATH "${VCPKG_INSTALLED_PATH}/bin")
option(SCREENPLAY_STEAM "For FOSS distribution so we do not bundle proprietary code." ON)
option(SCREENPLAY_RELEASE "Marks this version as an official release version. This version uses different import paths and other settings." OFF)
option(SCREENPLAY_DEPLOY "Marks this version as an official deploy version. This version uses different import paths and other settings." OFF)
option(SCREENPLAY_TESTS "Enables UI tests." ON)
option(SCREENPLAY_INSTALLER "Indicates whether an installer via the Qt Installer Framework is created." OFF)
@ -74,8 +74,8 @@ file(MAKE_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
add_compile_definitions(COMPILE_INFO="Build Date: ${BUILD_DATE}. Git Hash: ${GIT_COMMIT_HASH}. ")
add_compile_definitions(SOURCE_DIR="${CMAKE_CURRENT_SOURCE_DIR}")
if(${SCREENPLAY_RELEASE})
add_compile_definitions(RELEASE_VERSION)
if(${SCREENPLAY_DEPLOY})
add_compile_definitions(DEPLOY_VERSION)
endif()
@ -152,12 +152,12 @@ if(${SCREENPLAY_INSTALLER})
include(${CMAKE_CURRENT_SOURCE_DIR}/CMake/CreateIFWInstaller.cmake)
endif()
message(STATUS "[CPP DEFINE] RELEASE_VERSION = ${RELEASE_VERSION}")
message(STATUS "[CPP DEFINE] DEPLOY_VERSION = ${DEPLOY_VERSION}")
message(STATUS "[CPP DEFINE] SOURCE_DIR = ${CMAKE_CURRENT_SOURCE_DIR}")
message(STATUS "[CPP DEFINE] BUILD_DATE = ${BUILD_DATE}")
message(STATUS "[DEFINE] BUILD_TYPE = ${CMAKE_BUILD_TYPE}")
message(STATUS "[DEFINE] GIT_COMMIT_HASH = ${GIT_COMMIT_HASH}")
message(STATUS "[OPTION] SCREENPLAY_RELEASE = ${SCREENPLAY_RELEASE}")
message(STATUS "[OPTION] SCREENPLAY_DEPLOY = ${SCREENPLAY_DEPLOY}")
message(STATUS "[OPTION] SCREENPLAY_INSTALLER = ${SCREENPLAY_INSTALLER}")
message(STATUS "[OPTION] SCREENPLAY_STEAM = ${SCREENPLAY_STEAM}")
message(STATUS "[OPTION] SCREENPLAY_TESTS = ${SCREENPLAY_TESTS}")

View File

@ -66,7 +66,7 @@ Settings::Settings(const std::shared_ptr<GlobalVariables>& globalVariables,
qmlRegisterUncreatableType<Settings>("Settings", 1, 0, "Settings", "Error only for enums");
// Lets not set the dev version as startup.
#ifdef RELEASE_VERSION
#ifdef DEPLOY_VERSION
if (desktopEnvironment() == DesktopEnvironment::Windows) {
QSettings settings("HKEY_CURRENT_USER\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run", QSettings::NativeFormat);
if (!settings.childGroups().contains("ScreenPlay", Qt::CaseSensitive)) {

View File

@ -74,7 +74,7 @@ class BuildConfig:
root_path: str
cmake_osx_architectures: str
cmake_target_triplet: str
deploy_command: str
package_command: str
executable_file_ending: str
qt_path: str
qt_bin_path: str
@ -94,7 +94,7 @@ class BuildConfig:
# CMake variables need str: "ON" or "OFF"
build_steam: str
build_tests: str
build_release: str
build_deploy: str
build_type: str
build_architecture: str
create_installer: str
@ -128,7 +128,7 @@ def execute(
build_result = build(build_config, build_result)
# Copies all needed libraries and assets into the bin folder
deploy(build_config)
package(build_config)
# Creates a Qt InstallerFrameWork (IFW) installer
if build_config.create_installer == "ON":
@ -180,7 +180,7 @@ def setup(build_config: BuildConfig, build_result: BuildResult) -> Tuple[BuildCo
";" + str(build_config.qt_bin_path) + "\\bin"
os.environ.update(vs_env_dict)
# NO f string we fill it later!
build_config.deploy_command = "windeployqt.exe --{type} --qmldir ../../{app}/qml {app}{executable_file_ending}"
build_config.package_command = "windeployqt.exe --{type} --qmldir ../../{app}/qml {app}{executable_file_ending}"
build_config.aqt_install_qt_packages = f"windows desktop {build_config.qt_version} win64_msvc2019_64 -m all"
build_config.aqt_install_tool_packages = "windows desktop tools_ifw"
@ -201,7 +201,7 @@ def setup(build_config: BuildConfig, build_result: BuildResult) -> Tuple[BuildCo
build_config.qt_bin_path = build_config.aqt_path.joinpath(
f"{build_config.qt_version}/macos") if build_config.use_aqt else Path(f"~/Qt/{build_config.qt_version}/macos")
# NO f string we fill it later!
build_config.deploy_command = "{prefix_path}/bin/macdeployqt {app}.app -qmldir=../../{app}/qml -executable={app}.app/Contents/MacOS/{app}"
build_config.package_command = "{prefix_path}/bin/macdeployqt {app}.app -qmldir=../../{app}/qml -executable={app}.app/Contents/MacOS/{app}"
build_config.aqt_install_qt_packages = f"mac desktop {build_config.qt_version} clang_64 -m all"
build_config.aqt_install_tool_packages = "mac desktop tools_ifw"
@ -268,7 +268,7 @@ def build(build_config: BuildConfig, build_result: BuildResult) -> BuildResult:
-DCMAKE_TOOLCHAIN_FILE={build_config.cmake_toolchain_file} \
-DSCREENPLAY_STEAM={build_config.build_steam} \
-DSCREENPLAY_TESTS={build_config.build_tests} \
-DSCREENPLAY_RELEASE={build_config.build_release} \
-DSCREENPLAY_DEPLOY={build_config.build_deploy} \
-DSCREENPLAY_INSTALLER={build_config.create_installer} \
-DSCREENPLAY_IFW_ROOT:STRING={build_config.ifw_root_path} \
-G "CodeBlocks - Ninja" \
@ -284,23 +284,23 @@ def build(build_config: BuildConfig, build_result: BuildResult) -> BuildResult:
return build_result
def deploy(build_config: BuildConfig):
def package(build_config: BuildConfig):
if platform.system() == "Windows" or platform.system() == "Darwin":
print("Executing deploy commands...")
run(build_config.deploy_command.format(
run(build_config.package_command.format(
type=build_config.build_type,
prefix_path=build_config.qt_bin_path,
app="ScreenPlay",
executable_file_ending=build_config.executable_file_ending), cwd=build_config.bin_dir)
run(build_config.deploy_command.format(
run(build_config.package_command.format(
type=build_config.build_type,
prefix_path=build_config.qt_bin_path,
app="ScreenPlayWidget",
executable_file_ending=build_config.executable_file_ending), cwd=build_config.bin_dir)
run(build_config.deploy_command.format(
run(build_config.package_command.format(
type=build_config.build_type,
prefix_path=build_config.qt_bin_path,
app="ScreenPlayWallpaper",
@ -343,13 +343,17 @@ def deploy(build_config: BuildConfig):
# Copy qml dir into all .app/Contents/MacOS/
if platform.system() == "Darwin":
copytree(Path.joinpath(build_config.bin_dir, "qml"), Path.joinpath(
qml_plugins_path = Path.joinpath(build_config.bin_dir, "qml")
copytree(qml_plugins_path, Path.joinpath(
build_config.bin_dir, "ScreenPlay.app/Contents/MacOS/qml"))
copytree(Path.joinpath(build_config.bin_dir, "qml"), Path.joinpath(
copytree(qml_plugins_path, Path.joinpath(
build_config.bin_dir, "ScreenPlayWallpaper.app/Contents/MacOS/qml"))
copytree(Path.joinpath(build_config.bin_dir, "qml"), Path.joinpath(
copytree(qml_plugins_path, Path.joinpath(
build_config.bin_dir, "ScreenPlayWidget.app/Contents/MacOS/qml"))
print(f"Deleting qml plugins path: {qml_plugins_path}")
shutil.rmtree(qml_plugins_path)
# Some dlls like openssl do no longer get copied automatically.
# Lets just copy all of them into bin.
if platform.system() == "Windows":
@ -388,6 +392,7 @@ def sign(build_config: BuildConfig):
run("codesign --verify --verbose=4 \"ScreenPlayWidget.app/\"",
cwd=build_config.bin_dir)
# TODO: Replace with https://github.com/akeru-inc/xcnotary/issues/22#issuecomment-1179170957
run("xcnotary notarize ScreenPlay.app -d kelteseth@gmail.com -k ScreenPlay",
cwd=build_config.bin_dir),
run("xcnotary notarize ScreenPlayWallpaper.app -d kelteseth@gmail.com -k ScreenPlay",
@ -468,8 +473,8 @@ if __name__ == "__main__":
help="Build tests.")
parser.add_argument('-installer', action="store_true", dest="create_installer",
help="Create a installer.")
parser.add_argument('-release', action="store_true", dest="build_release",
help="Create a release version of ScreenPlay for sharing with the world. This is not about debug/release build, but the c++ define SCREENPLAY_RELEASE.")
parser.add_argument('-deploy', action="store_true", dest="build_deploy",
help="Create a deploy version of ScreenPlay for sharing with the world. A not deploy version is for local development only!")
parser.add_argument('-architecture', action="store", dest="build_architecture",
help="Sets the build architecture. Used to build x86 and ARM osx versions. Currently only works with x86_64 and arm64")
args = parser.parse_args()
@ -503,9 +508,9 @@ if __name__ == "__main__":
if args.build_tests:
build_tests = "ON"
build_release = "OFF"
if args.build_release:
build_release = "ON"
build_deploy = "OFF"
if args.build_deploy:
build_deploy = "ON"
create_installer = "OFF"
if args.create_installer:
@ -523,7 +528,7 @@ if __name__ == "__main__":
build_config.qt_ifw_version = qt_ifw_version
build_config.build_steam = build_steam
build_config.build_tests = build_tests
build_config.build_release = build_release
build_config.build_deploy = build_deploy
build_config.create_installer = create_installer
build_config.build_type = build_type
build_config.sign_build = args.sign_build

View File

@ -9,9 +9,9 @@ import paramiko
if __name__ == "__main__":
parser = argparse.ArgumentParser(description='Build and Package ScreenPlay')
parser.add_argument('-steam_password', '-sp', action="store", dest="steam_password", required=True, help="Steam password")
parser.add_argument('-hosting_username','-hu', action="store", dest="hosting_username", required=True, help="ssh username")
parser.add_argument('-hosting_password', '-hp', action="store", dest="hosting_password", required=True, help="ssh password")
parser.add_argument('-steam_password', '-sp', action="store", dest="steam_password", help="Steam password")
parser.add_argument('-hosting_username','-hu', action="store", dest="hosting_username", help="ssh username")
parser.add_argument('-hosting_password', '-hp', action="store", dest="hosting_password", help="ssh password")
args = parser.parse_args()
# Script needs to run in the tools folder
@ -28,7 +28,7 @@ if __name__ == "__main__":
build_config.qt_ifw_version = "4.4"
build_config.build_steam = "ON"
build_config.build_tests = "OFF"
build_config.build_release = "ON"
build_config.build_deploy = "ON"
build_config.create_installer = "ON"
build_config.build_type = "release"
build_config.sign_build = True
@ -36,6 +36,8 @@ if __name__ == "__main__":
if platform.system() == "Darwin":
# We do not yet support a standalone osx installer
build_config.create_installer = "OFF"
# OSX builds needs to build for x86 and arm
# and also be signed!
@ -69,10 +71,12 @@ if __name__ == "__main__":
sftp.close()
ssh.close()
# Make sure to reset to tools path
os.chdir(tools_path)
steam_publish.publish(
steam_username="tachiom",
steam_password=args.steam_password,
set_live_branch_name="internal"
)
#os.chdir(tools_path)
#steam_publish.publish(
# steam_username="tachiom",
# steam_password=args.steam_password,
# set_live_branch_name="internal"
#)

View File

@ -10,7 +10,7 @@ from shutil import copytree
from pathlib import Path
from concurrent.futures import ThreadPoolExecutor
from datetime import datetime
from util import run
from util import run, run_and_capture_output
def listfiles(path):
files = []
@ -23,7 +23,7 @@ def listfiles(path):
if Path(fname).suffix in extensions and not fname in ignored:
file = path + os.path.join(dir, fname)
if(os.path.isfile(file)):
print(file)
#print(file)
files.append(file)
return files
@ -79,10 +79,13 @@ def check_fat_binary():
files = listfiles(str(Path.joinpath(root_path, dir)))
for file in files:
run(f"lipo -info {file}")
out = run_and_capture_output(f"lipo -info {file}")
if out.startswith('Non-fat'):
print(out)
if __name__ == "__main__":
run_lipo()
#run_lipo()
check_fat_binary()
#create_fat_binary()

View File

@ -12,6 +12,14 @@ def run(cmd, cwd=Path.cwd()):
if result.returncode != 0:
raise RuntimeError(f"Failed to execute {cmd}")
def run_and_capture_output(cmd, cwd=Path.cwd()) -> str:
result = subprocess.run(cmd, shell=True, cwd=cwd, stdout=subprocess.PIPE)
if result.returncode != 0:
print(f"Failed to execute {cmd}")
if result.stdout is not None:
return str(result.stdout.decode('utf-8'))
return ""
def cd_repo_root_path() -> str:
# Make sure the script is always started from the same
# ScreenPlay root folder