Add packaging instructions to build instructions

Signed-off-by: Avery King <gperson@disroot.org>
This commit is contained in:
Avery King
2025-03-23 23:06:51 -07:00
parent a6bc506da5
commit b9bfdcbfb4

View File

@@ -377,25 +377,6 @@ Optionally, install Tenacity:
cmake --install build
```
### Linux: Building an AppImage
**NOTE**: This is only supported on 64-bit x86. ARM and other architectures are
currently unsupported.
You can build an AppImage yourself. This requires that you have previously
built Tenacity. There is no need to install Tenacity first.
If you've used vcpkg in your build, you must set `VCPKG_LIB_PATH` to the
directory vcpkg copied libraries too. Otherwise, there is no need to set it at
all.
**NOTE**: Ensure that you are correctly setting `VCPKG_LIB_PATH` by ensuring
the directory exists and there are libraries in that folder. If the directory
doesn't exist, required libraries won't get packaged.
To build an AppImage, simply run `cpack` from the root of your build directory.
The AppImage will be in the `package/` directory of the build folder.
## Build options
* **VCPKG** (ON|OFF): whether to use dependencies from vcpkg. ON by default
@@ -469,3 +450,51 @@ export TENACITY_TRIPLET_OVERRIDE=x64-linux-dynamic
Overriding triplets might be required in some cases. For example, using static
builds of wxWidgets on Linux is not supported, but vcpkg builds static
libraries by default. The `x64-linux-dynamic` triplet must be used instead.
## Building Packages
Building a package is extremely simple. Before starting, you must ensure all of
Tenacity has been built and is up to date (i.e., nothing needs a recompile).
Then, all you need to do is run the following command:
```bash
$ cpack /path/to/build/folder
```
All outputs are in the `package/` directory in your build folder. They will be
one of the following:
- An (Inno Setup) installer for Windows
- A DMG for macOS, or
- An AppImage for Linux
Along with your package comes a JSON file and various `.sha256` files. The JSON
files are simply unused artificats of the packaging process, while the
`.sha256` files contain the SHA256 hashes of the packaging artifacts. They are
automatically generated by CPack to save us a step when we build nightly and
official release binaries. You can simply delete both of those files if you
plan on only using these packages for yourself.
While the packaging process is very simple, there are some advisories, which
are listed below. It is _highly_ recommend that you read them so you are aware
of potential issues you may encounter.
### Inno Setup Installer Notes
In previous versions of Tenacity, the installer was _not_ built by CPack and
instead by its own target `innosetup`. This requires that you have previously
built Tenacity. To build the installer, you must build that target.
### AppImage Notes (Linux)
Unfortunately, the AppImage is a bit finicky right now; it might not run on all
distros, and some distros (notably Arch at the moment) may fail to build the
AppImage successfully. At this time of writing, Rocky Linux 9 (or, presumably,
any similar distro) can successfully build the AppImage.
Only x86_64 is supported at the moment. We do not plan to support x86 but are
interested in supporting aarch64. You are welcome to open a pull request to
make this happen.
If you are using vcpkg, you must set `VCPKG_LIB_PATH` to the directory in your
build folder where vcpkg copied its libraries older. For example, this could be
`/path/to/build/folder/vcpkg_installed/x64-linux-dynamic/lib`. Leaving this
variable unset will cause the script to leave out vcpkg's libraries, which can
cause issues.