1
0
mirror of https://github.com/odrling/Aegisub synced 2025-04-11 22:56:02 +02:00

89 Commits

Author SHA1 Message Date
Ryan Lucia
b0fc741099 Bump to 3.4.0 2024-12-18 15:06:50 -08:00
arch1t3cht
c88f918be0 Make update checker use libcurl and https
The horrible hack with the curl_meson subproject is needed since the
libcurl dependency generated by libcurl's cmake build system (via
meson's cmake module) includes its internal files its
include_directories, which shadows certain other includes. So instead
we manually replace the include_directories with the correct ones, taken
from a separate meson subproject. This needs an additional wrap file,
but it points to the same subproject directory in order to prevent there
being multiple downloads of the same libcurl source that could go out of
sync at some point.

Co-authored-by: sepro <4618135+seproDev@users.noreply.github.com>
2023-12-03 15:19:42 -08:00
arch1t3cht
9972de4357 meson: Add libresrc headers as dependencies
These are included in the Aegisub source files, so they need to be
generated before compiling.
2023-12-03 15:18:57 -08:00
arch1t3cht
4a9879a408 meson: Set NDEBUG on release builds
The old MSVC build system also set this:
6f546951b4/build/standard-settings.props (L62)
2023-12-03 15:18:57 -08:00
arch1t3cht
a7b8e554bc meson: Add regen dependencies for libresrc and bitmaps 2023-12-03 15:18:57 -08:00
Ryan Lucia
7fbef41ce8
Set ExecutionPolicy directly when invoking Powershell scripts (#185) 2023-12-03 13:29:56 -08:00
Ryan Lucia
c29c24093c Add a build option to tag official releases 2023-12-03 13:13:36 -08:00
arch1t3cht
0b40de8bea
C++ modernization and boost removal (#182)
* Bump boost to 1.83

* Switch to building as C++20

Co-authored-by: Ryan Lucia <ryan@luciaonline.net>

* Fix many warnings

* Rip out boost::locale and just use ICU directly

* Fix

* Replace boost::filesystem with std::filesystem

* Fix

* Addditional c++ modernization

* Use string_view all over the place and rip out more boost stuff

* Simply BOM handling in charset conversions

* libaegisub: fix dispatch types

* Fix

* Bump subprojects

* Reorganize tests build file

* Fix remaining compilation errors on Linux

* Rip out the last bits of boost::filesystem

* Remove remaining uses of boost string joins

* Fix some errors introduced with refactors

* Revert "Simply BOM handling in charset conversions"

This reverts commit 2e6b26d5ffe69d7fb280bb1d18c6758112244b64.
Taking out the BOM handling broke tests, so it'll probably break more
stuff.

* Bring back IconvWrapper::RequiredBufferSize

This partially reverts 62befa996126659d139e9ad53e631780b6ed6122 .
This function is actually used in charset_conv_win.cpp

* Fix ifind after moving to ICU

The previous logic didn't check if the match was on parts of
decomposed characters, so it also failed the corresponding test.

* Remove incorrect karaoke_matcher test

This was clearly incorrect and probably just unfinished.

* Remove leftover boost::locale code

* Move iconv include to charset_conv.h

On newer mac sdks iconv_t is defined differently, so it's harder to
just have a typedef for it.

* Fix compilation on arm64 mac

wx uses a different string implementation here, and utf8_string()
doesn't exist there.

* Fix luajit dependency in luabins project

Since luajit always first tried using dependency(), further calls
of dependency() will also always return system luajit.
meson.override_dependency() won't work.
This makes luabins link system luajit where it's available while aegisub
itself uses the subproject's luajit, which causes all kinds of fun
issues and definitely didn't baffle me four hours...

The added solution for this is horribly ugly (and also has problems when
reconfiguring...) but it's the only one I found that works. Maybe it's
better to always require interal luajit after all, or make the user
choose with a meson option?

* Fix locale initialization

Previously this would fail on startup because the automation menu
uses boost::locale::comparator.
... Or maybe the locale init change should just be reverted entirely?
Or it should be something different? I don't really know.

* Revert "Fix luajit dependency in luabins project"

This reverts commit 340fb9c6125412d18f23c08c00f2bc8f46774b6d.

* Fix luajit dependency in luabins project, take 2

Thinking about it some more, just copying the detection logic is
probably the lesser evil here.

* Fix agi::split_iterator after refactor

is_end being removed caused it to not output an empty segment at the
end if the input ends with a delimiter, but existing usages relied
on it doing that.

* Fix style parsing after refactor

* Fix tons of implicit this captures

* Enable CI to test

* Update deprecated hunspell usage

* Fix tests compilation on mac

* Make sure wx subproject builds with c++14

* Fix compilation on Windows

* Revert "Bring back IconvWrapper::RequiredBufferSize"

This reverts commit 04f4b260a08de6497c583f025090ca4f9fe1ef6d.

* Pin libass wrap for now

Apparently dependency('iconv') breaks when iconv is overridden??

* Fix compilation with wx 3.0

* Fix startup crash on Windows

windows.h was defining the ERROR macro, which shadowed the
DialogueTokenType enum variant, which broke the lexer construction.

* Fix SplitText ICU logic

Include UBRK_WORD_IDEO and check the entire rules vec. This now matches
the logic of boost::locale.

* Add test for character_count with \N and friends

* Fix ass_dialogue parsing after refactor

* Revert "Pin libass wrap for now"

This reverts commit 3802bb7272a8bf4861c09b020c9eee9e643804fc.

* Remove iconv's stdbool.h

This was breaking things (libass) and doesn't seem to be
needed any more.

* Revert changes to to_wx

These broke some things, in particular FromUTF8Unchecked seems to not
like empty strings. Probably safer to just revert.

* Fix kara replacer after refactor

* Fix karaoke timing mode after refactor

* Revert "Enable CI to test"

This reverts commit 256cbebbfc9cf4eb5c497898670ac28ce24ce2fd.

---------

Co-authored-by: Ryan Lucia <ryan@luciaonline.net>
Co-authored-by: Thomas Goyne <plorkyeran@gmail.com>
2023-12-03 10:59:50 -08:00
Thomas Goyne
7aa9e19a48 Define luabins as a valid subproject 2023-11-22 11:46:43 -08:00
Eli Schwartz
8336c7d97c meson: use best practices lookup for iconv support
Meson 0.60.0 adds support for an "iconv" dependency that always does the
right thing for you, so that you don't need to think about it. It also
has some side advantages:
- you can do dependency fallback, and --force-fallback-for=iconv works
- it logs one line, not two, and that is "dependency found? yes or no"

Since Aegisub doesn't mandate the use of such new versions of Meson, we
cannot assume the dependency works. Instead, adapt to the version of
Meson being used: on new enough versions of Meson, use the new
dependency, but on older versions of Meson, use the pre-existing logic,
which isn't as nice but has been producing correct results so far.
2022-07-07 00:08:24 -07:00
Oleg Oshmyan
f21d8a3607 meson: use OpenAL.framework on macOS
It is not picked up by the existing dependency() check because its
version is unknown to Meson, which fails the version constraint.
Besides, dependency('openal') seems to try "openal.framework",
which may or may not work on case-sensitive file systems.
2021-11-10 20:12:21 -07:00
Oleg Oshmyan
1d01f8adc8 meson: allow unconstrained dependency version to be "unknown"
And allow for compound version constraints in the future.
2021-11-10 20:12:21 -07:00
Oleg Oshmyan
18503946d5 meson: don't check disabled dependencies at all
Don't search for the dependency and set up fallback
only to throw it away if the option is disabled.
This is a waste, and this gives the user the illusion
that the request to disable the feature was ignored.
2021-11-10 20:12:21 -07:00
woclass
0dffcec461
Fix meson warning (#126)
* [git] ignore IDE setting, Meson subprojects

* [win_installer] rename *.mo -> *.gmo

* [win_installer] only add aeg translations

* [win_installer] split aeg/wx translations

* [win_installer] gen & pack translations

* [git] ignore hunspell source dir

* [git] ignore uchardet source dir

* [test] Generate the test executable

run with `meson test`

* [test] add tools to remove test data files

`unset.bat FULL_PATH`

* [test] set to correct Error type

* [test] Set Source character sets to UTF-8 for MSVC

* [test] move test data files to build_root

* [meson/wxWidgets] fix warning: deprecated feature `cmake_options`

* [meson] fix warning:  msvc does not support C++11

* [meson/fribidi] add original meson.build file

* [meson/fribidi] merge pr-151

https://github.com/fribidi/fribidi/pull/151
"meson: add fribidi_static_cargs to extra_cflags"

* [meson/fribidi] fix DEPRECATION

"Library fribidi was passed to the "libraries" keyword argument of a previous call to generate() method instead of first positional argument."

* [git]  rm IDE dir

* [meson] remove old flags

* [meson] fixed in upstream
2021-05-24 09:47:34 -04:00
woclass
7e9c7d7aa0
Run tests (#125)
* [git] ignore IDE setting, Meson subprojects

* [win_installer] rename *.mo -> *.gmo

* [win_installer] only add aeg translations

* [win_installer] split aeg/wx translations

* [win_installer] gen & pack translations

* [git] ignore hunspell source dir

* [git] ignore uchardet source dir

* [test] Generate the test executable

run with `meson test`

* [test] add tools to remove test data files

`unset.bat FULL_PATH`

* [test] set to correct Error type

* [test] Set Source character sets to UTF-8 for MSVC

* [test] move test data files to build_root

* [git] remove IDE dir

* [git] ignore gtest subprojects

* [ci] run test in ci

* [meson/test] use more meaningful name

* [test] Add more comments and help msg
2021-05-23 23:33:33 -04:00
Myaamori
dfb0a1ca99 meson: don't use deprecated get_pkgconfig_variable 2021-05-23 18:37:36 -04:00
Myaamori
2c927bac32 meson: make --force-fallback-for=luajit work
This option makes the dependency() call resolve to the subproject
which breaks the Lua 5.2 compatibility check.
This change just ignores the result of the dependency() call
if it resolves to the subproject and then re-fetches it
with a subproject() call later.
Alternatively we could explicitly handle the case where dependency()
resolves to the subproject, but that's just extra code for no
observable difference in behaviour.
2021-05-23 18:37:36 -04:00
Ryan Lucia
aeba7a390e Re-enable MacOS CI 2021-05-22 02:48:27 -04:00
Myaamori
84ac716972 meson: add uchardet port
Meson port instead of using CMake as I ran into issues with the
src directory (where uchardet.h is located) not being appended
to the include path, and on Windows I ran into a Meson issue
where a -D macro definition was being interpreted as a filename.
In the end a Meson port seemed simpler than working out the CMake
issues, as the CMakeLists.txt files were straightforward and easy
to port.

Note that because of the directory structure of the uchardet source
I had to change the include directive from uchardet/uchardet.h
to just uchardet.h. This is actually more in line with the uchardet
pkg-config file, which appends /usr/include/uchardet to the include path.
2021-05-21 21:09:36 -04:00
Myaamori
c43e4fba3c meson: add Hunspell port
This moves the visibility logic (HUNSPELL_STATIC/BUILDING_LIBHUNSPELL)
to the build system. Only relevant on Windows.
2021-05-21 21:09:36 -04:00
Myaamori
b00f5dd58e meson: add option to specify wxWidgets version 2021-04-09 18:00:01 -04:00
Ryan
ef64307ba1 Switch to upstream LuaJIT
This does not yet handle the patching, but should build without issue
2021-03-27 12:34:18 -04:00
Ryan
d32ef75cba meson: move executable to the root directory 2021-03-27 09:29:37 -04:00
Ryan Lucia
c218db6f34 meson: disable LTO by default 2021-03-06 14:57:27 -05:00
Ryan Lucia
2abb098bd1 meson: improve iconv detection 2021-02-22 14:26:03 -05:00
Ryan Lucia
c32c612dc3 meson: set dataroot correctly for osx bundle 2021-01-30 16:22:05 -05:00
Ryan
b72f02b9f2 meson: reorder nasm download to work with global args 2021-01-30 12:11:34 -05:00
Ryan
36b75b827d meson: fix warnings, cleanup 2021-01-30 12:02:18 -05:00
Ryan
73ad926880 meson: define CSRI_NO_EXPORT earlier in setup 2021-01-30 09:12:13 -05:00
Ryan
e186fa4627 meson: disable CSRI on non-windows for now 2021-01-30 09:04:22 -05:00
Ryan
7d9feca578 meson: add CSRI support 2021-01-30 08:57:39 -05:00
Ryan
d8c348e897 meson: standardized config defines to set integer 1 2021-01-30 08:56:01 -05:00
Ryan
7640576cc9 meson: use conf object for defines where appropriate 2021-01-30 07:25:03 -05:00
Ryan
bec44eaab8 meson: define P_LOCALE 2021-01-16 13:15:05 -05:00
Ryan
b8d1864a07 aegisub: ifdef wxBitmap constructor to scale on MacOS only
Quick fix to unblock the build; need better HiDPI handling across the board
2021-01-16 13:01:51 -05:00
Ryan
8b8f4a3925 meson: bump minimum ffms2 version to 2.22
It's been out for 6 years, so this should be fairly safe. Also fix a build error that somehow snuck in during the merge
2021-01-16 05:31:08 -05:00
Ryan
a2da1616c0 meson: set minimum win version to 7
I think setting it at 8 was accidental? This matches the installer, so we should be consistent throughout
2021-01-16 01:26:19 -05:00
Ryan Lucia
b51463a5f5 meson: Fix build on OSX 2021-01-10 03:14:12 -05:00
Ryan
f240c01cbc meson: only manually set _DEBUG on non-windows 2021-01-10 03:14:12 -05:00
Ryan
72edb88982 meson: add Avisynth option, compile libass_gdi_fontselect
Sadly, building with Avisynth is still broken.
2021-01-10 03:14:12 -05:00
Ryan Lucia
194521e777 meson: set wx subproject buildtype, remove d_vscrt hack 2021-01-10 03:14:12 -05:00
Myaamori
abec21f4e0 meson: fix wx subproject on Linux 2021-01-10 03:14:12 -05:00
Myaamori
8bb8b34fe7 meson: set _DEBUG on all platforms for debug builds 2021-01-10 03:14:12 -05:00
Myaamori
0ea6d36fca meson: don't generate git_version.xml and don't regenerate git_version.h on windows
Also fix incorrect use of return outside function. Fixes #80
2021-01-10 03:14:12 -05:00
Ryan Lucia
daa4cc8bbc meson: search for 'system' module with system boost
System was made header-only by 1.74, so we can't check for it in the submodule, but when linking with older system boosts we need to make sure it gets linked in
2021-01-10 03:14:12 -05:00
Ryan Lucia
dc3aaa5df0 meson: allow boost fallback under msvc 2021-01-10 03:14:12 -05:00
Ryan Lucia
60431862fa meson: allow wx fallback on all platforms 2021-01-10 03:14:12 -05:00
Ryan Lucia
7d0028799f meson: remove old wx_path and icu_path hacks 2021-01-10 03:14:12 -05:00
Ryan Lucia
e393509515 meson: default to buildtype debugoptimized 2021-01-10 03:14:12 -05:00
Ryan Lucia
e3826cb17e meson: initial attempt to generate Aegisub.app on macOS 2021-01-10 03:14:12 -05:00