X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/643b97f8a7f3ba5b2b22fe2545a7b9ec20207d34..27c7397611662ac0858a83f390904bf4de6870e0:/docs/mac/M5build.applescript diff --git a/docs/mac/M5build.applescript b/docs/mac/M5build.applescript index 7f674cfd15..0bd0592106 100644 --- a/docs/mac/M5build.applescript +++ b/docs/mac/M5build.applescript @@ -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 -- @@ -161,7 +156,7 @@ on BuildProjects(inLogFileRef, inFolder, inTarget, inRebuild) write gSeparator to inLogFileRef end if - tell application "Finder" to set theSubFolders to every folder of inFolder + tell application "Finder" to set theSubFolders to every folder of inFolder whose name does not end with " Data" repeat with theFolder in theSubFolders BuildProjects(inLogFileRef, theFolder, inTarget, inRebuild) end repeat @@ -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 \ No newline at end of file +end GetMonthIndex