Skip to content

Commit 2c6a690

Browse files
authored
Merge pull request #246 from AttorneyOnline/2.8
Merges 2.8.5, which is a patch release for 2.8 with no substantially new features. This commit is release-ready.
2 parents ec1c95b + af1e760 commit 2c6a690

29 files changed

Lines changed: 1655 additions & 1583 deletions

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ base/characters
2222
base/sounds
2323
base/callwords.ini
2424
base/config.ini
25+
base/serverlist.txt
2526

2627
.qmake.stash
2728

.gitlab-ci.yml

Lines changed: 31 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ stages:
55

66
cache:
77
key: ${CI_COMMIT_REF_SLUG}
8-
paths:
9-
- lib/
108

119
variables:
1210
DEBIAN_FRONTEND: noninteractive
@@ -15,7 +13,7 @@ before_script:
1513
- echo Current working directory is $(pwd)
1614

1715
build linux x86_64:
18-
image: ubuntu
16+
image: ubuntu:18.04
1917
stage: build
2018
tags:
2119
- docker
@@ -34,15 +32,15 @@ build linux x86_64:
3432
- clang --version
3533

3634
# Extract BASS
37-
#- mkdir bass
38-
#- cd bass
39-
#- curl http://www.un4seen.com/files/bass24-linux.zip -o bass.zip
40-
#- unzip bass.zip
41-
#- cp x64/libbass.so ../lib
42-
#- curl http://www.un4seen.com/files/bassopus24-linux.zip -o bassopus.zip
43-
#- unzip bassopus.zip
44-
#- cp x64/libbassopus.so ../lib
45-
#- cd ..
35+
- mkdir bass
36+
- cd bass
37+
- curl http://www.un4seen.com/files/bass24-linux.zip -o bass.zip
38+
- unzip bass.zip
39+
- cp x64/libbass.so ../lib
40+
- curl http://www.un4seen.com/files/bassopus24-linux.zip -o bassopus.zip
41+
- unzip bassopus.zip
42+
- cp x64/libbassopus.so ../lib
43+
- cd ..
4644

4745
# Extract Discord RPC
4846
- mkdir discord-rpc
@@ -53,21 +51,32 @@ build linux x86_64:
5351
- cd ..
5452

5553
# Extract QtApng
56-
- mkdir qtapng
57-
- cd qtapng
58-
- 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
59-
- tar -xvf apng.tar.xz
60-
- cp gcc_64/plugins/imageformats/libqapng.so ../lib
54+
#- mkdir qtapng
55+
#- cd qtapng
56+
#- 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
57+
#- tar -xvf apng.tar.xz
58+
#- cp gcc_64/plugins/imageformats/libqapng.so ../lib
59+
#- cd ..
60+
61+
# Build QtApng
62+
- git clone https://github.com/Skycoder42/QtApng
63+
- cd QtApng
64+
- qmake -spec linux-clang
65+
# Don't make examples - they're not compatible with Qt 5.9
66+
- make -j4 sub-src
67+
#- make sub-src-install_subtargets
68+
- cp plugins/imageformats/libqapng.so ../lib
6169
- cd ..
6270

6371
# Build
64-
- qmake -spec linux-clang "DEFINES += DISCORD QTAUDIO"
72+
- qmake -spec linux-clang "DEFINES += DISCORD"
6573
- make -j4
6674

6775
# Post-processing
6876
- upx --lzma -9 --force bin/Attorney_Online
6977
artifacts:
7078
paths:
79+
- lib/
7180
- bin/
7281

7382
build windows i686:
@@ -109,19 +118,21 @@ build windows i686:
109118
- ls lib
110119

111120
# Build
112-
- /opt/mxe/usr/${TARGET_SPEC}/qt5/bin/qmake "DEFINES += DISCORD BASSAUDIO"
121+
- /opt/mxe/usr/${TARGET_SPEC}/qt5/bin/qmake "DEFINES += DISCORD"
113122
- make -j4
114123

115124
# Post-processing
116125
- upx --lzma -9 --force bin/Attorney_Online.exe
117126
artifacts:
118127
paths:
128+
- lib/
119129
- bin/
120130

121131
# Base folder
122132
.deploy_base: &deploy_base |
123-
mkdir base
124133
cp -a ../base/ base/
134+
rm -rf base/themes/_Unadapted/
135+
rm base/themes/.gitattributes base/themes/.git
125136

126137
# Miscellaneous files
127138
.deploy_misc: &deploy_misc |

Attorney_Online.pro

Lines changed: 7 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ QT += core gui widgets network
33
TARGET = Attorney_Online
44
TEMPLATE = app
55

6-
VERSION = 2.8.4.0
6+
VERSION = 2.8.5.0
77

88
INCLUDEPATH += $$PWD/include
99
DESTDIR = $$PWD/bin
@@ -22,35 +22,15 @@ contains(DEFINES, DISCORD) {
2222
LIBS += -ldiscord-rpc
2323
}
2424

25-
# Uncomment to enable the BASS audio engine
26-
# (Recommended for Windows)
27-
# DEFINES += BASSAUDIO
28-
29-
contains(DEFINES, BASSAUDIO) {
30-
LIBS += -lbass
31-
LIBS += -lbassopus
32-
}
33-
34-
# Uncomment to enable the Qt audio engine
35-
# (Recommended for non-Windows platforms)
36-
# DEFINES += QTAUDIO
37-
38-
contains(DEFINES, QTAUDIO) {
39-
QT += multimedia
40-
}
41-
42-
AUDIO_DEFINES = $$find(DEFINES, BASSAUDIO) $$find(DEFINES, QTAUDIO)
43-
count(AUDIO_DEFINES, 0) {
44-
warning("No audio system selected. Your build will not have audio.")
45-
}
46-
47-
count(AUDIO_DEFINES, 2) {
48-
error("More than one audio system selected.")
49-
}
25+
# As of 2.8.5, BASS and BASSOPUS are required for all platforms. Qt Multimedia
26+
# is no longer an option due to outdated code and lack of versatility.
27+
# Download at un4seen.com and place the DLLs in the "lib" and "bin" folders.
28+
DEFINES += BASSAUDIO
29+
LIBS += -lbass
30+
LIBS += -lbassopus
5031

5132
macx:LIBS += -framework CoreFoundation -framework Foundation -framework CoreServices
5233

53-
5434
CONFIG += c++14
5535

5636
RESOURCES += resources.qrc

base/themes

Submodule themes updated 83 files

include/aoapplication.h

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
#include "datatypes.h"
66
#include "discord_rich_presence.h"
77

8+
#include "bass.h"
9+
#include "bassopus.h"
10+
811
#include <QApplication>
912
#include <QFile>
1013
#include <QSettings>
@@ -23,9 +26,6 @@
2326
#include <QScreen>
2427
#include <QStringList>
2528
#include <QTextStream>
26-
#ifdef QTAUDIO
27-
#include <QAudioDeviceInfo>
28-
#endif
2929

3030
class NetworkManager;
3131
class Lobby;
@@ -202,7 +202,8 @@ class AOApplication : public QApplication {
202202

203203
// Returns the value of whether custom chatboxes should be a thing.
204204
// from the config.ini.
205-
// I am increasingly maddened by the lack of dynamic auto-generation system for settings.
205+
// I am increasingly maddened by the lack of dynamic auto-generation system
206+
// for settings.
206207
bool is_customchat_enabled();
207208

208209
// Returns the value of the maximum amount of lines the IC chatlog
@@ -213,14 +214,20 @@ class AOApplication : public QApplication {
213214
// or downwards (vanilla behaviour).
214215
bool get_log_goes_downwards();
215216

217+
// Returns whether the log should separate name from text via newline or :
218+
bool get_log_newline();
219+
220+
// Get spacing between IC log entries.
221+
int get_log_margin();
222+
223+
// Returns whether the log should have a timestamp.
224+
bool get_log_timestamp();
225+
216226
// Returns the username the user may have set in config.ini.
217227
QString get_default_username();
218228

219229
// Returns the audio device used for the client.
220230
QString get_audio_output_device();
221-
#ifdef QTAUDIO
222-
QAudioDeviceInfo QtAudioDevice;
223-
#endif
224231

225232
// Returns whether the user would like to have custom shownames on by default.
226233
bool get_showname_enabled_by_default();
@@ -433,10 +440,16 @@ class AOApplication : public QApplication {
433440
// The file name of the log file in base/logs.
434441
QString log_filename;
435442

443+
void initBASS();
444+
static void load_bass_opus_plugin();
445+
static void CALLBACK BASSreset(HSTREAM handle, DWORD channel, DWORD data,
446+
void *user);
447+
static void doBASSreset();
448+
436449
private:
437450
const int RELEASE = 2;
438451
const int MAJOR_VERSION = 8;
439-
const int MINOR_VERSION = 4;
452+
const int MINOR_VERSION = 5;
440453

441454
QString current_theme = "default";
442455

include/aoblipplayer.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
11
#ifndef AOBLIPPLAYER_H
22
#define AOBLIPPLAYER_H
33

4-
#if defined(BASSAUDIO)
54
#include "bass.h"
65
#include "bassopus.h"
7-
#elif defined(QTAUDIO)
8-
#include <QSoundEffect>
9-
#endif
106

117
#include "aoapplication.h"
128

@@ -35,11 +31,7 @@ class AOBlipPlayer {
3531

3632
void set_volume_internal(qreal p_volume);
3733

38-
#if defined(BASSAUDIO)
3934
HSTREAM m_stream_list[5];
40-
#elif defined(QTAUDIO)
41-
QSoundEffect m_blips;
42-
#endif
4335
};
4436

4537
#endif // AOBLIPPLAYER_H

include/aomusicplayer.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,8 @@
22
#define AOMUSICPLAYER_H
33
#include "file_functions.h"
44

5-
#if defined(BASSAUDIO)
65
#include "bass.h"
76
#include "bassopus.h"
8-
#elif defined(QTAUDIO)
9-
#include <QMediaPlayer>
10-
#endif
117

128
#include "aoapplication.h"
139

@@ -44,12 +40,8 @@ public slots:
4440
// Channel 1 = ambience
4541
// Channel 2 = extra
4642
// Channel 3 = extra
47-
#if defined(BASSAUDIO)
4843
HSTREAM m_stream_list[4];
4944
HSYNC loop_sync[4];
50-
#elif defined(QTAUDIO)
51-
QMediaPlayer m_stream_list[4];
52-
#endif
5345
};
5446

5547
#endif // AOMUSICPLAYER_H

include/aooptionsdialog.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,12 @@ class AOOptionsDialog : public QDialog {
4646
QCheckBox *ui_downwards_cb;
4747
QLabel *ui_length_lbl;
4848
QSpinBox *ui_length_spinbox;
49+
QLabel *ui_log_newline_lbl;
50+
QCheckBox *ui_log_newline_cb;
51+
QLabel *ui_log_margin_lbl;
52+
QSpinBox *ui_log_margin_spinbox;
53+
QLabel *ui_log_timestamp_lbl;
54+
QCheckBox *ui_log_timestamp_cb;
4955
QFrame *ui_log_names_divider;
5056
QLineEdit *ui_username_textbox;
5157
QLabel *ui_username_lbl;

include/aosfxplayer.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
11
#ifndef AOSFXPLAYER_H
22
#define AOSFXPLAYER_H
33

4-
#if defined(BASSAUDIO)
54
#include "bass.h"
65
#include "bassopus.h"
7-
#elif defined(QTAUDIO)
8-
#include <QSoundEffect>
9-
#endif
106

117
#include "aoapplication.h"
128

@@ -37,11 +33,7 @@ class AOSfxPlayer {
3733

3834
const int m_channelmax = 5;
3935

40-
#if defined(BASSAUDIO)
4136
HSTREAM m_stream_list[5];
42-
#elif defined(QTAUDIO)
43-
QSoundEffect m_stream_list[5];
44-
#endif
4537
};
4638

4739
#endif // AOSFXPLAYER_H

0 commit comments

Comments
 (0)