diff options
author | rowanbeentje <rowan@beent.je> | 2012-11-18 15:38:41 +0000 |
---|---|---|
committer | rowanbeentje <rowan@beent.je> | 2012-11-18 15:38:41 +0000 |
commit | fb1d481a1d9420bffc830696de66b2874e64a67a (patch) | |
tree | 1f894750378b873c1328f81ed30099b888d540d5 | |
parent | 5d87d8f8cd268e753a1b2ed647ee413c43360ba6 (diff) | |
download | sequelpro-fb1d481a1d9420bffc830696de66b2874e64a67a.tar.gz sequelpro-fb1d481a1d9420bffc830696de66b2874e64a67a.tar.bz2 sequelpro-fb1d481a1d9420bffc830696de66b2874e64a67a.zip |
* Please note this revision will re-prompt for access to all KeyChain passwords *
- Change the bundle identifier from com.google.code.sequel-pro to com.sequelpro.SequelPro
- Change the code signing process to use a new identity and requirement, to add Developer ID support on 10.7+ but to also maintain functionality on 10.5+
- Add a preference migration routine to copy the old application defaults to the new bundle identifier's defaults
- Re-order the default keys to alphabetical to more easily locate values
-rw-r--r-- | Resources/Plists/Info.plist | 98 | ||||
-rw-r--r-- | Resources/Plists/PreferenceDefaults.plist | 252 | ||||
-rw-r--r-- | Resources/Plists/Sequel Pro QLGenerator-Info.plist | 8 | ||||
-rw-r--r-- | Resources/Plists/Unit Tests-Info.plist | 2 | ||||
-rw-r--r-- | Resources/sprequirement.bin | bin | 0 -> 216 bytes | |||
-rwxr-xr-x | Scripts/build.sh | 4 | ||||
-rw-r--r-- | Source/GeneratePreviewForURL.m | 12 | ||||
-rw-r--r-- | Source/SPAppController.m | 3 | ||||
-rw-r--r-- | Source/SPConstants.h | 3 | ||||
-rw-r--r-- | Source/SPConstants.m | 2 | ||||
-rw-r--r-- | Source/SPPreferenceController.m | 7 | ||||
-rw-r--r-- | Source/SPPreferencesUpgrade.h | 1 | ||||
-rw-r--r-- | Source/SPPreferencesUpgrade.m | 28 | ||||
-rw-r--r-- | Source/SPTableContent.h | 1 |
14 files changed, 226 insertions, 195 deletions
diff --git a/Resources/Plists/Info.plist b/Resources/Plists/Info.plist index 0930e9ce..14c16d9f 100644 --- a/Resources/Plists/Info.plist +++ b/Resources/Plists/Info.plist @@ -21,12 +21,12 @@ </array> <key>CFBundleTypeRole</key> <string>Editor</string> - <key>NSDocumentClass</key> - <string>SPDocumentController</string> <key>LSItemContentTypes</key> <array> - <string>com.google.code.sequel-pro.spf</string> + <string>com.sequelpro.SequelPro.spf</string> </array> + <key>NSDocumentClass</key> + <string>SPDocumentController</string> </dict> <dict> <key>CFBundleTypeExtensions</key> @@ -44,12 +44,12 @@ </array> <key>CFBundleTypeRole</key> <string>Editor</string> - <key>NSDocumentClass</key> - <string>SPDocumentController</string> <key>LSItemContentTypes</key> <array> - <string>com.google.code.sequel-pro.spTheme</string> + <string>com.sequelpro.SequelPro.spTheme</string> </array> + <key>NSDocumentClass</key> + <string>SPDocumentController</string> </dict> <dict> <key>CFBundleTypeExtensions</key> @@ -66,14 +66,14 @@ </array> <key>CFBundleTypeRole</key> <string>Editor</string> - <key>NSDocumentClass</key> - <string>SPDocumentController</string> <key>LSItemContentTypes</key> <array> - <string>com.google.code.sequel-pro.spfs</string> + <string>com.sequelpro.SequelPro.spfs</string> </array> <key>LSTypeIsPackage</key> <true/> + <key>NSDocumentClass</key> + <string>SPDocumentController</string> </dict> <dict> <key>CFBundleTypeExtensions</key> @@ -91,14 +91,14 @@ </array> <key>CFBundleTypeRole</key> <string>Editor</string> - <key>NSDocumentClass</key> - <string>SPDocumentController</string> <key>LSItemContentTypes</key> <array> - <string>com.google.code.sequel-pro.spbundle</string> + <string>com.sequelpro.SequelPro.spbundle</string> </array> <key>LSTypeIsPackage</key> <true/> + <key>NSDocumentClass</key> + <string>SPDocumentController</string> </dict> <dict> <key>CFBundleTypeExtensions</key> @@ -128,7 +128,7 @@ <key>CFBundleIconFile</key> <string>appicon.icns</string> <key>CFBundleIdentifier</key> - <string>com.google.code.sequel-pro</string> + <string>com.sequelpro.SequelPro</string> <key>CFBundleInfoDictionaryVersion</key> <string>6.0</string> <key>CFBundleName</key> @@ -137,6 +137,17 @@ <string>APPL</string> <key>CFBundleShortVersionString</key> <string>0.9.9.1</string> + <key>CFBundleURLTypes</key> + <array> + <dict> + <key>CFBundleURLName</key> + <string>Sequel Pro URL scheme</string> + <key>CFBundleURLSchemes</key> + <array> + <string>sequelpro</string> + </array> + </dict> + </array> <key>CFBundleVersion</key> <string></string> <key>FRFeedbackReporter.maxConsoleLogSize</key> @@ -197,16 +208,16 @@ <key>UTExportedTypeDeclarations</key> <array> <dict> + <key>UTTypeConformsTo</key> + <array> + <string>public.plain-text</string> + </array> <key>UTTypeDescription</key> <string>Sequel Pro Connection</string> <key>UTTypeIconFile</key> <string></string> <key>UTTypeIdentifier</key> - <string>com.google.code.sequel-pro.spf</string> - <key>UTTypeConformsTo</key> - <array> - <string>public.plain-text</string> - </array> + <string>com.sequelpro.SequelPro.spf</string> <key>UTTypeTagSpecification</key> <dict> <key>com.apple.ostype</key> @@ -218,16 +229,16 @@ </dict> </dict> <dict> + <key>UTTypeConformsTo</key> + <array> + <string>com.apple.package</string> + </array> <key>UTTypeDescription</key> <string>Sequel Pro Session</string> <key>UTTypeIconFile</key> <string></string> <key>UTTypeIdentifier</key> - <string>com.google.code.sequel-pro.spfs</string> - <key>UTTypeConformsTo</key> - <array> - <string>com.apple.package</string> - </array> + <string>com.sequelpro.SequelPro.spfs</string> <key>UTTypeTagSpecification</key> <dict> <key>com.apple.ostype</key> @@ -239,16 +250,16 @@ </dict> </dict> <dict> + <key>UTTypeConformsTo</key> + <array> + <string>com.apple.package</string> + </array> <key>UTTypeDescription</key> <string>Sequel Pro Bundle</string> <key>UTTypeIconFile</key> <string></string> <key>UTTypeIdentifier</key> - <string>com.google.code.sequel-pro.spbundle</string> - <key>UTTypeConformsTo</key> - <array> - <string>com.apple.package</string> - </array> + <string>com.sequelpro.SequelPro.spbundle</string> <key>UTTypeTagSpecification</key> <dict> <key>com.apple.ostype</key> @@ -261,16 +272,16 @@ </dict> </dict> <dict> + <key>UTTypeConformsTo</key> + <array> + <string>public.plain-text</string> + </array> <key>UTTypeDescription</key> <string>SQL File</string> <key>UTTypeIconFile</key> <string></string> <key>UTTypeIdentifier</key> - <string>com.google.code.sequel-pro.sql</string> - <key>UTTypeConformsTo</key> - <array> - <string>public.plain-text</string> - </array> + <string>com.sequelpro.SequelPro.sql</string> <key>UTTypeTagSpecification</key> <dict> <key>com.apple.ostype</key> @@ -282,16 +293,16 @@ </dict> </dict> <dict> + <key>UTTypeConformsTo</key> + <array> + <string>public.plain-text</string> + </array> <key>UTTypeDescription</key> <string>Sequel Pro Color Theme</string> <key>UTTypeIconFile</key> <string></string> <key>UTTypeIdentifier</key> - <string>com.google.code.sequel-pro.spTheme</string> - <key>UTTypeConformsTo</key> - <array> - <string>public.plain-text</string> - </array> + <string>com.sequelpro.SequelPro.spTheme</string> <key>UTTypeTagSpecification</key> <dict> <key>com.apple.ostype</key> @@ -304,16 +315,5 @@ </dict> </dict> </array> - <key>CFBundleURLTypes</key> - <array> - <dict> - <key>CFBundleURLName</key> - <string>Sequel Pro URL scheme</string> - <key>CFBundleURLSchemes</key> - <array> - <string>sequelpro</string> - </array> - </dict> - </array> </dict> </plist> diff --git a/Resources/Plists/PreferenceDefaults.plist b/Resources/Plists/PreferenceDefaults.plist index 511e095c..7ac9c3d7 100644 --- a/Resources/Plists/PreferenceDefaults.plist +++ b/Resources/Plists/PreferenceDefaults.plist @@ -2,161 +2,147 @@ <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> - <key>DefaultEncodingTag</key> - <real>0</real> - <key>DefaultViewMode</key> - <integer>0</integer> - <key>LastViewMode</key> - <integer>1</integer> - <key>UseMonospacedFonts</key> + <key>BlobTextEditorSpellCheckingEnabled</key> <false/> - <key>GlobalResultTableFont</key> - <data>BAtzdHJlYW10eXBlZIHoA4QBQISEhAZOU0ZvbnQehIQITlNPYmplY3QAhYQBaSSEBVszNmNdBgAAABoAAAD//kwAdQBjAGkAZABhAEcAcgBhAG4AZABlAAAAhAFmC4QBYwCYAZgAmACG</data> - <key>CustomQueryMaxHistoryItems</key> - <integer>20</integer> - <key>ReloadAfterAddingRow</key> + <key>ConnectionTimeoutValue</key> + <integer>10</integer> + <key>ConsoleEnableCustomQueryLogging</key> <true/> - <key>ReloadAfterEditingRow</key> + <key>ConsoleEnableErrorLogging</key> <true/> - <key>ReloadAfterRemovingRow</key> - <false/> - <key>LoadBlobsAsNeeded</key> + <key>ConsoleEnableImportExportLogging</key> <false/> - <key>TableRowCountQueryLevel</key> - <integer>1</integer> - <key>TableRowCountCheapLookupSizeBoundary</key> - <integer>5242880</integer> - <key>NewFieldsAllowNulls</key> + <key>ConsoleEnableInterfaceLogging</key> <true/> - <key>LimitResults</key> + <key>ConsoleEnableLogging</key> <true/> - <key>LimitResultsValue</key> - <integer>1000</integer> - <key>NullValue</key> - <string>NULL</string> - <key>ShowNoAffectedRowsError</key> + <key>ConsoleShowConnections</key> <true/> - <key>GrowlEnabled</key> + <key>ConsoleShowHelps</key> <true/> - <key>ConnectionTimeoutValue</key> - <integer>10</integer> - <key>UseKeepAlive</key> + <key>ConsoleShowSelectsAndShows</key> <true/> - <key>KeepAliveInterval</key> - <integer>60</integer> - <key>DisplayTableViewVerticalGridlines</key> - <false/> - <key>EditInSheetEnabled</key> - <false/> - <key>QueryFavoriteReplacesContent</key> - <false/> - <key>QueryHistoryReplacesContent</key> + <key>ConsoleShowTimestamps</key> + <true/> + <key>ContentFilters</key> + <dict> + <key>number</key> + <array/> + <key>string</key> + <array/> + <key>date</key> + <array/> + </dict> + <key>CSVFieldImportMappingAlignment</key> + <integer>2</integer> + <key>CSVImportFieldEnclosedBy</key> + <string>"</string> + <key>CSVImportFieldEscapeCharacter</key> + <string>\ or "</string> + <key>CSVImportFieldTerminator</key> + <string>,</string> + <key>CSVImportFirstLineIsHeader</key> + <true/> + <key>CSVImportLineTerminator</key> + <string>\n</string> + <key>CustomQueryAutoComplete</key> + <true/> + <key>CustomQueryAutoCompleteDelay</key> + <real>1.5</real> + <key>CustomQueryAutoHelpDelay</key> + <real>1</real> + <key>CustomQueryAutoIndent</key> + <true/> + <key>CustomQueryAutoPairCharacters</key> + <true/> + <key>CustomQueryAutoUppercaseKeywords</key> <false/> - <key>CustomQueryEditorFont</key> - <data>BAtzdHJlYW10eXBlZIHoA4QBQISEhAZOU0ZvbnQehIQITlNPYmplY3QAhYQBaRiEBVsyNGNdBgAAAA4AAAD//k0AbwBuAGEAYwBvAAAAhAFmCoQBYwCYAZgAmACG</data> <key>CustomQueryEditorBackgroundColor</key> <data>BAtzdHJlYW10eXBlZIHoA4QBQISEhAdOU0NvbG9yAISECE5TT2JqZWN0AIWEAWMBhARmZmZmAQEBAYY=</data> <key>CustomQueryEditorBacktickColor</key> <data>BAtzdHJlYW10eXBlZIHoA4QBQISEhAdOU0NvbG9yAISECE5TT2JqZWN0AIWEAWMBhARmZmZmAACDqagoPwGG</data> + <key>CustomQueryEditorCaretColor</key> + <data>BAtzdHJlYW10eXBlZIHoA4QBQISEhAdOU0NvbG9yAISECE5TT2JqZWN0AIWEAWMBhARmZmZmAAAAAYY=</data> <key>CustomQueryEditorCommentColor</key> <data>BAtzdHJlYW10eXBlZIHoA4QBQISEhAdOU0NvbG9yAISECE5TT2JqZWN0AIWEAWMBhARmZmZmAIPp6Og+AAGG</data> + <key>CustomQueryEditorFont</key> + <data>BAtzdHJlYW10eXBlZIHoA4QBQISEhAZOU0ZvbnQehIQITlNPYmplY3QAhYQBaRiEBVsyNGNdBgAAAA4AAAD//k0AbwBuAGEAYwBvAAAAhAFmCoQBYwCYAZgAmACG</data> + <key>CustomQueryEditorHighlightQueryColor</key> + <data>BAtzdHJlYW10eXBlZIHoA4QBQISEhAdOU0NvbG9yAISECE5TT2JqZWN0AIWEAWMChARmZmZmgzMzcz+DMzNzP4MzM3M/AYY=</data> <key>CustomQueryEditorNumericColor</key> <data>BAtzdHJlYW10eXBlZIHoA4QBQISEhAdOU0NvbG9yAISECE5TT2JqZWN0AIWEAWMBhARmZmZmg4GAAD+Dh4aGPgABhg==</data> <key>CustomQueryEditorQuoteColor</key> <data>BAtzdHJlYW10eXBlZIHoA4QBQISEhAdOU0NvbG9yAISECE5TT2JqZWN0AIWEAWMBhARmZmZmg8bFRT+DnXPOPYNba609AYY=</data> + <key>CustomQueryEditorSelectionColor</key> + <data>BAtzdHJlYW10eXBlZIHoA4QBQISEhAdOU0NvbG9yAISECE5TT2JqZWN0AIWEAWMChARmZmZmg7a1NT+D1tVVPwEBhg==</data> <key>CustomQueryEditorSQLKeywordColor</key> <data>BAtzdHJlYW10eXBlZIHoA4QBQISEhAdOU0NvbG9yAISECE5TT2JqZWN0AIWEAWMBhARmZmZmg83MTD6DnXPOPQEBhg==</data> + <key>CustomQueryEditorTabStopWidth</key> + <integer>4</integer> <key>CustomQueryEditorTextColor</key> <data>BAtzdHJlYW10eXBlZIHoA4QBQISEhAdOU0NvbG9yAISECE5TT2JqZWN0AIWEAWMBhARmZmZmAAAAAYY=</data> - <key>CustomQueryEditorCaretColor</key> - <data>BAtzdHJlYW10eXBlZIHoA4QBQISEhAdOU0NvbG9yAISECE5TT2JqZWN0AIWEAWMBhARmZmZmAAAAAYY=</data> <key>CustomQueryEditorVariableColor</key> <data>BAtzdHJlYW10eXBlZIHoA4QBQISEhAdOU0NvbG9yAISECE5TT2JqZWN0AIWEAWMBhARmZmZmg3zv/T6DfO/9PoN87/0+AYY=</data> - <key>CustomQueryEditorHighlightQueryColor</key> - <data>BAtzdHJlYW10eXBlZIHoA4QBQISEhAdOU0NvbG9yAISECE5TT2JqZWN0AIWEAWMChARmZmZmgzMzcz+DMzNzP4MzM3M/AYY=</data> - <key>CustomQueryEditorSelectionColor</key> - <data>BAtzdHJlYW10eXBlZIHoA4QBQISEhAdOU0NvbG9yAISECE5TT2JqZWN0AIWEAWMChARmZmZmg7a1NT+D1tVVPwEBhg==</data> - <key>CustomQueryHighlightCurrentQuery</key> - <true/> - <key>CustomQueryAutoIndent</key> + <key>CustomQueryFunctionCompletionInsertsArguments</key> <true/> - <key>CustomQueryAutoPairCharacters</key> + <key>CustomQueryHighlightCurrentQuery</key> <true/> - <key>CustomQueryAutoUppercaseKeywords</key> + <key>CustomQueryMaxHistoryItems</key> + <integer>20</integer> + <key>CustomQuerySoftIndent</key> <false/> + <key>CustomQuerySoftIndentWidth</key> + <integer>2</integer> <key>CustomQueryUpdateAutoHelp</key> <false/> - <key>CustomQueryEditorTabStopWidth</key> - <integer>4</integer> - <key>CustomQueryFunctionCompletionInsertsArguments</key> - <true/> - <key>CustomQueryAutoComplete</key> - <true/> - <key>CustomQueryAutoCompleteDelay</key> - <real>1.5</real> - <key>CustomQueryAutoHelpDelay</key> - <real>1</real> - <key>lastSqlFileEncoding</key> - <integer>4</integer> - <key>SelectLastFavoriteUsed</key> + <key>DefaultEncodingTag</key> + <real>0</real> + <key>DefaultViewMode</key> + <integer>0</integer> + <key>deletedDefaultBundles</key> + <array/> + <key>DisplayServerVersionInWindowTitle</key> <true/> - <key>LastFavoriteIndex</key> + <key>DisplayTableViewVerticalGridlines</key> + <false/> + <key>EditInSheetEnabled</key> + <false/> + <key>FavoritesSortedBy</key> <integer>0</integer> - <key>TableInformationPanelCollapsed</key> + <key>FavoritesSortedInReverse</key> <false/> - <key>ConsoleEnableLogging</key> - <true/> - <key>ConsoleEnableInterfaceLogging</key> + <key>FilterTableDefaultOperator</key> + <string>LIKE '%@%'</string> + <key>GlobalResultTableFont</key> + <data>BAtzdHJlYW10eXBlZIHoA4QBQISEhAZOU0ZvbnQehIQITlNPYmplY3QAhYQBaSSEBVszNmNdBgAAABoAAAD//kwAdQBjAGkAZABhAEcAcgBhAG4AZABlAAAAhAFmC4QBYwCYAZgAmACG</data> + <key>GrowlEnabled</key> <true/> - <key>ConsoleEnableCustomQueryLogging</key> + <key>KeepAliveInterval</key> + <integer>60</integer> + <key>LastFavoriteIndex</key> + <integer>0</integer> + <key>lastSqlFileEncoding</key> + <integer>4</integer> + <key>LastViewMode</key> + <integer>1</integer> + <key>LimitResults</key> <true/> - <key>ConsoleEnableImportExportLogging</key> + <key>LimitResultsValue</key> + <integer>1000</integer> + <key>LoadBlobsAsNeeded</key> <false/> - <key>ConsoleEnableErrorLogging</key> - <true/> - <key>ConsoleShowTimestamps</key> - <true/> - <key>ConsoleShowConnections</key> - <true/> - <key>ConsoleShowSelectsAndShows</key> + <key>LongRunningQueryNotificationTime</key> + <real>3</real> + <key>NewFieldsAllowNulls</key> <true/> - <key>ConsoleShowHelps</key> + <key>NoBOMforSQLdumpFile</key> <true/> + <key>NullValue</key> + <string>NULL</string> <key>PrintBackground</key> <true/> <key>PrintImagePreviews</key> <true/> - <key>QuickLookTypes</key> - <array/> - <key>ContentFilters</key> - <dict> - <key>number</key> - <array/> - <key>string</key> - <array/> - <key>date</key> - <array/> - </dict> - <key>CSVImportFieldTerminator</key> - <string>,</string> - <key>CSVImportLineTerminator</key> - <string>\n</string> - <key>CSVImportFieldEnclosedBy</key> - <string>"</string> - <key>CSVImportFieldEscapeCharacter</key> - <string>\ or "</string> - <key>CSVImportFirstLineIsHeader</key> - <true/> - <key>SQLExportUseCompression</key> - <false/> - <key>NoBOMforSQLdumpFile</key> - <true/> - <key>BlobTextEditorSpellCheckingEnabled</key> - <false/> - <key>CSVFieldImportMappingAlignment</key> - <integer>2</integer> - <key>DisplayServerVersionInWindowTitle</key> - <true/> <key>PrintWarningRowLimit</key> <integer>1000</integer> <key>ProcessListShowProcessID</key> @@ -167,23 +153,39 @@ <false/> <key>ProcessListAutoRrefreshInterval</key> <integer>10</integer> - <key>FavoritesSortedBy</key> - <integer>0</integer> - <key>FavoritesSortedInReverse</key> + <key>QueryFavoriteReplacesContent</key> + <false/> + <key>QueryHistoryReplacesContent</key> + <false/> + <key>QuickLookTypes</key> + <array/> + <key>ReloadAfterAddingRow</key> + <true/> + <key>ReloadAfterEditingRow</key> + <true/> + <key>ReloadAfterRemovingRow</key> <false/> <key>ResetAutoIncrementAfterDeletionOfAllRows</key> <true/> - <key>FilterTableDefaultOperator</key> - <string>LIKE '%@%'</string> - <key>WebKitDeveloperExtras</key> + <key>SelectLastFavoriteUsed</key> <true/> - <key>deletedDefaultBundles</key> - <array/> - <key>CustomQuerySoftIndent</key> + <key>ShowNoAffectedRowsError</key> + <true/> + <key>SPFirstRun</key> + <true/> + <key>SQLExportUseCompression</key> <false/> - <key>CustomQuerySoftIndentWidth</key> - <integer>2</integer> - <key>LongRunningQueryNotificationTime</key> - <real>3</real> + <key>TableInformationPanelCollapsed</key> + <false/> + <key>TableRowCountCheapLookupSizeBoundary</key> + <integer>5242880</integer> + <key>TableRowCountQueryLevel</key> + <integer>1</integer> + <key>UseKeepAlive</key> + <true/> + <key>UseMonospacedFonts</key> + <false/> + <key>WebKitDeveloperExtras</key> + <true/> </dict> </plist> diff --git a/Resources/Plists/Sequel Pro QLGenerator-Info.plist b/Resources/Plists/Sequel Pro QLGenerator-Info.plist index 9fb710ab..1899f423 100644 --- a/Resources/Plists/Sequel Pro QLGenerator-Info.plist +++ b/Resources/Plists/Sequel Pro QLGenerator-Info.plist @@ -11,9 +11,9 @@ <string>QLGenerator</string> <key>LSItemContentTypes</key> <array> - <string>com.google.code.sequel-pro.spf</string> - <string>com.google.code.sequel-pro.sql</string> - <string>com.google.code.sequel-pro.spfs</string> + <string>com.sequelpro.SequelPro.spf</string> + <string>com.sequelpro.SequelPro.sql</string> + <string>com.sequelpro.SequelPro.spfs</string> </array> </dict> </array> @@ -22,7 +22,7 @@ <key>CFBundleIconFile</key> <string></string> <key>CFBundleIdentifier</key> - <string>com.google.code.sequel-pro.qlgenerator</string> + <string>com.sequelpro.SequelPro.qlgenerator</string> <key>CFBundleInfoDictionaryVersion</key> <string>6.0</string> <key>CFBundleName</key> diff --git a/Resources/Plists/Unit Tests-Info.plist b/Resources/Plists/Unit Tests-Info.plist index 8e85f172..0ef98ee5 100644 --- a/Resources/Plists/Unit Tests-Info.plist +++ b/Resources/Plists/Unit Tests-Info.plist @@ -7,7 +7,7 @@ <key>CFBundleExecutable</key> <string>${EXECUTABLE_NAME}</string> <key>CFBundleIdentifier</key> - <string>com.google.code.sequel-pro.tests</string> + <string>com.sequelpro.SequelPro.tests</string> <key>CFBundleInfoDictionaryVersion</key> <string>6.0</string> <key>CFBundlePackageType</key> diff --git a/Resources/sprequirement.bin b/Resources/sprequirement.bin Binary files differnew file mode 100644 index 00000000..78205212 --- /dev/null +++ b/Resources/sprequirement.bin diff --git a/Scripts/build.sh b/Scripts/build.sh index bc5a9d14..01c9b683 100755 --- a/Scripts/build.sh +++ b/Scripts/build.sh @@ -86,8 +86,8 @@ if [ "$CONFIGURATION" == 'Distribution' ] then echo 'Performing distribution build code signing...' - codesign -s 'Sequel Pro Distribution' "${BUILD_PRODUCT}/Contents/Resources/SequelProTunnelAssistant" 2> /dev/null - codesign -s 'Sequel Pro Distribution' "${BUILD_PRODUCT}" 2> /dev/null + codesign -s 'Developer ID Application: MJ Media' -r "${SRCROOT}/Resources/sprequirement.bin" "${BUILD_PRODUCT}/Contents/Resources/SequelProTunnelAssistant" + codesign -s 'Developer ID Application: MJ Media' -r "${SRCROOT}/Resources/sprequirement.bin" "${BUILD_PRODUCT}" # Verify that code signing has worked - all distribution builds must be signed with the same key. VERIFYERRORS=`codesign --verify "$BUILD_PRODUCT" 2>&1` diff --git a/Source/GeneratePreviewForURL.m b/Source/GeneratePreviewForURL.m index b9292599..9b66d3e7 100644 --- a/Source/GeneratePreviewForURL.m +++ b/Source/GeneratePreviewForURL.m @@ -97,7 +97,7 @@ OSStatus GeneratePreviewForURL(void *thisInterface, QLPreviewRequestRef preview, // Dispatch different spf formats if([[spf objectForKey:@"format"] isEqualToString:@"connection"]) { - template = [NSString stringWithContentsOfFile:[[NSBundle bundleWithIdentifier:@"com.google.code.sequel-pro.qlgenerator"] pathForResource:@"SPQLPluginConnectionTemplate" ofType:@"html"] + template = [NSString stringWithContentsOfFile:[[NSBundle bundleWithIdentifier:@"com.sequelpro.SequelPro.qlgenerator"] pathForResource:@"SPQLPluginConnectionTemplate" ofType:@"html"] encoding:NSUTF8StringEncoding error:&templateReadError]; if (template == nil || ![template length] || templateReadError != nil) { @@ -154,7 +154,7 @@ OSStatus GeneratePreviewForURL(void *thisInterface, QLPreviewRequestRef preview, else if([[spf objectForKey:@"format"] isEqualToString:@"content filters"]) { - template = [NSString stringWithContentsOfFile:[[NSBundle bundleWithIdentifier:@"com.google.code.sequel-pro.qlgenerator"] pathForResource:@"SPQLPluginContentFiltersTemplate" ofType:@"html"] + template = [NSString stringWithContentsOfFile:[[NSBundle bundleWithIdentifier:@"com.sequelpro.SequelPro.qlgenerator"] pathForResource:@"SPQLPluginContentFiltersTemplate" ofType:@"html"] encoding:NSUTF8StringEncoding error:&templateReadError]; if (template == nil || ![template length] || templateReadError != nil) { @@ -170,7 +170,7 @@ OSStatus GeneratePreviewForURL(void *thisInterface, QLPreviewRequestRef preview, else if([[spf objectForKey:@"format"] isEqualToString:@"query favorites"]) { - template = [NSString stringWithContentsOfFile:[[NSBundle bundleWithIdentifier:@"com.google.code.sequel-pro.qlgenerator"] pathForResource:@"SPQLPluginQueryFavoritesTemplate" ofType:@"html"] + template = [NSString stringWithContentsOfFile:[[NSBundle bundleWithIdentifier:@"com.sequelpro.SequelPro.qlgenerator"] pathForResource:@"SPQLPluginQueryFavoritesTemplate" ofType:@"html"] encoding:NSUTF8StringEncoding error:&templateReadError]; if (template == nil || ![template length] || templateReadError != nil) { @@ -190,7 +190,7 @@ OSStatus GeneratePreviewForURL(void *thisInterface, QLPreviewRequestRef preview, else if([urlExtension isEqualToString:@"spfs"]) { - template = [NSString stringWithContentsOfFile:[[NSBundle bundleWithIdentifier:@"com.google.code.sequel-pro.qlgenerator"] pathForResource:@"SPQLPluginConnectionBundleTemplate" ofType:@"html"] + template = [NSString stringWithContentsOfFile:[[NSBundle bundleWithIdentifier:@"com.sequelpro.SequelPro.qlgenerator"] pathForResource:@"SPQLPluginConnectionBundleTemplate" ofType:@"html"] encoding:NSUTF8StringEncoding error:&templateReadError]; if (template == nil || ![template length] || templateReadError != nil) { @@ -198,7 +198,7 @@ OSStatus GeneratePreviewForURL(void *thisInterface, QLPreviewRequestRef preview, return noErr; } - NSString *windowTemplate = [NSString stringWithContentsOfFile:[[NSBundle bundleWithIdentifier:@"com.google.code.sequel-pro.qlgenerator"] pathForResource:@"SPQLPluginConnectionBundleWindowTemplate" ofType:@"html"] + NSString *windowTemplate = [NSString stringWithContentsOfFile:[[NSBundle bundleWithIdentifier:@"com.sequelpro.SequelPro.qlgenerator"] pathForResource:@"SPQLPluginConnectionBundleWindowTemplate" ofType:@"html"] encoding:NSUTF8StringEncoding error:&templateReadError]; if (windowTemplate == nil || ![windowTemplate length] || templateReadError != nil) { @@ -331,7 +331,7 @@ OSStatus GeneratePreviewForURL(void *thisInterface, QLPreviewRequestRef preview, else if([urlExtension isEqualToString:@"sql"]) { - template = [NSString stringWithContentsOfFile:[[NSBundle bundleWithIdentifier:@"com.google.code.sequel-pro.qlgenerator"] pathForResource:@"SPQLPluginSQLTemplate" ofType:@"html"] + template = [NSString stringWithContentsOfFile:[[NSBundle bundleWithIdentifier:@"com.sequelpro.SequelPro.qlgenerator"] pathForResource:@"SPQLPluginSQLTemplate" ofType:@"html"] encoding:NSUTF8StringEncoding error:&templateReadError]; if (template == nil || ![template length] || templateReadError != nil) { diff --git a/Source/SPAppController.m b/Source/SPAppController.m index c10b8370..da70ceb9 100644 --- a/Source/SPAppController.m +++ b/Source/SPAppController.m @@ -112,6 +112,9 @@ YY_BUFFER_STATE yy_scan_string (const char *); { // Register application defaults [[NSUserDefaults standardUserDefaults] registerDefaults:[NSDictionary dictionaryWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"PreferenceDefaults" ofType:@"plist"]]]; + + // Upgrade prefs before any other parts of the app pick up on the values + SPApplyRevisionChanges(); } /** diff --git a/Source/SPConstants.h b/Source/SPConstants.h index 03da11a6..81a7310e 100644 --- a/Source/SPConstants.h +++ b/Source/SPConstants.h @@ -278,7 +278,8 @@ extern NSString *SPDataSupportFolder; extern NSString *SPTableContentFilterKey; // Preference key constants -// +extern NSString *SPFirstRun; + // General Prefpane extern NSString *SPDefaultFavorite; extern NSString *SPSelectLastFavoriteUsed; diff --git a/Source/SPConstants.m b/Source/SPConstants.m index 33f5e22a..7dae561c 100644 --- a/Source/SPConstants.m +++ b/Source/SPConstants.m @@ -72,6 +72,8 @@ NSString *SPDataSupportFolder = @"Data"; NSString *SPTableContentFilterKey = @"filter"; // Preference key constants +NSString *SPFirstRun = @"SPFirstRun"; + // General Prefpane NSString *SPDefaultFavorite = @"DefaultFavorite"; NSString *SPSelectLastFavoriteUsed = @"SelectLastFavoriteUsed"; diff --git a/Source/SPPreferenceController.m b/Source/SPPreferenceController.m index 0716acf4..f6670a03 100644 --- a/Source/SPPreferenceController.m +++ b/Source/SPPreferenceController.m @@ -31,7 +31,6 @@ // More info at <http://code.google.com/p/sequel-pro/> #import "SPPreferenceController.h" -#import "SPPreferencesUpgrade.h" #import "SPTablesPreferencePane.h" #import "SPEditorPreferencePane.h" #import "SPGeneralPreferencePane.h" @@ -60,11 +59,7 @@ */ - (id)init { - if ((self = [super initWithWindowNibName:@"Preferences"])) { - - // Upgrade prefs - SPApplyRevisionChanges(); - + if ((self = [super initWithWindowNibName:@"Preferences"])) { fontChangeTarget = 0; } diff --git a/Source/SPPreferencesUpgrade.h b/Source/SPPreferencesUpgrade.h index db1b67cd..1f50a2f9 100644 --- a/Source/SPPreferencesUpgrade.h +++ b/Source/SPPreferencesUpgrade.h @@ -41,5 +41,6 @@ void SPApplyRevisionChanges(void); void SPMigrateConnectionFavoritesData(void); +void SPMigratePreferencesFromPreviousIdentifer(void); @end diff --git a/Source/SPPreferencesUpgrade.m b/Source/SPPreferencesUpgrade.m index 3dbd7647..208bbab4 100644 --- a/Source/SPPreferencesUpgrade.m +++ b/Source/SPPreferencesUpgrade.m @@ -48,7 +48,14 @@ void SPApplyRevisionChanges(void) NSUInteger currentVersionNumber, recordedVersionNumber = 0; NSUserDefaults *prefs = [NSUserDefaults standardUserDefaults]; - + + // If this is the first run, check for a preferences with the old bundle identifier and + // migrate them before running any preference upgrade routines + if ([prefs boolForKey:SPFirstRun]) { + SPMigratePreferencesFromPreviousIdentifer(); + [prefs setBool:NO forKey:SPFirstRun]; + } + // Get the current bundle version number (the SVN build number) for per-version upgrades currentVersionNumber = [[[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleVersion"] integerValue]; @@ -386,4 +393,23 @@ void SPMigrateConnectionFavoritesData(void) [favorites release]; } +/** + * Migrates across all preferences for an old bundle identifier to the current preferences file. + */ +void SPMigratePreferencesFromPreviousIdentifer(void) +{ + NSUserDefaults *prefs = [NSUserDefaults standardUserDefaults]; + + CFStringRef oldIdentifier = CFSTR("com.google.code.sequel-pro"); + CFArrayRef oldPrefKeys = CFPreferencesCopyKeyList(oldIdentifier, kCFPreferencesCurrentUser, kCFPreferencesAnyHost); + NSDictionary *oldPrefs = (NSDictionary *)CFPreferencesCopyMultiple(oldPrefKeys, oldIdentifier, kCFPreferencesCurrentUser, kCFPreferencesAnyHost); + + for (id eachKey in oldPrefs) { + [prefs setObject:[oldPrefs objectForKey:eachKey] forKey:eachKey]; + } + + [oldPrefs release]; + CFRelease(oldPrefKeys); +} + @end diff --git a/Source/SPTableContent.h b/Source/SPTableContent.h index c9fa1d7c..1eb6b678 100644 --- a/Source/SPTableContent.h +++ b/Source/SPTableContent.h @@ -207,6 +207,7 @@ // Table loading methods and information - (void)loadTable:(NSString *)aTable; +- (void)setTableDetails:(NSDictionary *)tableDetails; - (void)clearTableValues; - (void)loadTableValues; - (NSString *)tableFilterString; |