From 2108697533bbc5684361fa8828ed443f82221fd3 Mon Sep 17 00:00:00 2001 From: Chris Young Date: Sun, 28 Feb 2016 11:26:19 +0000 Subject: [PATCH] Fix copying of the wrong .readme during installation. Abort with a message if the archive doesn't match the OS version. --- amiga/dist/Install | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/amiga/dist/Install b/amiga/dist/Install index 439cc734e..03d806b93 100755 --- a/amiga/dist/Install +++ b/amiga/dist/Install @@ -39,9 +39,28 @@ ;;; Script execution starts here ;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +(set osver (getversion)) +(set osver (/ osver 65536)) + (if (= @app-name "NetSurfAutoInstall") (set #AutoInstall 1)) (set @app-name "NetSurf") +(set #netsurf-readme "NetSurf.readme") +(if (= (exists #netsurf-readme) 0) + ( + (set #netsurf-readme "NetSurf_os3.readme") + (if (OR (>= osver 50) (< osver 44)) + (abort "This archive is for AmigaOS 3.5 or 3.9 ONLY.") + ) + ) + ;else + ( + (if (< osver 50) + (abort "This archive is for AmigaOS 4.0 and higher ONLY.") + ) + ) +) + (if (<> #AutoInstall 1) (welcome)) ; (hopefully temporary) workaround for a bug in Installer: @@ -80,8 +99,6 @@ (working "Checking existing installation...") (set #icon-exists (exists (tackon @default-dest "NetSurf.info"))) -(set osver (getversion)) -(set osver (/ osver 65536)) (complete 10) @@ -203,7 +220,7 @@ (copyfiles (prompt "Copying files") (source "") - (choices "Resources" "Rexx" "NetSurf.guide" "NetSurf.readme") + (choices "Resources" "Rexx" "NetSurf.guide" #netsurf-readme) (help @copyfiles-help) (dest @default-dest) (infos)