home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format 42 / af042a.adf / Install.AMOS / Install.amosSourceCode < prev    next >
AMOS Source Code  |  1992-02-21  |  23KB  |  764 lines

  1. '----------------------------------
  2. ' AMOS HARD DISK INSTALLER V1.34   
  3. ' (c) Europress Software 1992
  4. ' By F.Lionet
  5. '----------------------------------
  6. '
  7. Set Buffer 40
  8. '
  9. Dim F$(200),SZ(200),DR$(200)
  10. Global F$(),SZ(),NFILE,PATH$
  11. Global DR$(),NDIR,ERR
  12. Global MXSIZE,BCOPY
  13. Global SRCE$,DEST$,HD$
  14. Global LFILE
  15. Global VER$
  16. Global YLOGO,DYLOGO
  17. Global QUIT
  18. Global PAR,PAR$,PPAR$
  19. '
  20. VER$="1.34"
  21. YLOGO=60 : DYLOGO=72
  22. '
  23. LFILE=40
  24. Set Dir LFILE,""
  25. '
  26. MXSIZE=200*1024 : BCOPY=10
  27. Reserve As Work BCOPY,MXSIZE
  28. '
  29. Hide On 
  30. Screen Open 0,640,200,8,Hires
  31. Flash Off : Curs Off : Cls 0
  32. Palette $0,$FFF,$7F,$A7 : Screen Clone 3 : Screen Hide 3
  33. '
  34. Unpack 15 To 1 : Screen To Back 1 : Screen Clone 2 : Screen Hide 2
  35. '
  36. Do 
  37.    '
  38.    SET_UP_SCREEN : Hide On 
  39.    '
  40.    Do 
  41.       '
  42.       Repeat : Until Mouse Key=2
  43.       '
  44.       _LOGO_DOWN
  45.       Limit Mouse X Hard(0),Y Hard(0) To X Hard(640),YLOGO+DYLOGO-16
  46.       Show On 
  47.       '
  48.       Menu On 
  49.       '
  50.       Multi Wait 
  51.       If Choice
  52.          If Choice(1)=1 : MENU_1 : Exit : End If 
  53.          If Choice(1)=2 : HDINSTALL : Exit : End If 
  54.       End If 
  55.       '
  56.       Hide On 
  57.       Menu Off 
  58.       Limit Mouse X Hard(0),Y Hard(0) To X Hard(640),Y Hard(16)
  59.       _LOGO_UP
  60.       '
  61.    Loop 
  62.    '
  63. Loop 
  64. '
  65. Procedure _LOGO_DOWN
  66.    Channel 1 To Screen Display 1
  67.    Amreg(0)=YLOGO : Amreg(1)=DYLOGO
  68.    A$=A$+"      Let RC=0; Let R0=4;"
  69.    A$=A$+"Loop: Move 0,RB,R0;"
  70.    A$=A$+"      If R0=1 Jump End;"
  71.    A$=A$+"      Let RB=RB/2;"
  72.    A$=A$+"      Move 0,0-RB,R0;"
  73.    A$=A$+"      Let R0=R0-1;"
  74.    A$=A$+"      Jump Loop;"
  75.    A$=A$+"End:  Let RC=-1;"
  76.    Amal 1,A$
  77.    Amal On 
  78.    Repeat : Wait Vbl : Until Amreg(2)
  79. End Proc
  80. Procedure _LOGO_UP
  81.    Channel 1 To Screen Display 1
  82.    Amreg(0)=YLOGO : Amreg(1)=DYLOGO
  83.    Amal 1,"Let RC=0; Move 0,0-RB,5; Let RC=-1;"
  84.    Amal On 
  85.    Repeat : Wait Vbl : Until Amreg(2)
  86. End Proc
  87. Procedure SET_UP_SCREEN
  88.    '
  89.    Screen 0
  90.    Cls 0 : Palette 0,0,0,0
  91.    Paper 0 : Pen 1
  92.    Wait Vbl 
  93.    '
  94.    Menu$(1)=" Informations "
  95.    Menu$(1,1)=" AMOS on your Hard Drive       "
  96.    Menu$(1,2)=" Automatic Assigns feature     "
  97.    Menu$(1,3)="-------------------------------" : Menu Inactive(1,3)
  98.    Menu$(1,4)=" About Europress Software Ltd. "
  99.    Menu$(1,5)="-------------------------------" : Menu Inactive(1,5)
  100.    Menu$(1,6)=" Back to AMOS Editor           "
  101.    Menu$(1,7)=" Back to Workbench             "
  102.    Menu$(1,7,1)=" Sure ? "
  103.    Menu$(2)=" Installation "
  104.    Menu$(2,1)=" Start installation process "
  105.    '
  106.    Centre At(,20)+"Click right mouse button for menu"
  107.    '
  108.    Auto View Off 
  109.    Screen 1 : For C=0 To 31 : Colour C,0 : Next 
  110.    Screen Display 1,,YLOGO,, : Screen To Front 1
  111.    Auto View On : View 
  112.    '
  113.    Fade 1 To 2 : Wait 16
  114.    Screen 0 : Fade 1 To 3
  115.    '
  116.    Limit Mouse X Hard(0),Y Hard(0) To X Hard(640),Y Hard(8)
  117.    '
  118. End Proc
  119. Procedure _MAKE_SETUP_SCREEN
  120.    '
  121.    Screen 0 : Fade 1,0,0,0,0 : Wait 16
  122.    '
  123.    Screen 1 : Fade 1 : Wait 16 : Screen To Back 1
  124.    '
  125.    Screen 0 : 
  126.    Paper 0 : Pen 1
  127.    Clw : Fade 1 To 3
  128.    '
  129.    Limit Mouse X Hard(0),Y Hard(0) To X Hard(640),Y Hard(200)-10
  130.    '
  131. End Proc
  132. Procedure MENU_1
  133.    '
  134.    Menu Off 
  135.    On Choice(2) Gosub _INFO1,_INFO2,_NONE,_INFO3,_NONE,_QUIT,_SYS
  136.    Pop Proc
  137.    '
  138.    _INFO1: _SETUP_MENU[1] : _SETUP_MENU[14] : Return 
  139.    _INFO2: _SETUP_MENU[2] : Return 
  140.    _INFO3: _SETUP_MENU[3] : Return 
  141.    _QUIT: _MAKE_SETUP_SCREEN : Edit : Return 
  142.    _SYS: _MAKE_SETUP_SCREEN : System : Return 
  143.    _NONE: Return 
  144.    '
  145. End Proc
  146. Procedure INFO[A$]
  147.    Centre At(,20)+Space$(78)
  148.    Centre A$
  149. End Proc
  150. Procedure HDINSTALL
  151.    Shared XX,YY
  152.    '
  153.    Menu Off 
  154.    Clear Key 
  155.    '
  156.    Do 
  157.       Do 
  158.          '
  159.          _SETUP_MENU[6]
  160.          _LEDIT["",0,XX,YY,59]
  161.          HD$=Param$
  162.          '
  163.          E=-1
  164.          Exit If HD$=""
  165.          Exit If HD$="_Esc_"
  166.          E=0
  167.          '
  168.          For C=Len(HD$) To 1 Step -1
  169.             Exit If Mid$(HD$,C,1)<>""
  170.          Next 
  171.          HD$=Left$(HD$,C+1)
  172.          '
  173.          C=Instr(HD$,":") : If C=0 : E=2 : Exit : End If 
  174.          DSK$=Left$(HD$,C)
  175.          If Drive(DSK$)=0 : E=1 : Exit : End If 
  176.          '
  177.          A$=Disc Info$(DSK$)
  178.          F=Val(Right$(A$,10)) : If Upper$(Left$(DSK$,3))="RAM" : F=Chip Free+Fast Free : End If 
  179.          If F<2500000 : E=3 : Exit : End If 
  180.          '
  181.          If Exist(HD$)=0
  182.             '
  183.             PPAR$=HD$
  184.             _SETUP_MENU[10]
  185.             Exit If QUIT,2
  186.             If PAR$="Ab" : Exit : End If 
  187.             '
  188.             On Error Goto _ERR
  189.             '
  190.             C=Len(DSK$)+1 : I$=DSK$
  191.             Do 
  192.                Exit If C>=Len(HD$)
  193.                CC=Instr(HD$,"/",C)
  194.                If CC=0 : CC=Len(HD$) : End If 
  195.                F$=Mid$(HD$,C,CC-C+1) : If Right$(F$,1)="/" : F$=Left$(F$,Len(F$)-1) : End If 
  196.                D$=I$+F$
  197.                If Exist(D$)=0
  198.                   Mkdir D$
  199.                   Bsave I$+F$+".info",Start(14) To Start(14)+Length(14)
  200.                End If 
  201.                I$=I$+F$+"/"
  202.                C=CC+1
  203.             Loop 
  204.             '
  205.          End If 
  206.          '
  207.          If Right$(HD$,1)<>"/"
  208.             If Right$(HD$,1)<>":"
  209.                HD$=HD$+"/"
  210.             End If 
  211.          End If 
  212.          '
  213.          _SETUP_MENU[13]
  214.          On Error Goto _ERR
  215.          If Exist(HD$+"AMOS_DATA")=0
  216.             Mkdir HD$+"AMOS_DATA"
  217.             Bsave HD$+"AMOS_DATA.info",Start(14) To Start(14)+Length(14)
  218.          End If 
  219.          If Exist(HD$+"Extras")=0
  220.             Mkdir HD$+"Extras"
  221.             Bsave HD$+"Extras.info",Start(14) To Start(14)+Length(14)
  222.          End If 
  223.          '
  224.          _INSTALL["AMOS:",HD$,"your AMOS Program disc"]
  225.          E=Param : Exit If Param
  226.          _INSTALL["AMOS_DATA:",HD$+"AMOS_DATA/","your AMOS Data disc"]
  227.          E=Param : Exit If Param
  228.          _INSTALL["Extras:",HD$+"Extras/","your AMOS Extras disc"]
  229.          E=Param : Exit If Param
  230.          '
  231.          E=0 : _SETUP_MENU[5] : Exit 2
  232.          '
  233.       Loop 
  234.       '
  235.       If E>0 : _SETUP_MENU[6+E] : End If 
  236.       '
  237.       If E<0 : _SETUP_MENU[15] : Exit : End If 
  238.       '
  239.       Exit If QUIT
  240.       '
  241.    Loop 
  242.    Pop Proc
  243.    '
  244.    _ERR: Bell : _SETUP_MENU[11] : Resume _END
  245.    _END:
  246. End Proc
  247. Procedure _INSTALL[S$,DEST$,AL$]
  248.    '
  249.    VACT$=VER$
  250.    '
  251.    C=Instr(DEST$,":") : ROOT$=Left$(DEST$,C)
  252.    '
  253.    _GET_DISC["Df0:",S$,AL$]
  254.    If QUIT : E=-1 : Goto _END : End If 
  255.    INFO["Reading directory."]
  256.    '
  257.    SRCE$="Df0:" : _GET_ALL[SRCE$]
  258.    E=Param : If E : Goto _END : End If 
  259.    '
  260.    On Error Goto _ERR
  261.    '
  262.    For N=0 To NDIR-1
  263.       '
  264.       If Inkey$=Chr$(27) : E=-1 : Goto _END : End If 
  265.       '  
  266.       N$=DR$(N) : Gosub _FILTER
  267.       '
  268.       If F
  269.          If Instr(N$,"/")
  270.             For C=Len(N$) To 1 Step -1
  271.                Exit If Mid$(N$,C,1)="/"
  272.             Next 
  273.             P$=Left$(N$,C-1)
  274.             If Exist(P$)=0 : Mkdir P$ : End If 
  275.          End If 
  276.       End If 
  277.       '
  278.    Next 
  279.    '
  280.    For NF=0 To NFILE-1
  281.       '
  282.       If Inkey$=Chr$(27) : E=-1 : Goto _END : End If 
  283.       '
  284.       LF=SZ(NF) : N$=F$(NF) : Gosub _FILTER
  285.       '
  286.       If F
  287.          _FILE_COPY[F$(NF),N$,SZ(NF)] : E=6 : Exit If Param
  288.       End If 
  289.       '
  290.    Next 
  291.    '
  292.    E=0 : Goto _END
  293.    '
  294.    _FILTER:
  295.    F=0 : Restore DTS
  296.    Do 
  297.       '
  298.       Read S1$,S2$,S3$,S4$ : Exit If S1$=""
  299.       '
  300.       U$=Upper$(N$)
  301.       A$=Left$(S1$,1) : B$=Left$(S2$,1)
  302.       S1$=Mid$(S1$,2) : S2$=Mid$(S2$,2)
  303.       '
  304.       FF=0
  305.       If A$="<" : If Left$(U$,Len(S1$))=S1$ : FF=-1 : End If : End If 
  306.       If A$=">" : If Right$(U$,Len(S1$))=S1$ : FF=-1 : End If : End If 
  307.       If A$=" " : If U$=S1$ : FF=-1 : End If : End If 
  308.       If A$="*" : FF=-1 : End If 
  309.       '
  310.       If FF
  311.          FF=0
  312.          If B$="<" : If VACT$<S2$ : FF=-1 : End If : End If 
  313.          If B$=">" : If VACT$>S2$ : FF=-1 : End If : End If 
  314.          If FF
  315.             N$=Mid$(N$,Len(S3$)+1)
  316.             N$=S4$+N$ : F=-1
  317.          End If 
  318.          Exit 
  319.       End If 
  320.    Loop 
  321.    Return 
  322.    '
  323.    DTS:
  324.    Data "<C/",">9","",""
  325.    Data "<S/",">9","",""
  326.    Data "<LIBS/",">9","",""
  327.    Data "<L/",">9","",""
  328.    Data "<DEVS/",">9","",""
  329.    Data " .INFO",">9","",""
  330.    Data " DISK.INFO",">9","",""
  331.    Data " INSTALL.AMOS",">9","",""
  332.    Data ">AMOS_SYSTEM.INFO",">0","",ROOT$
  333.    Data "<AMOS_SYSTEM/",">0","",ROOT$
  334.    Data "*",">0","",DEST$
  335.    Data "","","",""
  336.    '
  337.    _ERR: E=6 : Resume _END
  338.    _END:
  339. End Proc[E]
  340. Procedure _FILE_COPY[S$,D$,S]
  341.    '
  342.    On Error Goto _ERR
  343.    '
  344.    If S>MXSIZE : Stop : End If 
  345.    '  
  346.    INFO["Installing "+S$]
  347.    Bload SRCE$+S$,Start(BCOPY)
  348.    '
  349.    If Right$(S$,5)=".info"
  350.       Loke Start(BCOPY)+$3A,$80000000
  351.       Loke Start(BCOPY)+$3E,$80000000
  352.       A$=Upper$(S$)
  353.       If(Right$(A$,10)=".AMOS.INFO") or(Right$(A$,13)="DEF_ICON.INFO")
  354.          S=Length(13)
  355.          Copy Start(13),Start(13)+S To Start(BCOPY)
  356.          H=Hunt(Start(BCOPY) To Start(BCOPY)+S,":AMOS")
  357.          If H
  358.             OL=Peek(H-1) : N$=HD$+"AMOS1.3"+Chr$(0) : L=Len(N$)
  359.             Poke H-1,L : Copy Varptr(N$),Varptr(N$)+L+1 To H
  360.             S=S-OL+L
  361.          End If 
  362.       End If 
  363.    End If 
  364.    '  
  365.    Bsave D$,Start(BCOPY) To Start(BCOPY)+S
  366.    Goto _END
  367.    '
  368.    _ERR: E=-1 : Resume _END
  369.    _END:
  370. End Proc[E]
  371. Procedure _GET_ALL[F$]
  372.    PATH$=F$ : NDIR=0 : NFILE=0 : ERR=0
  373.    _GET_FILES[F$]
  374. End Proc[ERR]
  375. Procedure _GET_FILES[F$]
  376.    '
  377.    Dim D$(50)
  378.    '
  379.    On Error Proc DERR
  380.    Resume Label EERR
  381.    '
  382.    If ERR=0
  383.       A$=Dir First$(F$+"**")
  384.       While A$<>""
  385.          '
  386.          If Inkey$=Chr$(27) : ERR=-1 : End If 
  387.          '  
  388.          If Left$(A$,1)="*"
  389.             D$(NDOS)=(Mid$(A$,2,LFILE)-" ")+"/"
  390.             DR$(NDIR)=(F$+D$(NDOS))-PATH$
  391.             Inc NDOS : Inc NDIR
  392.          Else 
  393.             SZ(NFILE)=Val(Mid$(A$,LFILE))
  394.             F$(NFILE)=(F$+Left$(A$,LFILE)-" ")-PATH$
  395.             Inc NFILE
  396.          End If 
  397.          A$=Dir Next$
  398.       Wend 
  399.       '
  400.       If NDOS
  401.          For N=0 To NDOS-1
  402.             _GET_FILES[F$+D$(N)]
  403.          Next 
  404.       End If 
  405.       '
  406.    End If 
  407.    EERR:
  408.    '  
  409. End Proc
  410. Procedure DERR
  411.    ERR=6 : NFILE=0 : NDIR=0
  412.    Resume Label 
  413. End Proc
  414. Procedure _SETUP_MENU[PAGE]
  415.    Shared XX,YY
  416.    Dim JMP$(64),ZIT(64),ITZ(64),ZBASE(64)
  417.    QUIT=0
  418.    _MAKE_SETUP_SCREEN
  419.    ' Handle menu
  420.    MK_MENU:
  421.    Curs Off : Gosub DR_MENU
  422.    If EX : Pop Proc : End If 
  423.    NOZ=1
  424.    Do 
  425.       Repeat 
  426.          Multi Wait 
  427.          Z=Mouse Zone : K=Mouse Key
  428.          If Z<>OLDZ
  429.             If OLDZ>0 : ACT=-1 : IT=ZIT(OLDZ) : OLDZ=-1 : Gosub DR_ITEM : End If 
  430.             If Z>0 : OLDZ=Z : ACT=Z : IT=ZIT(Z) : ZNE=ZBASE(IT) : Gosub DR_ITEM : End If 
  431.          End If 
  432.       Until Z<>0 and K<>0
  433.       If JMP$(Z)<>"" : Gosub JMP$(Z) : End If 
  434.       ACT=Z : ZNE=ZBASE(IT) : Gosub DR_ITEM
  435.       If K=1 : Repeat : Multi Wait : Until Mouse Key=0 : End If 
  436.    Loop 
  437.    '  
  438.    '
  439.    ST_FLAG: V=1-V : Gosub "POK"+VTYPE$ : Return 
  440.    ' Draw menu page 
  441.    DR_MENU:
  442.    Reserve Zone 64
  443.    IT=0 : ZNE=1 : NOZ=0 : ACT=-1 : OLDPAR=-1
  444.    Repeat 
  445.       Inc IT : ZBASE(IT)=ZNE : Gosub DR_ITEM
  446.    Until FLAG=False
  447.    Return 
  448.    ' Draw one menu item 
  449.    DR_ITEM:
  450.    LAB$="L"+(Str$(PAGE)-" ")+"_"+(Str$(IT)-" ")
  451.    On Error Goto NO_IT
  452.    Restore LAB$ : Read IT$
  453.    M=0 : XX=-1
  454.    Repeat 
  455.       NEND=Instr(IT$,"|",M+1)
  456.       ENC=0 : LBL$="" : FL=0 : ZZ=0 : NB=0
  457.       Repeat 
  458.          N=M+1
  459.          M=Instr(IT$,",",N) : M2=Instr(IT$,":",N) : If M>M2 : M=0 : End If 
  460.          If M=0 or(NEND<>0 and M1>NEND) : M=M2 : FL=1 : End If 
  461.          A$=Upper$(Mid$(IT$,N,1)) : Inc N
  462.          If A$="E" : ENC=1 : End If 
  463.          If A$="L" : Gosub GT_STR : LBL$=A$ : Inc ZZ : End If 
  464.          If A$="C" : CNT=1 : End If 
  465.          If A$="X" : Gosub GT_STR : XX=Val(A$) : End If 
  466.          If A$="Y" : Gosub GT_STR : YY=Val(A$) : End If 
  467.          If A$="V" : Gosub GT_STR : PAR=Val(A$) : End If 
  468.          If A$="W" : Gosub GT_STR : PAR$=A$ : End If 
  469.          If A$="Q" : EX=1 : Error 32 : End If 
  470.       Until FL
  471.       If NEND
  472.          A$=Mid$(IT$,M+1,NEND-M-1)
  473.       Else 
  474.          A$=Mid$(IT$,M+1)
  475.       End If 
  476.       Gosub DR_WORD
  477.       M=NEND
  478.    Until NEND=0
  479.    On Error 
  480.    FLAG=True
  481.    Return 
  482.    '
  483.    DR_WORD:
  484.    If XX<0 : XX=40-Len(A$)/2 : End If 
  485.    Locate XX,YY
  486.    '
  487.    FST=0
  488.    '
  489.    If Left$(A$,1)="&"
  490.       A$=Mid$(A$,2,1)
  491.       If A$="R"
  492.          A$=Upper$(Left$(NAMES$,3)) : A$=A$+Space$(3-Len(A$))
  493.          A$=A$+REG$
  494.       End If 
  495.    End If 
  496.    '
  497.    X1=X Graphic(XX)-3 : Y1=Y Graphic(YY)-2 : X2=X Graphic(XX+Len(A$))+2 : Y2=Y1+11
  498.    '
  499.    If ZZ<>0 or NOZ=0 or FST<>0
  500.       Inverse Off : If ZZ<>0 and ACT=ZNE : Inverse On : End If 
  501.       Print A$;
  502.       If ENC<>0 and NOZ=0 : Box X1,Y1 To X2,Y2 : End If 
  503.    End If 
  504.    If ZZ<>0
  505.       If NOZ=0
  506.          Set Zone ZNE,X1,Y1 To X2,Y2
  507.          ZIT(ZNE)=IT : ITZ(IT)=ZNE
  508.          If LBL$<>""
  509.             JMP$(ZNE)=LBL$
  510.          End If 
  511.       End If 
  512.       Inc ZNE
  513.    End If 
  514.    XX=XX+(X2-X1)/8+1
  515.    Return 
  516.    '
  517.    NO_IT: Resume NO_IT2
  518.    NO_IT2: FLAG=False
  519.    Return 
  520.    '
  521.    GT_STR:
  522.    A$=Mid$(IT$,N,M-N)
  523.    Return 
  524.    '
  525.    MN_QUIT:
  526.    QUIT=-1 : PAR=0
  527.    MN_OUT:
  528.    Pop : Fade 1 : Wait 16 : Goto _END
  529.    MN_QUIT2:
  530.    QUIT=-1 : PAR=0
  531.    MN_OUT2:
  532.    Pop : Goto _END
  533.    '
  534.    ' Datas page 1 
  535.    L1_1: Data "C,Y2,E:         AMOS V"+VER$+" Hard-Disc Installer        "
  536.    L1_2: Data "C,Y06:Your AMOS package consists of three floppy discs. The installer"
  537.    L1_3: Data "C,Y07:will copy each one of them onto your hard-drive."
  538.    L1_4: Data "C,Y09:You must have at least 3 MBytes of free space on your drive."
  539.    L1_5: Data "C,Y11:You will be asked for a location of where to put your AMOS interpretor."
  540.    L1_6: Data "C,Y12:The installer will copy into it the contents of the AMOS Programs disc,"
  541.    L1_7: Data "C,Y13:that's where you'll find the interpretor itself."
  542.    L1_8: Data "C,Y15:The installer will also create two sub-folders, AMOS_DATA and"
  543.    L1_9: Data "C,Y16:Extras. It will copy to each of them the contents of the Data and"
  544.    L1_10: Data "C,Y17:Extras disc."
  545.    L1_11: Data "E,X55,Y23,LMn_Quit: Click here to go on "
  546.    '
  547.    ' Datas page 2 
  548.    L2_1: Data "C,Y02,E:         AMOS V"+VER$+" Hard-Disc Installer        "
  549.    L2_2: Data "C,Y04:The manual constantly refers to the three AMOS Master discs,"
  550.    L2_3: Data "C,Y05:AMOS:, AMOS_DATA:, and Extras:."
  551.    L2_4: Data "C,Y06:In order for you to be able to load all the examples from your"
  552.    L2_5: Data "C,Y07:hard-drive, AMOS has an auto-assign feature."
  553.    L2_6: Data "C,Y08:Each time you boot the AMOS interpretor, it creates three new assigns :"
  554.    L2_7: Data "C,X05,Y10:(1) The current directory is assigned to AMOS:"
  555.    L2_8: Data "C,X05,Y11:(2) If it can find the folder AMOS_DATA/ within the current directory,"
  556.    L2_9: Data "C,X05,Y12:    then AMOS_DATA: is assigned to it."
  557.    L2_10: Data "C,X05,Y13:(2) If it can find the folder Extras/ within the current directory,"
  558.    L2_11: Data "C,X05,Y14:    then Extras: is assigned to it."
  559.    L2_12: Data "C,Y16:The above assigns will not be set-up if they already exist."
  560.    L2_13: Data "C,Y17:So remove any of the three AMOS floppies from the drive before"
  561.    L2_14: Data "C,Y18:loading AMOS from your hard-disc."
  562.    L2_15: Data "C,Y20:With this extra-feature of AMOS, you can quickly use all the examples,"
  563.    L2_16: Data "C,Y21:and much more importantly, you do not need to change a single line in your"
  564.    L2_17: Data "C,Y22:startup-sequence!"
  565.    L2_18: Data "E,X55,Y23,LMn_Quit: Click here to go on "
  566.    '
  567.    ' Datas page 3 
  568.    L3_1: Data "C,Y05,E:        AMOS V"+VER$+" Hard-Disc Installer written by Fran�ois Lionet       "
  569.    L3_2: Data "C,Y08,E:               For any information or help, please contact :            "
  570.    L3_3: Data "X19,Y11:AMOS Customer Support"
  571.    L3_4: Data "X19,Y13:Europress Software Ltd,"
  572.    L3_5: Data "X19,Y14:Europa House, Adlington Park,"
  573.    L3_6: Data "X19,Y15:Adlington, Macclesfield"
  574.    L3_7: Data "X19,Y16:SK10 4NP"
  575.    L3_8: Data "X19,Y17:England"
  576.    L3_9: Data "C,X19,Y19:Phone: Uk 0625 859333 - Int +(44) 625 859333"
  577.    L3_10: Data "C,X19,Y20:Fax:   Uk 0625 879962 - Int +(44) 625 879962"
  578.    L3_11: Data "E,X55,Y23,LMn_Quit: Click here to go on "
  579.    '
  580.    ' Datas page 5 
  581.    L5_1: Data "C,Y10,E:                AMOS is now installed on your hard-drive!               "
  582.    L5_2: Data "E,X55,Y23,LMn_Quit: Click here to go on "
  583.    '
  584.    ' Datas page 6 
  585.    L6_1: Data "C,Y2,E:         AMOS V"+VER$+" Hard-Disc Installer        "
  586.    L6_2: Data "C,Y08:Please enter the full pathname of where you want to install AMOS,"
  587.    L6_3: Data 'C,Y09:then press <RETURN>. Example of pathname : "Device:Folder/Folder"'
  588.    L6_4: Data "C,Y11:Press <ESC> to abort."
  589.    L6_5: Data "E,X05,Y15: Pathname:                                                             "
  590.    L6_6: Data "X16,Y15,Q: "
  591.    '
  592.    ' Datas page 7 
  593.    L7_1: Data "C,Y2,E:         AMOS V"+VER$+" Hard-Disc Installer        "
  594.    L7_2: Data "C,Y11:>>> This device does not exist ! <<<"
  595.    L7_3: Data "C,Y15,E,LMn_Out2:                 Click here to enter a new pathname.               "
  596.    L7_4: Data "C,Y17,E,LMn_Quit:                  Click here to abort installation.                "
  597.    '
  598.    ' Datas page 8 
  599.    L8_1: Data "C,Y2,E:         AMOS V"+VER$+" Hard-Disc Installer        "
  600.    L8_2: Data "C,Y11:>>> Please enter a FULL pathname. Example: Device:Folder/Folder <<<"
  601.    L8_3: Data "C,Y15,E,LMn_Out2:                 Click here to enter a new pathname.               "
  602.    L8_4: Data "C,Y17,E,LMn_Quit:                  Click here to abort installation.                "
  603.    '
  604.    ' Datas page 9 
  605.    L9_1: Data "C,Y2,E:         AMOS V"+VER$+" Hard-Disc Installer        "
  606.    L9_2: Data "C,Y11:>>> Your hard-disc does not have enough free space : AMOS needs 3 MBytes <<<"
  607.    L9_3: Data "C,Y17,E,LMn_Quit:                  Click here to abort installation.                "
  608.    '
  609.    ' Datas page 10  
  610.    L10_1: Data "C,Y2,E:         AMOS V"+VER$+" Hard-Disc Installer        "
  611.    L10_2: Data 'C,Y11:>>> The path "'+PPAR$+'" does not exist ! <<<'
  612.    L10_3: Data "C,Y14,E,WOk,LMn_Out2:           Click here to create all the necessary folders.         "
  613.    L10_4: Data "C,Y16,E,WAb,LMn_Out2:                 Click here to enter a new pathname.               "
  614.    L10_5: Data "C,Y18,E,LMn_Quit:                  Click here to abort installation.                "
  615.    '
  616.    ' Datas page 11
  617.    L11_1: Data "C,Y2,E:         AMOS V"+VER$+" Hard-Disc Installer        "
  618.    L11_2: Data "C,Y06,E:  An error has occured while creating the new directories !  "
  619.    L11_3: Data "C,X01,Y08:(*) Please check the pathname, it must be a valid AmigaDos one."
  620.    L11_4: Data "C,X01,Y09:    Read Commodore documentation if necessary."
  621.    L11_5: Data "C,X01,Y11:(*) If you really don't know anything about pathnames, try the"
  622.    L11_6: Data "C,X01,Y12:    following, in order, until one of them works."
  623.    L11_7: Data 'C,X01,Y14:    "WORK:AMOS"'
  624.    L11_8: Data 'C,X01,Y15:    "DH1:AMOS"'
  625.    L11_9: Data 'C,X01,Y16:    "DH0:AMOS"'
  626.    L11_10: Data 'C,X01,Y17:    "FH1:AMOS"'
  627.    L11_11: Data 'C,X01,Y18:    "FH0:AMOS"'
  628.    L11_12: Data 'C,X01,Y19:    "SYS:AMOS"'
  629.    L11_13: Data "C,X01,Y21:    One of the above should work. If not, then check your hard-drive."
  630.    L11_14: Data "E,X55,Y23,LMn_Quit: Click here to go on "
  631.    '
  632.    ' Datas page 12  
  633.    L12_1: Data "C,Y2,E:         AMOS V"+VER$+" Hard-Disc Installer        "
  634.    L12_2: Data "C,Y08,E:  An error has occured while installing AMOS onto your hard-disc!  "
  635.    L12_3: Data "C,X01,Y12:(*) Please follow all the prompts."
  636.    L12_4: Data "C,X01,Y14:(*) Make sure your master discs do not have any read/write errors. If they"
  637.    L12_5: Data "C,X01,Y15:    happen to be badly duplicated, please send them to Europress for a free"
  638.    L12_6: Data "C,X01,Y16:    exchange. You will find the address in the 'About Europress' option in the"
  639.    L12_7: Data "C,X01,Y17:    menu."
  640.    L12_8: Data "C,X01,Y19:(*) Check your hard disc carefully."
  641.    L12_9: Data "E,X55,Y23,LMn_Quit: Click here to go on "
  642.    '
  643.    ' Datas page 12  
  644.    L13_1: Data "C,Y2,E:         AMOS V"+VER$+" Hard-Disc Installer        "
  645.    L13_2: Data 'C,Y11:>>> Copying the software onto your hard-disc <<<'
  646.    L13_3: Data "C,Y13:Press <ESC> to abort."
  647.    L13_4: Data "Q: "
  648.    '
  649.    ' Datas page 13  
  650.    L14_1: Data "C,Y2,E:         AMOS V"+VER$+" Hard-Disc Installer        "
  651.    L14_2: Data "C,Y06:The installer creates a folder named 'AMOS_System' "
  652.    L14_3: Data "C,Y07:in the root of the device chosen for the installation."
  653.    L14_4: Data "C,Y09:The folder is *essential* for AMOS to boot. In the current"
  654.    L14_5: Data "C,Y10:configuration, AMOS assumes the position of this folder, at the"
  655.    L14_6: Data "C,Y11:root of its own device. You should not try to move this folder"
  656.    L14_7: Data "C,Y12:anywhere else on your hard-disc before reading the documentation"
  657.    L14_8: Data "C,Y13:and understanding the way AMOS locates its system files."
  658.    L14_9: Data "C,Y16,E: AMOS will refuse to boot if it cannot find its AMOS_System folder! "
  659.    L14_10: Data "C,Y19:As a consequence, if you copy the AMOS1.3 file to another device,"
  660.    L14_11: Data "C,Y20:also remember to copy the AMOS_System folder to the root directory"
  661.    L14_12: Data "C,Y21:of this device..."
  662.    L14_13: Data "E,X55,Y23,LMn_Quit: Click here to go on "
  663.    '
  664.    ' Datas page 15  
  665.    L15_1: Data "C,Y2,E:         AMOS V"+VER$+" Hard-Disc Installer        "
  666.    L15_2: Data "C,Y12,E:  Installation aborted. Warning: AMOS is not properly installed!  "
  667.    L15_3: Data "E,X55,Y23,LMn_Quit: Click here to go on "
  668.    _END:
  669. End Proc[PAR]
  670. Procedure _GET_DISC[D$,N$,AL$]
  671.    Request Off 
  672.    _FIND_DISC[D$,N$]
  673.    If Param=0
  674.       Bell 61
  675.       INFO[">>> Please insert "+AL$+" into drive "+D$+" <<<"]
  676.       Repeat 
  677.          _FIND_DISC[D$,N$]
  678.          If Inkey$=Chr$(27) : QUIT=-1 : Exit : End If 
  679.       Until Param
  680.       INFO[""]
  681.       Wait 50
  682.    End If 
  683.    Request On 
  684. End Proc
  685. Procedure _FIND_DISC[D$,N$]
  686.    N$=Upper$(N$) : L=Len(N$)
  687.    On Error Goto _NO
  688.    For T=0 To 4 : Multi Wait : Next 
  689.    A$=Upper$(Disc Info$(D$))
  690.    If Left$(A$,L)=N$ Then F=-1
  691.    Goto _QUIT
  692.    '
  693.    _NO: F=0 : Resume _QUIT
  694.    _QUIT:
  695. End Proc[F]
  696. Procedure _LEDIT[ED$,XC,XX,YY,SX]
  697.    '
  698.    While Inkey$<>"" : Wend 
  699.    '  
  700.    PX=0 : L=Len(ED$) : If L>=SX : PX=L-SX : End If 
  701.    XC=Max(0,XC) : XC=Min(XC,L)
  702.    Curs On 
  703.    Do 
  704.       Gosub _DED
  705.       Repeat 
  706.          A$=Inkey$ : S=Scancode
  707.          If Mouse Key=1
  708.             X=(X Screen(X Mouse))/8-XX
  709.             If X>=0 and X<=L : XC=X : Gosub _DED : Wait Vbl : End If 
  710.          End If 
  711.       Until A$<>""
  712.       F=1
  713.       If A$=Chr$(13) : Exit : End If 
  714.       If A$=Chr$(27) : ED$="_Esc_" : Exit : End If 
  715.       If S=65 and XC+PX>0
  716.          ED$=Left$(ED$,XC+PX-1)+Mid$(ED$,PX+XC+1) : E=1 : L=L-1
  717.          S=79
  718.       End If 
  719.       If S=70 and XC+PX<L
  720.          ED$=Left$(ED$,XC+PX)+Mid$(ED$,PX+XC+2) : E=1 : L=L-1 : F=0
  721.       End If 
  722.       If S=79 and PX+XC>0
  723.          F=0
  724.          If XC=0
  725.             PX=PX-1
  726.          Else 
  727.             XC=XC-1
  728.          End If 
  729.       End If 
  730.       If S=78 and PX+XC<L
  731.          F=0
  732.          If XC=SX
  733.             PX=PX+1
  734.          Else 
  735.             XC=XC+1
  736.          End If 
  737.       End If 
  738.       If F
  739.          If A$>=" "
  740.             ED$=Left$(ED$,PX+XC)+A$+Mid$(ED$,PX+XC+1) : L=L+1
  741.             If L>SX
  742.                If XC>=SX
  743.                   PX=PX+1
  744.                Else 
  745.                   XC=XC+1
  746.                End If 
  747.             Else 
  748.                XC=XC+1
  749.             End If 
  750.          End If 
  751.       End If 
  752.    Loop 
  753.    Curs Off 
  754.    Goto _END
  755.    '
  756.    _DED:
  757.    Locate XX,YY : Print Mid$(ED$,PX+1,SX);
  758.    If E : If X Curs<XX+SX : Print " "; : E=0 : End If : End If 
  759.    Locate Min(XX+XC,XX+SX-1),YY
  760.    Return 
  761.    '
  762.    _END:
  763. End Proc[ED$]
  764. '