import cwxmlgen
import cwtalker
+import os
+import AppleEvents
+import macfs
def mkproject(outputfile, modulename, settings):
#
dictcopy['mac_outputdir'] = ':lib:' # XXX Is this correct??
dictcopy['mac_dllname'] = modulename + '.ppc.slb'
dictcopy['mac_targetname'] = modulename + '.ppc'
- of os.path.isabs(dictcopy['sysprefix']):
+ if os.path.isabs(dictcopy['sysprefix']):
dictcopy['mac_sysprefixtype'] = 'Absolute'
else:
dictcopy['mac_sysprefixtype'] = 'Project' # XXX not sure this is right...
xmlbuilder = cwxmlgen.ProjectBuilder(dictcopy)
xmlbuilder.generate()
fp = open(dictcopy['mac_projectxmlname'], "w")
- fp.write(dict["tmp_projectxmldata"])
+ fp.write(dictcopy["tmp_projectxmldata"])
fp.close()
#
# Generate the export file
#
cw = cwtalker.MyCodeWarrior(start=1)
cw.send_timeout = AppleEvents.kNoTimeOut
- xmlfss = macfs.FSSpec(dictcopy['mac_projectxmlname'])
- prjfss = macfs.FSSpec(outputfile)
+## xmlfss = macfs.FSSpec(dictcopy['mac_projectxmlname'])
+## prjfss = macfs.FSSpec(outputfile)
+ xmlfss = dictcopy['mac_projectxmlname']
+ prjfss = outputfile
+ cw.activate()
cw.my_mkproject(prjfss, xmlfss)
def buildproject(projectfile):
return _arguments['----']
def my_mkproject(self, prjfile, xmlfile):
- self.make(new=CodeWarrior.project_document, with_data=xmlfile, at=prjfile)
+ self.make(new=CodeWarrior.project_document(), with_data=xmlfile, as=prjfile)
</SETTING>
<SETTING>
<SETTING><NAME>SearchPath</NAME>
- <SETTING><NAME>Path</NAME><VALUE>%(sysprefix)s:Mac:</VALUE></SETTING>
+ <SETTING><NAME>Path</NAME><VALUE>%(sysprefix)sMac:</VALUE></SETTING>
<SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>
<SETTING><NAME>PathRoot</NAME><VALUE>%(mac_sysprefixtype)s</VALUE></SETTING>
</SETTING>
%(tmp_extrasearchdirs)s
<SETTING>
<SETTING><NAME>SearchPath</NAME>
- <SETTING><NAME>Path</NAME><VALUE>%(sysprefix)s::GUSI2:include:</VALUE></SETTING>
+ <SETTING><NAME>Path</NAME><VALUE>%(sysprefix)s:GUSI2:include:</VALUE></SETTING>
<SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>
<SETTING><NAME>PathRoot</NAME><VALUE>%(mac_sysprefixtype)s</VALUE></SETTING>
</SETTING>
-import mkcwproj
+import mkcwproject
import sys
dict = {
}
-mkcwproj.mkproject("mkcwtest.prj", "mkcwtest", dict)
-mkcwproj.buildproject("mkcwtest.prj")
+mkcwproject.mkproject("mkcwtest.prj", "mkcwtest", dict)
+mkcwproject.buildproject("mkcwtest.prj")