-
-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
061fc72
commit 5d068bb
Showing
13 changed files
with
22,462 additions
and
160 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,69 +7,29 @@ do all need to be fulfilled. | |
|
||
One of these requirements is that of "Stable releases, reproducible builds". | ||
|
||
## Dependencies | ||
|
||
To be published, all dependencies of the application needs to be listed in the Flatpak manifest. | ||
|
||
There is a set of [flatpak builder tools](https://github.com/flatpak/flatpak-builder-tools) provided as to assist with | ||
this dependency listing. | ||
|
||
## axolotl-web | ||
|
||
The big issue is for the `axolotl-web` dependencies. | ||
|
||
Also, for this there is also a tool available, | ||
[flatpak-node-generator](https://github.com/flatpak/flatpak-builder-tools/tree/master/node). | ||
I have however never been able to successfully use it to parse the dependencies, and output it to the required list. | ||
|
||
I suspect this is due to the complexity of the relations between the dependencies in node_modules, as I have waited for | ||
several hours without any noticeable change. | ||
|
||
Either way, to work around this, the dependencies for a specific version are bundled together and put in this repository. | ||
|
||
### Create dependency archive | ||
|
||
First, make sure to pull all the git tags. | ||
|
||
``` | ||
git fetch --all --tags | ||
``` | ||
|
||
Then check out the published tag. In our case, `v1.0.1` | ||
|
||
``` | ||
git checkout tags/v1.0.1 | ||
``` | ||
### axolotl-web | ||
|
||
Change to the axolotl-web directory, and make sure to use the npm version specified in the .nvmrc file. | ||
Generate npm/yarn dependencies via [flatpak-node-generator](https://github.com/flatpak/flatpak-builder-tools/tree/master/node): | ||
|
||
``` | ||
cd axolotl-web/ | ||
nvm use | ||
```sh | ||
git clone [email protected]:flatpak/flatpak-builder-tools.git | ||
cd flatpak-builder-tools/node | ||
pipx install . | ||
flatpak-node-generator npm ../../axolotl-web/package-lock.json -o ../../flatpak/node-sources.json | ||
``` | ||
|
||
Then, from the axolotl-web directory, install all npm dependencies listed in | ||
[package-lock.json](../axolotl-web/package-lock.json). | ||
Note that `python` is required (!) for the node-sass installation to complete. | ||
### axolotl | ||
|
||
``` | ||
npm ci | ||
``` | ||
Generate cargo dependencies via [flatpak-cargo-generator](https://github.com/flatpak/flatpak-builder-tools/tree/master/cargo): | ||
|
||
Lastly, create the archive we want, naming it after the tag we checked out before. | ||
|
||
``` | ||
tar cfvJ ../flatpak/archives/axolotl-web-dependencies-x86_64-v1.0.1.tar.xz node_modules | ||
```sh | ||
sudo apt install python3-aiohttp python3-toml python3-yaml | ||
python3 ./flatpak-cargo-generator.py ../../Cargo.lock -o ../../flatpak/cargo-sources.json | ||
``` | ||
|
||
To verify, the archive can be extracted by using `tar xvJf axolotl-web-dependencies-x86_64-v1.0.1.tar.xz`. | ||
|
||
## Flatpak details | ||
|
||
To enter a shell into a built flatpak, use `make debug-flatpak-web`. | ||
|
||
### Build directories | ||
|
||
* axolotl-electron-bundle: `/run/build/axolotl-electron-bundle` | ||
|
||
### Install directories | ||
|
||
* axolotl-electron-bundle: `/app/bin/axolotl-electron-bundle` |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Oops, something went wrong.