👍[Update] installer : インストールするパスを修正

This commit is contained in:
misyaguziya
2023-10-30 18:25:22 +09:00
parent 958cd45b0c
commit 676a64d0f5
3 changed files with 7 additions and 7 deletions

View File

@@ -530,10 +530,9 @@ class Config:
def init_config(self): def init_config(self):
# Read Only # Read Only
self._VERSION = "2.0.0" self._VERSION = "2.0.0"
self._LOCAL_PATH = os_path.join(os_getenv('LOCALAPPDATA'), "VRCT") self._LOCAL_PATH = os_path.dirname(sys.argv[0])
self._PATH_CONFIG = os_path.join(self._LOCAL_PATH, "config.json") self._PATH_CONFIG = os_path.join(self._LOCAL_PATH, "config.json")
self._PATH_LOGS = os_path.join(self._LOCAL_PATH, "logs") self._PATH_LOGS = os_path.join(self._LOCAL_PATH, "logs")
os_makedirs(self._LOCAL_PATH, exist_ok=True)
self._GITHUB_URL = "https://api.github.com/repos/misyaguziya/VRCT/releases/latest" self._GITHUB_URL = "https://api.github.com/repos/misyaguziya/VRCT/releases/latest"
self._BOOTH_URL = "https://misyaguziya.booth.pm/" self._BOOTH_URL = "https://misyaguziya.booth.pm/"
self._DOCUMENTS_URL = "https://mzsoftware.notion.site/VRCT-Documents-be79b7a165f64442ad8f326d86c22246" self._DOCUMENTS_URL = "https://mzsoftware.notion.site/VRCT-Documents-be79b7a165f64442ad8f326d86c22246"

View File

@@ -32,13 +32,13 @@ ShowInstDetails show
; 圧縮メソッド ; 圧縮メソッド
SetCompressor lzma SetCompressor lzma
; インストールされるディレクトリ ; インストールされるディレクトリ
InstallDir "$PROGRAMFILES\VRCT" InstallDir "$LOCALAPPDATA\VRCT"
; XPマニフェスト ; XPマニフェスト
XPStyle on XPStyle on
; ページ ; ページ
!insertmacro MUI_PAGE_WELCOME !insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_LICENSE "..\LICENSE" !insertmacro MUI_PAGE_LICENSE "..\LICENSE"
!insertmacro MUI_PAGE_DIRECTORY ;!insertmacro MUI_PAGE_DIRECTORY
Page custom OptionPage OptionPageLeave Page custom OptionPage OptionPageLeave
!insertmacro MUI_PAGE_INSTFILES !insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_PAGE_FINISH !insertmacro MUI_PAGE_FINISH
@@ -132,7 +132,7 @@ Section
; 出力先を指定します。 ; 出力先を指定します。
SetOutPath "$INSTDIR" SetOutPath "$INSTDIR"
; インストールされるファイル ; インストールされるファイル
File /r "..\dist\VRCT\" File /r "..\dist\VRCT"
${If} $InstallDocs == ${BST_CHECKED} ${If} $InstallDocs == ${BST_CHECKED}
; ドキュメントをインストールする場合 ; ドキュメントをインストールする場合

View File

@@ -266,7 +266,7 @@ class Model:
@staticmethod @staticmethod
def updateSoftware(restart:bool=True): def updateSoftware(restart:bool=True):
filename = 'download.zip' filename = 'VRCT.zip'
program_name = 'VRCT.exe' program_name = 'VRCT.exe'
temporary_name = '_VRCT.exe' temporary_name = '_VRCT.exe'
tmp_directory_name = 'tmp' tmp_directory_name = 'tmp'
@@ -276,7 +276,8 @@ class Model:
try: try:
res = requests_get(config.GITHUB_URL) res = requests_get(config.GITHUB_URL)
url = res.json()['assets'][0]['browser_download_url'] assets = res.json()['assets'][0]['browser_download_url']
url = [i["browser_download_url"] for i in assets if i["name"] == filename][0]
res = requests_get(url, stream=True) res = requests_get(url, stream=True)
os_makedirs(os_path.join(current_directory, tmp_directory_name), exist_ok=True) os_makedirs(os_path.join(current_directory, tmp_directory_name), exist_ok=True)
with open(os_path.join(current_directory, tmp_directory_name, filename), 'wb') as file: with open(os_path.join(current_directory, tmp_directory_name, filename), 'wb') as file: