From e34a4e630b8309e0ce7b5754beb9aa34a582f4d6 Mon Sep 17 00:00:00 2001 From: misyaguziya Date: Tue, 16 Jan 2024 14:28:11 +0900 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=8D[Update]=20Installer=20:=20installe?= =?UTF-8?q?r.nsi=E5=86=85=E9=83=A8=E3=81=A7config.json=E3=82=92=E7=94=9F?= =?UTF-8?q?=E6=88=90=E3=81=99=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB=E5=A4=89?= =?UTF-8?q?=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- installer/config/English/config.json | 3 --- installer/config/Japanese/config.json | 3 --- installer/config/Korean/config.json | 3 --- installer/installer.nsi | 19 +++++++++++-------- 4 files changed, 11 insertions(+), 17 deletions(-) delete mode 100644 installer/config/English/config.json delete mode 100644 installer/config/Japanese/config.json delete mode 100644 installer/config/Korean/config.json diff --git a/installer/config/English/config.json b/installer/config/English/config.json deleted file mode 100644 index ba9bd8de..00000000 --- a/installer/config/English/config.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "UI_LANGUAGE": "en" -} \ No newline at end of file diff --git a/installer/config/Japanese/config.json b/installer/config/Japanese/config.json deleted file mode 100644 index d670ee58..00000000 --- a/installer/config/Japanese/config.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "UI_LANGUAGE": "ja" -} \ No newline at end of file diff --git a/installer/config/Korean/config.json b/installer/config/Korean/config.json deleted file mode 100644 index 619536dc..00000000 --- a/installer/config/Korean/config.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "UI_LANGUAGE": "ko" -} \ No newline at end of file diff --git a/installer/installer.nsi b/installer/installer.nsi index 53084928..6e246132 100644 --- a/installer/installer.nsi +++ b/installer/installer.nsi @@ -63,13 +63,14 @@ Var InstallShortcut Var Label_DescriptionOptions Var Label_DescriptionComboBox Var ComboBox_Language +Var Set_Langage ; 初期化時コールバック Function .onInit ; オプション値を初期化します。 StrCpy $InstallDocs ${BST_CHECKED} StrCpy $InstallShortcut ${BST_CHECKED} - StrCpy $ComboBox_Language "Japanese" + StrCpy $ComboBox_Language "English" FunctionEnd ; オプション ページ @@ -167,18 +168,20 @@ Section CreateShortCut "$DESKTOP\VRCT.lnk" "$INSTDIR\VRCT.exe" ${EndIf} - ; ComboBoxの選択値から言語を判定しinstaller\config\***\config.jsonを$INSTDIRにコピー + ; ComboBoxの選択値から言語を判定しconfig.jsonを$INSTDIRに作成 ${If} $ComboBox_Language == "English" - SetOutPath "$INSTDIR" - File "..\installer\config\English\config.json" + StrCpy $Set_Langage "en" ${ElseIf} $ComboBox_Language == "日本語" - SetOutPath "$INSTDIR" - File "..\installer\config\Japanese\config.json" + StrCpy $Set_Langage "ja" ${ElseIf} $ComboBox_Language == "한국어" - SetOutPath "$INSTDIR" - File "..\installer\config\Korean\config.json" + StrCpy $Set_Langage "ko" ${EndIf} + StrCpy $1 '{"UI_LANGUAGE": "$Set_Langage"}' + FileOpen $0 "$INSTDIR\config.json" w + FileWrite $0 $1 + FileClose $0 + ; スタート メニューにショートカットを登録 CreateDirectory "$SMPROGRAMS\VRCT" SetOutPath "$INSTDIR"