added folder update in order to run correctly under Mac OS X
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12819 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -24,7 +24,7 @@ property gProjectSuffix : "M5.mcp"
|
||||
--
|
||||
property gEol : "
|
||||
"
|
||||
property gSeparator : "--------------------------------------------------------------------------------" & gEol
|
||||
property gSeparator : "-------------------------------------------------------------------------------" & gEol
|
||||
|
||||
--
|
||||
-- Project and build success count
|
||||
@@ -36,17 +36,17 @@ set theProjectSuccessCount to 0
|
||||
-- Default log file name
|
||||
--
|
||||
set theDate to (day of (current date)) & "/" & GetMonthIndex(current date) & "/" & (year of (current date))
|
||||
set theLogFileName to "wxMac samples " & theDate & ".log"
|
||||
set theLogFileName to "build-" & theDate & ".log"
|
||||
|
||||
--
|
||||
-- Ask the user to select the wxWindows samples folder
|
||||
--
|
||||
set theFolder to choose folder with prompt "Select the wxWindows samples folder"
|
||||
set theFolder to choose folder with prompt "Select the folder in which to build the projects"
|
||||
|
||||
--
|
||||
-- Ask the user to choose the build log file
|
||||
--
|
||||
set theLogFile to choose file name with prompt "Create the wxWindows samples build log file" default name theLogFileName
|
||||
set theLogFile to choose file name with prompt "Save the build log file" default name theLogFileName
|
||||
|
||||
--
|
||||
-- Open the log file to record the build log
|
||||
@@ -57,7 +57,7 @@ set theLogFileRef to open for access theLogFile with write permission
|
||||
-- Write log file header
|
||||
--
|
||||
write gSeparator starting at 0 to theLogFileRef
|
||||
write "wxWindows samples build log" & gEol to theLogFileRef
|
||||
write "Build log" & gEol to theLogFileRef
|
||||
write gSeparator to theLogFileRef
|
||||
write "start on " & ((current date) as string) & gEol to theLogFileRef
|
||||
write gSeparator to theLogFileRef
|
||||
@@ -104,13 +104,6 @@ write gSeparator to theLogFileRef
|
||||
-- Close the log file
|
||||
--
|
||||
close access theLogFileRef
|
||||
--
|
||||
-- Open the file in BBEdit Lite
|
||||
--
|
||||
tell application "BBEdit Lite 6.1"
|
||||
activate
|
||||
open theLogFile
|
||||
end tell
|
||||
|
||||
--
|
||||
-- BuildProjects
|
||||
@@ -118,6 +111,8 @@ end tell
|
||||
on BuildProjects(inLogFileRef, inFolder, inTarget, inRebuild)
|
||||
global theProjectCount, theProjectSuccessCount
|
||||
|
||||
tell application "Finder" to update inFolder
|
||||
|
||||
try
|
||||
tell application "Finder" to set theProject to ((the first file of inFolder whose name ends with gProjectSuffix) as string)
|
||||
on error
|
||||
@@ -127,13 +122,13 @@ on BuildProjects(inLogFileRef, inFolder, inTarget, inRebuild)
|
||||
if theProject is not "" then
|
||||
set theProjectCount to theProjectCount + 1
|
||||
|
||||
write "building project '" & (theProject as string) & "'" & gEol to inLogFileRef
|
||||
write "building project '" & theProject & "'" & gEol to inLogFileRef
|
||||
|
||||
tell application "CodeWarrior IDE 4.0.4"
|
||||
--
|
||||
-- Open the project in CodeWarrior
|
||||
--
|
||||
open theProject as string
|
||||
open theProject
|
||||
--
|
||||
-- Change to the requested target
|
||||
--
|
||||
@@ -181,16 +176,16 @@ on ReportBuildInfo(inLogFileRef, inBuildInfo)
|
||||
tell application "CodeWarrior IDE 4.0.4"
|
||||
set theKind to ((messageKind of theInfo) as string)
|
||||
|
||||
write "*** " & theKind & " *** " & message of theInfo & gEol to inLogFileRef
|
||||
tell me to write "*** " & theKind & " *** " & message of theInfo & gEol to inLogFileRef
|
||||
try
|
||||
set theFile to ((file of theInfo) as string)
|
||||
on error
|
||||
set theFile to ""
|
||||
end try
|
||||
if theFile is not "" then
|
||||
write theFile & " line " & lineNumber of theInfo & gEol to inLogFileRef
|
||||
tell me to write theFile & " line " & lineNumber of theInfo & gEol to inLogFileRef
|
||||
end if
|
||||
write gEol to inLogFileRef
|
||||
tell me to write gEol to inLogFileRef
|
||||
end tell
|
||||
|
||||
if MessageKindIsError(theKind) then
|
||||
@@ -230,4 +225,4 @@ on GetMonthIndex(inDate)
|
||||
return i
|
||||
end if
|
||||
end repeat
|
||||
end GetMonthIndex
|
||||
end GetMonthIndex
|
||||
|
Reference in New Issue
Block a user