UPDATE: Realised I might be able to do a bit of a botched fix using batch scripts, its a bit fucky but thankfully I don't repack collections structured like this often!
Hi all,
Got a small question regarding whether my proposed solution could work at all (I'm terribly new to pascal/delphi). I've got a fair few packs that feature selective, multiple-title offerings to the end-user, each with their own, separate executable to launch from (since some are emulated and require a small script to launch the ROM), as well as their own entry under the shortcut section of the "Settings.ini" file used in ASIS (baked into a executable thats just a batch script wrapped in an exe). My issue is that regardless of the component selection, upon extraction of all selected archives, all desktop shortcuts defined within the "settings.ini" are generated (should the option be selected).
My current thought process is using the "RemoveShortcut" function, in the Post-install section of the script to delete the shortcut, if a given .txt file is missing (which would be packed with a given selective offering), like so:
Code:
#if ("{app}\_CommonRedist\APPS\APP_1.txt" == "0") && ("{userdesktop}\APP_1.lnk" == "1")
#for {i = 1; Trim(ReadIni(SourcePath + "\Settings.ini", "Executable" + Str(i), "ShortcutName", "")) != ""} RemoveShortcut
#endif
#if ("{app}\_CommonRedist\APPS\APP_2.txt" == "0") && ("{userdesktop}\APP_2.lnk" == "1")
#for {i = 2; Trim(ReadIni(SourcePath + "\Settings.ini", "Executable" + Str(i), "ShortcutName", "")) != ""} RemoveShortcut
#endif
However upon testing this both shortcuts were removed even when installing only one of the selected components. Does anyone have any idea why this might be?