Skip to content
This repository was archived by the owner on Nov 10, 2019. It is now read-only.

Commit 04c0e14

Browse files
committed
Desktop
for #122
1 parent e1cf48e commit 04c0e14

8 files changed

Lines changed: 141 additions & 68 deletions

File tree

.DS_Store

0 Bytes
Binary file not shown.

.gitignore

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,2 @@
1-
2-
.DS_Store
3-
4-
.DS_Store
1+
*.DS_Store
2+
*.xcuserstate

AutoCasperNBI.xcodeproj/project.pbxproj

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@
9797
7C1305A5193FC10A0060F343 /* osx-jss-login.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "osx-jss-login.png"; sourceTree = "<group>"; };
9898
7C1305A6193FC10A0060F343 /* RemoteDesktop.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = RemoteDesktop.icns; sourceTree = "<group>"; };
9999
7C1305A7193FC10A0060F343 /* ToolbarDesktopFolderIcon.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = ToolbarDesktopFolderIcon.icns; sourceTree = "<group>"; };
100+
7C1726BA21AC798400D07797 /* AutoCasperNBI.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = AutoCasperNBI.entitlements; sourceTree = "<group>"; };
100101
7C197009198058F00092062D /* Scripts.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = Scripts.icns; sourceTree = "<group>"; };
101102
7C19733E21766DA100282107 /* com.AutoCasperNBI.JamfImaging.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = com.AutoCasperNBI.JamfImaging.plist; sourceTree = "<group>"; };
102103
7C23C473195A3AEB00FAC70A /* Screensharing.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = Screensharing.icns; sourceTree = "<group>"; };
@@ -187,6 +188,7 @@
187188
7C130586193FC0B60060F343 /* AutoCasperNBI */ = {
188189
isa = PBXGroup;
189190
children = (
191+
7C1726BA21AC798400D07797 /* AutoCasperNBI.entitlements */,
190192
7C19733E21766DA100282107 /* com.AutoCasperNBI.JamfImaging.plist */,
191193
7C3759481BC7027900CBB857 /* 10.11NBImageInfo */,
192194
7CB60993199189E20068574D /* root.plist */,
@@ -290,6 +292,11 @@
290292
7C13057A193FC0B60060F343 = {
291293
DevelopmentTeam = 7WHVYYF52U;
292294
ProvisioningStyle = Automatic;
295+
SystemCapabilities = {
296+
com.apple.HardenedRuntime = {
297+
enabled = 0;
298+
};
299+
};
293300
};
294301
};
295302
};

AutoCasperNBI.xcodeproj/xcuserdata/btoms.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@
1010
ignoreCount = "0"
1111
continueAfterRunningActions = "No"
1212
filePath = "AutoCasperNBI/AutoCasperNBIAppDelegate.applescript"
13-
timestampString = "561588626.058836"
13+
timestampString = "573264265.9506609"
1414
startingColumnNumber = "9223372036854775807"
1515
endingColumnNumber = "9223372036854775807"
16-
startingLineNumber = "4877"
17-
endingLineNumber = "4877"
18-
landmarkName = "unknown"
19-
landmarkType = "0">
16+
startingLineNumber = "4905"
17+
endingLineNumber = "4905"
18+
landmarkName = "on updateNBImageInfoPlist_(sender)"
19+
landmarkType = "7">
2020
</BreakpointContent>
2121
</BreakpointProxy>
2222
</Breakpoints>

AutoCasperNBI/AutoCasperNBI-Info.plist

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,17 @@
1919
<key>CFBundlePackageType</key>
2020
<string>APPL</string>
2121
<key>CFBundleShortVersionString</key>
22-
<string>1.5.0</string>
22+
<string>1.5.1</string>
2323
<key>CFBundleSignature</key>
2424
<string>????</string>
2525
<key>CFBundleVersion</key>
26-
<string>147</string>
26+
<string>158</string>
2727
<key>LSApplicationCategoryType</key>
2828
<string>public.app-category.utilities</string>
2929
<key>LSMinimumSystemVersion</key>
3030
<string>${MACOSX_DEPLOYMENT_TARGET}</string>
3131
<key>NSHumanReadableCopyright</key>
32-
<string>Copyright © 2018 macmule. All rights reserved.</string>
32+
<string>Copyright © 2019 macmule. All rights reserved.</string>
3333
<key>NSMainNibFile</key>
3434
<string>MainMenu</string>
3535
<key>NSPrincipalClass</key>
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict/>
5+
</plist>

AutoCasperNBI/AutoCasperNBIAppDelegate.applescript

Lines changed: 119 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -2472,18 +2472,45 @@ script AutoCasperNBIAppDelegate
24722472
--Log Action
24732473
set logMe to "Emptied " & netBootDmgMountPath & "/System/Library/Compositions/"
24742474
logToFile_(me)
2475-
-- Update Build Process Window's Text Field
2476-
set my buildProcessTextField to "/System/Library/CoreServices/DefaultDesktop.jpg"
2477-
delay 0.1
2478-
try
2479-
-- Remove DefaultDesktop.jpg's symbolic link, silently error is doesn't exist
2480-
do shell script "unlink " & quoted form of netBootDmgMountPath & "/System/Library/CoreServices/DefaultDesktop.jpg" user name adminUserName password adminUsersPassword with administrator privileges
2481-
-- Delete DefaultDesktop.jpg
2482-
do shell script "/bin/rm -rf " & quoted form of netBootDmgMountPath & "/System/Library/CoreServices/DefaultDesktop.jpg" user name adminUserName password adminUsersPassword with administrator privileges
2483-
end try
2484-
--Log Action
2485-
set logMe to "Deleted " & netBootDmgMountPath & "/System/Library/CoreServices/DefaultDesktop.jpg"
2486-
logToFile_(me)
2475+
if selectedOSdmgVersionMajor is less than 14 then
2476+
-- Update Build Process Window's Text Field
2477+
set my buildProcessTextField to "/System/Library/CoreServices/DefaultDesktop.jpg"
2478+
delay 0.1
2479+
try
2480+
-- Remove DefaultDesktop.jpg's symbolic link, silently error is doesn't exist
2481+
do shell script "/bin/unlink " & quoted form of netBootDmgMountPath & "/System/Library/CoreServices/DefaultDesktop.jpg" user name adminUserName password adminUsersPassword with administrator privileges
2482+
-- Delete DefaultDesktop.jpg
2483+
do shell script "/bin/rm -rf " & quoted form of netBootDmgMountPath & "/System/Library/CoreServices/DefaultDesktop.jpg" user name adminUserName password adminUsersPassword with administrator privileges
2484+
end try
2485+
--Log Action
2486+
set logMe to "Deleted " & netBootDmgMountPath & "/System/Library/CoreServices/DefaultDesktop.jpg"
2487+
logToFile_(me)
2488+
else
2489+
-- Update Build Process Window's Text Field
2490+
set my buildProcessTextField to "/System/Library/CoreServices/DefaultBackground.jpg"
2491+
delay 0.1
2492+
try
2493+
-- Remove DefaultDesktop.jpg's symbolic link, silently error is doesn't exist
2494+
do shell script "/bin/unlink " & quoted form of netBootDmgMountPath & "/System/Library/CoreServices/DefaultBackground.jpg" user name adminUserName password adminUsersPassword with administrator privileges
2495+
-- Delete DefaultDesktop.jpg
2496+
do shell script "/bin/rm -rf " & quoted form of netBootDmgMountPath & "/System/Library/CoreServices/DefaultBackground.jpg" user name adminUserName password adminUsersPassword with administrator privileges
2497+
end try
2498+
--Log Action
2499+
set logMe to "Deleted " & netBootDmgMountPath & "/System/Library/CoreServices/DefaultBackground.jpg"
2500+
logToFile_(me)
2501+
-- Update Build Process Window's Text Field
2502+
set my buildProcessTextField to "/System/Library/CoreServices/DefaultDesktop.heic"
2503+
delay 0.1
2504+
try
2505+
-- Remove DefaultDesktop.jpg's symbolic link, silently error is doesn't exist
2506+
do shell script "/bin/unlink " & quoted form of netBootDmgMountPath & "/System/Library/CoreServices/DefaultDesktop.heic" user name adminUserName password adminUsersPassword with administrator privileges
2507+
-- Delete DefaultDesktop.jpg
2508+
do shell script "/bin/rm -rf " & quoted form of netBootDmgMountPath & "/System/Library/CoreServices/DefaultDesktop.heic" user name adminUserName password adminUsersPassword with administrator privileges
2509+
end try
2510+
--Log Action
2511+
set logMe to "Deleted " & netBootDmgMountPath & "/System/Library/CoreServices/DefaultDesktop.heic"
2512+
logToFile_(me)
2513+
end if
24872514
-- Update Build Process Window's Text Field
24882515
set my buildProcessTextField to "Emptying /System/Library/LinguisticData/"
24892516
delay 0.1
@@ -3607,52 +3634,88 @@ script AutoCasperNBIAppDelegate
36073634
on copyDesktopImage_(sender)
36083635
-- If we have a desktop selected & we can find it
36093636
if desktopImageExists is true
3610-
try
3611-
-- Update Build Process Window's Text Field
3612-
set my buildProcessTextField to "Copying Desktop Image"
3613-
delay 0.1
3614-
-- Update build Process ProgressBar
3615-
set my buildProcessProgressBar to buildProcessProgressBar + 1
3616-
-- Set variableVariable to path of DefaultDesktop.jpg
3617-
set variableVariable to netBootDmgMountPath & "/System/Library/CoreServices/DefaultDesktop.jpg"
3618-
--Log Action
3619-
set logMe to "Removing symbolic link on " & netBootDmgMountPath & "/System/Library/CoreServices/DefaultDesktop.jpg"
3620-
logToFile_(me)
3621-
try
3622-
-- Remove DefaultDesktop.jpg's symbolic link, silently error is doesn't exist
3623-
do shell script "unlink " & quoted form of netBootDmgMountPath & "/System/Library/CoreServices/DefaultDesktop.jpg" user name adminUserName password adminUsersPassword with administrator privileges
3624-
end try
3637+
if selectedOSdmgVersionMajor is less than 14 then
36253638
-- Set to text
36263639
set customDesktopImagePath to customDesktopImagePath as text
3627-
--Log Action
3628-
set logMe to "Trying to copy " & customDesktopImagePath & " to " & netBootDmgMountPath & "/System/Library/CoreServices/DefaultDesktop.jpg"
3629-
logToFile_(me)
3630-
-- Copy selected image
3631-
do shell script "/bin/cp -r " & quoted form of customDesktopImagePath & " " & quoted form of netBootDmgMountPath & "/System/Library/CoreServices/DefaultDesktop.jpg" user name adminUserName password adminUsersPassword with administrator privileges
3632-
--Log Action
3633-
set logMe to "Copied " & customDesktopImagePath & " to " & netBootDmgMountPath & "/System/Library/CoreServices/DefaultDesktop.jpg"
3634-
logToFile_(me)
3635-
--Log Action
3636-
set logMe to "Trying to set permissions to 755 on " & quoted form of netBootDmgMountPath & "/System/Library/CoreServices/DefaultDesktop.jpg"
3637-
logToFile_(me)
3638-
-- Making writable
3639-
do shell script "/bin/chmod -R 755 " & quoted form of netBootDmgMountPath & "/System/Library/CoreServices/DefaultDesktop.jpg" user name adminUserName password adminUsersPassword with administrator privileges
3640-
--Log Action
3641-
set logMe to "Set permissions to 755 on " & quoted form of netBootDmgMountPath & "/System/Library/CoreServices/DefaultDesktop.jpg"
3642-
logToFile_(me)
3643-
-- Copy Casper Imaging.app selected earlier
3644-
copyCasperImagingApp_(me)
3645-
on error
3646-
--Log Action
3647-
set logMe to "Error: Copying Desktop Image"
3648-
logToFile_(me)
3649-
-- Set to false to display
3650-
set my userNotifyErrorHidden to false
3651-
-- Set Error message
3652-
set my userNotifyError to "Error: Copying Desktop Image"
3653-
-- Notify of errors or success
3654-
userNotify_(me)
3655-
end try
3640+
try
3641+
-- Update Build Process Window's Text Field
3642+
set my buildProcessTextField to "Copying Desktop Image"
3643+
delay 0.1
3644+
-- Update build Process ProgressBar
3645+
set my buildProcessProgressBar to buildProcessProgressBar + 1
3646+
--Log Action
3647+
set logMe to "Removing symbolic link on " & netBootDmgMountPath & "/System/Library/CoreServices/DefaultDesktop.jpg"
3648+
logToFile_(me)
3649+
try
3650+
-- Remove DefaultDesktop.jpg's symbolic link, silently error is doesn't exist
3651+
do shell script "/bin/unlink " & quoted form of netBootDmgMountPath & "/System/Library/CoreServices/DefaultDesktop.jpg" user name adminUserName password adminUsersPassword with administrator privileges
3652+
end try
3653+
--Log Action
3654+
set logMe to "Trying to copy " & customDesktopImagePath & " to " & netBootDmgMountPath & "/System/Library/CoreServices/DefaultDesktop.jpg"
3655+
logToFile_(me)
3656+
-- Copy selected image
3657+
do shell script "/bin/cp -r " & quoted form of customDesktopImagePath & " " & quoted form of netBootDmgMountPath & "/System/Library/CoreServices/DefaultDesktop.jpg" user name adminUserName password adminUsersPassword with administrator privileges
3658+
--Log Action
3659+
set logMe to "Copied " & customDesktopImagePath & " to " & netBootDmgMountPath & "/System/Library/CoreServices/DefaultDesktop.jpg"
3660+
logToFile_(me)
3661+
--Log Action
3662+
set logMe to "Trying to set permissions to 755 on " & quoted form of netBootDmgMountPath & "/System/Library/CoreServices/DefaultDesktop.jpg"
3663+
logToFile_(me)
3664+
-- Making writable
3665+
do shell script "/bin/chmod -R 755 " & quoted form of netBootDmgMountPath & "/System/Library/CoreServices/DefaultDesktop.jpg" user name adminUserName password adminUsersPassword with administrator privileges
3666+
--Log Action
3667+
set logMe to "Set permissions to 755 on " & quoted form of netBootDmgMountPath & "/System/Library/CoreServices/DefaultDesktop.jpg"
3668+
logToFile_(me)
3669+
-- Copy Casper Imaging.app selected earlier
3670+
copyCasperImagingApp_(me)
3671+
on error
3672+
--Log Action
3673+
set logMe to "Error: Copying Desktop Image"
3674+
logToFile_(me)
3675+
-- Set to false to display
3676+
set my userNotifyErrorHidden to false
3677+
-- Set Error message
3678+
set my userNotifyError to "Error: Copying Desktop Image"
3679+
-- Notify of errors or success
3680+
userNotify_(me)
3681+
end try
3682+
else
3683+
try
3684+
-- Update Build Process Window's Text Field
3685+
set my buildProcessTextField to "Copying Desktop Image"
3686+
delay 0.1
3687+
-- Update build Process ProgressBar
3688+
set my buildProcessProgressBar to buildProcessProgressBar + 1
3689+
--Log Action
3690+
set logMe to "Trying to copy " & customDesktopImagePath & " to " & netBootDmgMountPath & "/Library/Desktop Pictures/Mojave.heic"
3691+
logToFile_(me)
3692+
-- Copy selected image
3693+
do shell script "/bin/cp -r " & quoted form of customDesktopImagePath & " " & quoted form of netBootDmgMountPath & "/Library/Desktop\\ Pictures/Mojave.heic" user name adminUserName password adminUsersPassword with administrator privileges
3694+
--Log Action
3695+
set logMe to "Copied " & customDesktopImagePath & " to " & netBootDmgMountPath & "/Library/Desktop Pictures/Mojave.heic"
3696+
logToFile_(me)
3697+
--Log Action
3698+
set logMe to "Trying to set permissions to 755 on " & quoted form of netBootDmgMountPath & "/Library/Desktop Pictures/Mojave.heic"
3699+
logToFile_(me)
3700+
-- Making writable
3701+
do shell script "/bin/chmod -R 755 " & quoted form of netBootDmgMountPath & "/Library/Desktop\\ Pictures/Mojave.heic" user name adminUserName password adminUsersPassword with administrator privileges
3702+
--Log Action
3703+
set logMe to "Set permissions to 755 on " & quoted form of netBootDmgMountPath & "/Library/Desktop Pictures/Mojave.heic"
3704+
logToFile_(me)
3705+
-- Copy Casper Imaging.app selected earlier
3706+
copyCasperImagingApp_(me)
3707+
on error
3708+
--Log Action
3709+
set logMe to "Error: Copying Desktop Image"
3710+
logToFile_(me)
3711+
-- Set to false to display
3712+
set my userNotifyErrorHidden to false
3713+
-- Set Error message
3714+
set my userNotifyError to "Error: Copying Desktop Image"
3715+
-- Notify of errors or success
3716+
userNotify_(me)
3717+
end try
3718+
end if
36563719
else
36573720
-- Copy Casper Imaging.app selected earlier
36583721
copyCasperImagingApp_(me)

0 commit comments

Comments
 (0)