From 2a140d8490e609891479f5c983f31fe028e53483 Mon Sep 17 00:00:00 2001 From: javis-bot Date: Mon, 16 Nov 2026 02:48:24 +0900 Subject: [PATCH] fix(installer): count the uninstall size at build time instead of walking the install folder The setup ran GetSize on the whole install folder for the uninstall entry's size. With the data folder kept inside it (models, Python runtime) that walked tens of thousands of files after the install had already finished, which looked like a hung install. The size of what the setup installs is now counted by installer.sh and passed in. Co-Authored-By: Claude Opus 5.5 --- app/shell/installer.nsi | 3 +-- app/shell/installer.sh | 5 ++++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/app/shell/installer.nsi b/app/shell/installer.nsi index 841d6d0..4ef43bd 100644 --- a/app/shell/installer.nsi +++ b/app/shell/installer.nsi @@ -233,8 +233,7 @@ Section "Jarvis (필수)" SecMain WriteRegStr HKLM "${UNINST_KEY}" "QuietUninstallString" '"$INSTDIR\uninstall.exe" /S' WriteRegDWORD HKLM "${UNINST_KEY}" "NoModify" 1 WriteRegDWORD HKLM "${UNINST_KEY}" "NoRepair" 1 - ${GetSize} "$INSTDIR" "/S=0K" $0 $1 $2 - WriteRegDWORD HKLM "${UNINST_KEY}" "EstimatedSize" $0 + WriteRegDWORD HKLM "${UNINST_KEY}" "EstimatedSize" ${SIZE_KB} SectionEnd Section "시작 메뉴 바로 가기" SecStart diff --git a/app/shell/installer.sh b/app/shell/installer.sh index fd07c35..88a108b 100755 --- a/app/shell/installer.sh +++ b/app/shell/installer.sh @@ -17,7 +17,10 @@ list="$target/uninstall-list.nsh" (cd "$out/Jarvis" && find python-src display-driver -type f | sort | sed 's|/|\\|g; s|^| Delete "$INSTDIR\\|; s|$|"|' cd "$out/Jarvis" && find python-src display-driver -type d | sort -r | sed 's|/|\\|g; s|^| RMDir "$INSTDIR\\|; s|$|"|') > "$list" setup="$out/Jarvis-Setup-$version.exe" +# The uninstall entry's size: what this setup installs, counted here. Counting the install folder on +# the user's PC would also walk a data folder kept inside it (models, runtime: many thousand files). +size_kb=$(cd "$out/Jarvis" && du -sk --apparent-size -c jarvis.exe WebView2Loader.dll python-src display-driver | tail -1 | cut -f1) makensis -V2 -DVERSION="$version" -DSRC="$out/Jarvis" -DOUT="$setup" -DICON="$here/icons/icon.ico" \ - -DWEBVIEW2="$wv2" -DUNINSTALL_LIST="$list" ${NSIS_EXTRA:-} "$here/installer.nsi" + -DWEBVIEW2="$wv2" -DUNINSTALL_LIST="$list" -DSIZE_KB="$size_kb" ${NSIS_EXTRA:-} "$here/installer.nsi" (cd "$out" && sha256sum "Jarvis-Setup-$version.exe" > "Jarvis-Setup-$version.exe.sha256") echo "$setup"