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

Commit

Permalink
1.5.1
Browse files Browse the repository at this point in the history
• Mojave custom Desktop
  • Loading branch information
macmule committed Mar 4, 2019
1 parent 1228aaa commit 73910f0
Show file tree
Hide file tree
Showing 4 changed files with 121 additions and 58 deletions.
Binary file modified .DS_Store
Binary file not shown.
Binary file not shown.
4 changes: 2 additions & 2 deletions AutoImagrNBI/AutoImagrNBI-Info.plist
Expand Up @@ -15,11 +15,11 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.5.0</string>
<string>1.5.1</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>40</string>
<string>43</string>
<key>LSApplicationCategoryType</key>
<string>public.app-category.utilities</string>
<key>LSMinimumSystemVersion</key>
Expand Down
175 changes: 119 additions & 56 deletions AutoImagrNBI/AutoImagrNBIAppDelegate.applescript
Expand Up @@ -2617,18 +2617,45 @@ script AutoImagrNBIAppDelegate
--Log Action
set logMe to "Emptied " & netBootDmgMountPath & "/System/Library/Compositions/"
logToFile_(me)
-- Update Build Process Window's Text Field
set my buildProcessTextField to "/System/Library/CoreServices/DefaultDesktop.jpg"
delay 0.1
try
-- Remove DefaultDesktop.jpg's symbolic link, silently error is doesn't exist
do shell script "unlink " & quoted form of netBootDmgMountPath & "/System/Library/CoreServices/DefaultDesktop.jpg" user name adminUserName password adminUsersPassword with administrator privileges
-- Delete DefaultDesktop.jpg
do shell script "/bin/rm -rf " & quoted form of netBootDmgMountPath & "/System/Library/CoreServices/DefaultDesktop.jpg" user name adminUserName password adminUsersPassword with administrator privileges
end try
--Log Action
set logMe to "Deleted " & netBootDmgMountPath & "/System/Library/CoreServices/DefaultDesktop.jpg"
logToFile_(me)
if selectedOSdmgVersionMajor is less than 14 then
-- Update Build Process Window's Text Field
set my buildProcessTextField to "/System/Library/CoreServices/DefaultDesktop.jpg"
delay 0.1
try
-- Remove DefaultDesktop.jpg's symbolic link, silently error is doesn't exist
do shell script "/bin/unlink " & quoted form of netBootDmgMountPath & "/System/Library/CoreServices/DefaultDesktop.jpg" user name adminUserName password adminUsersPassword with administrator privileges
-- Delete DefaultDesktop.jpg
do shell script "/bin/rm -rf " & quoted form of netBootDmgMountPath & "/System/Library/CoreServices/DefaultDesktop.jpg" user name adminUserName password adminUsersPassword with administrator privileges
end try
--Log Action
set logMe to "Deleted " & netBootDmgMountPath & "/System/Library/CoreServices/DefaultDesktop.jpg"
logToFile_(me)
else
-- Update Build Process Window's Text Field
set my buildProcessTextField to "/System/Library/CoreServices/DefaultBackground.jpg"
delay 0.1
try
-- Remove DefaultDesktop.jpg's symbolic link, silently error is doesn't exist
do shell script "/bin/unlink " & quoted form of netBootDmgMountPath & "/System/Library/CoreServices/DefaultBackground.jpg" user name adminUserName password adminUsersPassword with administrator privileges
-- Delete DefaultDesktop.jpg
do shell script "/bin/rm -rf " & quoted form of netBootDmgMountPath & "/System/Library/CoreServices/DefaultBackground.jpg" user name adminUserName password adminUsersPassword with administrator privileges
end try
--Log Action
set logMe to "Deleted " & netBootDmgMountPath & "/System/Library/CoreServices/DefaultBackground.jpg"
logToFile_(me)
-- Update Build Process Window's Text Field
set my buildProcessTextField to "/System/Library/CoreServices/DefaultDesktop.heic"
delay 0.1
try
-- Remove DefaultDesktop.jpg's symbolic link, silently error is doesn't exist
do shell script "/bin/unlink " & quoted form of netBootDmgMountPath & "/System/Library/CoreServices/DefaultDesktop.heic" user name adminUserName password adminUsersPassword with administrator privileges
-- Delete DefaultDesktop.jpg
do shell script "/bin/rm -rf " & quoted form of netBootDmgMountPath & "/System/Library/CoreServices/DefaultDesktop.heic" user name adminUserName password adminUsersPassword with administrator privileges
end try
--Log Action
set logMe to "Deleted " & netBootDmgMountPath & "/System/Library/CoreServices/DefaultDesktop.heic"
logToFile_(me)
end if
-- Update Build Process Window's Text Field
set my buildProcessTextField to "Emptying /System/Library/LinguisticData/"
delay 0.1
Expand Down Expand Up @@ -3732,52 +3759,88 @@ script AutoImagrNBIAppDelegate
on copyDesktopImage_(sender)
-- If we have a desktop selected & we can find it
if desktopImageExists is true
try
-- Update Build Process Window's Text Field
set my buildProcessTextField to "Copying Desktop Image"
delay 0.1
-- Update build Process ProgressBar
set my buildProcessProgressBar to buildProcessProgressBar + 1
-- Set variableVariable to path of DefaultDesktop.jpg
set variableVariable to netBootDmgMountPath & "/System/Library/CoreServices/DefaultDesktop.jpg"
--Log Action
set logMe to "Removing symbolic link on " & netBootDmgMountPath & "/System/Library/CoreServices/DefaultDesktop.jpg"
logToFile_(me)
-- Set to text
set customDesktopImagePath to customDesktopImagePath as text
if selectedOSdmgVersionMajor is less than 14 then
try
-- Remove DefaultDesktop.jpg's symbolic link, silently error is doesn't exist
do shell script "unlink " & quoted form of netBootDmgMountPath & "/System/Library/CoreServices/DefaultDesktop.jpg" user name adminUserName password adminUsersPassword with administrator privileges
-- Update Build Process Window's Text Field
set my buildProcessTextField to "Copying Desktop Image"
delay 0.1
-- Update build Process ProgressBar
set my buildProcessProgressBar to buildProcessProgressBar + 1
--Log Action
set logMe to "Removing symbolic link on " & netBootDmgMountPath & "/System/Library/CoreServices/DefaultDesktop.jpg"
logToFile_(me)
try
-- Remove DefaultDesktop.jpg's symbolic link, silently error is doesn't exist
do shell script "/bin/unlink " & quoted form of netBootDmgMountPath & "/System/Library/CoreServices/DefaultDesktop.jpg" user name adminUserName password adminUsersPassword with administrator privileges
end try
--Log Action
set logMe to "Trying to copy " & customDesktopImagePath & " to " & netBootDmgMountPath & "/System/Library/CoreServices/DefaultDesktop.jpg"
logToFile_(me)
-- Copy selected image
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
--Log Action
set logMe to "Copied " & customDesktopImagePath & " to " & netBootDmgMountPath & "/System/Library/CoreServices/DefaultDesktop.jpg"
logToFile_(me)
--Log Action
set logMe to "Trying to set permissions to 755 on " & quoted form of netBootDmgMountPath & "/System/Library/CoreServices/DefaultDesktop.jpg"
logToFile_(me)
-- Making writable
do shell script "/bin/chmod -R 755 " & quoted form of netBootDmgMountPath & "/System/Library/CoreServices/DefaultDesktop.jpg" user name adminUserName password adminUsersPassword with administrator privileges
--Log Action
set logMe to "Set permissions to 755 on " & quoted form of netBootDmgMountPath & "/System/Library/CoreServices/DefaultDesktop.jpg"
logToFile_(me)
-- Copy Imagr.app selected earlier
copyImagrApp_(me)
on error
--Log Action
set logMe to "Error: Copying Desktop Image"
logToFile_(me)
-- Set to false to display
set my userNotifyErrorHidden to false
-- Set Error message
set my userNotifyError to "Error: Copying Desktop Image"
-- Notify of errors or success
userNotify_(me)
end try
-- Set to text
set customDesktopImagePath to customDesktopImagePath as text
--Log Action
set logMe to "Trying to copy " & customDesktopImagePath & " to " & netBootDmgMountPath & "/System/Library/CoreServices/DefaultDesktop.jpg"
logToFile_(me)
-- Copy selected image
do shell script "cp -r " & quoted form of customDesktopImagePath & " " & quoted form of netBootDmgMountPath & "/System/Library/CoreServices/DefaultDesktop.jpg" user name adminUserName password adminUsersPassword with administrator privileges
--Log Action
set logMe to "Copied " & customDesktopImagePath & " to " & netBootDmgMountPath & "/System/Library/CoreServices/DefaultDesktop.jpg"
logToFile_(me)
--Log Action
set logMe to "Trying to set permissions to 755 on " & quoted form of netBootDmgMountPath & "/System/Library/CoreServices/DefaultDesktop.jpg"
logToFile_(me)
-- Making writable
do shell script "/bin/chmod -R 755 " & quoted form of netBootDmgMountPath & "/System/Library/CoreServices/DefaultDesktop.jpg" user name adminUserName password adminUsersPassword with administrator privileges
--Log Action
set logMe to "Set permissions to 755 on " & quoted form of netBootDmgMountPath & "/System/Library/CoreServices/DefaultDesktop.jpg"
logToFile_(me)
-- Copy Imagr.app selected earlier
copyImagrApp_(me)
on error
--Log Action
set logMe to "Error: Copying Desktop Image"
logToFile_(me)
-- Set to false to display
set my userNotifyErrorHidden to false
-- Set Error message
set my userNotifyError to "Error: Copying Desktop Image"
-- Notify of errors or success
userNotify_(me)
end try
else
try
-- Update Build Process Window's Text Field
set my buildProcessTextField to "Copying Desktop Image"
delay 0.1
-- Update build Process ProgressBar
set my buildProcessProgressBar to buildProcessProgressBar + 1
--Log Action
set logMe to "Trying to copy " & customDesktopImagePath & " to " & netBootDmgMountPath & "/Library/Desktop Pictures/Mojave.heic"
logToFile_(me)
-- Copy selected image
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
--Log Action
set logMe to "Copied " & customDesktopImagePath & " to " & netBootDmgMountPath & "/Library/Desktop Pictures/Mojave.heic"
logToFile_(me)
--Log Action
set logMe to "Trying to set permissions to 755 on " & quoted form of netBootDmgMountPath & "/Library/Desktop Pictures/Mojave.heic"
logToFile_(me)
-- Making writable
do shell script "/bin/chmod -R 755 " & quoted form of netBootDmgMountPath & "/Library/Desktop\\ Pictures/Mojave.heic" user name adminUserName password adminUsersPassword with administrator privileges
--Log Action
set logMe to "Set permissions to 755 on " & quoted form of netBootDmgMountPath & "/Library/Desktop Pictures/Mojave.heic"
logToFile_(me)
-- Copy Imagr.app selected earlier
copyImagrApp_(me)
on error
--Log Action
set logMe to "Error: Copying Desktop Image"
logToFile_(me)
-- Set to false to display
set my userNotifyErrorHidden to false
-- Set Error message
set my userNotifyError to "Error: Copying Desktop Image"
-- Notify of errors or success
userNotify_(me)
end try
end if
else
-- Copy Imagr.app selected earlier
copyImagrApp_(me)
Expand Down

0 comments on commit 73910f0

Please sign in to comment.