From 32c2f24a2a9931661054135e11cc517ed795f7e6 Mon Sep 17 00:00:00 2001 From: 0-don <70039285+0-don@users.noreply.github.com> Date: Tue, 24 Dec 2024 00:12:23 +0100 Subject: [PATCH] fix installation binaries --- .github/workflows/release.yml | 81 +++++-------------- README.md | 21 +++-- package.json | 1 + src-tauri/Cargo.toml | 10 +-- .../pages/app/clipboard/text-clipboard.tsx | 4 + 5 files changed, 44 insertions(+), 73 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0c4fe359..113557b4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -9,11 +9,10 @@ concurrency: cancel-in-progress: true env: ARCH: x86_64 - DEPENDENCIES_ARCH: "'libappindicator-gtk3' 'webkit2gtk' 'gtk3' 'xdotool'" - DEPENDENCIES_RPM: "javascriptcoregtk4.1, webkit2gtk4.1, libxdo, libappindicator-gtk3, xdotool" + DEPENDENCIES_ARCH: "'libappindicator-gtk3' 'webkit2gtk-4.1' 'gtk3' 'xdotool'" jobs: setup: - runs-on: ubuntu-24.04 + runs-on: ubuntu-22.04 outputs: name: ${{ steps.get-package.outputs.name }} name_bin: ${{ steps.get-package.outputs.name }}-bin @@ -24,7 +23,6 @@ jobs: deb_pkg_path: ./src-tauri/target/release/bundle/deb/ deb_pkg_renamed: ${{ steps.get-package.outputs.name }}-${{ steps.get-package.outputs.version }}-${{ env.ARCH }}.deb arch_pkg_name: ${{ steps.get-package.outputs.name }}-bin-${{ steps.get-package.outputs.version }}-1-${{ env.ARCH }}.pkg.tar.zst - rpm_pkg_name: RPMS/${{ steps.get-package.outputs.name }}-${{ steps.get-package.outputs.version }}-1.${{ env.ARCH }}.rpm tag_name: v${{ steps.get-package.outputs.version }} steps: - uses: actions/checkout@v4 @@ -39,7 +37,6 @@ jobs: echo "version=$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT echo "description=$(node -p "require('./package.json').description")" >> $GITHUB_OUTPUT echo "license=$(node -p "require('./package.json').license")" >> $GITHUB_OUTPUT - build-tauri: needs: [setup] @@ -49,17 +46,16 @@ jobs: fail-fast: false matrix: include: - - platform: "macos-latest" # for Arm based macs (M1 and above). + - platform: "macos-latest" args: "--target aarch64-apple-darwin" - - platform: "macos-latest" # for Intel based macs. + - platform: "macos-latest" args: "--target x86_64-apple-darwin" - - platform: "ubuntu-24.04" # for Tauri v1 you could replace this with ubuntu-20.04. + - platform: "ubuntu-22.04" args: "" - platform: "windows-latest" args: "" runs-on: ${{ matrix.platform }} steps: - - uses: actions/checkout@v4 - name: setup node @@ -70,23 +66,31 @@ jobs: - name: install rust stable uses: dtolnay/rust-toolchain@stable with: - # Those targets are only used on macos runners so it's in an `if` to slightly speed up windows and linux builds. targets: ${{ matrix.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }} - name: install dependencies (ubuntu only) - if: matrix.platform == 'ubuntu-24.04' # This must match the platform value defined above. + if: matrix.platform == 'ubuntu-22.04' run: | sudo apt-get update - sudo apt-get install -y libgtk-3-dev libappindicator3-dev librsvg2-dev libxcb-shape0-dev libxcb-xfixes0-dev patchelf libxdo-dev libjavascriptcoregtk-4.1-dev libwebkit2gtk-4.1-dev + sudo apt-get install -y \ + libglib2.0-dev \ + libgtk-3-dev \ + libayatana-appindicator3-dev \ + librsvg2-dev \ + libxcb-shape0-dev \ + libxcb-xfixes0-dev \ + libxdo3 \ + libxdo-dev \ + libjavascriptcoregtk-4.1-dev \ + libwebkit2gtk-4.1-dev - name: install frontend dependencies run: yarn install - name: Set NO_STRIP environment variable - if: matrix.platform == 'ubuntu-24.04' || matrix.platform == 'macos-latest' + if: matrix.platform == 'ubuntu-22.04' || matrix.platform == 'macos-latest' run: echo "NO_STRIP=true" >> $GITHUB_ENV - - uses: tauri-apps/tauri-action@v0 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -97,9 +101,8 @@ jobs: releaseDraft: false prerelease: false - - name: copy deb package && create PKGBUILD file (ubuntu only) - if: matrix.platform == 'ubuntu-24.04' + if: matrix.platform == 'ubuntu-22.04' run: | mkdir -p ${{ needs.setup.outputs.name_bin }} cp -fr ${{ needs.setup.outputs.deb_pkg_path }}${{ needs.setup.outputs.deb_pkg_name }} ${{ needs.setup.outputs.name_bin }}/${{ needs.setup.outputs.deb_pkg_renamed }} @@ -127,57 +130,15 @@ jobs: cat ${{ needs.setup.outputs.name_bin }}/PKGBUILD - name: create arch package (ubuntu only) - if: matrix.platform == 'ubuntu-24.04' + if: matrix.platform == 'ubuntu-22.04' uses: 2m/arch-pkgbuild-builder@v1.17 with: debug: true target: pkgbuild pkgname: ${{ needs.setup.outputs.name_bin }}/ - # - name: copy deb package && create rpm.spec file (ubuntu only) - # if: matrix.platform == 'ubuntu-24.04' - # run: | - # mkdir -p ${{ needs.setup.outputs.name_bin }} - # cp -fr ${{ needs.setup.outputs.deb_pkg_path }}/${{ needs.setup.outputs.deb_pkg_name }} ${{ needs.setup.outputs.name_bin }}/${{ needs.setup.outputs.deb_pkg_renamed }} - # cat < ./${{ needs.setup.outputs.name_bin }}/rpm.spec - # Name: ${{ needs.setup.outputs.name }} - # Version: ${{ needs.setup.outputs.version }} - # BuildArch: ${{ env.ARCH }} - # Release: 1 - # Summary: ${{ needs.setup.outputs.description }} - # Requires: ${{ env.DEPENDENCIES_RPM }} - # License: ${{ needs.setup.outputs.license }} - # Source0: ${{ needs.setup.outputs.deb_pkg_renamed }} - - # %description - # ${{ needs.setup.outputs.description }} - - # %prep - # ar x %{SOURCE0} - - # %build - # rm -rf control.tar.gz - # tar xvf data.tar.gz - - # %install - # cp -fr usr/ %{buildroot} - - # %files - # %{_bindir}/${{ needs.setup.outputs.name }} - # /usr/share/applications/${{ needs.setup.outputs.name }}.desktop - # /usr/share/icons/hicolor/**/* - # EOF - # cat ${{ needs.setup.outputs.name_bin }}/rpm.spec - - # - name: createa rpm package (ubuntu only) - # if: matrix.platform == 'ubuntu-24.04' - # uses: Antikythera/build-rpm@latest - # with: - # spec_file: ${{ needs.setup.outputs.name_bin }}/rpm.spec - # sources: ${{ needs.setup.outputs.name_bin }}/${{ needs.setup.outputs.deb_pkg_renamed }} - - name: upload arch && rpm release (ubuntu only) - if: matrix.platform == 'ubuntu-24.04' + if: matrix.platform == 'ubuntu-22.04' uses: softprops/action-gh-release@v1 with: token: ${{ secrets.GITHUB_TOKEN }} diff --git a/README.md b/README.md index b070ac2b..db67f2d1 100644 --- a/README.md +++ b/README.md @@ -17,8 +17,6 @@ Logo

- - successor of [the electron clippy](https://github.com/0-don/clippy-ts) @@ -26,14 +24,14 @@ successor of [the electron clippy](https://github.com/0-don/clippy-ts) - display/hide **ctrl+y** or **ctrl+d** (change in settings) - type out clipboard **ctrl+b** (where pasting isn't allowed) -- images & text support -- keybinds for everything +- text, html, rtf, image, file support +- keybinds for everything & custom keybinds - add favorite clipboards -- smart search for links, colors, images, hex -- instant search -- change database location -- change keyboard bindings +- smart search, for links, colors, images, hex, etc. +- change/sync database location - dark mode / white mode +- multilanguage support +- display scale ### Prerequisites Development @@ -63,3 +61,10 @@ Before you begin, ensure you have met the following requirements: - Linux(x11) KDE Plasma (Disable Focus Stealing Prevention) - Windows - Mac (hotkeys needs to be changed in settings) + + + + + + + diff --git a/package.json b/package.json index 2168023e..053638cd 100644 --- a/package.json +++ b/package.json @@ -10,6 +10,7 @@ "dev": "vite", "build": "vite build", "tauri": "cross-env NO_STRIP=true tauri", + "tauri:build": "cross-env NO_STRIP=true tauri build --verbose", "d": "cross-env COLORBT_SHOW_HIDDEN=1 tauri dev", "gen": "sea-orm-cli migrate refresh -v -d src-tauri/migration && sea-orm-cli generate entity -l -o src-tauri/entity/src --expanded-format --with-serde both", "icon": "tauri icon" diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index 7eb4730e..60216432 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -66,8 +66,8 @@ color-backtrace = "0" # strip = true [package.metadata.generate-rpm.requires] -"webkit2gtk-4.1" = "*" -"libappindicator-gtk3" = "*" -"xdotool" = "*" -"gtk3" = "*" -"libxdo" = "*" +# "webkit2gtk-4.1" = "*" +# "libappindicator-gtk3" = "*" +# "xdotool" = "*" +# "gtk3" = "*" +# "libxdo" = "*" diff --git a/src/components/pages/app/clipboard/text-clipboard.tsx b/src/components/pages/app/clipboard/text-clipboard.tsx index add15101..7bf4fe5c 100644 --- a/src/components/pages/app/clipboard/text-clipboard.tsx +++ b/src/components/pages/app/clipboard/text-clipboard.tsx @@ -21,6 +21,10 @@ export const TextClipboard: Component = (props) => { let data = props.data.text?.data; let textType = props.data.text?.type as ClipboardTextType; + if (props.data.text?.data && props.data.html?.data) { + type = ClipboardType.Html; + data = props.data.text?.data; + } if (!props.data.text?.data && props.data.html?.data) { type = ClipboardType.Html; data = props.data.html.data;