diff --git a/Installer-Signed/BackupMinder.pkg b/Installer-Signed/BackupMinder.pkg index a53e9f3..d0b9aa5 100644 Binary files a/Installer-Signed/BackupMinder.pkg and b/Installer-Signed/BackupMinder.pkg differ diff --git a/Installer-pkg/BackupMinder-Introduction.rtf b/Installer-pkg/BackupMinder-Introduction.rtf index ee407ed..3584a88 100644 --- a/Installer-pkg/BackupMinder-Introduction.rtf +++ b/Installer-pkg/BackupMinder-Introduction.rtf @@ -1,11 +1,11 @@ -{\rtf1\ansi\ansicpg1252\cocoartf1348\cocoasubrtf170 +{\rtf1\ansi\ansicpg1252\cocoartf1265\cocoasubrtf210 \cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} -\paperw12240\paperh15840\margl1440\margr1440\vieww9000\viewh8400\viewkind0 +\margl1440\margr1440\vieww9000\viewh8400\viewkind0 \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural \f0\fs28 \cf0 \ -This package will install BackupMinder 2.0\ +This package will install BackupMinder 2.1\ \ This tool is designed to limit the amount of disk space used by recurring backups.\ \ diff --git a/Installer-pkg/BackupMinderInstaller.pkgproj b/Installer-pkg/BackupMinderInstaller.pkgproj index 6e368c9..e6c6f2d 100644 --- a/Installer-pkg/BackupMinderInstaller.pkgproj +++ b/Installer-pkg/BackupMinderInstaller.pkgproj @@ -22,7 +22,7 @@ GID 80 PATH - ../UI/BackupMinderUI/build/Release/BackupMinderUI.app + ../../../../../Applications/BackupMinderUI.app PATH_TYPE 1 PERMISSIONS @@ -542,7 +542,7 @@ CONCLUSION_ACTION 0 IDENTIFIER - com.watchmanmonitoring.backupminder + org.backupminder.backupminder LOCATION 0 NAME @@ -550,7 +550,7 @@ OVERWRITE_PERMISSIONS VERSION - 2.0 + 2.1 UUID A7530570-8DF6-470C-B5BB-FA1B6253D702 @@ -570,7 +570,7 @@ ZW50LVN0eWxlLVR5cGUiIGNvbnRlbnQ9InRleHQvY3NzIj4KPHRp dGxlPjwvdGl0bGU+CjxtZXRhIG5hbWU9IkdlbmVyYXRvciIgY29u dGVudD0iQ29jb2EgSFRNTCBXcml0ZXIiPgo8bWV0YSBuYW1lPSJD - b2NvYVZlcnNpb24iIGNvbnRlbnQ9IjExODcuMzQiPgo8c3R5bGUg + b2NvYVZlcnNpb24iIGNvbnRlbnQ9IjEyNjUuMjEiPgo8c3R5bGUg dHlwZT0idGV4dC9jc3MiPgpwLnAxIHttYXJnaW46IDAuMHB4IDAu MHB4IDAuMHB4IDAuMHB4OyBmb250OiAxMi4wcHggSGVsdmV0aWNh fQo8L3N0eWxlPgo8L2hlYWQ+Cjxib2R5Pgo8cCBjbGFzcz0icDEi diff --git a/Installer-pkg/package signer.txt b/Installer-pkg/package signer.txt new file mode 100644 index 0000000..fd55d2d --- /dev/null +++ b/Installer-pkg/package signer.txt @@ -0,0 +1,4 @@ + +# package signing + +$ /usr/bin/productsign --sign "Developer ID Installer: Watchman Monitoring, Inc" /Users/Shared/Development/backupminder/Installer-pkg/Build/BackupMinder.pkg /Users/Shared/Development/backupminder/Installer-Signed/BackupMinder.pkg diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 0000000..d7deeb1 --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015 Watchman Monitoring Inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/Library/Application Support/BackupMinder/BackupMinderReadme.rtf b/Library/Application Support/BackupMinder/BackupMinderReadme.rtf index f62cde4..776d2a0 100644 --- a/Library/Application Support/BackupMinder/BackupMinderReadme.rtf +++ b/Library/Application Support/BackupMinder/BackupMinderReadme.rtf @@ -1,215 +1,15 @@ -{\rtf1\ansi\ansicpg1252\cocoartf1038\cocoasubrtf360 -{\fonttbl\f0\fnil\fcharset0 HelveticaNeue;\f1\fswiss\fcharset0 ArialMT;} -{\colortbl;\red255\green255\blue255;\red255\green255\blue255;\red191\green191\blue191;\red191\green191\blue191; -} +{\rtf1\ansi\ansicpg1252\cocoartf1265\cocoasubrtf210 +\cocoascreenfonts1{\fonttbl\f0\fnil\fcharset0 HelveticaNeue;\f1\fswiss\fcharset0 ArialMT;} +{\colortbl;\red255\green255\blue255;} \margl1440\margr1440\vieww18240\viewh18380\viewkind0 \deftab720 \pard\pardeftab720\sa200 -\f0\b\fs34 \cf0 \cb2 Installation\ +\f0\b\fs34 \cf0 Installation\ \pard\pardeftab720\sl300 \f1\b0\fs24 \cf0 Installs to: /Library/Application Support/BackupMinder \ \ -\ -\pard\pardeftab720\sl300\sa200 - -\f0\b\fs34 \cf0 Usage\ -\pard\pardeftab720\sl300 - -\f1\b0\fs24 \cf0 The preferred method of utilizing the Backup Minder application, is to have a Launch Daemon watch a directory, and trigger Backup Minder when this directory is modified. However, you can also call BackupMinder from the command line, thus, in effect, set up a script to do so.\ -\ -\ -The first backup of each month will be stored in the ArchiveFolder\ -The backups in BackupFolder will be trimmed to the quantity defined in BackupsToKeep\ -\ -\ -\pard\pardeftab720\sl300\sa200 - -\f0\b\fs34 \cf0 Settings\ -\pard\pardeftab720\sl300 - -\f1\b0\fs24 \cf0 Defining what backups to monitor, and where to archive them, can be done in two ways: \ -\ -\pard\pardeftab720\sl300 - -\b \cf0 Settings options and defaults -\b0 \ -\ -When Backup Minder was installed, it created a settings file at: /Library/Application Support/BackupMinder/BackupMinder.plist\ -\ -If Backup Minder is started without any command arguments, it will look to this plist to decide what to do, and how to do it.\ -\ -This settings plist contains these keys:\ - -\itap1\trowd \taflags1 \trgaph108\trleft-108 \trbrdrt\brdrnil \trbrdrl\brdrnil \trbrdrr\brdrnil -\clvertalc \clshdrawnil \clwWidth4460\clftsWidth3 \clbrdrt\brdrs\brdrw20\brdrcf3 \clbrdrl\brdrs\brdrw20\brdrcf3 \clbrdrb\brdrs\brdrw20\brdrcf3 \clbrdrr\brdrs\brdrw20\brdrcf3 \clpadl100 \clpadr100 \gaph\cellx4320 -\clvertalc \clshdrawnil \clwWidth13340\clftsWidth3 \clbrdrt\brdrs\brdrw20\brdrcf3 \clbrdrl\brdrs\brdrw20\brdrcf3 \clbrdrb\brdrs\brdrw20\brdrcf3 \clbrdrr\brdrs\brdrw20\brdrcf3 \clpadl100 \clpadr100 \gaph\cellx8640 -\pard\intbl\itap1\pardeftab720\sl300\ql\qnatural - -\b \cf0 Key -\b0 \cell -\pard\intbl\itap1\pardeftab720\sl300\ql\qnatural - -\b \cf0 Value -\b0 \cell \row - -\itap1\trowd \taflags1 \trgaph108\trleft-108 \trbrdrl\brdrnil \trbrdrr\brdrnil -\clvertalc \clshdrawnil \clwWidth4460\clftsWidth3 \clbrdrt\brdrs\brdrw20\brdrcf3 \clbrdrl\brdrs\brdrw20\brdrcf3 \clbrdrb\brdrs\brdrw20\brdrcf3 \clbrdrr\brdrs\brdrw20\brdrcf3 \clpadl100 \clpadr100 \gaph\cellx4320 -\clvertalc \clshdrawnil \clwWidth13340\clftsWidth3 \clbrdrt\brdrs\brdrw20\brdrcf3 \clbrdrl\brdrs\brdrw20\brdrcf3 \clbrdrb\brdrs\brdrw20\brdrcf3 \clbrdrr\brdrs\brdrw20\brdrcf3 \clpadl100 \clpadr100 \gaph\cellx8640 -\pard\intbl\itap1\pardeftab720\ql\qnatural -\cf0 \cb1 BackupSource\cb2 \cell -\pard\intbl\itap1\pardeftab720\sl300\ql\qnatural -\cf0 \cb1 Directory where the backup files are located\cb2 \cell \row - -\itap1\trowd \taflags1 \trgaph108\trleft-108 \trbrdrl\brdrnil \trbrdrr\brdrnil -\clvertalc \clshdrawnil \clwWidth4460\clftsWidth3 \clbrdrt\brdrs\brdrw20\brdrcf3 \clbrdrl\brdrs\brdrw20\brdrcf3 \clbrdrb\brdrs\brdrw20\brdrcf3 \clbrdrr\brdrs\brdrw20\brdrcf3 \clpadl100 \clpadr100 \gaph\cellx4320 -\clvertalc \clshdrawnil \clwWidth13340\clftsWidth3 \clbrdrt\brdrs\brdrw20\brdrcf3 \clbrdrl\brdrs\brdrw20\brdrcf3 \clbrdrb\brdrs\brdrw20\brdrcf3 \clbrdrr\brdrs\brdrw20\brdrcf3 \clpadl100 \clpadr100 \gaph\cellx8640 -\pard\intbl\itap1\pardeftab720\ql\qnatural -\cf0 \cb1 ArchiveDestination\cb2 \cell -\pard\intbl\itap1\pardeftab720\sl300\ql\qnatural -\cf0 \cb1 Directory where BackupMinder should place it's archives\cb2 \cell \row - -\itap1\trowd \taflags1 \trgaph108\trleft-108 \trbrdrl\brdrnil \trbrdrr\brdrnil -\clvertalc \clshdrawnil \clwWidth4460\clftsWidth3 \clbrdrt\brdrs\brdrw20\brdrcf3 \clbrdrl\brdrs\brdrw20\brdrcf3 \clbrdrb\brdrs\brdrw20\brdrcf3 \clbrdrr\brdrs\brdrw20\brdrcf3 \clpadl100 \clpadr100 \gaph\cellx4320 -\clvertalc \clshdrawnil \clwWidth13340\clftsWidth3 \clbrdrt\brdrs\brdrw20\brdrcf3 \clbrdrl\brdrs\brdrw20\brdrcf3 \clbrdrb\brdrs\brdrw20\brdrcf3 \clbrdrr\brdrs\brdrw20\brdrcf3 \clpadl100 \clpadr100 \gaph\cellx8640 -\pard\intbl\itap1\pardeftab720\sl300\ql\qnatural -\cf0 \cb1 NameContains\cb2 \cell -\pard\intbl\itap1\pardeftab720\sl300\ql\qnatural -\cf0 \cb1 Unique pattern in the file name of the backups to check for -\b Case Sensitive -\b0 \cb2 \cell \row - -\itap1\trowd \taflags1 \trgaph108\trleft-108 \trbrdrl\brdrnil \trbrdrt\brdrnil \trbrdrr\brdrnil -\clvertalc \clshdrawnil \clwWidth4460\clftsWidth3 \clbrdrt\brdrs\brdrw20\brdrcf3 \clbrdrl\brdrs\brdrw20\brdrcf3 \clbrdrb\brdrs\brdrw20\brdrcf3 \clbrdrr\brdrs\brdrw20\brdrcf3 \clpadl100 \clpadr100 \gaph\cellx4320 -\clvertalc \clshdrawnil \clwWidth13340\clftsWidth3 \clbrdrt\brdrs\brdrw20\brdrcf3 \clbrdrl\brdrs\brdrw20\brdrcf3 \clbrdrb\brdrs\brdrw20\brdrcf3 \clbrdrr\brdrs\brdrw20\brdrcf3 \clpadl100 \clpadr100 \gaph\cellx8640 -\pard\intbl\itap1\pardeftab720\sl300\ql\qnatural -\cf0 \cb1 BackupsToKeep\cb2 \cell -\pard\intbl\itap1\pardeftab720\sl300\ql\qnatural -\cf0 \cb1 Number of backups to keep when trimming the backup folder \cb2 \cell \lastrow\row -\pard\pardeftab720\sl300 -\cf0 \ -\ -\pard\pardeftab720\sl300 - -\b \cf0 Optional Settings -\b0 \ - -\itap1\trowd \taflags1 \trgaph108\trleft-108 \trbrdrt\brdrnil \trbrdrl\brdrnil \trbrdrr\brdrnil -\clvertalc \clshdrawnil \clwWidth2480\clftsWidth3 \clbrdrt\brdrs\brdrw20\brdrcf3 \clbrdrl\brdrs\brdrw20\brdrcf3 \clbrdrb\brdrs\brdrw20\brdrcf3 \clbrdrr\brdrs\brdrw20\brdrcf3 \clpadl100 \clpadr100 \gaph\cellx2880 -\clvertalc \clshdrawnil \clwWidth1800\clftsWidth3 \clbrdrt\brdrs\brdrw20\brdrcf3 \clbrdrl\brdrs\brdrw20\brdrcf3 \clbrdrb\brdrs\brdrw20\brdrcf3 \clbrdrr\brdrs\brdrw20\brdrcf3 \clpadl100 \clpadr100 \gaph\cellx5760 -\clvertalc \clshdrawnil \clwWidth13300\clftsWidth3 \clbrdrt\brdrs\brdrw20\brdrcf3 \clbrdrl\brdrs\brdrw20\brdrcf3 \clbrdrb\brdrs\brdrw20\brdrcf3 \clbrdrr\brdrs\brdrw20\brdrcf3 \clpadl100 \clpadr100 \gaph\cellx8640 -\pard\intbl\itap1\pardeftab720\sl300\ql\qnatural - -\b \cf0 Key\cell -\pard\intbl\itap1\pardeftab720\sl300 -\cf0 Default Value -\b0 \cell -\pard\intbl\itap1\pardeftab720\sl300\ql\qnatural -\cf0 \cell \row - -\itap1\trowd \taflags1 \trgaph108\trleft-108 \trbrdrl\brdrnil \trbrdrr\brdrnil -\clvertalc \clshdrawnil \clwWidth2480\clftsWidth3 \clbrdrt\brdrs\brdrw20\brdrcf3 \clbrdrl\brdrs\brdrw20\brdrcf3 \clbrdrb\brdrs\brdrw20\brdrcf3 \clbrdrr\brdrs\brdrw20\brdrcf3 \clpadl100 \clpadr100 \gaph\cellx2880 -\clvertalc \clshdrawnil \clwWidth1800\clftsWidth3 \clbrdrt\brdrs\brdrw20\brdrcf3 \clbrdrl\brdrs\brdrw20\brdrcf3 \clbrdrb\brdrs\brdrw20\brdrcf3 \clbrdrr\brdrs\brdrw20\brdrcf3 \clpadl100 \clpadr100 \gaph\cellx5760 -\clvertalc \clshdrawnil \clwWidth13300\clftsWidth3 \clbrdrt\brdrs\brdrw20\brdrcf3 \clbrdrl\brdrs\brdrw20\brdrcf3 \clbrdrb\brdrs\brdrw20\brdrcf3 \clbrdrr\brdrs\brdrw20\brdrcf3 \clpadl100 \clpadr100 \gaph\cellx8640 -\pard\intbl\itap1\pardeftab720\sl300\ql\qnatural -\cf0 \cb1 WarnInactiveDays\cb2 \cell -\pard\intbl\itap1\pardeftab720\sl300 -\cf0 7\cell -\pard\intbl\itap1\pardeftab720\sl300\ql\qnatural -\cf0 \cb1 Number of days without activity before we log that there is a problem. \cb2 \cell \row - -\itap1\trowd \taflags1 \trgaph108\trleft-108 \trbrdrl\brdrnil \trbrdrt\brdrnil \trbrdrr\brdrnil -\clvertalc \clshdrawnil \clwWidth2480\clftsWidth3 \clbrdrt\brdrs\brdrw20\brdrcf3 \clbrdrl\brdrs\brdrw20\brdrcf3 \clbrdrb\brdrs\brdrw20\brdrcf3 \clbrdrr\brdrs\brdrw20\brdrcf3 \clpadl100 \clpadr100 \gaph\cellx2880 -\clvertalc \clshdrawnil \clwWidth1800\clftsWidth3 \clbrdrt\brdrs\brdrw20\brdrcf3 \clbrdrl\brdrs\brdrw20\brdrcf3 \clbrdrb\brdrs\brdrw20\brdrcf3 \clbrdrr\brdrs\brdrw20\brdrcf3 \clpadl100 \clpadr100 \gaph\cellx5760 -\clvertalc \clshdrawnil \clwWidth13300\clftsWidth3 \clbrdrt\brdrs\brdrw20\brdrcf3 \clbrdrl\brdrs\brdrw20\brdrcf3 \clbrdrb\brdrs\brdrw20\brdrcf3 \clbrdrr\brdrs\brdrw20\brdrcf3 \clpadl100 \clpadr100 \gaph\cellx8640 -\pard\intbl\itap1\pardeftab720\sl300\ql\qnatural -\cf0 \cb1 MaxLogLength\cb2 \cell -\pard\intbl\itap1\pardeftab720\sl300\ql\qnatural -\cf0 100\cell -\pard\intbl\itap1\pardeftab720\sl300\ql\qnatural -\cf0 \cb1 The amount of logs to keep for each backup set Defaults to 100\cb2 \cell \lastrow\row -\pard\pardeftab720\sl300\ql\qnatural -\cf0 \cb1 \ -\pard\pardeftab720\sl300 -\cf0 \cb2 \ -\ -\pard\pardeftab720\sl300 - -\b \cf0 Launch Daemon Arguments -\b0 \ -\ -You can also specify these options in the LaunchD as command line arguments. Doing so will override any settings provided in the BackupMinder settings plist.\ -\ -\pard\pardeftab720\sl300\ql\qnatural -\cf0 \cb1 Switches\ - --MakeSettings BackupMinder will to create or validate a new settings file, or check an old one to verify it has everything it needs, and then exit.\cb2 \ -\pard\pardeftab720\sl300 -\cf0 \ -\ -\pard\pardeftab720\sl300\sa200 - -\f0\b\fs34 \cf0 Logs\ -\pard\pardeftab720\sl300 - -\f1\b0\fs24 \cf0 Backup Minder keeps logs of its activity next to the program itself, as /Library/Application Support/BackupMinder/BackupMinder_Log.plist \ -\ -The logs contain a list of previous activity for each specified file pattern (or, NameContains argument provided), including the application\'92s output, exit status, and the timestamp of the most recent backup matching the file pattern.\ -\ -\ -\ -Usage Examples\ -\ -Trimming stale Shadow hashes from a Netboot Server\ -\ - -\itap1\trowd \taflags1 \trgaph108\trleft-108 \trbrdrt\brdrnil \trbrdrl\brdrnil \trbrdrr\brdrnil -\clvertalc \clshdrawnil \clwWidth4460\clftsWidth3 \clbrdrt\brdrs\brdrw20\brdrcf4 \clbrdrl\brdrs\brdrw20\brdrcf4 \clbrdrb\brdrs\brdrw20\brdrcf4 \clbrdrr\brdrs\brdrw20\brdrcf4 \clpadl100 \clpadr100 \gaph\cellx4320 -\clvertalc \clshdrawnil \clwWidth13340\clftsWidth3 \clbrdrt\brdrs\brdrw20\brdrcf4 \clbrdrl\brdrs\brdrw20\brdrcf4 \clbrdrb\brdrs\brdrw20\brdrcf4 \clbrdrr\brdrs\brdrw20\brdrcf4 \clpadl100 \clpadr100 \gaph\cellx8640 -\pard\intbl\itap1\pardeftab720\sl300\ql\qnatural - -\b \cf0 \cb1 Key -\b0 \cell -\pard\intbl\itap1\pardeftab720\sl300\ql\qnatural - -\b \cf0 Value -\b0 \cell \row - -\itap1\trowd \taflags1 \trgaph108\trleft-108 \trbrdrl\brdrnil \trbrdrr\brdrnil -\clvertalc \clshdrawnil \clwWidth4460\clftsWidth3 \clbrdrt\brdrs\brdrw20\brdrcf4 \clbrdrl\brdrs\brdrw20\brdrcf4 \clbrdrb\brdrs\brdrw20\brdrcf4 \clbrdrr\brdrs\brdrw20\brdrcf4 \clpadl100 \clpadr100 \gaph\cellx4320 -\clvertalc \clshdrawnil \clwWidth13340\clftsWidth3 \clbrdrt\brdrs\brdrw20\brdrcf4 \clbrdrl\brdrs\brdrw20\brdrcf4 \clbrdrb\brdrs\brdrw20\brdrcf4 \clbrdrr\brdrs\brdrw20\brdrcf4 \clpadl100 \clpadr100 \gaph\cellx8640 -\pard\intbl\itap1\pardeftab720\ql\qnatural -\cf0 BackupSource\cell -\pard\intbl\itap1\pardeftab720\sl300\ql\qnatural -\cf0 /Library/NetBoot/NetBootClients0\cell \row - -\itap1\trowd \taflags1 \trgaph108\trleft-108 \trbrdrl\brdrnil \trbrdrr\brdrnil -\clvertalc \clshdrawnil \clwWidth4460\clftsWidth3 \clbrdrt\brdrs\brdrw20\brdrcf4 \clbrdrl\brdrs\brdrw20\brdrcf4 \clbrdrb\brdrs\brdrw20\brdrcf4 \clbrdrr\brdrs\brdrw20\brdrcf4 \clpadl100 \clpadr100 \gaph\cellx4320 -\clvertalc \clshdrawnil \clwWidth13340\clftsWidth3 \clbrdrt\brdrs\brdrw20\brdrcf4 \clbrdrl\brdrs\brdrw20\brdrcf4 \clbrdrb\brdrs\brdrw20\brdrcf4 \clbrdrr\brdrs\brdrw20\brdrcf4 \clpadl100 \clpadr100 \gaph\cellx8640 -\pard\intbl\itap1\pardeftab720\ql\qnatural -\cf0 ArchiveDestination\cell -\pard\intbl\itap1\pardeftab720\sl300\ql\qnatural -\cf0 /dev/null\cell \row - -\itap1\trowd \taflags1 \trgaph108\trleft-108 \trbrdrl\brdrnil \trbrdrr\brdrnil -\clvertalc \clshdrawnil \clwWidth4460\clftsWidth3 \clbrdrt\brdrs\brdrw20\brdrcf4 \clbrdrl\brdrs\brdrw20\brdrcf4 \clbrdrb\brdrs\brdrw20\brdrcf4 \clbrdrr\brdrs\brdrw20\brdrcf4 \clpadl100 \clpadr100 \gaph\cellx4320 -\clvertalc \clshdrawnil \clwWidth13340\clftsWidth3 \clbrdrt\brdrs\brdrw20\brdrcf4 \clbrdrl\brdrs\brdrw20\brdrcf4 \clbrdrb\brdrs\brdrw20\brdrcf4 \clbrdrr\brdrs\brdrw20\brdrcf4 \clpadl100 \clpadr100 \gaph\cellx8640 -\pard\intbl\itap1\pardeftab720\sl300\ql\qnatural -\cf0 NameContains\cell -\pard\intbl\itap1\pardeftab720\sl300\ql\qnatural -\cf0 NetBoot\cell \row - -\itap1\trowd \taflags1 \trgaph108\trleft-108 \trbrdrl\brdrnil \trbrdrt\brdrnil \trbrdrr\brdrnil -\clvertalc \clshdrawnil \clwWidth4460\clftsWidth3 \clbrdrt\brdrs\brdrw20\brdrcf4 \clbrdrl\brdrs\brdrw20\brdrcf4 \clbrdrb\brdrs\brdrw20\brdrcf4 \clbrdrr\brdrs\brdrw20\brdrcf4 \clpadl100 \clpadr100 \gaph\cellx4320 -\clvertalc \clshdrawnil \clwWidth13340\clftsWidth3 \clbrdrt\brdrs\brdrw20\brdrcf4 \clbrdrl\brdrs\brdrw20\brdrcf4 \clbrdrb\brdrs\brdrw20\brdrcf4 \clbrdrr\brdrs\brdrw20\brdrcf4 \clpadl100 \clpadr100 \gaph\cellx8640 -\pard\intbl\itap1\pardeftab720\sl300\ql\qnatural -\cf0 BackupsToKeep\cell -\pard\intbl\itap1\pardeftab720\sl300\ql\qnatural -\cf0 10\cell \lastrow\row -\pard\pardeftab720\sl300\ql\qnatural -\cf0 \ -\pard\pardeftab720\sl300 -\cf0 \cb2 \ -\ +View details at https://backupminder.org\ \ } \ No newline at end of file diff --git a/UI/BackupMinderHelper/BackupMinderHelper.xcodeproj/project.pbxproj b/UI/BackupMinderHelper/BackupMinderHelper.xcodeproj/project.pbxproj deleted file mode 100644 index cf72459..0000000 --- a/UI/BackupMinderHelper/BackupMinderHelper.xcodeproj/project.pbxproj +++ /dev/null @@ -1,208 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - A12D82F3160F349300F578B7 /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A12D82F2160F349300F578B7 /* main.cpp */; }; - A12D82F5160F349300F578B7 /* BackupMinderHelper.1 in CopyFiles */ = {isa = PBXBuildFile; fileRef = A12D82F4160F349300F578B7 /* BackupMinderHelper.1 */; }; -/* End PBXBuildFile section */ - -/* Begin PBXCopyFilesBuildPhase section */ - A12D82EC160F349300F578B7 /* CopyFiles */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = /usr/share/man/man1/; - dstSubfolderSpec = 0; - files = ( - A12D82F5160F349300F578B7 /* BackupMinderHelper.1 in CopyFiles */, - ); - runOnlyForDeploymentPostprocessing = 1; - }; -/* End PBXCopyFilesBuildPhase section */ - -/* Begin PBXFileReference section */ - A12D82EE160F349300F578B7 /* BackupMinderHelper */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = BackupMinderHelper; sourceTree = BUILT_PRODUCTS_DIR; }; - A12D82F2160F349300F578B7 /* main.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = main.cpp; sourceTree = ""; }; - A12D82F4160F349300F578B7 /* BackupMinderHelper.1 */ = {isa = PBXFileReference; lastKnownFileType = text.man; path = BackupMinderHelper.1; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - A12D82EB160F349300F578B7 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - A12D82E3160F349300F578B7 = { - isa = PBXGroup; - children = ( - A12D82F1160F349300F578B7 /* BackupMinderHelper */, - A12D82EF160F349300F578B7 /* Products */, - ); - sourceTree = ""; - }; - A12D82EF160F349300F578B7 /* Products */ = { - isa = PBXGroup; - children = ( - A12D82EE160F349300F578B7 /* BackupMinderHelper */, - ); - name = Products; - sourceTree = ""; - }; - A12D82F1160F349300F578B7 /* BackupMinderHelper */ = { - isa = PBXGroup; - children = ( - A12D82F2160F349300F578B7 /* main.cpp */, - A12D82F4160F349300F578B7 /* BackupMinderHelper.1 */, - ); - path = BackupMinderHelper; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - A12D82ED160F349300F578B7 /* BackupMinderHelper */ = { - isa = PBXNativeTarget; - buildConfigurationList = A12D82F8160F349300F578B7 /* Build configuration list for PBXNativeTarget "BackupMinderHelper" */; - buildPhases = ( - A12D82EA160F349300F578B7 /* Sources */, - A12D82EB160F349300F578B7 /* Frameworks */, - A12D82EC160F349300F578B7 /* CopyFiles */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = BackupMinderHelper; - productName = BackupMinderHelper; - productReference = A12D82EE160F349300F578B7 /* BackupMinderHelper */; - productType = "com.apple.product-type.tool"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - A12D82E5160F349300F578B7 /* Project object */ = { - isa = PBXProject; - attributes = { - LastUpgradeCheck = 0420; - }; - buildConfigurationList = A12D82E8160F349300F578B7 /* Build configuration list for PBXProject "BackupMinderHelper" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 0; - knownRegions = ( - en, - ); - mainGroup = A12D82E3160F349300F578B7; - productRefGroup = A12D82EF160F349300F578B7 /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - A12D82ED160F349300F578B7 /* BackupMinderHelper */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXSourcesBuildPhase section */ - A12D82EA160F349300F578B7 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - A12D82F3160F349300F578B7 /* main.cpp in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin XCBuildConfiguration section */ - A12D82F6160F349300F578B7 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; - COPY_PHASE_STRIP = NO; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_ENABLE_OBJC_EXCEPTIONS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.6; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = macosx; - }; - name = Debug; - }; - A12D82F7160F349300F578B7 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; - COPY_PHASE_STRIP = YES; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_ENABLE_OBJC_EXCEPTIONS = YES; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.6; - SDKROOT = macosx; - }; - name = Release; - }; - A12D82F9160F349300F578B7 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Debug; - }; - A12D82FA160F349300F578B7 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - A12D82E8160F349300F578B7 /* Build configuration list for PBXProject "BackupMinderHelper" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - A12D82F6160F349300F578B7 /* Debug */, - A12D82F7160F349300F578B7 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - A12D82F8160F349300F578B7 /* Build configuration list for PBXNativeTarget "BackupMinderHelper" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - A12D82F9160F349300F578B7 /* Debug */, - A12D82FA160F349300F578B7 /* Release */, - ); - defaultConfigurationIsVisible = 0; - }; -/* End XCConfigurationList section */ - }; - rootObject = A12D82E5160F349300F578B7 /* Project object */; -} diff --git a/UI/BackupMinderHelper/BackupMinderHelper/BackupMinderHelper.1 b/UI/BackupMinderHelper/BackupMinderHelper/BackupMinderHelper.1 deleted file mode 100644 index cb65b49..0000000 --- a/UI/BackupMinderHelper/BackupMinderHelper/BackupMinderHelper.1 +++ /dev/null @@ -1,79 +0,0 @@ -.\"Modified from man(1) of FreeBSD, the NetBSD mdoc.template, and mdoc.samples. -.\"See Also: -.\"man mdoc.samples for a complete listing of options -.\"man mdoc for the short list of editing options -.\"/usr/share/misc/mdoc.template -.Dd 9/23/12 \" DATE -.Dt BackupMinderHelper 1 \" Program name and manual section number -.Os Darwin -.Sh NAME \" Section Header - required - don't modify -.Nm BackupMinderHelper, -.\" The following lines are read in generating the apropos(man -k) database. Use only key -.\" words here as the database is built based on the words here and in the .ND line. -.Nm Other_name_for_same_program(), -.Nm Yet another name for the same program. -.\" Use .Nm macro to designate other names for the documented program. -.Nd This line parsed for whatis database. -.Sh SYNOPSIS \" Section Header - required - don't modify -.Nm -.Op Fl abcd \" [-abcd] -.Op Fl a Ar path \" [-a path] -.Op Ar file \" [file] -.Op Ar \" [file ...] -.Ar arg0 \" Underlined argument - use .Ar anywhere to underline -arg2 ... \" Arguments -.Sh DESCRIPTION \" Section Header - required - don't modify -Use the .Nm macro to refer to your program throughout the man page like such: -.Nm -Underlining is accomplished with the .Ar macro like this: -.Ar underlined text . -.Pp \" Inserts a space -A list of items with descriptions: -.Bl -tag -width -indent \" Begins a tagged list -.It item a \" Each item preceded by .It macro -Description of item a -.It item b -Description of item b -.El \" Ends the list -.Pp -A list of flags and their descriptions: -.Bl -tag -width -indent \" Differs from above in tag removed -.It Fl a \"-a flag as a list item -Description of -a flag -.It Fl b -Description of -b flag -.El \" Ends the list -.Pp -.\" .Sh ENVIRONMENT \" May not be needed -.\" .Bl -tag -width "ENV_VAR_1" -indent \" ENV_VAR_1 is width of the string ENV_VAR_1 -.\" .It Ev ENV_VAR_1 -.\" Description of ENV_VAR_1 -.\" .It Ev ENV_VAR_2 -.\" Description of ENV_VAR_2 -.\" .El -.Sh FILES \" File used or created by the topic of the man page -.Bl -tag -width "/Users/joeuser/Library/really_long_file_name" -compact -.It Pa /usr/share/file_name -FILE_1 description -.It Pa /Users/joeuser/Library/really_long_file_name -FILE_2 description -.El \" Ends the list -.\" .Sh DIAGNOSTICS \" May not be needed -.\" .Bl -diag -.\" .It Diagnostic Tag -.\" Diagnostic informtion here. -.\" .It Diagnostic Tag -.\" Diagnostic informtion here. -.\" .El -.Sh SEE ALSO -.\" List links in ascending order by section, alphabetically within a section. -.\" Please do not reference files that do not exist without filing a bug report -.Xr a 1 , -.Xr b 1 , -.Xr c 1 , -.Xr a 2 , -.Xr b 2 , -.Xr a 3 , -.Xr b 3 -.\" .Sh BUGS \" Document known, unremedied bugs -.\" .Sh HISTORY \" Document history if command behaves in a unique manner \ No newline at end of file diff --git a/UI/BackupMinderHelper/BackupMinderHelper/main.cpp b/UI/BackupMinderHelper/BackupMinderHelper/main.cpp deleted file mode 100644 index c57f424..0000000 --- a/UI/BackupMinderHelper/BackupMinderHelper/main.cpp +++ /dev/null @@ -1,60 +0,0 @@ -// -// main.cpp -// BackupMinderHelper -// -// Created by Christopher Thompson on 9/23/12. -// -// Simple little program the execute the launchctl command -// Usage: BackupMinderHelper [-l | -u] plist_file_path -// -// Use the -l and -u flags so that I don't allow any args to be run - -#include -#include -#include -#include - -int main(int argc, char** argv) -{ - // Make sure I have 3 and only 3 arguments - if (argc != 3) - { - printf( "Usage: BackupMinderHelper [-l | -u] plist_file_path\n"); - return -1; - } - - bool load = true; - //Check for load or unload - if (strcmp(argv[1], "-l") == 0) - { - load = true; - } - else if (strcmp(argv[1], "-u") == 0) - { - load = false; - } - else - { - printf ("Unknown option %s\n", argv[1]); - printf( "Usage: BackupMinderHelper [-l | -u] plist_file_path\n"); - return -1; - } - - if (0 != setuid(0)) - { - printf ("Failed to set UID to 0\n"); - return -3; - } - - char* launchCmd = "/bin/launchctl"; - char* loadOption = "load"; - char* unloadOption = "unload"; - - char** argvz = (char**)malloc(sizeof(char*) * argc); - argvz[0] = launchCmd; - argvz[1] = load ? loadOption : unloadOption; - argvz[2] = argv[2]; - - execv(argvz[0], argvz); - return 0; -} \ No newline at end of file diff --git a/UI/BackupMinderUI/BackupMinderUI.xcodeproj/project.pbxproj b/UI/BackupMinderUI/BackupMinderUI.xcodeproj/project.pbxproj deleted file mode 100644 index eccfb82..0000000 --- a/UI/BackupMinderUI/BackupMinderUI.xcodeproj/project.pbxproj +++ /dev/null @@ -1,365 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - A199A6E215CF021900A475FD /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A199A6E115CF021900A475FD /* Cocoa.framework */; }; - A199A6EC15CF021900A475FD /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = A199A6EA15CF021900A475FD /* InfoPlist.strings */; }; - A199A6F215CF021900A475FD /* Credits.rtf in Resources */ = {isa = PBXBuildFile; fileRef = A199A6F015CF021900A475FD /* Credits.rtf */; }; - A199A6FF15CF028600A475FD /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = A199A6FE15CF028600A475FD /* main.m */; }; - A199A70915CF029000A475FD /* AddPanelController.m in Sources */ = {isa = PBXBuildFile; fileRef = A199A70115CF029000A475FD /* AddPanelController.m */; }; - A199A70A15CF029000A475FD /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = A199A70315CF029000A475FD /* AppDelegate.m */; }; - A199A70B15CF029000A475FD /* BackupManager.m in Sources */ = {isa = PBXBuildFile; fileRef = A199A70515CF029000A475FD /* BackupManager.m */; }; - A199A70C15CF029000A475FD /* FileUtilities.m in Sources */ = {isa = PBXBuildFile; fileRef = A199A70815CF029000A475FD /* FileUtilities.m */; }; - A199A71315CF02BB00A475FD /* AddPanel.xib in Resources */ = {isa = PBXBuildFile; fileRef = A199A70F15CF02BB00A475FD /* AddPanel.xib */; }; - A199A71415CF02BB00A475FD /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = A199A71115CF02BB00A475FD /* MainMenu.xib */; }; - A199A71715CF02CD00A475FD /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A199A71515CF02CD00A475FD /* Security.framework */; }; - A199A71815CF02CD00A475FD /* SecurityInterface.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A199A71615CF02CD00A475FD /* SecurityInterface.framework */; }; - A1D4732615D31E0100B8B36C /* MainMenuController.m in Sources */ = {isa = PBXBuildFile; fileRef = A1D4732515D31E0100B8B36C /* MainMenuController.m */; }; - A1D82AAA15D0B43600F3E9BF /* BackupMinder.icns in Resources */ = {isa = PBXBuildFile; fileRef = A1D82AA915D0B43600F3E9BF /* BackupMinder.icns */; }; - ABF748DD18CE7E2600BDEBCC /* bm_logo.png in Resources */ = {isa = PBXBuildFile; fileRef = ABF748DC18CE7E2600BDEBCC /* bm_logo.png */; }; -/* End PBXBuildFile section */ - -/* Begin PBXFileReference section */ - A199A6DD15CF021900A475FD /* BackupMinderUI.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = BackupMinderUI.app; sourceTree = BUILT_PRODUCTS_DIR; }; - A199A6E115CF021900A475FD /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; }; - A199A6E415CF021900A475FD /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; }; - A199A6E515CF021900A475FD /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = System/Library/Frameworks/CoreData.framework; sourceTree = SDKROOT; }; - A199A6E615CF021900A475FD /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; - A199A6E915CF021900A475FD /* BackupMinderUI-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "BackupMinderUI-Info.plist"; sourceTree = ""; }; - A199A6EB15CF021900A475FD /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; - A199A6EF15CF021900A475FD /* BackupMinderUI-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "BackupMinderUI-Prefix.pch"; sourceTree = ""; }; - A199A6F115CF021900A475FD /* en */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; name = en; path = en.lproj/Credits.rtf; sourceTree = ""; }; - A199A6FE15CF028600A475FD /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = Classes/main.m; sourceTree = ""; }; - A199A70015CF029000A475FD /* AddPanelController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AddPanelController.h; path = Classes/AddPanelController.h; sourceTree = ""; }; - A199A70115CF029000A475FD /* AddPanelController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AddPanelController.m; path = Classes/AddPanelController.m; sourceTree = ""; }; - A199A70215CF029000A475FD /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = Classes/AppDelegate.h; sourceTree = ""; }; - A199A70315CF029000A475FD /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = Classes/AppDelegate.m; sourceTree = ""; }; - A199A70415CF029000A475FD /* BackupManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BackupManager.h; path = Classes/BackupManager.h; sourceTree = ""; }; - A199A70515CF029000A475FD /* BackupManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = BackupManager.m; path = Classes/BackupManager.m; sourceTree = ""; }; - A199A70615CF029000A475FD /* Definitions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Definitions.h; path = Classes/Definitions.h; sourceTree = ""; }; - A199A70715CF029000A475FD /* FileUtilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FileUtilities.h; path = Classes/FileUtilities.h; sourceTree = ""; }; - A199A70815CF029000A475FD /* FileUtilities.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = FileUtilities.m; path = Classes/FileUtilities.m; sourceTree = ""; }; - A199A71015CF02BB00A475FD /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/AddPanel.xib; sourceTree = ""; }; - A199A71215CF02BB00A475FD /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/MainMenu.xib; sourceTree = ""; }; - A199A71515CF02CD00A475FD /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = System/Library/Frameworks/Security.framework; sourceTree = SDKROOT; }; - A199A71615CF02CD00A475FD /* SecurityInterface.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SecurityInterface.framework; path = System/Library/Frameworks/SecurityInterface.framework; sourceTree = SDKROOT; }; - A1D4732415D31E0100B8B36C /* MainMenuController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MainMenuController.h; path = Classes/MainMenuController.h; sourceTree = ""; }; - A1D4732515D31E0100B8B36C /* MainMenuController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = MainMenuController.m; path = Classes/MainMenuController.m; sourceTree = ""; }; - A1D82AA915D0B43600F3E9BF /* BackupMinder.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = BackupMinder.icns; sourceTree = ""; }; - ABF748DC18CE7E2600BDEBCC /* bm_logo.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = bm_logo.png; path = ../../../../../../Desktop/bm_logo.png; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - A199A6DA15CF021900A475FD /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - A199A71715CF02CD00A475FD /* Security.framework in Frameworks */, - A199A71815CF02CD00A475FD /* SecurityInterface.framework in Frameworks */, - A199A6E215CF021900A475FD /* Cocoa.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - A199A6D215CF021900A475FD = { - isa = PBXGroup; - children = ( - A199A6E715CF021900A475FD /* BackupMinderUI */, - A199A70E15CF02AA00A475FD /* XIBs */, - A199A6E015CF021900A475FD /* Frameworks */, - A199A6DE15CF021900A475FD /* Products */, - ); - sourceTree = ""; - }; - A199A6DE15CF021900A475FD /* Products */ = { - isa = PBXGroup; - children = ( - A199A6DD15CF021900A475FD /* BackupMinderUI.app */, - ); - name = Products; - sourceTree = ""; - }; - A199A6E015CF021900A475FD /* Frameworks */ = { - isa = PBXGroup; - children = ( - A199A71515CF02CD00A475FD /* Security.framework */, - A199A71615CF02CD00A475FD /* SecurityInterface.framework */, - A199A6E115CF021900A475FD /* Cocoa.framework */, - A199A6E315CF021900A475FD /* Other Frameworks */, - ); - name = Frameworks; - sourceTree = ""; - }; - A199A6E315CF021900A475FD /* Other Frameworks */ = { - isa = PBXGroup; - children = ( - A199A6E415CF021900A475FD /* AppKit.framework */, - A199A6E515CF021900A475FD /* CoreData.framework */, - A199A6E615CF021900A475FD /* Foundation.framework */, - ); - name = "Other Frameworks"; - sourceTree = ""; - }; - A199A6E715CF021900A475FD /* BackupMinderUI */ = { - isa = PBXGroup; - children = ( - A199A70D15CF029500A475FD /* Classes */, - A199A6E815CF021900A475FD /* Supporting Files */, - ); - path = BackupMinderUI; - sourceTree = ""; - }; - A199A6E815CF021900A475FD /* Supporting Files */ = { - isa = PBXGroup; - children = ( - ABF748DC18CE7E2600BDEBCC /* bm_logo.png */, - A1D82AA915D0B43600F3E9BF /* BackupMinder.icns */, - A199A6E915CF021900A475FD /* BackupMinderUI-Info.plist */, - A199A6EA15CF021900A475FD /* InfoPlist.strings */, - A199A6EF15CF021900A475FD /* BackupMinderUI-Prefix.pch */, - A199A6F015CF021900A475FD /* Credits.rtf */, - A199A70615CF029000A475FD /* Definitions.h */, - A199A6FE15CF028600A475FD /* main.m */, - ); - name = "Supporting Files"; - sourceTree = ""; - }; - A199A70D15CF029500A475FD /* Classes */ = { - isa = PBXGroup; - children = ( - A199A70015CF029000A475FD /* AddPanelController.h */, - A199A70115CF029000A475FD /* AddPanelController.m */, - A199A70215CF029000A475FD /* AppDelegate.h */, - A199A70315CF029000A475FD /* AppDelegate.m */, - A199A70415CF029000A475FD /* BackupManager.h */, - A199A70515CF029000A475FD /* BackupManager.m */, - A199A70715CF029000A475FD /* FileUtilities.h */, - A199A70815CF029000A475FD /* FileUtilities.m */, - A1D4732415D31E0100B8B36C /* MainMenuController.h */, - A1D4732515D31E0100B8B36C /* MainMenuController.m */, - ); - name = Classes; - sourceTree = ""; - }; - A199A70E15CF02AA00A475FD /* XIBs */ = { - isa = PBXGroup; - children = ( - A199A70F15CF02BB00A475FD /* AddPanel.xib */, - A199A71115CF02BB00A475FD /* MainMenu.xib */, - ); - name = XIBs; - path = BackupMinderUI; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - A199A6DC15CF021900A475FD /* BackupMinderUI */ = { - isa = PBXNativeTarget; - buildConfigurationList = A199A6FB15CF021900A475FD /* Build configuration list for PBXNativeTarget "BackupMinderUI" */; - buildPhases = ( - A199A6D915CF021900A475FD /* Sources */, - A199A6DA15CF021900A475FD /* Frameworks */, - A199A6DB15CF021900A475FD /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = BackupMinderUI; - productName = BackupMinderUI; - productReference = A199A6DD15CF021900A475FD /* BackupMinderUI.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - A199A6D415CF021900A475FD /* Project object */ = { - isa = PBXProject; - attributes = { - LastUpgradeCheck = 0420; - }; - buildConfigurationList = A199A6D715CF021900A475FD /* Build configuration list for PBXProject "BackupMinderUI" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 0; - knownRegions = ( - en, - ); - mainGroup = A199A6D215CF021900A475FD; - productRefGroup = A199A6DE15CF021900A475FD /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - A199A6DC15CF021900A475FD /* BackupMinderUI */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - A199A6DB15CF021900A475FD /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - A199A6EC15CF021900A475FD /* InfoPlist.strings in Resources */, - A199A6F215CF021900A475FD /* Credits.rtf in Resources */, - A199A71315CF02BB00A475FD /* AddPanel.xib in Resources */, - ABF748DD18CE7E2600BDEBCC /* bm_logo.png in Resources */, - A199A71415CF02BB00A475FD /* MainMenu.xib in Resources */, - A1D82AAA15D0B43600F3E9BF /* BackupMinder.icns in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - A199A6D915CF021900A475FD /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - A199A6FF15CF028600A475FD /* main.m in Sources */, - A199A70915CF029000A475FD /* AddPanelController.m in Sources */, - A199A70A15CF029000A475FD /* AppDelegate.m in Sources */, - A199A70B15CF029000A475FD /* BackupManager.m in Sources */, - A199A70C15CF029000A475FD /* FileUtilities.m in Sources */, - A1D4732615D31E0100B8B36C /* MainMenuController.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXVariantGroup section */ - A199A6EA15CF021900A475FD /* InfoPlist.strings */ = { - isa = PBXVariantGroup; - children = ( - A199A6EB15CF021900A475FD /* en */, - ); - name = InfoPlist.strings; - sourceTree = ""; - }; - A199A6F015CF021900A475FD /* Credits.rtf */ = { - isa = PBXVariantGroup; - children = ( - A199A6F115CF021900A475FD /* en */, - ); - name = Credits.rtf; - sourceTree = ""; - }; - A199A70F15CF02BB00A475FD /* AddPanel.xib */ = { - isa = PBXVariantGroup; - children = ( - A199A71015CF02BB00A475FD /* en */, - ); - name = AddPanel.xib; - sourceTree = ""; - }; - A199A71115CF02BB00A475FD /* MainMenu.xib */ = { - isa = PBXVariantGroup; - children = ( - A199A71215CF02BB00A475FD /* en */, - ); - name = MainMenu.xib; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - A199A6F915CF021900A475FD /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; - COPY_PHASE_STRIP = NO; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_ENABLE_OBJC_EXCEPTIONS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.6; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = macosx; - }; - name = Debug; - }; - A199A6FA15CF021900A475FD /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; - COPY_PHASE_STRIP = YES; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_ENABLE_OBJC_EXCEPTIONS = YES; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.6; - SDKROOT = macosx; - }; - name = Release; - }; - A199A6FC15CF021900A475FD /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "BackupMinderUI/BackupMinderUI-Prefix.pch"; - INFOPLIST_FILE = "BackupMinderUI/BackupMinderUI-Info.plist"; - PRODUCT_NAME = "$(TARGET_NAME)"; - WRAPPER_EXTENSION = app; - }; - name = Debug; - }; - A199A6FD15CF021900A475FD /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "BackupMinderUI/BackupMinderUI-Prefix.pch"; - INFOPLIST_FILE = "BackupMinderUI/BackupMinderUI-Info.plist"; - PRODUCT_NAME = "$(TARGET_NAME)"; - WRAPPER_EXTENSION = app; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - A199A6D715CF021900A475FD /* Build configuration list for PBXProject "BackupMinderUI" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - A199A6F915CF021900A475FD /* Debug */, - A199A6FA15CF021900A475FD /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - A199A6FB15CF021900A475FD /* Build configuration list for PBXNativeTarget "BackupMinderUI" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - A199A6FC15CF021900A475FD /* Debug */, - A199A6FD15CF021900A475FD /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = A199A6D415CF021900A475FD /* Project object */; -} diff --git a/UI/BackupMinderUI/BackupMinderUI/BackupMinder.icns b/UI/BackupMinderUI/BackupMinderUI/BackupMinder.icns deleted file mode 100644 index 7419685..0000000 Binary files a/UI/BackupMinderUI/BackupMinderUI/BackupMinder.icns and /dev/null differ diff --git a/UI/BackupMinderUI/BackupMinderUI/BackupMinderUI-Info.plist b/UI/BackupMinderUI/BackupMinderUI/BackupMinderUI-Info.plist deleted file mode 100644 index 232a65a..0000000 --- a/UI/BackupMinderUI/BackupMinderUI/BackupMinderUI-Info.plist +++ /dev/null @@ -1,36 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIconFile - BackupMinder.icns - CFBundleIdentifier - Mac-Consulting-Group.${PRODUCT_NAME:rfc1034identifier} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - APPL - CFBundleShortVersionString - 1.0.0 - CFBundleSignature - ???? - CFBundleVersion - 1.0.0 - LSApplicationCategoryType - public.app-category.utilities - LSMinimumSystemVersion - ${MACOSX_DEPLOYMENT_TARGET} - NSHumanReadableCopyright - Copyright © 2012 Mac Consulting Group. All rights reserved. - NSMainNibFile - MainMenu - NSPrincipalClass - NSApplication - - diff --git a/UI/BackupMinderUI/BackupMinderUI/BackupMinderUI-Prefix.pch b/UI/BackupMinderUI/BackupMinderUI/BackupMinderUI-Prefix.pch deleted file mode 100644 index 3c943f7..0000000 --- a/UI/BackupMinderUI/BackupMinderUI/BackupMinderUI-Prefix.pch +++ /dev/null @@ -1,7 +0,0 @@ -// -// Prefix header for all source files of the 'BackupMinderUI' target in the 'BackupMinderUI' project -// - -#ifdef __OBJC__ - #import -#endif diff --git a/UI/BackupMinderUI/BackupMinderUI/Classes/AddPanelController.h b/UI/BackupMinderUI/BackupMinderUI/Classes/AddPanelController.h deleted file mode 100644 index 831cfba..0000000 --- a/UI/BackupMinderUI/BackupMinderUI/Classes/AddPanelController.h +++ /dev/null @@ -1,93 +0,0 @@ -// -// AddPanelController.h -// BackupMinderUI -// -// Created by Christopher Thompson on 8/1/12. -// - -// The AddPanelController is a dual purpose dialog -// 1) Add a new backup object -// 2) Edit an existing object -// -// The default implementation is to add an object -// Nothing special needs to be done to use the Add panel -// -// To create an Edit panel, use the initWithMode:EDIT_PANEL_MODE -// Before you show the panel, set the dictionary to edit by calling -// setBackupDictionary:(NSMutableDictionary*) - -#ifndef ADD_PANEL_CONTROLLER_H -#define ADD_PANEL_CONTROLLER_H - -#import - -enum panelMode_t -{ - ADD_PANEL_MODE, - EDIT_PANEL_MODE, - NUM_PANEL_MODES -}; - -@interface AddPanelController : NSWindowController -{ - // Controls whether we are an Add or Edit panel - enum panelMode_t m_panelMode; - - // Track so I can change to Edit if necessary - IBOutlet NSButton *m_addButton; - - // Track so I can change the icon to a folder - IBOutlet NSButton *m_backupSourceButton; - IBOutlet NSButton *m_archiveDestinationButton; - - // Text field controls - IBOutlet NSTextField *m_nameTextField; - IBOutlet NSTextField *m_backupSourceTextField; - IBOutlet NSTextField *m_archiveDestinationTextField; - IBOutlet NSTextField *m_nameContainsTextField; - IBOutlet NSTextField *m_backupsToLeaveTextField; - IBOutlet NSTextField *m_warnDaysTextField; - - // Name label control - IBOutlet NSTextField *m_nameLabel; - - // The error dialog - NSAlert *m_errorAlert; - - // Track the state of the editted backup - BOOL currentlyDisabled; -} - -// Brief: Initialize the window with a given Add/Edit mode -// Param: window_, the NSWindow object to use -// Param: mode_, the Add/Edit mode to show as -- (id)initWithMode:(enum panelMode_t)mode_; - -// Brief: Set the dictionary containing the Backup information -// Param: backupObject_, NSMutableDictionary backup object to use -- (void)setBackupDictionary:(NSMutableDictionary*)backupObject_; - -// Brief: Validate the values in the text field -- (BOOL)validateInput; - -// Brief: Validate the input and add an object then hide -// Add or edit a backup item depending on panelMode -// Param: sender_, Id of the sender object -- (IBAction)commit:(id)sender_; - -// Brief: Hide the window -// Param: sender_, Id of the sender object -- (IBAction)cancel:(id)sender_; - -// Brief: Display an NSOpenPanel window to select the backup source directory -// Param: sender_, Id of the sender object -- (IBAction)selectBackupSource:(id)sender_; - -// Brief: Display an NSOpenPanel window to select the archive destination -// directory -// Param: sender_, Id of the sender object -- (IBAction)selectArchiveDestination:(id)sender_; - -@end - -#endif //ADD_PANEL_CONTROLLER_H diff --git a/UI/BackupMinderUI/BackupMinderUI/Classes/AddPanelController.m b/UI/BackupMinderUI/BackupMinderUI/Classes/AddPanelController.m deleted file mode 100644 index b6692d4..0000000 --- a/UI/BackupMinderUI/BackupMinderUI/Classes/AddPanelController.m +++ /dev/null @@ -1,451 +0,0 @@ -// -// AddPanelController.m -// BackupMinderUI -// -// Created by Christopher Thompson on 8/1/12. -// - -#import "AddPanelController.h" -#import "Definitions.h" -#import "BackupManager.h" - -const int MAX_BACKUPS_TO_LEAVE = 99; -const int MAX_WARN_DAYS_VALUE = 99; - -@implementation AddPanelController - -- (id) init -{ - return [self initWithMode:ADD_PANEL_MODE]; -} - -- (id)initWithMode:(enum panelMode_t)mode_ -{ - if (! (self = [super initWithWindowNibName: @"AddPanel"])) - { -#ifdef DEBUG - NSLog (@"AddPanelController::initWithMode: Failed to init " - "AddPanel.xib"); -#endif // DEBUG - return nil; - } - - // Store the panelMode_t - m_panelMode = mode_; - - currentlyDisabled = NO; - - return self; -} - -- (void)windowDidLoad -{ - [super windowDidLoad]; - - // If I'm going to be an Edit panel, change the text of the Add/Edit button - if (m_panelMode == EDIT_PANEL_MODE) - { - [m_nameTextField setEditable:NO]; - [m_addButton setTitle:@"Save"]; - [[self window] setTitle:@"Edit Backup"]; - } - - [m_nameTextField setHidden:m_panelMode == EDIT_PANEL_MODE]; - [m_nameLabel setHidden:m_panelMode == ADD_PANEL_MODE]; - - [m_backupSourceTextField setEditable:NO]; - [m_archiveDestinationTextField setEditable:NO]; - - // Initialize the error alert - m_errorAlert = [[NSAlert alloc] init]; - NSString *iconPath = [[NSBundle bundleForClass:[self class]] - pathForResource:@"BackupMinder" ofType:@"icns"]; - NSImage *image = [[[NSImage alloc] initWithContentsOfFile:iconPath] - autorelease]; - [m_errorAlert setIcon:image]; - [m_errorAlert addButtonWithTitle:@"OK"]; - [m_errorAlert setAlertStyle:NSCriticalAlertStyle]; - NSArray *buttons = [m_errorAlert buttons]; - NSButton *okButton = [buttons objectAtIndex:0]; - [okButton setKeyEquivalent:@""]; - [okButton setKeyEquivalent:@"\r"]; - - // Update the button images to be a document - [m_backupSourceButton setImage: - [[NSWorkspace sharedWorkspace] iconForFileType: - NSFileTypeForHFSTypeCode (kOpenFolderIcon)]]; - [m_archiveDestinationButton setImage: - [[NSWorkspace sharedWorkspace] iconForFileType: - NSFileTypeForHFSTypeCode (kOpenFolderIcon)]]; - - // Call the cancel function to set the default values - [self cancel:nil]; -} - -- (void)dealloc -{ - [m_errorAlert release]; - - [super dealloc]; -} - -- (void)setBackupDictionary:(NSMutableDictionary*)backupObject_ -{ - if (backupObject_ == nil) - { -#ifdef DEBUG - NSLog (@"AddPanelController::setBackupDictionary: object is nil"); -#endif //DEBUG - return; - } - - [m_nameLabel setStringValue:[[backupObject_ objectForKey: kLabel] - substringFromIndex: - [kLaunchDaemonPrefix length]]]; - - // Save for when we write the new plist file - currentlyDisabled = [[backupObject_ objectForKey: kDisabled] boolValue]; - - NSArray *arguments = [backupObject_ objectForKey:kProgramArguments]; - - if (arguments == nil) - { -#ifdef DEBUG - NSLog (@"AppDelegate::windowDidBecomeMain: arguments is nil"); -#endif //DEBUG - return; - } - - // Iterate through the arguements - // When I match a key, the next argument should be the value - // But check out-of-bounds just in case - for (int i = 0; i < [arguments count]; ++i) - { - if ([[arguments objectAtIndex:i] isEqual:kBackupSource]) - { - if (i + 1 < [arguments count]) - { - NSString *folder = [arguments objectAtIndex: i + 1]; - // Only need the folder to display - [m_backupSourceTextField setStringValue: - [folder lastPathComponent]]; - - // Set the tooltip as the full path - [m_backupSourceTextField setToolTip:folder]; - } - } - else if ([[arguments objectAtIndex:i] isEqual:kArchiveDestination]) - { - if (i + 1 < [arguments count]) - { - NSString *folder = [arguments objectAtIndex: i + 1]; - // Only need the folder to display - [m_archiveDestinationTextField setStringValue: - [folder lastPathComponent]]; - - // Set the tooltip as the full path - [m_archiveDestinationTextField setToolTip:folder]; - } - } - else if ([[arguments objectAtIndex:i] isEqual:kNameContains]) - { - if (i + 1 < [arguments count]) - { - [m_nameContainsTextField setStringValue: - [arguments objectAtIndex: i + 1]]; - } - } - else if ([[arguments objectAtIndex:i] isEqual:kBackupsToLeave]) - { - if (i + 1 < [arguments count]) - { - [m_backupsToLeaveTextField setStringValue: - [arguments objectAtIndex: i + 1]]; - } - } - else if ([[arguments objectAtIndex:i] isEqual:kWarnDays]) - { - if (i + 1 < [arguments count]) - { - [m_warnDaysTextField setStringValue: - [arguments objectAtIndex: i + 1]]; - } - } - } -} - -- (BOOL)validateInput -{ - BOOL good = YES; - NSString *errors = [[NSString new] autorelease]; - - // If I'm adding, make sure I add a unique name - NSString *name = [m_nameTextField stringValue]; - if (m_panelMode == ADD_PANEL_MODE) - { - if ([BackupManager backupObjectForName:name] != nil) - { -#ifdef DEBUG - NSLog (@"AddPanelController::validateInput: %@ is not a unique " - "name", name); -#endif // DEBUG - errors = [NSString stringWithFormat:@"%@\n %@ is not a unique " - "name", errors, name]; - good = NO; - } - } - - // Ensure backupSource exists - NSString *path = [m_backupSourceTextField toolTip]; - if (! [[NSFileManager defaultManager] fileExistsAtPath:path]) - { -#ifdef DEBUG - NSLog (@"AddPanelController::validateInput: %@ does not exist, " - "cannot set to BackupSource", path); -#endif // DEBUG - errors = [NSString stringWithFormat:@"%@\n\n %@ does not exist, cannot " - "set to Backup Source", errors, path]; - good = NO; - } - - // Ensure archiveDestination exists - path = [m_archiveDestinationTextField toolTip]; - if (! [[NSFileManager defaultManager] fileExistsAtPath: path]) - { -#ifdef DEBUG - NSLog (@"AddPanelController::validateInput: %@ does not exist, " - "cannot set to ArchiveDestination", path); -#endif // DEBUG - errors = [NSString stringWithFormat:@"%@\n\n %@ does not exist, cannot " - "set to Archive Destination", errors, path]; - good = NO; - } - - // Ensure I can write to the destination directory - if (! [[NSFileManager defaultManager] isWritableFileAtPath:path]) - { -#ifdef DEBUG - NSLog (@"AddPanelController::validateInput: Cannot write to %@", path); -#endif // DEBUG - errors = [NSString stringWithFormat:@"%@\n\n Cannot write to %@, cannot " - "set to Archive Destination.", errors, path]; - good = NO; - } - - // Ensure number of backups is a valid int - int backups = [m_backupsToLeaveTextField intValue]; - if (backups <= 0 || backups > MAX_BACKUPS_TO_LEAVE) - { -#ifdef DEBUG - NSLog (@"AddPanelController::validateInput: Invalid number of backups " - "to leave: %d", backups); -#endif // DEBUG - errors = [NSString stringWithFormat:@"%@\n\n %d is an invalid number of " - "Backups to Leave. Must be between 1 and %d", - errors, backups, MAX_BACKUPS_TO_LEAVE]; - good = NO; - } - - // Ensure warn days is a valid int - int days = [m_warnDaysTextField intValue]; - if (days <= 0 || days > MAX_WARN_DAYS_VALUE) - { -#ifdef DEBUG - NSLog (@"AddPanelController::validateInput: Invalid number of warn " - "days: %d", days); -#endif // DEBUG - errors = [NSString stringWithFormat:@"%@\n\n %d is an invalid number of " - "Warning days. Must be between 1 and %d", - errors, days, MAX_WARN_DAYS_VALUE]; - good = NO; - } - - if (! good) - { - [m_errorAlert setMessageText:@"Invalid Inputs"]; - [m_errorAlert setInformativeText:[NSString stringWithFormat: - @"Failed to validate input with the following " - " errors:\n%@", errors]]; - - [m_errorAlert beginSheetModalForWindow:[self window] - modalDelegate:self - didEndSelector:nil - contextInfo:nil]; - return NO; - } - - return YES; -} - -#pragma mark - -#pragma mark Button methods - -- (IBAction)commit:(id)sender_ -{ - if (! [self validateInput]) - { -#ifdef DEBUG - NSLog (@"AddPanelController::commit: Failed to validate inputs"); -#endif // DEBUG - return; - } - - NSString *name; - if (m_panelMode == ADD_PANEL_MODE) - { - name = [m_nameTextField stringValue]; - } - else - { - name = [m_nameLabel stringValue]; - } - - // Create the arguments array first - NSArray *arguments = [NSArray arrayWithObjects: - kBackupMinderCommand, - kBackupSource, - [m_backupSourceTextField toolTip], - kArchiveDestination, - [m_archiveDestinationTextField toolTip], - kName, - name, - kNameContains, - [m_nameContainsTextField stringValue], - kBackupsToLeave, - [m_backupsToLeaveTextField stringValue], - kWarnDays, - [m_warnDaysTextField stringValue], nil]; - - // Create an array for the WatchPath - NSArray *watchPaths = [NSArray arrayWithObjects: - [m_backupSourceTextField toolTip], nil]; - - // Create the backupObject - NSString *label; - BOOL disabled; - - if (m_panelMode == ADD_PANEL_MODE) - { - label = [NSString stringWithFormat:@"%@%@", - kLaunchDaemonPrefix, [m_nameTextField stringValue]]; - disabled = NO; - } - else - { - label = [NSString stringWithFormat:@"%@%@", - kLaunchDaemonPrefix, [m_nameLabel stringValue]]; - disabled = currentlyDisabled; - } - - NSMutableDictionary *backupObject = - [NSMutableDictionary dictionaryWithObjectsAndKeys: - label, kLabel, - [NSNumber numberWithBool:disabled], kDisabled, - arguments, kProgramArguments, - watchPaths, kWatchPath, - nil]; - - if (! backupObject) - { -#ifdef DEBUG - NSLog (@"AddPanelController::commit: Failed to create backupObject"); -#endif // DEBUG - return; - } - - BOOL good = YES; - if (m_panelMode == ADD_PANEL_MODE) - { - good = [BackupManager addBackupObject:backupObject loadDaemon:YES]; - } - else if (m_panelMode == EDIT_PANEL_MODE) - { - good = [BackupManager editBackupObject:backupObject]; - } - - if (! good) - { - [m_errorAlert setMessageText:@"Error"]; - [m_errorAlert setInformativeText:[BackupManager lastError]]; - - [m_errorAlert beginSheetModalForWindow:[self window] - modalDelegate:self - didEndSelector:nil - contextInfo:nil]; - return; - } - - [[self window] orderOut:nil]; - [NSApp endSheet:[self window]]; -} - -- (IBAction)cancel:(id)sender_ -{ - // Clear the textFields - [m_nameTextField setStringValue:@""]; - [m_backupSourceTextField setStringValue:@""]; - [m_archiveDestinationTextField setStringValue:@""]; - [m_nameContainsTextField setStringValue:@""]; - [m_backupsToLeaveTextField setStringValue:kBackupsToLeaveDefault]; - [m_warnDaysTextField setStringValue:kWarnDaysDefault]; - - [[self window] orderOut:nil]; - [NSApp endSheet:[self window]]; -} - -- (IBAction)selectBackupSource:(id)sender_ -{ - NSOpenPanel *openPanel = [NSOpenPanel openPanel]; - [openPanel setCanChooseFiles:NO]; - [openPanel setCanChooseDirectories:YES]; - [openPanel setAllowsMultipleSelection:NO]; - // The tooltip contains the full path, use it as the source - [openPanel setDirectory: [m_backupSourceTextField toolTip]]; - - // Get the return value - NSInteger returnValue = [openPanel runModal]; - if(returnValue == NSOKButton) - { - // Make sure the user selected something - NSArray *urls = [openPanel URLs]; - if ([urls count] > 0) - { - NSString *folder = [[urls objectAtIndex:0] path]; - // Only need the folder to display - [m_backupSourceTextField setStringValue:[folder lastPathComponent]]; - - // Set the tooltip as the full path - [m_backupSourceTextField setToolTip:folder]; - } - } -} - -- (IBAction)selectArchiveDestination:(id)sender_ -{ - NSOpenPanel *openPanel = [NSOpenPanel openPanel]; - [openPanel setCanChooseFiles:NO]; - [openPanel setCanChooseDirectories:YES]; - [openPanel setAllowsMultipleSelection:NO]; - // The tooltip contains the full path, use it as the source - [openPanel setDirectory: [m_archiveDestinationTextField toolTip]]; - - // Get the return value - NSInteger returnValue = [openPanel runModal]; - if(returnValue == NSOKButton) - { - // Make sure the user selected something - NSArray *urls = [openPanel URLs]; - if ([urls count] > 0) - { - NSString *folder = [[urls objectAtIndex:0] path]; - // Only need the folder to display - [m_archiveDestinationTextField setStringValue: - [folder lastPathComponent]]; - - // Set the tooltip as the full path - [m_archiveDestinationTextField setToolTip:folder]; - } - } -} - -@end diff --git a/UI/BackupMinderUI/BackupMinderUI/Classes/AppDelegate.h b/UI/BackupMinderUI/BackupMinderUI/Classes/AppDelegate.h deleted file mode 100644 index 07383ad..0000000 --- a/UI/BackupMinderUI/BackupMinderUI/Classes/AppDelegate.h +++ /dev/null @@ -1,29 +0,0 @@ -// -// AppDelegate.h -// BackupMinderUI -// -// Created by Christopher Thompson on 7/31/12. -// - -#ifndef APP_DELEGATE_H -#define APP_DELEGATE_H - -#import -#import -#import "MainMenuController.h" - -@interface AppDelegate : NSObject -{ - // To run privileged commands - IBOutlet SFAuthorizationView *m_authView; - - // To connect to the main menu - IBOutlet MainMenuController *m_mainMenuController; - - // To set the version number - IBOutlet NSTextField *m_versionTextField; -}; - -@end - -#endif //APP_DELEGATE_H \ No newline at end of file diff --git a/UI/BackupMinderUI/BackupMinderUI/Classes/AppDelegate.m b/UI/BackupMinderUI/BackupMinderUI/Classes/AppDelegate.m deleted file mode 100644 index 52d5148..0000000 --- a/UI/BackupMinderUI/BackupMinderUI/Classes/AppDelegate.m +++ /dev/null @@ -1,75 +0,0 @@ -// -// AppDelegate.m -// BackupMinderUI -// -// Created by Christopher Thompson on 7/31/12. -// - -#import "AppDelegate.h" -#import "BackupManager.h" -#import "FileUtilities.h" - -@implementation AppDelegate - -- (void)applicationDidFinishLaunching:(NSNotification *)aNotification -{ - // Query to initialize - [BackupManager backups]; - - // Setup security. - AuthorizationItem items = {kAuthorizationRightExecute, 0, NULL, 0}; - AuthorizationRights rights = {1, &items}; - [m_authView setAuthorizationRights:&rights]; - [m_authView setDelegate:self]; - [m_authView updateStatus:nil]; - - // Set the version number - NSDictionary* infoDict = [[NSBundle mainBundle] infoDictionary]; - if (infoDict == nil) - return; - - NSString *clientVersionString = [NSString stringWithFormat:@"Version %@", - [infoDict objectForKey:@"CFBundleVersion"]]; - [m_versionTextField setStringValue:clientVersionString]; -} - -- (BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication *)sender_ -{ - // We want to close the program when the user exits the main window - return YES; -} - -- (void)applicationWillTerminate:(NSNotification *)aNotification_ -{ - OSStatus err = AuthorizationFree ( - [[m_authView authorization] authorizationRef], - kAuthorizationFlagDestroyRights); - - if (err != errAuthorizationSuccess) - { -#ifdef DEBUG - NSLog(@"AppDelegate::applicationWillTerminate: Failed to free " - "authorization: %d", err); -#endif //DEBUG - } -} - -#pragma mark - -#pragma mark SFAuthorizationView Methods - -- (void)authorizationViewDidAuthorize:(SFAuthorizationView *)view -{ - [m_mainMenuController setAuthorized:YES]; - - [FileUtilities setAuthorizationRef: - [[m_authView authorization] authorizationRef]]; -} - -- (void)authorizationViewDidDeauthorize:(SFAuthorizationView *)view -{ - [m_mainMenuController setAuthorized:NO]; - - [FileUtilities setAuthorizationRef:nil]; -} - -@end diff --git a/UI/BackupMinderUI/BackupMinderUI/Classes/BackupManager.h b/UI/BackupMinderUI/BackupMinderUI/Classes/BackupManager.h deleted file mode 100644 index 1557b3d..0000000 --- a/UI/BackupMinderUI/BackupMinderUI/Classes/BackupManager.h +++ /dev/null @@ -1,55 +0,0 @@ -// -// BackupManager.h -// BackupMinderUI -// -// Created by Christopher Thompson on 7/31/12. -// - -#ifndef BACKUP_MANAGER_H -#define BACKUP_MANAGER_H - -#import - -@interface BackupManager : NSObject - -// Brief: Read backups from disk and store locally -+ (void)initializeBackups; - -// Brief: Return the list of backups -+ (NSMutableArray*)backups; - -// Brief: Return the index of a backup object -// Param: backupObject_, NSMutableDictionary object to find in the list -+ (NSUInteger)indexOfBackupObject:(NSMutableDictionary*)backupObject_; - -// Brief: Return the backup object at the given index -// Param: index_, NSUInteger index in the list of the desired object -+ (NSMutableDictionary*)backupObjectAtIndex:(NSUInteger)index_; - -// Brief: Return the backup object that has the given name -// Param: name_, The name of the backup object to return -+ (NSMutableDictionary*)backupObjectForName:(NSString*)name_; - -// Brief: Add a backup object to the list -// Param: backupObject_, NSMutableDictionary object to add -// Param: load_, BOOL to load the daemon during creation -+ (BOOL)addBackupObject:(NSMutableDictionary*)object_ loadDaemon:(BOOL)load_; - -// Brief: Edit a backup object in the list -// Param: backupObject_, NSMutableDictionary object to edit -+ (BOOL)editBackupObject:(NSMutableDictionary*)object_; - -// Brief: Remove a backup object from the list -// Param: backupObject_, NSMutableDictionary object to remove -+ (BOOL)removeBackupObject:(NSMutableDictionary*)object_; - -// Brief: Construct the plist name for the given backup object -// Param: backupObject_, NSMutableDictionary object to remove -+ (NSString*)plistNameForBackupObject:(NSMutableDictionary*)object_; - -// Brief: Return the last error if there is one -+ (NSString*)lastError; - -@end - -#endif //BACKUP_MANAGER_H diff --git a/UI/BackupMinderUI/BackupMinderUI/Classes/BackupManager.m b/UI/BackupMinderUI/BackupMinderUI/Classes/BackupManager.m deleted file mode 100644 index 306029f..0000000 --- a/UI/BackupMinderUI/BackupMinderUI/Classes/BackupManager.m +++ /dev/null @@ -1,375 +0,0 @@ -// -// BackupManager.m -// BackupMinderUI -// -// Created by Christopher Thompson on 7/31/12. -// - -#import "BackupManager.h" -#import "Definitions.h" -#import "FileUtilities.h" - -@implementation BackupManager - -static NSMutableArray *m_backups; -static NSString *m_error; - -+ (void)initializeBackups -{ - // Reset error string - m_error = @""; - - // Delete the old list and create a new one - if (m_backups) - { - [m_backups release]; - } - m_backups = [NSMutableArray new]; - - // Enumerate files in the Launch Daemons Directory - NSDirectoryEnumerator* enumerator = - [[NSFileManager defaultManager] enumeratorAtPath: - kLaunchDaemonsDirectory]; - - if (enumerator == nil) - { -#ifdef DEBUG - NSLog (@"BackupManager::initializeBackups: Could not create enumerator" - " for %@", kLaunchDaemonsDirectory); -#endif //DEBUG - - return; - } - - NSString* file; - - // Iterate through all of the plists in the directory - while (file = [enumerator nextObject]) - { - // Check to make sure it's a plist file, - // this will also reject Directories - if (! [[file pathExtension] isEqualToString:kPlistSuffix]) - { -#ifdef DEBUG - NSLog (@"BackupManager::initializeBackups: %@ is not a plist," - " skipping", file); -#endif //DEBUG - - continue; - } - - // Test to see that I start with the prefix - if (! [[file commonPrefixWithString:kLaunchDaemonPrefix options: - NSCaseInsensitiveSearch] isEqualToString:kLaunchDaemonPrefix]) - { -#ifdef DEBUG - NSLog (@"BackupManager::initializeBackups: %@ does not start with" - " prefix, skipping", file); -#endif //DEBUG - - continue; - } - - NSMutableDictionary *backupDict = - [NSMutableDictionary dictionaryWithContentsOfFile: - [NSString stringWithFormat:@"%@/%@", - kLaunchDaemonsDirectory, file]]; - - if (backupDict == nil) - { -#ifdef DEBUG - NSLog (@"BackupManager::initializeBackups: %@ does not contain a" - " valid dictionary skipping", file); -#endif //DEBUG - - continue; - } - - // Check to make sure it has all of the necessary keys to be a valid - // backup file - NSArray *keys = [[NSArray alloc] initWithObjects:kDisabled, kLabel, - kProgramArguments, nil]; - - BOOL notFound = NO; - for (NSString *key in keys) - { - if ([backupDict objectForKey:key] == nil) - { -#ifdef DEBUG - NSLog (@"BackupManager::initializeBackups: %@ does not contain " - "the key %@ in its dictionary, skipping", file, key); -#endif //DEBUG - - notFound = YES; - break; - } - } - - [keys release]; - - // If something was not found, skip - if (notFound) - { - continue; - } - - // Check to make sure it has all of the necessary arguments for a valid - // backup - NSArray *arguments = [backupDict objectForKey:kProgramArguments]; - - NSArray *args = [[NSArray alloc] initWithObjects:kBackupSource, - kArchiveDestination, kNameContains, kBackupsToLeave, - kWarnDays, nil]; - - for (NSString *arg in args) - { - // If indexOfObject returns NSNotFound, then the string isn't in - // the array - if ([arguments indexOfObject:arg] == NSNotFound) - { -#ifdef DEBUG - NSLog (@"BackupManager::initializeBackups: %@ does not contain " - "the key %@ in its dictionary, skipping", file, arg); -#endif //DEBUG - - notFound = YES; - break; - } - } - - [args release]; - - if (notFound) - { - continue; - } - -#ifdef DEBUG - NSLog (@"BackupManager::initializeBackups: Adding %@", file); -#endif //DEBUG - - [[BackupManager backups] addObject: backupDict]; - } -} - -+ (NSMutableArray*)backups -{ - if (m_error == nil) - { - m_error = [NSString new]; - } - - if (m_backups == nil) - { - [BackupManager initializeBackups]; - } - - return m_backups; -} - -+ (NSUInteger)indexOfBackupObject:(NSMutableDictionary*)backupObject_ -{ - // Reset error string - m_error = @""; - - NSString *name = [[backupObject_ objectForKey: kLabel] - substringFromIndex: - [kLaunchDaemonPrefix length]]; - - return [m_backups indexOfObject: - [BackupManager backupObjectForName:name]]; -} - -+ (NSMutableDictionary*)backupObjectAtIndex:(NSUInteger)index_ -{ - // Reset error string - m_error = @""; - - if (index_ >= [[BackupManager backups] count]) - { -#ifdef DEBUG - NSLog (@"BackupManager::backupObjectAtIndex: Index %lu is greater than " - "backups count %lu", index_, [[BackupManager backups] count]); -#endif //DEBUG - m_error = [NSString stringWithFormat:@"Index %lu is greater than " - "backups count %lu", index_, - [[BackupManager backups] count]]; - - return nil; - } - - return [[BackupManager backups] objectAtIndex:index_]; -} - -+ (NSMutableDictionary*)backupObjectForName:(NSString*)name_ -{ - // Reset error string - m_error = @""; - - if ([name_ isEqualToString:@""]) - { -#ifdef DEBUG - NSLog (@"BackupManager::backupObjectForName: Cannot search for a " - "backup object with a blank name"); -#endif //DEBUG - m_error = [NSString stringWithFormat:@"Cannot search for a backup " - "object with a blank name"]; - - return nil; - } - - NSEnumerator *iter = [[BackupManager backups] objectEnumerator]; - NSMutableDictionary *object; - while (object = [iter nextObject]) - { - if ([name_ isEqualToString:[[object objectForKey: kLabel] - substringFromIndex: - [kLaunchDaemonPrefix length]]]) - { - return object; - } - } - - return nil; -} - -+ (BOOL)addBackupObject:(NSMutableDictionary*)object_ loadDaemon:(BOOL)load_ -{ - // Reset error string - m_error = @""; - - // Create the full plist name - NSString *plistName = [BackupManager plistNameForBackupObject: object_]; - - if (plistName == nil) - { -#ifdef DEBUG - NSLog (@"BackupManager::addBackupObject: Could not get a plist name " - "for the backup object"); -#endif //DEBUG - m_error = [NSString stringWithFormat:@"Could not get a plist name for " - "the backup object"]; - - return NO; - } - - if (! [FileUtilities addLaunchDaemonFile:plistName withObject:object_]) - { - // Error logging will be handled in addLaunchDaemonFile - m_error = [FileUtilities lastError]; - - return NO; - } - - if (load_) - { - if (! [FileUtilities loadLaunchDaemon:plistName]) - { - // Error logging will be handled in loadLaunchDaemon - m_error = [FileUtilities lastError]; - - return NO; - } - } - - [[BackupManager backups] addObject:object_]; - - return YES; -} - -+ (BOOL)editBackupObject:(NSMutableDictionary*)object_ -{ - // Reset error string - m_error = @""; - - // Create a copy of the backup since the current one will be whacked during - // the removeBackupObject call - NSMutableDictionary *copyObject = - [NSMutableDictionary dictionaryWithDictionary:object_]; - - // Try and remove the object first - if (! [BackupManager removeBackupObject:object_]) - { - // Error logging will be handled in removeBackupObject - m_error = [BackupManager lastError]; - - return NO; - } - - // We only want to load the daemon if the backup is not disabled - return [BackupManager addBackupObject:copyObject loadDaemon: - ! [[copyObject objectForKey:kDisabled] boolValue]]; -} - -+ (BOOL)removeBackupObject:(NSMutableDictionary*)object_ -{ - // Reset error string - m_error = @""; - - if (object_ == nil) - { -#ifdef DEBUG - NSLog (@"BackupManager::removeBackupObject: Cannot remove a nil object" - ); -#endif //DEBUG - - return NO; - } - - // Save the index for later - NSUInteger index = [BackupManager indexOfBackupObject:object_]; - - // If it's not there to begin with, should be an error - if (index == NSNotFound) - { -#ifdef DEBUG - NSLog (@"BackupManager::removeBackupObject: Cannot remove an object" - " that does not exist in the list"); -#endif //DEBUG - m_error = @"Cannot remove an object that does not exist in the list"; - - return NO; - } - - // Create the full plist name - NSString *plistName = [BackupManager plistNameForBackupObject: object_]; - - // First, unload the launch daemon - if (! [FileUtilities unloadLaunchDaemon:plistName]) - { - // Error logging will be handled in unloadLaunchDaemon - m_error = [FileUtilities lastError]; - - return NO; - } - - // Second, try and remove from disk - if (! [FileUtilities removeLaunchDaemonFile:plistName]) - { - // Error logging will be handled in removeLaunchDaemonFile - m_error = [FileUtilities lastError]; - - return NO; - } - - // Last, remove from the list - [[BackupManager backups] removeObjectAtIndex:index]; - - return YES; -} - -+ (NSString*)plistNameForBackupObject:(NSMutableDictionary*)object_ -{ - // Reset error string - m_error = @""; - - return [NSString stringWithFormat:@"%@.%@", - [object_ objectForKey:kLabel], kPlistSuffix]; -} - -+ (NSString*)lastError -{ - return m_error; -} - -@end diff --git a/UI/BackupMinderUI/BackupMinderUI/Classes/Definitions.h b/UI/BackupMinderUI/BackupMinderUI/Classes/Definitions.h deleted file mode 100644 index 8de766b..0000000 --- a/UI/BackupMinderUI/BackupMinderUI/Classes/Definitions.h +++ /dev/null @@ -1,49 +0,0 @@ -// -// Definitions.h -// BackupMinderUI -// -// Created by Christopher Thompson on 7/31/12. -// - -#ifndef DEFINTIONS_H -#define DEFINTIONS_H - -// File defintions -#define kLaunchDaemonsDirectory @"/Library/LaunchDaemons" -#define kLaunchDaemonPrefix @"org.backupminder." -#define kPlistSuffix @"plist" - -// Backup Dictionary keys -#define kDisabled @"Disabled" -#define kLabel @"Label" -#define kProgramArguments @"ProgramArguments" -#define kBackupSource @"--BackupSource" -#define kArchiveDestination @"--ArchiveDestination" -#define kNameContains @"--NameContains" -#define kName @"--Name" -#define kBackupsToLeave @"--BackupsToLeave" -#define kWarnDays @"--WarnDays" -#define kWatchPath @"WatchPaths" -#define kBackupMinderCommand @"/Library/Application Support/BackupMinder/BackupMinder" - -// Table column header names -#define kColumnEnabled @"Enabled" -#define kColumnBackup @"BackupMinder Set" - -// BackupMinder log -#define kBackupMinderLog @"/Library/Application Support/BackupMinder/BackupMinder_Log.plist" -#define kBackupMinderLogNameKey @"Name" -#define kExitStatus @"ExitStatus" - -// Commands -#define kLaunchHelper @"/Library/Application Support/BackupMinder/BackupMinderHelper" -#define kLoad @"-l" -#define kUnload @"-u" -#define kRmCommand @"/bin/rm" -#define kCopyCommand @"/bin/cp" - -// Backup Defaults -#define kBackupsToLeaveDefault @"90" -#define kWarnDaysDefault @"7" - -#endif //DEFINTIONS_H \ No newline at end of file diff --git a/UI/BackupMinderUI/BackupMinderUI/Classes/FileUtilities.h b/UI/BackupMinderUI/BackupMinderUI/Classes/FileUtilities.h deleted file mode 100644 index c6d5633..0000000 --- a/UI/BackupMinderUI/BackupMinderUI/Classes/FileUtilities.h +++ /dev/null @@ -1,49 +0,0 @@ -// -// FileUtilities.h -// BackupMinderUI -// -// Created by Christopher Thompson on 7/31/12. -// - -#ifndef FILE_UTILITIES_H -#define FILE_UTILITIES_H - -#import - -@interface FileUtilities : NSObject - -// Brief: Call the command line launchctl to unload the daemon -// Param: daemon_, NSString name of the daemon -+ (BOOL)unloadLaunchDaemon:(NSString*)daemon_; - -// Brief: Update the BackupMinder log to note the disabled daemon -// Param: daemon_, NSString name of the daemon -+ (BOOL)logUnloadLaunchDaemon:(NSString*)daemon_; - -// Brief: Call the command line launchctl to load the daemon -// Param: daemon_, NSString name of the daemon -+ (BOOL)loadLaunchDaemon:(NSString*)daemon_; - -// Brief: Delete the file from disk -// Param: daemon_, NSString name of the plist to remove -+ (BOOL)removeLaunchDaemonFile:(NSString*)daemon_; - -// Brief: Create a new file on disk -// Param: daemon_, NSString name of the plist to create -// Param: dict_, NSMutableDictionary contents of the new daemon -+ (BOOL)addLaunchDaemonFile:(NSString*)daemon_ - withObject:(NSMutableDictionary*)dict_; - -// Brief: Set the authorization -// Param: authorizationRef_, Authorization priviliges to execute commands -+ (void)setAuthorizationRef:(AuthorizationRef)authorizatioRef_; - -// Brief: Return the last error if there is one -+ (NSString*)lastError; - -// Brief: Return an informative text for a given OSStatus value -+ (NSString*)errorTextForOSStatus: (OSStatus)status_; - -@end - -#endif //FILE_UTILITIES_H diff --git a/UI/BackupMinderUI/BackupMinderUI/Classes/FileUtilities.m b/UI/BackupMinderUI/BackupMinderUI/Classes/FileUtilities.m deleted file mode 100644 index 954cc87..0000000 --- a/UI/BackupMinderUI/BackupMinderUI/Classes/FileUtilities.m +++ /dev/null @@ -1,494 +0,0 @@ -// -// FileUtilities.m -// BackupMinderUI -// -// Created by Christopher Thompson on 7/31/12. -// - -#import "FileUtilities.h" -#import "Definitions.h" - -@implementation FileUtilities - -static AuthorizationRef m_authorizationRef; -static NSString *m_error; - -+ (BOOL)unloadLaunchDaemon:(NSString*)daemon_ -{ - // Initialize error string if not already - if (m_error == nil) - { - m_error = [NSString new]; - } - - // Reset error string - m_error = @""; - - // Build file path - NSString *filePath = [NSString stringWithFormat:@"%@/%@", - kLaunchDaemonsDirectory, daemon_]; - - NSArray *arguments = [NSArray arrayWithObjects:kUnload, - filePath, nil]; - - const char **argv = - (const char **)malloc(sizeof(char *) * [arguments count] + 1); - int argvIndex = 0; - for (NSString *string in arguments) - { - argv[argvIndex] = [string UTF8String]; - argvIndex++; - } - - argv[argvIndex] = nil; - - OSStatus err = AuthorizationExecuteWithPrivileges(m_authorizationRef, - [kLaunchHelper UTF8String], - kAuthorizationFlagDefaults, - (char *const *)argv, - nil); - free(argv); - - if (err != errAuthorizationSuccess && - err != errAuthorizationToolEnvironmentError) - { - NSString *errorText = [FileUtilities errorTextForOSStatus:err]; - -#ifdef DEBUG - NSLog (@"FileUtilities::unloadLaunchDaemon: Failed to unload launch " - "daemon: (%d) %@", err, errorText); -#endif //DEBUG - m_error = [NSString stringWithFormat: - @"\nFailed to unload launch daemon:\n%d: %@", - err, errorText]; - - return NO; - } - - -#ifdef DEBUG - NSLog (@"FileUtilities::unloadLaunchDaemon: Successfully unloaded launch " - "daemon"); -#endif //DEBUG - - return [FileUtilities logUnloadLaunchDaemon:daemon_]; -} - -// Brief: Update the BackupMinder log to note the disabled daemon -// Param: daemon_, NSString name of the daemon -+ (BOOL)logUnloadLaunchDaemon:(NSString*)daemon_ -{ - // Initialize error string if not already - if (m_error == nil) - { - m_error = [NSString new]; - } - - // Reset error string - m_error = @""; - - // Get the log file from disk - NSMutableDictionary *logDict = - [NSMutableDictionary dictionaryWithContentsOfFile:kBackupMinderLog]; - - if (logDict == nil) - { -#ifdef DEBUG - NSLog (@"FileUtilities::logUnloadLaunchDaemon: Cannot load log file %@", - kBackupMinderLog); -#endif //DEBUG - m_error = [NSString stringWithFormat: - @"\nFailed to load log file %@", kBackupMinderLog]; - - return NO; - } - - // Get the name from the daemon_ - NSArray *daemonName = [daemon_ componentsSeparatedByString:@"."]; - - // Make sure there are atleast 3 components - if ([daemonName count] < 3) - { -#ifdef DEBUG - NSLog (@"FileUtilities::logUnloadLaunchDaemon: Failed to parse the " - "daemon name"); -#endif //DEBUG - m_error = [NSString stringWithFormat: - @"\nFailed to parse the daemon name"]; - - return NO; - } - - // The actual name will be the 3rd component - NSString *nameContains = [daemonName objectAtIndex:2]; - - // Retrieve the array containing all the log information - NSMutableArray *array = [logDict objectForKey:nameContains]; - - // Make sure we didn't get a nil array - if (array == nil) - { - // Create a new one if we did - array = [[NSMutableArray new] autorelease]; - } - - // Create a new dictionary entry for the disabled daemon - NSMutableDictionary *disabledLogDict = - [NSMutableDictionary dictionaryWithObjectsAndKeys: - [NSNumber numberWithInt:25], kExitStatus, - nil]; - - if (disabledLogDict == nil) - { -#ifdef DEBUG - NSLog (@"FileUtilities::logUnloadLaunchDaemon: Failed to create a new " - " entry in the log file for the disabled daemon %@", daemon_); -#endif //DEBUG - m_error = [NSString stringWithFormat: - @"\nFailed to create a new entry in the log file for the " - "disabled daemon %@", daemon_]; - - return NO; - } - - // Add the new object to the list - [array addObject:disabledLogDict]; - - // Add the array back to the log dictionary - [logDict setValue:array forKey:nameContains]; - - // Now write the file back to disk - NSString *tmpName = [NSString stringWithFormat:@"/tmp/%@", daemon_]; - if (![logDict writeToFile:tmpName atomically:YES]) - { -#ifdef DEBUG - NSLog (@"FileUtilites::logUnloadLaunchDaemon: Failed to write tmp file"); -#endif //DEBUG - - m_error = @"Failed to write tmp file"; - - return NO; - } - - NSArray *arguments = [NSArray arrayWithObjects:tmpName, kBackupMinderLog, - nil]; - const char **argv = - (const char **)malloc(sizeof(char *) * [arguments count] + 1); - int argvIndex = 0; - for (NSString *string in arguments) - { - argv[argvIndex] = [string UTF8String]; - argvIndex++; - } - - argv[argvIndex] = nil; - - OSStatus err = AuthorizationExecuteWithPrivileges(m_authorizationRef, - [kCopyCommand UTF8String], - kAuthorizationFlagDefaults, - (char *const *)argv, - nil); - free(argv); - - if (err != errAuthorizationSuccess && - err != errAuthorizationToolEnvironmentError) - { - NSString *errorText = [FileUtilities errorTextForOSStatus:err]; - -#ifdef DEBUG - NSLog(@"FileUtilites::logUnloadLaunchDaemon: Error adding log to disk: " - "(%d) %@", err, errorText); -#endif //DEBUG - m_error = [NSString stringWithFormat: - @"\nFailed to update log file:\n%d: %@", - err, errorText]; - - return NO; - } - -#ifdef DEBUG - NSLog (@"FileUtilities::logUnloadLaunchDaemon: Successfully updated log " - "file"); -#endif //DEBUG - - return YES; -} - -+ (BOOL)loadLaunchDaemon:(NSString*)daemon_ -{ - // Initialize error string if not already - if (m_error == nil) - { - m_error = [NSString new]; - } - - // Reset error string - m_error = @""; - - // Build file path - NSString *filePath = [NSString stringWithFormat:@"%@/%@", - kLaunchDaemonsDirectory, daemon_]; - - NSArray *arguments = [NSArray arrayWithObjects:kLoad, - filePath, nil]; - - const char **argv = - (const char **)malloc(sizeof(char *) * [arguments count] + 1); - int argvIndex = 0; - for (NSString *string in arguments) - { - argv[argvIndex] = [string UTF8String]; - argvIndex++; - } - - argv[argvIndex] = nil; - - OSStatus err = AuthorizationExecuteWithPrivileges(m_authorizationRef, - [kLaunchHelper UTF8String], - kAuthorizationFlagDefaults, - (char *const *)argv, - nil); - free(argv); - - if (err != errAuthorizationSuccess && - err != errAuthorizationToolEnvironmentError) - { - NSString *errorText = [FileUtilities errorTextForOSStatus:err]; - -#ifdef DEBUG - NSLog (@"FileUtilities::loadLaunchDaemon: Failed to load launch " - "daemon: (%d) %@", err, errorText); -#endif //DEBUG - m_error = [NSString stringWithFormat: - @"\nFailed to load launch daemon:\n%d: %@", - err, errorText]; - - return NO; - } - -#ifdef DEBUG - NSLog (@"FileUtilities::loadLaunchDaemon: Successfully loaded launch " - "daemon"); -#endif //DEBUG - - return YES; -} - -+ (BOOL)removeLaunchDaemonFile:(NSString*)daemon_ -{ - // Initialize error string if not already - if (m_error == nil) - { - m_error = [NSString new]; - } - - // Reset error string - m_error = @""; - - // Build file path - NSString *filePath = [NSString stringWithFormat:@"%@/%@", - kLaunchDaemonsDirectory, daemon_]; - - NSArray *arguments = [NSArray arrayWithObjects:@"-f", filePath, nil]; - const char **argv = - (const char **)malloc(sizeof(char *) * [arguments count] + 1); - int argvIndex = 0; - for (NSString *string in arguments) - { - argv[argvIndex] = [string UTF8String]; - argvIndex++; - } - - argv[argvIndex] = nil; - - OSStatus err = AuthorizationExecuteWithPrivileges(m_authorizationRef, - [kRmCommand UTF8String], - kAuthorizationFlagDefaults, - (char *const *)argv, - nil); - free(argv); - - if (err != errAuthorizationSuccess && - err != errAuthorizationToolEnvironmentError) - { - NSString *errorText = [FileUtilities errorTextForOSStatus:err]; - -#ifdef DEBUG - NSLog(@"FileUtilites::removeLaunchDaemonFile: Failed to remove daemon " - "from disk (%d) %@", err, errorText); -#endif //DEBUG - m_error = [NSString stringWithFormat: - @"\nFailed to remove daemon from disk:\n%d: %@", - err, errorText]; - - return NO; - } - -#ifdef DEBUG - NSLog (@"FileUtilities::removeLaunchDaemonFile: Successfully removed launch " - "daemon"); -#endif //DEBUG - - return YES; -} - -+ (BOOL)addLaunchDaemonFile:(NSString*)daemon_ - withObject:(NSMutableDictionary*)dict_ -{ - // Initialize error string if not already - if (m_error == nil) - { - m_error = [NSString new]; - } - - // Reset error string - m_error = @""; - - NSString *tmpName = [NSString stringWithFormat:@"/tmp/%@", daemon_]; - if (![dict_ writeToFile:tmpName atomically:YES]) - { -#ifdef DEBUG - NSLog (@"FileUtilites::addLaunchDaemonFile: Failed to write tmp file"); -#endif //DEBUG - m_error = @"Failed to write tmp file"; - return NO; - } - - // Build file path - NSString *filePath = [NSString stringWithFormat:@"%@/%@", - kLaunchDaemonsDirectory, daemon_]; - - NSArray *arguments = [NSArray arrayWithObjects:tmpName, filePath, nil]; - const char **argv = - (const char **)malloc(sizeof(char *) * [arguments count] + 1); - int argvIndex = 0; - for (NSString *string in arguments) - { - argv[argvIndex] = [string UTF8String]; - argvIndex++; - } - - argv[argvIndex] = nil; - - OSStatus err = AuthorizationExecuteWithPrivileges(m_authorizationRef, - [kCopyCommand UTF8String], - kAuthorizationFlagDefaults, - (char *const *)argv, - nil); - free(argv); - - if (err != errAuthorizationSuccess && - err != errAuthorizationToolEnvironmentError) - { - NSString *errorText = [FileUtilities errorTextForOSStatus:err]; - -#ifdef DEBUG - NSLog(@"FileUtilites::addLaunchDaemonFile: Error adding file to disk: " - "(%d) %@", err, errorText); -#endif //DEBUG - m_error = [NSString stringWithFormat: - @"\nFailed to add daemon to disk:\n%d: %@", - err, errorText]; - - return NO; - } - -#ifdef DEBUG - NSLog (@"FileUtilities::addLaunchDaemonFile: Successfully added launch " - "daemon"); -#endif //DEBUG - - return YES; -} - -+ (void)setAuthorizationRef:(AuthorizationRef)authorizatioRef_ -{ - // Initialize error string if not already - if (m_error == nil) - { - m_error = [NSString new]; - } - - // Reset error string - m_error = @""; - - m_authorizationRef = authorizatioRef_; -} - -+ (NSString*)lastError -{ - return m_error; -} - -+ (NSString*)errorTextForOSStatus: (OSStatus)status_ -{ - switch (status_) - { - case errAuthorizationSuccess: - return @"The operation completed successfully."; - break; - - case errAuthorizationInvalidSet: - return @"The set parameter is invalid."; - break; - - case errAuthorizationInvalidRef: - return @"The authorization parameter is invalid."; - break; - - case errAuthorizationInvalidTag: - return @"The tag parameter is invalid."; - break; - - case errAuthorizationInvalidPointer: - return @"The authorizedRights parameter is invalid."; - break; - - case errAuthorizationDenied: - return @"The Security Server denied authorization for one or more " - "requested rights. This error is also returned if there was no " - "definition found in the policy database, or a definition " - "could not be created."; - break; - - case errAuthorizationCanceled: - return @"The user canceled the operation."; - break; - - case errAuthorizationInteractionNotAllowed: - return @"The Security Server denied authorization because no user " - "interaction is allowed."; - break; - - case errAuthorizationInternal: - return @"An unrecognized internal error occurred."; - break; - - case errAuthorizationExternalizeNotAllowed: - return @"The Security Server denied externalization of the " - "authorization reference."; - break; - - case errAuthorizationInternalizeNotAllowed: - return @"The Security Server denied internalization of the " - "authorization reference."; - break; - - case errAuthorizationInvalidFlags: - return @"The flags parameter is invalid."; - break; - - case errAuthorizationToolExecuteFailure: - return @"The tool failed to execute."; - break; - - case errAuthorizationToolEnvironmentError: - return @"The attempt to execute the tool failed to return a " - "success or an error code."; - break; - } - - return @""; -} - -@end diff --git a/UI/BackupMinderUI/BackupMinderUI/Classes/MainMenuController.h b/UI/BackupMinderUI/BackupMinderUI/Classes/MainMenuController.h deleted file mode 100644 index 75e62f7..0000000 --- a/UI/BackupMinderUI/BackupMinderUI/Classes/MainMenuController.h +++ /dev/null @@ -1,67 +0,0 @@ -// -// MainMenuController.h -// BackupMinderUI -// -// Created by Christopher Thompson on 8/8/12. -// - -#ifndef MAIN_MENU_CONTROLLER_H -#define MAIN_MENU_CONTROLLER_H - -#import -#import "AddPanelController.h" - -@interface MainMenuController : NSWindowController -{ - // Table control - IBOutlet NSTableView *m_backupsTableView; - - // Button controls - IBOutlet NSButton *m_addButton; - IBOutlet NSButton *m_removeButton; - IBOutlet NSButton *m_editButton; - IBOutlet NSButton *m_refreshButton; - - // Text field controls - IBOutlet NSTextField *m_nameTextField; - IBOutlet NSTextField *m_backupSourceTextField; - IBOutlet NSTextField *m_archiveDestinationTextField; - IBOutlet NSTextField *m_nameContainsTextField; - IBOutlet NSTextField *m_backupsToLeaveTextField; - IBOutlet NSTextField *m_warnDaysTextField; - - // The Add/Edit panels - AddPanelController *m_addPanel; - AddPanelController *m_editPanel; - - // The error dialog - NSAlert *m_errorAlert; - - // The "Are you sure?" alert - NSAlert *m_removeAlert; -} - -// Brief: Enable/disable components of the app based on the authorized status -// Param: authorized_, BOOL of whether or not the app is authorized -- (void)setAuthorized:(BOOL)authorized_; - -// Brief: Add a new backup object -// Param: sender_, Id of the sender object -- (IBAction)addBackupObject:(id)sender_; - -// Brief: Remove a backup object -// Param: sender_, Id of the sender object -- (IBAction)removeBackupObject:(id)sender_; - -// Brief: Edit a backup object -// Param: sender_, Id of the sender object -- (IBAction)editBackupObject:(id)sender_; - -// Brief: Refresh the list of backup objects -// Param: sender_, Id of the sender object -- (IBAction)refresh:(id)sender_; - -@end - -#endif //MAIN_MENU_CONTROLLER_H diff --git a/UI/BackupMinderUI/BackupMinderUI/Classes/MainMenuController.m b/UI/BackupMinderUI/BackupMinderUI/Classes/MainMenuController.m deleted file mode 100644 index edaf5c8..0000000 --- a/UI/BackupMinderUI/BackupMinderUI/Classes/MainMenuController.m +++ /dev/null @@ -1,394 +0,0 @@ -// -// MainMenuController.m -// BackupMinderUI -// -// Created by Christopher Thompson on 8/8/12. -// - -#import "MainMenuController.h" -#import "Definitions.h" -#import "BackupManager.h" -#import "FileUtilities.h" - -@implementation MainMenuController - -- (id)initWithWindow:(NSWindow *)window -{ - self = [super initWithWindow:window]; - - if (self) - { - // Initialize the Add/Edit pansl - m_addPanel = [[AddPanelController alloc] init]; - m_editPanel = [[AddPanelController alloc] initWithMode:EDIT_PANEL_MODE]; - - // Initialize the error alert - m_errorAlert = [[NSAlert alloc] init]; - NSString *iconPath = [[NSBundle bundleForClass:[self class]] - pathForResource:@"BackupMinder" ofType:@"icns"]; - NSImage *image = [[[NSImage alloc] initWithContentsOfFile:iconPath] - autorelease]; - [m_errorAlert setIcon:image]; - [m_errorAlert addButtonWithTitle:@"OK"]; - [m_errorAlert setMessageText:@"Error"]; - [m_errorAlert setAlertStyle:NSCriticalAlertStyle]; - NSArray *buttons = [m_errorAlert buttons]; - NSButton *okButton = [buttons objectAtIndex:0]; - [okButton setKeyEquivalent:@""]; - [okButton setKeyEquivalent:@"\r"]; - - // Initialize the "Are you sure?" alert - m_removeAlert = [[NSAlert alloc] init]; - // Icon is the same - [m_removeAlert setIcon:[[[NSImage alloc] - initWithContentsOfFile:iconPath] autorelease]]; - [m_removeAlert addButtonWithTitle:@"Yes"]; - [m_removeAlert addButtonWithTitle:@"Cancel"]; - [m_removeAlert setMessageText:@"Are you sure?"]; - [m_removeAlert setAlertStyle:NSCriticalAlertStyle]; - [m_removeAlert setInformativeText:@"This will remove the BackupMinder " - "Set configuration, no data files will be removed. " - "Confirm Deletion?"]; - buttons = [m_removeAlert buttons]; - NSButton *uninstallButton = [buttons objectAtIndex:0]; - NSButton *cancelButton = [buttons objectAtIndex:1]; - [uninstallButton setKeyEquivalent:@""]; - [cancelButton setKeyEquivalent:@"\r"]; - - [m_addButton setToolTip:@"Create a New BackupMinder Set"]; - [m_removeButton setToolTip:@"Remove the Selected BackupMinder Set"]; - [m_editButton setToolTip:@"Edit the Selected BackupMinder Set"]; - } - - return self; -} - -- (void)dealloc -{ - [m_addPanel release]; - [m_editPanel release]; - [m_errorAlert release]; - [m_removeAlert release]; - - [super dealloc]; -} - -- (void)setAuthorized:(BOOL)authorized_ -{ - [m_addButton setEnabled:authorized_]; - [m_refreshButton setEnabled:authorized_]; - [m_backupsTableView setEnabled:authorized_]; - - //Unselect the row to disable remove/edit buttons - [m_backupsTableView deselectAll:nil]; -} - -#pragma mark - -#pragma mark Button methods - -- (IBAction)addBackupObject:(id)sender_ -{ - [NSApp beginSheet:[m_addPanel window] - modalForWindow:[self window] - modalDelegate:self - didEndSelector:@selector(sheetDidEnd:returnCode:contextInfo:) - contextInfo:NULL]; - - [m_backupsTableView reloadData]; -} - -- (IBAction)removeBackupObject:(id)sender_ -{ - [m_removeAlert beginSheetModalForWindow:[self window] modalDelegate:self - didEndSelector:@selector(alertDidEnd:returnCode:contextInfo:) - contextInfo:nil]; -} - -- (IBAction)editBackupObject:(id)sender_ -{ - NSMutableDictionary *backupObject = [BackupManager backupObjectAtIndex: - [m_backupsTableView selectedRow]]; - - if (backupObject == nil) - return; - - [NSApp beginSheet:[m_editPanel window] - modalForWindow:[self window] - modalDelegate:self - didEndSelector:@selector(sheetDidEnd:returnCode:contextInfo:) - contextInfo:NULL]; - - //Set the backup dictionary information - [m_editPanel setBackupDictionary:backupObject]; -} - -- (IBAction)refresh:(id)sender_ -{ - [BackupManager initializeBackups]; - [m_backupsTableView reloadData]; -} - -#pragma mark - -#pragma mark Table Data Source Methods - -- (NSInteger)numberOfRowsInTableView:(NSTableView *)tableView_; -{ - return [[BackupManager backups] count]; -} - -- (id)tableView:(NSTableView *)tableView_ objectValueForTableColumn: -(NSTableColumn *)tableColumn_ row:(NSInteger)row_; -{ - if (tableColumn_ == nil) - { - return nil; - } - - NSMutableDictionary *backup = [[BackupManager backups] objectAtIndex:row_]; - if (backup == nil) - { - return nil; - } - - if ([[[tableColumn_ headerCell] stringValue] compare:kColumnEnabled] == - NSOrderedSame) - { - return [NSNumber numberWithBool: - ! [[backup objectForKey:kDisabled] boolValue]]; - } - else - { - return [[backup objectForKey: kLabel] substringFromIndex: - [kLaunchDaemonPrefix length]]; - } -} - -- (void)tableView:(NSTableView *)tableView_ setObjectValue:(id)object_ - forTableColumn:(NSTableColumn *)tableColumn_ row:(NSInteger)row_ -{ - if (tableColumn_ == nil) - { - return; - } - - if ([[[tableColumn_ headerCell] stringValue] compare:kColumnEnabled] == - NSOrderedSame) - { - //Get Dictionary - NSMutableDictionary *backup = - [[BackupManager backups] objectAtIndex:row_]; - - if (backup == nil) - { -#ifdef DEBUG - NSLog (@"AppDelegate::setObjectValue: backup object is nil"); -#endif //DEBUG - [m_errorAlert setInformativeText:@"Cannot modify the backup."]; - [m_errorAlert runModal]; - - return; - } - - [backup setObject:[NSNumber numberWithBool:! [object_ boolValue]] - forKey:kDisabled]; - - if (! [BackupManager editBackupObject:backup]) - { - [m_errorAlert setMessageText:@"Error"]; - [m_errorAlert setInformativeText:[BackupManager lastError]]; - [m_errorAlert runModal]; - } - - [m_backupsTableView reloadData]; - } -} - -#pragma mark - -#pragma mark Table Delegate Methods - -- (void)tableViewSelectionDidChange:(NSNotification *)notification_; -{ - NSInteger index = [m_backupsTableView selectedRow]; - - // If nothing is selected, disable the Edit and Remove buttons, - // clear the text fields, and bail - if (index < 0) - { - [m_removeButton setEnabled:NO]; - [m_editButton setEnabled:NO]; - - [m_nameTextField setStringValue:@""]; - [m_backupSourceTextField setStringValue:@""]; - [m_archiveDestinationTextField setStringValue:@""]; - [m_nameContainsTextField setStringValue:@""]; - [m_backupsToLeaveTextField setStringValue:@""]; - [m_warnDaysTextField setStringValue:@""]; - return; - } - - // Otherwise, enable the Edit and Remove buttons - [m_removeButton setEnabled:YES]; - [m_editButton setEnabled:YES]; - - // Get the associated backup object - NSMutableDictionary *backupObject = - [BackupManager backupObjectAtIndex:index]; - - if (backupObject == nil) - { -#ifdef DEBUG - NSLog (@"AppDelegate::tableViewSelectionDidChange: object is nil"); -#endif //DEBUG - [m_errorAlert setInformativeText:@"There does not appear to be a backup" - " associated with your selection"]; - [m_errorAlert runModal]; - return; - } - - [m_nameTextField setStringValue:[[backupObject objectForKey: kLabel] - substringFromIndex: - [kLaunchDaemonPrefix length]]]; - - NSArray *arguments = [backupObject objectForKey:kProgramArguments]; - - if (arguments == nil) - { -#ifdef DEBUG - NSLog (@"AppDelegate::tableViewSelectionDidChange: arguments is nil"); -#endif //DEBUG - [m_errorAlert setInformativeText:@"The backup object does not appear to" - " contain the proper arguments"]; - [m_errorAlert runModal]; - return; - } - - // Iterate through the arguements - // When I match a key, the next argument should be the value - // But check out-of-bounds just in case - for (int i = 0; i < [arguments count]; ++i) - { - if ([[arguments objectAtIndex:i] isEqual:kBackupSource]) - { - if (i + 1 < [arguments count]) - { - NSString *folder = [arguments objectAtIndex: i + 1]; - // Only need the folder to display - [m_backupSourceTextField setStringValue: - [folder lastPathComponent]]; - - // Set the tooltip as the full path - [m_backupSourceTextField setToolTip:folder]; - } - } - else if ([[arguments objectAtIndex:i] isEqual:kArchiveDestination]) - { - if (i + 1 < [arguments count]) - { - NSString *folder = [arguments objectAtIndex: i + 1]; - // Only need the folder to display - [m_archiveDestinationTextField setStringValue: - [folder lastPathComponent]]; - - // Set the tooltip as the full path - [m_archiveDestinationTextField setToolTip:folder]; - } - } - else if ([[arguments objectAtIndex:i] isEqual:kNameContains]) - { - if (i + 1 < [arguments count]) - { - [m_nameContainsTextField setStringValue: - [arguments objectAtIndex: i + 1]]; - } - } - else if ([[arguments objectAtIndex:i] isEqual:kBackupsToLeave]) - { - if (i + 1 < [arguments count]) - { - [m_backupsToLeaveTextField setStringValue: - [arguments objectAtIndex: i + 1]]; - } - } - else if ([[arguments objectAtIndex:i] isEqual:kWarnDays]) - { - if (i + 1 < [arguments count]) - { - [m_warnDaysTextField setStringValue: - [arguments objectAtIndex: i + 1]]; - } - } - } -} - -- (NSCell *)tableView:(NSTableView *)tableView_ - dataCellForTableColumn:(NSTableColumn *)tableColumn_ row:(NSInteger)row_ -{ - if (tableColumn_ == nil) - { - return nil; - } - - if ([[[tableColumn_ headerCell] stringValue] compare:kColumnEnabled] == - NSOrderedSame) - { - NSButtonCell *cell = [[NSButtonCell new] autorelease]; - [cell setTitle:@""]; - [cell setButtonType:NSSwitchButton]; - [cell setImagePosition:NSImageOverlaps]; - [cell setImageScaling:NSImageScaleProportionallyDown]; - [cell setTarget:self]; - return cell; - } - - return [[NSTextFieldCell new] autorelease]; -} - -#pragma mark - -#pragma mark NSAlert Delegate Methods - -- (void)alertDidEnd:(NSAlert *)alert returnCode:(NSInteger)returnCode - contextInfo:(void *)contextInfo; -{ - // The "Are you sure?" alert - if (alert == m_removeAlert && returnCode == NSAlertFirstButtonReturn) - { - NSMutableDictionary *backupObject = [BackupManager backupObjectAtIndex: - [m_backupsTableView selectedRow]]; - - if (backupObject == nil) - { -#ifdef DEBUG - NSLog (@"AppDelegate::removeBackupObject: Cannot remove nil object"); -#endif //DEBUG - return; - } - - if (! [BackupManager removeBackupObject:backupObject]) - { -#ifdef DEBUG - NSLog (@"AppDelegate::removeBackupObject: Error deleting object"); -#endif //DEBUG - [m_errorAlert setInformativeText:[BackupManager lastError]]; - [m_errorAlert runModal]; - return; - } - - [m_backupsTableView reloadData]; - } -} - -#pragma mark - -#pragma mark Sheet Delegate Methods - -- (void)sheetDidEnd:(NSWindow *)sheet_ returnCode:(NSInteger)returnCode_ - contextInfo:(void *)contextInfo_ -{ - [m_backupsTableView reloadData]; - - // Unselect the row so that the user must click - // on a row again to update the information - // Otherwise the information displayed might be stale - [m_backupsTableView deselectAll:nil]; -} - -@end diff --git a/UI/BackupMinderUI/BackupMinderUI/Classes/main.m b/UI/BackupMinderUI/BackupMinderUI/Classes/main.m deleted file mode 100644 index 0b3db06..0000000 --- a/UI/BackupMinderUI/BackupMinderUI/Classes/main.m +++ /dev/null @@ -1,13 +0,0 @@ -// -// main.m -// BackupMinderUI -// -// Created by Christopher Thompson on 6/14/12. -// - -#import - -int main(int argc, char *argv[]) -{ - return NSApplicationMain(argc, (const char **)argv); -} diff --git a/UI/BackupMinderUI/BackupMinderUI/bm_logo.png b/UI/BackupMinderUI/BackupMinderUI/bm_logo.png deleted file mode 100644 index 7d9e8ae..0000000 Binary files a/UI/BackupMinderUI/BackupMinderUI/bm_logo.png and /dev/null differ diff --git a/UI/BackupMinderUI/BackupMinderUI/en.lproj/AddPanel.xib b/UI/BackupMinderUI/BackupMinderUI/en.lproj/AddPanel.xib deleted file mode 100644 index c872b63..0000000 --- a/UI/BackupMinderUI/BackupMinderUI/en.lproj/AddPanel.xib +++ /dev/null @@ -1,1224 +0,0 @@ - - - - 1060 - 10K549 - 1938 - 1038.36 - 461.00 - - com.apple.InterfaceBuilder.CocoaPlugin - 1938 - - - YES - NSTextField - NSView - NSWindowTemplate - NSCustomObject - NSTextFieldCell - NSButtonCell - NSButton - NSBox - - - YES - com.apple.InterfaceBuilder.CocoaPlugin - - - PluginDependencyRecalculationVersion - - - - YES - - AddPanelController - - - FirstResponder - - - NSApplication - - - 9 - 2 - {{422, 263}, {643, 433}} - 611845120 - Add Backup - NSWindow - - - - 256 - - YES - - - 12 - - YES - - - 274 - - YES - - - 268 - {{272, 346}, {275, 22}} - - - - YES - - -1804468671 - 272630784 - - - LucidaGrande - 13 - 1044 - - - YES - - 6 - System - textBackgroundColor - - 3 - MQA - - - - 6 - System - textColor - - 3 - MAA - - - - - - - 268 - {{272, 294}, {275, 22}} - - - - YES - - -1805517247 - 272632320 - - - - YES - - - - - - - 268 - {{272, 239}, {275, 22}} - - - - YES - - -2076049856 - 272632320 - - - - YES - - - - - - - 268 - {{272, 183}, {275, 22}} - - - - YES - - -1804468671 - 272630784 - - - - YES - - - - - - - 268 - {{272, 129}, {50, 22}} - - - - YES - - -1804468671 - 272630784 - - - - YES - - - - - - - 268 - {{15, 349}, {252, 17}} - - - - YES - - 68288064 - 71304192 - BackupMinder Set Name: - - - - 6 - System - controlColor - - 3 - MC42NjY2NjY2NjY3AA - - - - 6 - System - controlTextColor - - - - - - - 268 - {{15, 239}, {252, 17}} - - - - YES - - 68288064 - 71304192 - Folder to Store Archives: - - - - - - - - - 268 - {{15, 186}, {252, 17}} - - - - YES - - 68288064 - 71304192 - Name of Backup File to Archive: - - - - - - - - - 268 - {{15, 132}, {252, 17}} - - - - YES - - 68288064 - 71304192 - # of Backups to Leave in Source: - - - - - - - - - 268 - {{10, 77}, {257, 17}} - - - - YES - - 68288064 - 71304192 - Allowable Days Without Backup Activity: - - - - - - - - - 268 - {{272, 74}, {50, 22}} - - - - YES - - -1804468671 - 272630784 - - - - YES - - - - - - - 268 - {{15, 294}, {252, 17}} - - - - YES - - 68288064 - 71304192 - Folder to Monitor: - - - - - - - - - 268 - {{395, 6}, {100, 32}} - - - - YES - - 67239424 - 134217728 - Add - - - -2038284033 - 129 - - - 200 - 25 - - - - - 268 - {{495, 6}, {100, 32}} - - - - YES - - 67239424 - 134217728 - Cancel - - - -2038284033 - 129 - - Gw - 200 - 25 - - - - - 268 - {{555, 241}, {34, 19}} - - - - YES - - 67239424 - 134217728 - + - - LucidaGrande-Bold - 12 - 16 - - - -2042871553 - 109 - - NSImage - NSFolderSmart - - - - 200 - 25 - - - - - 268 - {{555, 293}, {34, 19}} - - - - YES - - 67239424 - 67108864 - + - - - -2042871553 - 173 - - - - 200 - 25 - - - - - 268 - {{15, 35}, {252, 34}} - - - - YES - - 67239424 - 1077940224 - Set to 0 to disable warnings in Watchman Monitoring - - - - - - - - - 268 - {{269, 349}, {281, 17}} - - - YES - - 68288064 - 272630784 - Label - - - - - - - - {{1, 1}, {607, 381}} - - - - - - {{17, 16}, {609, 397}} - - - - {0, 0} - - 67239424 - 0 - BackupMinder Set Settings - - LucidaGrande - 11 - 3100 - - - - 3 - MCAwLjgwMDAwMDAxMTkAA - - - - 1 - 0 - 2 - NO - - - {643, 433} - - - - - {{0, 0}, {1360, 746}} - {1e+13, 1e+13} - - - - - YES - - - cancel: - - - - 175 - - - - selectArchiveDestination: - - - - 176 - - - - selectBackupSource: - - - - 177 - - - - commit: - - - - 178 - - - - window - - - - 182 - - - - m_backupSourceTextField - - - - 190 - - - - m_archiveDestinationTextField - - - - 191 - - - - m_nameContainsTextField - - - - 192 - - - - m_backupsToLeaveTextField - - - - 193 - - - - m_warnDaysTextField - - - - 194 - - - - m_addButton - - - - 196 - - - - m_nameTextField - - - - 189 - - - - m_backupSourceButton - - - - 207 - - - - m_archiveDestinationButton - - - - 208 - - - - m_nameLabel - - - - 213 - - - - delegate - - - - 188 - - - - - YES - - 0 - - YES - - - - - - -2 - - - File's Owner - - - -1 - - - First Responder - - - -3 - - - Application - - - 130 - - - YES - - - - - - 131 - - - YES - - - - - - 132 - - - YES - - - - - - - - - - - - - - - - - - - - - - - 133 - - - YES - - - - - - 134 - - - YES - - - - - - 135 - - - YES - - - - - - 136 - - - YES - - - - - - 137 - - - YES - - - - - - 138 - - - YES - - - - - - 141 - - - YES - - - - - - 142 - - - YES - - - - - - 143 - - - YES - - - - - - 144 - - - YES - - - - - - 145 - - - YES - - - - - - 147 - - - YES - - - - - - 148 - - - YES - - - - - - 149 - - - YES - - - - - - 150 - - - YES - - - - - - 151 - - - - - 152 - - - - - 153 - - - - - 154 - - - - - 156 - - - - - 157 - - - - - 158 - - - - - 159 - - - - - 160 - - - - - 163 - - - - - 164 - - - - - 165 - - - - - 166 - - - - - 167 - - - - - 168 - - - - - 146 - - - YES - - - - - - 155 - - - - - 209 - - - YES - - - - - - 210 - - - - - 211 - - - YES - - - - - - 212 - - - - - - - YES - - YES - -1.IBPluginDependency - -2.IBPluginDependency - -3.IBPluginDependency - 130.IBPluginDependency - 130.NSWindowTemplate.visibleAtLaunch - 131.IBPluginDependency - 132.IBPluginDependency - 133.IBPluginDependency - 134.IBPluginDependency - 135.IBPluginDependency - 136.IBPluginDependency - 137.IBPluginDependency - 138.IBPluginDependency - 141.IBPluginDependency - 142.IBPluginDependency - 143.IBPluginDependency - 144.IBPluginDependency - 145.IBPluginDependency - 146.IBPluginDependency - 147.IBPluginDependency - 148.IBPluginDependency - 149.IBPluginDependency - 150.IBPluginDependency - 151.IBPluginDependency - 152.IBPluginDependency - 153.IBPluginDependency - 154.IBPluginDependency - 155.IBPluginDependency - 156.IBPluginDependency - 157.IBPluginDependency - 158.IBPluginDependency - 159.IBPluginDependency - 160.IBPluginDependency - 163.IBPluginDependency - 164.IBPluginDependency - 165.IBPluginDependency - 166.IBPluginDependency - 167.IBPluginDependency - 168.IBPluginDependency - 209.IBPluginDependency - 210.IBPluginDependency - 211.IBPluginDependency - 212.IBPluginDependency - - - YES - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - - - YES - - - - - - YES - - - - - 213 - - - - YES - - AddPanelController - NSWindowController - - YES - - YES - cancel: - commit: - selectArchiveDestination: - selectBackupSource: - - - YES - id - id - id - id - - - - YES - - YES - cancel: - commit: - selectArchiveDestination: - selectBackupSource: - - - YES - - cancel: - id - - - commit: - id - - - selectArchiveDestination: - id - - - selectBackupSource: - id - - - - - YES - - YES - m_addButton - m_archiveDestinationButton - m_archiveDestinationTextField - m_backupSourceButton - m_backupSourceTextField - m_backupsToLeaveTextField - m_nameContainsTextField - m_nameLabel - m_nameTextField - m_warnDaysTextField - - - YES - NSButton - NSButton - NSTextField - NSButton - NSTextField - NSTextField - NSTextField - NSTextField - NSTextField - NSTextField - - - - YES - - YES - m_addButton - m_archiveDestinationButton - m_archiveDestinationTextField - m_backupSourceButton - m_backupSourceTextField - m_backupsToLeaveTextField - m_nameContainsTextField - m_nameLabel - m_nameTextField - m_warnDaysTextField - - - YES - - m_addButton - NSButton - - - m_archiveDestinationButton - NSButton - - - m_archiveDestinationTextField - NSTextField - - - m_backupSourceButton - NSButton - - - m_backupSourceTextField - NSTextField - - - m_backupsToLeaveTextField - NSTextField - - - m_nameContainsTextField - NSTextField - - - m_nameLabel - NSTextField - - - m_nameTextField - NSTextField - - - m_warnDaysTextField - NSTextField - - - - - IBProjectSource - ./Classes/AddPanelController.h - - - - - 0 - IBCocoaFramework - - com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3 - - - YES - 3 - - NSFolderSmart - {32, 32} - - - diff --git a/UI/BackupMinderUI/BackupMinderUI/en.lproj/Credits.rtf b/UI/BackupMinderUI/BackupMinderUI/en.lproj/Credits.rtf deleted file mode 100644 index cdb1a29..0000000 --- a/UI/BackupMinderUI/BackupMinderUI/en.lproj/Credits.rtf +++ /dev/null @@ -1,52 +0,0 @@ -{\rtf1\ansi\ansicpg1252\cocoartf1038\cocoasubrtf360 -{\fonttbl\f0\fswiss\fcharset0 Helvetica;} -{\colortbl;\red255\green255\blue255;} -\vieww9600\viewh8400\viewkind0 -\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural - -\f0\b\fs24 \cf0 Engineering: -\b0 \ - Me\ -\ - -\b Human Interface Design: -\b0 \ - Me\ -\ - -\b Testing: -\b0 \ - Me\ -\ - -\b Documentation: -\b0 \ - Me\ -\ - -\b With special thanks to: -\b0 \ - Me\ -\ - -\b Tip of the hat to: -\b0 \ - Me\ -\ - -\b A nice pat on the back to: -\b0 \ - Me\ -\ - -\b A 'jolly good job my good man' to: -\b0 \ - Me\ -\ - -\b Any other flattering remarks to: -\b0 \ - Me\ -\ -\ -} \ No newline at end of file diff --git a/UI/BackupMinderUI/BackupMinderUI/en.lproj/InfoPlist.strings b/UI/BackupMinderUI/BackupMinderUI/en.lproj/InfoPlist.strings deleted file mode 100644 index 477b28f..0000000 --- a/UI/BackupMinderUI/BackupMinderUI/en.lproj/InfoPlist.strings +++ /dev/null @@ -1,2 +0,0 @@ -/* Localized versions of Info.plist keys */ - diff --git a/UI/BackupMinderUI/BackupMinderUI/en.lproj/MainMenu.xib b/UI/BackupMinderUI/BackupMinderUI/en.lproj/MainMenu.xib deleted file mode 100644 index 6e74210..0000000 --- a/UI/BackupMinderUI/BackupMinderUI/en.lproj/MainMenu.xib +++ /dev/null @@ -1,933 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Default - - - - - - - Left to Right - - - - - - - Right to Left - - - - - - - - - - - Default - - - - - - - Left to Right - - - - - - - Right to Left - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/UI/BackupMinderUI/BackupMinderUI/logo.png b/UI/BackupMinderUI/BackupMinderUI/logo.png deleted file mode 100644 index a526f4b..0000000 Binary files a/UI/BackupMinderUI/BackupMinderUI/logo.png and /dev/null differ diff --git a/UI/BackupMinderUI/build/BackupMinderHelper b/UI/BackupMinderUI/build/BackupMinderHelper deleted file mode 100755 index 2780fac..0000000 Binary files a/UI/BackupMinderUI/build/BackupMinderHelper and /dev/null differ diff --git a/UI/BackupMinderUI/build/BackupMinderHelper-386 b/UI/BackupMinderUI/build/BackupMinderHelper-386 deleted file mode 100755 index 37f450b..0000000 Binary files a/UI/BackupMinderUI/build/BackupMinderHelper-386 and /dev/null differ diff --git a/UI/BackupMinderUI/build/BackupMinderHelper-ppc b/UI/BackupMinderUI/build/BackupMinderHelper-ppc deleted file mode 100755 index 35b733f..0000000 Binary files a/UI/BackupMinderUI/build/BackupMinderHelper-ppc and /dev/null differ diff --git a/UI/BackupMinderUI/build/BackupMinderHelper-x64 b/UI/BackupMinderUI/build/BackupMinderHelper-x64 deleted file mode 100755 index 840cadc..0000000 Binary files a/UI/BackupMinderUI/build/BackupMinderHelper-x64 and /dev/null differ diff --git a/UI/BackupMinderUI_Xcode3/BackupMinderUI-Info.plist b/UI/BackupMinderUI_Xcode3/BackupMinderUI-Info.plist index 898df0c..2b348f8 100644 --- a/UI/BackupMinderUI_Xcode3/BackupMinderUI-Info.plist +++ b/UI/BackupMinderUI_Xcode3/BackupMinderUI-Info.plist @@ -9,7 +9,7 @@ CFBundleIconFile BackupMinder.icns CFBundleIdentifier - Mac-Consulting-Group.${PRODUCT_NAME:rfc1034identifier} + org.backupminder.backupminder CFBundleInfoDictionaryVersion 6.0 CFBundleName @@ -17,20 +17,20 @@ CFBundlePackageType BNDL CFBundleShortVersionString - 2.0.0 + 2.1 CFBundleSignature ???? CFBundleVersion - 2.0.0 + 2.1 LSMinimumSystemVersion ${MACOSX_DEPLOYMENT_TARGET} NSMainNibFile MainMenu NSPrincipalClass NSApplication - SUFeedURL - https://backupminder.org/v1/backupminder-appcast.xml SUEnableAutomaticChecks NO + SUFeedURL + https://backupminder.org/v2/backupminder-appcast.xml diff --git a/UI/BackupMinderUI_Xcode3/Classes/AppDelegate.m b/UI/BackupMinderUI_Xcode3/Classes/AppDelegate.m index 3a7e7d2..5b1b1be 100644 --- a/UI/BackupMinderUI_Xcode3/Classes/AppDelegate.m +++ b/UI/BackupMinderUI_Xcode3/Classes/AppDelegate.m @@ -154,7 +154,7 @@ - (IBAction) cancelUpdates: (id)sender - (IBAction) downloadUpdate: (id)sender; { - [[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString:@"https://backupminder.org/doku.php?id=release_notes"]]; + [[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString:@"https://backupminder.org/doku.php?id=autodownload"]]; [updateBox orderOut: 0]; } diff --git a/UI/BackupMinderUI_Xcode3/Classes/MainMenuController.h b/UI/BackupMinderUI_Xcode3/Classes/MainMenuController.h index 48267e7..f379849 100644 --- a/UI/BackupMinderUI_Xcode3/Classes/MainMenuController.h +++ b/UI/BackupMinderUI_Xcode3/Classes/MainMenuController.h @@ -41,6 +41,9 @@ // The "Are you sure?" alert NSAlert *m_removeAlert; + + // Current authorization status + BOOL currentlyAuthorized; } // Brief: Enable/disable components of the app based on the authorized status diff --git a/UI/BackupMinderUI_Xcode3/Classes/MainMenuController.m b/UI/BackupMinderUI_Xcode3/Classes/MainMenuController.m index a93649c..bfa3316 100644 --- a/UI/BackupMinderUI_Xcode3/Classes/MainMenuController.m +++ b/UI/BackupMinderUI_Xcode3/Classes/MainMenuController.m @@ -75,11 +75,15 @@ - (void)dealloc - (void)setAuthorized:(BOOL)authorized_ { [m_addButton setEnabled:authorized_]; + [m_editButton setEnabled:authorized_]; + [m_removeButton setEnabled:authorized_]; + [runButton setEnabled:authorized_]; [m_refreshButton setEnabled:authorized_]; [m_backupsTableView setEnabled:authorized_]; + currentlyAuthorized=authorized_; //Unselect the row to disable remove/edit buttons -// [m_backupsTableView deselectAll:nil]; + //[m_backupsTableView deselectAll:nil]; [m_backupsTableView selectRowIndexes: [NSIndexSet indexSetWithIndex: 0] byExtendingSelection: NO]; } @@ -269,9 +273,9 @@ - (void)tableViewSelectionDidChange:(NSNotification *)notification_; } // Otherwise, enable the Edit and Remove buttons - [m_removeButton setEnabled:YES]; - [m_editButton setEnabled:YES]; - [runButton setEnabled:YES]; + [m_removeButton setEnabled:currentlyAuthorized]; + [m_editButton setEnabled:currentlyAuthorized]; + [runButton setEnabled:currentlyAuthorized]; // Get the associated backup object NSMutableDictionary *backupObject = diff --git a/UI/BackupMinderUI_Xcode3/English.lproj/InfoPlist.strings b/UI/BackupMinderUI_Xcode3/English.lproj/InfoPlist.strings index 5048a84..7ad8a86 100644 --- a/UI/BackupMinderUI_Xcode3/English.lproj/InfoPlist.strings +++ b/UI/BackupMinderUI_Xcode3/English.lproj/InfoPlist.strings @@ -1,3 +1,3 @@ /* Localized versions of Info.plist keys */ -NSHumanReadableCopyright = "Copyright (c) 2012, Mac Consulting Group, Inc."; \ No newline at end of file +NSHumanReadableCopyright = "Copyright (c) 2015, Watchman Monitoring, Inc."; \ No newline at end of file diff --git a/UI/BackupMinderUI_Xcode3/English.lproj/MainMenu.xib b/UI/BackupMinderUI_Xcode3/English.lproj/MainMenu.xib index 67964df..281ee84 100644 --- a/UI/BackupMinderUI_Xcode3/English.lproj/MainMenu.xib +++ b/UI/BackupMinderUI_Xcode3/English.lproj/MainMenu.xib @@ -11,8 +11,8 @@ 851 - + com.apple.InterfaceBuilder.CocoaPlugin @@ -1429,7 +1429,6 @@ 268 {{20, 20}, {438, 40}} - SFAuthorizationView @@ -1512,7 +1511,7 @@ {1.7976931348623157e+308, 1.7976931348623157e+308} - + 256 @@ -1677,7 +1676,6 @@ dGNoA {319, 413} - _NS:122 {{0, 0}, {1280, 778}} @@ -1744,7 +1742,7 @@ dGNoA {1.7976931348623157e+308, 1.7976931348623157e+308} - + 256 @@ -1872,6 +1870,7 @@ dGNoA {469, 151} + _NS:122 {{0, 0}, {1280, 778}} @@ -2565,9 +2564,9 @@ dGNoA versionText - + - 900 + 901 @@ -4051,9 +4050,9 @@ dGNoA com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - {{399, 454}, {469, 151}} + {{423, 236}, {469, 151}} com.apple.InterfaceBuilder.CocoaPlugin - {{399, 454}, {469, 151}} + {{423, 236}, {469, 151}} com.apple.InterfaceBuilder.CocoaPlugin @@ -4127,7 +4126,7 @@ dGNoA - 900 + 901 diff --git a/UI/backupminder-appcast.xml b/UI/backupminder-appcast.xml index b6c00e2..a66553e 100755 --- a/UI/backupminder-appcast.xml +++ b/UI/backupminder-appcast.xml @@ -1,14 +1,13 @@ - - - - BackupMinder Updates - https://backupminder.org/v1/backupminder-appcast.xml - Most recent changes with links to updates. - en - - Version 1.2 - Wed, 23 March 2015 00:00:00 +0500 - - - - \ No newline at end of file + + + + BackupMinder Updates + en + + BackupMinder 2.1 + Wednesday, September 12th, 2015 12:00:00 GMT-5 + https://backupminder.org/doku.php?id=release_notes#version_20_setup_assistant_auto-updating + + + +