olle 20 سال پیش
والد
کامیت
49f22a7941
4فایلهای تغییر یافته به همراه23 افزوده شده و 26 حذف شده
  1. 10 15
      install/macos/Install
  2. 6 1
      install/macos/README
  3. 2 1
      install/macos/maccopy
  4. 5 9
      install/macos/prepare

+ 10 - 15
install/macos/Install

@@ -1,28 +1,23 @@
 Confirm "This will install Free Pascal for MPW.¶n¶nDo you want to proceed ?"
 
 Set installerdir `Directory`
-If {FPCDIR} == ''
-	Set -e FPCDIR `GetFileName -wd -m 'Select where I should put the FreePascal folder'`FreePascal:
-	Set -e Commands "{Commands},{FPCDIR}bin:"
-Else
-  Alert "Free Pascal will be reinstalled in {FPCDIR}"
-End
+Set destdir `GetFileName -wd -m 'Select where I should install the FreePascal folder' "{Boot}"`FreePascal:
 
 # Write startup script
-Echo "Set -e FPCDIR ¶'{FPCDIR}¶'" > "{MPW}Startup Items:FPC Startup"
+Echo "Set -e FPCDIR ¶'{destdir}¶'" > "{MPW}Startup Items:FPC Startup"
 Echo 'Set -e Commands "{Commands},{FPCDIR}bin:"' >> "{MPW}Startup Items:FPC Startup"
 
 # Copy files
 Set Exit 0
-Delete -y "{FPCDIR}" ³ Dev:Null
+Delete -y "{destdir}" ³ Dev:Null
 Set Exit 1
-NewFolder "{FPCDIR}"
-Duplicate -y "{installerdir}Freepascal":Å "{FPCDIR}"
+NewFolder "{destdir}"
+Duplicate -y "{installerdir}Freepascal":Å "{destdir}"
 
 # Write configuration file
-Echo "# Configuration file for Free Pascal for MPW" > "{FPCDIR}bin:fpc.cfg"
-Echo "-Fu¶'{FPCDIR}units:rtl:¶'" >> "{FPCDIR}bin:fpc.cfg"
-Echo "-l" >> "{FPCDIR}bin:fpc.cfg"
-Echo "-vi" >> "{FPCDIR}bin:fpc.cfg"
+Echo "# Configuration file for Free Pascal for MPW" > "{destdir}bin:fpc.cfg"
+Echo "-Fu¶'{destdir}units:rtl:¶'" >> "{destdir}bin:fpc.cfg"
+Echo "-l" >> "{destdir}bin:fpc.cfg"
+Echo "-vi" >> "{destdir}bin:fpc.cfg"
 
-Alert 'The installation was successful.¶n¶nLicense information is located in the docs folder'
+Alert "The installation was successful. Please restart MPW.¶n¶nLicense information is located in the docs folder."

+ 6 - 1
install/macos/README

@@ -2,10 +2,15 @@ Run the MPW script 'prepare' to create an installer package (as a stuffit archiv
 
 The installer package will consist of:
 
-1) 'Installer README' (renamed to README in the installer package)
+1) 'Installer README' (renamed to README MacOS in the installer package)
 
 2) 'Install' (which in the installer package will get creator 'MPSX', so
               that when doubleclicked, it will be run by ToolServer )
 
 3) A FreePascal folder, containing all files to be installed.
 
+NOTE If you have a fresh checkout from cvs, you might need to set the filetypes
+of the scripts so that MPW eats them:
+  SetFile -c 'MPS ' -t 'TEXT' prepare maccopy
+
+

+ 2 - 1
install/macos/maccopy

@@ -4,5 +4,6 @@
 Duplicate -y "{1}" {TempFolder}maccopytemp
 SetFile -c 'MPS ' -t 'TEXT' {TempFolder}maccopytemp
 Translate śr śn < {TempFolder}maccopytemp  > "{2}"
-SetFile -c 'MPS ' -t 'TEXT' "{2}" -l `Evaluate {3}*100`,`Evaluate {4}*100`
+SetFile -c 'MPS ' -t 'TEXT' "{2}"
+#SetFile -c 'MPS ' -t 'TEXT' "{2}" -l `Evaluate {3}*100`,`Evaluate {4}*100`
 Delete -y {TempFolder}maccopytemp

+ 5 - 9
install/macos/prepare

@@ -1,5 +1,7 @@
 # MPW script to  prepare an installation package
 # Precondition: fpc:install:macos is current dir.
+# Parameter: version number, e. g. 1.9.6
+
 
 If {1} == ''
   Echo '#ERROR FPC version must be given as parameter (e. g. 1.9.6)'
@@ -7,7 +9,7 @@ If {1} == ''
 Else
 	Set fpcversion "{1}"
 End
-#Set fpcversion '1.9.6'
+
 Set compilerdir :::compiler:
 Set rtlunitsdir :::rtl:units:powerpc-macos:
 
@@ -23,15 +25,9 @@ Set Exit 1
 NewFolder "{stuffolder}"
 
 maccopy ::doc:readme.txt "{stuffolder}README" 1 1
-maccopy :"Installer README MacOS" "{stuffolder}README MacOS" 1 2
+maccopy :"Installer README" "{stuffolder}README MacOS" 1 2
 maccopy :Install "{stuffolder}INSTALL" 1 3
 SetFile -c 'MPSX' -t 'TEXT' "{stuffolder}INSTALL"
-#maccopy ::doc:whatsnew.txt "{stuffolder}Whatsnew" 2 1
-#maccopy ::doc:copying.fpc "{stuffolder}Copying.fpc" 2 2
-#maccopy ::doc:copying "{stuffolder}Copying" 2 3
-#maccopy ::doc:faq.txt "{stuffolder}FAQ" 3 1
-#maccopy ::doc:faq.htm "{stuffolder}FAQ.htm" 3 2
-#SetFile -c 'MSIE' -t 'TEXT' "{stuffolder}FAQ.htm"
 
 NewFolder "{stuffolder}FreePascal"
 NewFolder "{stuffolder}FreePascal:bin"
@@ -40,7 +36,7 @@ Duplicate "{compilerdir}"utils:fpc.mpw  "{stuffolder}FreePascal:bin:fpc"
 
 NewFolder "{stuffolder}FreePascal:docs"
 maccopy ::doc:readme.txt "{stuffolder}FreePascal:docs:README" 1 1
-maccopy :"Installer README MacOS" "{stuffolder}FreePascal:docs:README MacOS" 1 2
+maccopy :"Installer README" "{stuffolder}FreePascal:docs:README MacOS" 1 2
 maccopy ::doc:whatsnew.txt "{stuffolder}FreePascal:docs:Whatsnew" 2 1
 maccopy ::doc:copying.fpc "{stuffolder}FreePascal:docs:Copying.fpc" 2 2
 maccopy ::doc:copying "{stuffolder}FreePascal:docs:Copying" 2 3