Commit 813d70d7 authored by Rusty Myers's avatar Rusty Myers

Updating for 2016, adding launchagent for deployment

parent 6201d722
#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
#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/Git/IdleLogout/" print "Build Location: "+CurrentBuildLocation 'if CurrentBuildLocation="/Users/rzm102/Documents/_Programing/Git/IdleLogout/Builds\ \-\ psuIdleLogout.rbvcp/OS\ X\ 64\ bit" 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.
#tag Module Protected Module MiscMethods #tag Method, Flags = &h1 Protected Function CurrentGroup(paramGroupCheck as string) As Boolean // Set up variables for idle time // Shell result Dim mCurrentGroups As String // Shell exit code Dim mErrCode As Integer // Set up shell Dim s As Shell s=New Shell s.Mode = 0 // Check idle time //s.Execute code to check idle time from USB input devices s.Execute "/bin/echo -n `/usr/bin/groups`" // Set results to mIdleResult mCurrentGroups = s.Result // Set error code to mIdleError mErrCode = s.ErrorCode // Log mIdleResult for debugging // System.Log(System.LogLevelError, "Method: " + midleSecs) // LogToFile("mIdleSeconds: " + str(mIdleSecs)) if ( InStr(mCurrentGroups, paramGroupCheck) > 0 ) then return true else return false end if End Function #tag EndMethod #tag Method, Flags = &h1 Protected Function CurrentUsername(paramUsernameCheck as string) As Boolean // Set up variables for idle time // Shell result Dim mCurrentUsername As String // Shell exit code Dim mErrCode As Integer // Set up shell Dim s As Shell s=New Shell s.Mode = 0 // Check idle time //s.Execute code to check idle time from USB input devices s.Execute "/bin/echo -n `whoami`" // Set results to mIdleResult mCurrentUsername = s.Result // Set error code to mIdleError mErrCode = s.ErrorCode // Log mIdleResult for debugging // System.Log(System.LogLevelError, "Method: " + midleSecs) // LogToFile("mIdleSeconds: " + str(mIdleSecs)) if ( InStr(paramUsernameCheck, mCurrentUsername) > 0 ) then return true else return false end if End Function #tag EndMethod #tag Method, Flags = &h1 Protected Function PadData(PadChar as string, EndLength as integer, StrToPad as string, paramLogToFile as Boolean) As string dim paddedStr as string dim loopVar as integer dim NumPadChars as integer if (paramLogToFile = Globals.kLogToFileEnable) then LogToFile(CurrentMethodName + ": ---->") LogToFile(CurrentMethodName + ": String received: " + "--->" + StrToPad + "<---") LogToFile(CurrentMethodName + ": PadChar received: " + "--->" + PadChar + "<---") LogToFile(CurrentMethodName + ": EndLength received: " + "--->" + str(EndLength) + "<---") end if if (len(StrToPad) >= EndLength) then if (paramLogToFile = Globals.kLogToFileEnable) then LogToFile(CurrentMethodName + ": No padding necessary. Exiting.") LogToFile(CurrentMethodName + ": <----") end if return StrToPad end if paddedStr = StrToPad NumPadChars = EndLength - len(StrToPad) for loopVar = 1 to NumPadChars paddedStr = PadChar + paddedStr next if (paramLogToFile = Globals.kLogToFileEnable) then LogToFile(CurrentMethodName + ": <----") end if return paddedStr End Function #tag EndMethod #tag ViewBehavior #tag ViewProperty Name="Index" Visible=true Group="ID" InitialValue="-2147483648" InheritedFrom="Object" #tag EndViewProperty #tag ViewProperty Name="Left" Visible=true Group="Position" InitialValue="0" InheritedFrom="Object" #tag EndViewProperty #tag ViewProperty Name="Name" Visible=true Group="ID" InheritedFrom="Object" #tag EndViewProperty #tag ViewProperty Name="Super" Visible=true Group="ID" InheritedFrom="Object" #tag EndViewProperty #tag ViewProperty Name="Top" Visible=true Group="Position" InitialValue="0" InheritedFrom="Object" #tag EndViewProperty #tag EndViewBehavior End Module #tag EndModule
\ No newline at end of file
#tag Module Protected Module MiscMethods #tag Method, Flags = &h1 Protected Function CurrentGroup(paramGroupCheck as string) As Boolean // Set up variables for idle time // Shell result Dim mCurrentGroups As String // Shell exit code Dim mErrCode As Integer // Set up shell Dim s As Shell s=New Shell s.Mode = 0 // Check idle time //s.Execute code to check idle time from USB input devices s.Execute "/bin/echo -n `/usr/bin/groups`" // Set results to mIdleResult mCurrentGroups = s.Result // Set error code to mIdleError mErrCode = s.ErrorCode // Log mIdleResult for debugging // System.Log(System.LogLevelError, "Method: " + midleSecs) // LogToFile("mIdleSeconds: " + str(mIdleSecs)) Dim groupArray(-1) as String Dim compareResult as Integer groupArray=Split(mCurrentGroups) for each g as String in groupArray If g = paramGroupCheck then return true end if next // we didn't find the group in our array, quitting. return false End Function #tag EndMethod #tag Method, Flags = &h1 Protected Function CurrentUsername(paramUsernameCheck as string) As Boolean // Set up variables for idle time // Shell result Dim mCurrentUsername As String // Shell exit code Dim mErrCode As Integer // Set up shell Dim s As Shell s=New Shell s.Mode = 0 // Check idle time //s.Execute code to check idle time from USB input devices s.Execute "/bin/echo -n `whoami`" // Set results to mIdleResult mCurrentUsername = s.Result // Set error code to mIdleError mErrCode = s.ErrorCode // Log mIdleResult for debugging // System.Log(System.LogLevelError, "Method: " + midleSecs) // LogToFile("mIdleSeconds: " + str(mIdleSecs)) if ( InStr(paramUsernameCheck, mCurrentUsername) > 0 ) then return true else return false end if End Function #tag EndMethod #tag Method, Flags = &h1 Protected Function PadData(PadChar as string, EndLength as integer, StrToPad as string, paramLogToFile as Boolean) As string dim paddedStr as string dim loopVar as integer dim NumPadChars as integer if (paramLogToFile = Globals.kLogToFileEnable) then LogToFile(CurrentMethodName + ": ---->") LogToFile(CurrentMethodName + ": String received: " + "--->" + StrToPad + "<---") LogToFile(CurrentMethodName + ": PadChar received: " + "--->" + PadChar + "<---") LogToFile(CurrentMethodName + ": EndLength received: " + "--->" + str(EndLength) + "<---") end if if (len(StrToPad) >= EndLength) then if (paramLogToFile = Globals.kLogToFileEnable) then LogToFile(CurrentMethodName + ": No padding necessary. Exiting.") LogToFile(CurrentMethodName + ": <----") end if return StrToPad end if paddedStr = StrToPad NumPadChars = EndLength - len(StrToPad) for loopVar = 1 to NumPadChars paddedStr = PadChar + paddedStr next if (paramLogToFile = Globals.kLogToFileEnable) then LogToFile(CurrentMethodName + ": <----") end if return paddedStr End Function #tag EndMethod #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 EndViewBehavior End Module #tag EndModule
\ No newline at end of file
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>edu.psu.idlelogout</string>
<key>ProgramArguments</key>
<array>
<string>open</string>
<string>/Library/CLMshared/Startup Items/Idle Logout.app</string>
</array>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>
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 MacBuildArchitecture=1
\ 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=1 SubVersion=0 NonRelease=0 Release=2 InfoVersion= LongVersion=2.1, Penn State University/ITS/CLC ShortVersion=2.1 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 MacBuildArchitecture=1
\ 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