fix: support for translationengine

This commit is contained in:
2025-04-13 23:24:32 +00:00
parent 7ea31c7a87
commit 37df371006
5 changed files with 20 additions and 11 deletions

View File

@ -16,6 +16,9 @@ pub async fn prepare_packages<'a>(p: &'a impl ProfilePaths, pkgs: &BTreeSet<PkgK
if pfx_dir.join("BepInEx").exists() {
tokio::fs::remove_dir_all(pfx_dir.join("BepInEx")).await?;
}
if pfx_dir.join("lang").exists() {
tokio::fs::remove_dir_all(pfx_dir.join("lang")).await?;
}
}
if !opt_dir.exists() {
@ -33,6 +36,13 @@ pub async fn prepare_packages<'a>(p: &'a impl ProfilePaths, pkgs: &BTreeSet<PkgK
if bpx_dir.exists() {
util::copy_directory(&bpx_dir, &pfx_dir.join("BepInEx"), true)?;
}
let lang_dir = util::pkg_dir_of(&namespace, &name)
.join("app")
.join("lang");
if lang_dir.exists() {
util::copy_directory(&lang_dir, &pfx_dir.join("lang"), true)?;
}
}
let opt_dir = util::pkg_dir_of(&namespace, &name).join("option");

View File

@ -273,6 +273,10 @@ impl Profile {
"SAEKAWA_CONFIG_PATH",
self.config_dir().join("saekawa.toml"),
)
.env(
"ONGEKI_LANG_PATH",
self.data_dir().join("lang"),
)
.current_dir(&exe_dir)
.raw_arg("-d")
.raw_arg("-k")

View File

@ -1,7 +1,7 @@
{
"$schema": "https://schema.tauri.app/config/2",
"productName": "STARTLINER",
"version": "0.6.0",
"version": "0.6.1",
"identifier": "zip.patafour.startliner",
"build": {
"beforeDevCommand": "bun run dev",

View File

@ -1,8 +1,6 @@
<script setup lang="ts">
import { computed } from 'vue';
import Button from 'primevue/button';
import ToggleSwitch from 'primevue/toggleswitch';
import { open } from '@tauri-apps/plugin-shell';
import InstallButton from './InstallButton.vue';
import LinkButton from './LinkButton.vue';
import ModTitlecard from './ModTitlecard.vue';
@ -40,7 +38,7 @@ const model = computed({
v-model="model"
/>
<InstallButton :pkg="pkg" />
<Button
<!-- <Button
rounded
icon="pi pi-folder"
severity="help"
@ -49,7 +47,7 @@ const model = computed({
class="ml-2 shrink-0"
style="width: 2rem; height: 2rem"
v-on:click="pkg?.loc && open(pkg.loc.path ?? '')"
/>
/> -->
<LinkButton v-if="pkgs.networkStatus === 'online'" :pkg="pkg" />
</div>
</template>

View File

@ -2,14 +2,11 @@
import { ref } from 'vue';
import Button from 'primevue/button';
import InputText from 'primevue/inputtext';
import * as path from '@tauri-apps/api/path';
import { open } from '@tauri-apps/plugin-shell';
import { invoke } from '../invoke';
import { useGeneralStore, usePrfStore } from '../stores';
import { usePrfStore } from '../stores';
import { ProfileMeta } from '../types';
const prf = usePrfStore();
const general = useGeneralStore();
const isEditing = ref(false);
const props = defineProps({
@ -113,7 +110,7 @@ const deleteProfile = async () => {
style="width: 2rem; height: 2rem"
@click="isEditing = true"
/>
<Button
<!-- <Button
rounded
icon="pi pi-folder"
severity="help"
@ -126,7 +123,7 @@ const deleteProfile = async () => {
.join(general.dataDir, `profile-${p!.game}-${p!.name}`)
.then(open)
"
/>
/> -->
</div>
</template>