Skip to content

Commit

Permalink
rework README.md
Browse files Browse the repository at this point in the history
Display the logo.

Fix small grammar mistakes such as commas outside quotes.

Replace the links and text near the top with a briefer quick links
section.

The IRC wasn't displayed or linked properly because Markdown doesn't
support non-HTTP links, display the URL instead of trying to link it.

Break lines at 80 columns. You can split lines in Markdown like code.

Replace the deprecated `meson build_static` Meson construct with
`meson setup build_static`. Remove manual Ninja calls, Meson abstracts
it away. Remove unnecessary `meson compile -C build_static` step in the
macOS instructions because the `meson test -C build_static` line after
it will ensure Aegisub is compiled.

Rename "OS X" to "macOS," which is the new name Apple uses for their OS.

Syntax highlight code blocks.

Separate compilation instructions into Prerequisites/Building/Installer
sections and name sections uniquely so they can be linked.

Add Linux intructions.

Sort dependencies alphabetically.

Use release builds in the compilation instructions.
  • Loading branch information
guijan committed Dec 21, 2024
1 parent 9bec715 commit 894bef6
Showing 1 changed file with 115 additions and 52 deletions.
167 changes: 115 additions & 52 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,81 +1,144 @@
# Aegisub

For binaries and general information [see the homepage](http://aegisub.org).

The bug tracker can be found at https://github.com/TypesettingTools/Aegisub/issues.

Support is available on [Discord](https://discord.com/invite/AZaVyPr) or [IRC](irc://irc.rizon.net/aegisub).
# Aegisub - Advanced Subtitle Editor
![logo-large.png](https://aegisub.org/img/logo-large.png)
## Quick Links
[Homepage](https://aegisub.org/)\
[Binaries](https://aegisub.org/downloads/)\
[Bug tracker](https://github.com/TypesettingTools/Aegisub/issues)\
[Discord](https://discord.com/invite/AZaVyPr)\
IRC: irc://irc.rizon.net/aegisub
<!-- Markdown only allows HTTP links, so the IRC isn't clickable. -->

Support is available on Discord or IRC.

## Building Aegisub

### Windows

Prerequisites:

1. Visual Studio (Community edition of any recent version is fine, needs the Windows SDK included)
#### Windows Prerequisites
1. Visual Studio (Community edition of any recent version is fine, needs the
Windows SDK included)
2. Python 3
3. Meson
4. CMake

There are a few optional dependencies that must be installed and on your PATH:

1. msgfmt, to build the translations (installing from https://mlocati.github.io/articles/gettext-iconv-windows.html seems to be the easiest option)
1. msgfmt, to build the translations (installing from
https://mlocati.github.io/articles/gettext-iconv-windows.html seems to be
the easiest option)
2. InnoSetup, to build the regular installer (iscc.exe on your PATH)
3. 7zip, to build the regular installer (7z.exe on your PATH)
4. Moonscript, to build the regular installer (moonc.exe on your PATH)

All other dependencies are either stored in the repository or are included as submodules.

Building:

1. Clone Aegisub's repository: `git clone https://github.com/TypesettingTools/Aegisub.git`
2. From the Visual Studio "x64 Native Tools Command Prompt", generate the build directory: `meson build -Ddefault_library=static` (if building for release, add `--buildtype=release`)
3. Build with `cd build` and `ninja`

You should now have a binary: `aegisub.exe`.

Installer:

You can generate the installer with `ninja win-installer` after a successful build. This assumes a working internet connection and installation of the optional dependencies.

You can generate the portable zip with `ninja win-portable` after a successful build.

### OS X
All other dependencies are either stored in the repository or are included as
submodules.

A vaguely recent version of Xcode and the corresponding command-line tools are required.
#### Building on Windows
Clone Aegisub's repository:
```sh
git clone https://github.com/TypesettingTools/Aegisub
```
From Visual Studio's "x64 Native Tools Command Prompt," build Aegisub:
```sh
meson setup build -Dbuildtype=release -Ddefault_library=static &&
meson compile -C build
```
You should now have a binary at _build/aegisub.exe_.

For personal usage, you can use pip and homebrew to install almost all of Aegisub's dependencies:
#### Windows Installer
You can generate the installer after a successful build:
```sh
meson compile win-installer -C build
```
This assumes a working internet connection and installation of the
optional dependencies.

pip3 install meson # or brew install meson if you installed Python via brew
brew install cmake ninja pkg-config libass boost zlib ffms2 fftw hunspell uchardet
export LDFLAGS="-L/usr/local/opt/icu4c/lib"
export CPPFLAGS="-I/usr/local/opt/icu4c/include"
export PKG_CONFIG_PATH="/usr/local/opt/icu4c/lib/pkgconfig"
And to generate a portable zip after a successful build:
```sh
meson compile win-portable -C build
```

Once the dependencies are installed, build Aegisub with `meson build && meson compile -C build`.
### macOS
#### macOS Prerequisites
A vaguely recent version of Xcode and its command-line tools is required.

For personal usage, you can use homebrew to install almost all of Aegisub's
dependencies:
```sh
brew install boost cmake ffms2 fftw git hunspell libass meson ninja \
pkg-config zlib
export LDFLAGS="-L/usr/local/opt/icu4c/lib" \
CPPFLAGS="-I/usr/local/opt/icu4c/include" \
PKG_CONFIG_PATH="/usr/local/opt/icu4c/lib/pkgconfig"
```

#### Build dmg
You must also be inside a directory with a copy of Aegisub's source code.
The source code can be downloaded with git:
```sh
git clone https://github.com/TypesettingTools/Aegisub/
cd Aegisub
```
#### Building for macOS
From inside the directory containing Aegisub's source tree, compile the
project:
```sh
meson setup build -Dbuildtype=release && meson compile -C build
```

```bash
meson build_static -Ddefault_library=static -Dbuildtype=debugoptimized -Dbuild_osx_bundle=true -Dlocal_boost=true
meson compile -C build_static
#### macOS Installer
Create the macOS .dmg file as follows:
```sh
meson setup build_static -Dbuildtype=release -Ddefault_library=static \
-Dbuild_osx_bundle=true -Dlocal_boost=true
meson test -C build_static --verbose
meson compile osx-bundle -C build_static
meson compile osx-build-dmg -C build_static
```

## Updating Moonscript
### Linux
#### Linux Prerequisites
Install the dependencies:

From within the Moonscript repository, run `bin/moon bin/splat.moon -l moonscript moonscript/ > bin/moonscript.lua`.
Open the newly created `bin/moonscript.lua`, and within it make the following changes:
Alpine Linux edge:
```sh
apk add alpine-sdk alsa-lib-dev boost-dev ffms2-dev fftw-dev fontconfig-dev \
gtest-dev hunspell-dev libass-dev meson uchardet-dev wxwidgets-dev
```
Current stable versions of Alpine Linux don't have ffms2 packaged.

1. Prepend the final line of the file, `package.preload["moonscript"]()`, with a `return`, producing `return package.preload["moonscript"]()`.
2. Within the function at `package.preload['moonscript.base']`, remove references to `moon_loader`, `insert_loader`, and `remove_loader`. This means removing their declarations, definitions, and entries in the returned table.
3. Within the function at `package.preload['moonscript']`, remove the line `_with_0.insert_loader()`.
You must also be inside a directory with a copy of Aegisub's source code.
The source code can be downloaded with git:
```sh
git clone https://github.com/TypesettingTools/Aegisub/
cd Aegisub
```
#### Building on Linux
From inside the directory containing Aegisub's source tree, compile the
project:
```sh
meson setup build -Dbuildtype=release && meson compile -C build
```

The file is now ready for use, to be placed in `automation/include` within the Aegisub repo.
## Updating Moonscript
From within the Moonscript repository:
```sh
bin/moon bin/splat.moon -l moonscript moonscript/ > bin/moonscript.lua
````
Open the newly created `bin/moonscript.lua` in a text editor, and make the
following changes:

1. Prepend the final line of the file, `package.preload["moonscript"]()`, with
a `return`, producing `return package.preload["moonscript"]()`.
2. Within the function at `package.preload['moonscript.base']`, remove
references to `moon_loader`, `insert_loader`, and `remove_loader`. This
means removing their declarations, definitions, and entries in the returned
table.
3. Within the function at `package.preload['moonscript']`, remove the line
`_with_0.insert_loader()`.
The file is now ready for use, to be placed in `automation/include` within the
Aegisub repo.
## License

All files in this repository are licensed under various GPL-compatible BSD-style licenses; see LICENCE and the individual source files for more information.
The official Windows and OS X builds are GPLv2 due to including fftw3.
All files in this repository are licensed under various GPL-compatible
BSD-style licenses; see LICENCE and the individual source files for more
information. The official Windows and OS X builds are GPLv2 due to including
fftw3.

0 comments on commit 894bef6

Please sign in to comment.