mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-19 04:46:08 +00:00
Windows components: install from a recording of the installer's result (#495)
* Windows components: install from a recording of the installer's result A catalog entry may name a 'snapshot': what its own setup program leaves in a prefix, recorded once in Wine by winlator-contents' tools/snapshot/record.py (the files it places and the registry values it writes, the self-registering DLLs' CLSID entries included). With one, the setup program never runs here: the files come from the archive beside the recording, or out of the vendor's installer by the paths the recording maps (small generated ones inline), and the registry values go to registry.json for droiddeck-wincomponents to write at launch. The steps a recording makes redundant are skipped; DLL overrides still apply. A component with a recording counts as installable; its prerequisites must still be. * droiddeck-msi-install --unpack: open archives nested inside an installer QuickTime's cabinets and an NSIS pack's payloads sit inside the unpacked installer; they are opened in place into '<name>.nested' folders, two levels deep, the same layout the component recordings map their file sources to, so a recording's paths resolve on the device (QuickTime: 593 of 593).
This commit is contained in:
1 parent
0da45e53cb
commit
d15ffa3df2
3 files changed
+162
-3
No files matched your search
@@ -65,6 +65,22 @@ class WinComponentsSupportTest {
|
||||
step("register_dll", "dlls" to ""))))
|
||||
}
|
||||
|
||||
@Test fun recordedInstallersInstallHere() {
|
||||
val snapshot = "https://github.com/The412Banner/winlator-contents/releases/download/component-snapshots-v1/K-Lite.snapshot.json"
|
||||
// A setup program with a recording of its result installs from the recording.
|
||||
val klite = WinComponents.Component("K-Lite", "", "", "ready", emptyList(),
|
||||
listOf(step("install_exe", "url" to "$base/K-Lite.exe", "file_name" to "K-Lite_1960.exe")), snapshot)
|
||||
assertEquals(Support.READY, WinComponents.support(klite, mapOf(klite.name to klite)))
|
||||
// Only a recording on the release counts.
|
||||
val elsewhere = WinComponents.Component("K-Lite", "", "", "ready", emptyList(), klite.steps, "http://example.com/K-Lite.snapshot.json")
|
||||
assertEquals(Support.NEEDS_INSTALLER, WinComponents.support(elsewhere, mapOf(elsewhere.name to elsewhere)))
|
||||
// Its prerequisites still have to be installable.
|
||||
val sp1 = WinComponents.Component("dotnet20sp1", "", "", "ready", listOf("dotnet20"), emptyList(), snapshot.replace("K-Lite", "dotnet20sp1"))
|
||||
val base20 = WinComponents.Component("dotnet20", "", "", "ready", emptyList(),
|
||||
listOf(step("install_exe", "url" to "$base/dotnet20__dotnetfx.exe", "file_name" to "dotnetfx.exe")))
|
||||
assertEquals(Support.NEEDS_INSTALLER, WinComponents.support(sp1, mapOf("dotnet20sp1" to sp1, "dotnet20" to base20)))
|
||||
}
|
||||
|
||||
@Test fun setupProgramsStillWait() {
|
||||
// NSIS / InnoSetup installers hold no package to lay out.
|
||||
assertEquals(Support.NEEDS_INSTALLER, support(component("K-Lite",
|
||||
|
||||
Reference in new issue
Block a user