Bring back CI changes and macOS support
This commit is contained in:
parent
fd1855b8d0
commit
df8f19320b
8
.github/labeler.yml
vendored
Normal file
8
.github/labeler.yml
vendored
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
translation:
|
||||||
|
- resource/translations/*
|
||||||
|
|
||||||
|
content:
|
||||||
|
- base/**/*
|
||||||
|
|
||||||
|
good_luck:
|
||||||
|
- src/courtroom.cpp
|
4
.gitignore
vendored
4
.gitignore
vendored
@ -4,6 +4,7 @@
|
|||||||
*.dll
|
*.dll
|
||||||
*.so
|
*.so
|
||||||
*.pro.autosave
|
*.pro.autosave
|
||||||
|
*.pro.user
|
||||||
base_override.h
|
base_override.h
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
|
||||||
@ -21,6 +22,7 @@ debug/
|
|||||||
|
|
||||||
Makefile*
|
Makefile*
|
||||||
object_script*
|
object_script*
|
||||||
|
/android/gradle*
|
||||||
/Attorney_Online_remake_resource.rc
|
/Attorney_Online_remake_resource.rc
|
||||||
/attorney_online_remake_plugin_import.cpp
|
/attorney_online_remake_plugin_import.cpp
|
||||||
|
|
||||||
@ -31,3 +33,5 @@ discord/
|
|||||||
moc*
|
moc*
|
||||||
/Attorney_Online_CC_resource.rc
|
/Attorney_Online_CC_resource.rc
|
||||||
/attorney_online_cc_plugin_import.cpp
|
/attorney_online_cc_plugin_import.cpp
|
||||||
|
|
||||||
|
*.autosave
|
||||||
|
@ -8,6 +8,9 @@ cache:
|
|||||||
paths:
|
paths:
|
||||||
- lib/
|
- lib/
|
||||||
|
|
||||||
|
variables:
|
||||||
|
DEBIAN_FRONTEND: noninteractive
|
||||||
|
|
||||||
before_script:
|
before_script:
|
||||||
- echo Current working directory is $(pwd)
|
- echo Current working directory is $(pwd)
|
||||||
|
|
||||||
@ -22,22 +25,24 @@ build linux x86_64:
|
|||||||
- apt-get update
|
- apt-get update
|
||||||
- >
|
- >
|
||||||
apt-get install --no-install-recommends -y qt5-default qtmultimedia5-dev
|
apt-get install --no-install-recommends -y qt5-default qtmultimedia5-dev
|
||||||
clang make git sudo curl ca-certificates pkg-config upx unzip
|
clang make git sudo curl ca-certificates pkg-config upx unzip xz-utils
|
||||||
|
- git submodule init
|
||||||
|
- git submodule update
|
||||||
|
|
||||||
# Print versions
|
# Print versions
|
||||||
- qmake --version
|
- qmake --version
|
||||||
- clang --version
|
- clang --version
|
||||||
|
|
||||||
# Extract BASS
|
# Extract BASS
|
||||||
- mkdir bass
|
#- mkdir bass
|
||||||
- cd bass
|
#- cd bass
|
||||||
- curl http://www.un4seen.com/files/bass24-linux.zip -o bass.zip
|
#- curl http://www.un4seen.com/files/bass24-linux.zip -o bass.zip
|
||||||
- unzip bass.zip
|
#- unzip bass.zip
|
||||||
- cp x64/libbass.so ../lib
|
#- cp x64/libbass.so ../lib
|
||||||
- curl http://www.un4seen.com/files/bassopus24-linux.zip -o bassopus.zip
|
#- curl http://www.un4seen.com/files/bassopus24-linux.zip -o bassopus.zip
|
||||||
- unzip bassopus.zip
|
#- unzip bassopus.zip
|
||||||
- cp x64/libbassopus.so ../lib
|
#- cp x64/libbassopus.so ../lib
|
||||||
- cd ..
|
#- cd ..
|
||||||
|
|
||||||
# Extract Discord RPC
|
# Extract Discord RPC
|
||||||
- mkdir discord-rpc
|
- mkdir discord-rpc
|
||||||
@ -56,7 +61,7 @@ build linux x86_64:
|
|||||||
- cd ..
|
- cd ..
|
||||||
|
|
||||||
# Build
|
# Build
|
||||||
- qmake -spec linux-clang
|
- qmake -spec linux-clang "DEFINES += DISCORD QTAUDIO"
|
||||||
- make -j4
|
- make -j4
|
||||||
|
|
||||||
# Post-processing
|
# Post-processing
|
||||||
@ -75,6 +80,11 @@ build windows i686:
|
|||||||
# Install dependencies
|
# Install dependencies
|
||||||
- apt-get update
|
- apt-get update
|
||||||
- apt-get install --no-install-recommends -y make curl ca-certificates upx unzip
|
- 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
|
# Extract BASS
|
||||||
- mkdir bass
|
- mkdir bass
|
||||||
@ -87,8 +97,19 @@ build windows i686:
|
|||||||
- cp bassopus.dll ../lib
|
- cp bassopus.dll ../lib
|
||||||
- cd ..
|
- 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
|
# Build
|
||||||
- /opt/mxe/usr/${TARGET_SPEC}/qt5/bin/qmake
|
- /opt/mxe/usr/${TARGET_SPEC}/qt5/bin/qmake "DEFINES += DISCORD BASSAUDIO"
|
||||||
- make -j4
|
- make -j4
|
||||||
|
|
||||||
# Post-processing
|
# Post-processing
|
||||||
@ -124,7 +145,7 @@ deploy linux x86_64:
|
|||||||
- *deploy_misc
|
- *deploy_misc
|
||||||
|
|
||||||
# Platform-specific
|
# Platform-specific
|
||||||
- cp -a ../lib/*.so .
|
- cp -a ../lib/* .
|
||||||
- cp -a ../bin/Attorney_Online .
|
- cp -a ../bin/Attorney_Online .
|
||||||
- echo "#!/bin/sh" >> ./run.sh
|
- echo "#!/bin/sh" >> ./run.sh
|
||||||
- echo "LD_LIBRARY_PATH=.:\$LD_LIBRARY_PATH ./Attorney_Online" >> ./run.sh
|
- echo "LD_LIBRARY_PATH=.:\$LD_LIBRARY_PATH ./Attorney_Online" >> ./run.sh
|
||||||
@ -158,6 +179,8 @@ deploy windows i686:
|
|||||||
|
|
||||||
# Platform-specific
|
# Platform-specific
|
||||||
- cp -a ../lib/*.dll .
|
- cp -a ../lib/*.dll .
|
||||||
|
- mkdir imageformats
|
||||||
|
- 'cp -a ../lib/imageformats/*.dll imageformats/ || :'
|
||||||
- cp -a ../bin/Attorney_Online.exe .
|
- cp -a ../bin/Attorney_Online.exe .
|
||||||
|
|
||||||
# Zipping
|
# Zipping
|
||||||
@ -190,11 +213,17 @@ publish linux x86_64:
|
|||||||
- deploy linux x86_64
|
- deploy linux x86_64
|
||||||
when: manual
|
when: manual
|
||||||
script:
|
script:
|
||||||
|
- apt-get update
|
||||||
|
- apt-get install --no-install-recommends -y git nodejs npm awscli
|
||||||
|
- cd scripts
|
||||||
|
- npm install
|
||||||
|
- cd ..
|
||||||
|
|
||||||
- cd zip
|
- cd zip
|
||||||
- ../scripts/wasabi.sh
|
- ../scripts/wasabi_program.sh
|
||||||
variables:
|
variables:
|
||||||
MANIFEST: program_linux_x86_64.json
|
MANIFEST: program_linux_x86_64.json
|
||||||
ARTIFACT_SUFFIX: _linux_x64.tar.xz
|
ARTIFACT_SUFFIX: linux_x64.tar.xz
|
||||||
|
|
||||||
publish windows i686:
|
publish windows i686:
|
||||||
image: ubuntu
|
image: ubuntu
|
||||||
@ -203,8 +232,14 @@ publish windows i686:
|
|||||||
- deploy windows i686
|
- deploy windows i686
|
||||||
when: manual
|
when: manual
|
||||||
script:
|
script:
|
||||||
|
- apt-get update
|
||||||
|
- apt-get install --no-install-recommends -y git nodejs npm awscli
|
||||||
|
- cd scripts
|
||||||
|
- npm install
|
||||||
|
- cd ..
|
||||||
|
|
||||||
- cd zip
|
- cd zip
|
||||||
- ../scripts/wasabi.sh
|
- ../scripts/wasabi_program.sh
|
||||||
variables:
|
variables:
|
||||||
MANIFEST: program_winnt_i386.json
|
MANIFEST: program_winnt_i386.json
|
||||||
ARTIFACT_SUFFIX: _windows_x86.zip
|
ARTIFACT_SUFFIX: windows_x86.zip
|
||||||
|
22
.travis.yml
22
.travis.yml
@ -1,11 +1,21 @@
|
|||||||
language: cpp
|
language: cpp
|
||||||
os: osx
|
os: osx
|
||||||
|
|
||||||
addons:
|
addons:
|
||||||
homebrew:
|
homebrew:
|
||||||
packages:
|
update: true
|
||||||
- qt5
|
packages:
|
||||||
|
- qt5
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- ./scripts/macos_build.sh
|
- "./scripts/macos_build.sh"
|
||||||
- ./scripts/macos_post_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_mac_x86_64.zip"
|
||||||
|
draft: true
|
||||||
|
on:
|
||||||
|
tags: true
|
||||||
|
repo: AttorneyOnline/AO2-Client
|
||||||
|
@ -7,11 +7,13 @@ set -eu
|
|||||||
|
|
||||||
ROOT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/"
|
ROOT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/"
|
||||||
|
|
||||||
cd ${ROOT_DIR}
|
cd "${ROOT_DIR}"
|
||||||
|
|
||||||
|
|
||||||
#need some openGL stuff
|
#need some openGL stuff
|
||||||
sudo apt install libgl1-mesa-dev
|
sudo apt install libgl1-mesa-dev
|
||||||
|
#install curl incase of fresh vm
|
||||||
|
sudo apt install curl
|
||||||
mkdir tmp
|
mkdir tmp
|
||||||
|
|
||||||
cd tmp
|
cd tmp
|
||||||
|
@ -30,4 +30,4 @@ tar -xvf apng.tar.xz
|
|||||||
cp clang_64/plugins/imageformats/libqapng.dylib ../lib
|
cp clang_64/plugins/imageformats/libqapng.dylib ../lib
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
qmake && make -j2
|
/usr/local/opt/qt/bin/qmake && make -j2
|
||||||
|
4
scripts/macos_post_build.sh
Normal file → Executable file
4
scripts/macos_post_build.sh
Normal file → Executable file
@ -13,10 +13,12 @@ ROOT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/"
|
|||||||
cd ${ROOT_DIR}
|
cd ${ROOT_DIR}
|
||||||
|
|
||||||
# This thing basically does all the work
|
# This thing basically does all the work
|
||||||
macdeployqt ../bin/Attorney_Online.app
|
/usr/local/opt/qt/bin/macdeployqt ../bin/Attorney_Online.app
|
||||||
|
|
||||||
# Need to add the dependencies
|
# Need to add the dependencies
|
||||||
cp ../lib/* ../bin/Attorney_Online.app/Contents/Frameworks
|
cp ../lib/* ../bin/Attorney_Online.app/Contents/Frameworks
|
||||||
|
|
||||||
# libbass has a funny path for some reason, just use rpath
|
# libbass has a funny path for some reason, just use rpath
|
||||||
install_name_tool -change @loader_path/libbass.dylib @rpath/libbass.dylib ../bin/Attorney_Online.app/Contents/MacOS/Attorney_Online
|
install_name_tool -change @loader_path/libbass.dylib @rpath/libbass.dylib ../bin/Attorney_Online.app/Contents/MacOS/Attorney_Online
|
||||||
|
|
||||||
|
zip -r -9 ../bin/Attorney_Online_mac_x86_64.zip ../bin/
|
@ -1,4 +1,4 @@
|
|||||||
#!/bin/sh
|
#!/bin/bash
|
||||||
# Updates the specified program manifest to a new archive and version
|
# Updates the specified program manifest to a new archive and version
|
||||||
# and uploads the new archive and manifest to S3/Wasabi.
|
# and uploads the new archive and manifest to S3/Wasabi.
|
||||||
#
|
#
|
||||||
|
@ -10,5 +10,12 @@ RUN /opt/mxe/usr/bin/${TARGET_SPEC}-cmake .. -DCMAKE_INSTALL_PREFIX=/opt/mxe/usr
|
|||||||
RUN /opt/mxe/usr/bin/${TARGET_SPEC}-cmake --build . --config Release --target install
|
RUN /opt/mxe/usr/bin/${TARGET_SPEC}-cmake --build . --config Release --target install
|
||||||
WORKDIR ../..
|
WORKDIR ../..
|
||||||
|
|
||||||
# NOTE: Do not build QtApng statically! libpng contains a self-test entry point that
|
# Build QtApng statically
|
||||||
# takes precedence for some reason over the final build's entry point.
|
RUN git clone https://github.com/Skycoder42/QtApng
|
||||||
|
WORKDIR QtApng
|
||||||
|
# libpng contains a self-test entry point that takes precedence for some reason
|
||||||
|
# over the final build's entry point.
|
||||||
|
RUN sed -i "s/^main(/libpng_main(/g" src/3rdparty/libpng/src/pngtest.c
|
||||||
|
RUN /opt/mxe/usr/${TARGET_SPEC}/qt5/bin/qmake
|
||||||
|
RUN make && make install
|
||||||
|
WORKDIR ..
|
@ -49,6 +49,10 @@ QString get_hdid()
|
|||||||
}
|
}
|
||||||
|
|
||||||
#elif defined __APPLE__
|
#elif defined __APPLE__
|
||||||
|
|
||||||
|
#include <CoreFoundation/CoreFoundation.h>
|
||||||
|
#include <IOKit/IOKitLib.h>
|
||||||
|
|
||||||
QString get_hdid()
|
QString get_hdid()
|
||||||
{
|
{
|
||||||
CFStringRef serial;
|
CFStringRef serial;
|
||||||
|
@ -30,6 +30,8 @@ QString AOApplication::get_base_path()
|
|||||||
QString external_storage = getenv("EXTERNAL_STORAGE");
|
QString external_storage = getenv("EXTERNAL_STORAGE");
|
||||||
base_path = external_storage + "/AO2/";
|
base_path = external_storage + "/AO2/";
|
||||||
}
|
}
|
||||||
|
#elif defined(__APPLE__)
|
||||||
|
base_path = applicationDirPath() + "/../../../base/";
|
||||||
#else
|
#else
|
||||||
base_path = applicationDirPath() + "/base/";
|
base_path = applicationDirPath() + "/base/";
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user