Skip to content

Commit

Permalink
Fix build env var
Browse files Browse the repository at this point in the history
  • Loading branch information
Geometrically committed Sep 10, 2024
1 parent 73289cd commit 39444de
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 21 deletions.
23 changes: 16 additions & 7 deletions .github/workflows/app-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,13 @@ jobs:
!target/release/bundle/*/*.deb
!target/release/bundle/*/*.rpm
!target/release/bundle/*/*.msi
!target/release/bundle/*/*.msi.zip
!target/release/bundle/*/*.msi.zip.sig
!target/release/bundle/msi/*.msi
!target/release/bundle/msi/*.msi.zip
!target/release/bundle/msi/*.msi.zip.sig
!target/release/bundle/nsis/*.exe
!target/release/bundle/nsis/*.nsis.zip
!target/release/bundle/nsis/*.nsis.zip.sig
key: ${{ runner.os }}-rust-target-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-rust-target-
Expand Down Expand Up @@ -117,6 +121,7 @@ jobs:
APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }}
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
V1_COMPATIBLE_BIN_NAME: true

- name: build app
run: pnpm --filter=@modrinth/app run tauri build --config "tauri-release.conf.json"
Expand All @@ -126,6 +131,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
V1_COMPATIBLE_BIN_NAME: true

- name: upload ${{ matrix.platform }}
uses: actions/upload-artifact@v4
Expand All @@ -145,7 +151,10 @@ jobs:
target/release/bundle/*/*.deb
target/release/bundle/*/*.rpm
target/release/bundle/*/*.msi
target/release/bundle/*/*.msi.zip
target/release/bundle/*/*.msi.zip.sig
target/release/bundle/msi/*.msi
target/release/bundle/msi/*.msi.zip
target/release/bundle/msi/*.msi.zip.sig
target/release/bundle/nsis/*.exe
target/release/bundle/nsis/*.nsis.zip
target/release/bundle/nsis/*.nsis.zip.sig
20 changes: 8 additions & 12 deletions apps/app-frontend/src/pages/instance/Options.vue
Original file line number Diff line number Diff line change
Expand Up @@ -596,12 +596,12 @@ const overrideJavaInstall = ref(!!props.instance.java_path)
const optimalJava = readonly(await get_optimal_jre_key(props.instance.path).catch(handleError))
const javaInstall = ref({ path: optimalJava.path ?? props.instance.java_path })
const overrideJavaArgs = ref(!!props.instance.extra_launch_args)
const overrideJavaArgs = ref(props.instance.extra_launch_args?.length !== undefined)
const javaArgs = ref(
(props.instance.extra_launch_args ?? globalSettings.extra_launch_args).join(' '),
)
const overrideEnvVars = ref(!!props.instance.custom_env_vars)
const overrideEnvVars = ref(props.instance.custom_env_vars?.length !== undefined)
const envVars = ref(
(props.instance.custom_env_vars ?? globalSettings.custom_env_vars)
.map((x) => x.join('='))
Expand Down Expand Up @@ -685,19 +685,15 @@ const editProfileObject = computed(() => {
}
if (overrideJavaArgs.value) {
if (javaArgs.value !== '') {
editProfile.extra_launch_args = javaArgs.value.trim().split(/\s+/).filter(Boolean)
}
editProfile.extra_launch_args = javaArgs.value.trim().split(/\s+/).filter(Boolean)
}
if (overrideEnvVars.value) {
if (envVars.value !== '') {
editProfile.custom_env_vars = envVars.value
.trim()
.split(/\s+/)
.filter(Boolean)
.map((x) => x.split('=').filter(Boolean))
}
editProfile.custom_env_vars = envVars.value
.trim()
.split(/\s+/)
.filter(Boolean)
.map((x) => x.split('=').filter(Boolean))
}
if (overrideMemorySettings.value) {
Expand Down
4 changes: 2 additions & 2 deletions apps/app/src/api/ads.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,11 @@ pub async fn init_ads_window<R: Runtime>(
tauri::webview::WebviewBuilder::new(
"ads-window",
WebviewUrl::External(
"https://modrinth.com/wrapper/app-ads".parse().unwrap(),
"https://modrinth.com/wrapper/app-ads-cookie".parse().unwrap(),
),
)
.initialization_script(LINK_SCRIPT)
.user_agent("ModrinthApp Ads Webview")
.user_agent("Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36")
.zoom_hotkeys_enabled(false)
.transparent(true),
if state.shown {
Expand Down

0 comments on commit 39444de

Please sign in to comment.