feat: supported flatpak version v3
This commit is contained in:
13
flatpak/0002-depot-remove.patch
Normal file
13
flatpak/0002-depot-remove.patch
Normal file
@@ -0,0 +1,13 @@
|
||||
diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json
|
||||
index 87c23e40..bb84872e 100644
|
||||
--- a/src-tauri/tauri.conf.json
|
||||
+++ b/src-tauri/tauri.conf.json
|
||||
@@ -50,8 +50,6 @@
|
||||
"deb": {
|
||||
"depends": []
|
||||
},
|
||||
- "externalBin": ["bin/depot"],
|
||||
- "resources": ["resources/*"],
|
||||
"icon": [
|
||||
"icons/32x32.png",
|
||||
"icons/128x128.png",
|
||||
@@ -10,6 +10,7 @@ RUN apt install libwebkit2gtk-4.1-dev -y \
|
||||
file \
|
||||
libssl-dev \
|
||||
libayatana-appindicator3-dev \
|
||||
protobuf-compiler \
|
||||
librsvg2-dev
|
||||
|
||||
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
|
||||
@@ -25,41 +26,31 @@ ENV PATH="/root/.cargo/bin:${PATH}"
|
||||
|
||||
RUN corepack enable
|
||||
|
||||
ADD src /lume/src
|
||||
ADD public /lume/public
|
||||
|
||||
ADD index.html \
|
||||
package.json \
|
||||
postcss.config.js \
|
||||
tailwind.config.js \
|
||||
vite.config.ts \
|
||||
pnpm-lock.yaml \
|
||||
tsconfig.json \
|
||||
/lume
|
||||
|
||||
ADD src-tauri/icons /lume/src-tauri/icons
|
||||
ADD src-tauri/migrations /lume/src-tauri/migrations
|
||||
ADD src-tauri/src /lume/src-tauri/src
|
||||
|
||||
ADD src-tauri/build.rs \
|
||||
src-tauri/Cargo.lock \
|
||||
src-tauri/Cargo.toml \
|
||||
src-tauri/tauri.conf.json \
|
||||
src-tauri/tauri.linux.conf.json \
|
||||
/lume/src-tauri
|
||||
ADD . /lume/.
|
||||
|
||||
WORKDIR /lume
|
||||
|
||||
RUN pnpm install --frozen-lockfile
|
||||
|
||||
# Path for disable updater
|
||||
ADD flatpak/0001-disable-tauri-updater.patch .
|
||||
RUN patch -p1 -t -i 0001-disable-tauri-updater.patch
|
||||
#ADD flatpak/0001-disable-tauri-updater.patch .
|
||||
#RUN patch -p1 -t -i flatpak/0001-disable-tauri-updater.patch
|
||||
ADD flatpak/0002-depot-remove.patch .
|
||||
RUN patch -p1 -t -i 0002-depot-remove.patch
|
||||
|
||||
# compile depot
|
||||
|
||||
#ADD flatpak/build-depot.sh build-depot.sh
|
||||
#RUN mv flatpak/build-depot.sh build-depot.sh
|
||||
#RUN sh build-depot.sh
|
||||
#RUN pnpm run build:depot
|
||||
|
||||
#ENV VITE_FLATPAK_RESOURCE="/app/lib/lume/resources/config.toml"
|
||||
|
||||
# debian build
|
||||
RUN pnpm tauri build -b deb
|
||||
|
||||
ARG VERSION=2.2.3
|
||||
ARG VERSION=3.0.0
|
||||
ARG ARCH=amd64
|
||||
|
||||
RUN cp -r ./src-tauri/target/release/bundle/deb/lume_${VERSION}_${ARCH}/data lume-package
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
# Lume nostr desktop client
|
||||
[GitHub - luminous-devs/lume: A cross-platform desktop nostr client](https://github.com/luminous-devs/lume) is made with Tauri and built using [pnpm](https://pnpm.io) and [cargo](https://doc.rust-lang.org/cargo/) packages.
|
||||
Lume itself has node dependencies managed with pnpm as well.
|
||||
|
||||
## Source generation
|
||||
To transform their package locks into flatpak sources, [flatpak-builder-tools](https://github.com/flatpak/flatpak-builder-tools) is used.
|
||||
|
||||
```sh
|
||||
# Generate cinny-desktop sources for use with cargo
|
||||
<path-to flatpak-builder-tools>/cargo/flatpak-cargo-generator.py -o cargo-sources.json <path-to cinny-desktop>/src-tauri/Cargo.lock
|
||||
|
||||
# Generate cinny and cinny-desktop sources for use with npm
|
||||
flatpak-node-generator --no-requests-cache -r -o node-sources.json npm <path-to cinny-desktop>/package-lock.json
|
||||
```
|
||||
15
flatpak/build-depot.sh
Normal file
15
flatpak/build-depot.sh
Normal file
@@ -0,0 +1,15 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
directory_bin="/lume/src-tauri/bin"
|
||||
target="x86_64-unknown-linux-gnu"
|
||||
|
||||
cd modules/depot
|
||||
|
||||
check_directory_keep=$(ls $directory_bin | grep -vE '.keep$' | wc -l)
|
||||
|
||||
echo $(ls $directory_bin | grep -vE '.keep$')
|
||||
|
||||
if [ $check_directory_keep -eq 0 ]; then
|
||||
cargo build --release
|
||||
mv target/release/depot "$directory_bin/depot-$target"
|
||||
fi
|
||||
@@ -30,7 +30,18 @@
|
||||
<value key="Purism::form_factor">workstation</value>
|
||||
<value key="Purism::form_factor">mobile</value>
|
||||
</custom>
|
||||
|
||||
<screenshots>
|
||||
<screenshot type="default">
|
||||
<image> https://raw.githubusercontent.com/kogeletey/lume-nostr/feat/package-flatpak/flatpak/screenshoots/login-screen.png </image>
|
||||
</screenshot>
|
||||
<screenshot>
|
||||
<image>https://raw.githubusercontent.com/kogeletey/lume-nostr/feat/package-flatpak/flatpak/screenshoots/collumns.png</image>
|
||||
</screenshot>
|
||||
<screenshot>
|
||||
<image> https://raw.githubusercontent.com/kogeletey/lume-nostr/feat/package-flatpak/flatpak/screenshoots/home-screen.png </image>
|
||||
</screenshot>
|
||||
</screenshots>
|
||||
|
||||
|
||||
<releases>
|
||||
<release version="2.2.3" date="2023-12-07"/>
|
||||
|
||||
@@ -13,13 +13,14 @@ finish-args:
|
||||
- --share=network
|
||||
#- --filesystem=home
|
||||
#- --filesystem=xdg-download
|
||||
#- --talk-name=org.freedesktop.secrets
|
||||
- --talk-name=org.freedesktop.secrets
|
||||
- --talk-name=org.freedesktop.Notifications
|
||||
- --talk-name=org.kde.StatusNotifierWatcher
|
||||
- --filesystem=xdg-run/keyring
|
||||
- --device=dri
|
||||
|
||||
modules:
|
||||
- shared-modules/libappindicator/libappindicator-gtk3-12.10.json
|
||||
- name: lume
|
||||
sources:
|
||||
- type: dir
|
||||
@@ -31,8 +32,10 @@ modules:
|
||||
buildsystem: simple
|
||||
build-commands:
|
||||
- install -Dm755 bin/lume /app/bin/lume
|
||||
# - install -Dm755 bin/depot /app/bin/depot
|
||||
# - mkdir -p /app/lib/lume/resources
|
||||
# - cp -r lib/lume/resources /app/lib/lume/resources
|
||||
- mkdir -p /app/share/icons/hicolor/
|
||||
- cp -r share/icons/hicolor/ /app/share/icons/
|
||||
- install -Dm644 nu.lume.Lume.appdata.xml /app/share/metainfo/nu.lume.Lume.appdata.xml
|
||||
- install -Dm644 nu.lume.Lume.desktop /app/share/applications/nu.lume.Lume.desktop
|
||||
- ls -lRa /app
|
||||
|
||||
BIN
flatpak/screenshoots/collumns.png
Normal file
BIN
flatpak/screenshoots/collumns.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.2 MiB |
BIN
flatpak/screenshoots/home-screen.png
Normal file
BIN
flatpak/screenshoots/home-screen.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.5 MiB |
BIN
flatpak/screenshoots/login-screen.png
Normal file
BIN
flatpak/screenshoots/login-screen.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 606 KiB |
Reference in New Issue
Block a user