Browse Source

+ initial files for creating install packages for MPW

olle 20 years ago
parent
commit
dead3dcf38
4 changed files with 114 additions and 0 deletions
  1. 29 0
      install/macos/Install
  2. 34 0
      install/macos/Installer README
  3. 11 0
      install/macos/README
  4. 40 0
      install/macos/prepare

+ 29 - 0
install/macos/Install

@@ -0,0 +1,29 @@
+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
+
+# Write startup script
+Echo "Set -e FPCDIR ¶'{FPCDIR}¶'" > "{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
+Set Exit 1
+NewFolder "{FPCDIR}"
+Duplicate -y "{installerdir}Freepascal":Å "{FPCDIR}"
+
+# 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"
+
+Alert 'The installation was successful.'
+

+ 34 - 0
install/macos/Installer README

@@ -0,0 +1,34 @@
+Welcome to Free Pascal for MPW on classic Mac OS
+================================================
+
+How to install:
+---------------
+
+1. If  yo do not have MPW, please install MPW first.
+   MPW can be obtained for free from Apple.
+
+2. Double click the file "Install". This will launch an
+   install script (via the ToolServer application, which is
+   included in MPW).
+
+3. If it is the first time you install Free Pascal,
+   the install script will ask where you want to create the
+   FreePascal folder.
+
+4. The installer will copy necessary files to the
+   FreePascal folder, create an fpc.cfg file,
+   and also add a startup script in 
+   the Startup Items folder in the MPW folder.
+
+5. Done.
+
+
+Tips
+----
+
+If you want to compile large programs, and in particular the rtl or
+the compiler itself, please increase the memory setting of
+MPW to 50 MB and ToolServer to 30 MB.
+
+An upgrade to MPW Shell 3.6b1 is recommended
+

+ 11 - 0
install/macos/README

@@ -0,0 +1,11 @@
+Run the MPW script 'prepare' to create an installer package (as a stuffit archive).
+
+The installer package will consist of:
+
+1) 'Installer README' (renamed to README 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.
+

+ 40 - 0
install/macos/prepare

@@ -0,0 +1,40 @@
+# MPW script to  prepare an installation package
+# Precondition: fpc:install:macos is current dir.
+
+Set compilerdir :::compiler:
+Set rtlunitsdir :::rtl:units:powerpc-macos:
+
+Set units 'charset cmem dos getopts heaptrc macostp macpas macutils matrix ¶
+          objects objpas strings system unixutil'
+
+#Obtain path to compression program
+Set -e stuffapp `getFileName -m 'Tell me where the DroppStuff application is'`
+Set stuffolder ":Free Pascal for MPW:"
+
+Set Exit 0
+Delete -y "{stuffolder}"  ³ Dev:Null
+Set Exit 1
+NewFolder "{stuffolder}"
+
+Duplicate :"Installer README"  "{stuffolder}"README
+SetFile -c 'ttxt' -t 'TEXT' "{stuffolder}"README
+
+Duplicate :Install  "{stuffolder}"
+SetFile -c 'MPSX' -t 'TEXT' "{stuffolder}"install
+
+NewFolder "{stuffolder}FreePascal"
+NewFolder "{stuffolder}FreePascal:bin"
+Duplicate "{compilerdir}"ppcppc  "{stuffolder}FreePascal:bin"
+Duplicate "{compilerdir}"utils:fpc.mpw  "{stuffolder}FreePascal:bin:fpc"
+
+NewFolder "{stuffolder}FreePascal:units"
+NewFolder "{stuffolder}FreePascal:units:rtl"
+For unit In {units}
+  Duplicate "{rtlunitsdir}"{unit}.ppu  "{stuffolder}FreePascal:units:rtl"
+  Duplicate "{rtlunitsdir}"{unit}.o  "{stuffolder}FreePascal:units:rtl"
+  #Echo {unit}
+End
+
+If "{stuffapp}" != ""
+  "{stuffapp}" "{stuffolder}"
+End