chore: update CI/CD (#4993)

* chore: updae ci cd
- replace electron beta by tauri beta
- only upload tauri nightly to s3
- remove preview

* chore: ignore electron nightly build

* chore: remove redundant workflows

* chore: add nsis template

* chore: update nsis template

* chore: update cuda url

* chore: bundle bun and uv

* chore: delete binaries folder on uninstalling
This commit is contained in:
vansangpfiev 2025-05-15 16:44:15 +07:00 committed by Louis
parent 8fefe6e167
commit 2418095656
No known key found for this signature in database
GPG Key ID: 44FA9F4D33C37DE2
14 changed files with 61 additions and 1241 deletions

View File

@ -1,167 +0,0 @@
name: Electron Builder - Beta Build
on:
push:
tags: ["v[0-9]+.[0-9]+.[0-9]+-rc[0-9]+-beta"]
jobs:
# Job create Update app version based on latest release tag with build number and save to output
get-update-version:
uses: ./.github/workflows/template-get-update-version.yml
create-draft-release:
runs-on: ubuntu-latest
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
outputs:
upload_url: ${{ steps.create_release.outputs.upload_url }}
version: ${{ steps.get_version.outputs.version }}
permissions:
contents: write
steps:
- name: Extract tag name without v prefix
id: get_version
run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV && echo "::set-output name=version::${GITHUB_REF#refs/tags/v}"
env:
GITHUB_REF: ${{ github.ref }}
- name: Create Draft Release
id: create_release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ github.ref_name }}
token: ${{ secrets.GITHUB_TOKEN }}
name: "${{ env.VERSION }}"
draft: true
prerelease: false
generate_release_notes: true
build-electron-macos:
uses: ./.github/workflows/template-electron-build-macos.yml
secrets: inherit
needs: [get-update-version]
with:
ref: ${{ github.ref }}
public_provider: github
new_version: ${{ needs.get-update-version.outputs.new_version }}
beta: true
nightly: false
cortex_api_port: "39271"
build-electron-windows-x64:
uses: ./.github/workflows/template-electron-build-windows-x64.yml
secrets: inherit
needs: [get-update-version]
with:
ref: ${{ github.ref }}
public_provider: github
new_version: ${{ needs.get-update-version.outputs.new_version }}
beta: true
nightly: false
cortex_api_port: "39271"
build-electron-linux-x64:
uses: ./.github/workflows/template-electron-build-linux-x64.yml
secrets: inherit
needs: [get-update-version]
with:
ref: ${{ github.ref }}
public_provider: github
new_version: ${{ needs.get-update-version.outputs.new_version }}
beta: true
nightly: false
cortex_api_port: "39271"
build-tauri-macos:
uses: ./.github/workflows/template-tauri-build-macos-preview.yml
secrets: inherit
needs: [get-update-version, create-draft-release]
with:
ref: ${{ github.ref }}
public_provider: github
new_version: ${{ needs.get-update-version.outputs.new_version }}
channel: beta
cortex_api_port: "39271"
upload_url: ${{ needs.create-draft-release.outputs.upload_url }}
build-tauri-windows-x64:
uses: ./.github/workflows/template-tauri-build-windows-x64-preview.yml
secrets: inherit
needs: [get-update-version, create-draft-release]
with:
ref: ${{ github.ref }}
public_provider: github
new_version: ${{ needs.get-update-version.outputs.new_version }}
channel: beta
cortex_api_port: "39271"
upload_url: ${{ needs.create-draft-release.outputs.upload_url }}
build-tauri-linux-x64:
uses: ./.github/workflows/template-tauri-build-linux-x64-preview.yml
secrets: inherit
needs: [get-update-version, create-draft-release]
with:
ref: ${{ github.ref }}
public_provider: github
new_version: ${{ needs.get-update-version.outputs.new_version }}
channel: beta
cortex_api_port: "39271"
upload_url: ${{ needs.create-draft-release.outputs.upload_url }}
sync-temp-to-latest:
needs: [
build-electron-windows-x64,
build-electron-linux-x64,
build-electron-macos,
build-tauri-windows-x64,
build-tauri-linux-x64,
build-tauri-macos
]
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Getting the repo
uses: actions/checkout@v3
- name: Sync temp to latest
run: |
# sync temp-beta to beta by copy files that are different or new
aws s3 sync "s3://${{ secrets.DELTA_AWS_S3_BUCKET_NAME }}/temp-beta/" "s3://${{ secrets.DELTA_AWS_S3_BUCKET_NAME }}/beta/"
env:
AWS_ACCESS_KEY_ID: ${{ secrets.DELTA_AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.DELTA_AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: ${{ secrets.DELTA_AWS_REGION }}
AWS_EC2_METADATA_DISABLED: "true"
noti-discord-and-update-url-readme:
needs: [
get-update-version,
sync-temp-to-latest,
build-electron-windows-x64,
build-electron-linux-x64,
build-electron-macos,
build-tauri-windows-x64,
build-tauri-linux-x64,
build-tauri-macos
]
runs-on: ubuntu-latest
steps:
- name: Set version to environment variable
run: |
VERSION=${{ needs.get-update-version.outputs.new_version }}
VERSION="${VERSION#v}"
echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: Notify Discord
uses: Ilshidur/action-discord@master
with:
args: |
Jan-beta App version {{ VERSION }}, has been released, use the following links to download the app with faster speed or visit the Github release page for more information:
- Windows Electron: https://delta.jan.ai/beta/jan-beta-win-x64-{{ VERSION }}.exe
- macOS Electron Universal: https://delta.jan.ai/beta/jan-beta-mac-universal-{{ VERSION }}.dmg
- Linux Electron Deb: https://delta.jan.ai/beta/jan-beta-linux-amd64-{{ VERSION }}.deb
- Linux Electron AppImage: https://delta.jan.ai/beta/jan-beta-linux-x86_64-{{ VERSION }}.AppImage
- Windows Tauri Preview: https://delta.jan.ai/beta/Jan-beta_{{ VERSION }}_x64-setup-preview.exe
- macOS Taupri Preview Universal: https://delta.jan.ai/beta/Jan-beta_{{ VERSION }}_universal-preview.dmg
- Linux Tauri Preview Deb: https://delta.jan.ai/beta/Jan-beta_{{ VERSION }}_amd64-preview.deb
- Linux Tauri Preview AppImage: https://delta.jan.ai/beta/Jan-beta_{{ VERSION }}_amd64-preview.AppImage
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK_JAN_BETA }}

View File

@ -51,7 +51,7 @@ jobs:
uses: ./.github/workflows/template-get-update-version.yml
build-tauri-macos:
uses: ./.github/workflows/template-tauri-build-macos-preview.yml
uses: ./.github/workflows/template-tauri-build-macos.yml
secrets: inherit
needs: [get-update-version, set-public-provider]
with:
@ -62,7 +62,7 @@ jobs:
cortex_api_port: "39261"
build-tauri-windows-x64:
uses: ./.github/workflows/template-tauri-build-windows-x64-preview.yml
uses: ./.github/workflows/template-tauri-build-windows-x64.yml
secrets: inherit
needs: [get-update-version, set-public-provider]
with:
@ -73,7 +73,7 @@ jobs:
cortex_api_port: "39261"
build-tauri-linux-x64:
uses: ./.github/workflows/template-tauri-build-linux-x64-preview.yml
uses: ./.github/workflows/template-tauri-build-linux-x64.yml
secrets: inherit
needs: [get-update-version, set-public-provider]
with:
@ -106,6 +106,7 @@ jobs:
nightly: true
beta: false
cortex_api_port: "39261"
build-electron-linux-x64:
uses: ./.github/workflows/template-electron-build-linux-x64.yml
secrets: inherit
@ -142,9 +143,6 @@ jobs:
noti-discord-nightly-and-update-url-readme:
needs: [
build-electron-macos,
build-electron-windows-x64,
build-electron-linux-x64,
build-tauri-macos,
build-tauri-windows-x64,
build-tauri-linux-x64,
@ -184,9 +182,6 @@ jobs:
noti-discord-manual-and-update-url-readme:
needs: [
build-electron-macos,
build-electron-windows-x64,
build-electron-linux-x64,
build-tauri-macos,
build-tauri-windows-x64,
build-tauri-linux-x64,

View File

@ -65,38 +65,39 @@ jobs:
beta: false
nightly: false
new_version: ${{ needs.get-update-version.outputs.new_version }}
build-tauri-macos:
uses: ./.github/workflows/template-tauri-build-macos-preview.yml
secrets: inherit
needs: [get-update-version, create-draft-release]
with:
ref: ${{ github.ref }}
public_provider: github
channel: stable
new_version: ${{ needs.get-update-version.outputs.new_version }}
upload_url: ${{ needs.create-draft-release.outputs.upload_url }}
# build-tauri-macos:
# uses: ./.github/workflows/template-tauri-build-macos.yml
# secrets: inherit
# needs: [get-update-version, create-draft-release]
# with:
# ref: ${{ github.ref }}
# public_provider: github
# channel: stable
# new_version: ${{ needs.get-update-version.outputs.new_version }}
# upload_url: ${{ needs.create-draft-release.outputs.upload_url }}
build-tauri-windows-x64:
uses: ./.github/workflows/template-tauri-build-windows-x64-preview.yml
secrets: inherit
needs: [get-update-version, create-draft-release]
with:
ref: ${{ github.ref }}
public_provider: github
channel: stable
new_version: ${{ needs.get-update-version.outputs.new_version }}
upload_url: ${{ needs.create-draft-release.outputs.upload_url }}
# build-tauri-windows-x64:
# uses: ./.github/workflows/template-tauri-build-windows-x64.yml
# secrets: inherit
# needs: [get-update-version, create-draft-release]
# with:
# ref: ${{ github.ref }}
# public_provider: github
# channel: stable
# new_version: ${{ needs.get-update-version.outputs.new_version }}
# upload_url: ${{ needs.create-draft-release.outputs.upload_url }}
build-tauri-linux-x64:
uses: ./.github/workflows/template-tauri-build-linux-x64-preview.yml
secrets: inherit
needs: [get-update-version, create-draft-release]
with:
ref: ${{ github.ref }}
public_provider: github
channel: stable
new_version: ${{ needs.get-update-version.outputs.new_version }}
upload_url: ${{ needs.create-draft-release.outputs.upload_url }}
# build-tauri-linux-x64:
# uses: ./.github/workflows/template-tauri-build-linux-x64.yml
# secrets: inherit
# needs: [get-update-version, create-draft-release]
# with:
# ref: ${{ github.ref }}
# public_provider: github
# channel: stable
# new_version: ${{ needs.get-update-version.outputs.new_version }}
# upload_url: ${{ needs.create-draft-release.outputs.upload_url }}
update_release_draft:
needs: [

View File

@ -68,6 +68,7 @@ jobs:
new_version: ${{ needs.get-update-version.outputs.new_version }}
channel: nightly
cortex_api_port: "39261"
build-linux-x64:
uses: ./.github/workflows/template-tauri-build-linux-x64.yml
secrets: inherit

View File

@ -1,145 +0,0 @@
name: Tauri Builder - Tag
on:
push:
tags: ["v[0-9]+.[0-9]+.[0-9]+"]
jobs:
# Job create Update app version based on latest release tag with build number and save to output
get-update-version:
uses: ./.github/workflows/template-get-update-version.yml
create-draft-release:
runs-on: ubuntu-latest
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
outputs:
upload_url: ${{ steps.create_release.outputs.upload_url }}
version: ${{ steps.get_version.outputs.version }}
permissions:
contents: write
steps:
- name: Extract tag name without v prefix
id: get_version
run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV && echo "::set-output name=version::${GITHUB_REF#refs/tags/v}"
env:
GITHUB_REF: ${{ github.ref }}
- name: Create Draft Release
id: create_release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ github.ref_name }}
token: ${{ secrets.GITHUB_TOKEN }}
name: "${{ env.VERSION }}"
draft: true
prerelease: false
build-macos:
uses: ./.github/workflows/template-tauri-build-macos.yml
secrets: inherit
needs: [get-update-version, create-draft-release]
with:
ref: ${{ github.ref }}
public_provider: github
channel: stable
new_version: ${{ needs.get-update-version.outputs.new_version }}
upload_url: ${{ needs.create-draft-release.outputs.upload_url }}
build-windows-x64:
uses: ./.github/workflows/template-tauri-build-windows-x64.yml
secrets: inherit
needs: [get-update-version, create-draft-release]
with:
ref: ${{ github.ref }}
public_provider: github
channel: stable
new_version: ${{ needs.get-update-version.outputs.new_version }}
upload_url: ${{ needs.create-draft-release.outputs.upload_url }}
build-linux-x64:
uses: ./.github/workflows/template-tauri-build-linux-x64.yml
secrets: inherit
needs: [get-update-version, create-draft-release]
with:
ref: ${{ github.ref }}
public_provider: github
channel: stable
new_version: ${{ needs.get-update-version.outputs.new_version }}
upload_url: ${{ needs.create-draft-release.outputs.upload_url }}
sync-temp-to-latest:
needs: [create-draft-release, get-update-version, build-macos, build-windows-x64, build-linux-x64]
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Getting the repo
uses: actions/checkout@v3
- name: create latest.json file
run: |
VERSION=${{ needs.get-update-version.outputs.new_version }}
PUB_DATE=$(date -u +"%Y-%m-%dT%H:%M:%S.%3NZ")
LINUX_SIGNATURE="${{ needs.build-linux-x64.outputs.APPIMAGE_SIG }}"
LINUX_URL="https://github.com/menloresearch/jan/releases/download/v${{ needs.get-update-version.outputs.new_version }}/${{ needs.build-linux-x64.outputs.APPIMAGE_FILE_NAME }}"
WINDOWS_SIGNATURE="${{ needs.build-windows-x64.outputs.WIN_SIG }}"
WINDOWS_URL="https://github.com/menloresearch/jan/releases/download/v${{ needs.get-update-version.outputs.new_version }}/${{ needs.build-windows-x64.outputs.FILE_NAME }}"
DARWIN_SIGNATURE="${{ needs.build-macos.outputs.MAC_UNIVERSAL_SIG }}"
DARWIN_URL="https://github.com/menloresearch/jan/releases/download/v${{ needs.get-update-version.outputs.new_version }}/${{ needs.build-macos.outputs.TAR_NAME }}"
jq --arg version "$VERSION" \
--arg pub_date "$PUB_DATE" \
--arg linux_signature "$LINUX_SIGNATURE" \
--arg linux_url "$LINUX_URL" \
--arg windows_signature "$WINDOWS_SIGNATURE" \
--arg windows_url "$WINDOWS_URL" \
--arg darwin_arm_signature "$DARWIN_SIGNATURE" \
--arg darwin_arm_url "$DARWIN_URL" \
--arg darwin_amd_signature "$DARWIN_SIGNATURE" \
--arg darwin_amd_url "$DARWIN_URL" \
'.version = $version
| .pub_date = $pub_date
| .platforms["linux-x86_64"].signature = $linux_signature
| .platforms["linux-x86_64"].url = $linux_url
| .platforms["windows-x86_64"].signature = $windows_signature
| .platforms["windows-x86_64"].url = $windows_url
| .platforms["darwin-aarch64"].signature = $darwin_arm_signature
| .platforms["darwin-aarch64"].url = $darwin_arm_url
| .platforms["darwin-x86_64"].signature = $darwin_amd_signature
| .platforms["darwin-x86_64"].url = $darwin_amd_url' \
src-tauri/latest.json.template > latest.json
cat latest.json
- name: Upload release assert if public provider is github
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: actions/upload-release-asset@v1.0.1
with:
upload_url: ${{ needs.create-draft-release.outputs.upload_url }}
asset_path: ./latest.json
asset_name: latest.json
asset_content_type: text/json
update_release_draft:
needs: [build-macos, build-windows-x64, build-linux-x64]
permissions:
# write permission is required to create a github release
contents: write
# write permission is required for autolabeler
# otherwise, read permission is required at least
pull-requests: write
runs-on: ubuntu-latest
steps:
# (Optional) GitHub Enterprise requires GHE_HOST variable set
#- name: Set GHE_HOST
# run: |
# echo "GHE_HOST=${GITHUB_SERVER_URL##https:\/\/}" >> $GITHUB_ENV
# Drafts your next Release notes as Pull Requests are merged into "master"
- uses: release-drafter/release-drafter@v5
# (Optional) specify config name to use, relative to .github/. Default: release-drafter.yml
# with:
# config-name: my-config.yml
# disable-autolabeler: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@ -41,6 +41,7 @@ on:
jobs:
build-linux-x64:
if: inputs.public_provider == 'github' || inputs.public_provider == 'none'
runs-on: ubuntu-latest
environment: production
permissions:
@ -130,7 +131,7 @@ jobs:
env:
VERSION_TAG: ${{ inputs.new_version }}
- name: Build and publish app to aws s3 r2 or github artifactory
- name: Build and publish app to aws s3 r2 or github artifactory
if: inputs.public_provider != 'github'
run: |
# check public_provider is true or not

View File

@ -51,6 +51,7 @@ on:
jobs:
build-macos:
if: inputs.public_provider == 'github' || inputs.public_provider == 'none'
runs-on: macos-latest
environment: production
permissions:
@ -160,7 +161,7 @@ jobs:
p12-file-base64: ${{ secrets.CODE_SIGN_P12_BASE64 }}
p12-password: ${{ secrets.CODE_SIGN_P12_PASSWORD }}
- name: Build and publish app to aws s3 r2 or github artifactory
- name: Build and publish app to aws s3 r2 or github artifactory
if: inputs.public_provider != 'github'
run: |
# check public_provider is true or not

View File

@ -51,6 +51,7 @@ on:
jobs:
build-windows-x64:
if: inputs.public_provider == 'github' || inputs.public_provider == 'none'
runs-on: windows-latest
permissions:
contents: write

View File

@ -1,262 +0,0 @@
name: tauri-build-linux-x64
on:
workflow_call:
inputs:
ref:
required: true
type: string
default: 'refs/heads/main'
public_provider:
required: true
type: string
default: none
description: 'none: build only, github: build and publish to github, aws s3: build and publish to aws s3'
new_version:
required: true
type: string
default: ''
cortex_api_port:
required: false
type: string
default: ""
upload_url:
required: false
type: string
default: ''
channel:
required: true
type: string
default: 'nightly'
description: 'The channel to use for this job'
secrets:
DELTA_AWS_S3_BUCKET_NAME:
required: false
DELTA_AWS_ACCESS_KEY_ID:
required: false
DELTA_AWS_SECRET_ACCESS_KEY:
required: false
TAURI_SIGNING_PRIVATE_KEY:
required: false
TAURI_SIGNING_PRIVATE_KEY_PASSWORD:
required: false
TAURI_SIGNING_PUBLIC_KEY:
required: false
outputs:
DEB_SIG:
value: ${{ jobs.build-linux-x64.outputs.DEB_SIG }}
APPIMAGE_SIG:
value: ${{ jobs.build-linux-x64.outputs.APPIMAGE_SIG }}
APPIMAGE_FILE_NAME:
value: ${{ jobs.build-linux-x64.outputs.APPIMAGE_FILE_NAME }}
jobs:
build-linux-x64:
runs-on: ubuntu-22.04
outputs:
DEB_SIG: ${{ steps.packageinfo.outputs.DEB_SIG }}
APPIMAGE_SIG: ${{ steps.packageinfo.outputs.APPIMAGE_SIG }}
APPIMAGE_FILE_NAME: ${{ steps.packageinfo.outputs.APPIMAGE_FILE_NAME }}
environment: production
permissions:
contents: write
steps:
- name: Getting the repo
uses: actions/checkout@v3
with:
ref: ${{ inputs.ref }}
- name: Free Disk Space Before Build
run: |
echo "Disk space before cleanup:"
df -h
sudo rm -rf /usr/local/.ghcup
sudo rm -rf /opt/hostedtoolcache/CodeQL
sudo rm -rf /usr/local/lib/android/sdk/ndk
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/ghc
sudo rm -rf /usr/local/share/boost
sudo apt-get clean
echo "Disk space after cleanup:"
df -h
- name: Replace Icons for Beta Build
if: inputs.channel != 'stable'
shell: bash
run: |
cp .github/scripts/icon-${{ inputs.channel }}.png src-tauri/icons/icon.png
- name: Installing node
uses: actions/setup-node@v1
with:
node-version: 20
- name: Install jq
uses: dcarbone/install-jq-action@v2.0.1
- name: Install ctoml
run: |
cargo install ctoml
- name: Install Tauri dependecies
run: |
sudo apt update
sudo apt install -y libglib2.0-dev libatk1.0-dev libpango1.0-dev libgtk-3-dev libsoup-3.0-dev libwebkit2gtk-4.1-dev librsvg2-dev libfuse2
- name: Update app version base public_provider
run: |
echo "Version: ${{ inputs.new_version }}"
# Update tauri.conf.json
jq --arg version "${{ inputs.new_version }}" '.version = $version | .bundle.createUpdaterArtifacts = true | .bundle.resources = ["resources/themes/**/*", "resources/pre-install/**/*"] | .bundle.externalBin = ["binaries/cortex-server", "resources/bin/uv"]' ./src-tauri/tauri.conf.json > /tmp/tauri.conf.json
mv /tmp/tauri.conf.json ./src-tauri/tauri.conf.json
if [ "${{ inputs.channel }}" != "stable" ]; then
jq '.bundle.linux.deb.files = {"usr/bin/bun": "resources/bin/bun", "usr/lib/Jan-${{ inputs.channel }}/binaries/engines": "binaries/engines"}' ./src-tauri/tauri.conf.json > /tmp/tauri.conf.json
else
jq '.bundle.linux.deb.files = {"usr/bin/bun": "resources/bin/bun", "usr/lib/Jan/binaries/engines": "binaries/engines"}' ./src-tauri/tauri.conf.json > /tmp/tauri.conf.json
fi
mv /tmp/tauri.conf.json ./src-tauri/tauri.conf.json
jq --arg version "${{ inputs.new_version }}" '.version = $version' web/package.json > /tmp/package.json
mv /tmp/package.json web/package.json
ctoml ./src-tauri/Cargo.toml package.version "${{ inputs.new_version }}"
cat ./src-tauri/Cargo.toml
# Change app name for beta and nightly builds
if [ "${{ inputs.channel }}" != "stable" ]; then
jq '.plugins.updater.endpoints = ["https://delta.jan.ai/${{ inputs.channel }}/latest.json"]' ./src-tauri/tauri.conf.json > /tmp/tauri.conf.json
mv /tmp/tauri.conf.json ./src-tauri/tauri.conf.json
chmod +x .github/scripts/rename-tauri-app.sh
.github/scripts/rename-tauri-app.sh ./src-tauri/tauri.conf.json ${{ inputs.channel }}
cat ./src-tauri/tauri.conf.json
# Update Cargo.toml
ctoml ./src-tauri/Cargo.toml package.name "Jan-${{ inputs.channel }}"
echo "------------------"
cat ./src-tauri/Cargo.toml
chmod +x .github/scripts/rename-workspace.sh
.github/scripts/rename-workspace.sh ./package.json ${{ inputs.channel }}
cat ./package.json
fi
- name: Build app
run: |
make build-tauri
# Copy engines and bun to appimage
wget https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage -O ./appimagetool
chmod +x ./appimagetool
if [ "${{ inputs.channel }}" != "stable" ]; then
cp ./src-tauri/resources/bin/bun ./src-tauri/target/release/bundle/appimage/Jan-${{ inputs.channel }}.AppDir/usr/bin/bun
cp -rf ./src-tauri/binaries/engines ./src-tauri/target/release/bundle/appimage/Jan-${{ inputs.channel }}.AppDir/usr/lib/Jan-${{ inputs.channel }}/engines
./appimagetool ./src-tauri/target/release/bundle/appimage/Jan-${{ inputs.channel }}.AppDir $(ls ./src-tauri/target/release/bundle/appimage/ | grep AppImage)
else
cp ./src-tauri/resources/bin/bun ./src-tauri/target/release/bundle/appimage/Jan.AppDir/usr/bin/bun
cp -rf ./src-tauri/binaries/engines ./src-tauri/target/release/bundle/appimage/Jan.AppDir/usr/lib/Jan/engines
./appimagetool ./src-tauri/target/release/bundle/appimage/Jan.AppDir $(ls ./src-tauri/target/release/bundle/appimage/ | grep AppImage)
fi
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
POSTHOG_KEY: ${{ secrets.POSTHOG_KEY }}
POSTHOG_HOST: ${{ secrets.POSTHOG_HOST }}
# CORTEX_API_PORT: ${{ inputs.cortex_api_port }}
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}
TAURI_SIGNING_PUBLIC_KEY: ${{ secrets.TAURI_SIGNING_PUBLIC_KEY }}
# Publish app
## Artifacts, for dev and test
- name: Upload Artifact
if: inputs.public_provider != 'github'
uses: actions/upload-artifact@v4
with:
name: jan-${{ inputs.channel }}-tauri-linux-amd64-${{ inputs.new_version }}-deb
path: ./src-tauri/target/release/bundle/deb/*.deb
- name: Upload Artifact
if: inputs.public_provider != 'github'
uses: actions/upload-artifact@v4
with:
name: jan-tauri-linux-amd64-${{ inputs.new_version }}-AppImage
path: ./src-tauri/target/release/bundle/appimage/*.AppImage
## create zip file and latest-linux.yml for linux electron auto updater
- name: Create zip file and latest-linux.yml for linux electron auto updater
id: packageinfo
run: |
cd ./src-tauri/target/release/bundle
if [ "${{ inputs.channel }}" != "stable" ]; then
DEB_FILE_NAME=Jan-${{ inputs.channel }}_${{ inputs.new_version }}_amd64.deb
APPIMAGE_FILE_NAME=Jan-${{ inputs.channel }}_${{ inputs.new_version }}_amd64.AppImage
DEB_SIG=$(cat deb/Jan-${{ inputs.channel }}_${{ inputs.new_version }}_amd64.deb.sig)
APPIMAGE_SIG=$(cat appimage/Jan-${{ inputs.channel }}_${{ inputs.new_version }}_amd64.AppImage.sig)
else
DEB_FILE_NAME=Jan_${{ inputs.new_version }}_amd64.deb
APPIMAGE_FILE_NAME=Jan_${{ inputs.new_version }}_amd64.AppImage
DEB_SIG=$(cat deb/Jan_${{ inputs.new_version }}_amd64.deb.sig)
APPIMAGE_SIG=$(cat appimage/Jan_${{ inputs.new_version }}_amd64.AppImage.sig)
fi
echo "DEB_SIG=$DEB_SIG" >> $GITHUB_OUTPUT
echo "APPIMAGE_SIG=$APPIMAGE_SIG" >> $GITHUB_OUTPUT
echo "DEB_FILE_NAME=$DEB_FILE_NAME" >> $GITHUB_OUTPUT
echo "APPIMAGE_FILE_NAME=$APPIMAGE_FILE_NAME" >> $GITHUB_OUTPUT
## Upload to s3 for nightly and beta
- name: upload to aws s3 if public provider is aws
if: inputs.public_provider == 'aws-s3' || inputs.channel == 'beta' || inputs.channel == 'nightly'
run: |
cd ./src-tauri/target/release/bundle
# Upload for tauri updater
aws s3 cp ./deb/Jan-${{ inputs.channel }}_${{ inputs.new_version }}_amd64.deb s3://${{ secrets.DELTA_AWS_S3_BUCKET_NAME }}/temp-${{ inputs.channel }}/Jan-${{ inputs.channel }}_${{ inputs.new_version }}_amd64-preview.deb
aws s3 cp ./appimage/Jan-${{ inputs.channel }}_${{ inputs.new_version }}_amd64.AppImage s3://${{ secrets.DELTA_AWS_S3_BUCKET_NAME }}/temp-${{ inputs.channel }}/Jan-${{ inputs.channel }}_${{ inputs.new_version }}_amd64-preview.AppImage
env:
AWS_ACCESS_KEY_ID: ${{ secrets.DELTA_AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.DELTA_AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: ${{ secrets.DELTA_AWS_REGION }}
AWS_EC2_METADATA_DISABLED: "true"
## Upload to github release for stable release
- name: Upload release assert if public provider is github
if: inputs.channel == 'stable'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: actions/upload-release-asset@v1.0.1
with:
upload_url: ${{ inputs.upload_url }}
asset_path: ./src-tauri/target/release/bundle/latest-linux.yml
asset_name: latest-linux.yml
asset_content_type: text/yaml
- name: Upload release assert if public provider is github
if: inputs.channel == 'beta'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: actions/upload-release-asset@v1.0.1
with:
upload_url: ${{ inputs.upload_url }}
asset_path: ./src-tauri/target/release/bundle/beta-linux.yml
asset_name: beta-linux.yml
asset_content_type: text/yaml
- name: Upload release assert if public provider is github
if: inputs.public_provider == 'github'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: actions/upload-release-asset@v1.0.1
with:
upload_url: ${{ inputs.upload_url }}
asset_path: ./src-tauri/target/release/bundle/appimage/${{ steps.packageinfo.outputs.APPIMAGE_FILE_NAME }}
asset_name: ${{ steps.packageinfo.outputs.APPIMAGE_FILE_NAME }}
asset_content_type: application/octet-stream
- name: Upload release assert if public provider is github
if: inputs.public_provider == 'github'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: actions/upload-release-asset@v1.0.1
with:
upload_url: ${{ inputs.upload_url }}
asset_path: ./src-tauri/target/release/bundle/deb/${{ steps.packageinfo.outputs.DEB_FILE_NAME }}
asset_name: ${{ steps.packageinfo.outputs.DEB_FILE_NAME }}
asset_content_type: application/octet-stream

View File

@ -1,282 +0,0 @@
name: tauri-build-macos
on:
workflow_call:
inputs:
ref:
required: true
type: string
default: 'refs/heads/main'
public_provider:
required: true
type: string
default: none
description: 'none: build only, github: build and publish to github, aws s3: build and publish to aws s3'
new_version:
required: true
type: string
default: ''
cortex_api_port:
required: false
type: string
default: ""
upload_url:
required: false
type: string
default: ''
channel:
required: true
type: string
default: 'nightly'
description: 'The channel to use for this job'
secrets:
DELTA_AWS_S3_BUCKET_NAME:
required: false
DELTA_AWS_ACCESS_KEY_ID:
required: false
DELTA_AWS_SECRET_ACCESS_KEY:
required: false
CODE_SIGN_P12_BASE64:
required: false
CODE_SIGN_P12_PASSWORD:
required: false
APPLE_ID:
required: false
APPLE_APP_SPECIFIC_PASSWORD:
required: false
DEVELOPER_ID:
required: false
TAURI_SIGNING_PRIVATE_KEY:
required: false
TAURI_SIGNING_PRIVATE_KEY_PASSWORD:
required: false
TAURI_SIGNING_PUBLIC_KEY:
required: false
outputs:
MAC_UNIVERSAL_SIG:
value: ${{ jobs.build-macos.outputs.MAC_UNIVERSAL_SIG }}
TAR_NAME:
value: ${{ jobs.build-macos.outputs.TAR_NAME }}
jobs:
build-macos:
runs-on: macos-latest
outputs:
MAC_UNIVERSAL_SIG: ${{ steps.metadata.outputs.MAC_UNIVERSAL_SIG }}
TAR_NAME: ${{ steps.metadata.outputs.TAR_NAME }}
environment: production
permissions:
contents: write
steps:
- name: Getting the repo
uses: actions/checkout@v3
with:
ref: ${{ inputs.ref }}
- name: Replace Icons for Beta Build
if: inputs.channel != 'stable'
shell: bash
run: |
cp .github/scripts/icon-${{ inputs.channel }}.png src-tauri/icons/icon.png
- name: Installing node
uses: actions/setup-node@v1
with:
node-version: 20
- name: Install jq
uses: dcarbone/install-jq-action@v2.0.1
- name: Install ctoml
run: |
cargo install ctoml
- name: Create bun and uv universal
run: |
mkdir -p ./src-tauri/resources/bin/
cd ./src-tauri/resources/bin/
curl -L -o bun-darwin-x64.zip https://github.com/oven-sh/bun/releases/download/bun-v1.2.10/bun-darwin-x64.zip
curl -L -o bun-darwin-aarch64.zip https://github.com/oven-sh/bun/releases/download/bun-v1.2.10/bun-darwin-aarch64.zip
unzip bun-darwin-x64.zip
unzip bun-darwin-aarch64.zip
lipo -create -output bun-universal-apple-darwin bun-darwin-x64/bun bun-darwin-aarch64/bun
cp -f bun-darwin-aarch64/bun bun-aarch64-apple-darwin
cp -f bun-darwin-x64/bun bun-x86_64-apple-darwin
cp -f bun-universal-apple-darwin bun
curl -L -o uv-x86_64.tar.gz https://github.com/astral-sh/uv/releases/download/0.6.17/uv-x86_64-apple-darwin.tar.gz
curl -L -o uv-arm64.tar.gz https://github.com/astral-sh/uv/releases/download/0.6.17/uv-aarch64-apple-darwin.tar.gz
tar -xzf uv-x86_64.tar.gz
tar -xzf uv-arm64.tar.gz
mv uv-x86_64-apple-darwin uv-x86_64
mv uv-aarch64-apple-darwin uv-aarch64
lipo -create -output uv-universal-apple-darwin uv-x86_64/uv uv-aarch64/uv
cp -f uv-x86_64/uv uv-x86_64-apple-darwin
cp -f uv-aarch64/uv uv-aarch64-apple-darwin
cp -f uv-universal-apple-darwin uv
ls -la
- name: Update app version based on latest release tag with build number
run: |
echo "Version: ${{ inputs.new_version }}"
# Update tauri.conf.json
jq --arg version "${{ inputs.new_version }}" '.version = $version | .bundle.createUpdaterArtifacts = true' ./src-tauri/tauri.conf.json > /tmp/tauri.conf.json
mv /tmp/tauri.conf.json ./src-tauri/tauri.conf.json
jq --arg version "${{ inputs.new_version }}" '.version = $version' web/package.json > /tmp/package.json
mv /tmp/package.json web/package.json
ctoml ./src-tauri/Cargo.toml package.version "${{ inputs.new_version }}"
cat ./src-tauri/Cargo.toml
# Change app name for beta and nightly builds
if [ "${{ inputs.channel }}" != "stable" ]; then
jq '.plugins.updater.endpoints = ["https://delta.jan.ai/${{ inputs.channel }}/latest.json"]' ./src-tauri/tauri.conf.json > /tmp/tauri.conf.json
mv /tmp/tauri.conf.json ./src-tauri/tauri.conf.json
chmod +x .github/scripts/rename-tauri-app.sh
.github/scripts/rename-tauri-app.sh ./src-tauri/tauri.conf.json ${{ inputs.channel }}
cat ./src-tauri/tauri.conf.json
# Update Cargo.toml
ctoml ./src-tauri/Cargo.toml package.name "Jan-${{ inputs.channel }}"
echo "------------------"
cat ./src-tauri/Cargo.toml
chmod +x .github/scripts/rename-workspace.sh
.github/scripts/rename-workspace.sh ./package.json ${{ inputs.channel }}
cat ./package.json
fi
- name: Get key for notarize
run: base64 -d <<< "$NOTARIZE_P8_BASE64" > /tmp/notary-key.p8
shell: bash
env:
NOTARIZE_P8_BASE64: ${{ secrets.NOTARIZE_P8_BASE64 }}
- uses: apple-actions/import-codesign-certs@v2
continue-on-error: true
with:
p12-file-base64: ${{ secrets.CODE_SIGN_P12_BASE64 }}
p12-password: ${{ secrets.CODE_SIGN_P12_PASSWORD }}
- name: Build app
run: |
rustup target add x86_64-apple-darwin
make build-tauri
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
APP_PATH: '.'
POSTHOG_KEY: ${{ secrets.POSTHOG_KEY }}
POSTHOG_HOST: ${{ secrets.POSTHOG_HOST }}
# CORTEX_API_PORT: ${{ inputs.cortex_api_port }}
APPLE_CERTIFICATE: ${{ secrets.CODE_SIGN_P12_BASE64 }}
APPLE_CERTIFICATE_PASSWORD: ${{ secrets.CODE_SIGN_P12_PASSWORD }}
APPLE_API_ISSUER: ${{ secrets.NOTARY_ISSUER }}
APPLE_API_KEY: ${{ secrets.NOTARY_KEY_ID }}
APPLE_API_KEY_PATH: /tmp/notary-key.p8
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}
TAURI_SIGNING_PUBLIC_KEY: ${{ secrets.TAURI_SIGNING_PUBLIC_KEY }}
# Publish app
## Artifacts, for dev and test
- name: Upload Artifact
if: inputs.public_provider != 'github'
uses: actions/upload-artifact@v4
with:
name: jan-${{ inputs.channel }}-tauri-mac-universal-${{ inputs.new_version }}.dmg
path: |
./src-tauri/target/universal-apple-darwin/release/bundle/dmg/*.dmg
## create zip file and latest-mac.yml for mac electron auto updater
- name: create zip file and latest-mac.yml for mac electron auto updater
run: |
cd ./src-tauri/target/universal-apple-darwin/release/bundle/macos
if [ "${{ inputs.channel }}" != "stable" ]; then
zip -r jan-${{ inputs.channel }}-mac-universal-${{ inputs.new_version }}.zip Jan-${{ inputs.channel }}.app
FILE_NAME=jan-${{ inputs.channel }}-mac-universal-${{ inputs.new_version }}.zip
DMG_NAME=Jan-${{ inputs.channel }}_${{ inputs.new_version }}_universal.dmg
MAC_UNIVERSAL_SIG=$(cat Jan-${{ inputs.channel }}.app.tar.gz.sig)
TAR_NAME=Jan-${{ inputs.channel }}.app.tar.gz
else
zip -r jan-mac-universal-${{ inputs.new_version }}.zip Jan.app
FILE_NAME=jan-mac-universal-${{ inputs.new_version }}.zip
MAC_UNIVERSAL_SIG=$(cat Jan.app.tar.gz.sig)
DMG_NAME=Jan_${{ inputs.new_version }}_universal.dmg
TAR_NAME=Jan.app.tar.gz
fi
echo "::set-output name=MAC_UNIVERSAL_SIG::$MAC_UNIVERSAL_SIG"
echo "::set-output name=FILE_NAME::$FILE_NAME"
echo "::set-output name=DMG_NAME::$DMG_NAME"
echo "::set-output name=TAR_NAME::$TAR_NAME"
id: metadata
## Upload to s3 for nightly and beta
- name: upload to aws s3 if public provider is aws
if: inputs.public_provider == 'aws-s3' || inputs.channel == 'beta' || inputs.channel == 'nightly'
run: |
cd ./src-tauri/target/universal-apple-darwin/release/bundle
# Upload for tauri updater
aws s3 cp ./dmg/Jan-${{ inputs.channel }}_${{ inputs.new_version }}_universal.dmg s3://${{ secrets.DELTA_AWS_S3_BUCKET_NAME }}/temp-${{ inputs.channel }}/Jan-${{ inputs.channel }}_${{ inputs.new_version }}_universal-preview.dmg
aws s3 cp ./macos/Jan-${{ inputs.channel }}.app.tar.gz s3://${{ secrets.DELTA_AWS_S3_BUCKET_NAME }}/temp-${{ inputs.channel }}/Jan-${{ inputs.channel }}_${{ inputs.new_version }}-preview.app.tar.gz
env:
AWS_ACCESS_KEY_ID: ${{ secrets.DELTA_AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.DELTA_AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: ${{ secrets.DELTA_AWS_REGION }}
AWS_EC2_METADATA_DISABLED: "true"
## Upload to github release for stable release
- name: Upload release assert if public provider is github
if: inputs.channel == 'stable'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: actions/upload-release-asset@v1.0.1
with:
upload_url: ${{ inputs.upload_url }}
asset_path: ./src-tauri/target/universal-apple-darwin/release/bundle/macos/latest-mac.yml
asset_name: latest-mac.yml
asset_content_type: text/yaml
- name: Upload release assert if public provider is github
if: inputs.channel == 'beta'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: actions/upload-release-asset@v1.0.1
with:
upload_url: ${{ inputs.upload_url }}
asset_path: ./src-tauri/target/universal-apple-darwin/release/bundle/macos/beta-mac.yml
asset_name: beta-mac.yml
asset_content_type: text/yaml
- name: Upload release assert if public provider is github
if: inputs.public_provider == 'github'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: actions/upload-release-asset@v1.0.1
with:
upload_url: ${{ inputs.upload_url }}
asset_path: ./src-tauri/target/universal-apple-darwin/release/bundle/macos/${{ steps.metadata.outputs.FILE_NAME }}
asset_name: ${{ steps.metadata.outputs.FILE_NAME }}
asset_content_type: application/gzip
- name: Upload release assert if public provider is github
if: inputs.public_provider == 'github'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: actions/upload-release-asset@v1.0.1
with:
upload_url: ${{ inputs.upload_url }}
asset_path: ./src-tauri/target/universal-apple-darwin/release/bundle/dmg/${{ steps.metadata.outputs.DMG_NAME }}
asset_name: ${{ steps.metadata.outputs.DMG_NAME }}
asset_content_type: application/octet-stream
- name: Upload release assert if public provider is github
if: inputs.public_provider == 'github'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: actions/upload-release-asset@v1.0.1
with:
upload_url: ${{ inputs.upload_url }}
asset_path: ./src-tauri/target/universal-apple-darwin/release/bundle/macos/${{ steps.metadata.outputs.TAR_NAME }}
asset_name: ${{ steps.metadata.outputs.TAR_NAME }}
asset_content_type: application/gzip

View File

@ -1,259 +0,0 @@
name: tauri-build-windows-x64
on:
workflow_call:
inputs:
ref:
required: true
type: string
default: "refs/heads/main"
public_provider:
required: true
type: string
default: none
description: "none: build only, github: build and publish to github, aws s3: build and publish to aws s3"
new_version:
required: true
type: string
default: ''
cortex_api_port:
required: false
type: string
default: ""
upload_url:
required: false
type: string
default: ''
channel:
required: true
type: string
default: 'nightly'
description: 'The channel to use for this job'
secrets:
DELTA_AWS_S3_BUCKET_NAME:
required: false
DELTA_AWS_ACCESS_KEY_ID:
required: false
DELTA_AWS_SECRET_ACCESS_KEY:
required: false
AZURE_KEY_VAULT_URI:
required: false
AZURE_CLIENT_ID:
required: false
AZURE_TENANT_ID:
required: false
AZURE_CLIENT_SECRET:
required: false
AZURE_CERT_NAME:
required: false
TAURI_SIGNING_PRIVATE_KEY:
required: false
TAURI_SIGNING_PRIVATE_KEY_PASSWORD:
required: false
TAURI_SIGNING_PUBLIC_KEY:
required: false
outputs:
WIN_SIG:
value: ${{ jobs.build-windows-x64.outputs.WIN_SIG }}
FILE_NAME:
value: ${{ jobs.build-windows-x64.outputs.FILE_NAME }}
jobs:
build-windows-x64:
runs-on: windows-latest
outputs:
WIN_SIG: ${{ steps.metadata.outputs.WIN_SIG }}
FILE_NAME: ${{ steps.metadata.outputs.FILE_NAME }}
permissions:
contents: write
steps:
- name: Getting the repo
uses: actions/checkout@v3
with:
ref: ${{ inputs.ref }}
- name: Replace Icons for Beta Build
if: inputs.channel != 'stable'
shell: bash
run: |
cp .github/scripts/icon-${{ inputs.channel }}.png src-tauri/icons/icon.png
- name: Installing node
uses: actions/setup-node@v1
with:
node-version: 20
- name: Install jq
uses: dcarbone/install-jq-action@v2.0.1
- name: Install ctoml
run: |
cargo install ctoml
- name: Update app version base on tag
id: version_update
shell: bash
run: |
echo "Version: ${{ inputs.new_version }}"
# Update tauri.conf.json
jq --arg version "${{ inputs.new_version }}" '.version = $version | .bundle.createUpdaterArtifacts = true' ./src-tauri/tauri.conf.json > /tmp/tauri.conf.json
mv /tmp/tauri.conf.json ./src-tauri/tauri.conf.json
jq --arg version "${{ inputs.new_version }}" '.version = $version' web/package.json > /tmp/package.json
mv /tmp/package.json web/package.json
ctoml ./src-tauri/Cargo.toml package.version "${{ inputs.new_version }}"
cat ./src-tauri/Cargo.toml
generate_build_version() {
### Examble
### input 0.5.6 output will be 0.5.6 and 0.5.6.0
### input 0.5.6-rc2-beta output will be 0.5.6 and 0.5.6.2
### input 0.5.6-1213 output will be 0.5.6 and and 0.5.6.1213
local new_version="$1"
local base_version
local t_value
# Check if it has a "-"
if [[ "$new_version" == *-* ]]; then
base_version="${new_version%%-*}" # part before -
suffix="${new_version#*-}" # part after -
# Check if it is rcX-beta
if [[ "$suffix" =~ ^rc([0-9]+)-beta$ ]]; then
t_value="${BASH_REMATCH[1]}"
else
t_value="$suffix"
fi
else
base_version="$new_version"
t_value="0"
fi
# Export two values
new_base_version="$base_version"
new_build_version="${base_version}.${t_value}"
}
generate_build_version ${{ inputs.new_version }}
sed -i "s/jan_version/$new_base_version/g" ./src-tauri/tauri.bundle.windows.nsis.template
sed -i "s/jan_build/$new_build_version/g" ./src-tauri/tauri.bundle.windows.nsis.template
echo "------------------"
cat ./src-tauri/tauri.bundle.windows.nsis.template
# Change app name for beta and nightly builds
if [ "${{ inputs.channel }}" != "stable" ]; then
jq '.plugins.updater.endpoints = ["https://delta.jan.ai/${{ inputs.channel }}/latest.json"]' ./src-tauri/tauri.conf.json > /tmp/tauri.conf.json
mv /tmp/tauri.conf.json ./src-tauri/tauri.conf.json
chmod +x .github/scripts/rename-tauri-app.sh
.github/scripts/rename-tauri-app.sh ./src-tauri/tauri.conf.json ${{ inputs.channel }}
cat ./src-tauri/tauri.conf.json
# Update Cargo.toml
ctoml ./src-tauri/Cargo.toml package.name "Jan-${{ inputs.channel }}"
echo "------------------"
cat ./src-tauri/Cargo.toml
chmod +x .github/scripts/rename-workspace.sh
.github/scripts/rename-workspace.sh ./package.json ${{ inputs.channel }}
cat ./package.json
sed -i "s/jan_productname/Jan-${{ inputs.channel }}/g" ./src-tauri/tauri.bundle.windows.nsis.template
sed -i "s/jan_mainbinaryname/jan-${{ inputs.channel }}/g" ./src-tauri/tauri.bundle.windows.nsis.template
fi
- name: Install AzureSignTool
run: |
dotnet tool install --global --version 6.0.0 AzureSignTool
- name: Build app
shell: bash
run: |
make build-tauri
env:
AZURE_KEY_VAULT_URI: ${{ secrets.AZURE_KEY_VAULT_URI }}
AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }}
AZURE_CERT_NAME: ${{ secrets.AZURE_CERT_NAME }}
AWS_ACCESS_KEY_ID: ${{ secrets.DELTA_AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.DELTA_AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: auto
AWS_EC2_METADATA_DISABLED: "true"
AWS_MAX_ATTEMPTS: "5"
POSTHOG_KEY: ${{ secrets.POSTHOG_KEY }}
POSTHOG_HOST: ${{ secrets.POSTHOG_HOST }}
# CORTEX_API_PORT: ${{ inputs.cortex_api_port }}
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}
TAURI_SIGNING_PUBLIC_KEY: ${{ secrets.TAURI_SIGNING_PUBLIC_KEY }}
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: jan-${{ inputs.channel }}-tauri-windows-${{ inputs.new_version }}
path: |
./src-tauri/target/release/bundle/nsis/*.exe
## create zip file and latest.yml for windows electron auto updater
- name: create zip file and latest.yml for windows electron auto updater
shell: bash
run: |
cd ./src-tauri/target/release/bundle/nsis
if [ "${{ inputs.channel }}" != "stable" ]; then
FILE_NAME=Jan-${{ inputs.channel }}_${{ inputs.new_version }}_x64-setup.exe
WIN_SIG=$(cat Jan-${{ inputs.channel }}_${{ inputs.new_version }}_x64-setup.exe.sig)
else
FILE_NAME=Jan_${{ inputs.new_version }}_x64-setup.exe
WIN_SIG=$(cat Jan_${{ inputs.new_version }}_x64-setup.exe.sig)
fi
echo "::set-output name=WIN_SIG::$WIN_SIG"
echo "::set-output name=FILE_NAME::$FILE_NAME"
id: metadata
## Upload to s3 for nightly and beta
- name: upload to aws s3 if public provider is aws
shell: bash
if: inputs.public_provider == 'aws-s3' || inputs.channel == 'beta' || inputs.channel == 'nightly'
run: |
cd ./src-tauri/target/release/bundle/nsis
aws s3 cp ./Jan-${{ inputs.channel }}_${{ inputs.new_version }}_x64-setup.exe s3://${{ secrets.DELTA_AWS_S3_BUCKET_NAME }}/temp-${{ inputs.channel }}/Jan-${{ inputs.channel }}_${{ inputs.new_version }}_x64-setup-preview.exe
env:
AWS_ACCESS_KEY_ID: ${{ secrets.DELTA_AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.DELTA_AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: ${{ secrets.DELTA_AWS_REGION }}
AWS_EC2_METADATA_DISABLED: "true"
## Upload to github release for stable release
- name: Upload release assert if public provider is github
if: inputs.channel == 'stable'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: actions/upload-release-asset@v1.0.1
with:
upload_url: ${{ inputs.upload_url }}
asset_path: ./src-tauri/target/release/bundle/nsis/latest.yml
asset_name: latest.yml
asset_content_type: text/yaml
- name: Upload release assert if public provider is github
if: inputs.channel == 'beta'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: actions/upload-release-asset@v1.0.1
with:
upload_url: ${{ inputs.upload_url }}
asset_path: ./src-tauri/target/release/bundle/nsis/beta.yml
asset_name: beta.yml
asset_content_type: text/yaml
- name: Upload release assert if public provider is github
if: inputs.public_provider == 'github'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: actions/upload-release-asset@v1.0.1
with:
upload_url: ${{ inputs.upload_url }}
asset_path: ./src-tauri/target/release/bundle/nsis/${{ steps.metadata.outputs.FILE_NAME }}
asset_name: ${{ steps.metadata.outputs.FILE_NAME }}
asset_content_type: application/octet-stream

View File

@ -95,12 +95,13 @@ jobs:
run: |
echo "Version: ${{ inputs.new_version }}"
# Update tauri.conf.json
jq --arg version "${{ inputs.new_version }}" '.version = $version | .bundle.createUpdaterArtifacts = true' ./src-tauri/tauri.conf.json > /tmp/tauri.conf.json
jq --arg version "${{ inputs.new_version }}" '.version = $version | .bundle.createUpdaterArtifacts = true | .bundle.windows.nsis.template = "tauri.bundle.windows.nsis.template"' ./src-tauri/tauri.conf.json > /tmp/tauri.conf.json
mv /tmp/tauri.conf.json ./src-tauri/tauri.conf.json
jq --arg version "${{ inputs.new_version }}" '.version = $version' web/package.json > /tmp/package.json
mv /tmp/package.json web/package.json
ctoml ./src-tauri/Cargo.toml package.version "${{ inputs.new_version }}"
echo "---------Cargo.toml---------"
cat ./src-tauri/Cargo.toml
generate_build_version() {
@ -134,9 +135,7 @@ jobs:
}
generate_build_version ${{ inputs.new_version }}
sed -i "s/jan_version/$new_base_version/g" ./src-tauri/tauri.bundle.windows.nsis.template
sed -i "s/jan_build/$new_build_version/g" ./src-tauri/tauri.bundle.windows.nsis.template
echo "------------------"
cat ./src-tauri/tauri.bundle.windows.nsis.template
sed -i "s/jan_build/$new_build_version/g" ./src-tauri/tauri.bundle.windows.nsis.template
# Change app name for beta and nightly builds
if [ "${{ inputs.channel }}" != "stable" ]; then
@ -146,6 +145,7 @@ jobs:
chmod +x .github/scripts/rename-tauri-app.sh
.github/scripts/rename-tauri-app.sh ./src-tauri/tauri.conf.json ${{ inputs.channel }}
echo "---------tauri.conf.json---------"
cat ./src-tauri/tauri.conf.json
# Update Cargo.toml
@ -160,6 +160,8 @@ jobs:
sed -i "s/jan_productname/Jan-${{ inputs.channel }}/g" ./src-tauri/tauri.bundle.windows.nsis.template
sed -i "s/jan_mainbinaryname/jan-${{ inputs.channel }}/g" ./src-tauri/tauri.bundle.windows.nsis.template
fi
echo "---------nsis.template---------"
cat ./src-tauri/tauri.bundle.windows.nsis.template
- name: Install AzureSignTool
run: |

View File

@ -4,7 +4,7 @@ set CORTEX_VERSION=1.0.13-rc6
set ENGINE_VERSION=b5371
set ENGINE_DOWNLOAD_URL=https://github.com/menloresearch/llama.cpp/releases/download/%ENGINE_VERSION%/llama-%ENGINE_VERSION%-bin-win
set ENGINE_DOWNLOAD_GGML_URL=https://github.com/ggml-org/llama.cpp/releases/download/%ENGINE_VERSION%/llama-%ENGINE_VERSION%-bin-win
set CUDA_DOWNLOAD_URL=https://github.com/menloresearch/cortex.llamacpp/releases/download/v%ENGINE_VERSION%
set CUDA_DOWNLOAD_URL=https://github.com/menloresearch/llama.cpp/releases/download/%ENGINE_VERSION%
@REM set SUBFOLDERS=windows-amd64-noavx-cuda-12-0 windows-amd64-noavx-cuda-11-7 windows-amd64-avx2-cuda-12-0 windows-amd64-avx2-cuda-11-7 windows-amd64-noavx windows-amd64-avx windows-amd64-avx2 windows-amd64-avx512 windows-amd64-vulkan
set BIN_PATH="./"
set DOWNLOAD_TOOL=..\..\extensions\inference-cortex-extension\node_modules\.bin\download
@ -12,7 +12,7 @@ set DOWNLOAD_TOOL=..\..\extensions\inference-cortex-extension\node_modules\.bin\
@REM Download llama.cpp binaries
call %DOWNLOAD_TOOL% -e --strip 1 -o %BIN_PATH% https://github.com/menloresearch/cortex.cpp/releases/download/v%CORTEX_VERSION%/cortex-%CORTEX_VERSION%-windows-amd64.tar.gz
call %DOWNLOAD_TOOL% %ENGINE_DOWNLOAD_URL%-avx2-cuda-cu12.0-x64.tar.gz -e --strip 2 -o./engines/llama.cpp/win-avx2-cuda-cu12.0-x64/%ENGINE_VERSION%
call %DOWNLOAD_TOOL% %ENGINE_DOWNLOAD_URL%-avx2-cuda-cu11.7-x64.tar.gz -e --strip 2 -o./engines/llama.cpp/win-avx2-cuda-cu11.7-x64/%ENGINE_VERSION%
@REM call %DOWNLOAD_TOOL% %ENGINE_DOWNLOAD_URL%-avx2-cuda-cu11.7-x64.tar.gz -e --strip 2 -o./engines/llama.cpp/win-avx2-cuda-cu11.7-x64/%ENGINE_VERSION%
@REM call %DOWNLOAD_TOOL% %ENGINE_DOWNLOAD_URL%-noavx-cuda-cu12.0-x64.tar.gz -e --strip 2 -o./engines/llama.cpp/win-noavx-cuda-cu12.0-x64/%ENGINE_VERSION%
@REM call %DOWNLOAD_TOOL% %ENGINE_DOWNLOAD_URL%-noavx-cuda-cu11.7-x64.tar.gz -e --strip 2 -o./engines/llama.cpp/win-noavx-cuda-cu11.7-x64/%ENGINE_VERSION%
call %DOWNLOAD_TOOL% %ENGINE_DOWNLOAD_URL%-noavx-x64.tar.gz -e --strip 2 -o./engines/llama.cpp/win-noavx-x64/%ENGINE_VERSION%
@ -21,7 +21,7 @@ call %DOWNLOAD_TOOL% %ENGINE_DOWNLOAD_URL%-avx2-x64.tar.gz -e --strip 2 -o./engi
call %DOWNLOAD_TOOL% %ENGINE_DOWNLOAD_URL%-avx512-x64.tar.gz -e --strip 2 -o./engines/llama.cpp/win-avx512-x64/%ENGINE_VERSION%
call %DOWNLOAD_TOOL% %ENGINE_DOWNLOAD_GGML_URL%-vulkan-x64.zip -e --strip 1 -o./engines/llama.cpp/win-vulkan-x64/%ENGINE_VERSION%
call %DOWNLOAD_TOOL% %CUDA_DOWNLOAD_URL%/cudart-llama-bin-win-cu12.0-x64.tar.gz -e --strip 1 -o %BIN_PATH%
call %DOWNLOAD_TOOL% %CUDA_DOWNLOAD_URL%/cudart-llama-bin-win-cu11.7-x64.tar.gz -e --strip 1 -o %BIN_PATH%
@REM call %DOWNLOAD_TOOL% %CUDA_DOWNLOAD_URL%/cudart-llama-bin-win-cu11.7-x64.tar.gz -e --strip 1 -o %BIN_PATH%
move %BIN_PATH%cortex-server-beta.exe %BIN_PATH%cortex-server.exe
copy %BIN_PATH%cortex-server.exe %BIN_PATH%cortex-server-x86_64-pc-windows-msvc.exe

View File

@ -631,44 +631,14 @@ Section Install
; Copy resources
CreateDirectory "$INSTDIR\resources\themes\joi-light"
CreateDirectory "$INSTDIR\resources\pre-install"
CreateDirectory "$INSTDIR\binaries\engines\cortex.llamacpp\windows-amd64-avx\v0.1.55"
CreateDirectory "$INSTDIR\resources\themes\night-blue"
CreateDirectory "$INSTDIR\binaries\engines\cortex.llamacpp\windows-amd64-avx512\v0.1.55"
CreateDirectory "$INSTDIR\resources\themes\joi-dark"
CreateDirectory "$INSTDIR\binaries\engines\cortex.llamacpp\windows-amd64-vulkan\v0.1.55"
CreateDirectory "$INSTDIR\binaries\engines\cortex.llamacpp\windows-amd64-noavx\v0.1.55"
CreateDirectory "$INSTDIR\binaries"
CreateDirectory "$INSTDIR\resources\themes\dark-dimmed"
CreateDirectory "$INSTDIR\binaries\engines\cortex.llamacpp\windows-amd64-avx2\v0.1.55"
File /a "/oname=binaries\engines\cortex.llamacpp\windows-amd64-avx\v0.1.55\engine.dll" "D:\a\jan\jan\src-tauri\binaries\engines\cortex.llamacpp\windows-amd64-avx\v0.1.55\engine.dll"
File /a "/oname=binaries\engines\cortex.llamacpp\windows-amd64-avx\v0.1.55\msvcp140.dll" "D:\a\jan\jan\src-tauri\binaries\engines\cortex.llamacpp\windows-amd64-avx\v0.1.55\msvcp140.dll"
File /a "/oname=binaries\engines\cortex.llamacpp\windows-amd64-avx\v0.1.55\vcomp140.dll" "D:\a\jan\jan\src-tauri\binaries\engines\cortex.llamacpp\windows-amd64-avx\v0.1.55\vcomp140.dll"
File /a "/oname=binaries\engines\cortex.llamacpp\windows-amd64-avx\v0.1.55\vcruntime140.dll" "D:\a\jan\jan\src-tauri\binaries\engines\cortex.llamacpp\windows-amd64-avx\v0.1.55\vcruntime140.dll"
File /a "/oname=binaries\engines\cortex.llamacpp\windows-amd64-avx\v0.1.55\vcruntime140_1.dll" "D:\a\jan\jan\src-tauri\binaries\engines\cortex.llamacpp\windows-amd64-avx\v0.1.55\vcruntime140_1.dll"
File /a "/oname=binaries\engines\cortex.llamacpp\windows-amd64-avx\v0.1.55\version.txt" "D:\a\jan\jan\src-tauri\binaries\engines\cortex.llamacpp\windows-amd64-avx\v0.1.55\version.txt"
File /a "/oname=binaries\engines\cortex.llamacpp\windows-amd64-avx2\v0.1.55\engine.dll" "D:\a\jan\jan\src-tauri\binaries\engines\cortex.llamacpp\windows-amd64-avx2\v0.1.55\engine.dll"
File /a "/oname=binaries\engines\cortex.llamacpp\windows-amd64-avx2\v0.1.55\msvcp140.dll" "D:\a\jan\jan\src-tauri\binaries\engines\cortex.llamacpp\windows-amd64-avx2\v0.1.55\msvcp140.dll"
File /a "/oname=binaries\engines\cortex.llamacpp\windows-amd64-avx2\v0.1.55\vcomp140.dll" "D:\a\jan\jan\src-tauri\binaries\engines\cortex.llamacpp\windows-amd64-avx2\v0.1.55\vcomp140.dll"
File /a "/oname=binaries\engines\cortex.llamacpp\windows-amd64-avx2\v0.1.55\vcruntime140.dll" "D:\a\jan\jan\src-tauri\binaries\engines\cortex.llamacpp\windows-amd64-avx2\v0.1.55\vcruntime140.dll"
File /a "/oname=binaries\engines\cortex.llamacpp\windows-amd64-avx2\v0.1.55\vcruntime140_1.dll" "D:\a\jan\jan\src-tauri\binaries\engines\cortex.llamacpp\windows-amd64-avx2\v0.1.55\vcruntime140_1.dll"
File /a "/oname=binaries\engines\cortex.llamacpp\windows-amd64-avx2\v0.1.55\version.txt" "D:\a\jan\jan\src-tauri\binaries\engines\cortex.llamacpp\windows-amd64-avx2\v0.1.55\version.txt"
File /a "/oname=binaries\engines\cortex.llamacpp\windows-amd64-avx512\v0.1.55\engine.dll" "D:\a\jan\jan\src-tauri\binaries\engines\cortex.llamacpp\windows-amd64-avx512\v0.1.55\engine.dll"
File /a "/oname=binaries\engines\cortex.llamacpp\windows-amd64-avx512\v0.1.55\msvcp140.dll" "D:\a\jan\jan\src-tauri\binaries\engines\cortex.llamacpp\windows-amd64-avx512\v0.1.55\msvcp140.dll"
File /a "/oname=binaries\engines\cortex.llamacpp\windows-amd64-avx512\v0.1.55\vcomp140.dll" "D:\a\jan\jan\src-tauri\binaries\engines\cortex.llamacpp\windows-amd64-avx512\v0.1.55\vcomp140.dll"
File /a "/oname=binaries\engines\cortex.llamacpp\windows-amd64-avx512\v0.1.55\vcruntime140.dll" "D:\a\jan\jan\src-tauri\binaries\engines\cortex.llamacpp\windows-amd64-avx512\v0.1.55\vcruntime140.dll"
File /a "/oname=binaries\engines\cortex.llamacpp\windows-amd64-avx512\v0.1.55\vcruntime140_1.dll" "D:\a\jan\jan\src-tauri\binaries\engines\cortex.llamacpp\windows-amd64-avx512\v0.1.55\vcruntime140_1.dll"
File /a "/oname=binaries\engines\cortex.llamacpp\windows-amd64-avx512\v0.1.55\version.txt" "D:\a\jan\jan\src-tauri\binaries\engines\cortex.llamacpp\windows-amd64-avx512\v0.1.55\version.txt"
File /a "/oname=binaries\engines\cortex.llamacpp\windows-amd64-noavx\v0.1.55\engine.dll" "D:\a\jan\jan\src-tauri\binaries\engines\cortex.llamacpp\windows-amd64-noavx\v0.1.55\engine.dll"
File /a "/oname=binaries\engines\cortex.llamacpp\windows-amd64-noavx\v0.1.55\msvcp140.dll" "D:\a\jan\jan\src-tauri\binaries\engines\cortex.llamacpp\windows-amd64-noavx\v0.1.55\msvcp140.dll"
File /a "/oname=binaries\engines\cortex.llamacpp\windows-amd64-noavx\v0.1.55\vcomp140.dll" "D:\a\jan\jan\src-tauri\binaries\engines\cortex.llamacpp\windows-amd64-noavx\v0.1.55\vcomp140.dll"
File /a "/oname=binaries\engines\cortex.llamacpp\windows-amd64-noavx\v0.1.55\vcruntime140.dll" "D:\a\jan\jan\src-tauri\binaries\engines\cortex.llamacpp\windows-amd64-noavx\v0.1.55\vcruntime140.dll"
File /a "/oname=binaries\engines\cortex.llamacpp\windows-amd64-noavx\v0.1.55\vcruntime140_1.dll" "D:\a\jan\jan\src-tauri\binaries\engines\cortex.llamacpp\windows-amd64-noavx\v0.1.55\vcruntime140_1.dll"
File /a "/oname=binaries\engines\cortex.llamacpp\windows-amd64-noavx\v0.1.55\version.txt" "D:\a\jan\jan\src-tauri\binaries\engines\cortex.llamacpp\windows-amd64-noavx\v0.1.55\version.txt"
File /a "/oname=binaries\engines\cortex.llamacpp\windows-amd64-vulkan\v0.1.55\engine.dll" "D:\a\jan\jan\src-tauri\binaries\engines\cortex.llamacpp\windows-amd64-vulkan\v0.1.55\engine.dll"
File /a "/oname=binaries\engines\cortex.llamacpp\windows-amd64-vulkan\v0.1.55\msvcp140.dll" "D:\a\jan\jan\src-tauri\binaries\engines\cortex.llamacpp\windows-amd64-vulkan\v0.1.55\msvcp140.dll"
File /a "/oname=binaries\engines\cortex.llamacpp\windows-amd64-vulkan\v0.1.55\vcomp140.dll" "D:\a\jan\jan\src-tauri\binaries\engines\cortex.llamacpp\windows-amd64-vulkan\v0.1.55\vcomp140.dll"
File /a "/oname=binaries\engines\cortex.llamacpp\windows-amd64-vulkan\v0.1.55\vcruntime140.dll" "D:\a\jan\jan\src-tauri\binaries\engines\cortex.llamacpp\windows-amd64-vulkan\v0.1.55\vcruntime140.dll"
File /a "/oname=binaries\engines\cortex.llamacpp\windows-amd64-vulkan\v0.1.55\vcruntime140_1.dll" "D:\a\jan\jan\src-tauri\binaries\engines\cortex.llamacpp\windows-amd64-vulkan\v0.1.55\vcruntime140_1.dll"
File /a "/oname=binaries\engines\cortex.llamacpp\windows-amd64-vulkan\v0.1.55\version.txt" "D:\a\jan\jan\src-tauri\binaries\engines\cortex.llamacpp\windows-amd64-vulkan\v0.1.55\version.txt"
SetOutPath "$INSTDIR\binaries"
File /nonfatal /a /r "D:\a\jan\jan\src-tauri\binaries\engines\"
SetOutPath $INSTDIR
File /r "D:\a\jan\jan\src-tauri\binaries\*.dll"
File /a "/oname=resources\pre-install\janhq-assistant-extension-1.0.2.tgz" "D:\a\jan\jan\src-tauri\resources\pre-install\janhq-assistant-extension-1.0.2.tgz"
File /a "/oname=resources\pre-install\janhq-conversational-extension-1.0.0.tgz" "D:\a\jan\jan\src-tauri\resources\pre-install\janhq-conversational-extension-1.0.0.tgz"
File /a "/oname=resources\pre-install\janhq-engine-management-extension-1.0.3.tgz" "D:\a\jan\jan\src-tauri\resources\pre-install\janhq-engine-management-extension-1.0.3.tgz"
@ -682,6 +652,8 @@ Section Install
; Copy external binaries
File /a "/oname=cortex-server.exe" "D:\a\jan\jan\src-tauri\binaries\cortex-server-x86_64-pc-windows-msvc.exe"
File /a "/oname=bun.exe" "D:\a\jan\jan\src-tauri\resources\bin\bun-x86_64-pc-windows-msvc.exe"
File /a "/oname=uv.exe" "D:\a\jan\jan\src-tauri\resources\bin\uv-x86_64-pc-windows-msvc.exe"
; Create file associations
@ -799,36 +771,6 @@ Section Uninstall
Delete "$INSTDIR\${MAINBINARYNAME}.exe"
; Delete resources
Delete "$INSTDIR\binaries\engines\cortex.llamacpp\windows-amd64-avx\v0.1.55\engine.dll"
Delete "$INSTDIR\binaries\engines\cortex.llamacpp\windows-amd64-avx\v0.1.55\msvcp140.dll"
Delete "$INSTDIR\binaries\engines\cortex.llamacpp\windows-amd64-avx\v0.1.55\vcomp140.dll"
Delete "$INSTDIR\binaries\engines\cortex.llamacpp\windows-amd64-avx\v0.1.55\vcruntime140.dll"
Delete "$INSTDIR\binaries\engines\cortex.llamacpp\windows-amd64-avx\v0.1.55\vcruntime140_1.dll"
Delete "$INSTDIR\binaries\engines\cortex.llamacpp\windows-amd64-avx\v0.1.55\version.txt"
Delete "$INSTDIR\binaries\engines\cortex.llamacpp\windows-amd64-avx2\v0.1.55\engine.dll"
Delete "$INSTDIR\binaries\engines\cortex.llamacpp\windows-amd64-avx2\v0.1.55\msvcp140.dll"
Delete "$INSTDIR\binaries\engines\cortex.llamacpp\windows-amd64-avx2\v0.1.55\vcomp140.dll"
Delete "$INSTDIR\binaries\engines\cortex.llamacpp\windows-amd64-avx2\v0.1.55\vcruntime140.dll"
Delete "$INSTDIR\binaries\engines\cortex.llamacpp\windows-amd64-avx2\v0.1.55\vcruntime140_1.dll"
Delete "$INSTDIR\binaries\engines\cortex.llamacpp\windows-amd64-avx2\v0.1.55\version.txt"
Delete "$INSTDIR\binaries\engines\cortex.llamacpp\windows-amd64-avx512\v0.1.55\engine.dll"
Delete "$INSTDIR\binaries\engines\cortex.llamacpp\windows-amd64-avx512\v0.1.55\msvcp140.dll"
Delete "$INSTDIR\binaries\engines\cortex.llamacpp\windows-amd64-avx512\v0.1.55\vcomp140.dll"
Delete "$INSTDIR\binaries\engines\cortex.llamacpp\windows-amd64-avx512\v0.1.55\vcruntime140.dll"
Delete "$INSTDIR\binaries\engines\cortex.llamacpp\windows-amd64-avx512\v0.1.55\vcruntime140_1.dll"
Delete "$INSTDIR\binaries\engines\cortex.llamacpp\windows-amd64-avx512\v0.1.55\version.txt"
Delete "$INSTDIR\binaries\engines\cortex.llamacpp\windows-amd64-noavx\v0.1.55\engine.dll"
Delete "$INSTDIR\binaries\engines\cortex.llamacpp\windows-amd64-noavx\v0.1.55\msvcp140.dll"
Delete "$INSTDIR\binaries\engines\cortex.llamacpp\windows-amd64-noavx\v0.1.55\vcomp140.dll"
Delete "$INSTDIR\binaries\engines\cortex.llamacpp\windows-amd64-noavx\v0.1.55\vcruntime140.dll"
Delete "$INSTDIR\binaries\engines\cortex.llamacpp\windows-amd64-noavx\v0.1.55\vcruntime140_1.dll"
Delete "$INSTDIR\binaries\engines\cortex.llamacpp\windows-amd64-noavx\v0.1.55\version.txt"
Delete "$INSTDIR\binaries\engines\cortex.llamacpp\windows-amd64-vulkan\v0.1.55\engine.dll"
Delete "$INSTDIR\binaries\engines\cortex.llamacpp\windows-amd64-vulkan\v0.1.55\msvcp140.dll"
Delete "$INSTDIR\binaries\engines\cortex.llamacpp\windows-amd64-vulkan\v0.1.55\vcomp140.dll"
Delete "$INSTDIR\binaries\engines\cortex.llamacpp\windows-amd64-vulkan\v0.1.55\vcruntime140.dll"
Delete "$INSTDIR\binaries\engines\cortex.llamacpp\windows-amd64-vulkan\v0.1.55\vcruntime140_1.dll"
Delete "$INSTDIR\binaries\engines\cortex.llamacpp\windows-amd64-vulkan\v0.1.55\version.txt"
Delete "$INSTDIR\resources\pre-install\janhq-assistant-extension-1.0.2.tgz"
Delete "$INSTDIR\resources\pre-install\janhq-conversational-extension-1.0.0.tgz"
Delete "$INSTDIR\resources\pre-install\janhq-engine-management-extension-1.0.3.tgz"
@ -842,6 +784,8 @@ Section Uninstall
; Delete external binaries
Delete "$INSTDIR\cortex-server.exe"
Delete "$INSTDIR\bun.exe"
Delete "$INSTDIR\uv.exe"
; Delete app associations
@ -851,25 +795,14 @@ Section Uninstall
; Delete uninstaller
Delete "$INSTDIR\uninstall.exe"
RMDir /REBOOTOK "$INSTDIR\binaries\engines\cortex.llamacpp\windows-amd64-avx\v0.1.55"
RMDir /REBOOTOK "$INSTDIR\binaries\engines\cortex.llamacpp\windows-amd64-avx2\v0.1.55"
RMDir /REBOOTOK "$INSTDIR\binaries\engines\cortex.llamacpp\windows-amd64-avx512\v0.1.55"
RMDir /REBOOTOK "$INSTDIR\binaries\engines\cortex.llamacpp\windows-amd64-noavx\v0.1.55"
RMDir /REBOOTOK "$INSTDIR\binaries\engines\cortex.llamacpp\windows-amd64-vulkan\v0.1.55"
RMDir /REBOOTOK "$INSTDIR\binaries\engines\cortex.llamacpp\windows-amd64-avx"
RMDir /REBOOTOK "$INSTDIR\binaries\engines\cortex.llamacpp\windows-amd64-avx2"
RMDir /REBOOTOK "$INSTDIR\binaries\engines\cortex.llamacpp\windows-amd64-avx512"
RMDir /REBOOTOK "$INSTDIR\binaries\engines\cortex.llamacpp\windows-amd64-noavx"
RMDir /REBOOTOK "$INSTDIR\binaries\engines\cortex.llamacpp\windows-amd64-vulkan"
RMDir /REBOOTOK "$INSTDIR\binaries\engines\cortex.llamacpp"
RMDir /REBOOTOK "$INSTDIR\resources\themes\dark-dimmed"
RMDir /REBOOTOK "$INSTDIR\resources\themes\joi-dark"
RMDir /REBOOTOK "$INSTDIR\resources\themes\joi-light"
RMDir /REBOOTOK "$INSTDIR\resources\themes\night-blue"
RMDir /REBOOTOK "$INSTDIR\binaries\engines"
RMDir /r /REBOOTOK "$INSTDIR\binaries\engines"
RMDir /REBOOTOK "$INSTDIR\resources\pre-install"
RMDir /REBOOTOK "$INSTDIR\resources\themes"
RMDir /REBOOTOK "$INSTDIR\binaries"
RMDir /r /REBOOTOK "$INSTDIR\binaries"
RMDir /REBOOTOK "$INSTDIR\resources"
RMDir "$INSTDIR"