//$ssh = new SSH2('paris.cubedesigners.com', 'vincent', 'atacama', 22022);
//$local_root = '/Users/vincent/Sign/';
$ssh = new SSH2('paris.cubedesigners.com', 'macossign', 'rntj55bw', 22622);
- $local_root = '/Users/macossign/Documents/Sign/';
+ $remote_root = '/Users/macossign/Documents/Sign/';
+ $remoteSigned = $remote_root . '/' . $this->exeName . '.app.zip';
// Zip app
Zip::archive($appPath . '/..', $appPath . ".zip", 1);
$signScripts = resource_path('macossign');
// Copy zipped app and signing scripts to the remote mac server
- $ssh->send($signScripts . '/toolbox/docodesign3', $local_root . 'docodesign3', 755);
- $ssh->send($signScripts . '/toolbox/sign3', $local_root . 'sign3', 755);
- $ssh->send($signScripts . '/toolbox/neededToRun3.entitlements', $local_root . 'neededToRun3.entitlements', 755);
- $ssh->send($signScripts . '/workshop/docodesign', $local_root . 'docodesign', 755);
- $ssh->send($signScripts . '/workshop/sign', $local_root . 'sign', 755);
- $ssh->send($signScripts . '/workshop/neededToRun.entitlements', $local_root . 'neededToRun.entitlements', 755);
- $ssh->send($appPath . ".zip", $local_root . $this->exeName . '.app.zip', 644);
+ $ssh->send($signScripts . '/docodesign3', $remote_root . 'docodesign3', 755);
+ $ssh->send($signScripts . '/sign3', $remote_root . 'sign3', 755);
+ $ssh->send($signScripts . '/neededToRun3.entitlements', $remote_root . 'neededToRun3.entitlements', 755);
+ $ssh->send($appPath . ".zip", $remoteSigned, 644);
// Sign app
- $cl = new CommandLine($local_root . 'sign3');
+ $cl = new CommandLine($remote_root . 'sign3');
$cl->setArg(null, $this->exeName);
$cl->execute($ssh);
$cl->debug();
$finalPath = $this->getPathBase('zip');
// Copy back signed
- $ssh->recv($local_root . '/' . $this->exeName . '.app.zip', $finalPath);
+ $ssh->recv($remoteSigned, $finalPath);
+ $ssh->unlink($remoteSigned);
+
$this->setFinalPath($finalPath);
$this->setFinalURL($this->getDownloadURL('zip'));
- //`rm -rf $path`;
return $res;
}
$fontforge->setArg(null, $f);
$fontforge->setArg(null, $dest);
$fontforge->execute();
- $fontforge->debug();
+ //$fontforge->debug();
}
$this->vdir->copy($dest, 'data/fonts/' . $hash . '.woff');
$fontline = new CommandLine('font-line');
$fontline->setArg(null, 'report');
$fontline->setArg(null, $f);
$fontline->execute();
- $fontline->debug();
+ //$fontline->debug();
$report = explode("\n", $fontline->getOutput());
foreach ($report as $item) {
--- /dev/null
+#!/usr/local/bin/node
+
+const APP = process.argv[2];
+const IDENTITY = process.argv[3];
+
+/****************************************************************************/
+
+console.log("### finding things to sign");
+
+const fs = require('fs');
+const child_process = require('child_process');
+
+const items = [];
+
+const frameworksDir = `${APP}/Contents/Frameworks/nwjs Framework.framework`;
+
+let currentVersionDir;
+for (const dir of fs.readdirSync(`${frameworksDir}/Versions`)) {
+ if (fs.statSync(`${frameworksDir}/Versions/${dir}`).isDirectory) {
+ currentVersionDir = `${frameworksDir}/Versions/${dir}`;
+ break;
+ }
+}
+if (!currentVersionDir) {
+ console.error(`couldn't find "${frameworksDir}/Versions/[version]"`);
+ process.exit(1);
+}
+for (const file of fs.readdirSync(`${currentVersionDir}`)) {
+ if (file.endsWith('.dylib')) {
+ items.push(`${currentVersionDir}/${file}`);
+ }
+}
+for (const file of fs.readdirSync(`${currentVersionDir}/Helpers`)) {
+ if (/^[a-z0-9_]*$/.test(file) || file.endsWith('.app')) {
+ items.push(`${currentVersionDir}/Helpers/${file}`);
+ }
+}
+
+for (const file of fs.readdirSync(`${currentVersionDir}/Libraries`)) {
+ if (file.endsWith('.dylib')) {
+ items.push(`${currentVersionDir}/Libraries/${file}`);
+ }
+}
+
+if (fs.existsSync(`${APP}/Contents/Library/LaunchServices`)) {
+ for (const file of fs.readdirSync(`${APP}/Contents/Library/LaunchServices`)) {
+ items.push(`${APP}/Contents/Library/LaunchServices/${file}`);
+ }
+}
+
+if (fs.existsSync(`${currentVersionDir}/XPCServices`)) {
+ for (const file of fs.readdirSync(`${currentVersionDir}/XPCServices`)) {
+ if (file.endsWith('.xpc')) {
+ items.push(`${currentVersionDir}/XPCServices/${file}`);
+ }
+ }
+}
+
+items.push(frameworksDir);
+
+/****************************************************************************/
+
+console.log("");
+console.log("### signing");
+
+function exec(cmd) {
+ console.log(cmd);
+ const result = child_process.spawnSync(cmd, {shell: true, stdio: 'inherit'});
+ if (result.status !== 0) {
+ console.log(`Command failed with status ${result.status}`);
+ if (result.error) console.log(result.error);
+ process.exit(1);
+ }
+}
+
+for (const item of items) {
+ exec(`codesign --verbose --force --deep --strict --options runtime --timestamp --sign "${IDENTITY}" --entitlements ./neededToRun3.entitlements "${item}"`);
+}
+
+exec(`codesign --verbose --force --deep --strict --options runtime --timestamp --sign "${IDENTITY}" --entitlements ./neededToRun3.entitlements "${APP}"`);
+
+/****************************************************************************/
+
+console.log("");
+console.log("### verifying signature");
+
+exec(`codesign --verify -vvvv "${APP}"`);
--- /dev/null
+<?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>
+ <key>com.apple.security.automation.apple-events</key>
+ <true/>
+ <key>com.apple.security.cs.allow-dyld-environment-variables</key>
+ <true/>
+ <key>com.apple.security.cs.allow-jit</key>
+ <true/>
+ <key>com.apple.security.cs.allow-unsigned-executable-memory</key>
+ <true/>
+ <key>com.apple.security.cs.disable-executable-page-protection</key>
+ <true/>
+ <key>com.apple.security.cs.disable-library-validation</key>
+ <true/>
+ </dict>
+</plist>
\ No newline at end of file
--- /dev/null
+#!/bin/sh
+cd /Users/macossign/Documents/Sign
+printf "Unlock keychain\n----\n\n"
+security unlock-keychain -p "rntj55bw" /Users/macossign/Library/Keychains/Apple.keychain-db
+printf "Unzip app file\n----\n\n"
+rm -rf "$1.app"
+unzip "$1.app.zip"
+rm -f "$1.app.zip"
+printf "Sign the app\n----\n\n"
+./docodesign3 "$1.app" "Developer ID Application: Cubedesigners (82TNE4UQ7A)"
+printf "Zip the app in order to be notarized\n----\n\n"
+ditto -c -k --sequesterRsrc --keepParent "$1.app" "$1.app.zip"
+printf "Notarize app and wait for confirmation\n----\n\n"
+xcrun notarytool submit --wait --apple-id "contact@cubedesigners.com" --team-id "82TNE4UQ7A" --password "tqwj-saik-dtdl-yrpc" "$1.app.zip"
+printf "Staple the app\n----\n\n"
+xcrun stapler staple "$1.app"
+printf "Rezip the app\n----\n\n"
+rm -f "$1.app.zip"
+ditto -c -k --sequesterRsrc --keepParent "$1.app" "$1.app.zip"
+printf "Remove the app (keep only zip)\n----\n\n"
+rm -rf "$1.app"
+chmod 777 "$1.app.zip"
+++ /dev/null
-#!/usr/local/bin/node
-
-const APP = process.argv[2];
-const IDENTITY = process.argv[3];
-
-/****************************************************************************/
-
-console.log("### finding things to sign");
-
-const fs = require('fs');
-const child_process = require('child_process');
-
-const items = [];
-
-const frameworksDir = `${APP}/Contents/Frameworks/nwjs Framework.framework`;
-
-let currentVersionDir;
-for (const dir of fs.readdirSync(`${frameworksDir}/Versions`)) {
- if (fs.statSync(`${frameworksDir}/Versions/${dir}`).isDirectory) {
- currentVersionDir = `${frameworksDir}/Versions/${dir}`;
- break;
- }
-}
-if (!currentVersionDir) {
- console.error(`couldn't find "${frameworksDir}/Versions/[version]"`);
- process.exit(1);
-}
-for (const file of fs.readdirSync(`${currentVersionDir}`)) {
- if (file.endsWith('.dylib')) {
- items.push(`${currentVersionDir}/${file}`);
- }
-}
-for (const file of fs.readdirSync(`${currentVersionDir}/Helpers`)) {
- if (/^[a-z0-9_]*$/.test(file) || file.endsWith('.app')) {
- items.push(`${currentVersionDir}/Helpers/${file}`);
- }
-}
-
-for (const file of fs.readdirSync(`${currentVersionDir}/Libraries`)) {
- if (file.endsWith('.dylib')) {
- items.push(`${currentVersionDir}/Libraries/${file}`);
- }
-}
-
-for (const file of fs.readdirSync(`${APP}/Contents/Library/LaunchServices`)) {
- items.push(`${APP}/Contents/Library/LaunchServices/${file}`);
-}
-
-//for (const file of fs.readdirSync(`${currentVersionDir}/XPCServices`)) {
-// if (file.endsWith('.xpc')) {
-// items.push(`${currentVersionDir}/XPCServices/${file}`);
-// }
-//
-items.push(frameworksDir);
-
-/****************************************************************************/
-
-console.log("");
-console.log("### signing");
-
-function exec(cmd) {
- console.log(cmd);
- const result = child_process.spawnSync(cmd, {shell: true, stdio: 'inherit'});
- if (result.status !== 0) {
- console.log(`Command failed with status ${result.status}`);
- if (result.error) console.log(result.error);
- process.exit(1);
- }
-}
-
-for (const item of items) {
- exec(`codesign --verbose --force --deep --strict --options runtime --timestamp --sign "${IDENTITY}" --entitlements ./neededToRun3.entitlements "${item}"`);
-}
-
-exec(`codesign --verbose --force --deep --strict --options runtime --timestamp --sign "${IDENTITY}" --entitlements ./neededToRun3.entitlements "${APP}"`);
-
-/****************************************************************************/
-
-console.log("");
-console.log("### verifying signature");
-
-exec(`codesign --verify -vvvv "${APP}"`);
+++ /dev/null
-<?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>
- <key>com.apple.security.automation.apple-events</key>
- <true/>
- <key>com.apple.security.cs.allow-dyld-environment-variables</key>
- <true/>
- <key>com.apple.security.cs.allow-jit</key>
- <true/>
- <key>com.apple.security.cs.allow-unsigned-executable-memory</key>
- <true/>
- <key>com.apple.security.cs.disable-executable-page-protection</key>
- <true/>
- <key>com.apple.security.cs.disable-library-validation</key>
- <true/>
- </dict>
-</plist>
\ No newline at end of file
+++ /dev/null
-#!/bin/sh
-cd /Users/macossign/Documents/Sign
-printf "Unlock keychain\n----\n\n"
-security unlock-keychain -p "rntj55bw" /Users/macossign/Library/Keychains/Apple.keychain-db
-printf "Unzip app file\n----\n\n"
-rm -rf "$1.app"
-unzip "$1.app.zip"
-rm -f "$1.app.zip"
-printf "Sign the app\n----\n\n"
-./docodesign3 "$1.app" "Developer ID Application: Cubedesigners (82TNE4UQ7A)"
-printf "Zip the app in order to be notarized\n----\n\n"
-ditto -c -k --sequesterRsrc --keepParent "$1.app" "$1.app.zip"
-printf "Notarize app and wait for confirmation\n----\n\n"
-xcrun notarytool submit --wait --apple-id "contact@cubedesigners.com" --team-id "82TNE4UQ7A" --password "tqwj-saik-dtdl-yrpc" "$1.app.zip"
-printf "Staple the app\n----\n\n"
-xcrun stapler staple "$1.app"
-printf "Rezip the app\n----\n\n"
-rm -f "$1.app.zip"
-ditto -c -k --sequesterRsrc --keepParent "$1.app" "$1.app.zip"
-printf "Remove the app (keep only zip)\n----\n\n"
-rm -rf "$1.app"
-chmod 777 "$1.app.zip"
+++ /dev/null
-#!/usr/bin/env node
-
-const APP = process.argv[2];
-const IDENTITY = process.argv[3];
-
-/****************************************************************************/
-
-console.log("### finding things to sign");
-
-const fs = require('fs');
-const child_process = require('child_process');
-
-const items = [];
-
-const frameworksDir = `${APP}/Contents/Frameworks/nwjs Framework.framework`;
-
-let currentVersionDir;
-for (const dir of fs.readdirSync(`${frameworksDir}/Versions`)) {
- if (fs.statSync(`${frameworksDir}/Versions/${dir}`).isDirectory) {
- currentVersionDir = `${frameworksDir}/Versions/${dir}`;
- break;
- }
-}
-if (!currentVersionDir) {
- console.error(`couldn't find "${frameworksDir}/Versions/[version]"`);
- process.exit(1);
-}
-for (const file of fs.readdirSync(`${currentVersionDir}`)) {
- if (file.endsWith('.dylib')) {
- items.push(`${currentVersionDir}/${file}`);
- }
-}
-for (const file of fs.readdirSync(`${currentVersionDir}/Helpers`)) {
- if (/^[a-z0-9_]*$/.test(file) || file.endsWith('.app')) {
- items.push(`${currentVersionDir}/Helpers/${file}`);
- }
-}
-for (const file of fs.readdirSync(`${currentVersionDir}/Libraries`)) {
- if (file.endsWith('.dylib')) {
- items.push(`${currentVersionDir}/Libraries/${file}`);
- }
-}
-for (const file of fs.readdirSync(`${currentVersionDir}/XPCServices`)) {
- if (file.endsWith('.xpc')) {
- items.push(`${currentVersionDir}/XPCServices/${file}`);
- }
-}
-items.push(frameworksDir);
-
-/****************************************************************************/
-
-console.log("");
-console.log("### signing");
-
-function exec(cmd) {
- console.log(cmd);
- const result = child_process.spawnSync(cmd, {shell: true, stdio: 'inherit'});
- if (result.status !== 0) {
- console.log(`Command failed with status ${result.status}`);
- if (result.error) console.log(result.error);
- process.exit(1);
- }
-}
-
-for (const item of items) {
- exec(`codesign --verbose --force --deep --strict --options runtime --timestamp --sign "${IDENTITY}" --entitlements neededToRun.entitlements "${item}"`);
-}
-
-exec(`codesign --verbose --force --deep --strict --options runtime --timestamp --sign "${IDENTITY}" --entitlements neededToRun.entitlements "${APP}"`);
-
-/****************************************************************************/
-
-console.log("");
-console.log("### verifying signature");
-
-exec(`codesign --verify -vvvv "${APP}"`);
\ No newline at end of file
+++ /dev/null
-<?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>
- <key>com.apple.security.automation.apple-events</key>
- <true/>
- <key>com.apple.security.cs.allow-dyld-environment-variables</key>
- <true/>
- <key>com.apple.security.cs.allow-jit</key>
- <true/>
- <key>com.apple.security.cs.allow-unsigned-executable-memory</key>
- <true/>
- <key>com.apple.security.cs.disable-executable-page-protection</key>
- <true/>
- <key>com.apple.security.cs.disable-library-validation</key>
- <true/>
- </dict>
-</plist>
\ No newline at end of file
+++ /dev/null
-#!/bin/sh
-printf "Unlock keychain\n----\n\n"
-security unlock-keychain -p "atacama" /Users/macossign/Library/Keychains/Apple.keychain-db
-/Users/vincent/Sign/docodesign "$1" "Developer ID Application: Cubedesigners (82TNE4UQ7A)"
-ditto -c -k --sequesterRsrc --keepParent "$1" "$1.zip"
-#xcode-select -s $1
-xcrun notarytool submit --wait --apple-id "contact@cubedesigners.com" --team-id "82TNE4UQ7A" --password "tqwj-saik-dtdl-yrpc" "$1.zip"
-xcrun stapler staple $1