feat: initial support for segatools pkgs

This commit is contained in:
2025-03-15 00:08:33 +01:00
parent b525e74467
commit caa20a3aa0
20 changed files with 246 additions and 112 deletions

View File

@ -12,8 +12,10 @@ import FilePicker from './FilePicker.vue';
import OptionCategory from './OptionCategory.vue';
import OptionRow from './OptionRow.vue';
import { invoke } from '../invoke';
import { usePrfStore } from '../stores';
import { usePkgStore, usePrfStore } from '../stores';
import { pkgKey } from '../util';
const pkg = usePkgStore();
const prf = usePrfStore();
const aimeCode = ref('');
@ -26,13 +28,6 @@ const displayList: Ref<{ title: string; value: string }[]> = ref([
},
]);
// const hookList: Ref<{ title: string; value: string }[]> = ref([
// {
// title: 'segatools-mu3hook',
// value: 'segatools-mu3hook',
// },
// ]);
invoke('list_platform_capabilities')
.then(async (v: unknown) => {
if (Array.isArray(v)) {
@ -86,14 +81,18 @@ const extraDisplayOptionsDisabled = computed(() => {
:callback="(value: string) => (prf.current!.sgt.target = value)"
></FilePicker>
</OptionRow>
<!-- <OptionRow title="mu3hook">
<OptionRow title="mu3hook">
<Select
model-value="segatools-mu3hook"
:options="hookList"
v-model="prf.current!.sgt.hook"
:options="
pkg.hooks.map((p) => {
return { title: pkgKey(p), value: pkgKey(p) };
})
"
option-label="title"
option-value="value"
></Select>
</OptionRow> -->
</OptionRow>
<OptionRow title="amfs">
<FilePicker
:directory="true"
@ -119,6 +118,20 @@ const extraDisplayOptionsDisabled = computed(() => {
"
></FilePicker>
</OptionRow>
<OptionRow title="mu3io">
<Select
v-model="prf.current!.sgt.io"
placeholder="segatools built-in"
:options="[
{ title: 'segatools built-in', value: null },
...pkg.ios.map((p) => {
return { title: pkgKey(p), value: pkgKey(p) };
}),
]"
option-label="title"
option-value="value"
></Select>
</OptionRow>
</OptionCategory>
<OptionCategory title="Display">
<OptionRow