Merge branch 'bugfixes' into feature
This commit is contained in:
commit
18fd966bd9
5 changed files with 57 additions and 9 deletions
42
.github/workflows/ci.yml
vendored
42
.github/workflows/ci.yml
vendored
|
@ -57,6 +57,19 @@ jobs:
|
|||
buildtype: release,
|
||||
args: ''
|
||||
}
|
||||
- name: Ubuntu AppImage
|
||||
os: ubuntu-22.04
|
||||
buildtype: release
|
||||
appimage: true
|
||||
# distro ffms is currently broken
|
||||
args: >-
|
||||
--prefix=/usr
|
||||
-Dbuild_appimage=true
|
||||
-Ddefault_library=static
|
||||
--force-fallback-for=ffms2
|
||||
-Davisynth=enabled
|
||||
-Dbestsource=enabled
|
||||
-Dvapoursynth=enabled
|
||||
- {
|
||||
name: macOS Release,
|
||||
os: macos-latest,
|
||||
|
@ -104,13 +117,13 @@ jobs:
|
|||
brew install pulseaudio # NO OpenAL in github CI
|
||||
|
||||
- name: Install dependencies (Linux)
|
||||
if: matrix.config.os == 'ubuntu-latest'
|
||||
if: startsWith(matrix.config.os, 'ubuntu-')
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install ninja-build build-essential libx11-dev libwxgtk3.0-gtk3-dev libfreetype6-dev pkg-config libfontconfig1-dev libass-dev libasound2-dev libffms2-dev intltool libboost-all-dev
|
||||
|
||||
- name: Configure
|
||||
run: meson build ${{ matrix.config.args }} -Dbuildtype=${{ matrix.config.buildtype }}
|
||||
run: meson setup build ${{ matrix.config.args }} -Dbuildtype=${{ matrix.config.buildtype }}
|
||||
|
||||
- name: Build
|
||||
run: meson compile -C build
|
||||
|
@ -159,3 +172,28 @@ jobs:
|
|||
name: ${{ matrix.config.name }} - installer
|
||||
path: build/Aegisub-*.dmg
|
||||
if-no-files-found: error
|
||||
|
||||
# Linux artifacts (AppImage)
|
||||
- name: Generate AppImage
|
||||
if: matrix.config.appimage
|
||||
run: |
|
||||
mkdir -p appimage/appdir
|
||||
meson install -C build --destdir=../appimage/appdir
|
||||
|
||||
cd appimage
|
||||
sudo apt-get install libfuse2
|
||||
curl -L "https://github.com/linuxdeploy/linuxdeploy/releases/download/1-alpha-20220822-1/linuxdeploy-x86_64.AppImage" -o linuxdeploy
|
||||
curl -L "https://github.com/AppImage/AppImageKit/releases/download/13/appimagetool-x86_64.AppImage" -o appimagetool
|
||||
chmod +x linuxdeploy appimagetool
|
||||
|
||||
./linuxdeploy --appdir appdir --desktop-file=appdir/aegisub.desktop
|
||||
./appimagetool appdir
|
||||
# ./appimagetool -g -s appdir --comp xz
|
||||
|
||||
- name: Upload artifacts - Linux AppImage
|
||||
uses: actions/upload-artifact@v3
|
||||
if: matrix.config.appimage
|
||||
with:
|
||||
name: ${{ matrix.config.name }}
|
||||
path: appimage/*.AppImage
|
||||
if-no-files-found: error
|
||||
|
|
|
@ -75,14 +75,13 @@ void Path::FillPlatformSpecificPaths() {
|
|||
SetToken("?local", home/".aegisub");
|
||||
|
||||
#ifdef APPIMAGE_BUILD
|
||||
agi::fs::path data = exe_dir();
|
||||
if (data == "") data = home/".aegisub";
|
||||
SetToken("?data", data);
|
||||
SetToken("?dictionary", Decode("?data/dictionaries"));
|
||||
agi::fs::path exe = exe_dir();
|
||||
agi::fs::path data_from_bin = agi::fs::path(P_DATA).lexically_relative(P_BIN);
|
||||
SetToken("?data", (exe != "" ? exe/data_from_bin : home/".aegisub").make_preferred());
|
||||
#else
|
||||
SetToken("?data", P_DATA);
|
||||
SetToken("?dictionary", "/usr/share/hunspell");
|
||||
#endif
|
||||
SetToken("?dictionary", "/usr/share/hunspell");
|
||||
|
||||
#else
|
||||
agi::fs::path app_support = agi::util::GetApplicationSupportDirectory();
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
project('Aegisub', ['c', 'cpp'],
|
||||
license: 'BSD-3-Clause',
|
||||
meson_version: '>=0.57.0',
|
||||
meson_version: '>=0.61.0',
|
||||
default_options: ['cpp_std=c++14', 'buildtype=debugoptimized'],
|
||||
version: '3.2.2')
|
||||
|
||||
|
@ -57,11 +57,15 @@ if get_option('buildtype') == 'release'
|
|||
endif
|
||||
|
||||
conf = configuration_data()
|
||||
conf.set_quoted('P_BIN', bindir)
|
||||
conf.set_quoted('P_DATA', dataroot)
|
||||
conf.set_quoted('P_LOCALE', localedir)
|
||||
if get_option('credit') != ''
|
||||
conf.set_quoted('BUILD_CREDIT', get_option('credit'))
|
||||
endif
|
||||
if get_option('build_appimage')
|
||||
conf.set('APPIMAGE_BUILD', 1)
|
||||
endif
|
||||
conf.set('WITH_UPDATE_CHECKER', get_option('enable_update_checker'))
|
||||
|
||||
deps = []
|
||||
|
@ -98,7 +102,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.50.0',
|
||||
boost_dep = dependency('boost', version: '>=1.60.0',
|
||||
modules: boost_modules + ['system'],
|
||||
required: false,
|
||||
static: get_option('default_library') == 'static')
|
||||
|
|
|
@ -28,3 +28,4 @@ option('update_server', type: 'string', value: 'updates.aegisub.org', descriptio
|
|||
option('update_url', type: 'string', value: '/trunk', description: 'Base path to use for the update checker')
|
||||
|
||||
option('build_osx_bundle', type: 'boolean', value: 'false', description: 'Package Aegisub.app on OSX')
|
||||
option('build_appimage', type: 'boolean', value: 'false', description: 'Prepare for AppImage packaging')
|
||||
|
|
|
@ -38,4 +38,10 @@ else
|
|||
install_data('desktop' / dir / 'aegisub.' + ext,
|
||||
install_dir: datadir / 'icons' / 'hicolor' / dir / 'apps')
|
||||
endforeach
|
||||
|
||||
if get_option('build_appimage')
|
||||
install_symlink('AppRun', install_dir: '/', pointing_to: bindir.strip('/') / 'aegisub')
|
||||
install_symlink('.DirIcon', install_dir: '/', pointing_to: datadir.strip('/') / 'icons' / 'hicolor' / 'scalable' / 'apps' / 'aegisub.svg')
|
||||
install_symlink('aegisub.desktop', install_dir: '/', pointing_to: datadir.strip('/') / 'applications' / 'aegisub.desktop')
|
||||
endif
|
||||
endif
|
||||
|
|
Loading…
Reference in a new issue