-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into feat/improve-perf
- Loading branch information
Showing
23 changed files
with
441 additions
and
157 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# Dependencies | ||
**/node_modules | ||
.pnp | ||
.pnp.js | ||
|
||
# Local env files | ||
.env | ||
.env.local | ||
.env.development.local | ||
.env.test.local | ||
.env.production.local | ||
|
||
# Testing | ||
coverage | ||
|
||
# Turbo | ||
.turbo | ||
|
||
# Vercel | ||
.vercel | ||
|
||
# Build Outputs | ||
**/.next/ | ||
**/out/ | ||
**/build | ||
**/dist | ||
**/target | ||
|
||
|
||
# Debug | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# Misc | ||
.DS_Store | ||
*.pem | ||
|
||
# Unnecessary files | ||
**/.git/ | ||
.github/ | ||
flatpak/*.xml | ||
flatpak/*.desktop | ||
flatpak/*.yml |
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 |
---|---|---|
@@ -0,0 +1,77 @@ | ||
on: | ||
push: | ||
# NOTE: Proposal to make this action available only for tags | ||
#tags: | ||
#- 'v*.*.*' | ||
|
||
name: flatpak build | ||
jobs: | ||
prepare-repo: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: 'recursive' | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
- name: cache of container | ||
id: cache-container | ||
uses: actions/cache@v3 | ||
with: | ||
path: prepare-dist | ||
key: ${{ runner.os }}-container-${{ hashFiles('prepare-dist') }} | ||
- name: Run latest-tag | ||
id: latest-tag | ||
uses: oprypin/find-latest-tag@v1 | ||
with: | ||
repository: | ||
luminous-devs/lume | ||
#FIXME: luminous-devs after merged fix, now it just won't find tags | ||
# repository: ${{ github.repository }} | ||
|
||
- name: Build container | ||
# if: steps.cache-container.outputs.cache-hit != 'true' | ||
run: | | ||
docker buildx build -t flatpak-prepare-lume --build-arg=${{steps.latest-tag.outputs.tag}} --rm --output=. --target=final -f flatpak/Containerfile . | ||
- name: Copy flatpak files content | ||
run: | | ||
cp -r flatpak/*.xml flatpak/*.desktop flatpak/*.yml prepare-dist | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: repo-dist | ||
path: prepare-dist | ||
|
||
flatpak: | ||
name: flatpak-bundle | ||
needs: prepare-repo | ||
runs-on: ubuntu-latest | ||
container: | ||
image: bilelmoussaoui/flatpak-github-actions:gnome-45 | ||
options: --privileged | ||
steps: | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
name: repo-dist | ||
- uses: actions/checkout@v4 | ||
with: | ||
repository: flathub/shared-modules | ||
path: shared-modules | ||
- uses: flatpak/flatpak-github-actions/flatpak-builder@v6 | ||
with: | ||
bundle: lume.flatpak | ||
manifest-path: nu.lume.Lume.yml | ||
restore-cache: false | ||
# cache-key: flatpak-builder-${{ github.sha }} | ||
- name: Release | ||
uses: softprops/action-gh-release@v1 | ||
if: startsWith(github.ref, 'refs/tags/') | ||
with: | ||
append_body: true | ||
files: lume.flatpak | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- uses: geekyeggo/delete-artifact@v4 | ||
with: | ||
name: repo-dist | ||
token: ${{ secrets.GITHUB_TOKEN }} |
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
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json | ||
index 21f5d9a5..9a46f36d 100644 | ||
--- a/src-tauri/tauri.conf.json | ||
+++ b/src-tauri/tauri.conf.json | ||
@@ -64,7 +64,7 @@ | ||
"shortDescription": "", | ||
"targets": "all", | ||
"updater": { | ||
- "active": true, | ||
+ "active": false, | ||
"pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IEU3OTdCMkM3RjU5QzE2NzkKUldSNUZwejF4N0tYNTVHYjMrU0JkL090SlEyNUVLYU5TM2hTU3RXSWtEWngrZWJ4a0pydUhXZHEK", | ||
"windows": { | ||
"installMode": "quiet" |
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 |
---|---|---|
@@ -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", |
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 |
---|---|---|
@@ -0,0 +1,61 @@ | ||
FROM node:20-slim as prepare | ||
|
||
RUN apt update && apt install -y git | ||
|
||
# Taken from tauri docs https://beta.tauri.app/guides/prerequisites/#rust | ||
RUN apt install libwebkit2gtk-4.1-dev -y \ | ||
build-essential \ | ||
curl \ | ||
wget \ | ||
file \ | ||
libssl-dev \ | ||
libayatana-appindicator3-dev \ | ||
protobuf-compiler \ | ||
librsvg2-dev | ||
|
||
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y | ||
|
||
|
||
FROM prepare as build | ||
|
||
ENV PNPM_HOME="/pnpm" | ||
ENV PATH="$PNPM_HOME:$PATH" | ||
ENV PATH="/root/.cargo/bin:${PATH}" | ||
|
||
#RUN corepack prepare pnpm@latest --activate | ||
|
||
RUN corepack enable | ||
|
||
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 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=3.0.0 | ||
ARG ARCH=amd64 | ||
|
||
RUN cp -r ./src-tauri/target/release/bundle/deb/lume_${VERSION}_${ARCH}/data lume-package | ||
|
||
FROM scratch as final | ||
|
||
COPY --from=build lume/lume-package prepare-dist | ||
#ADD flatpak/*.xml flatpak/*.desktop flatpak/*.yml prepare-dist |
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 |
---|---|---|
@@ -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 |
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 |
---|---|---|
@@ -0,0 +1,50 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<component type="desktop-application"> | ||
<id>nu.lume.Lume</id> | ||
<launchable type="desktop-id">nu.lume.Lume.desktop</launchable> | ||
|
||
<name>Lume</name> | ||
<summary>A cross-platform desktop nostr client</summary> | ||
<developer_name>Ren Amamiya</developer_name> | ||
|
||
<metadata_license>CC0-1.0</metadata_license> | ||
<project_license>GPL-3.0-only</project_license> | ||
|
||
<url type="homepage">https://lume.nu</url> | ||
<url type="bugtracker">https://github.com/luminous-devs/lume/issues</url> | ||
<url type="donation">https://nostree.me/npub1zfss807aer0j26mwp2la0ume0jqde3823rmu97ra6sgyyg956e0s6xw445</url> | ||
|
||
<supports> | ||
<control>pointing</control> | ||
<control>keyboard</control> | ||
<control>touch</control> | ||
</supports> | ||
|
||
<description> | ||
<p> | ||
Lume a cross-platform nostr client, supported nsbunker, chats and notifications | ||
</p> | ||
</description> | ||
|
||
<custom> | ||
<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"/> | ||
</releases> | ||
<content_rating type="oars-1.1"/> | ||
</component> |
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
[Desktop Entry] | ||
Version=1.0 | ||
Type=Application | ||
|
||
Name=Lume | ||
Comment=A cross-platform desktop nostr client | ||
Icon=lume | ||
Exec=lume | ||
Terminal=false | ||
Categories=Network;InstantMessaging; | ||
Keywords=nostr;client;chat; | ||
X-Purism-FormFactor=Workstation; |
Oops, something went wrong.