Commit b2225a8b authored by Rusty Myers's avatar Rusty Myers

Merge pull request #3 from CLCMacTeam/cocoabuild

Cocoabuild
parents df98c95e 1986161c
#tag BuildAutomation Begin BuildStepList Linux Begin BuildProjectStep Build End End Begin BuildStepList Mac OS X Begin IDEScriptBuildStep SaveProject , AppliesTo = 0 DoCommand "SaveFile" End Begin BuildProjectStep Build End Begin IDEScriptBuildStep UnDock , AppliesTo = 0 Dim AppLocation as String = CurrentBuildAppName + ".app" AppLocation = AppLocation.ReplaceAll( " ", "\ " ) AppLocation = CurrentBuildLocation + "/" + AppLocation //@ More cocoa info.plist keys here: // https://developer.apple.com/library/ios/documentation/general/Reference/InfoPlistKeyReference/Articles/CocoaKeys.html Call DoShellCommand("/usr/bin/defaults write " + AppLocation + "/Contents/Info ""LSBackgroundOnly"" -bool ""true""") End Begin IDEScriptBuildStep tarProject , AppliesTo = 0 // Set Variables dim packageLoc, res, tarname as string tarname = "Idle-Logout.tar.bz2" packageLoc = "/Users/rzm102/Documents/_Programing/CLC\ Git/Software\ Packages/idle-logout/" if CurrentBuildLocation="/Users/rzm102/Documents/_Programing/Git/IdleLogout/Builds\ \-\ psuIdleLogout.rbvcp/Mac\ OS\ X\ \(Intel\)" OR CurrentBuildLocation="/Users/rzm102/Documents/_Programing/Git/IdleLogout/Builds\ \-\ psuIdleLogout.rbvcp/Mac\ OS\ X\ \(Cocoa\ Intel\)" then //print "Build Location: "+CurrentBuildLocation // Tar up folder res = DoShellCommand _ ("cd "+CurrentBuildLocation+"; /usr/bin/tar -c --exclude='.svn' -vjf "+tarname+" *") if res = "" then print "Results: "+res end // Delete old tar // print "rm "+packageLoc+tarname res = DoShellCommand _ ("rm "+packageLoc+tarname) // Move tar to luggage folder // print "mv "+CurrentBuildLocation+"/"+tarname+" "+packageLoc res = DoShellCommand _ ("mv "+CurrentBuildLocation+"/"+tarname+" "+packageLoc) // Make package res = DoShellCommand _ ("cd "+packageLoc+"; make pkg; open "+packageLoc) print res else print "Not on rusty's mac. Skipping pkg creation" //print CurrentBuildLocation//print "Build Location: "+CurrentBuildLocation end End End Begin BuildStepList Windows Begin BuildProjectStep Build End End #tag EndBuildAutomation
\ No newline at end of file
#tag BuildAutomation Begin BuildStepList Linux Begin BuildProjectStep Build End End Begin BuildStepList Mac OS X Begin IDEScriptBuildStep SaveProject , AppliesTo = 0 DoCommand "SaveFile" End Begin BuildProjectStep Build End Begin IDEScriptBuildStep UnDock , AppliesTo = 0 Dim AppLocation as String = CurrentBuildAppName + ".app" AppLocation = AppLocation.ReplaceAll( " ", "\ " ) AppLocation = CurrentBuildLocation + "/" + AppLocation //@ More cocoa info.plist keys here: // https://developer.apple.com/library/ios/documentation/general/Reference/InfoPlistKeyReference/Articles/CocoaKeys.html Call DoShellCommand("/usr/bin/defaults write " + AppLocation + "/Contents/Info ""LSBackgroundOnly"" -bool ""true""") End Begin IDEScriptBuildStep tarProject , AppliesTo = 0 // Set Variables dim packageLoc, res, tarname as string tarname = "Idle-Logout.tar.bz2" packageLoc = "/Users/rzm102/Documents/_Programing/CLC\ Git/Software\ Packages/idle-logout/" // print "Build Location: "+CurrentBuildLocation if CurrentBuildLocation="/Users/rzm102/Documents/_Programing/Git/IdleLogout/Builds\ \-\ psuIdleLogout.rbvcp/Mac\ OS\ X\ \(Cocoa\ Intel\)" then // Tar up folder res = DoShellCommand _ ("cd "+CurrentBuildLocation+"; /usr/bin/tar -c --exclude='.svn' -vjf "+tarname+" *") if res = "" then print "Results: "+res end // Delete old tar // print "rm "+packageLoc+tarname res = DoShellCommand _ ("rm "+packageLoc+tarname) // Move tar to luggage folder // print "mv "+CurrentBuildLocation+"/"+tarname+" "+packageLoc res = DoShellCommand _ ("mv "+CurrentBuildLocation+"/"+tarname+" "+packageLoc) // Make package res = DoShellCommand _ ("cd "+packageLoc+"; make pkg; open "+packageLoc) print res else // print "Not on rusty's mac. Skipping pkg creation" //print CurrentBuildLocation//print "Build Location: "+CurrentBuildLocation end End End Begin BuildStepList Windows Begin BuildProjectStep Build End End #tag EndBuildAutomation
\ No newline at end of file
......
This diff is collapsed.
This diff is collapsed.
#tag Class Protected Class Task Inherits Thread #tag Event Sub Run() InternalPushEvent( New TaskEvent( TaskEvent.Types.Begin ) ) Try RaiseEvent Run Catch exc As ThreadEndException // FIXME: we probably want to make sure this isn't being sent because // the app is quitting? InternalPushEvent( New TaskEvent( TaskEvent.Types.Killed ) ) Raise exc End Try InternalPushEvent( New TaskEvent( TaskEvent.Types.Finished ) ) End Sub #tag EndEvent #tag Method, Flags = &h1000 Sub Constructor() mLock = New CriticalSection mTimer = New Timer AddHandler mTimer.Action, WeakAddressOf InternalDispatchEvents End Sub #tag EndMethod #tag Method, Flags = &h21 Private Sub InternalDispatchEvents(sender as Timer) // Takes the events in the queue and dispatches them to the correct event handler. // // NOTE: must be called from the main thread. While True Dim currentEvent As TaskEvent mLock.Enter If mEvents.UBound >= 0 Then currentEvent = mEvents( 0 ) mEvents.Remove( 0 ) Else mLock.Leave Exit Sub End If mLock.Leave Select Case currentEvent.type Case TaskEvent.Types.Begin RaiseEvent Begin Case TaskEvent.Types.UpdateUI RaiseEvent UpdateUI( currentEvent.Arguments ) Case TaskEvent.Types.Finished RaiseEvent Finished Case TaskEvent.Types.Killed RaiseEvent Killed End Select Wend End Sub #tag EndMethod #tag Method, Flags = &h21 Private Sub InternalPushEvent(evt as TaskEvent) // Adds an event to the event queue. This can be called from any thread, but is // usually called from the non-main thread. mLock.Enter mEvents.Append( evt ) mTimer.Period = 0 mTimer.Mode = Timer.ModeSingle mLock.Leave End Sub #tag EndMethod #tag Method, Flags = &h0 Sub UpdateUI(args as Dictionary) // Adds an UpdateUI event to the queue, which will eventually be dequeued // on the main thread and raise the UpdateUI event. Dim evt As New TaskEvent( TaskEvent.Types.updateUI ) evt.Arguments = args internalPushEvent( evt ) End Sub #tag EndMethod #tag Method, Flags = &h0 Sub UpdateUI(paramarray args as Pair) // Adds an UpdateUI event to the queue, which will eventually be dequeued // on the main thread and raise the UpdateUI event. // // This specific method is a convenience function in order to be able to // use Pair literals. For example: // UpdateUI( "progress": 10, "total_progress": 100 ) Dim d As New Dictionary For Each arg As Pair In args d.Value( arg.Left ) = arg.Right Next Self.UpdateUI( d ) End Sub #tag EndMethod #tag Hook, Flags = &h0 Event Begin() #tag EndHook #tag Hook, Flags = &h0 Event Finished() #tag EndHook #tag Hook, Flags = &h0 Event Killed() #tag EndHook #tag Hook, Flags = &h0 Event Run() #tag EndHook #tag Hook, Flags = &h0 Event UpdateUI(args as Dictionary) #tag EndHook #tag Property, Flags = &h21 #tag Note The queue of pending events. This is protected by mLock in order to provide thread safety. #tag EndNote Private mEvents() As TaskEvent #tag EndProperty #tag Property, Flags = &h21 Private mLock As CriticalSection #tag EndProperty #tag Property, Flags = &h21 #tag Note This timer is used to punt events from the thread onto the main thread, where InternalDispatchEvents will process all of the queued events. #tag EndNote Private mTimer As Timer #tag EndProperty #tag ViewBehavior #tag ViewProperty Name="Index" Visible=true Group="ID" Type="Integer" EditorType="Integer" #tag EndViewProperty #tag ViewProperty Name="Left" Visible=true Group="Position" Type="Integer" #tag EndViewProperty #tag ViewProperty Name="Name" Visible=true Group="ID" Type="String" EditorType="String" #tag EndViewProperty #tag ViewProperty Name="Priority" Visible=true Group="Behavior" InitialValue="5" Type="Integer" #tag EndViewProperty #tag ViewProperty Name="StackSize" Visible=true Group="Behavior" InitialValue="0" Type="Integer" #tag EndViewProperty #tag ViewProperty Name="Super" Visible=true Group="ID" Type="String" EditorType="String" #tag EndViewProperty #tag ViewProperty Name="Top" Visible=true Group="Position" Type="Integer" #tag EndViewProperty #tag EndViewBehavior End Class #tag EndClass
\ No newline at end of file
#tag Class Protected Class TaskEvent #tag Method, Flags = &h0 Sub Constructor(type as Types) Self.Type = type End Sub #tag EndMethod #tag Property, Flags = &h0 Arguments As Dictionary #tag EndProperty #tag Property, Flags = &h0 Type As Types #tag EndProperty #tag Enum, Name = Types, Type = Integer, Flags = &h0 Begin Finished UpdateUI Killed #tag EndEnum #tag ViewBehavior #tag ViewProperty Name="Index" Visible=true Group="ID" InitialValue="-2147483648" Type="Integer" #tag EndViewProperty #tag ViewProperty Name="Left" Visible=true Group="Position" InitialValue="0" Type="Integer" #tag EndViewProperty #tag ViewProperty Name="Name" Visible=true Group="ID" Type="String" #tag EndViewProperty #tag ViewProperty Name="Super" Visible=true Group="ID" Type="String" #tag EndViewProperty #tag ViewProperty Name="Top" Visible=true Group="Position" InitialValue="0" Type="Integer" #tag EndViewProperty #tag ViewProperty Name="Type" Group="Behavior" Type="Types" EditorType="Enum" #tag EnumValues "0 - Begin" "1 - Finished" "2 - UpdateUI" "3 - Killed" #tag EndEnumValues #tag EndViewProperty #tag EndViewBehavior End Class #tag EndClass
\ No newline at end of file
#tag Class Protected Class WatchForIdleThread Inherits Task #tag Event Sub UpdateUI(args as Dictionary) // Set the label to our current count time LogoutWarning.TimeLabel.setString(str(App.pCountDownTime)) End Sub #tag EndEvent #tag Method, Flags = &h1000 Sub Constructor(paramTaskType as integer) // Calling the overridden superclass constructor. Super.Constructor( ) // set the new object to one of our enumerated list values pTaskType = paramTaskType End Sub #tag EndMethod #tag Property, Flags = &h0 pTaskType As Int32 #tag EndProperty #tag ViewBehavior #tag ViewProperty Name="Index" Visible=true Group="ID" InitialValue="-2147483648" Type="Integer" EditorType="Integer" #tag EndViewProperty #tag ViewProperty Name="Left" Visible=true Group="Position" InitialValue="0" Type="Integer" #tag EndViewProperty #tag ViewProperty Name="Name" Visible=true Group="ID" Type="String" EditorType="String" #tag EndViewProperty #tag ViewProperty Name="Priority" Visible=true Group="Behavior" InitialValue="5" Type="Integer" #tag EndViewProperty #tag ViewProperty Name="pTaskType" Group="Behavior" Type="Int32" #tag EndViewProperty #tag ViewProperty Name="StackSize" Visible=true Group="Behavior" InitialValue="0" Type="Integer" #tag EndViewProperty #tag ViewProperty Name="Super" Visible=true Group="ID" Type="String" EditorType="String" #tag EndViewProperty #tag ViewProperty Name="Top" Visible=true Group="Position" InitialValue="0" Type="Integer" #tag EndViewProperty #tag EndViewBehavior End Class #tag EndClass
\ No newline at end of file
No preview for this file type
Type=Desktop RBProjectVersion=2014.03 MinIDEVersion=20070100 Class=IdleLogout;IdleLogout.rbbas;&h3007783E;&h0;false Window=LogoutWarning;LogoutWarning.rbfrm;&h3A6788BA;&h0;false MenuBar=MenuBar1;MenuBar1.rbmnu;&h6341CAF0;&h0;false BuildSteps=Build Automation;Build Automation.rbbas;&h2A7E2380;&h0;false Module=LogToFile;LogToFile.rbbas;&h236DD59E;&h0;false Module=Globals;Globals.rbbas;&h7FE3CBE3;&h0;false Module=MiscMethods;MiscMethods.rbbas;&h445F2753;&h0;false Module=myXMLTools;myXMLTools.rbbas;&h6DD0A4A2;&h0;false Module=PlistHelper;PlistHelper.rbbas;&h4AA6652A;&h0;false MajorVersion=1 MinorVersion=2 SubVersion=0 NonRelease=0 Release=2 InfoVersion= LongVersion=1.2, Penn State University/ITS/CLC ShortVersion=1.2 WinCompanyName= WinInternalName= WinProductName= WinFileDescription= AutoIncrementVersionInformation=False BuildFlags=&h1800 BuildLanguage=&h0 DebugLanguage=&h0 Region= WindowsName=My Application.exe MacCarbonMachName=Idle Logout LinuxX86Name=MyApplication MacCreator= MDI=0 MDICaption= DefaultEncoding=&h0 AppIcon=psuIdleLogout.rbres;&h0 OSXBundleID=edu.psu.idlelogout DebuggerCommandLine= UseGDIPlus=True UseBuildsFolder=True IsWebProject=False
\ No newline at end of file
Type=Desktop RBProjectVersion=2015.03 MinIDEVersion=20070100 Class=WatchForIdleThread;WatchForIdleThread.xojo_code;&h2ACCF4D1;&h0;false Class=TaskEvent;Task/TaskEvent.xojo_code;&h112EBBEE;&h41C1A8C2;false Class=IdleLogout;IdleLogout.rbbas;&h3007783E;&h0;false Window=LogoutWarning;LogoutWarning.rbfrm;&h3A6788BA;&h0;false MenuBar=MenuBar1;MenuBar1.rbmnu;&h6341CAF0;&h0;false Class=Task;Task/Task.xojo_code;&h133450B8;&h41C1A8C2;false BuildSteps=Build Automation;Build Automation.rbbas;&h2A7E2380;&h0;false Module=LogToFile;LogToFile.rbbas;&h236DD59E;&h0;false Module=Globals;Globals.rbbas;&h7FE3CBE3;&h0;false Module=MiscMethods;MiscMethods.rbbas;&h445F2753;&h0;false Module=myXMLTools;myXMLTools.rbbas;&h6DD0A4A2;&h0;false Module=PlistHelper;PlistHelper.rbbas;&h4AA6652A;&h0;false Folder=Task;Task;&h41C1A8C2;&h0;false MajorVersion=2 MinorVersion=0 SubVersion=0 NonRelease=0 Release=2 InfoVersion= LongVersion=1.2, Penn State University/ITS/CLC ShortVersion=2.0 WinCompanyName= WinInternalName= WinProductName= WinFileDescription= AutoIncrementVersionInformation=False BuildFlags=&h1800 BuildLanguage=&h0 DebugLanguage=&h0 Region= WindowsName=My Application.exe MacCarbonMachName=Idle Logout LinuxX86Name=MyApplication MacCreator= MDI=0 MDICaption= DefaultEncoding=&h0 AppIcon=psuIdleLogout.rbres;&h0 OSXBundleID=edu.psu.idlelogout DebuggerCommandLine= UseGDIPlus=True UseBuildsFolder=True IsWebProject=False
\ No newline at end of file
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment