make sure svn info for an already existing .xcodeproj folder is not deleted, replace project file itself in place
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68938 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -160,14 +160,26 @@ end readFilesList
|
|||||||
-- creates a new project file from the respective template
|
-- creates a new project file from the respective template
|
||||||
on instantiateProject(theProject)
|
on instantiateProject(theProject)
|
||||||
set projectName to projectName of theProject
|
set projectName to projectName of theProject
|
||||||
set template to POSIX file (osxBuildFolder & projectName & "_in.xcodeproj")
|
set template to (osxBuildFolder & projectName & "_in.xcodeproj")
|
||||||
set projectFile to POSIX file (osxBuildFolder & projectName & ".xcodeproj")
|
set projectFile to (osxBuildFolder & projectName & ".xcodeproj")
|
||||||
tell application "Finder"
|
tell application "Finder"
|
||||||
|
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
|
try
|
||||||
delete file projectFile
|
tell me
|
||||||
|
do shell script "rm -f " & quoted form of projectContentFile
|
||||||
|
end tell
|
||||||
end try
|
end try
|
||||||
set duplicateProject to duplicate template with replace
|
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")
|
set name of duplicateProject to (projectName & ".xcodeproj")
|
||||||
|
end if
|
||||||
end tell
|
end tell
|
||||||
end instantiateProject
|
end instantiateProject
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user