English Amiga Board


Go Back   English Amiga Board > Coders > Coders. General

 
 
Thread Tools
Old 04 August 2024, 04:20   #1
field3d
Registered User
 
Join Date: Feb 2019
Location: USA/Texas
Posts: 80
Amiga Installer Script for WHLOAD condition

Hello. I have the next Amiga Installer Script for a whdload. What I want to do is if Floppy ‘A123’ is inserted then it will install it as single floppy and not continue installing anything else. But if a floppy called ‘PI’ is inserted it will install of course ‘PI’ and after the ‘SI’ and will not install ‘A123’ as it will be ignored. What I have is the next code but the problem like it is is asking always for floppy name ‘A123’ and if I n sent the ‘SI’ is ignored as it is asking ‘A123’ how can I make what I said if I insert ‘A123’ is ok it will install it and no ‘PI’ or ‘SI’ will be installed, but if I snort ‘PI’ it will install only ‘PI’ and ‘SI’.

What is needed to change to this segment of the code to do this?

HTML Code:
(procedure P_Install
  (set #AD_disk "A123")
  (P_disk)
  (if
    (exists ("%s:" #AD_disk))
    (
      (copyfiles
        (help @copyfiles-help)
        (source ("%s:" #AD_disk))
        (dest #dest)
        (pattern "~(c|l|s|.#?|#?.info)")
      )
    )
    (
  
      (set #AD_disk "PI")
      (P_disk)
      (copyfiles
        (help @copyfiles-help)
        (source ("%s:" #AD_disk))
        (dest #dest)
        (pattern "~(c|l|s|.#?|#?.info)")
      )
      (set #AD_disk "SI")
      (P_disk)
      (set #simulator-dest (tackon #dest "SI"))
      (makedir #simulator-dest
        (help @makedir-help)
      )
      (copyfiles
        (help @copyfiles-help)
        (source ("%s:" #AD_disk))
        (dest #simulator-dest)
        (pattern "~(c|l|s|.#?|#?.info)")
      )
    )
  )
)
field3d is offline  
Old Today, 12:32   #2
Wepl
Moderator
 
Wepl's Avatar
 
Join Date: Nov 2001
Location: Germany
Posts: 879
using the whdload install template this is usually done by asking the user which release he has, 1 disk or 2 disk release and then doing the stuff appropriate

Code:
(set #multiple-versions "y")
in (procedure P_SelectVersion

Code:
          (choices
                ""
                ""
                ""
                "One Disk XXXX (Files)"
                "Two Disks XXXX (Files)"
                ""
          )
       )
in (procedure P_MakeImages
you use branch 3 and 4

Code:
   (                           ;----- 3 = DOS (Files) -----                                                                                                                                 
                                                                                                                                                                                             
      ;if the disk can be requested by the volume name:                                                                                                                                      
      (set #AD_disk "A123")                                                                                                                                                                 
      ;(set #AD_diskname "Disk 1")       ;this optional, default is #AD_disk                                                                                                                  
      (P_AskDisk)                                                                                                                                                                            
      (copyfiles                                                                                                                                                                             
        (help @copyfiles-help)                                                                                                                                                               
        (source ("%s:" #AD_disk))                                                                                                                                                            
        (dest #dest)                                                                                                                                                                         
        (pattern "~(c|l|s|.#?|#?.info)")
      )                                                                                                                                                                                      

    )                                                                                                                                                                                        
                                                                                                                                                                                             
    (                           ;----- 4 = CD (Files) -----                                                                                                                                  

      (set #AD_disk "PI")
      (P_AskDisk)                                                                                                                                                                            
      (copyfiles
        (help @copyfiles-help)
        (source ("%s:" #AD_disk))
        (dest #dest)
        (pattern "~(c|l|s|.#?|#?.info)")
      )
      (set #AD_disk "SI")
      (P_AskDisk)                                                                                                                                                                            
      (set #simulator-dest (tackon #dest "SI"))
      (makedir #simulator-dest
        (help @makedir-help)
      )
      (copyfiles
        (help @copyfiles-help)
        (source ("%s:" #AD_disk))
        (dest #simulator-dest)
        (pattern "~(c|l|s|.#?|#?.info)")
      )

    )
other way would be to use #AD_filereq if there is a uniq file on both first disk and when it's inserted to check for a file present which exists only on the single disk release to decide which files to copy from first disk and if a second disk must be processed
Wepl is offline  
Old Today, 17:52   #3
field3d
Registered User
 
Join Date: Feb 2019
Location: USA/Texas
Posts: 80
Oh I see. Thank you @wepl
field3d is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Amiga is 3.2 , a1200, whload Tuckernem support.Hardware 3 05 December 2021 19:38
New: AG-Launch WHLoad Launcher for 2MB Amiga (alpha release) Zetr0 Amiga scene 122 06 September 2021 13:31
WHLoad installer wont run shrub3056 support.Apps 4 18 August 2011 00:21
How to unpack LHA archives using Amiga Installer Script? doble07 Coders. General 3 02 February 2010 11:47
New Installer Script BenniP request.UAE Wishlist 16 22 June 2004 09:55

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 21:46.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.07187 seconds with 13 queries