home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Art Works
/
Art Works.iso
/
apps
/
_installer
/
_runimage
(
.txt
)
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
NeXTSTEP
RISC OS/Acorn
UTF-8
Wrap
RISC OS BBC BASIC V Source
|
1996-03-26
|
28.5 KB
|
1,263 lines
> <installer$dir>.!RunImage
=&18000
FREE%=
DEBUG%=
grab_memory(0)
Block2%=
claim(256)
package$="ArtWorks"
*resource$="<installer$dir>.Resources."
!flatfile$=resource$+"massive"
channel%=
userName$=""
userAddress$=""
"XHourglass_Smash":!Block2%=
message(
,"Internal error "+
$+" "+
+"."+
),2):
"Wimp_Initialise",200,&4B534154,package$+" Installer"
,task%
"StreamSquash_Initialise",package$+" Installer"
"StreamSquash_InfoDecompress",,1
LZW_Needs%
Frame%=0
DRAG=2
GREY=1
NONE=-2
System_Page%=9
Source_Page%=&12
Dest_Page%=&11
Between_Page%=&13
Disc2_Page%=&14
GetNamePage%=&15
continue%=0
help%=1
goback%=2
stop%=3
get_mode_info
report("Yeig: "+
yeig%)
Indirect_Size%=1024
"2Script_Size% =
_FileSize(resource$+"!script")
#.Massive% =
_FileSize(resource$+"massive")
Massive% =
0,"There is no ""massive"" file within this installer":
SystSize%=32*1024
&ETemplate_Size% = (255 +
_FileSize(resource$+"templates"))
'3Button_Size% =
_FileSize(resource$+"buttons")
Announce_Size%=64*1204
)+Sprite_Len%=Announce_Size%+Button_Size%
Window%(8)
+$Template%=
claim(Template_Size%)
,$Indirect%=
claim(Indirect_Size%)
- Script%=
claim(Script_Size%)
Routes%=
claim(32)
Block%=
claim(4)
Block4%=
claim(1020)
black%=
claim(32)
PixelT%=
claim(16)
ScaleT%=
claim(16)
4DAnnounce$=resource$+"asq"+
yeig%<4,"20")+
yeig%>=4,"12")
5(Application$=
sysvar("ArtWorks$Dir")
System$=
getsystempath
7$Source$=
sysvar("Installer$Dir")
report("Source: "+Source$)
9,Reason$="(You clicked the Stop button)."
setsources
NoWimpPoll%=
width%=0
height%=0
Flags%=
IconHandle%=
ToFloppy%=
Swapping%=
Installed%=
Announced%=
Claimed%=
Percentage%=0
FloppySize%=0
BigFloppy%=&C8000
H8SpritePool%=
claim(Button_Size%+Announce_Size%+1024)
"XStreamSquash_FlatFileOpenIn",SpritePool%,,flatfile$
,FlatMin%,FlatMax%
J9Work_Area%=
claim(
bigger(FlatMin%-Announce_Size%,0))
Pages%=
_Load_Script
Current_Page%=0
Current_RPtr%=Routes%
Return_Page%=
_sprites
poll_mask%=1
1<<4
1<<5
clicked%=0
clickicon%=0
Frames%=
_templates
Last%=Frames%-1
"Wimp_Poll",poll_mask%,Block%
reason%
reason%
handle_redraw
OpenWindow
decode_drag
click%=Block%!8
icon%=Block%!16
icon%>=0
icon%<6
(click%=4
click%=1)
icon%=
_clicked(icon%):Current_Page%=
_Page(Current_Page%,icon%)
icon%=8
click%=&40
drag_it(Block%!0,Block%!4)
17,18:
receive(Block%!16)
(reason%=17
reason%=18)
Block%!16=0
_clicked(button%)
_IconState(Current_Page%,button%
255,
button%
256
>T%+15
-12):
_IconState(Current_Page%,button%
255,
=button%
_IconState(p%,i%,s%)
p%=Routes%-(p%<<4)
w%=Window%((p%?&D)
w%=0
notext%
notext%=3
black%!0 = w%
black%!4 = i%
s%=DRAG
black%!8 = 10<<12
black%!12 = 15<<12
s%=GREY
}.black%!8 = 2<<24
0<<12
1<<28
notext%
~9black%!12= 15<<24
1<<21
15<<12
15<<28
notext%
s%=NONE
black%!8 = 0
black%!12= notext%
15<<12
Vblack%!8 = (1<<21
s%)
3<<12
(1<<28
s%=0)
(14<<28
s%)
7<<24
notext%
Bblack%!12= 1<<21
15<<12
15<<12
15<<28
15<<24
notext%
"Wimp_SetIconState",,black%
_GetIconString(win%,icon%)
data%
win%=Routes%-(win%<<4)
win%=Window%((win%?&D)
win%=0
Block%!0 = win%
Block%!4 = icon%
"Wimp_GetIconState",,Block%
data% = !(Block%+28)
len% = (!(Block%+36))-1
rtoz1(data%,len%)
_Page(this_page%,button%)
next_page%, next_frame%, route_ptr%, button_type%, action%
*route_ptr% = Routes% - (this_page%<<4)
button%=button%
'next_page% = route_ptr%?(button%+4)
next_page%
&E0
next_page%=
action(this_page%,next_page%)
next_page%<0
next_page%>=Pages%
0,"Bad route in script file"
*route_ptr% = Routes% - (next_page%<<4)
'next_frame% = (route_ptr%?&D)
next_page%<>this_page%
!Block%=Window%(Frame%)
"Wimp_CloseWindow",,Block%
_IconState(next_page%,8,NONE)
button%=0
'button_type%=route_ptr%?(button%+4)
button_type%=next_page%
Announced%
((button_type%
&40)=next_page%) :action%=GREY
button_type%=&80 :action%=NONE
button_type%=&81 :action%=
_IconState(next_page%,8,DRAG)
:action%=
_IconState(next_page%,button%,action%)
_open(next_frame%,Frame%)
Return_Page%=this_page%
Frame%=next_frame%
next_page% = GetNamePage%
"Wimp_SetCaretPosition",Window%(Frame%),9,0,0,-1,0
=next_page%
action(from%,command%)
result%
result%=
command%
&20 :
Installed%=
(command%
&1F)=0
pop_up:
&40 :
from%
free_announce
Announced%=0
result%=0
Application$=""
System$=""
result%=&F
&15 :userName$ =
_GetIconString(from%,9)
&userName$ =
tidyString(userName$)
,userAddress$ =
_GetIconString(from%,10)
,userAddress$ =
tidyString(userAddress$)
(userName$) < 2
(userAddress$) < 2
result% = GetNamePage%
&60 :Installed%=
floppy:
"Hourglass_Off"
Installed%<>
Percentage%=0:
update_bar:result%=from%
Installed%>0
result%=Installed%
&80 :result%=from%
&A0 :
"Wimp_SlotSize",&8000+
"Wimp_StartTask","%run "+Application$
&C0 :
"Hourglass_On":Installed%=
unpack(Application$):
"Hourglass_Off"
Installed%<>
Percentage%=0:
update_bar:result%=from%
Installed%>0
result%=Installed%
&E0 :result%=Return_Page%:Reason$="(You clicked the Stop button)."
result%=
result%=command%
=result%
_templates
End%,Frame%,Tail$,More%,This%
Tail$=
12," ")
Next%=Indirect%
!End%=Indirect%+Indirect_Size%
Frame%=0
"Wimp_OpenTemplate",,resource$+"Templates"
"Wimp_LoadTemplate",,Template%,Next%,End%,
,"Info"+Tail$,0
,,Next%,,,More%
"Wimp_LoadTemplate",,Template%,Next%,End%,
(Frame%)+Tail$,0
,,Next%,,,More%
Template%!64=SpritePool%
"Wimp_CreateWindow",,Template%
Window%(Frame%)
Frame%+=1
Frame%=3
"!Block%=Window%(0):Block%!4=10
"Wimp_GetIconState",,Block%
VersionPtr%=Block%!28
"Wimp_CloseTemplate"
(channel%=
"<installer$dir>.!Version"
Flags%=0
4:Version%=
#channel%,9)):
#channel%:channel%=
?Version$=
(Version%
1000)+"."+
"00"+
(Version%
1000),3)
$VersionPtr%=
Version$,5)
_open(0,
_IconState(0,goback%,GREY)
=Frame%
_open(Now%,Then%)
Then%>
Block%!0 = Window%(Then%)
"Wimp_GetWindowState",,Block%
(height%=(Template%!12)-(Template%!4)
'width%= (Template%!8)-(Template%!0)
#Block%!4 = (ScrnX%-width%)
$Block%!8 = (ScrnY%-height%)
"Block%!12 = width% + Block%!4
"Block%!16 = height% + Block%!8
Block%!20 = 0
Block%!24 = 0
Block%!0 = Window%(Now%)
Block%!28 =
OpenWindow
OpenWindow
"Wimp_OpenWindow",,Block%
Yadjust%=Block%!8-Block%!16
pop_up
Installed%=
"XOS_CLI","%wimptask %run "+Application$+".!Boot"
"XOS_CLI","%set alias$open_installed Filer_OpenDir "+
filepath(Application$)
"XOS_CLI","open_installed"
"XOS_CLI","%unset alias$open_installed"
SaveUserName(dest$)
nl$,qu$,out$,f$,l%,Choices%,Top%,Base%
sout$="[ UserInfo_choices"+nl$+" UserName "+qu$+userName$+qu$+nl$+" UserAddress "+qu$+userAddress$+qu$+nl$+"]"
f$=dest$+"!Choices"
out$
Choices% =
_FileSize(f$)
%ChoiceBuff% =
claim(Choices%+l%)
"OS_File",16,f$,ChoiceBuff%
Cptr% = ChoiceBuff%
Cend% = ChoiceBuff%+Choices%
(Cptr%<Cend%
Cptr%?0=
Cptr%?1=32
Cptr%?2=
s$=""
(Cptr%<Cend%
(?Cptr%>31))
s$=s$+
?Cptr%
Cptr%+=1
"f% = (s$="[ UserInfo_choices")
Cptr%+=1
Top%=Cend%
Base%=Cptr%-19
Top%=Cptr%
(Cptr%<Cend%
f% = (?Cptr%=
Cptr%+=1
Top%=Cptr%
ScriptLen%=Top%-Base%
diff% = l%-ScriptLen%
shiftbuff(Top%, Top%+diff%, Cend%-Top%)
Cend%+=diff%
pokestr(out$,Base%)
pokestr(nl$+out$+nl$,Top%)
Cend%=Cend%+l%-1
"OS_File",10,f$,&FFF,,ChoiceBuff%,Cend%
5 FREE%=
claim(-(Choices%+l%))
shiftbuff(start%,end%,len%)
len%>0
start%>end%
l%=0
len%-1
end%?l%=start%?l%
l%=(len%-1)
end%?l%=start%?l%
pokestr(s$,buff%)
s$>0
l%=1
?buff%=
s$,l%,1)
buff%+=1
"XStreamSquash_Exit"
channel%<>
#channel%
"XWimp_CloseDown",task%,&4B534154
message(number%,message$,flags%)
message$<>""
!FREE%=number%:$(FREE%+4)=message$+
0:number%=FREE%
"Wimp_ReportError",number%,flags%,package$+" Installer"
,flags%
=flags%
_sprites
File_Size%,Source%
X!Source%=Work_Area%+LZW_Needs%
SpritePool%!0= Sprite_Len%
SpritePool%!8=16
"OS_SpriteOp",256+9,SpritePool%
\$File_Size%=
_FileSize(Announce$)
"OS_File",&10,Announce$,Source%
"StreamSquash_OpenDecompress",Work_Area%,1
"StreamSquash_DecompressBlock",Work_Area%,Source%,File_Size%,SpritePool%+4,Sprite_Len%
,A%,B%,C%,D%
"StreamSquash_CloseDecompress",Work_Area%,A%,B%,C%,D%
(E%
3)<>0
0,"AnnounceSq is corrupted."
"OS_SpriteOp",256+11,SpritePool%,resource$+"buttons"
fill%=0
yeig%
"OS_SpriteOp",256+32,SpritePool%,"announce",0
"OS_SpriteOp",256+60,SpritePool%,"announce",1
"Wimp_SetColour",1
0,0,10,512
0,464,966,16
956,0,966,512
"OS_SpriteOp",256+60,SpritePool%,
free_announce
"XOS_SpriteOp",&119,SpritePool%,"announce",1
"OS_SpriteOp",&108,SpritePool%
,,,,,Sprite_Len%
SpritePool%!0=Sprite_Len%
Announced%=
r!FREE%=
claim(-Announce_Size%)
handle_redraw
flag%
"Wimp_RedrawWindow",,Block%
flag%
redraw_window(!Block%,flag%)
redraw_window(handle%,flag%)
slab%
{2slab%=(?(Routes%-(Current_Page%<<4)+&D))
flag%<>0
NoWimpPoll%
"Wimp_SetColour",1:
36+Block%!4,184+Block%!8,width%,height%
!Block%=handle%
ridge(32+Block%!4,16+Block%!8,912,72)
(slab%
&80)=0
ridge(32+Block%!4,108+Block%!8,912,472)
slab%
&10
slab(64+Block%!4,124+Block%!8,844,48)
slab%
&20
slab(64+Block%!4,192+Block%!8,168,132)
slab%
&40
slab(716+Block%!4,172+Block%!8,-656,-44):
draw_bar(76+Block%!4,140+Block%!8,6.20*Percentage%,20)
_Recite(Current_Page%,Block%!4,Block%!8)
"Wimp_GetRectangle",,Block%
flag%
update_bar
force_update(76,140,704,164)
flicker(Current_Page%,disc$)
Swapping%
FromCD%
discname(disc$)<>
whatdisc
showpage(Current_Page%)
>T%+100
discname(disc$)=
whatdisc
_clicked(256)
_IconState(Current_Page%,0,GREY)
showpage(Between_Page%)
showpage(Current_Page%)
NoWimpPoll%=
force_update(48,100,938,570)
NoWimpPoll%=
force_update(Block%!4,top%,Block%!12,bot%)
flag%
!Block%=Window%(1)
Block%!8=top%+Yadjust%
Block%!16=bot%+Yadjust%
"Wimp_UpdateWindow",,Block%
flag%
redraw_window(Window%(1),flag%)
draw_bar(x%,y%,w%,h%)
"Wimp_SetColour",11
x%,y%,w%,h%
"Wimp_SetColour",1
xeig%+x%+w%,y%,630-w%,h%
ridge(x%,y%,w%,h%)
"Wimp_SetColour",2
x%,y%,w%,3
x%,y%-4,3,h%+2
x%,y%+h%,w%,3
x%+w%,y%,3,h%+2
x%+w%+4,y%+h%+2,1,1
x%+6,y%,1,1
"Wimp_SetColour",0
x%+4,y%-4,w%+2,3
x%+4,y%-4,3,h%
x%+4,y%+h%-4,w%-6,3
x%+w%+4,y%,3,h%+2
x%+w%,y%+h%-2,1,1
x%+2,y%-4,1,1
"Wimp_SetColour",2
slab(x%,y%,w%,h%)
"Wimp_SetColour",4
x%,y%+h%,w%,3
x%,y%,3,h%
"Wimp_SetColour",0
x%+2,y%,w%-2,3
x%+w%,y%,3,h%-2
_Recite(Page%,x%,y%)
lines%,vpos%,textptr%,endptr%,gap%
"Wimp_SetColour",7
vpos%=560+y%
DEBUG%
4+x%,600+y%:
;~Page%;" ";
textptr%=Routes%-(Page%<<4)
endptr%=textptr%!-16
gap%=(textptr%?14)*4
gap%<32
gap%>255
gap%=32
textptr%=!textptr%
lines%=0
y%<vpos%
textptr%<endptr%
$textptr%,1)
"\" :vpos%+=gap%
">" :
x%+gap%+224,vpos%:
$textptr%,2);
"|" :
(890-16*
($textptr%))
2+48+x%,vpos%:
$textptr%,2);
"$" :
x%+gap%+32,vpos%:
$textptr%,2)+"$");
"@"
"Wimp_ReadPixTrans",&100,SpritePool%,"artfloppy",,,,ScaleT%,PixelT%
"OS_SpriteOp",256+52,SpritePool%,
$textptr%,2),x%+gap%+32,vpos%-64,,ScaleT%,PixelT%
vpos%+=gap%
x%+gap%+32,vpos%:
;$textptr%;
vpos%-=gap%
lines%+=1
textptr%+=(
$textptr%)+1
writeln(Page%,Line%,text$)
pageptr%,textptr%,loop%
pageptr%=Routes%-(Page%<<4)
textptr%=!pageptr%
loop%=Line%
loop%>0
loop%<16
textptr%+=(
$textptr%)+1
loop%-=1
loop%=0
Page%=Current_Page%
"Wimp_ForceRedraw",Window%(&F
pageptr%?&D),64,128+Yadjust%,64+844,Yadjust%+48+124
_Load_Script
TextPtr%,RoutePtr%,Pages%,Words%
#channel%=
(resource$+"!script")
Pages%=0
TextPtr%=Script%
RoutePtr%=Routes%
Next$=
#channel%
#channel%
!RoutePtr%=TextPtr%
Words%=4
'RoutePtr%!Words%=
("&"+
Next$,2,8))
Next$=
#channel%
RoutePtr%-=16
Pages%+=1
RoutePtr%<=TextPtr%
("Badly formed script file")
Next$,1)<>"["
$TextPtr%=Next$
TextPtr%+=1+
Next$
Next$=
#channel%
#channel%
Next$,1)="["
#channel%
channel%=
!RoutePtr%=TextPtr%
=Pages%
drag_it(mx%,my%)
hnd%
hnd%=Window%(Frame%)
dragIcon%=icon%
1!Block%=hnd%:
"Wimp_GetWindowState",,Block%
bx%=Block%!4-Block%!20
by%=Block%!16-Block%!24
>!Block%=hnd%:Block%!4=icon%:
"Wimp_GetIconState",,Block%
ix0%=Block%!8
iy0%=Block%!12
ix1%=Block%!16
iy1%=Block%!20
!Block%=hnd%
Block%!4=5
Block%!8=bx%+ix0%
Block%!12=by%+iy0%
Block%!16=bx%+ix1%
Block%!20=by%+iy1%
Block%!24=Block%!8-mx%
Block%!28=Block%!12-my%
!"Block%!32=ScrnX%+Block%!16-mx%
""Block%!36=ScrnY%+Block%!20-my%
"Wimp_DragBox",,Block%
get_mode_info
Block2%!0=4
Block2%!4=5
Block2%!8=11
Block2%!12=12
Block2%!16=-1
"OS_ReadVduVariables",Block2%,Block2%+20
xeig%=1<<(Block2%!20)
yeig%=1<<(Block2%!24)
ScrnX%=(Block2%!28+1)*xeig%
ScrnY%=(Block2%!32+1)*yeig%
receive(reason%)
block%,tail$,name$
block%=Block%
Current_Page%=System_Page%
tail$="!System"
tail$="!"+package$
reason%
block%!36=-1
8%name$=
filepath(
rtoz(block%+44))
name$<>""
name$+="."+tail$
block%!16=3
block%!12=block%!8
"Wimp_SendMessage",17,block%,block%!4
&400C1 :
get_mode_info
3 :name$=
rtoz(Block%+44)
Block%!12=Block%!8
Block%!12=4
"Wimp_SendMessage",18,Block%,Block%!4
upper(
filename(name$))<>
upper(tail$)
name$=""
name$<>""
Current_Page%=System_Page%
F&System$=
filepath(name$)+"."+tail$
H+Application$=
filepath(name$)+"."+tail$
writeln(Current_Page%,12,name$+"."+tail$)
filepath(path$)
(path$)
cc%>0
path$,cc%,1)<>"."
cc%-=1
path$,0<cc%
cc%-1 )
filepath1(path$)
(path$)
cc%>0
path$,cc%,1)<>","
cc%-=1
cc%=0
path$,
(path$)-cc%)
filename(path$)
(path$)
cc%>0
path$,cc%,1)<>"."
cc%-=1
path$,0<cc%
cc%+1)
upper(mixed$)
cc%,alpha%
(mixed$)
cc%>0
alpha%=
mixed$,cc%,1)
alpha%>96
alpha%<123
mixed$,cc%,1)=
(alpha%
223)
cc%-=1
=mixed$
rtoz(p%)=
rtoz1(p%,255)
rtoz1(p%,l%)
o q$=""
(?p%)>31
l%>0
q$=q$+
p%+=1:l%-=1
ztor(string$,address%)
$address% = string$
?(address%+
(string$)) = 0
tidyString(string$)
string$,1) = " "
{$string$ =
string$,
(string$)-1)
string$,1) = " "
~$string$ =
string$,
(string$)-1)
=string$
decode_drag
"Wimp_GetPointerInfo",,Block%
mx%=!Block%
my%=Block%!4
h%=Block%!12
i%=Block%!16
drag_filepath(h%,i%,mx%,my%,&DDD,-1)
drag_filepath(h%,i%,mx%,my%,ft%,task%)
!Block%=(48+
("$"))
Block%!12=0
Block%!16=1
Block%!20=h%
Block%!24=i%
Block%!28=mx%
Block%!32=my%
Block%!36=0
Block%!40=ft%
$(Block%+44)="$"
"?(Block%+44+
($(Block%+44)))=0
"Wimp_SendMessage",17,Block%,h%,i%
saveref%=Block%!8
floppy
FloppyName$
FloppyName$=
whatdisc
FloppyName$="ArtWorks1"
message(0,"That's the installer disc ... please put in a blank disc",1)
FloppyName$=""
write_prot(FloppyName$)
message(0,"That disc is read-only ... please adjust the write-protect tab",1)
"XADFS_FreeSpace","0"
FloppySize%;flags%
flags%
FloppySize%=0:=0
FloppySize%<&C7000
_FileSize("adfs::0.$.!ArtWorks")=
message(0,"There isn't enough space on that disc for ArtWorks",1)
5Application$="ADFS::"+FloppyName$+".$.!"+package$
ToFloppy%=
TSwapping%=ToFloppy%
upper(
Source$,
("ADFS::ArtWorks1.")))="ADFS::ARTWORKS1."
report(
upper(
Source$,
("ADFS::ArtWorks1."))))
report("Swapping "+
~Swapping%)
"Hourglass_On"
unpack(Application$)
unpack(dest$)
Work_Area%,buffer%,read_ptr%,next_ptr%,write_ptr%,name$,path$,start%,rewind%,thruput%,upto%,headroom%
load%,exec%,size%
"XOS_Byte",229,1:Reason$=
=17),"(You pressed Escape)")+
<>17),"Reason: "+
$,40)+" at &"+
~(&8000+(
10))):=2
"XOS_Byte",229
buttons%=1
buttons%<>4
_IconState(Current_Page%,buttons%,GREY)
thruput%=0
2MaxThruPut%=Massive%+(SystSize%
ToFloppy%=
Claimed%
grab_memory(FlatMax%-FlatMin%)
report(
Claimed%=
#Work_Area% =
claim(LZW_Needs%)
flicker(Source_Page%,Source$)
#channel%=
(resource$+"massive")
"XOS_GBPB",4,channel%,FREE%,32
Largest_Src%=FREE%!12
Largest_LZW%=FREE%!8
Largest%=FREE%!4
%Save_Area% =
claim(Largest_Src%)
buffer%=FREE%
headroom%=Z%
path$=""
read_ptr%=buffer%
flicker(Source_Page%,Source$)
rewind%=
#channel%
"XOS_GBPB",4,channel%,read_ptr%,32
%next_ptr%=(read_ptr%!4)+read_ptr%
$len%=(read_ptr%!4)-(read_ptr%!8)
next_ptr%<=headroom%
"XOS_GBPB",4,channel%,read_ptr%+32,(read_ptr%!4)-32
thruput%+=len%
6Percentage%=100*thruput%
MaxThruPut%:
update_bar
read_ptr%=next_ptr%
#channel%=rewind%
next_ptr%>headroom%
#channel%
upto%=read_ptr%
#channel%
#channel%
channel%=
dest$,1)<>"."
"OS_File",16,resource$+"!Run",Save_Area%
,,A%,B%,C%
"OS_File",16,resource$+"!RunImage",Save_Area%+C%
,,D%,E%,F%
ToFloppy%
showpage(Between_Page%)
flicker(Dest_Page%,dest$)
"OS_CLI","CDIR "+dest$
dest$+="."
"OS_File",0,dest$+"!Run",A%,B%,Save_Area%,Save_Area%+C%
"OS_File",0,dest$+"!RunImage",D%,E%,Save_Area%+C%,Save_Area%+C%+F%
write_ptr%=buffer%
flicker(Dest_Page%,dest$)
name$=
rtoz(write_ptr%+32)
(FloppySize%<BigFloppy%
ToFloppy%
write_ptr%?29
report("skipping "+name$)
"start%=write_ptr%+write_ptr%!8
&len%=(write_ptr%!4)-(write_ptr%!8)
thruput%+=(len%
report("Saving: "+dest$+name$+" "+
~write_ptr%)
name$=
mkdir(name$,path$)
report("Made directories")
_FileSize(dest$+name$)>
write_ptr%?29
2)=0
!write_ptr%
&6574614B
"StreamSquash_OpenDecompress",Work_Area%,1
"StreamSquash_DecompressBlock",Work_Area%,start%,len%,Save_Area%,write_ptr%!24
,A%,B%,C%,D%
"StreamSquash_CloseDecompress",Work_Area%,A%,B%,C%,D%
"OS_CRC",0,Save_Area%,Save_Area%+(write_ptr%!24),1
newcrc%
"OS_File",0,dest$+name$,write_ptr%!16,write_ptr%!20,Save_Area%,Save_Area%+(write_ptr%!24)
&68737542
"OS_CRC",0,start%,start%+write_ptr%!24,1
newcrc%
"OS_File",0,dest$+name$,write_ptr%!16,write_ptr%!20,start%,start%+write_ptr%!24
0,"Flat file not understood at EXT#&"+
~write_ptr%
crc%=write_ptr%!12
crc%<>newcrc%
0,"Crc Failure at "+name$
6Percentage%=100*thruput%
MaxThruPut%:
update_bar
write_ptr%+=write_ptr%!4
write_ptr%>=upto%
channel%=
SaveUserName(dest$)
(ToFloppy%
FloppySize%<BigFloppy%)
update_module("GDraw", dest$+"RMStore.",dest$+"^.!AWViewer.RMStore.")
update_module("DitherExt", dest$+"RMStore.",dest$+"^.!AWViewer.RMStore.")
update_module("FontDraw",dest$+"RMStore.",dest$+"^.!AWViewer.RMStore.")
update_module("ImageExtnd",dest$+"RMStore.",dest$+"^.!AWViewer.RMStore.")
ToFloppy%
"XOS_CLI","Remove "+dest$+"Auto.Block"
"XOS_CLI","Remove "+dest$+"Auto.BlkSprts"
Swapping%=
flicker(Disc2_Page%,Disc2$)
Swapping%=
_FileSize(System$)=
buffer%=Work_Area%
"OS_FSControl",26,System2$,System$,%000110000100010
"OS_FSControl",26,System2$+".!*",System$+".*",%000000000100010
approach_the_bar
"XOS_CLI","CDIR "+System$+".Modules"
"XOS_CLI","CDIR "+System$+".!CCShared"
"XOS_CLI","CDIR "+System$+".!CCShared.RMStore"
update_module("GDraw", dest$+"RMStore.",System$+".!CCShared.RMStore.")
update_module("DitherExt", dest$+"RMStore.",System$+".!CCShared.RMStore.")
update_module("FontDraw",dest$+"RMStore.",System$+".!CCShared.RMStore.")
update_module("ImageExtnd",dest$+"RMStore.",System$+".!CCShared.RMStore.")
update_module("CCSquash",dest$+"RMStore.",System$+".!CCShared.RMStore.")
update_module("SpriteExt",dest$+"RMStore.",System$+".!CCShared.RMStore.")
update_shared("!TransTIFF","Filters",System2$+".!CCShared.",1.06)
update_module("ABIMod",dest$+"RMStore.",System$+".Modules.")
update_module("Colours",dest$+"RMStore.",System$+".Modules.")
approach_the_bar
"XOS_Byte",229,1
_FileSize(f$)
type%,size%
"OS_File",17,f$
type%,,,,size%
type%=0
size%=
=size%
approach_the_bar
12Percentage%+=(100-Percentage%)
update_bar
update_module(name$,from$,to$)
version(from$+name$) >
version(to$+name$)
"XOS_File",16,from$+name$,buffer%
,,load%,exec%,size%
report(name$+" "+
version(from$+name$))
report(name$+" "+
version(to$+name$))
"XOS_File",0,to$+name$,load%,exec%,buffer%,buffer%+size%
approach_the_bar
update_shared(name$,chunk$,from$,version)
version >
sharedversion(name$,chunk$)
updatesharedinfo(name$,chunk$,version)
"XOS_FSControl",26,from$+name$,System$+".!CCShared."+name$,%000000000100011
;flags%
approach_the_bar
sharedversion(name$,chunk$)
version,line$,token$,t2$,t3$
version=0
G*channel%=
(System$+".!CCShared.!Boot")
channel%
#channel%
version=0
line$=
getline(channel%,0)
token$=
gettoken(line$)
token$
"|-chunk"
N&version=
readversion(name$,chunk$)
#channel%
channel%=
=version
readversion(name$,chunk$)
version:version=0
token$=
gettoken(line$)
gettoken(line$)
token$="CC,"
t2$=chunk$
line$=
getline(channel%,0)
token$=
gettoken(line$)
gettoken(line$)
gettoken(line$)
token$="|-entry"
t2$=
sanspling(name$)
t3$="-version"
version=
gettoken(line$))
=version
updatesharedinfo(name$,chunk$,version)
ok%,copy%,linecopy$,linecopy2$
e ok%=
"XOS_File",5,System$+".!CCShared.!Boot"
exists%;flags%
exists%<>1
(flags%
("Create "+System$+".!CCShared.!Boot")
("Remove "+System$+".!CCShared.!BootO")
("Rename "+System$+".!CCShared.!Boot "+System$+".!CCShared.!BootO")
l$h%=
(System$+".!CCShared.!Boot")
n+channel%=
(System$+".!CCShared.!BootO")
channel%
copy%=
#channel%
line$=
getline(channel%,0)
linecopy$=line$
token$=
gettoken(line$)
token$
"|-chunk"
copy%=
gettoken(line$)="CC,"
gettoken(line$)=chunk$
y/line$=
getline(channel%,0):linecopy2$=line$
gettoken(line$)="|-entry"
gettoken(line$)=
sanspling(name$)
copy%=
#h%,linecopy$
#h%,linecopy2$
#h%,linecopy$
copy%
#h%,linecopy$
#channel%
("SetType "+System$+".!CCShared.!Boot Obey")
*channel%=
(System$+".!CCShared.!Boot")
channel%
ok%=
#channel%=0
#channel%,"|> <CCShared$Dir>.!Boot"
#channel%,"|"
#channel%,"| Setup script for CCShared system."
#channel%,"| (Created by ArtWorks Installer.)"
#channel%,"| Do not hand edit this file!"
#channel%,"|"
#channel%,"Set CCShared$Dir <Obey$Dir>"
#channel%,""
#channel%=(
#channel%)
#channel%, ""
#channel%, "|-chunk CC, "+chunk$
#channel%, "|-entry "+
sanspling(name$)+" -version "+
(version)
#channel%, "Obey <CCShared$Dir>."+name$+".!Boot"
#channel%, ""
#channel%
channel%=
sanspling(s$)
s$,1)="!"
s$,2)
mkdir(new$,
old$)
new$,".")=0
old$="":=new$
old$<>""
new$,
(old$))=old$
old$=
filepath(new$)
dot%
dot%=2
new$,dot%),".")
new$,dot%,1)="."
old$=
new$,dot%-1):
"XOS_CLI","CDIR "+dest$+old$
dot%+=1
=new$
grab_memory(wanted%)
"Wimp_SlotSize",-1,-1
slot_size%,next_slot%,free%
wanted%<>0
"OS_ReadMemMapInfo"
page_size%
Hwanted%=page_size%*((page_size%+
(wanted%)-1)
page_size%)*
(wanted%)
"OS_ReadDynamicArea",5
,ramsize%
newslot%=free%-page_size%
newslot%>=wanted%
report("Available: "+
(free%
1024)+"K Claimable: "+
(newslot%
1024)+"K Requested: "+
(wanted%
1024)+"K Already got: "+
(slot_size%
1024)+"K")
newslot%>=wanted%
newslot%=wanted%
"Wimp_SlotSize",slot_size%+newslot%,next_slot%
"Wimp_SlotSize",-1,-1
slot_size%,next_slot%,free%
=slot_size%+&8000
claim(A%)
A%=(A%+3)
A%+=FREE%
A%>Z%
0,"Insufficient funds for that memory transaction."
A%,FREE%
bigger(A%,B%)=(A%
A%>B%)
(B%
B%>=A%)
version(name$)
version$
version$=""
channel%=
(name$)
channel%=0
"XOS_GBPB",3,channel%,block%,4,20
;Flags%
(Flags%
#channel%:channel%=
!block%<
#channel%
#channel%=!block%
Flags%=
#channel%:
Flags%=9
#channel%
#channel%
Flags%=
#channel%:
Flags%<>9
#channel%
#channel%
version$=
Flags%
Flags%=0
#channel%
version$+=
#channel%)
Flags%
#channel%
channel%=
=version$
sysvar(varname$)
"XOS_ReadVarVal",varname$,Block%,1024,,3
,,N%,,T%
T%<>0
N%>255
0,"Unable to read "+varname$+" string too long":=""
rtoz1(Block%,N%)
whatdisc
MediaName$
"XADFS_DescribeDisc","0",Block%
Error%;Flags%
(Flags%
MediaName$=
rtoz(Block%+22)
MediaName$," ")
MediaName$=
MediaName$,
MediaName$," ")-1)
=MediaName$
write_prot(name$)
"XOS_CLI","ADFS:NAMEDISC 0 "+name$
Error%;Flags%
(Flags%
!Error%=&108C9
discname(name$)
name$=
name$,7)
name$,
name$,".")-1)
report(G$)
DEBUG%
&0A1940
(f%
1)<>1
&0A1941
debug(d$)
DEBUG%
message(0,d$,1)
getline(h%,size%)
line$
line$=
size%<>0
"Hourglass_Percentage",((
#h%)/size%)*100
=line$
gettoken(
input$)
token$,c%
input$," ")
c%<>0
token$=
input$,c%-1)
)input$=
input$,
(input$)-
(token$)-1)
input$,1)=" "
input$=
input$,
(input$)-1)
token$=input$
input$=""
=token$
getsystempath
sys$,path%,cc%
sys$=
sysvar("System$Path")
sys$)=" "
sys$=
sys$)
sys$,",")
sysvar("System$Dir")
sys$)=":"
sysvar("System$Dir")
filepath(
sysvar("System$Path"))
setsources
mydir$:mydir$=
sysvar("Installer$Dir")
upper(
mydir$,2))="CD"
FromCD%=
#Disc2$=mydir$+".^.Floppy.Disc2"
FromCD%=
""Disc2$="ADFS::"+package$+"2.$"
System2$=Disc2$+".!System"