Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e3fa874

Browse files
committed
Modified for CW Pro 1 projects. Convention used: .mu files are old
project files, which have to be cleaned up before checking in, .prj files are CW Pro 1 projects (which are always clean). Prj files are still binhexed, even though they only have a data fork (and, hence, could be checked in in binary mode).
1 parent 6654422 commit e3fa874

3 files changed

Lines changed: 70 additions & 56 deletions

File tree

Mac/scripts/EditPythonPrefs.rsrc.hqx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
:&%9NDA43HA4SEfj3FQ9QFbjbFh*M!(*cFQ058d9%!3#3"`m+@DJ!N!3"!!!!$FN
44
!!!c*!!!"36B8)&3JD!!8)&"p%E"S%3!k!@FQ%Lm-6VS#$!`k!&Tj&%9NDA43HA4
5-
SEfj3FQ9QFbjbFh*MF`)!!!!rN!B!!$q3#!#3'+l'Bf!!N!B2#[m4`+KT!4e!%Ir
5+
SEfj3FQ9QFbjbFh*MF`)!!!!rN!B!!$q3#!#3',!'2ed!N!B2#[m4`+KT!4e!%Ir
66
c%h!!%#lrmlh5%@B386Dq9@X"!8*%[D'q9@X"!6"4-J&R(N39$!!!('85F!!3,N-
77
9$!!!(f)'F!&J!!%"!LaD9#dZ4,d"!"Xm!@B`*e8q'NU!)&-#+!#r!#iL!1d*!J%
88
!3)-Sfc36UGF[$%kk!3P+CfX"!+CA3cS!!!%!!!%!!!!#J!!!"%!!!!JJ!!!3%!!
@@ -48,17 +48,17 @@ jG'K[EL"SEfeP)'C[E'4PFLNk!*!&!4-!&!%P!5X%'N4PCQ&eE(3JFh4KFR4eF#"
4848
1"4G8FQ&MC5"TEA"[FR3JFh4KG'9YC@jdFi)!N!9*!!N!@`%0"4a6GA"`FQ9cFb"
4949
PH("bCA0cD@pZ)("bD@jdD@jR!*!&A`!*!(%"$!8B9@jLG@CQCA*PC#"cG'4[GA3
5050
[Fh4NCA*b!*!&G3!*!)F"#`864'9LG@FJF'&bFf9b)'peG("eG'8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EhGTaJ:

Mac/scripts/binhextree.py

Lines changed: 36 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class MwShell(aetools.TalkTo, Metrowerks_Shell_Suite, Required_Suite):
2424
# Where to put CW projects, relative to TOP
2525
CWDIR=':Mac:mwerks:projects'
2626
# From which folders to put projects there
27-
CWDIRDIRS=['build.macppc.stand', 'build.macppc.shared', 'build.mac68k.stand', 'build.mac68k.shared', 'PlugIns']
27+
CWDIRDIRS=['build.mac', 'build.macstand', 'PlugIns']
2828

2929
# Helper routines
3030
def binhexit(path, name):
@@ -72,16 +72,14 @@ def binhexcompare(source, hqxfile):
7272

7373
def hexbincwprojects(creator):
7474
"""Compact and hexbin all files remembered with a given creator"""
75-
try:
76-
mgr = MwShell(creator, start=1)
77-
except 'foo':
78-
print 'Not handled:', creator
79-
return
75+
cw_running = 0
8076
for fss in project_files[creator]:
8177
srcfile = fss.as_pathname()
8278

79+
old_style = 0
8380
if srcfile[-1] == 'µ':
8481
dstfile = srcfile[:-1]+'mu.hqx'
82+
old_style = 1
8583
elif srcfile[-3] == '.mu':
8684
dstfile = srcfile + '.hqx'
8785
elif ord(srcfile[-1]) >= 128:
@@ -94,14 +92,23 @@ def hexbincwprojects(creator):
9492
print 'Skip', dstfile,'- Up-to-date'
9593
continue
9694
print 'Compacting', dstfile
97-
mgr.open(fss)
98-
mgr.Reset_File_Paths()
99-
mgr.Remove_Binaries()
100-
mgr.Close_Project()
95+
if old_style:
96+
if not cw_running:
97+
try:
98+
mgr = MwShell(creator, start=1)
99+
except 'foo':
100+
print 'Not handled:', creator
101+
return
102+
cw_running = 1
103+
mgr.open(fss)
104+
mgr.Reset_File_Paths()
105+
mgr.Remove_Binaries()
106+
mgr.Close_Project()
101107

102108
print 'Binhexing', dstfile
103109
binhex.binhex(srcfile, dstfile)
104-
mgr.quit()
110+
if cw_running:
111+
mgr.quit()
105112

106113
def copycwproject(path, name):
107114
"""Copy CW project (if needed) and remember for hexbinning"""
@@ -119,19 +126,25 @@ def copycwproject(path, name):
119126
return
120127
dstfile = os.path.join(dstdir, os.path.join(srcdir, name))
121128
else:
122-
if path[-2:] != '.µ':
129+
if path[-2:] == '.µ':
130+
dstfile = path[:-2]+ '.mu'
131+
elif path[-4:] == '.prj':
132+
dstfile = None
133+
else:
123134
return
124-
dstfile = path[:-2]+ '.mu'
125135

126-
# If the destination doesn't exists or is older that the source
127-
# we copy and remember it
128-
129-
if os.path.exists(dstfile) and \
130-
os.stat(dstfile)[8] >= os.stat(path)[8]:
131-
print 'Not copying', path,'- Up-to-date'
136+
if dstfile:
137+
# If the destination doesn't exists or is older that the source
138+
# we copy and remember it
139+
140+
if os.path.exists(dstfile) and \
141+
os.stat(dstfile)[8] >= os.stat(path)[8]:
142+
print 'Not copying', path,'- Up-to-date'
143+
else:
144+
print 'Copy', path
145+
macostools.copy(path, dstfile)
132146
else:
133-
print 'Copy', path
134-
macostools.copy(path, dstfile)
147+
dstfile = path
135148

136149
fss = macfs.FSSpec(dstfile)
137150
creator = fss.GetCreatorType()[0]
@@ -177,6 +190,8 @@ def copycwexpfile(path, name):
177190
('.rsrc', binhexit),
178191
('.gif', binhexit),
179192
('.µ', copycwproject),
193+
('.prj', copycwproject),
194+
('.prj.exp', copycwexpfile),
180195
('.µ.exp', copycwexpfile)
181196
]
182197

0 commit comments

Comments
 (0)