GitHub android ci (#767)

* try this matrix thing

* syntax error

* use my own qt installer so it actually works

* allow changing path

* whoops cant have it twice

* get the right version of discord rpc

* get correct bass

* try to fix windows

* overwrite bass files

* forgot to delete these

* here's your version bro

* what did we even use catch2 for??

* linux doesnt have a c folder

* android bass

* switch from cmake to qmake

* opus dylib

* we don't install

* put bass in a subfolder so we don't build the stupid examples

* was using wrong arch for android

* fix up gitignore

* get correct artifact folder

* lets hope qmake will ignore the ABI for all the other platforms

* use platform name for artifact

* copy dlls into bin folder

* lmao i yeeted the folder

* create folder

* use more recent mingw

* windows uses dlls

* 2017 doesn't work

* our libs are 64 bit

* install msvc

* shitty ms documentation

* ok ms

* wrong directory for deploy

* copy apng

* use correct image for msvc2019

* deploy android

* 32bit windows it is

* adroideploy

* try this

* Update build.yml

* move libs

* armeabi-v7a

* fix android build files

* only get linux bass for linux

* don't try to install discord on android

* deploy mac

* get rid of double permission warning

* define filename for APK

* add mac dependencies

* put android bass in the correct folder

* mac apng

* android apng

* remove old CI

* ask for storage permissions

* qt bug ..........

* update clang-tidy-review

* update everything

* fuck you lukka

* fuck you jurplel for merging that shitty PR that broke everything

* give it what it wants

* Update clang-tidy-review.yml

* github is failing it because it's too big

* wait for the user and request a proper permission string

* underscore moment

* use write external storage instead

* try this instead

* 082 fails with docker again
This commit is contained in:
stonedDiscord 2022-05-24 21:16:04 +02:00 committed by GitHub
parent 868c26f52e
commit d87371b65e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
16 changed files with 17910 additions and 477 deletions

View File

@ -1,176 +1,213 @@
name: build
name: CI build
on: push
on: [push]
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
jobs:
windows:
runs-on: windows-latest
build:
strategy:
fail-fast: false
matrix:
version:
- 5.15.1
platform:
- gcc_64
- android
- msvc2019
- mingw81_32
- clang_64
include:
- platform: gcc_64
os: ubuntu-latest
- platform: android
os: ubuntu-latest
- platform: msvc2019
os: windows-2019
- platform: mingw81_32
os: windows-latest
- platform: clang_64
os: macos-latest
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@master
with:
submodules: recursive
- uses: actions/setup-python@master
- name: actions/cache qt
uses: actions/cache@master
id: cache
with:
path: qt/${{matrix.version}}/${{matrix.platform}}
key: qt-${{matrix.version}}-${{matrix.platform}}
- name: Install Catch2
shell: bash
run: |
curl -L https://github.com/catchorg/Catch2/archive/v2.13.4.tar.gz -o catch2.tar.gz
tar xvf catch2.tar.gz
cd Catch2-2.13.4
cmake -Bbuild -H. -DBUILD_TESTING=OFF
cmake --build build/ --target install
- name: Add msbuild to PATH
if: matrix.platform == 'msvc2019'
uses: microsoft/setup-msbuild@master
- name: Fetch external libs
run: |
# QtApng
curl -L https://github.com/Skycoder42/QtApng/releases/download/1.1.4/qtapng-msvc2017_64-5.14.1.zip -o apng.zip
unzip apng.zip
- uses: stonedDiscord/action-setup-qt@master
id: qt
with:
version: 5.15.1
platform: ${{matrix.platform}}
# discord-rpc
curl -L https://github.com/discordapp/discord-rpc/releases/download/v3.4.0/discord-rpc-win.zip -o discord_rpc_win.zip
unzip discord_rpc_win.zip
cp ./discord-rpc/win64-dynamic/lib/discord-rpc.lib ./lib
- name: Install QtApng
run: |
git clone https://github.com/Skycoder42/QtApng.git
cd QtApng
qmake CONFIG+=install_ok QT_PLATFORM=${{matrix.platform}}
${{steps.qt.outputs.make}} qmake_all
${{steps.qt.outputs.make}}
${{steps.qt.outputs.make}} INSTALL_ROOT="${{steps.qt.outputs.installdir}}" install
# BASS
curl http://www.un4seen.com/files/bass24.zip -o bass.zip
unzip bass.zip
cp ./c/x64/bass.lib ./lib
- name: Create bin folder
run: |
mkdir bin
# BASS MIDI
curl http://www.un4seen.com/files/bassmidi24.zip -o bassmidi.zip
unzip bassmidi.zip
cp ./c/x64/bassmidi.lib ./lib
- name: Install Windows Discord RPC
if: contains(matrix.os, 'windows')
run: |
curl -L https://github.com/discordapp/discord-rpc/releases/download/v3.4.0/discord-rpc-win.zip -o discord_rpc.zip
unzip discord_rpc.zip
cp ./discord-rpc/win32-dynamic/lib/discord-rpc.lib ./lib/
cp ./discord-rpc/win32-dynamic/bin/discord-rpc.dll ./bin/
# BASS Opus
curl http://www.un4seen.com/files/bassopus24.zip -o bassopus.zip
unzip bassopus.zip
cp ./c/x64/bassopus.lib ./lib
- name: Install Linux Discord RPC
if: matrix.platform == 'gcc_64'
run: |
curl -L https://github.com/discordapp/discord-rpc/releases/download/v3.4.0/discord-rpc-linux.zip -o discord_rpc.zip
unzip discord_rpc.zip
cp ./discord-rpc/linux-dynamic/lib/libdiscord-rpc.so ./lib/
cp ./discord-rpc/linux-dynamic/lib/libdiscord-rpc.so ./bin/
- name: Cache Qt
id: cache-qt
uses: actions/cache@v1
with:
path: ../Qt
key: ${{ runner.os }}-qt5
- name: Install Mac Discord RPC
if: matrix.os == 'macos-latest'
run: |
curl -L https://github.com/discordapp/discord-rpc/releases/download/v3.4.0/discord-rpc-osx.zip -o discord_rpc.zip
unzip discord_rpc.zip
cp ./discord-rpc/osx-dynamic/lib/libdiscord-rpc.dylib ./lib/
cp ./discord-rpc/osx-dynamic/lib/libdiscord-rpc.dylib ./bin/
- name: Install Qt
uses: jurplel/install-qt-action@v2
with:
version: '5.15.2'
cached: ${{steps.cache-qt.outputs.cache-hit}}
- name: Install Windows BASS
if: contains(matrix.os, 'windows')
run: |
curl http://www.un4seen.com/files/bass24.zip -o bass.zip
unzip -d bass -o bass.zip
cp ./bass/c/bass.lib ./lib/
cp ./bass/bass.dll ./bin/
- name: Create Build Environment
run: cmake -E make_directory ${{github.workspace}}/build
curl http://www.un4seen.com/files/bassmidi24.zip -o bassmidi.zip
unzip -d bass -o bassmidi.zip
cp ./bass/c/bassmidi.lib ./lib/
cp ./bass/bassmidi.dll ./bin/
- name: Configure CMake
shell: bash
working-directory: ${{github.workspace}}/build
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE
curl http://www.un4seen.com/files/bassopus24.zip -o bassopus.zip
unzip -d bass -o bassopus.zip
cp ./bass/c/bassopus.lib ./lib/
cp ./bass/bassopus.dll ./bin/
- name: Build
working-directory: ${{github.workspace}}/build
shell: bash
run: cmake --build . --config $BUILD_TYPE --target Attorney_Online
- name: Install Linux BASS
if: matrix.platform == 'gcc_64'
run: |
curl http://www.un4seen.com/files/bass24-linux.zip -o bass.zip
unzip -d bass -o bass.zip
cp ./bass/x64/libbass.so ./lib/
cp ./bass/x64/libbass.so ./bin/
- name: Deploy
working-directory: ${{github.workspace}}/build/Release
shell: bash
run: |
windeployqt .
cp ../../msvc2017_64/plugins/imageformats/qapng.dll ./imageformats/
cp ../../discord-rpc/win64-dynamic/bin/discord-rpc.dll .
cp ../../x64/bass.dll .
cp ../../x64/bassmidi.dll .
cp ../../x64/bassopus.dll .
curl http://www.un4seen.com/files/bassmidi24-linux.zip -o bassmidi.zip
unzip -d bass -o bassmidi.zip
cp ./bass/x64/libbassmidi.so ./lib/
cp ./bass/x64/libbassmidi.so ./bin/
- name: Upload Artifact
uses: actions/upload-artifact@v2
with:
name: Attorney_Online-x64
path: ${{github.workspace}}/build/Release/
curl http://www.un4seen.com/files/bassopus24-linux.zip -o bassopus.zip
unzip -d bass -o bassopus.zip
cp ./bass/x64/libbassopus.so ./lib/
cp ./bass/x64/libbassopus.so ./bin/
# linux:
# # The CMake configure and build commands are platform agnostic and should work equally
# # well on Windows or Mac. You can convert this to a matrix build if you need
# # cross-platform coverage.
# # See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
# runs-on: ubuntu-20.04
- name: Install Mac BASS
if: matrix.os == 'macos-latest'
run: |
curl http://www.un4seen.com/files/bass24-osx.zip -o bass.zip
unzip -d bass -o bass.zip
cp ./bass/libbass.dylib ./lib/
cp ./bass/libbass.dylib ./bin/
# steps:
# - uses: actions/checkout@v2
curl http://www.un4seen.com/files/bassmidi24-osx.zip -o bassmidi.zip
unzip -d bass -o bassmidi.zip
cp ./bass/libbassmidi.dylib ./lib/
cp ./bass/libbassmidi.dylib ./bin/
# - name: Install catch2
# run: |
# curl -L https://github.com/catchorg/Catch2/archive/v2.13.4.tar.gz -o catch2.tar.gz
# tar xvf catch2.tar.gz
# cd Catch2-2.13.4
# cmake -Bbuild -H. -DBUILD_TESTING=OFF
# sudo cmake --build build/ --target install
curl http://www.un4seen.com/files/bassopus24-osx.zip -o bassopus.zip
unzip -d bass -o bassopus.zip
cp ./bass/libbassopus.dylib ./lib/
cp ./bass/libbassopus.dylib ./bin/
# - name: Fetch external libs
# run: |
# # Download
# curl http://www.un4seen.com/files/bass24-linux.zip -o bass_linux.zip
# curl http://www.un4seen.com/files/bassopus24-linux.zip -o bassopus_linux.zip
# curl -L https://github.com/discordapp/discord-rpc/releases/download/v3.4.0/discord-rpc-linux.zip -o discord_rpc_linux.zip
# # Extract
# unzip bass_linux.zip
# unzip bassopus_linux.zip
# unzip discord_rpc_linux.zip
# # Copy
# cp x64/libbass.so lib
# cp x64/libbassopus.so lib
# cp discord-rpc/linux-dynamic/lib/libdiscord-rpc.so lib
- name: Install Android BASS
if: matrix.platform == 'android'
run: |
mkdir ./android/libs/
mkdir ./android/libs/armeabi-v7a/
curl http://www.un4seen.com/files/bass24-android.zip -o bass.zip
unzip -d bass -o bass.zip
cp ./bass/libs/armeabi-v7a/libbass.so ./lib/
cp ./bass/libs/armeabi-v7a/libbass.so ./android/libs/armeabi-v7a/
# - name: Install Qt5
# run: sudo apt update -y && sudo apt install -y qt5-default
curl http://www.un4seen.com/files/bassmidi24-android.zip -o bassmidi.zip
unzip -d bass -o bassmidi.zip
cp ./bass/libs/armeabi-v7a/libbassmidi.so ./lib/
cp ./bass/libs/armeabi-v7a/libbassmidi.so ./android/libs/armeabi-v7a/
# - name: Install QtApng
# run: |
# git clone https://github.com/Skycoder42/QtApng
# cd QtApng
# qmake
# make
# sudo make install
curl http://www.un4seen.com/files/bassopus24-android.zip -o bassopus.zip
unzip -d bass -o bassopus.zip
cp ./bass/libs/armeabi-v7a/libbassopus.so ./lib/
cp ./bass/libs/armeabi-v7a/libbassopus.so ./android/libs/armeabi-v7a/
# - name: Create Build Environment
# # Some projects don't allow in-source building, so create a separate build directory
# # We'll use this as our working directory for all subsequent commands
# run: cmake -E make_directory ${{github.workspace}}/build
- name: qmake
run: |
qmake CONFIG+=install_ok QT_PLATFORM=${{matrix.platform}} ANDROID_ABIS="armeabi-v7a"
# - name: Configure CMake
# # Use a bash shell so we can use the same syntax for environment variable
# # access regardless of the host operating system
# shell: bash
# env:
# CC: gcc-10
# CXX: g++-10
# working-directory: ${{github.workspace}}/build
# # Note the current convention is to use the -S and -B options here to specify source
# # and build directories, but this is only available with CMake 3.13 and higher.
# # The CMake binaries on the Github Actions machines are (as of this writing) 3.12
# run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE
- name: build
run: |
${{steps.qt.outputs.make}}
# - name: Build
# working-directory: ${{github.workspace}}/build
# shell: bash
# # Execute the build. You can specify a specific target with "--target <NAME>"
# run: cmake --build . --config $BUILD_TYPE --target Attorney_Online
- name: Deploy Windows
if: contains(matrix.os, 'windows')
working-directory: ${{github.workspace}}/bin/
shell: bash
run: |
windeployqt .
cp ../QtApng/plugins/imageformats/qapng.dll ./imageformats/
# - name: Strip
# working-directory: ${{github.workspace}}/build
# shell: bash
# run: strip -s Attorney_Online
- name: Deploy Mac
if: matrix.os == 'macos-latest'
working-directory: ${{github.workspace}}/bin/
shell: bash
run: |
macdeployqt Attorney_Online.app
cp ../QtApng/plugins/imageformats/libqapng.dylib ./Attorney_Online.app/Contents/PlugIns/imageformats/
mv *.dylib ./Attorney_Online.app/Contents/Frameworks
install_name_tool -change @loader_path/libbass.dylib @rpath/libbass.dylib ./Attorney_Online.app/Contents/MacOS/Attorney_Online
install_name_tool -change @loader_path/libbassopus.dylib @rpath/libbassopus.dylib ./Attorney_Online.app/Contents/MacOS/Attorney_Online
install_name_tool -change @loader_path/libbassmidi.dylib @rpath/libbassmidi.dylib ./Attorney_Online.app/Contents/MacOS/Attorney_Online
install_name_tool -change @loader_path/libdiscord-rpc.dylib @rpath/libdiscord-rpc.dylib ./Attorney_Online.app/Contents/MacOS/Attorney_Online
install_name_tool -change @loader_path/libqapng.dylib @rpath/libqapng.dylib ./Attorney_Online.app/Contents/MacOS/Attorney_Online
# - name: Compress
# working-directory: ${{github.workspace}}/build
# shell: bash
# run: tar czvf Attorney_Online-linux-x86_64.tgz Attorney_Online
- name: Deploy Android
if: matrix.platform == 'android'
working-directory: ${{github.workspace}}/
shell: bash
run: |
mkdir ./build/libs/
mkdir ./build/libs/armeabi-v7a/
mv ./bin/*.so ./build/libs/armeabi-v7a/
cp ./QtApng/plugins/imageformats/libplugins_imageformats_qapng_armeabi-v7a.so ./build/libs/armeabi-v7a/
androiddeployqt --input android-Attorney_Online-deployment-settings.json --output ./build/ --apk ./bin/AttorneyOnline.apk
# - name: Upload Artifact
# uses: actions/upload-artifact@v2
# with:
# name: Attorney_Online
# path: ${{github.workspace}}/build/Attorney_Online-linux-x86_64.tgz
- name: Upload Artifact
uses: actions/upload-artifact@master
with:
name: Attorney_Online-${{matrix.platform}}
path: ${{github.workspace}}/bin/

View File

@ -17,10 +17,10 @@ jobs:
qt: '5.15.2'
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@master
- name: Restore Qt cache
uses: actions/cache@v2.1.7
uses: actions/cache@master
id: cache-qt
with:
path: ${{github.workspace}}/Qt/${{matrix.qt}}
@ -44,7 +44,7 @@ jobs:
sudo cmake --build build/ --target install
- name: Use CMake 3.20.1
uses: lukka/get-cmake@v3.20.1
uses: lukka/get-cmake@main
- name: Generate compile_commands.json
uses: lukka/run-cmake@v3
@ -59,12 +59,13 @@ jobs:
buildWithCMakeArgs: >-
--target autogen
- uses: ZedThree/clang-tidy-review@v0.8.2
- uses: ZedThree/clang-tidy-review@v0.8.3
id: review
with:
build_dir: 'build'
clang_tidy_checks: '-*,performance-*,readability-*,bugprone-*,clang-analyzer-*,cppcoreguidelines-*,mpi-*,misc-*,-cppcoreguidelines-owning-memory,-cppcoreguidelines-pro-bounds-constant-array-index,-cppcoreguidelines-init-variables,-cppcoreguidelines-pro-type-member-init,-cppcoreguidelines-avoid-magic-numbers'
apt_packages: 'pkg-config,libzip-dev,libglu1-mesa-dev,libpulse-dev'
max_comments: 10
# If there are any comments, fail the check
- if: steps.review.outputs.total_comments > 0
run: exit 1

View File

@ -17,7 +17,7 @@ jobs:
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@master
- name: Install catch2
run: |

19
.gitignore vendored
View File

@ -7,12 +7,13 @@
*.pro.user
base_override.h
.DS_Store
*.o
moc*
*.autosave
base-full/
logs/
bass.lib
.vs/
bin/
bins/
build/
@ -26,19 +27,11 @@ base/config.ini
base/serverlist.txt
.qmake.stash
.vs/
Makefile*
object_script*
/android/gradle*
/Attorney_Online_remake_resource.rc
/attorney_online_remake_plugin_import.cpp
/Attorney_Online_*.rc
/attorney_online_*_plugin_import.cpp
server/__pycache__
discord/
*.o
moc*
/Attorney_Online_CC_resource.rc
/attorney_online_cc_plugin_import.cpp
*.autosave

View File

@ -1,259 +0,0 @@
stages:
- build
- deploy
- publish
cache:
key: ${CI_COMMIT_REF_SLUG}
variables:
DEBIAN_FRONTEND: noninteractive
before_script:
- echo Current working directory is $(pwd)
build linux x86_64:
image: ubuntu:18.04
stage: build
tags:
- docker
- linux
script:
# Install dependencies
- apt-get update
- >
apt-get install --no-install-recommends -y qt5-default qtmultimedia5-dev
clang make git sudo curl ca-certificates pkg-config upx unzip xz-utils
- git submodule init
- git submodule update
# Print versions
- qmake --version
- clang --version
# Extract BASS
- mkdir bass
- cd bass
- curl http://www.un4seen.com/files/bass24-linux.zip -o bass.zip
- unzip -o bass.zip
- cp x64/libbass.so ../lib
- curl http://www.un4seen.com/files/bassmidi24-linux.zip -o bassmidi.zip
- unzip -o bassmidi.zip
- cp x64/libbassmidi.so ../lib
- curl http://www.un4seen.com/files/bassopus24-linux.zip -o bassopus.zip
- unzip -o bassopus.zip
- cp x64/libbassopus.so ../lib
- cd ..
# Extract Discord RPC
- mkdir discord-rpc
- cd discord-rpc
- curl -L https://github.com/discordapp/discord-rpc/releases/download/v3.4.0/discord-rpc-linux.zip -o discord_rpc_linux.zip
- unzip -o discord_rpc_linux.zip
- cp discord-rpc/linux-dynamic/lib/libdiscord-rpc.so ../lib
- cd ..
# Extract QtApng
#- mkdir qtapng
#- cd qtapng
#- curl -L https://github.com/Skycoder42/QtApng/releases/download/1.1.0-5/build_gcc_64_5.12.0.tar.xz -o apng.tar.xz
#- tar -xvf apng.tar.xz
#- cp gcc_64/plugins/imageformats/libqapng.so ../lib
#- cd ..
# Build QtApng
- git clone https://github.com/Skycoder42/QtApng
- cd QtApng
- qmake -spec linux-clang
# Don't make examples - they're not compatible with Qt 5.9
- make -j4 sub-src
#- make sub-src-install_subtargets
- cp plugins/imageformats/libqapng.so ../lib
- cd ..
# Build
- qmake -spec linux-clang "DEFINES += DISCORD"
- make -j4
# Post-processing
- upx --lzma -9 --force bin/Attorney_Online
artifacts:
paths:
- lib/
- bin/
build windows i686:
image: ${CI_REGISTRY_IMAGE}/builder-windows-i686
stage: build
tags:
- docker
- linux
script:
# Install dependencies
- apt-get update
- apt-get install --no-install-recommends -y make curl ca-certificates upx unzip
- git submodule init
- git submodule update
# Print versions
- /opt/mxe/usr/${TARGET_SPEC}/qt5/bin/qmake --version
# Extract BASS
- mkdir bass
- cd bass
- curl http://www.un4seen.com/files/bass24.zip -o bass.zip
- unzip -o bass.zip
- cp bass.dll ../lib
- curl http://www.un4seen.com/files/bassmidi24.zip -o bassmidi.zip
- unzip -o bassmidi.zip
- cp bassmidi.dll ../lib
- curl http://www.un4seen.com/files/bassopus24.zip -o bassopus.zip
- unzip -o bassopus.zip
- cp bassopus.dll ../lib
- cd ..
# Extract QtApng
# - mkdir qtapng
# - cd qtapng
# - curl -L https://github.com/Skycoder42/QtApng/releases/download/1.1.2-2/qtapng_mingw73_32_5.13.0.zip -o apng.zip
# - unzip apng.zip
# - mkdir ../lib/imageformats
# - cp mingw73_32/plugins/imageformats/qapng.dll ../lib/imageformats/
# - cd ..
- ls lib
# Build
- /opt/mxe/usr/${TARGET_SPEC}/qt5/bin/qmake "DEFINES += DISCORD"
- make -j4
# Post-processing
- upx --lzma -9 --force bin/Attorney_Online.exe
artifacts:
paths:
- lib/
- bin/
# Base folder
.deploy_base: &deploy_base |
cp -a ../base/ base/
rm -rf base/themes/_Unadapted/
rm base/themes/.gitattributes base/themes/.git
# Miscellaneous files
.deploy_misc: &deploy_misc |
cp -a ../README.md README.md.txt
cp -a ../LICENSE.MIT LICENSE.txt
deploy linux x86_64:
stage: deploy
dependencies:
- build linux x86_64
tags:
- docker
- linux
script:
- mkdir artifact
- cd artifact
- *deploy_base
- *deploy_misc
# Platform-specific
- cp -a ../lib/* .
- cp -a ../bin/Attorney_Online .
- echo "#!/bin/sh" >> ./run.sh
- echo "LD_LIBRARY_PATH=.:\$LD_LIBRARY_PATH ./Attorney_Online" >> ./run.sh
- chmod +x ./run.sh
# Zipping
# zip -r -9 -l Attorney_Online_$(git describe --tags)_linux_x86_64.zip .
- mkdir ../zip
- tar cavf ../zip/Attorney_Online_$(git describe --tags)_linux_x64.tar.xz *
- sha1sum ../zip/*
artifacts:
paths:
- zip/
deploy windows i686:
image: ubuntu
stage: deploy
dependencies:
- build windows i686
tags:
- docker
- linux
script:
- apt-get update
- apt-get install --no-install-recommends -y zip git
- mkdir artifact
- cd artifact
- *deploy_base
- *deploy_misc
# Platform-specific
- cp -a ../lib/*.dll .
- mkdir imageformats
- 'cp -a ../lib/imageformats/*.dll imageformats/ || :'
- cp -a ../bin/Attorney_Online.exe .
# Zipping
# -r: recursive; -9: max compression; -l: convert to CR LF
- mkdir ../zip
- zip -r -9 -l ../zip/Attorney_Online_$(git describe --tags)_windows_x86.zip .
- sha1sum ../zip/*
artifacts:
paths:
- zip/
# How to publish to S3/Wasabi:
# - Ensure the following variables have been populated in the CI/CD settings:
# - S3_ACCESS_KEY, S3_SECRET_KEY
# - S3_MANIFESTS, S3_ARCHIVES
# - Select "Run Pipeline" on the Pipelines menu on GitLab.
# - Select the version you want to release.
# - Set the following variables:
# - MANIFEST: program_winnt_i386.json
# - ARCHIVE_FULL: ao-X.Y.Z-win32.zip
# - VERSION: X.Y.Z
# - EXECUTABLE: Attorney_Online_X.Y.Z.exe
# - Run the pipeline to completion.
# (See scripts/wasabi.sh)
publish linux x86_64:
image: ubuntu
stage: publish
dependencies:
- deploy linux x86_64
when: manual
script:
- apt-get update
- apt-get install --no-install-recommends -y git nodejs npm awscli
- cd scripts
- npm install
- cd ..
- cd zip
- ../scripts/wasabi_program.sh
variables:
MANIFEST: program_linux_x86_64.json
ARTIFACT_SUFFIX: linux_x64.tar.xz
publish windows i686:
image: ubuntu
stage: publish
dependencies:
- deploy windows i686
when: manual
script:
- apt-get update
- apt-get install --no-install-recommends -y git nodejs npm awscli
- cd scripts
- npm install
- cd ..
- cd zip
- ../scripts/wasabi_program.sh
variables:
MANIFEST: program_winnt_i386.json
ARTIFACT_SUFFIX: windows_x86.zip

View File

@ -1,22 +0,0 @@
language: cpp
os: osx
osx_image: xcode12
addons:
homebrew:
update: true
packages:
- qt5
script:
- "./scripts/macos_build.sh"
- "./scripts/macos_post_build.sh"
deploy:
provider: releases
api_key:
secure: mZCNwnqKeqJP5CqgYOanYnr/KHydxueGPRhvGLpY0Pop7MiH3CIHMN5dhHbtgJvE5GGMR4xUIEhPpmkCEJw7YiPREMqT4mkV4DR531ZLB3t/FizyvIwXuP6jFwzTofZ51qHfBpcurVc9sMFeD9Pw+rLTTgIiXL2sZxUUXc8U+ZZug1lYndgcO6P00fUJd6V9lyFQUGmbSca97YbG6KuCym0fEpyRnMqzKLjYsUUo8UKRBADtmD822O6z2FSldNZDn45Mkx0MYfHWyT5hzTb7WGa+DrTB/0un1HqqsNPlb/ahjrFQQNR2qd7HNGZa+Mvwi6egTDug+k15x8lbkacUoi34U1eFq9LSTYm8dSO5g23I1OvGvjTCkDj1jOLPqB99XlbAJ0E/9Jzw7wtlLaAzvFzTj/B63TQnO3IsgHBWR14CZlf05WMOFf2irwl+kL6ktspIHnlGgaiWYYrKeAt7QJAXiQOdYDz6SaWVC6TyOE/SszXRU6xFotmCjkP2irM5yGE8SUw2uIzKjD9uG0ZXtbLcdQEFD316+qglqFTCjnKsRfbtQs2u5spZPsZSdsOZCbLfNIn0GSTFRymFsK6gsvji8AD8AZo0zcOZ/7NMVC6A8RnF3Ve+vU/xljhsIOxoLZDvZPia7WozdV99xmnepWBwkuoQs/K0xmWcnLZDcb0=
file: "../bin/Attorney_Online_macOS.zip"
draft: true
on:
tags: true
repo: AttorneyOnline/AO2-Client

View File

@ -59,13 +59,14 @@ TRANSLATIONS = resource/translations/ao_en.ts \
win32:RC_ICONS = resource/logo_ao2.ico
macx:ICON = resource/logo_ao2.icns
android:QT += androidextras
android:DISTFILES += \
android/AndroidManifest.xml \
android/build.gradle \
android/gradle.properties \
android/gradle/wrapper/gradle-wrapper.jar \
android/gradle/wrapper/gradle-wrapper.properties \
android/gradlew \
android/gradlew.bat \
android/res/values/libs.xml
android/gradlew.bat
ANDROID_PACKAGE_SOURCE_DIR = $$PWD/android

View File

@ -1,16 +1,23 @@
<?xml version="1.0"?>
<manifest package="com.aceattorneyonline.ao2" xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="2.6.2.0" android:versionCode="2" android:installLocation="auto">
<application android:hardwareAccelerated="true" android:name="org.qtproject.qt5.android.bindings.QtApplication" android:label="Attorney Online 2" android:icon="@drawable/icon">
<activity android:configChanges="orientation|uiMode|screenLayout|screenSize|smallestScreenSize|layoutDirection|locale|fontScale|keyboard|keyboardHidden|navigation" android:name="org.qtproject.qt5.android.bindings.QtActivity" android:label="Attorney Online 2 Lobby" android:screenOrientation="unspecified" android:launchMode="singleTop">
<manifest package="com.aceattorneyonline.ao2" xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="2.10" android:versionCode="10" android:installLocation="auto">
<!-- The following comment will be replaced upon deployment with default permissions based on the dependencies of the application.
Remove the comment if you do not require these default permissions. -->
<!-- %%INSERT_PERMISSIONS -->
<!-- The following comment will be replaced upon deployment with default features based on the dependencies of the application.
Remove the comment if you do not require these default features. -->
<!-- %%INSERT_FEATURES -->
<supports-screens android:largeScreens="true" android:normalScreens="true" android:anyDensity="true" android:smallScreens="true"/>
<application android:hardwareAccelerated="true" android:name="org.qtproject.qt5.android.bindings.QtApplication" android:label="Attorney Online 2" android:extractNativeLibs="true" android:icon="@drawable/icon">
<activity android:configChanges="orientation|uiMode|screenLayout|screenSize|smallestScreenSize|layoutDirection|locale|fontScale|keyboard|keyboardHidden|navigation|mcc|mnc|density" android:name="org.qtproject.qt5.android.bindings.QtActivity" android:label="Attorney Online 2 Lobby" android:screenOrientation="portrait" android:launchMode="singleTop">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
<!-- Application arguments -->
<!-- meta-data android:name="android.app.arguments" android:value="arg1 arg2 arg3"/ -->
<!-- Application arguments -->
<meta-data android:name="android.app.lib_name" android:value="-- %%INSERT_APP_LIB_NAME%% --"/>
<meta-data android:name="android.app.qt_sources_resource_id" android:resource="@array/qt_sources"/>
<meta-data android:name="android.app.repository" android:value="default"/>
@ -18,25 +25,31 @@
<meta-data android:name="android.app.bundled_libs_resource_id" android:resource="@array/bundled_libs"/>
<!-- Deploy Qt libs as part of package -->
<meta-data android:name="android.app.bundle_local_qt_libs" android:value="-- %%BUNDLE_LOCAL_QT_LIBS%% --"/>
<meta-data android:name="android.app.bundled_in_lib_resource_id" android:resource="@array/bundled_in_lib"/>
<meta-data android:name="android.app.bundled_in_assets_resource_id" android:resource="@array/bundled_in_assets"/>
<!-- Run with local libs -->
<meta-data android:name="android.app.use_local_qt_libs" android:value="-- %%USE_LOCAL_QT_LIBS%% --"/>
<meta-data android:name="android.app.libs_prefix" android:value="/data/local/tmp/qt/"/>
<meta-data android:name="android.app.load_local_libs_resource_id" android:resource="@array/load_local_libs"/>
<meta-data android:name="android.app.load_local_libs" android:value="-- %%INSERT_LOCAL_LIBS%% --"/>
<meta-data android:name="android.app.load_local_jars" android:value="-- %%INSERT_LOCAL_JARS%% --"/>
<meta-data android:name="android.app.static_init_classes" android:value="-- %%INSERT_INIT_CLASSES%% --"/>
<!-- Used to specify custom system library path to run with local system libs -->
<!-- <meta-data android:name="android.app.system_libs_prefix" android:value="/system/lib/"/> -->
<!-- Messages maps -->
<meta-data android:value="@string/ministro_not_found_msg" android:name="android.app.ministro_not_found_msg"/>
<meta-data android:value="@string/ministro_needed_msg" android:name="android.app.ministro_needed_msg"/>
<meta-data android:value="@string/fatal_error_msg" android:name="android.app.fatal_error_msg"/>
<meta-data android:value="@string/unsupported_android_version" android:name="android.app.unsupported_android_version"/>
<!-- Messages maps -->
<!-- Splash screen -->
<!-- Orientation-specific (portrait/landscape) data is checked first. If not available for current orientation,
then android.app.splash_screen_drawable. For best results, use together with splash_screen_sticky and
use hideSplashScreen() with a fade-out animation from Qt Android Extras to hide the splash screen when you
are done populating your window with content. -->
<!-- meta-data android:name="android.app.splash_screen_drawable_portrait" android:resource="@drawable/logo_portrait" / -->
<!-- meta-data android:name="android.app.splash_screen_drawable_landscape" android:resource="@drawable/logo_landscape" / -->
<!-- meta-data android:name="android.app.splash_screen_drawable" android:resource="@drawable/logo"/ -->
<!-- meta-data android:name="android.app.splash_screen_sticky" android:value="true"/ -->
<!-- Splash screen -->
<!-- Background running -->
<!-- Warning: changing this value to true may cause unexpected crashes if the
application still try to draw after
@ -44,36 +57,22 @@
signal is sent! -->
<meta-data android:name="android.app.background_running" android:value="false"/>
<!-- Background running -->
<!-- auto screen scale factor -->
<meta-data android:name="android.app.auto_screen_scale_factor" android:value="false"/>
<!-- auto screen scale factor -->
<!-- extract android style -->
<!-- available android:values :
* default - In most cases this will be the same as "full", but it can also be something else if needed, e.g., for compatibility reasons
* full - useful QWidget & Quick Controls 1 apps
* minimal - useful for Quick Controls 2 apps, it is much faster than "full"
* none - useful for apps that don't use any of the above Qt modules
-->
<meta-data android:name="android.app.extract_android_style" android:value="full"/>
<meta-data android:name="android.app.extract_android_style" android:value="default"/>
<!-- extract android style -->
</activity>
<!-- For adding service(s) please check: https://wiki.qt.io/AndroidServices -->
</activity>
<!-- For adding service(s) please check: https://wiki.qt.io/AndroidServices -->
</application>
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="28"/>
<supports-screens android:largeScreens="true" android:normalScreens="true" android:anyDensity="true" android:smallScreens="true"/>
<!-- The following comment will be replaced upon deployment with default permissions based on the dependencies of the application.
Remove the comment if you do not require these default permissions. -->
<!-- The following comment will be replaced upon deployment with default features based on the dependencies of the application.
Remove the comment if you do not require these default features. -->
<!-- %%INSERT_FEATURES -->
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
</manifest>

View File

@ -5,7 +5,7 @@ buildscript {
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.0'
classpath 'com.android.tools.build:gradle:3.6.0'
}
}
@ -51,6 +51,15 @@ android {
}
}
tasks.withType(JavaCompile) {
options.incremental = true
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
lintOptions {
abortOnError false
}
@ -59,4 +68,10 @@ android {
aaptOptions {
noCompress 'rcc'
}
defaultConfig {
resConfig "en"
minSdkVersion = qtMinSdkVersion
targetSdkVersion = qtTargetSdkVersion
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

View File

@ -14,10 +14,12 @@
#include <QProgressBar>
#include <QTextBrowser>
#include <QTreeWidget>
#include <QDebug>
#include <QScrollBar>
#include <QHeaderView>
#ifdef ANDROID
#include <QtAndroidExtras/QtAndroid>
#endif
class AOApplication;

File diff suppressed because it is too large Load Diff

View File

@ -112,6 +112,12 @@ void Lobby::set_widgets()
if (f_lobby.width < 0 || f_lobby.height < 0) {
qWarning() << "did not find lobby width or height in " << filename;
#ifdef ANDROID
if(QtAndroid::checkPermission("android.permission.READ_EXTERNAL_STORAGE")==QtAndroid::PermissionResult::Denied) {
QtAndroid::requestPermissionsSync({"android.permission.READ_EXTERNAL_STORAGE","android.permission.WRITE_EXTERNAL_STORAGE"});
}
#endif
// Most common symptom of bad config files and missing assets.
call_notice(
tr("It doesn't look like your client is set up correctly.\n"