Trilium-appx - Package Trilium as an MSIX/Appx
The goal of this repo is to provide a easy way of installing Trilium using a .msix.
This allows for trilium to be installed in a protected location (ie. out of my view), and for it to appear and be managed as any other program in the Settings.
PRs warmly welcomed.
- Download the latest package available in the release page.
- Install App installer from the Microsoft Store
- Right-click on the downloaded .msix -> Properties -> Digital Signatures -> Select the first entry -> Details -> Show certificate -> Install a certificate -> Current Machine -> Select the following store: Trusted People.
- This only needs to be done once per year (on the next update after the certificate validity will have expired)
- This is needed for the App installer to install the application, as otherwise it will refuse as the application is untrusted.
- Open the .msix using App installer.
- App Installer
makeappx.exe
andsigntool.exe
- Assumed by the scripts in this repo to be at
C:\Program Files (x86)\Windows Kits\10\App Certification Kit\
. - Part of the Windows SDK, available here
- The downloaded file is big, but unfortunately AFAIK those two tools aren't available in a standalone form. However you can deselect everything except the App Certification Kit during the Windows SDK install itself.
- Assumed by the scripts in this repo to be at
This require a bit of setup on the first installation (and every year after that by default).
- Generate a self-signed certificate using
Setup.ps1
.- You'll probably like editing the script so that the generated certificate matches your name, but nothing bad will happen either way.
- Open the generated .pfx using the explorer, then install the certificate to the CurrentMachine/TrustedPeople store.
- This is needed for the App installer to install the application, as otherwise it will refuse as the application is untrusted.
- Run the
SignPackage.ps1
script and enter the certificate's password.- I personally like to store the .pfx as well as the certificate's password in KeepassXC.
Once the .msix is signed and provided that the certificate is trusted, you can simply right-click it to open the App installer.
Please note that this method register directly the AppxManifest.xml file (NOT the .msix).
The main effect is that trilium is installed inside of the build-dir, instead of being copied to a protected location like regular UWP (.appx or .msix). For this reason, deleting the build-dir breaks your trilium installation.
However, your data is still stored in %appdata%/trilium-data
(as with any "normal" trilium install).
- (If upgrading): Close all running instances of trilium.
- Run
Register.ps1
- Edit the Version attribute in
build-dir/AppxManifest.xml
to match the latest release version (not pre-release) of Trilium. - Run
Build.ps1
. This will:- Download the latest release of Trilium from github
- Automatically bump the manifest version
- Generate the package
- Attempt to sign it