Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update documentation #1700

Merged
merged 3 commits into from
Jul 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 17 additions & 6 deletions docs/developers/Contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,24 @@ Translations are currently handled via the IDE. See [this issue](https://github.

## For Package Maintainers

If you want to create a package for your distribution, here are some helpful tips to get started:
If you want to create a package for your distribution, here are some helpful tips to get started. If you have questions or want to let us know about your new package, consider joining our [Discord](https://discord.gg/ReWTxb93jS).

- If possible, use `nexusmods-app` for the package name.
- We ship a build of `7zz` and use that executable unless you set `NEXUSMODS_APP_USE_SYSTEM_EXTRACTOR=1` when publishing. See [this issue](https://github.com/Nexus-Mods/NexusMods.App/issues/1306#issuecomment-2095755699) for details.
- Set `INSTALLATION_METHOD_PACKAGE_MANAGER` when publishing. We have an integrated updater that will notify users about new versions. If you set this flag, we'll tell the user to update the App with their package manager.
- Let us know if you have questions or if you published a new package by joining our [Discord](https://discord.gg/ReWTxb93jS).
If possible, use `nexusmods-app` for the package name and `com.nexusmods.app` as the rDNS ID for Flatpaks and similar. See [Linux Dependencies](../users/SystemRequirements.md#linux-dependencies) for a list of dependencies.

There are various build variables you should consider using. You can set compile constants using `-p:DefineConstants="NAME"` with `dotnet build` or `dotnet publish`. For a full list of available application-specific compile constants, see [`Directory.Build.props`](../../Directory.Build.props):

- `NEXUSMODS_APP_USE_SYSTEM_EXTRACTOR`: We ship a build of `7zz` that you can disable. Setting this constant will force the code to use `7zz` available in `PATH`. See [#1306](https://github.com/Nexus-Mods/NexusMods.App/issues/1306#issuecomment-2095755699) for details. Do note that some versions of `7zz` don't support RAR files, due to licensing issues. The build that the App ships with supports RAR files. Many mods still come in RAR archives, for a better user experience, we expect `7zz` to support RAR files. We won't accept issues around extraction failures for builds that don't support RAR archives.
- `INSTALLATION_METHOD_PACKAGE_MANAGER`: This constant will prevent the App from generating a `.desktop` file at runtime, and will change the update notification that notifies the user about new versions. If this constant is set, the App will tell the user to update using their package manager.

We publish the App using [PupNet](https://github.com/kuiperzone/PupNet-Deploy). Releases are built using GitHub Actions, see [`build-linux-pupnet.yaml`](https://github.com/Nexus-Mods/NexusMods.App/blob/main/.github/workflows/build-linux-pupnet.yaml) for details. PupNet will use `dotnet publish` before packaging the result in some specialized format.

If you don't wish to use PupNet, you should still use `dotnet publish` over `dotnet build`. The arguments we use with `dotnet publish` can be found in [`app.pupnet.conf`](https://github.com/Nexus-Mods/NexusMods.App/blob/main/src/NexusMods.App/app.pupnet.conf). Also see the [`dotnet publish` documentation](https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-publish#options) for a list of options.
If you don't wish to use PupNet, you should still prefer `dotnet publish` over `dotnet build`. The arguments we use with `dotnet publish` can be found in [`app.pupnet.conf`](https://github.com/Nexus-Mods/NexusMods.App/blob/main/src/NexusMods.App/app.pupnet.conf). Also see the [`dotnet publish` documentation](https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-publish#options) for a list of options.

We provide a [Desktop Entry](https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html) file called [`com.nexusmods.app.desktop`](../../src/NexusMods.App/com.nexusmods.app.desktop). When building the package, you should use this file and replace `${INSTALL_EXEC}` with an absolute path to the `NexusMods.App` binary.

The App will [generate](../../src/NexusMods.CrossPlatform/ProtocolRegistration/ProtocolRegistrationLinux.cs) this `.desktop` file and replace the placeholder with the absolute path to the executable if `INSTALLATION_METHOD_PACKAGE_MANAGER` is not set.

Besides the Desktop Entry file, we also provide the following files that you should make use of, if possible:

- [AppStream](https://www.freedesktop.org/software/appstream/docs/) [`com.nexusmods.app.metainfo.xml`](../../src/NexusMods.App/com.nexusmods.app.metainfo.xml)
- [`icon.svg`](../../src/NexusMods.App/icon.svg) and [`icon.ico`](../../src/NexusMods.App/icon.ico)
8 changes: 5 additions & 3 deletions docs/users/SystemRequirements.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,12 @@ This page lists the recommended system requirements to install and run the app o
<sub>\* Storage space required does not factor in the number of games managed, the size of the managed games and the mods installed.</sub> -->

### Linux Dependencies
The App requires the following programs to be available at runtime:

- `xdg-open` to open URLs in your browser.
- `update-desktop-database` to update the MIME cache after creating a desktop entry file for the NXM link handler.
The App requires the following programs to be available on the system `PATH` at runtime:

- `xdg-open` (part of [xdg-utils](https://www.freedesktop.org/wiki/Software/xdg-utils/))
- `xdg-settings` (part of [xdg-utils](https://www.freedesktop.org/wiki/Software/xdg-utils/))
- `update-desktop-database` (part of [desktop-file-utils](https://www.freedesktop.org/wiki/Software/desktop-file-utils/))

In addition, the following libraries are required:

Expand Down
Loading