-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathRdefApply
executable file
·34 lines (28 loc) · 906 Bytes
/
RdefApply
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!yab
doc RdefApply
doc adds icon, application signature and version info attributes from an rdef file.
doc
doc Copyright © 2015 Jim Saxton, Fat Elk Software
if (peek("argument") >= 2) then
filename$=peek$("argument")
Outfilename$=peek$("argument")
make$=peek$("argument")
make=0
if (make$="M") make=1
readicon()
else
print"RdefApply"
print "Adds icon, application signature and version info attributes from an rdef file.
"
print "usage:"
print "RdefApply <RdefFilename> <OutputFilename> <M>"
print "if M is used, OutputFilename is created if it does not exist
or the creation date is set if it does exist."
endif
sub readicon()
if (not open(1,filename$)) print "Could not open file'"+filename$+"' for reading":exit
if (make=1) system("touch "+Outfilename$)
close #1
system("rc -o "+filename$+".rsrc "+filename$)
system("resattr -O -o "+Outfilename$+" "+filename$+".rsrc")
end sub