Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add codesigning settings #32

Merged
merged 5 commits into from
Nov 3, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
language: objective-c
osx_image: xcode9
osx_image: xcode11.2
script:
- set -o pipefail && xcodebuild -project ProvisionQL.xcodeproj -scheme ProvisionQL | xcpretty
- set -o pipefail && xcodebuild -project ProvisionQL.xcodeproj -scheme ProvisionQL CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO | xcpretty
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# ProvisionQL

## Version 1.6.1

* Adds code signing, fixes macOS Catalina compatibility ([#30](https://github.com/ealeksandrov/ProvisionQL/issues/30))

## Version 1.6.0

* Adds dark mode support ([#29](https://github.com/ealeksandrov/ProvisionQL/pull/29))
Expand Down
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2013-2018 Evgeny Aleksandrov
Copyright (c) 2013-2019 Evgeny Aleksandrov

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
30 changes: 27 additions & 3 deletions ProvisionQL.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
55DB728E186E193500CAFEE7 /* GenerateThumbnailForURL.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GenerateThumbnailForURL.m; sourceTree = "<group>"; };
55DB7290186E193500CAFEE7 /* GeneratePreviewForURL.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GeneratePreviewForURL.m; sourceTree = "<group>"; };
55DB729A186E195500CAFEE7 /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = System/Library/Frameworks/Security.framework; sourceTree = SDKROOT; };
AE61B2AE236C969C003749A1 /* autoupdate-revision.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = "autoupdate-revision.sh"; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand Down Expand Up @@ -111,6 +112,7 @@
555E951A186E2DC0001D406A /* Scripts */ = {
isa = PBXGroup;
children = (
AE61B2AE236C969C003749A1 /* autoupdate-revision.sh */,
555E951B186E2DC0001D406A /* install.sh */,
);
path = Scripts;
Expand Down Expand Up @@ -206,14 +208,20 @@
attributes = {
LastUpgradeCheck = 1000;
ORGANIZATIONNAME = "Evgeny Aleksandrov";
TargetAttributes = {
55DB727C186E193500CAFEE7 = {
DevelopmentTeam = 5567X9EQ9Q;
ProvisioningStyle = Manual;
};
};
};
buildConfigurationList = 55DB7276186E193500CAFEE7 /* Build configuration list for PBXProject "ProvisionQL" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
English,
en,
Base,
);
mainGroup = 55DB7272186E193500CAFEE7;
productRefGroup = 55DB727E186E193500CAFEE7 /* Products */;
Expand Down Expand Up @@ -260,7 +268,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "sh ProvisionQL/Scripts/install.sh\n";
shellScript = "sh ProvisionQL/Scripts/autoupdate-revision.sh\nsh ProvisionQL/Scripts/install.sh\n";
};
/* End PBXShellScriptBuildPhase section */

Expand Down Expand Up @@ -378,9 +386,17 @@
55DB7298186E193500CAFEE7 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_IDENTITY = "Developer ID Application";
CODE_SIGN_INJECT_BASE_ENTITLEMENTS = NO;
CODE_SIGN_STYLE = Manual;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = 5567X9EQ9Q;
ENABLE_HARDENED_RUNTIME = YES;
INFOPLIST_FILE = "ProvisionQL/Supporting-files/Info.plist";
INSTALL_PATH = /Library/QuickLook;
MARKETING_VERSION = 1.6.1;
OTHER_CODE_SIGN_FLAGS = "--timestamp";
PRODUCT_BUNDLE_IDENTIFIER = com.ealeksandrov.ProvisionQL;
PRODUCT_NAME = "$(TARGET_NAME)";
WRAPPER_EXTENSION = qlgenerator;
Expand All @@ -390,9 +406,17 @@
55DB7299186E193500CAFEE7 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_IDENTITY = "Developer ID Application";
CODE_SIGN_INJECT_BASE_ENTITLEMENTS = NO;
CODE_SIGN_STYLE = Manual;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = 5567X9EQ9Q;
ENABLE_HARDENED_RUNTIME = YES;
INFOPLIST_FILE = "ProvisionQL/Supporting-files/Info.plist";
INSTALL_PATH = /Library/QuickLook;
MARKETING_VERSION = 1.6.1;
OTHER_CODE_SIGN_FLAGS = "--timestamp";
PRODUCT_BUNDLE_IDENTIFIER = com.ealeksandrov.ProvisionQL;
PRODUCT_NAME = "$(TARGET_NAME)";
WRAPPER_EXTENSION = qlgenerator;
Expand Down
3 changes: 3 additions & 0 deletions ProvisionQL/GeneratePreviewForURL.m
Original file line number Diff line number Diff line change
Expand Up @@ -630,6 +630,9 @@ OSStatus GeneratePreviewForURL(void *thisInterface, QLPreviewRequestRef preview,
[synthesizedInfo setObject:@"" forKey:@"DEBUG"];
#endif

synthesizedValue = [[NSBundle bundleWithIdentifier:kPluginBundleId] objectForInfoDictionaryKey:@"CFBundleShortVersionString"];
[synthesizedInfo setObject:synthesizedValue forKey:@"BundleShortVersionString"];

synthesizedValue = [[NSBundle bundleWithIdentifier:kPluginBundleId] objectForInfoDictionaryKey:@"CFBundleVersion"];
[synthesizedInfo setObject:synthesizedValue forKey:@"BundleVersion"];

Expand Down
2 changes: 1 addition & 1 deletion ProvisionQL/Resources/template.html
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ <h2>File info</h2>
__FileInfo__<br />
</div>
<div class="footer">
<p>ProvisionQL v__BundleVersion____DEBUG__ (<a href="https://github.com/ealeksandrov/ProvisionQL">Fork on GitHub</a>)</p>
<p>ProvisionQL v__BundleShortVersionString__ (__BundleVersion__) __DEBUG__ (<a href="https://github.com/ealeksandrov/ProvisionQL">Fork on GitHub</a>)</p>
</div>
</body>
</html>
12 changes: 12 additions & 0 deletions ProvisionQL/Scripts/autoupdate-revision.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/sh
# autoupdate-revision.sh

git=`sh /etc/profile; which git`
branch=`${git} rev-parse --abbrev-ref HEAD`
commits_count=`${git} rev-list ${branch} | wc -l | tr -d ' '`

filepath="${BUILT_PRODUCTS_DIR}/${INFOPLIST_PATH}"

echo "Updating ${filepath}"
echo "Current version build ${commits_count}"
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion ${commits_count}" "${filepath}"
4 changes: 2 additions & 2 deletions ProvisionQL/Supporting-files/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@
<key>CFBundleName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundleShortVersionString</key>
<string>1</string>
<string>$(MARKETING_VERSION)</string>
<key>CFBundleVersion</key>
<string>1.6.0</string>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>CFPlugInDynamicRegisterFunction</key>
<string></string>
<key>CFPlugInDynamicRegistration</key>
Expand Down