Update, March 2022: As of macOS 12.3, Aegisub r9198 and v3.3.2 (wangqr fork) no longer crash on launch.
ver. 9018-rcombs-local-6a556aac6: https://elifessler.com/aegi/6a556aa-Aegisub.app.zip (129.6 MB, built 2021-12-23)
These are instructions for the fish shell. Some commands (e.g. export
, set
) might be different if you're using bash or zsh instead (e.g. CPPFLAGS=
instead of set CPPFLAGS
)
git clone https://github.com/rcombs/Aegisub
cd Aegisub/
git checkout rcombs-local
brew install autoconf automake ffmpeg ffms2 fftw freetype fribidi gettext icu4c libass m4 pkg-config boost
brew install luajit --HEAD
brew link --force gettext
export LDFLAGS="-L/opt/homebrew/opt/icu4c/lib"
export CPPFLAGS="-I/opt/homebrew/opt/icu4c/include"
export PKG_CONFIG_PATH="/opt/homebrew/opt/icu4c/lib/pkgconfig"
./autogen.sh
cd vendor/wxWidgets/
set CPPFLAGS "$CPPFLAGS -D__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES=0 -I/opt/homebrew/opt/boost/include"
git submodule update --init
./configure --disable-all-features --enable-unicode --enable-utf8 --enable-stl --enable-exceptions --enable-log --enable-threads --enable-palette --enable-baseevtloop --enable-selectloop --enable-gui --enable-timer --enable-menus --enable-intl --enable-xlocale --enable-statusbar --enable-sysoptions --enable-button --enable-bmpbutton --enable-listbook --enable-listbox --enable-listctrl --enable-checkbox --enable-textctrl --enable-hyperlink --enable-treebook --enable-image --enable-stopwatch --enable-scrollbar --enable-longlong --enable-geometry --enable-imaglist --enable-stc --enable-hotkey --enable-regkey --enable-graphics_ctx --enable-dataobj --enable-file --enable-ffile --enable-streams --enable-dragimage --enable-dnd --enable-radiobox --enable-radiobtn --enable-spinbtn --enable-spinctrl --enable-slider --enable-searchctrl --enable-stattext --enable-statline --enable-statbox --enable-statbmp --enable-toolbar --enable-tbarnative --enable-clipboard --enable-menubar --enable-msgdlg --enable-filedlg --enable-fontdlg --enable-textdlg --enable-choicedlg --enable-coldlg --enable-dirdlg --enable-numberdlg --enable-aboutdlg --enable-dataviewctrl --enable-datepick --enable-dirpicker --enable-filectrl --enable-filepicker --enable-fontpicker --enable-treectrl --enable-comboctrl --enable-rearrangectrl --enable-treelist --enable-timepick --enable-accel --enable-headerctrl --enable-variant --enable-datetime --enable-checklst --enable-choice --enable-choicebook --enable-combobox --enable-gauge --enable-tooltips --enable-validators --enable-std_string --enable-std-containers --enable-popupwin --enable-controls --enable-stc --enable-calendar --enable-sash --enable-splitter --enable-arcstream --enable-zipstream --enable-xpm --enable-dynlib --enable-dynamicloader --enable-fontenum --with-zlib --with-expat --with-libpng --with-cocoa --with-macosx-version-min=no --with-opengl --without-libjpeg --without-libtiff --without-regex
make -j10
cd ../../
autoreconf -ivf
autoupdate
./configure --with-wxdir="$PWD/vendor/wxWidgets" --with-boost-libdir="/opt/homebrew/opt/boost/lib"
Edit libaegisub/common/charset.cpp
Change #include <uchardet/uchardet.h>
to #include <uchardet.h>
make
make osx-bundle
cd Aegisub.app/Contents/MacOS/
ln -s libicudata.69.1.dylib libicudata.69.dylib
ln -s libbrotlicommon.1.0.9.dylib libbrotlicommon.1.dylib
ln -s libicuuc.69.1.dylib libicuuc.69.dylib
cp /opt/homebrew/opt/boost/lib/libboost_system-mt.dylib libboost_system-mt.dylib
cd ../../../
codesign --force --deep --sign - Aegisub.app
This mostly worked for me, thanks. A few notes:
-I/opt/homebrew/opt/portaudio/include
to CPPFLAGS otherwise it fails during the Aegisub build--with-boost-libdir="/opt/homebrew/opt/boost/lib"
to--with-boost="/opt/homebrew/opt/boost"
or it wouldn't work, it seems this has also been changed in the readme in rcombs' fork.I now have a working .app which doesn't depend on my build folder anymore, and probably works on any M1 machine, at least running Monterey (I think brew libraries are tied to the running OS). I uploaded it here https://transfer.sh/qinOf2/Aegisub.app.7z if anyone needs it