Skip to content

Commit 4655b7a

Browse files
committed
Update to Sparkle on Sep 22, 2019
1 parent 76745b2 commit 4655b7a

File tree

6 files changed

+21
-11
lines changed

6 files changed

+21
-11
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Easily package and release updates of your RubyMotion app with Sparkle.
88

99
This version uses the [ui-separation-and-xpc branch](https://github.com/sparkle-project/Sparkle/tree/ui-separation-and-xpc) to support an app that uses sandboxing. Sparkle is in transition, and the sandbox version is slated for 2.0.
1010

11-
_Sparkle built from ui-separation-and-xpc#b1c3b313f53c95a91c8adc07b991ff9a306e6cf8 on Dec 9th, 2018_
11+
_Sparkle built from https://github.com/sparkle-project/Sparkle/commit/14871e5ee9753bba3c4b0d8a87e674306d264dc5 on Sep 22nd, 2019_
1212

1313
[Reference thread](https://github.com/sparkle-project/Sparkle/issues/363)
1414

lib/motion/project/project.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def codesign_with_sparkle(config, platform)
5353

5454
Dir.glob("#{xpc_path}/*.xpc").each do |path|
5555
App.info 'Codesign', path
56-
results = `#{App.config.sparkle.sparkle_vendor_path}/codesign_xpc "#{App.config.codesign_certificate}" "#{File.expand_path(path)}" 2>&1`
56+
results = `#{App.config.sparkle.sparkle_vendor_path}/codesign_embedded_executable "#{App.config.codesign_certificate}" "#{File.expand_path(path)}" 2>&1`
5757
end
5858
end
5959
end

vendor/README.md

+13-3
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,33 @@
11
## Building the Sparkle.zip
22

3+
The `vendor` directory should contain
4+
5+
```
6+
vendor
7+
codesign_embedded_executable
8+
generate_appcast
9+
README.md
10+
Sparkle.zip
11+
```
12+
313
The structure of `Sparkle.zip` is:
414

515
```
616
Sparkle
7-
codesign_xpc
817
Sparkle.framework
918
XPCServices
19+
org.sparkle-project.Downloader.xpc (not usually needed)
1020
org.sparkle-project.InstallerConnection.xpc
1121
org.sparkle-project.InstallerLauncher.xpc
1222
org.sparkle-project.InstallerStatus.xpc
1323
```
1424

1525
In order to get xpc services to be signed and work properly, they need to be copied into an `XPCServices` folder in `MyApp.app/Contents`
1626

17-
The `codesign_xpc` can properly sign these files once they have been copied into place.
27+
The `codesign_embedded_executable` can properly sign these files once they have been copied into place.
1828

1929
1. Fetch the `ui-separation-and-xpc` branch
20-
2. Copy the `bin/codesign_xpc` into the `Sparkle` folder
30+
2. Copy the `bin/codesign_embedded_executable` into the `vendor` folder
2131
3. Run `make release` and change to the output folder
2232
4. Copy the `Sparkle.framework` into the `Sparkle` folder
2333
5. Copy each of the above xpc files into the `XPCServices` folder

vendor/Sparkle.zip

1.29 MB
Binary file not shown.

vendor/codesign_xpc renamed to vendor/codesign_embedded_executable

+6-6
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ def sanitize(argument):
1010
return ('"' + argument + '"' if ' ' in argument else argument)
1111

1212
def _codesign_service(identity, path, entitlements_path=None):
13-
command = ["codesign", "-fs", identity, path] + ([] if entitlements_path is None else ["--entitlements", entitlements_path])
13+
command = ["codesign", "-o", "runtime", "-fs", identity, path] + ([] if entitlements_path is None else ["--entitlements", entitlements_path])
1414
log_message(" ".join(map(sanitize, command)))
1515

1616
process = subprocess.Popen(command, stdout=subprocess.PIPE)
@@ -32,15 +32,15 @@ def codesign_service(service_name, identity, path, entitlements_path=None):
3232

3333
if __name__ == "__main__":
3434
if len(sys.argv) < 3:
35-
log_message("Usage:\n\t%s code-signing-identity xpc-service xpc-service2 ..." % (sys.argv[0]))
35+
log_message("Usage:\n\t%s code-signing-identity executable1 executable1 ..." % (sys.argv[0]))
3636
log_message("Example:\n\t%s \"Developer ID Application\" ./XPCServices/*.xpc" % (sys.argv[0]))
3737
sys.exit(1)
3838

3939
signing_identity = sys.argv[1]
40-
xpc_services = sys.argv[2:]
40+
executables = sys.argv[2:]
4141

42-
for xpc_service in xpc_services:
43-
parent, child = os.path.split(xpc_service)
42+
for executable in executables:
43+
parent, child = os.path.split(executable)
4444
service_name = os.path.splitext(child)[0]
4545
entitlements_path = os.path.join(parent, service_name + ".entitlements")
46-
codesign_service(service_name, signing_identity, xpc_service, None if not os.path.exists(entitlements_path) else entitlements_path)
46+
codesign_service(service_name, signing_identity, executable, None if not os.path.exists(entitlements_path) else entitlements_path)

vendor/generate_appcast

-9.12 MB
Binary file not shown.

0 commit comments

Comments
 (0)