;
; *** GeoWorld  V1.0   © by Beer Productions / 09 Jun 1997 ***
;
; $VER: GeoWorld - Update-Installer V1.05 (10.05.98)

;Variablen
(set #appname "GeoWorld")


(set @default-dest
  (askdir
    (prompt "Wählen Sie das Verzeichnis Ihrer Festplatte, IN DEM sich die GeoWorld-Schublade befindet.\n")
    (disk)
    (help @askdir-help)
    (default @default-dest)
  )
)


(set @default-dest (tackon @default-dest "GeoWorld"))
(set #destdir (cat "\"" @default-dest "/" "\""))
(set #dir      (@default-dest ))
(set #datadir  (tackon @default-dest "Daten/"))
(set #flagdir  (tackon @default-dest "Flaggen/"))
(set #helpdir  (tackon @default-dest "Help/"))
(set #kontdir  (tackon @default-dest "Kontinente/"))
(set #laendir  (tackon @default-dest "Laender/"))
(set #sampdir  (tackon @default-dest "Samples/"))
(set #linfdir  (tackon @default-dest "LInfo/"))
(set #sinfdir  (tackon @default-dest "SInfo/"))


(working " Installation des GeoWorld-Updates V1.05 ")

(If (Not (Exists (tackon @default-dest "")))
  (message "Konnte das GeoWorld-Verzeichnis nicht finden.\nDie Installation wird abgebrochen.")
;  (exit (quiet))
)

(working " Installation des neuen GeoWorld-Hauptprogramms V1.05 ")
(If (Exists (tackon @default-dest ""))
  (copyfiles
    (help "")
    (SOURCE "GeoWorld")
    (DEST #dir)
    (optional nofail force askuser)
  )
)

(working " Installation des neuen Datenarchivs ")
(If (Exists (tackon @default-dest ""))
  (set a
    (run ("C:lha x %s %s" "Daten.lha" #datadir)
    )
  )
  (if (<> a 0)
    (message "Fehler beim Installieren des Daten-Archivs.")
  )
)

(working " Installation der neuen Länderflaggen ")
(If (Exists (tackon @default-dest ""))
  (set a
    (run ("C:lha x %s %s" "Flaggen.lha" #flagdir)
    )
  )
  (if (<> a 0)
    (message "Fehler beim Installieren des Flaggen-Archivs.")
  )
)

(working " Installation der Länderinformations-Dateien (Bevölkerung) ")
(If (Exists (tackon @default-dest ""))
  (set a
    (run ("C:lha x %s %s" "LInfo/LBev.lha" (tackon #linfdir "Bevoelkerung/"))
    )
  )
  (if (<> a 0)
    (message "Fehler beim Installieren des Länderinformationen-Archivs.")
  )
)

(working " Installation der Länderinformations-Dateien (Geschichte) ")
(If (Exists (tackon @default-dest ""))
  (set a
    (run ("C:lha x %s %s" "LInfo/LGes.lha" (tackon #linfdir "Geschichte/"))
    )
  )
  (if (<> a 0)
    (message "Fehler beim Installieren des Länderinformationen-Archivs.")
  )
)

(working " Installation der Länderinformations-Dateien (Natur) ")
(If (Exists (tackon @default-dest ""))
  (set a
    (run ("C:lha x %s %s" "LInfo/LNat.lha" (tackon #linfdir "Natur/"))
    )
  )
  (if (<> a 0)
    (message "Fehler beim Installieren des Länderinformationen-Archivs.")
  )
)

(working " Installation der Länderinformations-Dateien (Politik) ")
(If (Exists (tackon @default-dest ""))
  (set a
    (run ("C:lha x %s %s" "LInfo/LPol.lha" (tackon #linfdir "Politik/"))
    )
  )
  (if (<> a 0)
    (message "Fehler beim Installieren des Länderinformationen-Archivs.")
  )
)

(working " Installation der Länderinformations-Dateien (Sonstiges) ")
(If (Exists (tackon @default-dest ""))
  (set a
    (run ("C:lha x %s %s" "LInfo/LSon.lha" (tackon #linfdir "Sonstiges/"))
    )
  )
  (if (<> a 0)
    (message "Fehler beim Installieren des Länderinformationen-Archivs.")
  )
)

(working " Installation der Länderinformations-Dateien (Wirtschaft) ")
(If (Exists (tackon @default-dest ""))
  (set a
    (run ("C:lha x %s %s" "LInfo/LWir.lha" (tackon #linfdir "Wirtschaft/"))
    )
  )
  (if (<> a 0)
    (message "Fehler beim Installieren des Länderinformationen-Archivs.")
  )
)

(working " Installation der Länderinformations-Dateien (Schlüsselwörter) ")
(If (Exists (tackon @default-dest ""))
  (copyfiles
    (help "")
    (SOURCE "LInfo/SZ_Bevoelkerung")
    (DEST #linfdir)
    (optional nofail force askuser)
  )
)

(If (Exists (tackon @default-dest ""))
  (copyfiles
    (help "")
    (SOURCE "LInfo/SZ_Natur")
    (DEST #linfdir)
    (optional nofail force askuser)
  )
)

(If (Exists (tackon @default-dest ""))
  (copyfiles
    (help "")
    (SOURCE "LInfo/SZ_Politik")
    (DEST #linfdir)
    (optional nofail force askuser)
  )
)

(If (Exists (tackon @default-dest ""))
  (copyfiles
    (help "")
    (SOURCE "LInfo/SZ_Sonstiges")
    (DEST #linfdir)
    (optional nofail force askuser)
  )
)



(working " Löschen der alten Städteinformationsdateien ")
  (set a
    (run ("C:delete %s" (tackon #sinfdir "Geschichte/#?")))
  )

  (set a
    (run ("C:delete %s" (tackon #sinfdir "Infrastruktur/#?")))
  )

  (set a
    (run ("C:delete %s" (tackon #sinfdir "Sonstiges/#?")))
  )

  (set a
    (run ("C:delete %s" (tackon #sinfdir "Tourismus/#?")))
  )

  (set a
    (run ("C:delete %s" (tackon #sinfdir "Wirtschaft/#?")))
  )



(working " Installation der neuen Städteinformations-Dateien ")
(If (Exists (tackon @default-dest ""))
  (set a
    (run ("C:lha x %s %s" "SInfo/SGes.lha" (tackon #sinfdir "Geschichte/"))
    )
  )
  (if (<> a 0)
    (message "Fehler beim Installieren des Städteinformationen-Archivs.")
  )
)

(If (Exists (tackon @default-dest ""))
  (set a
    (run ("C:lha x %s %s" "SInfo/SInf.lha" (tackon #sinfdir "Infrastruktur/"))
    )
  )
  (if (<> a 0)
    (message "Fehler beim Installieren des Städteinformationen-Archivs.")
  )
)

(If (Exists (tackon @default-dest ""))
  (set a
    (run ("C:lha x %s %s" "SInfo/SSon.lha" (tackon #sinfdir "Sonstiges/"))
    )
  )
  (if (<> a 0)
    (message "Fehler beim Installieren des Städteinformationen-Archivs.")
  )
)

(If (Exists (tackon @default-dest ""))
  (set a
    (run ("C:lha x %s %s" "SInfo/STou.lha" (tackon #sinfdir "Tourismus/"))
    )
  )
  (if (<> a 0)
    (message "Fehler beim Installieren des Städteinformationen-Archivs.")
  )
)

(If (Exists (tackon @default-dest ""))
  (set a
    (run ("C:lha x %s %s" "SInfo/SWir.lha" (tackon #sinfdir "Wirtschaft/"))
    )
  )
  (if (<> a 0)
    (message "Fehler beim Installieren des Städteinformationen-Archivs.")
  )
)

(If (Exists (tackon @default-dest ""))
  (copyfiles
    (help "")
    (SOURCE "SInfo/SZ_Infrastruktur")
    (DEST #sinfdir)
    (optional nofail force askuser)
  )
)

(If (Exists (tackon @default-dest ""))
  (copyfiles
    (help "")
    (SOURCE "SInfo/SZ_Tourismus")
    (DEST #sinfdir)
    (optional nofail force askuser)
  )
)

(If (Exists (tackon @default-dest ""))
  (copyfiles
    (help "")
    (SOURCE "SInfo/SZ_Wirtschaft")
    (DEST #sinfdir)
    (optional nofail force askuser)
  )
)


(exit)
