Windows installer: ask for the install folder (another drive when C: is short), keep the earlier folder in app updates and silent installs; docs name what stays on C: (#3186 #3190)
This commit is contained in:
1 parent
40c605f7bc
commit
c911065a14
3 files changed
+41
-5
No files matched your search
@@ -168,7 +168,8 @@ VIAddVersionKey "ProductVersion" "${VERSION}"
|
||||
!define MUI_LANGDLL_REGISTRY_KEY "${MANUPRODUCTKEY}"
|
||||
!define MUI_LANGDLL_REGISTRY_VALUENAME "Installer Language"
|
||||
|
||||
; Strata's look and words: the app's light surface and ink, short copy, no directory page, straight on to the progress.
|
||||
; Strata's look and words: the app's light surface and ink, short copy. The install folder page is shown on a first or manual install (#3186 #3190: C: can be short on space) and
|
||||
; skipped in an update (passive), which goes on into the folder the earlier install wrote to the registry.
|
||||
!define MUI_BGCOLOR "F9FAFB"
|
||||
!define MUI_TEXTCOLOR "171B1E"
|
||||
!define MUI_INSTFILESPAGE_PROGRESSBAR "smooth"
|
||||
@@ -421,8 +422,19 @@ Function PageLeaveReinstall
|
||||
reinst_done:
|
||||
FunctionEnd
|
||||
|
||||
; 5. Choose install directory page
|
||||
!define MUI_PAGE_CUSTOMFUNCTION_PRE Skip
|
||||
; 5. Choose install directory page. The app is installed for this user only (no administrator), so the folder must be one the
|
||||
; user can write to: another drive (D:\Strata) or a folder in the profile, not Program Files. An update (passive: the app's own
|
||||
; updater) and a silent install skip it and keep the earlier folder (RestorePreviousInstallLocation).
|
||||
!ifdef MUI_PAGE_HEADER_TEXT
|
||||
!undef MUI_PAGE_HEADER_TEXT
|
||||
!endif
|
||||
!ifdef MUI_PAGE_HEADER_SUBTEXT
|
||||
!undef MUI_PAGE_HEADER_SUBTEXT
|
||||
!endif
|
||||
!define MUI_PAGE_HEADER_TEXT "Choose where to install Strata"
|
||||
!define MUI_PAGE_HEADER_SUBTEXT "Pick another drive if C: is short on space."
|
||||
!define MUI_DIRECTORYPAGE_TEXT_TOP "Strata is installed into this folder, for your user only (no administrator needed). Models and chats are stored separately, in the data folder you choose inside Strata."
|
||||
!define MUI_PAGE_CUSTOMFUNCTION_PRE SkipIfPassive
|
||||
!insertmacro MUI_PAGE_DIRECTORY
|
||||
|
||||
; 6. Start menu shortcut page
|
||||
@@ -435,7 +447,15 @@ Var AppStartMenuFolder
|
||||
!endif
|
||||
!insertmacro MUI_PAGE_STARTMENU Application $AppStartMenuFolder
|
||||
|
||||
; 7. Installation page
|
||||
; 7. Installation page (a page macro uses up the header texts, so they are set again here)
|
||||
!ifdef MUI_PAGE_HEADER_TEXT
|
||||
!undef MUI_PAGE_HEADER_TEXT
|
||||
!endif
|
||||
!ifdef MUI_PAGE_HEADER_SUBTEXT
|
||||
!undef MUI_PAGE_HEADER_SUBTEXT
|
||||
!endif
|
||||
!define MUI_PAGE_HEADER_TEXT "Installing Strata"
|
||||
!define MUI_PAGE_HEADER_SUBTEXT "Copying the app. You can keep working meanwhile."
|
||||
!insertmacro MUI_PAGE_INSTFILES
|
||||
|
||||
; 8. Finish page
|
||||
|
||||
+5
-1
@@ -50,7 +50,11 @@ The app is the easiest way. It has the engine inside, so there is nothing to bui
|
||||
The page says which installer is for which graphics card (NVIDIA or AMD). Take the one that matches yours.
|
||||
- **Windows 10 / 11:** run the `.exe`. It installs for your user and needs no administrator rights. Windows may
|
||||
say "Windows protected your PC", because the installer is not code-signed yet. Choose **More info**, then
|
||||
**Run anyway**.
|
||||
**Run anyway**. The installer asks for the folder (by default `%LOCALAPPDATA%\Programs\Strata`): on a PC
|
||||
with little space on C:, pick a folder on another drive that you can write to (not Program Files, which needs
|
||||
an administrator). Updates from inside the app go into the same folder. The engine inside the app
|
||||
(`%LOCALAPPDATA%\Strata\components`) stays on C:; `STRATA_COMPONENTS_DIR` moves it, and the models go to the
|
||||
folder you choose in the app.
|
||||
- **Linux:** the `.AppImage`. Make it runnable (right-click, Properties, Permissions, "Allow executing file as
|
||||
program", or `chmod +x`), then double-click it. It needs FUSE 2: `sudo apt install libfuse2` on Ubuntu 22.04,
|
||||
`sudo apt install libfuse2t64` on Ubuntu 24.04 and newer, `sudo dnf install fuse fuse-libs` on Fedora. Without
|
||||
|
||||
@@ -33,6 +33,18 @@ class TemplateTests(unittest.TestCase):
|
||||
self.assertIn(r'StrCmp $4 "$LOCALAPPDATA\${PRODUCTNAME}" restore_done 0', self.text)
|
||||
self.assertIn("StrIsUnder", self.text) # a remembered folder under Temp is ignored too
|
||||
|
||||
def test_the_install_folder_page_is_shown_except_in_an_update(self):
|
||||
# #3186 #3190: the person can put the app on another drive; the app's own updater (passive) and silent installs keep the folder
|
||||
# the earlier install wrote to the registry, so an update never asks again and never moves the app
|
||||
text = self.text.replace("\r\n", "\n")
|
||||
match = re.search(r"!define MUI_PAGE_CUSTOMFUNCTION_PRE (\w+)\n!insertmacro MUI_PAGE_DIRECTORY", text)
|
||||
self.assertIsNotNone(match)
|
||||
self.assertEqual(match.group(1), "SkipIfPassive")
|
||||
self.assertIn('WriteRegStr SHCTX "${MANUPRODUCTKEY}" "" $INSTDIR', text)
|
||||
self.assertIn("Call RestorePreviousInstallLocation", text)
|
||||
conf = (ROOT / "apps" / "desktop" / "src-tauri" / "tauri.conf.json").read_text(encoding="utf-8")
|
||||
self.assertIn('"installMode": "currentUser"', conf)
|
||||
|
||||
def test_the_uninstaller_removes_files_one_by_one_and_only_empty_folders(self):
|
||||
uninstall = self.text[self.text.index("Section Uninstall"):]
|
||||
self.assertNotRegex(uninstall, r'RMDir /r "\$INSTDIR"')
|
||||
|
||||
Reference in new issue
Block a user