fix: also add post scripts
This commit is contained in:
@ -12,8 +12,8 @@ invoke('get_changelog').then((s) => (changelog.value = s as string));
|
||||
|
||||
<template>
|
||||
<h1>About</h1>
|
||||
STARTLINER is a launcher, configuration tool and mod manager for
|
||||
O.N.G.E.K.I. and CHUNITHM.
|
||||
STARTLINER is a configuration tool, mod manager and start.bat automation
|
||||
engine for O.N.G.E.K.I. and CHUNITHM.
|
||||
<h1>Changelog</h1>
|
||||
<ScrollPanel style="height: 200px">
|
||||
<div class="markdown">
|
||||
|
@ -71,10 +71,12 @@ const recommendedTooltip = computed(() => {
|
||||
const installRecommended = () => {
|
||||
if (prf.current?.meta.game === 'ongeki') {
|
||||
pkgs.installFromKey('segatools-mu3hook');
|
||||
prf.current.data.sgt.hook = 'segatools-mu3hook';
|
||||
}
|
||||
if (prf.current?.meta.game === 'chunithm') {
|
||||
pkgs.installFromKey('segatools-chusanhook');
|
||||
pkgs.installFromKey('mempatcher-mempatcher');
|
||||
prf.current.data.sgt.hook = 'segatools-chusanhook';
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
@ -29,10 +29,17 @@ const files = new Set<string>();
|
||||
).includes('chunithm');
|
||||
})();
|
||||
|
||||
const fileList = {
|
||||
ongeki: ['aime.txt', 'inohara.cfg', 'mu3.ini', 'segatools-base.ini'],
|
||||
chunithm: ['aime.txt', 'saekawa.toml', 'segatools-base.ini'],
|
||||
};
|
||||
const fileList = [
|
||||
'aime.txt',
|
||||
'inohara.cfg',
|
||||
'saekawa.toml',
|
||||
'mu3.ini',
|
||||
'segatools-base.ini',
|
||||
'pre.sh',
|
||||
'pre.bat',
|
||||
'post.sh',
|
||||
'post.bat',
|
||||
];
|
||||
|
||||
const diagnosticList = {
|
||||
ongeki: ['mu3.ini', 'segatools-base.ini'],
|
||||
@ -62,8 +69,7 @@ const fileListCurrent: Ref<string[]> = ref([]);
|
||||
const recalcFileList = async () => {
|
||||
const res: string[] = [];
|
||||
files.clear();
|
||||
for (const idx in fileList[prf.current!.meta.game]) {
|
||||
const f = fileList[prf.current!.meta.game][idx];
|
||||
for (const f of fileList) {
|
||||
const p = await path.join(await prf.configDir, f);
|
||||
if (await invoke('file_exists', { path: p })) {
|
||||
res.push(f);
|
||||
|
@ -41,18 +41,33 @@ const prf = usePrfStore();
|
||||
<FileEditor filename="segatools-base.ini" />
|
||||
</OptionRow>
|
||||
<OptionRow
|
||||
:title="t('cfg.misc.prelaunch')"
|
||||
:tooltip="t('cfg.misc.prelaunchTooltip')"
|
||||
:title="t('cfg.misc.prescript')"
|
||||
:tooltip="t('cfg.misc.prescriptTooltip')"
|
||||
>
|
||||
<FileEditor
|
||||
v-if="extension === 'bat'"
|
||||
filename="prelaunch.bat"
|
||||
:defaultValue="`@echo off\n\nREM This script will be launched alongside the game\n`"
|
||||
filename="pre.bat"
|
||||
:defaultValue="`@echo off\n\nREM This script will launch before (and alongside) the game\n`"
|
||||
/>
|
||||
<FileEditor
|
||||
v-else-if="extension === 'sh'"
|
||||
filename="prelaunch.sh"
|
||||
:defaultValue="`#!/bin/sh\n\n# This script will be launched alongside the game\n`"
|
||||
filename="pre.sh"
|
||||
:defaultValue="`#!/bin/sh\n\n# This script will launch before (and alongside) the game\n`"
|
||||
/>
|
||||
</OptionRow>
|
||||
<OptionRow
|
||||
:title="t('cfg.misc.postscript')"
|
||||
:tooltip="t('cfg.misc.postscriptTooltip')"
|
||||
>
|
||||
<FileEditor
|
||||
v-if="extension === 'bat'"
|
||||
filename="post.bat"
|
||||
:defaultValue="`@echo off\n\nREM This script will launch after the game has died\n`"
|
||||
/>
|
||||
<FileEditor
|
||||
v-else-if="extension === 'sh'"
|
||||
filename="post.sh"
|
||||
:defaultValue="`#!/bin/sh\n\n# This script will launch after the game has died\n`"
|
||||
/>
|
||||
</OptionRow>
|
||||
</OptionCategory>
|
||||
|
Reference in New Issue
Block a user