diff --git a/Elementary OS Install utility/Elementary OS Install utility.xcodeproj/project.pbxproj b/Elementary OS Install utility/Elementary OS Install utility.xcodeproj/project.pbxproj new file mode 100644 index 0000000..d7baa90 --- /dev/null +++ b/Elementary OS Install utility/Elementary OS Install utility.xcodeproj/project.pbxproj @@ -0,0 +1,296 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 7E2AAA7719A03EE3002B9C43 /* AppleScriptObjC.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7E2AAA7619A03EE3002B9C43 /* AppleScriptObjC.framework */; }; + 7E2AAA7C19A03EE3002B9C43 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 7E2AAA7B19A03EE3002B9C43 /* main.m */; }; + 7E2AAA7E19A03EE3002B9C43 /* AppDelegate.applescript in Sources */ = {isa = PBXBuildFile; fileRef = 7E2AAA7D19A03EE3002B9C43 /* AppDelegate.applescript */; }; + 7E2AAA8019A03EE3002B9C43 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 7E2AAA7F19A03EE3002B9C43 /* Images.xcassets */; }; + 7E2AAA8319A03EE3002B9C43 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 7E2AAA8119A03EE3002B9C43 /* MainMenu.xib */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 7E2AAA7319A03EE3002B9C43 /* Elementary OS Install utility.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Elementary OS Install utility.app"; sourceTree = BUILT_PRODUCTS_DIR; }; + 7E2AAA7619A03EE3002B9C43 /* AppleScriptObjC.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppleScriptObjC.framework; path = System/Library/Frameworks/AppleScriptObjC.framework; sourceTree = SDKROOT; }; + 7E2AAA7A19A03EE3002B9C43 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 7E2AAA7B19A03EE3002B9C43 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + 7E2AAA7D19A03EE3002B9C43 /* AppDelegate.applescript */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.applescript; path = AppDelegate.applescript; sourceTree = ""; }; + 7E2AAA7F19A03EE3002B9C43 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; + 7E2AAA8219A03EE3002B9C43 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 7E2AAA7019A03EE3002B9C43 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 7E2AAA7719A03EE3002B9C43 /* AppleScriptObjC.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 7E2AAA6A19A03EE3002B9C43 = { + isa = PBXGroup; + children = ( + 7E2AAA7819A03EE3002B9C43 /* Elementary OS Install utility */, + 7E2AAA7519A03EE3002B9C43 /* Frameworks */, + 7E2AAA7419A03EE3002B9C43 /* Products */, + ); + sourceTree = ""; + }; + 7E2AAA7419A03EE3002B9C43 /* Products */ = { + isa = PBXGroup; + children = ( + 7E2AAA7319A03EE3002B9C43 /* Elementary OS Install utility.app */, + ); + name = Products; + sourceTree = ""; + }; + 7E2AAA7519A03EE3002B9C43 /* Frameworks */ = { + isa = PBXGroup; + children = ( + 7E2AAA7619A03EE3002B9C43 /* AppleScriptObjC.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + 7E2AAA7819A03EE3002B9C43 /* Elementary OS Install utility */ = { + isa = PBXGroup; + children = ( + 7E2AAA7D19A03EE3002B9C43 /* AppDelegate.applescript */, + 7E2AAA7F19A03EE3002B9C43 /* Images.xcassets */, + 7E2AAA8119A03EE3002B9C43 /* MainMenu.xib */, + 7E2AAA7919A03EE3002B9C43 /* Supporting Files */, + ); + path = "Elementary OS Install utility"; + sourceTree = ""; + }; + 7E2AAA7919A03EE3002B9C43 /* Supporting Files */ = { + isa = PBXGroup; + children = ( + 7E2AAA7A19A03EE3002B9C43 /* Info.plist */, + 7E2AAA7B19A03EE3002B9C43 /* main.m */, + ); + name = "Supporting Files"; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 7E2AAA7219A03EE3002B9C43 /* Elementary OS Install utility */ = { + isa = PBXNativeTarget; + buildConfigurationList = 7E2AAA8619A03EE3002B9C43 /* Build configuration list for PBXNativeTarget "Elementary OS Install utility" */; + buildPhases = ( + 7E2AAA6F19A03EE3002B9C43 /* Sources */, + 7E2AAA7019A03EE3002B9C43 /* Frameworks */, + 7E2AAA7119A03EE3002B9C43 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "Elementary OS Install utility"; + productName = "Elementary OS Install utility"; + productReference = 7E2AAA7319A03EE3002B9C43 /* Elementary OS Install utility.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 7E2AAA6B19A03EE3002B9C43 /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0600; + ORGANIZATIONNAME = "Sam Daitzman"; + TargetAttributes = { + 7E2AAA7219A03EE3002B9C43 = { + CreatedOnToolsVersion = 6.0; + }; + }; + }; + buildConfigurationList = 7E2AAA6E19A03EE3002B9C43 /* Build configuration list for PBXProject "Elementary OS Install utility" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 7E2AAA6A19A03EE3002B9C43; + productRefGroup = 7E2AAA7419A03EE3002B9C43 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 7E2AAA7219A03EE3002B9C43 /* Elementary OS Install utility */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 7E2AAA7119A03EE3002B9C43 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 7E2AAA8019A03EE3002B9C43 /* Images.xcassets in Resources */, + 7E2AAA8319A03EE3002B9C43 /* MainMenu.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 7E2AAA6F19A03EE3002B9C43 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 7E2AAA7E19A03EE3002B9C43 /* AppDelegate.applescript in Sources */, + 7E2AAA7C19A03EE3002B9C43 /* main.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + 7E2AAA8119A03EE3002B9C43 /* MainMenu.xib */ = { + isa = PBXVariantGroup; + children = ( + 7E2AAA8219A03EE3002B9C43 /* Base */, + ); + name = MainMenu.xib; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 7E2AAA8419A03EE3002B9C43 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "-"; + COPY_PHASE_STRIP = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.10; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = macosx; + }; + name = Debug; + }; + 7E2AAA8519A03EE3002B9C43 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "-"; + COPY_PHASE_STRIP = YES; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.10; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = macosx; + }; + name = Release; + }; + 7E2AAA8719A03EE3002B9C43 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + COMBINE_HIDPI_IMAGES = YES; + INFOPLIST_FILE = "Elementary OS Install utility/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; + MACOSX_DEPLOYMENT_TARGET = 10.7; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Debug; + }; + 7E2AAA8819A03EE3002B9C43 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + COMBINE_HIDPI_IMAGES = YES; + INFOPLIST_FILE = "Elementary OS Install utility/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; + MACOSX_DEPLOYMENT_TARGET = 10.7; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 7E2AAA6E19A03EE3002B9C43 /* Build configuration list for PBXProject "Elementary OS Install utility" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 7E2AAA8419A03EE3002B9C43 /* Debug */, + 7E2AAA8519A03EE3002B9C43 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 7E2AAA8619A03EE3002B9C43 /* Build configuration list for PBXNativeTarget "Elementary OS Install utility" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 7E2AAA8719A03EE3002B9C43 /* Debug */, + 7E2AAA8819A03EE3002B9C43 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 7E2AAA6B19A03EE3002B9C43 /* Project object */; +} diff --git a/Elementary OS Install utility/Elementary OS Install utility.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Elementary OS Install utility/Elementary OS Install utility.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..6056ac2 --- /dev/null +++ b/Elementary OS Install utility/Elementary OS Install utility.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/Elementary OS Install utility/Elementary OS Install utility.xcodeproj/project.xcworkspace/xcshareddata/Elementary OS Install utility.xccheckout b/Elementary OS Install utility/Elementary OS Install utility.xcodeproj/project.xcworkspace/xcshareddata/Elementary OS Install utility.xccheckout new file mode 100644 index 0000000..290c81a --- /dev/null +++ b/Elementary OS Install utility/Elementary OS Install utility.xcodeproj/project.xcworkspace/xcshareddata/Elementary OS Install utility.xccheckout @@ -0,0 +1,41 @@ + + + + + IDESourceControlProjectFavoriteDictionaryKey + + IDESourceControlProjectIdentifier + ECB7894F-5AA6-4722-9B66-0568172AA983 + IDESourceControlProjectName + Elementary OS Install utility + IDESourceControlProjectOriginsDictionary + + 381F72835FD20340ED4BE8B4F1F94E07B42F858D + https://github.com/sdaitzman/elementary-os-install-utility.git + + IDESourceControlProjectPath + Elementary OS Install utility/Elementary OS Install utility.xcodeproj + IDESourceControlProjectRelativeInstallPathDictionary + + 381F72835FD20340ED4BE8B4F1F94E07B42F858D + ../../.. + + IDESourceControlProjectURL + https://github.com/sdaitzman/elementary-os-install-utility.git + IDESourceControlProjectVersion + 111 + IDESourceControlProjectWCCIdentifier + 381F72835FD20340ED4BE8B4F1F94E07B42F858D + IDESourceControlProjectWCConfigurations + + + IDESourceControlRepositoryExtensionIdentifierKey + public.vcs.git + IDESourceControlWCCIdentifierKey + 381F72835FD20340ED4BE8B4F1F94E07B42F858D + IDESourceControlWCCName + elementary-os-install-utility + + + + diff --git a/Elementary OS Install utility/Elementary OS Install utility.xcodeproj/project.xcworkspace/xcuserdata/samuel.xcuserdatad/UserInterfaceState.xcuserstate b/Elementary OS Install utility/Elementary OS Install utility.xcodeproj/project.xcworkspace/xcuserdata/samuel.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..5d72a7b Binary files /dev/null and b/Elementary OS Install utility/Elementary OS Install utility.xcodeproj/project.xcworkspace/xcuserdata/samuel.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/Elementary OS Install utility/Elementary OS Install utility.xcodeproj/xcuserdata/samuel.xcuserdatad/xcschemes/Elementary OS Install utility.xcscheme b/Elementary OS Install utility/Elementary OS Install utility.xcodeproj/xcuserdata/samuel.xcuserdatad/xcschemes/Elementary OS Install utility.xcscheme new file mode 100644 index 0000000..e1d0a33 --- /dev/null +++ b/Elementary OS Install utility/Elementary OS Install utility.xcodeproj/xcuserdata/samuel.xcuserdatad/xcschemes/Elementary OS Install utility.xcscheme @@ -0,0 +1,86 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Elementary OS Install utility/Elementary OS Install utility.xcodeproj/xcuserdata/samuel.xcuserdatad/xcschemes/xcschememanagement.plist b/Elementary OS Install utility/Elementary OS Install utility.xcodeproj/xcuserdata/samuel.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..a0be291 --- /dev/null +++ b/Elementary OS Install utility/Elementary OS Install utility.xcodeproj/xcuserdata/samuel.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,22 @@ + + + + + SchemeUserState + + Elementary OS Install utility.xcscheme + + orderHint + 0 + + + SuppressBuildableAutocreation + + 7E2AAA7219A03EE3002B9C43 + + primary + + + + + diff --git a/Elementary OS Install utility/Elementary OS Install utility/AppDelegate.applescript b/Elementary OS Install utility/Elementary OS Install utility/AppDelegate.applescript new file mode 100644 index 0000000..7913dc6 --- /dev/null +++ b/Elementary OS Install utility/Elementary OS Install utility/AppDelegate.applescript @@ -0,0 +1,147 @@ +-- +-- AppDelegate.applescript +-- Elementary OS Install utility +-- +-- Created by Sam Daitzman on 3/29/14. +-- Copyright (c) 2014 Sam Daitzman. All rights reserved. +-- + +script AppDelegate + property parent : class "NSObject" + + -- IBOutlets + property window : missing value + + on applicationWillFinishLaunching_(aNotification) + -- Insert code here to initialize your application before any files are opened + end applicationWillFinishLaunching_ + + + + -- extract and do standard install of refind + + on ButtonHandlerInstallRefind_(sender) + + display dialog "Elementary OS Install Assistant will help you download and install rEFInd." + + -- just in case script failed earlier (even though that has never happened) erase our directory + do shell script "rm -rf ~/eosinstall" + + -- make our own directory so as not to mess up others + do shell script "mkdir -p ~/eosinstall" + + -- download latest version of rEFInd + do shell script "curl -L -o ~/eosinstall/refind.zip \"http://sourceforge.net/projects/refind/files/latest/download?source=files\"" + + -- unzip said rEFInd + do shell script "unzip ~/eosinstall/refind* -d ~/eosinstall" + + -- clean up zip file + do shell script "rm ~/eosinstall/refind.zip" + + display dialog "rEFInd has been downloaded and unzipped. Would you like to install it? If you already have rEFInd installed, it will automatically be upgraded and your old settings, icons, and directories preserved." + + -- unmount ESP then mount to a known location + do shell script "diskutil unmount /Volumes/EFI &> /dev/null &" + do shell script "diskutil unmount /Volumes/ESP &> /dev/null &" + delay 3 + do shell script "mkdir -p /Volumes/EFI" + do shell script "mount -t msdos /dev/disk0s1 /Volumes/EFI/" with administrator privileges + + -- if already installed, allows to be updated rather than messed up + do shell script "mv /Volumes/EFI/EFI/BOOT/bootx64.efi /Volumes/EFI/EFI/BOOT/refind_x64.efi &> /dev/null &" + do shell script "mv /Volumes/EFI/EFI/BOOT /Volumes/EFI/EFI/refind &> /dev/null &" + + -- installs rEFInd on ESP with all drivers + do shell script "~/eosinstall/refind-bin*/install.sh --esp --alldrivers" with administrator privileges + + -- removes refind install folder + do shell script "rm -rf ~/eosinstall/refind-bin*" + + -- moves to faster-booting location + do shell script "mv /Volumes/EFI/EFI/refind /Volumes/EFI/EFI/BOOT" + do shell script "mv /Volumes/EFI/EFI/BOOT/refind_x64.efi /Volumes/EFI/EFI/BOOT/bootx64.efi" + + -- deletes entire install folder + do shell script "rm -rf ~/eosinstall" + + -- unmount partition again + do shell script "diskutil unmount /Volumes/EFI &> /dev/null &" + do shell script "diskutil unmount /Volumes/ESP &> /dev/null &" + + display dialog "Congratulations, rEFInd has been installed! It should show up next time you reboot." + + end ButtonHandlerInstallRefind_ + + on ButtonHandlerMakeThumbDrive_(sender) + # get the name of the ISO + + display dialog "Elementary OS Install Utility will help you create a bootable thumb drive to install Elementary OS and, if you choose, also install rEFInd. An Elementary installer thumb drive can be easily restored to a standard thumb drive later." + set isoFile to (choose file with prompt "Choose an Elementary OS ISO for conversion, then wait a while:" of type {"public.iso-image"}) + + do shell script "rm -rf ~/eosinstall &> /dev/null &" + do shell script "mkdir -p ~/eosinstall" + do shell script "hdiutil convert -format UDRW -o ~/eosinstall/elementary.img " & POSIX path of isoFile + do shell script "mv ~/eosinstall/elementary.img.dmg ~/eosinstall/elementary.img" + + # select thumb drive, wipe it, and put installer on it + + display dialog "The file has been successfully converted! Please insert your thumb drive, wait for it to be recognized and click \"OK\"" + + tell application "Finder" + try + set allDrives to the name of every disk + on error + display dialog "There are no other drives to install on." + return + end try + end tell + + set selectedDrive to "driveForInstallerGoesHere" + set selectedDrive to {choose from list allDrives with prompt "Choose the drive for the Elementary installer:"} as text + set selectedDrive to "\"" & selectedDrive & "\"" + + set devicePath to POSIX path of "/Volumes/" & selectedDrive & ";" + set mainDrive to do shell script "diskutil list | grep " & selectedDrive & " | grep -oh \"\\w*disk*\\w\";" + + + display dialog "The drive " & selectedDrive & " will be completely wiped as well as any other partitions on that drive." & return & "Do you want to continue?" + do shell script "diskutil partitionDisk " & mainDrive & " 1 GPT fat32 FLASHDISK 100%" + + display dialog "Your thumb drive has been partitioned - next the Elementary installer will be flashed to it. This could take a while." + + set devPath to "/dev/r" & mainDrive + + do shell script "diskutil unmountDisk " & devPath + set userName to (short user name of (system info)) + do shell script "dd if=/Users/" & userName & "/eosinstall/elementary.img of=" & devPath & " bs=1m" with administrator privileges + do shell script "rm ~/eosinstall/elementary.img" + do shell script "rm -rf ~/eosinstall" + + display dialog "Congratulations! The thumb drive is now an Elementary OS installer. Have fun! It's now safe to remove the drive." + end ButtonHandlerMakeThumbDrive_ + + on ButtonHandlerDocs_(sender) + do shell script "open http://www.rodsbooks.com/refind/" + end ButtonHandlerDocs_ + + on ButtonHandlerSupport_(sender) + do shell script "open http://elementaryos.org/support" + end ButtonHandlerSupport_ + + + + -- quit install utility + + on ButtonHandlerQuit_(sender) + quit + end ButtonHandlerQuit_ + + + + on applicationShouldTerminate_(sender) + -- Insert code here to do any housekeeping before your application quits + return current application's NSTerminateNow + end applicationShouldTerminate_ + +end script \ No newline at end of file diff --git a/Elementary OS Install utility/Elementary OS Install utility/Base.lproj/MainMenu.xib b/Elementary OS Install utility/Elementary OS Install utility/Base.lproj/MainMenu.xib new file mode 100644 index 0000000..dff3427 --- /dev/null +++ b/Elementary OS Install utility/Elementary OS Install utility/Base.lproj/MainMenu.xib @@ -0,0 +1,216 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This Utility will help you install Elementary OS on your Mac. To get started, you'll need an ISO file of Elementary OS. This can be downloaded for free from the Elementary OS website. This utility can also install rEFInd, a free EFI-based boot picker, to help you boot Elementary OS. You'll have to use Disk Utility to create a FAT partition to install Elementary OS to. This utility should also work with *buntu. + + + + + + + + + + + + + + + + + + Helps you partition your Mac using Disk utility, prints out directions for what to do next, then restarts your Mac when you're ready + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Elementary OS Install utility/Elementary OS Install utility/Images.xcassets/AppIcon.appiconset/Contents.json b/Elementary OS Install utility/Elementary OS Install utility/Images.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..0272c33 --- /dev/null +++ b/Elementary OS Install utility/Elementary OS Install utility/Images.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,68 @@ +{ + "images" : [ + { + "size" : "16x16", + "idiom" : "mac", + "filename" : "icon.png", + "scale" : "1x" + }, + { + "size" : "16x16", + "idiom" : "mac", + "filename" : "icon-9.png", + "scale" : "2x" + }, + { + "size" : "32x32", + "idiom" : "mac", + "filename" : "icon-8.png", + "scale" : "1x" + }, + { + "size" : "32x32", + "idiom" : "mac", + "filename" : "icon-7.png", + "scale" : "2x" + }, + { + "size" : "128x128", + "idiom" : "mac", + "filename" : "icon-6.png", + "scale" : "1x" + }, + { + "size" : "128x128", + "idiom" : "mac", + "filename" : "icon-5.png", + "scale" : "2x" + }, + { + "size" : "256x256", + "idiom" : "mac", + "filename" : "icon-4.png", + "scale" : "1x" + }, + { + "size" : "256x256", + "idiom" : "mac", + "filename" : "icon-3.png", + "scale" : "2x" + }, + { + "size" : "512x512", + "idiom" : "mac", + "filename" : "icon-2.png", + "scale" : "1x" + }, + { + "size" : "512x512", + "idiom" : "mac", + "filename" : "icon-1.png", + "scale" : "2x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Elementary OS Install utility/Elementary OS Install utility/Images.xcassets/AppIcon.appiconset/icon-1.png b/Elementary OS Install utility/Elementary OS Install utility/Images.xcassets/AppIcon.appiconset/icon-1.png new file mode 100644 index 0000000..52db053 Binary files /dev/null and b/Elementary OS Install utility/Elementary OS Install utility/Images.xcassets/AppIcon.appiconset/icon-1.png differ diff --git a/Elementary OS Install utility/Elementary OS Install utility/Images.xcassets/AppIcon.appiconset/icon-2.png b/Elementary OS Install utility/Elementary OS Install utility/Images.xcassets/AppIcon.appiconset/icon-2.png new file mode 100644 index 0000000..52db053 Binary files /dev/null and b/Elementary OS Install utility/Elementary OS Install utility/Images.xcassets/AppIcon.appiconset/icon-2.png differ diff --git a/Elementary OS Install utility/Elementary OS Install utility/Images.xcassets/AppIcon.appiconset/icon-3.png b/Elementary OS Install utility/Elementary OS Install utility/Images.xcassets/AppIcon.appiconset/icon-3.png new file mode 100644 index 0000000..52db053 Binary files /dev/null and b/Elementary OS Install utility/Elementary OS Install utility/Images.xcassets/AppIcon.appiconset/icon-3.png differ diff --git a/Elementary OS Install utility/Elementary OS Install utility/Images.xcassets/AppIcon.appiconset/icon-4.png b/Elementary OS Install utility/Elementary OS Install utility/Images.xcassets/AppIcon.appiconset/icon-4.png new file mode 100644 index 0000000..52db053 Binary files /dev/null and b/Elementary OS Install utility/Elementary OS Install utility/Images.xcassets/AppIcon.appiconset/icon-4.png differ diff --git a/Elementary OS Install utility/Elementary OS Install utility/Images.xcassets/AppIcon.appiconset/icon-5.png b/Elementary OS Install utility/Elementary OS Install utility/Images.xcassets/AppIcon.appiconset/icon-5.png new file mode 100644 index 0000000..52db053 Binary files /dev/null and b/Elementary OS Install utility/Elementary OS Install utility/Images.xcassets/AppIcon.appiconset/icon-5.png differ diff --git a/Elementary OS Install utility/Elementary OS Install utility/Images.xcassets/AppIcon.appiconset/icon-6.png b/Elementary OS Install utility/Elementary OS Install utility/Images.xcassets/AppIcon.appiconset/icon-6.png new file mode 100644 index 0000000..52db053 Binary files /dev/null and b/Elementary OS Install utility/Elementary OS Install utility/Images.xcassets/AppIcon.appiconset/icon-6.png differ diff --git a/Elementary OS Install utility/Elementary OS Install utility/Images.xcassets/AppIcon.appiconset/icon-7.png b/Elementary OS Install utility/Elementary OS Install utility/Images.xcassets/AppIcon.appiconset/icon-7.png new file mode 100644 index 0000000..52db053 Binary files /dev/null and b/Elementary OS Install utility/Elementary OS Install utility/Images.xcassets/AppIcon.appiconset/icon-7.png differ diff --git a/Elementary OS Install utility/Elementary OS Install utility/Images.xcassets/AppIcon.appiconset/icon-8.png b/Elementary OS Install utility/Elementary OS Install utility/Images.xcassets/AppIcon.appiconset/icon-8.png new file mode 100644 index 0000000..52db053 Binary files /dev/null and b/Elementary OS Install utility/Elementary OS Install utility/Images.xcassets/AppIcon.appiconset/icon-8.png differ diff --git a/Elementary OS Install utility/Elementary OS Install utility/Images.xcassets/AppIcon.appiconset/icon-9.png b/Elementary OS Install utility/Elementary OS Install utility/Images.xcassets/AppIcon.appiconset/icon-9.png new file mode 100644 index 0000000..52db053 Binary files /dev/null and b/Elementary OS Install utility/Elementary OS Install utility/Images.xcassets/AppIcon.appiconset/icon-9.png differ diff --git a/Elementary OS Install utility/Elementary OS Install utility/Images.xcassets/AppIcon.appiconset/icon.png b/Elementary OS Install utility/Elementary OS Install utility/Images.xcassets/AppIcon.appiconset/icon.png new file mode 100644 index 0000000..52db053 Binary files /dev/null and b/Elementary OS Install utility/Elementary OS Install utility/Images.xcassets/AppIcon.appiconset/icon.png differ diff --git a/Elementary OS Install utility/Elementary OS Install utility/Info.plist b/Elementary OS Install utility/Elementary OS Install utility/Info.plist new file mode 100644 index 0000000..0dbe95f --- /dev/null +++ b/Elementary OS Install utility/Elementary OS Install utility/Info.plist @@ -0,0 +1,34 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIconFile + + CFBundleIdentifier + org.sdaitzman.$(PRODUCT_NAME:rfc1034identifier) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + 3.2.0beta + CFBundleSignature + ???? + CFBundleVersion + 3 + LSMinimumSystemVersion + $(MACOSX_DEPLOYMENT_TARGET) + NSHumanReadableCopyright + Copyright © 2014 Sam Daitzman. All rights reserved. + NSMainNibFile + MainMenu + NSPrincipalClass + NSApplication + + diff --git a/Elementary OS Install utility/Elementary OS Install utility/main.m b/Elementary OS Install utility/Elementary OS Install utility/main.m new file mode 100644 index 0000000..d0c9747 --- /dev/null +++ b/Elementary OS Install utility/Elementary OS Install utility/main.m @@ -0,0 +1,15 @@ +// +// main.m +// Elementary OS Install utility +// +// Created by Sam Daitzman on 8/16/14. +// Copyright (c) 2014 Sam Daitzman. All rights reserved. +// + +#import +#import + +int main(int argc, const char * argv[]) { + [[NSBundle mainBundle] loadAppleScriptObjectiveCScripts]; + return NSApplicationMain(argc, argv); +}