View Single Post
  #10  
Old 20-09-2021, 03:22
L33THAK0R's Avatar
L33THAK0R L33THAK0R is offline
Registered User
 
Join Date: Feb 2021
Location: Saudi Arabia
Posts: 406
Thanks: 137
Thanked 117 Times in 70 Posts
L33THAK0R is on a distinguished road
Question

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?

Last edited by L33THAK0R; 21-09-2021 at 10:00.
Reply With Quote
The Following User Says Thank You to L33THAK0R For This Useful Post:
Gehrman (31-05-2022)