diff --git a/.github/workflows/clippy.yml b/.github/workflows/clippy.yml new file mode 100644 index 0000000..0db08a0 --- /dev/null +++ b/.github/workflows/clippy.yml @@ -0,0 +1,23 @@ +on: push +name: Clippy check +jobs: + clippy_check: + runs-on: ubuntu-24.04 + permissions: + checks: write + steps: + - uses: actions/checkout@v1 + - name: install dependencies (ubuntu only) + run: | + sudo apt-get update + sudo apt-get install -y libglib2.0-dev libgtk-3-dev libwebkit2gtk-4.1-dev + + - uses: actions-rs/toolchain@v1 + with: + toolchain: nightly + components: clippy + override: true + - uses: actions-rs/clippy-check@v1 + with: + token: ${{ secrets.GITHUB_TOKEN }} + args: --manifest-path ./src-tauri/Cargo.toml \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5fdbc90..34d41f8 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -22,9 +22,9 @@ jobs: args: '--target aarch64-apple-darwin' - platform: 'macos-latest' # for Intel based macs. 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' # for Tauri v1 you could replace this with ubuntu-20.04. args: '' - - platform: 'ubuntu-24.04-arm' + - platform: 'ubuntu-22.04-arm' args: '--target aarch64-unknown-linux-gnu' - platform: 'windows-latest' args: '' @@ -48,12 +48,42 @@ jobs: targets: ${{ matrix.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }} - name: install dependencies (ubuntu only) - if: matrix.platform == 'ubuntu-22.04' # This must match the platform value defined above. + if: matrix.platform == 'ubuntu-22.04' || matrix.platform == 'ubuntu-22.04-arm' # This must match the platform value defined above. run: | sudo apt-get update - sudo apt-get install -y libwebkit2gtk-4.0-dev libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf libgtk2.0-dev libsoup3.0-dev + sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf xdg-utils # webkitgtk 4.0 is for Tauri v1 - webkitgtk 4.1 is for Tauri v2. - # You can remove the one that doesn't apply to your app to speed up the workflow a bit. + + + - name: Import Apple Developer Certificate + if: matrix.platform == 'macos-latest' + env: + APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }} + APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }} + KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }} + run: | + echo $APPLE_CERTIFICATE | base64 --decode > certificate.p12 + security create-keychain -p "$KEYCHAIN_PASSWORD" build.keychain + security default-keychain -s build.keychain + security unlock-keychain -p "$KEYCHAIN_PASSWORD" build.keychain + security set-keychain-settings -t 3600 -u build.keychain + + curl https://droposs.org/drop.crt --output drop.pem + sudo security authorizationdb write com.apple.trust-settings.user allow + security add-trusted-cert -r trustRoot -k build.keychain -p codeSign -u -1 drop.pem + sudo security authorizationdb remove com.apple.trust-settings.user + + security import certificate.p12 -k build.keychain -P "$APPLE_CERTIFICATE_PASSWORD" -T /usr/bin/codesign + security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k "$KEYCHAIN_PASSWORD" build.keychain + security find-identity -v -p codesigning build.keychain + + - name: Verify Certificate + if: matrix.platform == 'macos-latest' + run: | + CERT_INFO=$(security find-identity -v -p codesigning build.keychain | grep "Drop OSS") + CERT_ID=$(echo "$CERT_INFO" | awk -F'"' '{print $2}') + echo "CERT_ID=$CERT_ID" >> $GITHUB_ENV + echo "Certificate imported. Using identity: $CERT_ID" - name: install frontend dependencies run: yarn install # change this to npm, pnpm or bun depending on which one you use. @@ -61,10 +91,14 @@ jobs: - uses: tauri-apps/tauri-action@v0 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }} + APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }} + APPLE_SIGNING_IDENTITY: ${{ env.CERT_ID }} + NO_STRIP: true with: tagName: v__VERSION__ # the action automatically replaces \_\_VERSION\_\_ with the app version. releaseName: 'Auto-release v__VERSION__' releaseBody: 'See the assets to download this version and install. This release was created automatically.' releaseDraft: false prerelease: true - args: ${{ matrix.args }} + args: ${{ matrix.args }} \ No newline at end of file diff --git a/.gitignore b/.gitignore index 5767a3f..c60be72 100644 --- a/.gitignore +++ b/.gitignore @@ -26,4 +26,7 @@ dist-ssr .output src-tauri/flamegraph.svg -src-tauri/perf* \ No newline at end of file +src-tauri/perf* + +/*.AppImage +/squashfs-root \ No newline at end of file diff --git a/.gitmodules b/.gitmodules index f47083b..df4511d 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,9 +1,6 @@ -[submodule "drop-base"] - path = drop-base - url = https://github.com/drop-oss/drop-base [submodule "src-tauri/tailscale/libtailscale"] path = src-tauri/tailscale/libtailscale url = https://github.com/tailscale/libtailscale.git -[submodule "src-tauri/umu/umu-launcher"] - path = src-tauri/umu/umu-launcher - url = https://github.com/Open-Wine-Components/umu-launcher.git +[submodule "libs/drop-base"] + path = libs/drop-base + url = https://github.com/drop-oss/drop-base.git diff --git a/README.md b/README.md index 903f4ca..f66cea8 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ Drop app is the companion app for [Drop](https://github.com/Drop-OSS/drop). It u ## Running Before setting up the drop app, be sure that you have a server set up. -The instructions for this can be found on the [Drop Wiki](https://wiki.droposs.org/guides/quickstart.html) +The instructions for this can be found on the [Drop Docs](https://docs.droposs.org/docs/guides/quickstart) ## Current features Currently supported are the following features: diff --git a/build.mjs b/build.mjs new file mode 100644 index 0000000..c4846f1 --- /dev/null +++ b/build.mjs @@ -0,0 +1,48 @@ +import fs from "fs"; +import process from "process"; +import childProcess from "child_process"; +import createLogger from "pino"; + +const OUTPUT = "./.output"; +const logger = createLogger({ transport: { target: "pino-pretty" } }); + +async function spawn(exec, opts) { + const output = childProcess.spawn(exec, { ...opts, shell: true }); + output.stdout.on("data", (data) => { + process.stdout.write(data); + }); + output.stderr.on("data", (data) => { + process.stderr.write(data); + }); + + return await new Promise((resolve, reject) => { + output.on("error", (err) => reject(err)); + output.on("exit", () => resolve()); + }); +} + +const views = fs.readdirSync(".").filter((view) => { + const expectedPath = `./${view}/package.json`; + return fs.existsSync(expectedPath); +}); + +fs.mkdirSync(OUTPUT, { recursive: true }); + +for (const view of views) { + const loggerChild = logger.child({}); + process.chdir(`./${view}`); + + loggerChild.info(`Install deps for "${view}"`); + await spawn("yarn"); + + loggerChild.info(`Building "${view}"`); + await spawn("yarn build", { + env: { ...process.env, NUXT_APP_BASE_URL: `/${view}/` }, + }); + + process.chdir(".."); + + fs.cpSync(`./${view}/.output/public`, `${OUTPUT}/${view}`, { + recursive: true, + }); +} \ No newline at end of file diff --git a/components/LibrarySearch.vue b/components/LibrarySearch.vue deleted file mode 100644 index 3ce3538..0000000 --- a/components/LibrarySearch.vue +++ /dev/null @@ -1,177 +0,0 @@ - - - - - diff --git a/composables/app-state.ts b/composables/app-state.ts deleted file mode 100644 index 2781bd2..0000000 --- a/composables/app-state.ts +++ /dev/null @@ -1,3 +0,0 @@ -import type { AppState } from "~/types"; - -export const useAppState = () => useState("state"); \ No newline at end of file diff --git a/drop-base b/drop-base deleted file mode 160000 index 26698e5..0000000 --- a/drop-base +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 26698e5b069d463b9a02a3dd61e4888d28fa9f88 diff --git a/libs/drop-base b/libs/drop-base new file mode 160000 index 0000000..04125e8 --- /dev/null +++ b/libs/drop-base @@ -0,0 +1 @@ +Subproject commit 04125e89bef517411e103cdabcfa64a1bb563423 diff --git a/app.vue b/main/app.vue similarity index 68% rename from app.vue rename to main/app.vue index b9011c6..7d4165f 100644 --- a/app.vue +++ b/main/app.vue @@ -1,4 +1,5 @@