aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoroldmud0 <oldmud0@users.noreply.github.com>2020-05-22 19:35:49 -0500
committeroldmud0 <oldmud0@users.noreply.github.com>2020-05-22 19:35:49 -0500
commitdf8f19320b3a37521a7f93a578bf31c81f885238 (patch)
treece7baaa5c4e58ac958b6b520a352371d14aaa4c9
parentfd1855b8d0ecaa56ae3165ad5d8f3bd65ff77a64 (diff)
Bring back CI changes and macOS support
-rw-r--r--.github/labeler.yml8
-rw-r--r--.gitignore4
-rw-r--r--.gitlab-ci.yml69
-rw-r--r--.travis.yml22
-rwxr-xr-xscripts/configure_ubuntu.sh6
-rwxr-xr-xscripts/macos_build.sh2
-rwxr-xr-x[-rw-r--r--]scripts/macos_post_build.sh4
-rwxr-xr-xscripts/wasabi_program.sh2
-rw-r--r--scripts/windows/Dockerfile11
-rw-r--r--src/hardware_functions.cpp4
-rw-r--r--src/path_functions.cpp2
11 files changed, 104 insertions, 30 deletions
diff --git a/.github/labeler.yml b/.github/labeler.yml
new file mode 100644
index 00000000..56c4cc7c
--- /dev/null
+++ b/.github/labeler.yml
@@ -0,0 +1,8 @@
+translation:
+ - resource/translations/*
+
+content:
+ - base/**/*
+
+good_luck:
+ - src/courtroom.cpp
diff --git a/.gitignore b/.gitignore
index 1adb744f..3f8b3ae4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,6 +4,7 @@
*.dll
*.so
*.pro.autosave
+*.pro.user
base_override.h
.DS_Store
@@ -21,6 +22,7 @@ debug/
Makefile*
object_script*
+/android/gradle*
/Attorney_Online_remake_resource.rc
/attorney_online_remake_plugin_import.cpp
@@ -31,3 +33,5 @@ discord/
moc*
/Attorney_Online_CC_resource.rc
/attorney_online_cc_plugin_import.cpp
+
+*.autosave
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 0f68fe5a..e9685de0 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -8,6 +8,9 @@ cache:
paths:
- lib/
+variables:
+ DEBIAN_FRONTEND: noninteractive
+
before_script:
- echo Current working directory is $(pwd)
@@ -22,22 +25,24 @@ build linux x86_64:
- 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
+ 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 bass.zip
- - cp x64/libbass.so ../lib
- - curl http://www.un4seen.com/files/bassopus24-linux.zip -o bassopus.zip
- - unzip bassopus.zip
- - cp x64/libbassopus.so ../lib
- - cd ..
+ #- mkdir bass
+ #- cd bass
+ #- curl http://www.un4seen.com/files/bass24-linux.zip -o bass.zip
+ #- unzip bass.zip
+ #- cp x64/libbass.so ../lib
+ #- curl http://www.un4seen.com/files/bassopus24-linux.zip -o bassopus.zip
+ #- unzip bassopus.zip
+ #- cp x64/libbassopus.so ../lib
+ #- cd ..
# Extract Discord RPC
- mkdir discord-rpc
@@ -56,7 +61,7 @@ build linux x86_64:
- cd ..
# Build
- - qmake -spec linux-clang
+ - qmake -spec linux-clang "DEFINES += DISCORD QTAUDIO"
- make -j4
# Post-processing
@@ -75,6 +80,11 @@ build windows i686:
# 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
@@ -87,8 +97,19 @@ build windows i686:
- 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
+ - /opt/mxe/usr/${TARGET_SPEC}/qt5/bin/qmake "DEFINES += DISCORD BASSAUDIO"
- make -j4
# Post-processing
@@ -124,7 +145,7 @@ deploy linux x86_64:
- *deploy_misc
# Platform-specific
- - cp -a ../lib/*.so .
+ - cp -a ../lib/* .
- cp -a ../bin/Attorney_Online .
- echo "#!/bin/sh" >> ./run.sh
- echo "LD_LIBRARY_PATH=.:\$LD_LIBRARY_PATH ./Attorney_Online" >> ./run.sh
@@ -158,6 +179,8 @@ deploy windows i686:
# Platform-specific
- cp -a ../lib/*.dll .
+ - mkdir imageformats
+ - 'cp -a ../lib/imageformats/*.dll imageformats/ || :'
- cp -a ../bin/Attorney_Online.exe .
# Zipping
@@ -190,11 +213,17 @@ publish linux x86_64:
- 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.sh
+ - ../scripts/wasabi_program.sh
variables:
MANIFEST: program_linux_x86_64.json
- ARTIFACT_SUFFIX: _linux_x64.tar.xz
+ ARTIFACT_SUFFIX: linux_x64.tar.xz
publish windows i686:
image: ubuntu
@@ -203,8 +232,14 @@ publish windows i686:
- 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.sh
+ - ../scripts/wasabi_program.sh
variables:
MANIFEST: program_winnt_i386.json
- ARTIFACT_SUFFIX: _windows_x86.zip
+ ARTIFACT_SUFFIX: windows_x86.zip
diff --git a/.travis.yml b/.travis.yml
index 4243b3b9..dbd19cdc 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,11 +1,21 @@
language: cpp
os: osx
-
addons:
- homebrew:
- packages:
- - qt5
+ homebrew:
+ update: true
+ packages:
+ - qt5
script:
- - ./scripts/macos_build.sh
- - ./scripts/macos_post_build.sh
+- "./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_mac_x86_64.zip"
+ draft: true
+ on:
+ tags: true
+ repo: AttorneyOnline/AO2-Client
diff --git a/scripts/configure_ubuntu.sh b/scripts/configure_ubuntu.sh
index 1f9b8e83..280dfdf9 100755
--- a/scripts/configure_ubuntu.sh
+++ b/scripts/configure_ubuntu.sh
@@ -7,11 +7,13 @@ set -eu
ROOT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/"
-cd ${ROOT_DIR}
+cd "${ROOT_DIR}"
+
#need some openGL stuff
sudo apt install libgl1-mesa-dev
-
+#install curl incase of fresh vm
+sudo apt install curl
mkdir tmp
cd tmp
diff --git a/scripts/macos_build.sh b/scripts/macos_build.sh
index 22e2d457..efb7653f 100755
--- a/scripts/macos_build.sh
+++ b/scripts/macos_build.sh
@@ -30,4 +30,4 @@ tar -xvf apng.tar.xz
cp clang_64/plugins/imageformats/libqapng.dylib ../lib
cd ..
-qmake && make -j2
+/usr/local/opt/qt/bin/qmake && make -j2
diff --git a/scripts/macos_post_build.sh b/scripts/macos_post_build.sh
index 50acb408..df1475c4 100644..100755
--- a/scripts/macos_post_build.sh
+++ b/scripts/macos_post_build.sh
@@ -13,10 +13,12 @@ ROOT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/"
cd ${ROOT_DIR}
# 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
cp ../lib/* ../bin/Attorney_Online.app/Contents/Frameworks
# 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
+
+zip -r -9 ../bin/Attorney_Online_mac_x86_64.zip ../bin/ \ No newline at end of file
diff --git a/scripts/wasabi_program.sh b/scripts/wasabi_program.sh
index 41e2e352..37feac6e 100755
--- a/scripts/wasabi_program.sh
+++ b/scripts/wasabi_program.sh
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# Updates the specified program manifest to a new archive and version
# and uploads the new archive and manifest to S3/Wasabi.
#
diff --git a/scripts/windows/Dockerfile b/scripts/windows/Dockerfile
index f4f1a836..b9a12d66 100644
--- a/scripts/windows/Dockerfile
+++ b/scripts/windows/Dockerfile
@@ -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
WORKDIR ../..
-# NOTE: Do not build QtApng statically! libpng contains a self-test entry point that
-# takes precedence for some reason over the final build's entry point.
+# Build QtApng statically
+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 .. \ No newline at end of file
diff --git a/src/hardware_functions.cpp b/src/hardware_functions.cpp
index c898aefe..82b4f0c7 100644
--- a/src/hardware_functions.cpp
+++ b/src/hardware_functions.cpp
@@ -49,6 +49,10 @@ QString get_hdid()
}
#elif defined __APPLE__
+
+#include <CoreFoundation/CoreFoundation.h>
+#include <IOKit/IOKitLib.h>
+
QString get_hdid()
{
CFStringRef serial;
diff --git a/src/path_functions.cpp b/src/path_functions.cpp
index 811ca76f..10c8ae53 100644
--- a/src/path_functions.cpp
+++ b/src/path_functions.cpp
@@ -30,6 +30,8 @@ QString AOApplication::get_base_path()
QString external_storage = getenv("EXTERNAL_STORAGE");
base_path = external_storage + "/AO2/";
}
+#elif defined(__APPLE__)
+ base_path = applicationDirPath() + "/../../../base/";
#else
base_path = applicationDirPath() + "/base/";
#endif