Skip to content

Commit

Permalink
Merge branch 'arch1t3cht:feature' into feature
Browse files Browse the repository at this point in the history
  • Loading branch information
mojie126 authored Jun 2, 2024
2 parents 866cdde + 80491ba commit 3b11b6e
Show file tree
Hide file tree
Showing 19 changed files with 84 additions and 163 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -177,15 +177,15 @@ jobs:
run: cd build && ninja win-portable

- name: Upload artifacts - win_installer
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: matrix.config.os == 'windows-latest'
with:
name: ${{ matrix.config.name }} - installer
path: build/Aegisub-*.exe
if-no-files-found: error

- name: Upload artifacts - portable.zip
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: matrix.config.os == 'windows-latest'
with:
name: ${{ matrix.config.name }} - portable
Expand All @@ -199,7 +199,7 @@ jobs:
meson compile osx-build-dmg -C build
- name: Upload artifacts - macOS dmg
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: startsWith(matrix.config.os, 'macos-')
with:
name: ${{ matrix.config.name }} - installer
Expand Down
16 changes: 5 additions & 11 deletions libaegisub/common/parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,15 @@
#include "libaegisub/color.h"
#include "libaegisub/ass/dialogue_parser.h"

#include <boost/phoenix/core.hpp>
#include <boost/phoenix/operator.hpp>
#include <boost/phoenix/fusion.hpp>
#include <boost/phoenix/statement.hpp>

#include <boost/spirit/include/qi.hpp>
#include <boost/spirit/include/phoenix_core.hpp>
#include <boost/spirit/include/phoenix_operator.hpp>
#include <boost/spirit/include/phoenix_fusion.hpp>
#include <boost/fusion/include/adapt_struct.hpp>
#include <boost/spirit/include/lex_lexertl.hpp>

// We have to use the copy of pheonix within spirit if it exists, as the
// standalone copy has different header guards
#ifdef HAVE_BOOST_SPIRIT_HOME_PHOENIX_VERSION_HPP
#include <boost/spirit/home/phoenix/statement.hpp>
#else
#include <boost/phoenix/statement.hpp>
#endif

BOOST_FUSION_ADAPT_STRUCT(
agi::Color,
(unsigned char, r)
Expand Down
7 changes: 4 additions & 3 deletions meson.build
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
project('Aegisub', ['c', 'cpp'],
license: 'BSD-3-Clause',
meson_version: '>=1.0.0',
default_options: ['cpp_std=c++14', 'buildtype=debugoptimized'],
default_options: ['cpp_std=c++17', 'buildtype=debugoptimized'],
version: '3.2.2')

cmake = import('cmake')
Expand Down Expand Up @@ -103,7 +103,7 @@ deps += dependency('libass', version: '>=0.9.7',

boost_modules = ['chrono', 'filesystem', 'thread', 'locale', 'regex']
if not get_option('local_boost')
boost_dep = dependency('boost', version: '>=1.60.0',
boost_dep = dependency('boost', version: '>=1.70.0',
modules: boost_modules + ['system'],
required: false,
static: get_option('default_library') == 'static')
Expand Down Expand Up @@ -145,6 +145,7 @@ else
endif

opt_var = cmake.subproject_options()
opt_var.set_override_option('cpp_std', 'c++14')
opt_var.add_cmake_defines({
'wxBUILD_INSTALL': false,
'wxBUILD_PRECOMP': 'OFF', # otherwise breaks project generation w/ meson
Expand Down Expand Up @@ -248,7 +249,7 @@ needs_ffmpeg = false

if get_option('bestsource').enabled()
conf.set('WITH_BESTSOURCE', 1)
bs = subproject('bestsource', default_options: ['link_static=' + (get_option('default_library') == 'static').to_string()])
bs = subproject('bestsource', default_options: ['enable_plugin=false'])
deps += bs.get_variable('bestsource_dep')
dep_avail += 'BestSource'
needs_ffmpeg = true
Expand Down
2 changes: 1 addition & 1 deletion src/audio_provider_bestsource.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ BSAudioProvider::BSAudioProvider(agi::fs::path const& filename, agi::BackgroundR
ps->SetTitle(from_wx(_("Indexing")));
ps->SetMessage(from_wx(_("Indexing file... This will take a while!")));
try {
bs = agi::make_unique<BestAudioSource>(filename.string(), static_cast<int>(track), -1, false, 0, provider_bs::GetCacheFile(filename), &bsopts, 0, [=](int Track, int64_t Current, int64_t Total) {
bs = agi::make_unique<BestAudioSource>(filename.string(), static_cast<int>(track), -1, false, 0, 1, provider_bs::GetCacheFile(filename), &bsopts, 0, [=](int Track, int64_t Current, int64_t Total) {
ps->SetProgress(Current, Total);
return !ps->IsCancelled();
});
Expand Down
2 changes: 0 additions & 2 deletions src/bestsource_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@

#ifdef WITH_BESTSOURCE

namespace std { class string_view; }

#include <bsshared.h>

#include <libaegisub/fs_fwd.h>
Expand Down
4 changes: 0 additions & 4 deletions src/colour_button.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,7 @@

#include "dialogs.h"

#if BOOST_VERSION >= 106900
#include <boost/gil.hpp>
#else
#include <boost/gil/gil_all.hpp>
#endif

AGI_DEFINE_EVENT(EVT_COLOR, agi::Color);

Expand Down
4 changes: 2 additions & 2 deletions src/subs_controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -389,11 +389,11 @@ void SubsController::Redo() {
}

wxString SubsController::GetUndoDescription() const {
return IsUndoStackEmpty() ? "" : undo_stack.back().undo_description;
return IsUndoStackEmpty() ? wxString() : undo_stack.back().undo_description;
}

wxString SubsController::GetRedoDescription() const {
return IsRedoStackEmpty() ? "" : redo_stack.back().undo_description;
return IsRedoStackEmpty() ? wxString() : redo_stack.back().undo_description;
}

agi::fs::path SubsController::Filename() const {
Expand Down
4 changes: 0 additions & 4 deletions src/subtitles_provider_libass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,7 @@
#include <libaegisub/util.h>

#include <atomic>
#if BOOST_VERSION >= 106900
#include <boost/gil.hpp>
#else
#include <boost/gil/gil_all.hpp>
#endif
#include <memory>
#include <mutex>

Expand Down
4 changes: 0 additions & 4 deletions src/video_frame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,7 @@

#include "video_frame.h"

#if BOOST_VERSION >= 106900
#include <boost/gil.hpp>
#else
#include <boost/gil/gil_all.hpp>
#endif
#include <wx/image.h>

namespace {
Expand Down
4 changes: 1 addition & 3 deletions src/video_provider_bestsource.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@
#ifdef WITH_BESTSOURCE
#include "include/aegisub/video_provider.h"

namespace std { class string_view; }

#include "bestsource_common.h"

#include "videosource.h"
Expand Down Expand Up @@ -130,7 +128,7 @@ BSVideoProvider::BSVideoProvider(agi::fs::path const& filename, std::string cons
ps->SetTitle(from_wx(_("Indexing")));
ps->SetMessage(from_wx(_("Decoding the full track to ensure perfect frame accuracy. This will take a while!")));
try {
bs = agi::make_unique<BestVideoSource>(filename.string(), "", 0, static_cast<int>(track_info.first), false, OPT_GET("Provider/Video/BestSource/Threads")->GetInt(), provider_bs::GetCacheFile(filename), &bsopts, [=](int Track, int64_t Current, int64_t Total) {
bs = agi::make_unique<BestVideoSource>(filename.string(), "", 0, static_cast<int>(track_info.first), false, OPT_GET("Provider/Video/BestSource/Threads")->GetInt(), 1, provider_bs::GetCacheFile(filename), &bsopts, [=](int Track, int64_t Current, int64_t Total) {
ps->SetProgress(Current, Total);
return !ps->IsCancelled();
});
Expand Down
4 changes: 0 additions & 4 deletions src/video_provider_dummy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,7 @@
#include <boost/algorithm/string/predicate.hpp>
#include <boost/filesystem/path.hpp>
#include <libaegisub/format.h>
#if BOOST_VERSION >= 106900
#include <boost/gil.hpp>
#else
#include <boost/gil/gil_all.hpp>
#endif

DummyVideoProvider::DummyVideoProvider(agi::vfr::Framerate fps, int frames, int width, int height, agi::Color colour, bool pattern)
: framecount(frames)
Expand Down
3 changes: 1 addition & 2 deletions subprojects/bestsource.wrap
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
[wrap-git]
url = https://github.com/vapoursynth/bestsource
revision = 9d7e218588867bf2b1334e5382b0f4d1b6a45aa1
revision = R4
clone-recursive = true
diff_files = bestsource/0001.patch

[provide]
bestsource = bestsource_dep
8 changes: 4 additions & 4 deletions subprojects/boost.wrap
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[wrap-file]
directory = boost_1_74_0
source_url = https://boostorg.jfrog.io/artifactory/main/release/1.74.0/source/boost_1_74_0.tar.gz
source_filename = boost_1_74_0.tar.gz
source_hash = afff36d392885120bcac079148c177d1f6f7730ec3d47233aa51b0afa4db94a5
directory = boost_1_83_0
source_url = https://boostorg.jfrog.io/artifactory/main/release/1.83.0/source/boost_1_83_0.tar.gz
source_filename = boost_1_83_0.tar.gz
source_hash = c0685b68dd44cc46574cce86c4e17c0f611b15e195be9848dfd0769a0a207628
patch_directory = boost
54 changes: 0 additions & 54 deletions subprojects/packagefiles/bestsource/0001.patch

This file was deleted.

7 changes: 6 additions & 1 deletion subprojects/packagefiles/boost/libs/filesystem/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,19 @@ filesystem_sources = files([
'src/portability.cpp',
'src/unique_path.cpp',
'src/utf8_codecvt_facet.cpp',
'src/windows_file_codecvt.cpp',
])

filesystem_args = ['-DBOOST_FILESYSTEM_SOURCE',
# normally involves a check for std::atomic_ref
'-DBOOST_FILESYSTEM_NO_CXX20_ATOMIC_REF=1',
is_static ? '-DBOOST_FILESYSTEM_STATIC_LINK=1' : '-DBOOST_FILESYSTEM_DYN_LINK=1']

filesystem_deps = []
if host_machine.system() == 'windows'
filesystem_sources += ['src/windows_file_codecvt.cpp']
filesystem_args += ['-DBOOST_USE_WINDOWS_H', '-DWIN32_LEAN_AND_MEAN', '-DNOMINMAX']
filesystem_args += ['-D_SCL_SECURE_NO_WARNINGS', '-D_SCL_SECURE_NO_DEPRECATE', '-D_CRT_SECURE_NO_WARNINGS', '-D_CRT_SECURE_NO_DEPRECATE']

bcrypt_dep = dependency('bcrypt', required: false)
if bcrypt_dep.found()
filesystem_deps += bcrypt_dep
Expand Down
Loading

0 comments on commit 3b11b6e

Please sign in to comment.