X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/caec2e783590a4ef2ab47959f0b16e2a9536117e..51248412979029d94d11ea5dab9516831be94914:/build/osx/makeprojects.applescript?ds=sidebyside diff --git a/build/osx/makeprojects.applescript b/build/osx/makeprojects.applescript index 98162bafa1..de5e2fa05f 100644 --- a/build/osx/makeprojects.applescript +++ b/build/osx/makeprojects.applescript @@ -43,11 +43,11 @@ on parseLib(theElement, theVariables, theConditions) 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 @@ -160,14 +160,26 @@ end readFilesList -- 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 @@ -184,6 +196,14 @@ on populateProject(theProject) tell application "Xcode" quit end tell + do shell script (osxBuildFolder as text) & "fix_xcode_ids.py \"" & (POSIX path of projectFile as Unicode text) & "\"" + -- reopen again to let Xcode sort identifiers + tell application "Xcode" + open projectFile + end tell + tell application "Xcode" + quit + end tell end populateProject on makeProject(theProject) @@ -195,84 +215,84 @@ end makeProject -- 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)