end parseLib
on parseNode(anElement, theVariables, theConditions)
- if class of anElement is XML element and ¬
+ if class of anElement is XML element and Â
XML tag of anElement is "set" then
parseEntry(anElement, theVariables, theConditions)
else
- if class of anElement is XML element and ¬
+ if class of anElement is XML element and Â
XML tag of anElement is "lib" then
parseLib(anElement, theVariables, theConditions)
end if
-- creates a new project file from the respective template
on instantiateProject(theProject)
set projectName to projectName of theProject
- set template to POSIX file (osxBuildFolder & projectName & "_in.xcodeproj")
- set projectFile to POSIX file (osxBuildFolder & projectName & ".xcodeproj")
+ set template to (osxBuildFolder & projectName & "_in.xcodeproj")
+ set projectFile to (osxBuildFolder & projectName & ".xcodeproj")
tell application "Finder"
- try
- delete file projectFile
- end try
- set duplicateProject to duplicate template with replace
- set name of duplicateProject to (projectName & ".xcodeproj")
+ if exists projectFile as POSIX file then
+ set templateContentFile to (osxBuildFolder & projectName & "_in.xcodeproj/project.pbxproj")
+ set projectContentFile to (osxBuildFolder & projectName & ".xcodeproj/project.pbxproj")
+ try
+ tell me
+ do shell script "rm -f " & quoted form of projectContentFile
+ end tell
+ end try
+ try
+ tell me
+ do shell script "cp " & quoted form of templateContentFile & " " & quoted form of projectContentFile
+ end tell
+ end try
+ else
+ set duplicateProject to duplicate (template as POSIX file) with replace
+ set name of duplicateProject to (projectName & ".xcodeproj")
+ end if
end tell
end instantiateProject
-- main
init()
-set theProject to {conditions:{"PLATFORM_MACOSX=='1'", "TOOLKIT=='OSX_CARBON'", "WXUNIV=='0'", "USE_GUI=='1' and WXUNIV=='0'"}, projectName:¬
- "wxcarbon", bklfiles:{¬
- "../bakefiles/files.bkl", "../bakefiles/regex.bkl", "../bakefiles/tiff.bkl", "../bakefiles/png.bkl", "../bakefiles/jpeg.bkl", "../bakefiles/scintilla.bkl", "../bakefiles/expat.bkl"}, nodes:{¬
- {label:"base", entries:{"$(BASE_SRC)"}}, ¬
- {label:"base", entries:{"$(BASE_AND_GUI_SRC)"}}, ¬
- {label:"core", entries:{"$(CORE_SRC)"}}, ¬
- {label:"net", entries:{"$(NET_SRC)"}}, ¬
- {label:"adv", entries:{"$(ADVANCED_SRC)"}}, ¬
- {label:"media", entries:{"$(MEDIA_SRC)"}}, ¬
- {label:"html", entries:{"$(HTML_SRC)"}}, ¬
- {label:"xrc", entries:{"$(XRC_SRC)"}}, ¬
- {label:"xml", entries:{"$(XML_SRC)"}}, ¬
- {label:"opengl", entries:{"$(OPENGL_SRC)"}}, ¬
- {label:"aui", entries:{"$(AUI_SRC)"}}, ¬
- {label:"ribbon", entries:{"$(RIBBON_SRC)"}}, ¬
- {label:"propgrid", entries:{"$(PROPGRID_SRC)"}}, ¬
- {label:"richtext", entries:{"$(RICHTEXT_SRC)"}}, ¬
- {label:"stc", entries:{"$(STC_SRC)"}}, ¬
- {label:"libtiff", entries:{"$(wxtiff)"}}, ¬
- {label:"libjpeg", entries:{"$(wxjpeg)"}}, ¬
- {label:"libpng", entries:{"$(wxpng)"}}, ¬
- {label:"libregex", entries:{"$(wxregex)"}}, ¬
- {label:"libscintilla", entries:{"$(wxscintilla)"}}, ¬
- {label:"libexpat", entries:{"$(wxexpat)"}} ¬
+set theProject to {conditions:{"PLATFORM_MACOSX=='1'", "TOOLKIT=='OSX_CARBON'", "WXUNIV=='0'", "USE_GUI=='1' and WXUNIV=='0'"}, projectName:Â
+ "wxcarbon", bklfiles:{Â
+ "../bakefiles/files.bkl", "../bakefiles/regex.bkl", "../bakefiles/tiff.bkl", "../bakefiles/png.bkl", "../bakefiles/jpeg.bkl", "../bakefiles/scintilla.bkl", "../bakefiles/expat.bkl"}, nodes:{Â
+ {label:"base", entries:{"$(BASE_SRC)"}}, Â
+ {label:"base", entries:{"$(BASE_AND_GUI_SRC)"}}, Â
+ {label:"core", entries:{"$(CORE_SRC)"}}, Â
+ {label:"net", entries:{"$(NET_SRC)"}}, Â
+ {label:"adv", entries:{"$(ADVANCED_SRC)"}}, Â
+ {label:"media", entries:{"$(MEDIA_SRC)"}}, Â
+ {label:"html", entries:{"$(HTML_SRC)"}}, Â
+ {label:"xrc", entries:{"$(XRC_SRC)"}}, Â
+ {label:"xml", entries:{"$(XML_SRC)"}}, Â
+ {label:"opengl", entries:{"$(OPENGL_SRC)"}}, Â
+ {label:"aui", entries:{"$(AUI_SRC)"}}, Â
+ {label:"ribbon", entries:{"$(RIBBON_SRC)"}}, Â
+ {label:"propgrid", entries:{"$(PROPGRID_SRC)"}}, Â
+ {label:"richtext", entries:{"$(RICHTEXT_SRC)"}}, Â
+ {label:"stc", entries:{"$(STC_SRC)"}}, Â
+ {label:"libtiff", entries:{"$(wxtiff)"}}, Â
+ {label:"libjpeg", entries:{"$(wxjpeg)"}}, Â
+ {label:"libpng", entries:{"$(wxpng)"}}, Â
+ {label:"libregex", entries:{"$(wxregex)"}}, Â
+ {label:"libscintilla", entries:{"$(wxscintilla)"}}, Â
+ {label:"libexpat", entries:{"$(wxexpat)"}} Â
}}
makeProject(theProject)
-set theProject to {conditions:{"PLATFORM_MACOSX=='1'", "TOOLKIT=='OSX_COCOA'", "WXUNIV=='0'", "USE_GUI=='1' and WXUNIV=='0'"}, projectName:¬
- "wxcocoa", bklfiles:{¬
- "../bakefiles/files.bkl", "../bakefiles/regex.bkl", "../bakefiles/tiff.bkl", "../bakefiles/png.bkl", "../bakefiles/jpeg.bkl", "../bakefiles/scintilla.bkl", "../bakefiles/expat.bkl"}, nodes:{¬
- {label:"base", entries:{"$(BASE_SRC)"}}, ¬
- {label:"base", entries:{"$(BASE_AND_GUI_SRC)"}}, ¬
- {label:"core", entries:{"$(CORE_SRC)"}}, ¬
- {label:"net", entries:{"$(NET_SRC)"}}, ¬
- {label:"adv", entries:{"$(ADVANCED_SRC)"}}, ¬
- {label:"media", entries:{"$(MEDIA_SRC)"}}, ¬
- {label:"html", entries:{"$(HTML_SRC)"}}, ¬
- {label:"xrc", entries:{"$(XRC_SRC)"}}, ¬
- {label:"xml", entries:{"$(XML_SRC)"}}, ¬
- {label:"opengl", entries:{"$(OPENGL_SRC)"}}, ¬
- {label:"aui", entries:{"$(AUI_SRC)"}}, ¬
- {label:"ribbon", entries:{"$(RIBBON_SRC)"}}, ¬
- {label:"propgrid", entries:{"$(PROPGRID_SRC)"}}, ¬
- {label:"richtext", entries:{"$(RICHTEXT_SRC)"}}, ¬
- {label:"stc", entries:{"$(STC_SRC)"}}, ¬
- {label:"libtiff", entries:{"$(wxtiff)"}}, ¬
- {label:"libjpeg", entries:{"$(wxjpeg)"}}, ¬
- {label:"libpng", entries:{"$(wxpng)"}}, ¬
- {label:"libregex", entries:{"$(wxregex)"}}, ¬
- {label:"libscintilla", entries:{"$(wxscintilla)"}}, ¬
- {label:"libexpat", entries:{"$(wxexpat)"}} ¬
+set theProject to {conditions:{"PLATFORM_MACOSX=='1'", "TOOLKIT=='OSX_COCOA'", "WXUNIV=='0'", "USE_GUI=='1' and WXUNIV=='0'"}, projectName:Â
+ "wxcocoa", bklfiles:{Â
+ "../bakefiles/files.bkl", "../bakefiles/regex.bkl", "../bakefiles/tiff.bkl", "../bakefiles/png.bkl", "../bakefiles/jpeg.bkl", "../bakefiles/scintilla.bkl", "../bakefiles/expat.bkl"}, nodes:{Â
+ {label:"base", entries:{"$(BASE_SRC)"}}, Â
+ {label:"base", entries:{"$(BASE_AND_GUI_SRC)"}}, Â
+ {label:"core", entries:{"$(CORE_SRC)"}}, Â
+ {label:"net", entries:{"$(NET_SRC)"}}, Â
+ {label:"adv", entries:{"$(ADVANCED_SRC)"}}, Â
+ {label:"media", entries:{"$(MEDIA_SRC)"}}, Â
+ {label:"html", entries:{"$(HTML_SRC)"}}, Â
+ {label:"xrc", entries:{"$(XRC_SRC)"}}, Â
+ {label:"xml", entries:{"$(XML_SRC)"}}, Â
+ {label:"opengl", entries:{"$(OPENGL_SRC)"}}, Â
+ {label:"aui", entries:{"$(AUI_SRC)"}}, Â
+ {label:"ribbon", entries:{"$(RIBBON_SRC)"}}, Â
+ {label:"propgrid", entries:{"$(PROPGRID_SRC)"}}, Â
+ {label:"richtext", entries:{"$(RICHTEXT_SRC)"}}, Â
+ {label:"stc", entries:{"$(STC_SRC)"}}, Â
+ {label:"libtiff", entries:{"$(wxtiff)"}}, Â
+ {label:"libjpeg", entries:{"$(wxjpeg)"}}, Â
+ {label:"libpng", entries:{"$(wxpng)"}}, Â
+ {label:"libregex", entries:{"$(wxregex)"}}, Â
+ {label:"libscintilla", entries:{"$(wxscintilla)"}}, Â
+ {label:"libexpat", entries:{"$(wxexpat)"}} Â
}}
makeProject(theProject)
-set theProject to {conditions:{"PLATFORM_MACOSX=='1'", "TOOLKIT=='OSX_IPHONE'", "WXUNIV=='0'", "USE_GUI=='1' and WXUNIV=='0'"}, projectName:¬
- "wxiphone", bklfiles:{¬
- "../bakefiles/files.bkl", "../bakefiles/regex.bkl", "../bakefiles/tiff.bkl", "../bakefiles/png.bkl", "../bakefiles/jpeg.bkl", "../bakefiles/scintilla.bkl", "../bakefiles/expat.bkl"}, nodes:{¬
- {label:"base", entries:{"$(BASE_SRC)"}}, ¬
- {label:"base", entries:{"$(BASE_AND_GUI_SRC)"}}, ¬
- {label:"core", entries:{"$(CORE_SRC)"}}, ¬
- {label:"net", entries:{"$(NET_SRC)"}}, ¬
- {label:"adv", entries:{"$(ADVANCED_SRC)"}}, ¬
- {label:"media", entries:{"$(MEDIA_SRC)"}}, ¬
- {label:"html", entries:{"$(HTML_SRC)"}}, ¬
- {label:"xrc", entries:{"$(XRC_SRC)"}}, ¬
- {label:"xml", entries:{"$(XML_SRC)"}}, ¬
- {label:"opengl", entries:{"$(OPENGL_SRC)"}}, ¬
- {label:"aui", entries:{"$(AUI_SRC)"}}, ¬
- {label:"ribbon", entries:{"$(RIBBON_SRC)"}}, ¬
- {label:"propgrid", entries:{"$(PROPGRID_SRC)"}}, ¬
- {label:"richtext", entries:{"$(RICHTEXT_SRC)"}}, ¬
- {label:"stc", entries:{"$(STC_SRC)"}}, ¬
- {label:"libtiff", entries:{"$(wxtiff)"}}, ¬
- {label:"libjpeg", entries:{"$(wxjpeg)"}}, ¬
- {label:"libpng", entries:{"$(wxpng)"}}, ¬
- {label:"libregex", entries:{"$(wxregex)"}}, ¬
- {label:"libscintilla", entries:{"$(wxscintilla)"}}, ¬
- {label:"libexpat", entries:{"$(wxexpat)"}} ¬
+set theProject to {conditions:{"PLATFORM_MACOSX=='1'", "TOOLKIT=='OSX_IPHONE'", "WXUNIV=='0'", "USE_GUI=='1' and WXUNIV=='0'"}, projectName:Â
+ "wxiphone", bklfiles:{Â
+ "../bakefiles/files.bkl", "../bakefiles/regex.bkl", "../bakefiles/tiff.bkl", "../bakefiles/png.bkl", "../bakefiles/jpeg.bkl", "../bakefiles/scintilla.bkl", "../bakefiles/expat.bkl"}, nodes:{Â
+ {label:"base", entries:{"$(BASE_SRC)"}}, Â
+ {label:"base", entries:{"$(BASE_AND_GUI_SRC)"}}, Â
+ {label:"core", entries:{"$(CORE_SRC)"}}, Â
+ {label:"net", entries:{"$(NET_SRC)"}}, Â
+ {label:"adv", entries:{"$(ADVANCED_SRC)"}}, Â
+ {label:"media", entries:{"$(MEDIA_SRC)"}}, Â
+ {label:"html", entries:{"$(HTML_SRC)"}}, Â
+ {label:"xrc", entries:{"$(XRC_SRC)"}}, Â
+ {label:"xml", entries:{"$(XML_SRC)"}}, Â
+ {label:"opengl", entries:{"$(OPENGL_SRC)"}}, Â
+ {label:"aui", entries:{"$(AUI_SRC)"}}, Â
+ {label:"ribbon", entries:{"$(RIBBON_SRC)"}}, Â
+ {label:"propgrid", entries:{"$(PROPGRID_SRC)"}}, Â
+ {label:"richtext", entries:{"$(RICHTEXT_SRC)"}}, Â
+ {label:"stc", entries:{"$(STC_SRC)"}}, Â
+ {label:"libtiff", entries:{"$(wxtiff)"}}, Â
+ {label:"libjpeg", entries:{"$(wxjpeg)"}}, Â
+ {label:"libpng", entries:{"$(wxpng)"}}, Â
+ {label:"libregex", entries:{"$(wxregex)"}}, Â
+ {label:"libscintilla", entries:{"$(wxscintilla)"}}, Â
+ {label:"libexpat", entries:{"$(wxexpat)"}} Â
}}
makeProject(theProject)