diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 918a2018f7..438169f72d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -128,9 +128,9 @@ jobs: runs-on: ${{ matrix.job.os }} needs: create-release env: - MACOS_APP_RELEASE_PATH: frontend/appflowy_flutter/product/${{ github.ref_name }}/macos/Release + MACOS_APP_RELEASE_PATH: frontend/appflowy_flutter/build/${{ github.ref_name }} MACOS_X86_ZIP_NAME: AppFlowy-${{ github.ref_name }}-macos-x86_64.zip - MACOS_DMG_NAME: AppFlowy-${{ github.ref_name }}-macos-x86_64 + MACOS_DMG_NAME: AppFlowy-${{ github.ref_name }}-macos-x86_64.dmg strategy: fail-fast: false matrix: @@ -158,46 +158,22 @@ jobs: - name: Install prerequisites working-directory: frontend run: | + brew install p7zip cargo install --force --locked cargo-make cargo install --force --locked duckscript_cli + - name: Import codesign certificate + uses: apple-actions/import-codesign-certs@v3 + with: + p12-file-base64: ${{ secrets.MACOS_CERTIFICATE }} + p12-password: ${{ secrets.MACOS_CERTIFICATE_PWD }} + - name: Build AppFlowy working-directory: frontend run: | flutter config --enable-macos-desktop - dart ./scripts/flutter_release_build/build_flowy.dart run . ${{ github.ref_name }} - - - name: Codesign AppFlowy - run: | - echo ${{ secrets.MACOS_CERTIFICATE }} | base64 --decode > certificate.p12 - security create-keychain -p action build.keychain - security default-keychain -s build.keychain - security unlock-keychain -p action build.keychain - security import certificate.p12 -k build.keychain -P ${{ secrets.MACOS_CERTIFICATE_PWD }} -T /usr/bin/codesign - security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k action build.keychain - /usr/bin/codesign --force --options runtime --deep --sign "${{ secrets.MACOS_CODESIGN_ID }}" "${{ env.MACOS_APP_RELEASE_PATH }}/AppFlowy.app" -v - - - name: Create macOS dmg - run: | - brew install create-dmg - create-dmg \ - --volname ${{ env.MACOS_DMG_NAME }} \ - --hide-extension "AppFlowy.app" \ - --background frontend/scripts/dmg_assets/AppFlowyInstallerBackground.jpg \ - --window-size 600 450 \ - --icon-size 94 \ - --icon "AppFlowy.app" 141 249 \ - --app-drop-link 458 249 \ - "${{ env.MACOS_APP_RELEASE_PATH }}/${{ env.MACOS_DMG_NAME }}.dmg" \ - "${{ env.MACOS_APP_RELEASE_PATH }}/AppFlowy.app" - - - name: Notarize AppFlowy - run: | - xcrun notarytool submit ${{ env.MACOS_APP_RELEASE_PATH }}/${{ env.MACOS_DMG_NAME }}.dmg --apple-id ${{ secrets.MACOS_NOTARY_USER }} --team-id ${{ secrets.MACOS_TEAM_ID }} --password ${{ secrets.MACOS_NOTARY_PWD }} -v -f "json" --wait - - - name: Archive Asset - working-directory: ${{ env.MACOS_APP_RELEASE_PATH }} - run: zip --symlinks -qr ${{ env.MACOS_X86_ZIP_NAME }} AppFlowy.app + flutter pub global activate flutter_distributor + sh scripts/flutter_release_build/build_macos.sh --build_type dmg --build_arch x86_64 --version ${{ github.ref_name }} --apple-id ${{ secrets.MACOS_NOTARY_USER }} --team-id ${{ secrets.MACOS_TEAM_ID }} --password ${{ secrets.MACOS_NOTARY_PWD }} - name: Upload Asset uses: actions/upload-release-asset@v1 @@ -215,8 +191,82 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ needs.create-release.outputs.upload_url }} - asset_path: ${{ env.MACOS_APP_RELEASE_PATH }}/${{ env.MACOS_DMG_NAME }}.dmg - asset_name: ${{ env.MACOS_DMG_NAME }}.dmg + asset_path: ${{ env.MACOS_APP_RELEASE_PATH }}/${{ env.MACOS_DMG_NAME }} + asset_name: ${{ env.MACOS_DMG_NAME }} + asset_content_type: application/octet-stream + + build-for-macOS-arm64: + name: ${{ matrix.job.target }} (${{ matrix.job.os }}) [${{ matrix.job.extra-build-args }}] + runs-on: ${{ matrix.job.os }} + needs: create-release + env: + MACOS_APP_RELEASE_PATH: frontend/appflowy_flutter/build/${{ github.ref_name }} + MACOS_AARCH64_ZIP_NAME: AppFlowy-${{ github.ref_name }}-macos-arm64.zip + MACOS_DMG_NAME: AppFlowy-${{ github.ref_name }}-macos-arm64.dmg + strategy: + fail-fast: false + matrix: + job: + - { + targets: "aarch64-apple-darwin", + os: macos-latest, + extra-build-args: "", + } + steps: + - name: Checkout source code + uses: actions/checkout@v4 + + - name: Install flutter + uses: subosito/flutter-action@v2 + with: + channel: "stable" + flutter-version: ${{ env.FLUTTER_VERSION }} + + - name: Install Rust toolchain + uses: dtolnay/rust-toolchain@stable + with: + toolchain: ${{ env.RUST_TOOLCHAIN }} + targets: ${{ matrix.job.targets }} + components: rustfmt + + - name: Install prerequisites + working-directory: frontend + run: | + brew install p7zip + cargo install --force --locked cargo-make + cargo install --force --locked duckscript_cli + + - name: Import codesign certificate + uses: apple-actions/import-codesign-certs@v3 + with: + p12-file-base64: ${{ secrets.MACOS_CERTIFICATE }} + p12-password: ${{ secrets.MACOS_CERTIFICATE_PWD }} + + - name: Build AppFlowy + working-directory: frontend + run: | + flutter config --enable-macos-desktop + dart pub global activate flutter_distributor + sh scripts/flutter_release_build/build_macos.sh --build_type dmg --build_arch arm64 --version ${{ github.ref_name }} --apple-id ${{ secrets.MACOS_NOTARY_USER }} --team-id ${{ secrets.MACOS_TEAM_ID }} --password ${{ secrets.MACOS_NOTARY_PWD }} + + - name: Upload Asset + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ needs.create-release.outputs.upload_url }} + asset_path: ${{ env.MACOS_APP_RELEASE_PATH }}/${{ env.MACOS_AARCH64_ZIP_NAME }} + asset_name: ${{ env.MACOS_AARCH64_ZIP_NAME }} + asset_content_type: application/octet-stream + + - name: Upload DMG Asset + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ needs.create-release.outputs.upload_url }} + asset_path: ${{ env.MACOS_APP_RELEASE_PATH }}/${{ env.MACOS_DMG_NAME }} + asset_name: ${{ env.MACOS_DMG_NAME }} asset_content_type: application/octet-stream build-for-macOS-universal: @@ -224,9 +274,9 @@ jobs: runs-on: ${{ matrix.job.os }} needs: create-release env: - MACOS_APP_RELEASE_PATH: frontend/appflowy_flutter/product/${{ github.ref_name }}/macos/Release + MACOS_APP_RELEASE_PATH: frontend/appflowy_flutter/build/${{ github.ref_name }} MACOS_AARCH64_ZIP_NAME: AppFlowy-${{ github.ref_name }}-macos-universal.zip - MACOS_DMG_NAME: AppFlowy-${{ github.ref_name }}-macos-universal + MACOS_DMG_NAME: AppFlowy-${{ github.ref_name }}-macos-universal.dmg strategy: fail-fast: false matrix: @@ -256,46 +306,22 @@ jobs: - name: Install prerequisites working-directory: frontend run: | + brew install p7zip cargo install --force --locked cargo-make cargo install --force --locked duckscript_cli + - name: Import codesign certificate + uses: apple-actions/import-codesign-certs@v3 + with: + p12-file-base64: ${{ secrets.MACOS_CERTIFICATE }} + p12-password: ${{ secrets.MACOS_CERTIFICATE_PWD }} + - name: Build AppFlowy working-directory: frontend run: | flutter config --enable-macos-desktop - sh scripts/flutter_release_build/build_universal_package_for_macos.sh ${{ github.ref_name }} - - - name: Codesign AppFlowy - run: | - echo ${{ secrets.MACOS_CERTIFICATE }} | base64 --decode > certificate.p12 - security create-keychain -p action build.keychain - security default-keychain -s build.keychain - security unlock-keychain -p action build.keychain - security import certificate.p12 -k build.keychain -P ${{ secrets.MACOS_CERTIFICATE_PWD }} -T /usr/bin/codesign - security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k action build.keychain - /usr/bin/codesign --force --options runtime --deep --sign "${{ secrets.MACOS_CODESIGN_ID }}" "${{ env.MACOS_APP_RELEASE_PATH }}/AppFlowy.app" -v - - - name: Create macOS dmg - run: | - brew install create-dmg - create-dmg \ - --volname ${{ env.MACOS_DMG_NAME }} \ - --hide-extension "AppFlowy.app" \ - --background frontend/scripts/dmg_assets/AppFlowyInstallerBackground.jpg \ - --window-size 600 450 \ - --icon-size 94 \ - --icon "AppFlowy.app" 141 249 \ - --app-drop-link 458 249 \ - "${{ env.MACOS_APP_RELEASE_PATH }}/${{ env.MACOS_DMG_NAME }}.dmg" \ - "${{ env.MACOS_APP_RELEASE_PATH }}/AppFlowy.app" - - - name: Notarize AppFlowy - run: | - xcrun notarytool submit ${{ env.MACOS_APP_RELEASE_PATH }}/${{ env.MACOS_DMG_NAME }}.dmg --apple-id ${{ secrets.MACOS_NOTARY_USER }} --team-id ${{ secrets.MACOS_TEAM_ID }} --password ${{ secrets.MACOS_NOTARY_PWD }} -v -f "json" --wait - - - name: Archive Asset - working-directory: ${{ env.MACOS_APP_RELEASE_PATH }} - run: zip --symlinks -qr ${{ env.MACOS_AARCH64_ZIP_NAME }} AppFlowy.app + dart pub global activate flutter_distributor + sh scripts/flutter_release_build/build_macos.sh --build_type dmg --build_arch universal --version ${{ github.ref_name }} --apple-id ${{ secrets.MACOS_NOTARY_USER }} --team-id ${{ secrets.MACOS_TEAM_ID }} --password ${{ secrets.MACOS_NOTARY_PWD }} - name: Upload Asset uses: actions/upload-release-asset@v1 @@ -313,8 +339,8 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ needs.create-release.outputs.upload_url }} - asset_path: ${{ env.MACOS_APP_RELEASE_PATH }}/${{ env.MACOS_DMG_NAME }}.dmg - asset_name: ${{ env.MACOS_DMG_NAME }}.dmg + asset_path: ${{ env.MACOS_APP_RELEASE_PATH }}/${{ env.MACOS_DMG_NAME }} + asset_name: ${{ env.MACOS_DMG_NAME }} asset_content_type: application/octet-stream build-for-linux: @@ -322,14 +348,12 @@ jobs: runs-on: ${{ matrix.job.os }} needs: create-release env: - LINUX_APP_RELEASE_PATH: frontend/appflowy_flutter/product/${{ github.ref_name }}/linux/Release - LINUX_ZIP_NAME: AppFlowy-${{ matrix.job.target }}-x86_64.tar.gz + LINUX_APP_RELEASE_PATH: frontend/appflowy_flutter/build/${{ github.ref_name }} LINUX_PACKAGE_DEB_NAME: AppFlowy-${{ github.ref_name }}-linux-x86_64.deb LINUX_PACKAGE_RPM_NAME: AppFlowy-${{ github.ref_name }}-linux-x86_64.rpm - LINUX_PACKAGE_TMP_RPM_NAME: AppFlowy-${{ github.ref_name }}-2.x86_64.rpm - LINUX_PACKAGE_TMP_APPIMAGE_NAME: AppFlowy-${{ github.ref_name }}-x86_64.AppImage LINUX_PACKAGE_APPIMAGE_NAME: AppFlowy-${{ github.ref_name }}-linux-x86_64.AppImage - LINUX_PACKAGE_ZIP_NAME: AppFlowy-${{ github.ref_name }}-linux-x86_64.tar.gz + LINUX_PACKAGE_ZIP_NAME: AppFlowy-${{ github.ref_name }}-linux-x86_64.zip + LINUX_PACKAGE_TAR_NAME: AppFlowy-${{ github.ref_name }}-linux-x86_64.tar.gz strategy: fail-fast: false @@ -338,7 +362,7 @@ jobs: - { arch: x86_64, target: x86_64-unknown-linux-gnu, - os: ubuntu-20.04, + os: ubuntu-22.04, extra-build-args: "", flutter_profile: production-linux-x86_64, } @@ -364,14 +388,24 @@ jobs: - name: Install prerequisites working-directory: frontend run: | + # Install dependencies sudo wget -qO /etc/apt/trusted.gpg.d/dart_linux_signing_key.asc https://dl-ssl.google.com/linux/linux_signing_key.pub sudo apt-get update - sudo apt-get install -y build-essential libsqlite3-dev libssl-dev clang cmake ninja-build pkg-config libgtk-3-dev - sudo apt-get install keybinder-3.0 - sudo apt-get install -y alien libnotify-dev + sudo apt-get install -y build-essential libsqlite3-dev libssl-dev clang cmake ninja-build pkg-config libgtk-3-dev keybinder-3.0 libnotify-dev + sudo apt install rpm patchelf locate + sudo add-apt-repository universe + sudo apt install libfuse2 + + # Install appimagetool + wget -O appimagetool "https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage" + chmod +x appimagetool + mv appimagetool /usr/local/bin/ + + # Install cargo-make and duckscript source $HOME/.cargo/env cargo install --force --locked cargo-make cargo install --force --locked duckscript_cli + rustup target add ${{ matrix.job.target }} - name: Install gcc-aarch64-linux-gnu @@ -384,30 +418,8 @@ jobs: working-directory: frontend run: | flutter config --enable-linux-desktop - dart ./scripts/flutter_release_build/build_flowy.dart run . ${{ github.ref_name }} - - - name: Archive Asset - working-directory: ${{ env.LINUX_APP_RELEASE_PATH }} - run: tar -czf ${{ env.LINUX_ZIP_NAME }} * - - - name: Build Linux package (.deb) - working-directory: frontend - run: | - sh scripts/linux_distribution/deb/build_deb.sh appflowy_flutter/product/${{ github.ref_name }}/linux/Release ${{ github.ref_name }} ${{ env.LINUX_PACKAGE_DEB_NAME }} - - - name: Build Linux package (.rpm) - working-directory: ${{ env.LINUX_APP_RELEASE_PATH }} - run: | - sudo alien -r ${{ env.LINUX_PACKAGE_DEB_NAME }} - cp -r ${{ env.LINUX_PACKAGE_TMP_RPM_NAME }} ${{ env.LINUX_PACKAGE_RPM_NAME }} - - - name: Build Linux package (.AppImage) - working-directory: frontend - continue-on-error: true - run: | - sh scripts/linux_distribution/appimage/build_appimage.sh ${{ github.ref_name }} - cd .. - cp -r frontend/${{ env.LINUX_PACKAGE_TMP_APPIMAGE_NAME }} ${{ env.LINUX_APP_RELEASE_PATH }}/${{ env.LINUX_PACKAGE_APPIMAGE_NAME }} + dart pub global activate flutter_distributor + ./scripts/flutter_release_build/build_linux.sh --build_type all --build_arch x86_64 --version ${{ github.ref_name }} - name: Upload Asset id: upload-release-asset @@ -416,11 +428,11 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ needs.create-release.outputs.upload_url }} - asset_path: ${{ env.LINUX_APP_RELEASE_PATH }}/${{ env.LINUX_ZIP_NAME }} + asset_path: ${{ env.LINUX_APP_RELEASE_PATH }}/${{ env.LINUX_PACKAGE_ZIP_NAME }} asset_name: ${{ env.LINUX_PACKAGE_ZIP_NAME }} asset_content_type: application/octet-stream - - name: Upload Debian package + - name: Upload DEB package id: upload-release-asset-install-package-deb uses: actions/upload-release-asset@v1 env: diff --git a/frontend/appflowy_flutter/distribute_options.yaml b/frontend/appflowy_flutter/distribute_options.yaml index 60f603a938..9ed8a31822 100644 --- a/frontend/appflowy_flutter/distribute_options.yaml +++ b/frontend/appflowy_flutter/distribute_options.yaml @@ -1,12 +1,35 @@ -output: dist/ +output: build/ releases: - - name: dev + - name: prod jobs: - - name: release-dev-linux-deb + - name: release-prod-linux-deb package: platform: linux target: deb - - name: release-dev-linux-rpm + - name: release-prod-linux-rpm package: platform: linux target: rpm + - name: release-prod-linux-appimage + package: + platform: linux + target: appimage + - name: release-prod-linux-zip + package: + platform: linux + target: zip + + # Because the flutter_distribute plugin does not support the deep code-signing for macos, we need to manually sign the app. + # So we don't use the flutter_distribute plugin to distribute the macos app. + # - name: release-prod-macos-dmg + # package: + # platform: macos + # target: dmg + # - name: release-prod-macos-pkg + # package: + # platform: macos + # target: pkg + - name: release-prod-macos-zip + package: + platform: macos + target: zip diff --git a/frontend/appflowy_flutter/linux/CMakeLists.txt b/frontend/appflowy_flutter/linux/CMakeLists.txt index b9f7cce174..14ba0cb311 100644 --- a/frontend/appflowy_flutter/linux/CMakeLists.txt +++ b/frontend/appflowy_flutter/linux/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 3.10) project(runner LANGUAGES CXX) -set(BINARY_NAME "AppFlowy") +set(BINARY_NAME "appflowy") set(APPLICATION_ID "io.appflowy.appflowy") cmake_policy(SET CMP0063 NEW) diff --git a/frontend/appflowy_flutter/linux/packaging/appimage/make_config.yaml b/frontend/appflowy_flutter/linux/packaging/appimage/make_config.yaml new file mode 100644 index 0000000000..f7dffe0d3a --- /dev/null +++ b/frontend/appflowy_flutter/linux/packaging/appimage/make_config.yaml @@ -0,0 +1,22 @@ +display_name: AppFlowy + +icon: linux/packaging/assets/logo.png + +keywords: + - AppFlowy + - Office + - Document + - Database + - Note + - Kanban + - Note + +generic_name: AppFlowy + +categories: + - Office + +startup_notify: true + +supported_mime_type: + - x-scheme-handler/appflowy-flutter diff --git a/frontend/appflowy_flutter/linux/packaging/deb/make_config.yaml b/frontend/appflowy_flutter/linux/packaging/deb/make_config.yaml index 801a5dbc02..ff70893ef6 100644 --- a/frontend/appflowy_flutter/linux/packaging/deb/make_config.yaml +++ b/frontend/appflowy_flutter/linux/packaging/deb/make_config.yaml @@ -29,7 +29,8 @@ essential: false section: x11 priority: optional -supportedMimeType: x-scheme-handler/appflowy-flutter +supported_mime_type: + - x-scheme-handler/appflowy-flutter dependencies: - libnotify-bin diff --git a/frontend/appflowy_flutter/linux/packaging/rpm/make_config.yaml b/frontend/appflowy_flutter/linux/packaging/rpm/make_config.yaml index 3fcdea03bc..46fd395ad1 100644 --- a/frontend/appflowy_flutter/linux/packaging/rpm/make_config.yaml +++ b/frontend/appflowy_flutter/linux/packaging/rpm/make_config.yaml @@ -26,7 +26,8 @@ categories: startup_notify: true -supportedMimeType: x-scheme-handler/appflowy-flutter +supported_mime_type: + - x-scheme-handler/appflowy-flutter requires: - libnotify diff --git a/frontend/appflowy_flutter/macos/packaging/assets/background.jpg b/frontend/appflowy_flutter/macos/packaging/assets/background.jpg new file mode 100644 index 0000000000..57e29d8b6a Binary files /dev/null and b/frontend/appflowy_flutter/macos/packaging/assets/background.jpg differ diff --git a/frontend/appflowy_flutter/macos/packaging/dmg/make_config.json b/frontend/appflowy_flutter/macos/packaging/dmg/make_config.json new file mode 100644 index 0000000000..85bef8b617 --- /dev/null +++ b/frontend/appflowy_flutter/macos/packaging/dmg/make_config.json @@ -0,0 +1,26 @@ +{ + "title": "AppFlowy", + "icon-size": 94, + "window": { + "size": { + "width": 600, + "height": 450 + } + }, + "background": "../../macos/packaging/assets/background.jpg", + "contents": [ + { + "x": 141, + "y": 249, + "type": "file", + "path": "AppFlowy.app", + "name": "AppFlowy.app" + }, + { + "x": 458, + "y": 249, + "type": "link", + "path": "/Applications" + } + ] +} diff --git a/frontend/appflowy_flutter/macos/packaging/dmg/make_config.yaml b/frontend/appflowy_flutter/macos/packaging/dmg/make_config.yaml new file mode 100644 index 0000000000..b264576ec9 --- /dev/null +++ b/frontend/appflowy_flutter/macos/packaging/dmg/make_config.yaml @@ -0,0 +1,17 @@ +title: "AppFlowy" +icon-size: 94 +window: + size: + width: 600 + height: 450 +background: "../../../macos/packaging/assets/background.jpg" +contents: + - x: 141 + y: 249 + type: "file" + path: "AppFlowy.app" + name: "AppFlowy.app" + - x: 458 + y: 249 + type: "link" + path: "/Applications" diff --git a/frontend/scripts/docker-buildfiles/Dockerfile b/frontend/scripts/docker-buildfiles/Dockerfile index 9e422f80ca..ba4440d5cc 100644 --- a/frontend/scripts/docker-buildfiles/Dockerfile +++ b/frontend/scripts/docker-buildfiles/Dockerfile @@ -79,7 +79,7 @@ USER $user WORKDIR /home/$user COPY --from=builder /appflowy/frontend/appflowy_flutter/build/linux/x64/release/bundle . RUN xdg-user-dirs-update && \ - test -e ./AppFlowy && \ - file ./AppFlowy + test -e ./appflowy && \ + file ./appflowy -CMD ["./AppFlowy"] +CMD ["./appflowy"] diff --git a/frontend/scripts/flatpack-buildfiles/dbus-interface.xml b/frontend/scripts/flatpack-buildfiles/dbus-interface.xml index a973b4bc4d..caa3799775 100644 --- a/frontend/scripts/flatpack-buildfiles/dbus-interface.xml +++ b/frontend/scripts/flatpack-buildfiles/dbus-interface.xml @@ -1,5 +1,5 @@ - - + + @@ -13,4 +13,4 @@ - + \ No newline at end of file diff --git a/frontend/scripts/flatpack-buildfiles/io.appflowy.AppFlowy.desktop b/frontend/scripts/flatpack-buildfiles/io.appflowy.AppFlowy.desktop index 9076493bb8..40b241e05d 100644 --- a/frontend/scripts/flatpack-buildfiles/io.appflowy.AppFlowy.desktop +++ b/frontend/scripts/flatpack-buildfiles/io.appflowy.AppFlowy.desktop @@ -1,8 +1,8 @@ [Desktop Entry] Type=Application Name=AppFlowy -Icon=io.appflowy.AppFlowy -Exec=AppFlowy %U +Icon=io.appflowy.appflowy +Exec=appflowy %U Categories=Network;Productivity; Keywords=Notes DBusActivatable=true diff --git a/frontend/scripts/flatpack-buildfiles/io.appflowy.AppFlowy.metainfo.xml b/frontend/scripts/flatpack-buildfiles/io.appflowy.AppFlowy.metainfo.xml index c9a58b68fa..ea3b476004 100644 --- a/frontend/scripts/flatpack-buildfiles/io.appflowy.AppFlowy.metainfo.xml +++ b/frontend/scripts/flatpack-buildfiles/io.appflowy.AppFlowy.metainfo.xml @@ -1,38 +1,46 @@ - io.appflowy.AppFlowy - + io.appflowy.appflowy + AppFlowy - Open Source Notion Alternative - + Open Source Notion Alternative + CC-BY-4.0 AGPL-3.0-only - +

- # Built for teams that need more control and flexibility ## 100% data control You can host AppFlowy wherever you want; no vendor lock-in. + # Built for teams that need more control and flexibility ## 100% data control You can host + AppFlowy wherever you want; no vendor lock-in.

## Unlimited customizations Design and modify AppFlowy your way with an open core codebase.

- ## One codebase supporting multiple platforms AppFlowy is built with Flutter and Rust. What does this mean? Faster development, better native experience, and more reliable performance. + ## One codebase supporting multiple platforms AppFlowy is built with Flutter and Rust. What + does this mean? Faster development, better native experience, and more reliable performance.

- # Built for individuals who care about data security and mobile experience ## 100% control of your data Download and install AppFlowy on your local machine. You own and control your personal data. + # Built for individuals who care about data security and mobile experience ## 100% control of + your data Download and install AppFlowy on your local machine. You own and control your + personal data.

- ## Extensively extensible For those with no coding experience, AppFlowy enables you to create apps that suit your needs. It's built on a community-driven toolbox, including templates, plugins, themes, and more. + ## Extensively extensible For those with no coding experience, AppFlowy enables you to create + apps that suit your needs. It's built on a community-driven toolbox, including templates, + plugins, themes, and more.

- ## Truly native experience Faster, more stable with support for offline mode. It's also better integrated with different devices. Moreover, AppFlowy enables users to access features and possibilities not available on the web. + ## Truly native experience Faster, more stable with support for offline mode. It's also + better integrated with different devices. Moreover, AppFlowy enables users to access features + and possibilities not available on the web.

- - io.appflowy.AppFlowy.desktop + + io.appflowy.appflowy.desktop https://github.com/AppFlowy-IO/appflowy/raw/main/doc/imgs/welcome.png -
+ \ No newline at end of file diff --git a/frontend/scripts/flatpack-buildfiles/io.appflowy.AppFlowy.service b/frontend/scripts/flatpack-buildfiles/io.appflowy.AppFlowy.service index 31e32415d0..fed8eabcf1 100644 --- a/frontend/scripts/flatpack-buildfiles/io.appflowy.AppFlowy.service +++ b/frontend/scripts/flatpack-buildfiles/io.appflowy.AppFlowy.service @@ -1,3 +1,3 @@ [D-BUS Service] -Name=io.appflowy.AppFlowy -Exec=AppFlowy +Name=io.appflowy.appflowy +Exec=appflowy diff --git a/frontend/scripts/flatpack-buildfiles/launcher.sh b/frontend/scripts/flatpack-buildfiles/launcher.sh index 24b4fdbea4..5cda51d0a9 100644 --- a/frontend/scripts/flatpack-buildfiles/launcher.sh +++ b/frontend/scripts/flatpack-buildfiles/launcher.sh @@ -1,4 +1,4 @@ #!/usr/bin/env bash -gdbus call --session --dest io.appflowy.AppFlowy \ +gdbus call --session --dest io.appflowy.appflowy \ --object-path /io/appflowy/AppFlowy/Object \ - --method io.appflowy.AppFlowy.Open "['$1']" {} + --method io.appflowy.appflowy.Open "['$1']" {} diff --git a/frontend/scripts/flutter_release_build/build_linux.sh b/frontend/scripts/flutter_release_build/build_linux.sh new file mode 100755 index 0000000000..21f591193a --- /dev/null +++ b/frontend/scripts/flutter_release_build/build_linux.sh @@ -0,0 +1,243 @@ +#!/bin/bash +# This Script is used to build the AppFlowy linux zip, deb, rpm or appimage +# +# Usage: ./scripts/flutter_release_build/build_linux.sh --build_type --build_arch --version [--skip-code-generation] [--skip-rebuild-core] +# +# Options: +# -h, --help Show this help message and exit +# --build_type The type of package to build. Must be one of: +# - all: Build all package types +# - zip: Build only zip package +# - tar.xz: Build only tar.xz package +# - deb: Build only deb package +# - rpm: Build only rpm package +# - appimage: Build only appimage package +# --build_arch The architecture to build. Must be one of: +# - x86_64: Build for x86_64 architecture +# - arm64: Build for arm64 architecture (not supported yet) +# --version The version number (e.g. 0.8.2) +# --skip-code-generation Skip the code generation step +# --skip-rebuild-core Skip the core rebuild step + +show_help() { + echo "Usage: ./scripts/flutter_release_build/build_linux.sh --build_type --build_arch --version [--skip-code-generation] [--skip-rebuild-core]" + echo "" + echo "Options:" + echo " -h, --help Show this help message and exit" + echo "" + echo "Arguments:" + echo " --build_type The type of package to build. Must be one of:" + echo " - all: Build all package types" + echo " - zip: Build only zip package" + echo " - tar.xz: Build only tar.xz package" + echo " - deb: Build only deb package" + echo " - rpm: Build only rpm package" + echo " Please install the \033[33mrpm-build\033[0m and \033[33mpatchelf\033[0m before building the rpm and appimage package." + echo " For more information, please refer to the https://distributor.leanflutter.dev/makers/rpm/." + echo " - appimage: Build only appimage package" + echo " Please install the \033[33mlocate\033[0m and \033[33mappimagetool\033[0m before building the appimage package." + echo " For more information, please refer to the https://distributor.leanflutter.dev/makers/appimage/." + echo " --build_arch The architecture to build. Must be one of:" + echo " - x86_64: Build for x86_64 architecture" + echo " - arm64: Build for arm64 architecture (not supported yet)" + echo " --version The version number (e.g. 0.8.2)" + echo " --skip-code-generation Skip the code generation step. It may save time if you have already generated the code." + echo " --skip-rebuild-core Skip the core rebuild step. It may save time if you have already built the core." + exit 0 +} + +# Check for help flag +if [ "$1" = "-h" ] || [ "$1" = "--help" ]; then + show_help +fi + +# Parse named arguments +while [ $# -gt 0 ]; do + case "$1" in + --build_type) + BUILD_TYPE="$2" + shift 2 + ;; + --build_arch) + BUILD_ARCH="$2" + shift 2 + ;; + --version) + VERSION="$2" + shift 2 + ;; + --skip-code-generation) + SKIP_CODE_GENERATION=true + shift + ;; + --skip-rebuild-core) + SKIP_REBUILD_CORE=true + shift + ;; + *) + echo "Unknown parameter: $1" + show_help + exit 1 + ;; + esac +done + +clear_cache() { + echo -e "Clearing the cache..." + rm -rf appflowy_flutter/build/$VERSION/ +} + +info() { + echo -e "🚀 \033[32m$1\033[0m" +} + +error() { + echo -e "🚨 \033[31m$1\033[0m" +} + +# Validate build type argument +if [ -z "$BUILD_TYPE" ]; then + error "Please specify build type with --build_type: all, zip, tar.xz, deb, rpm, appimage" + exit 1 +fi + +# Validate version argument +if [ -z "$VERSION" ]; then + error "Please specify version number with --version (e.g. 0.8.2)" + exit 1 +fi + +# Validate build arch argument +if [ -z "$BUILD_ARCH" ]; then + error "Please specify build arch with --build_arch: x86_64, arm64 or universal" + exit 1 +fi + +if [ "$BUILD_TYPE" != "all" ] && [ "$BUILD_TYPE" != "zip" ] && [ "$BUILD_TYPE" != "tar.xz" ] && [ "$BUILD_TYPE" != "deb" ] && [ "$BUILD_TYPE" != "rpm" ] && [ "$BUILD_TYPE" != "appimage" ]; then + error "Invalid build type. Must be one of: all, zip, tar.xz, deb, rpm, appimage" + exit 1 +fi + +has_built_core=false +has_generated_code=false + +prepare_build() { + info "Preparing build..." + + # Build the rust-lib with version + if [ "$SKIP_REBUILD_CORE" != "true" ] && [ "$has_built_core" != "true" ]; then + cargo make --env APP_VERSION=$VERSION --profile production-linux-$BUILD_ARCH appflowy-core-release + has_built_core=true + fi + + if [ "$SKIP_CODE_GENERATION" != "true" ] && [ "$has_generated_code" != "true" ]; then + cargo make --env APP_VERSION=$VERSION --profile production-linux-$BUILD_ARCH code_generation + has_generated_code=true + fi +} + +build_zip() { + info "Building zip package version $VERSION..." + + prepare_build + + cd appflowy_flutter + flutter_distributor release --name=prod --jobs=release-prod-linux-zip --skip-clean + cd .. + mv appflowy_flutter/build/$VERSION/appflowy-$VERSION+$VERSION-linux.zip appflowy_flutter/build/$VERSION/AppFlowy-$VERSION-linux-x86_64.zip + + info "Zip package built successfully. The zip package is located at appflowy_flutter/build/$VERSION/AppFlowy-$VERSION-linux-x86_64.zip" +} + +build_deb() { + info "Building deb package version $VERSION..." + + prepare_build + + cd appflowy_flutter + flutter_distributor release --name=prod --jobs=release-prod-linux-deb --skip-clean + cd .. + mv appflowy_flutter/build/$VERSION/appflowy-$VERSION+$VERSION-linux.deb appflowy_flutter/build/$VERSION/AppFlowy-$VERSION-linux-x86_64.deb + + info "Deb package built successfully. The deb package is located at appflowy_flutter/build/$VERSION/AppFlowy-$VERSION-linux-x86_64.deb" +} + +build_rpm() { + info "Building rpm package version $VERSION..." + + prepare_build + + cd appflowy_flutter + flutter_distributor release --name=prod --jobs=release-prod-linux-rpm --skip-clean + cd .. + mv appflowy_flutter/build/$VERSION/appflowy-$VERSION+$VERSION-linux.rpm appflowy_flutter/build/$VERSION/AppFlowy-$VERSION-linux-x86_64.rpm + + info "RPM package built successfully. The RPM package is located at appflowy_flutter/build/$VERSION/AppFlowy-$VERSION-linux-x86_64.rpm" +} + +# Function to build AppImage package +build_appimage() { + info "Building AppImage package version $VERSION..." + + prepare_build + + cd appflowy_flutter + flutter_distributor release --name=prod --jobs=release-prod-linux-appimage --skip-clean + cd .. + mv appflowy_flutter/build/$VERSION/appflowy-$VERSION+$VERSION-linux.AppImage appflowy_flutter/build/$VERSION/AppFlowy-$VERSION-linux-x86_64.AppImage + + info "AppImage package built successfully. The AppImage package is located at appflowy_flutter/build/$VERSION/AppFlowy-$VERSION-linux-x86_64.AppImage" +} + +build_tar_xz() { + info "Building tar.xz package version $VERSION..." + + prepare_build + + # step 1: check if the linux zip package is built, if not, build the zip package + if [ ! -f "appflowy_flutter/build/$VERSION/AppFlowy-$VERSION-linux-x86_64.zip" ]; then + info "Linux zip package is not built. Building the zip package..." + build_zip + fi + + # step 2: unzip the zip package + unzip appflowy_flutter/build/$VERSION/AppFlowy-$VERSION-linux-x86_64.zip -d appflowy_flutter/build/$VERSION/AppFlowy-$VERSION-linux-x86_64 + + # check if the AppFlowy directory exists + if [ ! -d "appflowy_flutter/build/$VERSION/AppFlowy-$VERSION-linux-x86_64" ]; then + error "AppFlowy directory doesn't exist. Please check the zip package." + exit 1 + fi + + # step 3: build the tar.xz package + tar -cJvf appflowy_flutter/build/$VERSION/AppFlowy-$VERSION-linux-x86_64.tar.xz appflowy_flutter/build/$VERSION/AppFlowy-$VERSION-linux-x86_64/* + + info "Tar.xz package built successfully. The tar.xz package is located at appflowy_flutter/build/$VERSION/AppFlowy-$VERSION-linux-x86_64.tar.xz" +} + +clear_cache + +# Build packages based on build type +case $BUILD_TYPE in +"all") + build_zip + build_deb + build_rpm + build_appimage + ;; +"zip") + build_zip + ;; +"deb") + build_deb + ;; +"rpm") + build_rpm + ;; +"appimage") + build_appimage + ;; +"tar.xz") + build_tar_xz + ;; +esac diff --git a/frontend/scripts/flutter_release_build/build_macos.sh b/frontend/scripts/flutter_release_build/build_macos.sh new file mode 100755 index 0000000000..82071bef38 --- /dev/null +++ b/frontend/scripts/flutter_release_build/build_macos.sh @@ -0,0 +1,297 @@ +# This Script is used to build the AppFlowy macOS zip, dmg or pkg +# +# Usage: ./scripts/flutter_release_build/build_macos.sh --build_type --build_arch --version --apple-id --team-id --password [--skip-code-generation] [--skip-rebuild-core] +# +# Options: +# -h, --help Show this help message and exit +# --build_type The type of package to build. Must be one of: +# - all: Build all package types +# - zip: Build only zip package +# - dmg: Build only dmg package +# - tar.xz: Build only tar.xz package +# --build_arch The architecture to build. Must be one of: +# - x86_64: Build for x86_64 architecture +# - arm64: Build for arm64 architecture +# - universal: Build for universal architecture +# --version The version number (e.g. 0.8.2) +# --skip-code-generation Skip the code generation step +# --skip-rebuild-core Skip the core rebuild step +# --apple-id The apple id to use for the notary service +# --team-id The team id to use for the notary service +# --password The password to use for the notary service + +show_help() { + echo "Usage: ./scripts/flutter_release_build/build_macos.sh --build_type --build_arch --version --apple-id --team-id --password [--skip-code-generation] [--skip-rebuild-core]" + echo "" + echo "Options:" + echo " -h, --help Show this help message and exit" + echo "" + echo "Arguments:" + echo " --build_type The type of package to build. Must be one of:" + echo " - all: Build all package types" + echo " - zip: Build only zip package" + echo " Please install the \033[33mp7zip\033[0m before building the zip package." + echo " For more information, please refer to the https://distributor.leanflutter.dev/makers/zip/." + echo " - tar.xz: Build only tar.xz package" + echo " - dmg: Build only dmg package" + echo " Please install the \033[33mappdmg\033[0m before building the dmg package." + echo " For more information, please refer to the https://distributor.leanflutter.dev/makers/dmg/." + echo " --build_arch The architecture to build. Must be one of:" + echo " - x86_64: Build for x86_64 architecture" + echo " - arm64: Build for arm64 architecture" + echo " - universal: Build for universal architecture" + echo " --version The version number (e.g. 0.8.2)" + echo " --skip-code-generation Skip the code generation step. It may save time if you have already generated the code." + echo " --skip-rebuild-core Skip the core rebuild step. It may save time if you have already built the core." + echo " --apple-id The apple id to use for the notary service" + echo " --team-id The team id to use for the notary service" + echo " --password The password to use for the notary service" + exit 0 +} + +# Check for help flag +if [ "$1" = "-h" ] || [ "$1" = "--help" ]; then + show_help +fi + +# Parse named arguments +while [ $# -gt 0 ]; do + case "$1" in + --build_type) + BUILD_TYPE="$2" + shift 2 + ;; + --build_arch) + BUILD_ARCH="$2" + shift 2 + ;; + --version) + VERSION="$2" + shift 2 + ;; + --skip-code-generation) + SKIP_CODE_GENERATION=true + shift + ;; + --skip-rebuild-core) + SKIP_REBUILD_CORE=true + shift + ;; + --apple-id) + APPLE_ID="$2" + shift 2 + ;; + --team-id) + TEAM_ID="$2" + shift 2 + ;; + --password) + PASSWORD="$2" + shift 2 + ;; + *) + echo "Unknown parameter: $1" + show_help + exit 1 + ;; + esac +done + +clear_cache() { + echo "Clearing the cache..." + rm -rf appflowy_flutter/build/$VERSION/ +} + +info() { + echo "🚀 \033[32m$1\033[0m" +} + +error() { + echo "🚨 \033[31m$1\033[0m" +} + +# Validate build type argument +if [ -z "$BUILD_TYPE" ]; then + error "Please specify build type with --build_type: all, zip, dmg, tar.xz" + exit 1 +fi + +# Validate version argument +if [ -z "$VERSION" ]; then + error "Please specify version number with --version (e.g. 0.8.2)" + exit 1 +fi + +# Validate build arch argument +if [ -z "$BUILD_ARCH" ]; then + error "Please specify build arch with --build_arch: x86_64, arm64 or universal" + exit 1 +fi + +if [ "$BUILD_TYPE" != "all" ] && [ "$BUILD_TYPE" != "zip" ] && [ "$BUILD_TYPE" != "dmg" ] && [ "$BUILD_TYPE" != "tar.xz" ]; then + error "Invalid build type. Must be one of: all, zip, dmg, tar.xz" + exit 1 +fi + +prepare_build() { + info "Preparing build..." + + # step 1: build the appflowy-core (rust-lib) based on the build arch + if [ "$SKIP_REBUILD_CORE" != "true" ]; then + if [ "$BUILD_ARCH" = "x86_64" ] || [ "$BUILD_ARCH" = "universal" ]; then + info "Building appflowy-core for x86_64...(This may take a while)" + cargo make --profile production-mac-x86_64 appflowy-core-release + fi + + if [ "$BUILD_ARCH" = "arm64" ] || [ "$BUILD_ARCH" = "universal" ]; then + info "Building appflowy-core for arm64...(This may take a while)" + cargo make --profile production-mac-arm64 appflowy-core-release + fi + + # step 2 (optional): combine these two libdart_ffi.a into one libdart_ffi.a if the build arch is universal + if [ "$BUILD_ARCH" = "universal" ]; then + info "Combining libdart_ffi.a for universal..." + lipo -create \ + rust-lib/target/x86_64-apple-darwin/release/libdart_ffi.a \ + rust-lib/target/aarch64-apple-darwin/release/libdart_ffi.a \ + -output rust-lib/target/libdart_ffi.a + + info "Checking the libdart_ffi.a for universal..." + lipo -archs rust-lib/target/libdart_ffi.a + + cp -rf rust-lib/target/libdart_ffi.a \ + appflowy_flutter/packages/appflowy_backend/macos/ + fi + fi + + # step 3 (optional): generate the flutter code: languages, icons and freezed files. + if [ "$SKIP_CODE_GENERATION" != "true" ]; then + info "Generating the flutter code...(This may take a while)" + cargo make code_generation + fi + + # step 4: build the zip package + info "Building the zip package..." + cd appflowy_flutter + flutter_distributor release --name=prod --jobs=release-prod-macos-zip --skip-clean + cd .. +} + +build_zip() { + info "Building zip package version $VERSION..." + + # step 1: check if the macos zip package is built, if not, build the zip package + if [ ! -f "appflowy_flutter/build/$VERSION/AppFlowy-$VERSION-macos-$BUILD_ARCH.zip" ]; then + info "macOS zip package is not built. Building the zip package..." + prepare_build + + # step 1.1: move the zip package to the build directory + mv appflowy_flutter/build/$VERSION/appflowy-$VERSION+$VERSION-macos.zip appflowy_flutter/build/$VERSION/AppFlowy-$VERSION-macos-$BUILD_ARCH.zip + fi + + # step 2: unzip the zip package and codesign the app + unzip -o appflowy_flutter/build/$VERSION/AppFlowy-$VERSION-macos-$BUILD_ARCH.zip + + # step 3: codesign the app + # note: You must install the certificate to the system before codesigning + sudo /usr/bin/codesign --force --options runtime --deep --sign "Developer ID Application: APPFLOWY PTE. LTD" --deep --verbose AppFlowy.app -v + + # step 4: zip the app again + 7z a appflowy_flutter/build/$VERSION/AppFlowy-$VERSION-macos-$BUILD_ARCH.zip AppFlowy.app + + info "Zip package built successfully" +} + +build_dmg() { + info "Building DMG package version $VERSION..." + + # step 1: check if the macos zip package is built, if not, build the zip package + if [ ! -f "appflowy_flutter/build/$VERSION/AppFlowy-$VERSION-macos-$BUILD_ARCH.zip" ]; then + info "macOS zip package is not built. Building the zip package..." + build_zip + fi + + # step 2: unzip the zip package and copy the make_config.json file to the build directory + unzip appflowy_flutter/build/$VERSION/AppFlowy-$VERSION-macos-$BUILD_ARCH.zip -d appflowy_flutter/build/$VERSION/ + cp appflowy_flutter/macos/packaging/dmg/make_config.json appflowy_flutter/build/$VERSION/ + + # check if the AppFlowy.app doesn't exist, exit the script + if [ ! -d "appflowy_flutter/build/$VERSION/AppFlowy.app" ]; then + error "AppFlowy.app doesn't exist. Please check the zip package." + exit 1 + fi + + # check if the appdmg has been installed + if ! command -v appdmg &>/dev/null; then + info "appdmg is not installed. Installing appdmg..." + npm install -g appdmg + fi + + # step 3: build the dmg package using appdmg + # note: You must install the appdmg to the system before building the dmg package + appdmg appflowy_flutter/build/$VERSION/make_config.json appflowy_flutter/build/$VERSION/AppFlowy-$VERSION-macos-$BUILD_ARCH.dmg + + # step 4: clear the temp files + rm -rf appflowy_flutter/build/$VERSION/AppFlowy.app + rm -rf appflowy_flutter/build/$VERSION/make_config.json + + # check if the dmg package is built + if [ ! -f "appflowy_flutter/build/$VERSION/AppFlowy-$VERSION-macos-$BUILD_ARCH.dmg" ]; then + error "DMG package is not built. Please check the build process." + exit 1 + fi + + info "DMG package built successfully. The dmg package is located at appflowy_flutter/build/$VERSION/AppFlowy-$VERSION-macos-$BUILD_ARCH.dmg" + + if [ -z "$APPLE_ID" ] || [ -z "$TEAM_ID" ] || [ -z "$PASSWORD" ]; then + error "The apple id, team id and password are not specified. Please notarize the dmg package manually." + error "xcrun notarytool submit appflowy_flutter/build/$VERSION/AppFlowy-$VERSION-macos-$BUILD_ARCH.dmg --apple-id --team-id --password -v -f \"json\" --wait" + else + xcrun notarytool submit appflowy_flutter/build/$VERSION/AppFlowy-$VERSION-macos-$BUILD_ARCH.dmg --apple-id $APPLE_ID --team-id $TEAM_ID --password $PASSWORD -v -f "json" --wait + info "Notarization is completed. Please check the notarization status" + fi +} + +build_tar_xz() { + info "Building tar.xz package version $VERSION..." + + # step 1: check if the macos zip package is built, if not, build the zip package + if [ ! -f "appflowy_flutter/build/$VERSION/AppFlowy-$VERSION-macos-$BUILD_ARCH.zip" ]; then + info "macOS zip package is not built. Building the zip package..." + build_zip + fi + + # step 2: unzip the zip package and copy the make_config.json file to the build directory + unzip appflowy_flutter/build/$VERSION/AppFlowy-$VERSION-macos-$BUILD_ARCH.zip -d appflowy_flutter/build/$VERSION/ + + # check if the AppFlowy.app doesn't exist, exit the script + if [ ! -d "appflowy_flutter/build/$VERSION/AppFlowy.app" ]; then + error "AppFlowy.app doesn't exist. Please check the zip package." + exit 1 + fi + + # step 3: build the tar.xz package + tar -cJvf appflowy_flutter/build/$VERSION/AppFlowy-$VERSION-macos-$BUILD_ARCH.tar.xz appflowy_flutter/build/$VERSION/AppFlowy.app + + info "Tar.xz package built successfully. The tar.xz package is located at appflowy_flutter/build/$VERSION/AppFlowy-$VERSION-macos-$BUILD_ARCH.tar.xz" +} + +clear_cache + +# Build packages based on build type +case $BUILD_TYPE in +"all") + build_zip + build_dmg + build_tar_xz + ;; +"zip") + build_zip + ;; +"dmg") + build_dmg + ;; +"tar.xz") + build_tar_xz + ;; +esac diff --git a/frontend/scripts/linux_distribution/appimage/AppImageBuilder.yml b/frontend/scripts/linux_distribution/appimage/AppImageBuilder.yml index cd8103df9e..45d52d6044 100644 --- a/frontend/scripts/linux_distribution/appimage/AppImageBuilder.yml +++ b/frontend/scripts/linux_distribution/appimage/AppImageBuilder.yml @@ -11,11 +11,11 @@ script: AppDir: path: ./AppDir app_info: - id: io.appflowy.AppFlowy + id: io.appflowy.appflowy name: AppFlowy icon: appflowy.svg version: [CHANGE_THIS] - exec: AppFlowy + exec: appflowy exec_args: $@ apt: arch: diff --git a/frontend/scripts/linux_distribution/deb/AppFlowy.desktop b/frontend/scripts/linux_distribution/deb/AppFlowy.desktop index e6851f9f42..6b485fc50e 100644 --- a/frontend/scripts/linux_distribution/deb/AppFlowy.desktop +++ b/frontend/scripts/linux_distribution/deb/AppFlowy.desktop @@ -2,7 +2,7 @@ Type=Application Name=AppFlowy Icon=/usr/share/icons/hicolor/scalable/apps/appflowy.svg -Exec=/usr/bin/AppFlowy %U +Exec=/usr/bin/appflowy %U Categories=Network;Productivity; Keywords=Notes Terminal=false diff --git a/frontend/scripts/linux_distribution/deb/DEBIAN/postinst b/frontend/scripts/linux_distribution/deb/DEBIAN/postinst index bf2f79fa97..fbc5b1fc91 100755 --- a/frontend/scripts/linux_distribution/deb/DEBIAN/postinst +++ b/frontend/scripts/linux_distribution/deb/DEBIAN/postinst @@ -1,8 +1,8 @@ #!/usr/bin/env bash -if [ -e /usr/bin/AppFlowy ]; then +if [ -e /usr/bin/appflowy ]; then echo "Symlink already exists, skipping." else echo "Creating Symlink in /usr/bin/appflowy" - ln -s /usr/lib/AppFlowy/AppFlowy /usr/bin/AppFlowy + ln -s /usr/lib/appflowy/appflowy /usr/bin/appflowy ln -s /usr/lib/AppFlowy/launcher.sh /usr/bin/AppFlowyLauncher.sh fi diff --git a/frontend/scripts/linux_distribution/deb/DEBIAN/postrm b/frontend/scripts/linux_distribution/deb/DEBIAN/postrm index 59a680e767..f0131be6f6 100755 --- a/frontend/scripts/linux_distribution/deb/DEBIAN/postrm +++ b/frontend/scripts/linux_distribution/deb/DEBIAN/postrm @@ -1,5 +1,5 @@ #!/usr/bin/env bash -if [ -e /usr/bin/AppFlowy ]; then - rm /usr/bin/AppFlowy +if [ -e /usr/bin/appflowy ]; then + rm /usr/bin/appflowy rm /usr/bin/AppFlowyLauncher.sh fi diff --git a/frontend/scripts/linux_distribution/deb/build_deb.sh b/frontend/scripts/linux_distribution/deb/build_deb.sh index 42fbf7346d..a5fb5bc53a 100644 --- a/frontend/scripts/linux_distribution/deb/build_deb.sh +++ b/frontend/scripts/linux_distribution/deb/build_deb.sh @@ -25,9 +25,9 @@ chmod 0755 $DEBIAN/postinst chmod 0755 $DEBIAN/postrm grep -rl "\[CHANGE_THIS\]" $DEBIAN/control | xargs sed -i "s/\[CHANGE_THIS\]/$VERSION/" -cp -fR $LINUX_RELEASE_PRODUCTION/AppFlowy $LIB -cp ./scripts/linux_distribution/deb/AppFlowy.desktop $APPLICATIONS -cp ./scripts/linux_distribution/packaging/io.appflowy.AppFlowy.metainfo.xml $METAINFO +cp -fR $LINUX_RELEASE_PRODUCTION/appflowy $LIB +cp ./scripts/linux_distribution/deb/appflowy.desktop $APPLICATIONS +cp ./scripts/linux_distribution/packaging/io.appflowy.appflowy.metainfo.xml $METAINFO cp ./scripts/linux_distribution/packaging/appflowy.svg $ICONS # Build the package diff --git a/frontend/scripts/linux_distribution/flatpak/README.md b/frontend/scripts/linux_distribution/flatpak/README.md index 7d90cfd2a6..b1d40056da 100644 --- a/frontend/scripts/linux_distribution/flatpak/README.md +++ b/frontend/scripts/linux_distribution/flatpak/README.md @@ -1 +1 @@ -Please refer to https://github.com/flathub/io.appflowy.AppFlowy repo. +Please refer to https://github.com/flathub/io.appflowy.appflowy repo. diff --git a/frontend/scripts/linux_distribution/packaging/io.appflowy.AppFlowy.metainfo.xml b/frontend/scripts/linux_distribution/packaging/io.appflowy.AppFlowy.metainfo.xml index c9a58b68fa..ea3b476004 100644 --- a/frontend/scripts/linux_distribution/packaging/io.appflowy.AppFlowy.metainfo.xml +++ b/frontend/scripts/linux_distribution/packaging/io.appflowy.AppFlowy.metainfo.xml @@ -1,38 +1,46 @@ - io.appflowy.AppFlowy - + io.appflowy.appflowy + AppFlowy - Open Source Notion Alternative - + Open Source Notion Alternative + CC-BY-4.0 AGPL-3.0-only - +

- # Built for teams that need more control and flexibility ## 100% data control You can host AppFlowy wherever you want; no vendor lock-in. + # Built for teams that need more control and flexibility ## 100% data control You can host + AppFlowy wherever you want; no vendor lock-in.

## Unlimited customizations Design and modify AppFlowy your way with an open core codebase.

- ## One codebase supporting multiple platforms AppFlowy is built with Flutter and Rust. What does this mean? Faster development, better native experience, and more reliable performance. + ## One codebase supporting multiple platforms AppFlowy is built with Flutter and Rust. What + does this mean? Faster development, better native experience, and more reliable performance.

- # Built for individuals who care about data security and mobile experience ## 100% control of your data Download and install AppFlowy on your local machine. You own and control your personal data. + # Built for individuals who care about data security and mobile experience ## 100% control of + your data Download and install AppFlowy on your local machine. You own and control your + personal data.

- ## Extensively extensible For those with no coding experience, AppFlowy enables you to create apps that suit your needs. It's built on a community-driven toolbox, including templates, plugins, themes, and more. + ## Extensively extensible For those with no coding experience, AppFlowy enables you to create + apps that suit your needs. It's built on a community-driven toolbox, including templates, + plugins, themes, and more.

- ## Truly native experience Faster, more stable with support for offline mode. It's also better integrated with different devices. Moreover, AppFlowy enables users to access features and possibilities not available on the web. + ## Truly native experience Faster, more stable with support for offline mode. It's also + better integrated with different devices. Moreover, AppFlowy enables users to access features + and possibilities not available on the web.

- - io.appflowy.AppFlowy.desktop + + io.appflowy.appflowy.desktop https://github.com/AppFlowy-IO/appflowy/raw/main/doc/imgs/welcome.png -
+ \ No newline at end of file diff --git a/frontend/scripts/linux_distribution/packaging/io.appflowy.AppFlowy.service b/frontend/scripts/linux_distribution/packaging/io.appflowy.AppFlowy.service index 31e32415d0..2982dff894 100644 --- a/frontend/scripts/linux_distribution/packaging/io.appflowy.AppFlowy.service +++ b/frontend/scripts/linux_distribution/packaging/io.appflowy.AppFlowy.service @@ -1,3 +1,3 @@ [D-BUS Service] -Name=io.appflowy.AppFlowy +Name=io.appflowy.appflowy Exec=AppFlowy diff --git a/frontend/scripts/linux_distribution/packaging/launcher.sh b/frontend/scripts/linux_distribution/packaging/launcher.sh index 24b4fdbea4..263eca6593 100644 --- a/frontend/scripts/linux_distribution/packaging/launcher.sh +++ b/frontend/scripts/linux_distribution/packaging/launcher.sh @@ -1,4 +1,4 @@ #!/usr/bin/env bash -gdbus call --session --dest io.appflowy.AppFlowy \ - --object-path /io/appflowy/AppFlowy/Object \ - --method io.appflowy.AppFlowy.Open "['$1']" {} +gdbus call --session --dest io.appflowy.appflowy \ + --object-path /io/appflowy/appflowy/Object \ + --method io.appflowy.appflowy.Open "['$1']" {} diff --git a/frontend/scripts/linux_installer/postinst b/frontend/scripts/linux_installer/postinst index 83e1a1043e..82a03114c0 100644 --- a/frontend/scripts/linux_installer/postinst +++ b/frontend/scripts/linux_installer/postinst @@ -1,7 +1,7 @@ #!/usr/bin/env bash -if [ -e /usr/local/bin/AppFlowy ]; then +if [ -e /usr/local/bin/appflowy ]; then echo "Symlink already exists, skipping." else echo "Creating Symlink in /usr/local/bin/appflowy" - ln -s /opt/AppFlowy/AppFlowy /usr/local/bin/AppFlowy + ln -s /opt/appflowy/appflowy /usr/local/bin/appflowy fi