]> git.saurik.com Git - wxWidgets.git/commitdiff
added folder update in order to run correctly under Mac OS X
authorGilles Depeyrot <gilles_depeyrot@mac.com>
Sun, 2 Dec 2001 14:50:40 +0000 (14:50 +0000)
committerGilles Depeyrot <gilles_depeyrot@mac.com>
Sun, 2 Dec 2001 14:50:40 +0000 (14:50 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12819 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

docs/mac/M5build.applescript

index 7f674cfd150c811d9cb50ba659d952dbc8cbd9ee..8b951bc547c1491b5a50fffa255054a0e12b3510 100644 (file)
@@ -24,7 +24,7 @@ property gProjectSuffix : "M5.mcp"
 --
 property gEol : "
 "
 --
 property gEol : "
 "
-property gSeparator : "--------------------------------------------------------------------------------" & gEol
+property gSeparator : "-------------------------------------------------------------------------------" & gEol
 
 --
 -- Project and build success count
 
 --
 -- 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))
 -- 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
 --
 
 --
 -- 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
 --
 
 --
 -- 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
 
 --
 -- 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 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
 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
 -- 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
 
 --
 -- BuildProjects
@@ -118,6 +111,8 @@ end tell
 on BuildProjects(inLogFileRef, inFolder, inTarget, inRebuild)
        global theProjectCount, theProjectSuccessCount
        
 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
        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
                
        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
                        --
                
                tell application "CodeWarrior IDE 4.0.4"
                        --
                        -- Open the project in CodeWarrior
                        --
-                       open theProject as string
+                       open theProject
                        --
                        -- Change to the requested target
                        --
                        --
                        -- 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)
                        
                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
                        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
                        end if
-                       write gEol to inLogFileRef
+                       tell me to write gEol to inLogFileRef
                end tell
                
                if MessageKindIsError(theKind) then
                end tell
                
                if MessageKindIsError(theKind) then
@@ -230,4 +225,4 @@ on GetMonthIndex(inDate)
                        return i
                end if
        end repeat
                        return i
                end if
        end repeat
-end GetMonthIndex
\ No newline at end of file
+end GetMonthIndex