Skip to content

Commit

Permalink
Localization fixes + auto-update with Sparkle
Browse files Browse the repository at this point in the history
  • Loading branch information
nark committed Apr 14, 2020
1 parent 4e508e4 commit 98f47c6
Show file tree
Hide file tree
Showing 24 changed files with 618 additions and 527 deletions.
2 changes: 1 addition & 1 deletion Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@
<key>SUFeedURL</key>
<string>https://wired.read-write.fr/wiredclient_appcast.xml</string>
<key>SUPublicEDKey</key>
<string>SUPublicEDKey.pem</string>
<string>dsa_pub.pem</string>
<key>UTExportedTypeDeclarations</key>
<array>
<dict>
Expand Down
20 changes: 0 additions & 20 deletions SUPublicEDKey.pem

This file was deleted.

4 changes: 2 additions & 2 deletions Sources/WCApplicationController.m
Original file line number Diff line number Diff line change
Expand Up @@ -704,9 +704,9 @@ - (void)awakeFromNib {

// set the auto-update feed URL regarding to the selected configuration (Debug or Release)
#ifdef WCConfigurationRelease
[_updater setFeedURL:[NSURL URLWithString:@"https://wired.read-write.fr/wiredclientcast.xml"]];
[_updater setFeedURL:[NSURL URLWithString:@"https://wired.read-write.fr/sparkle/wiredclient_cast.xml"]];
#else
[_updater setFeedURL:[NSURL URLWithString:@"https://wired.read-write.fr/wiredclient_debugcast.xml"]];
[_updater setFeedURL:[NSURL URLWithString:@"https://wired.read-write.fr/sparkle/wiredclient_debugcast.xml"]];
#endif

[_updater setSendsSystemProfile:YES];
Expand Down
15 changes: 0 additions & 15 deletions Sparkle/generate_keys.rb

This file was deleted.

7 changes: 0 additions & 7 deletions Sparkle/sign_update.rb

This file was deleted.

5 changes: 5 additions & 0 deletions Wired Client.entitlements
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict/>
</plist>
50 changes: 20 additions & 30 deletions WiredClient.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
isa = PBXAggregateTarget;
buildConfigurationList = 4C06678515DEC69800E8D810 /* Build configuration list for PBXAggregateTarget "Wired Client (Distribute Debug)" */;
buildPhases = (
4C5BB6942445E6A20089D6D2 /* Run Bump Version */,
4C06678915DEC69F00E8D810 /* Run Distribute Script */,
);
dependencies = (
Expand Down Expand Up @@ -102,6 +101,7 @@
4C4FDEB21779B8EB00FADB95 /* WCTrackerBookmarkController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C4FDEB11779B8EB00FADB95 /* WCTrackerBookmarkController.m */; };
4C4FDEC4177A4B2400FADB95 /* WCBookmarkController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C4FDEC3177A4B2400FADB95 /* WCBookmarkController.m */; };
4C57B644154E185700C9BAA5 /* WCConnection.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C57B643154E185700C9BAA5 /* WCConnection.m */; };
4C5BB6BB244624390089D6D2 /* dsa_pub.pem in Resources */ = {isa = PBXBuildFile; fileRef = 4C5BB6BA244624390089D6D2 /* dsa_pub.pem */; };
4C5D66681FE3C93000552E9E /* WiredServer.icns in Resources */ = {isa = PBXBuildFile; fileRef = 4C5D66571FE3C92F00552E9E /* WiredServer.icns */; };
4C5D66691FE3C93000552E9E /* WiredTemplate.icns in Resources */ = {isa = PBXBuildFile; fileRef = 4C5D66621FE3C92F00552E9E /* WiredTemplate.icns */; };
4C5D666A1FE3C93000552E9E /* WiredBookmarks.icns in Resources */ = {isa = PBXBuildFile; fileRef = 4C5D66631FE3C92F00552E9E /* WiredBookmarks.icns */; };
Expand Down Expand Up @@ -138,7 +138,6 @@
4CD51D5B181556CC002ADC1C /* WCThreadWindow.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CD51D5A181556CC002ADC1C /* WCThreadWindow.m */; };
4CD7B71518157B0900FA3846 /* WCThreadTableCellView.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CD7B71418157B0900FA3846 /* WCThreadTableCellView.m */; };
4CD7B71F18157B9D00FA3846 /* WCBadgedTableCellView.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CD7B71E18157B9D00FA3846 /* WCBadgedTableCellView.m */; };
4CDBF1FF14BC5501007142D3 /* SUPublicEDKey.pem in Resources */ = {isa = PBXBuildFile; fileRef = 4CDBF1FE14BC5501007142D3 /* SUPublicEDKey.pem */; };
4CDD88CD15F76F8000283005 /* wiredclientrnote.html in Resources */ = {isa = PBXBuildFile; fileRef = 4CDD88CC15F76F8000283005 /* wiredclientrnote.html */; };
4CE1531E1800D64F004DA093 /* MMTabBarView.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4CE152EE1800D5DA004DA093 /* MMTabBarView.framework */; };
4CE153221800D64F004DA093 /* WiredAppKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4CE1530D1800D5E7004DA093 /* WiredAppKit.framework */; };
Expand Down Expand Up @@ -475,6 +474,8 @@
4C57B642154E185700C9BAA5 /* WCConnection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WCConnection.h; path = Sources/WCConnection.h; sourceTree = "<group>"; };
4C57B643154E185700C9BAA5 /* WCConnection.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = WCConnection.m; path = Sources/WCConnection.m; sourceTree = "<group>"; };
4C5BB63E2445ABCA0089D6D2 /* Sparkle.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Sparkle.framework; path = Pods/Sparkle/Sparkle.framework; sourceTree = "<group>"; };
4C5BB6B9244618050089D6D2 /* Wired Client.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = "Wired Client.entitlements"; sourceTree = "<group>"; };
4C5BB6BA244624390089D6D2 /* dsa_pub.pem */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = dsa_pub.pem; sourceTree = "<group>"; };
4C5D66571FE3C92F00552E9E /* WiredServer.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; name = WiredServer.icns; path = Images/WiredServer.icns; sourceTree = "<group>"; };
4C5D66621FE3C92F00552E9E /* WiredTemplate.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; name = WiredTemplate.icns; path = Images/WiredTemplate.icns; sourceTree = "<group>"; };
4C5D66631FE3C92F00552E9E /* WiredBookmarks.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; name = WiredBookmarks.icns; path = Images/WiredBookmarks.icns; sourceTree = "<group>"; };
Expand Down Expand Up @@ -533,7 +534,6 @@
4CD7B71418157B0900FA3846 /* WCThreadTableCellView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WCThreadTableCellView.m; sourceTree = "<group>"; };
4CD7B71D18157B9D00FA3846 /* WCBadgedTableCellView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WCBadgedTableCellView.h; sourceTree = "<group>"; };
4CD7B71E18157B9D00FA3846 /* WCBadgedTableCellView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WCBadgedTableCellView.m; sourceTree = "<group>"; };
4CDBF1FE14BC5501007142D3 /* SUPublicEDKey.pem */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = SUPublicEDKey.pem; sourceTree = "<group>"; };
4CDD88CC15F76F8000283005 /* wiredclientrnote.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = wiredclientrnote.html; sourceTree = "<group>"; };
4CE1533E1800D94A004DA093 /* Growl.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Growl.framework; path = vendor/Growl.framework; sourceTree = "<group>"; };
4CEFF6BC180C3FA600AD7AD9 /* WCThemesPreferences.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WCThemesPreferences.h; path = Sources/WCThemesPreferences.h; sourceTree = "<group>"; };
Expand Down Expand Up @@ -816,7 +816,7 @@
4C0667AA15DED4B400E8D810 /* Localizable.strings */,
A565B4FF0D5DA94000AF91BA /* wired.xml */,
4CDD88CC15F76F8000283005 /* wiredclientrnote.html */,
4CDBF1FE14BC5501007142D3 /* SUPublicEDKey.pem */,
4C5BB6BA244624390089D6D2 /* dsa_pub.pem */,
);
name = Resources;
sourceTree = "<group>";
Expand Down Expand Up @@ -1325,6 +1325,7 @@
A52B1C4706C408210033D317 /* Wired Client */ = {
isa = PBXGroup;
children = (
4C5BB6B9244618050089D6D2 /* Wired Client.entitlements */,
A5E8BABF08748D6D0010F2A4 /* Config */,
4CF094B51559D669005D77BB /* Templates */,
29B97317FDCFA39411CA2CEA /* Resources */,
Expand Down Expand Up @@ -1525,6 +1526,7 @@
LastUpgradeCheck = 1010;
TargetAttributes = {
8D1107260486CEB800E47090 = {
DevelopmentTeam = 7KTXA5Y36K;
ProvisioningStyle = Manual;
};
};
Expand Down Expand Up @@ -1626,7 +1628,6 @@
A565B5000D5DA94000AF91BA /* wired.xml in Resources */,
4C5D666E1FE3C93000552E9E /* WiredTheme.icns in Resources */,
4C2602621FE096B7007E5A6C /* Assets.xcassets in Resources */,
4CDBF1FF14BC5501007142D3 /* SUPublicEDKey.pem in Resources */,
4C5D666A1FE3C93000552E9E /* WiredBookmarks.icns in Resources */,
4CD51D5018155582002ADC1C /* ThreadView.xib in Resources */,
4C5D66681FE3C93000552E9E /* WiredServer.icns in Resources */,
Expand Down Expand Up @@ -1654,6 +1655,7 @@
4C0667F015DED67800E8D810 /* Files.xib in Resources */,
4C0667F615DED69900E8D810 /* Boards.xib in Resources */,
4C0667F915DED6A300E8D810 /* Transfers.xib in Resources */,
4C5BB6BB244624390089D6D2 /* dsa_pub.pem in Resources */,
4C0667FC15DED6AE00E8D810 /* Administration.xib in Resources */,
4C06680215DED6D400E8D810 /* History.xib in Resources */,
4C06680515DED6E400E8D810 /* Console.xib in Resources */,
Expand Down Expand Up @@ -1702,25 +1704,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "#sh \"$SRCROOT/../wired_client_distribute_debug.sh\" >> \"$BUILT_PRODUCTS_DIR/wired_client_distribute_debug.log\"\n\nAPP_NAME=\"Wired Client\"\nDEBUG=\"Debug\"\nARCHIVE_BASE_NAME=\"WiredClient$DEBUG\"\nGITHUB_OWNER=\"nark\"\nGITHUB_REPO=\"WiredClient\"\nGITHUB_TOKEN=\"1778feed013536fac983528b0164f9c199349cf8\"\n\n# get verions\nMARKETING_VERSION=$(xcrun agvtool mvers -terse1)\nCURRENT_PROJECT_VERSION=$(xcrun agvtool vers -terse)\nTAG=\"$MARKETING_VERSION-$CURRENT_PROJECT_VERSION\"\n\n# prepare data for signing and archiving\nSIGN_TOOLS=\"$SRCROOT/../Sparkle-2.x/bin/\"\nPRIV_KEY=\"$SRCROOT/../dsa_priv.pem\"\nDATE=$(date +\"%a, %d %b %G %T\")\nARCHIVE_NAME=\"$ARCHIVE_BASE_NAME-$TAG.zip\"\nARCHIVE_PATH=\"$BUILT_PRODUCTS_DIR/$ARCHIVE_NAME\"\n# RELEASE_NOTE=\"$SRCROOT/wiredclientrnote.html\"\n\n # archive as zip with ditto\ncd \"$BUILT_PRODUCTS_DIR\"\nditto -c -k --sequesterRsrc --keepParent \"$APP_NAME.app\" \"$ARCHIVE_NAME\"\n\n# sign update for Sparkle\nLENGTH=$(stat -f %z $ARCHIVE_PATH)\n\n# sign update for Sparkle\nED_SIGN=$($SIGN_TOOLS/sign_update $ARCHIVE_PATH $PRIV_KEY)\necho $ED_SIGN > \"$BUILT_PRODUCTS_DIR/sign.txt\" # keep track of signature for manual check\n\n# auto-tag git/github\ncd \"$SRCROOT\"\n/usr/bin/git add --all\n/usr/bin/git commit -m \"Publish $ARCHIVE_NAME\"\n/usr/bin/git tag -a $TAG -m \"$ARCHIVE_BASE_NAME-$TAG\"\n/usr/bin/git push --follow-tags\n\n# update to GitHub release\n$SRCROOT/../release $GITHUB_OWNER/$GITHUB_REPO $TAG $DEBUG $TAG -- $ARCHIVE_PATH\n\nGITHUB_SCRIPT=\"$SRCROOT/../upload-github-release-asset.sh\"\n$GITHUB_SCRIPT github_api_token=$GITHUB_TOKEN owner=$GITHUB_OWNER repo=$GITHUB_REPO tag=$TAG filename=$ARCHIVE_PATH\n";
};
4C5BB6942445E6A20089D6D2 /* Run Bump Version */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
);
name = "Run Bump Version";
outputFileListPaths = (
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "# Type a script or drag a script file from your workspace to insert its path.\n#xcrun agvtool next-version -all\n";
shellScript = "sh \"$SRCROOT/../wired_client_distribute.sh\" Debug >> \"$BUILT_PRODUCTS_DIR/wired_client_distribute_debug.log\"\n";
};
4C8243FB17DE37C90065CEEE /* Generate Core Data Model */ = {
isa = PBXShellScriptBuildPhase;
Expand Down Expand Up @@ -1761,7 +1745,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/bash;
shellScript = "sh \"$SRCROOT/../../wired_client_distribute.sh\" || exit 1\n";
shellScript = "sh \"$SRCROOT/../wired_client_distribute.sh\" >> \"$BUILT_PRODUCTS_DIR/wired_client_distribute.log\"\n";
};
4CE1792E244078A0004EFD52 /* Code Sign */ = {
isa = PBXShellScriptBuildPhase;
Expand Down Expand Up @@ -2356,11 +2340,13 @@
ALWAYS_SEARCH_USER_PATHS = NO;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_OBJC_WEAK = YES;
CODE_SIGN_ENTITLEMENTS = "Wired Client.entitlements";
CODE_SIGN_IDENTITY = "Developer ID Application";
CODE_SIGN_STYLE = Manual;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 42;
CURRENT_PROJECT_VERSION = 45;
DEVELOPMENT_TEAM = 7KTXA5Y36K;
ENABLE_HARDENED_RUNTIME = YES;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(SRCROOT)",
Expand Down Expand Up @@ -2608,11 +2594,13 @@
ALWAYS_SEARCH_USER_PATHS = NO;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_OBJC_WEAK = YES;
CODE_SIGN_IDENTITY = "-";
CODE_SIGN_ENTITLEMENTS = "Wired Client.entitlements";
CODE_SIGN_IDENTITY = "Developer ID Application";
CODE_SIGN_STYLE = Manual;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 42;
DEVELOPMENT_TEAM = "";
CURRENT_PROJECT_VERSION = 45;
DEVELOPMENT_TEAM = 7KTXA5Y36K;
ENABLE_HARDENED_RUNTIME = YES;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(SRCROOT)",
Expand Down Expand Up @@ -2710,8 +2698,10 @@
baseConfigurationReference = F7D369A6437514269AF02479 /* Pods-Wired Client.test.xcconfig */;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CODE_SIGN_ENTITLEMENTS = "Wired Client.entitlements";
CODE_SIGN_IDENTITY = "-";
CURRENT_PROJECT_VERSION = 42;
CURRENT_PROJECT_VERSION = 45;
ENABLE_HARDENED_RUNTIME = YES;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Pods/Sparkle",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1140"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "4C06678415DEC69800E8D810"
BuildableName = "Wired Client (Distribute Debug)"
BlueprintName = "Wired Client (Distribute Debug)"
ReferencedContainer = "container:WiredClient.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "4C06678415DEC69800E8D810"
BuildableName = "Wired Client (Distribute Debug)"
BlueprintName = "Wired Client (Distribute Debug)"
ReferencedContainer = "container:WiredClient.xcodeproj">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1140"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "4CDBF1EA14BC4CAF007142D3"
BuildableName = "Wired Client (Distribute)"
BlueprintName = "Wired Client (Distribute)"
ReferencedContainer = "container:WiredClient.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Release"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "4CDBF1EA14BC4CAF007142D3"
BuildableName = "Wired Client (Distribute)"
BlueprintName = "Wired Client (Distribute)"
ReferencedContainer = "container:WiredClient.xcodeproj">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
Loading

0 comments on commit 98f47c6

Please sign in to comment.