Skip to content

Commit

Permalink
chore: minor adjustments (#85)
Browse files Browse the repository at this point in the history
  • Loading branch information
castdrian authored Aug 8, 2024
2 parents 9296bb2 + 26781d3 commit 81bb261
Show file tree
Hide file tree
Showing 8 changed files with 159 additions and 9 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ jobs:
to: HEAD

- name: Build macOS app
run: xcodebuild archive -scheme "ishare" -configuration "Release" -archivePath "build/ishare.xcarchive" -destination "generic/platform=macOS,name=Any Mac" CODE_SIGN_IDENTITY="" CODE_SIGNING_ALLOWED=NO "OTHER_SWIFT_FLAGS=${inherited} -D NOT_APP_STORE" | xcbeautify
run: xcodebuild archive -scheme "GitHub" -configuration "GitHub" -archivePath "build/ishare.xcarchive" -destination "generic/platform=macOS,name=Any Mac" CODE_SIGN_IDENTITY="" CODE_SIGNING_ALLOWED=NO "OTHER_SWIFT_FLAGS=${inherited} -D GITHUB_RELEASE" | xcbeautify

- name: Sign, Package and Notarize .app
run: |
Expand All @@ -83,7 +83,8 @@ jobs:
codesign -s "Developer ID Application" -f --timestamp -o runtime --deep "ishare.app"
npm install --global create-dmg
create-dmg "ishare.app" --overwrite
DMG_FILE=$(ls *.dmg)
mv *.dmg ishare.dmg
DMG_FILE="ishare.dmg"
echo "DMG_FILE=$DMG_FILE" >> $GITHUB_ENV
xcrun notarytool submit "$DMG_FILE" --wait --apple-id "${{ secrets.NOTARIZATION_USERNAME }}" --password "${{ secrets.NOTARIZATION_PASSWORD }}" --team-id "L988J7YMK5"
xcrun stapler staple "$DMG_FILE"
Expand Down Expand Up @@ -154,11 +155,13 @@ jobs:

- name: Setup Pages
uses: actions/configure-pages@v3

- name: Build with Jekyll
uses: actions/jekyll-build-pages@v1
with:
source: ./
destination: ./_site

- name: Upload artifact
uses: actions/upload-pages-artifact@v2

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
</a>
</p>
<p align="center">
<a href="https://github.com/castdrian/ishare/releases/latest/download/ishare_macOS.zip" download>
<a href="https://github.com/castdrian/ishare/releases/latest/download/ishare.dmg" download>
<img src="https://i.imgur.com/EthZVfR.png" alt="Download Latest Release" width="200">
</a>
</p>
Expand Down
137 changes: 136 additions & 1 deletion ishare.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
3AE7312A2B47052E006F10F7 /* UploadManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AE731292B47052E006F10F7 /* UploadManager.swift */; };
3AEFA5672A9FC15800F485B4 /* PreviewImage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AEFA5662A9FC15800F485B4 /* PreviewImage.swift */; };
3AF7F0212B3EF16B000117DD /* HistoryGridView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AF7F0202B3EF16B000117DD /* HistoryGridView.swift */; };
3AF917C82C4AFE4700D42B77 /* Sparkle in Frameworks */ = {isa = PBXBuildFile; productRef = 3AF917C72C4AFE4700D42B77 /* Sparkle */; };
3AF917C82C4AFE4700D42B77 /* Sparkle in Frameworks */ = {isa = PBXBuildFile; productRef = 3AF917C72C4AFE4700D42B77 /* Sparkle */; settings = {ATTRIBUTES = (Weak, ); }; };
3AF9A80F2C4B011A0094B78B /* sharemenuext.appex in Embed Foundation Extensions */ = {isa = PBXBuildFile; fileRef = 3AF9A8052C4B011A0094B78B /* sharemenuext.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
/* End PBXBuildFile section */

Expand Down Expand Up @@ -591,6 +591,7 @@
ENABLE_PREVIEWS = YES;
ENABLE_TESTABILITY = NO;
ENABLE_TESTING_SEARCH_PATHS = NO;
"EXCLUDED_SOURCE_FILE_NAMES[arch=*]" = Sparkle.framework;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = ishare/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = ishare;
Expand All @@ -613,6 +614,137 @@
};
name = Release;
};
3ACECAB02C4E673A00ECA151 /* GitHub */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 3AA26D002A7FCBA70004C256 /* Config.xcconfig */;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ASSETCATALOG_COMPILER_APPICON_NAME = "";
"ASSETCATALOG_COMPILER_APPICON_NAME[sdk=*]" = AppIcon;
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = YES;
ASSETCATALOG_NOTICES = NO;
ASSETCATALOG_WARNINGS = NO;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
DEAD_CODE_STRIPPING = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
ENABLE_USER_SCRIPT_SANDBOXING = YES;
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 13.3;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
SDKROOT = macosx;
SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_OPTIMIZATION_LEVEL = "-O";
};
name = GitHub;
};
3ACECAB12C4E673A00ECA151 /* GitHub */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_ENTITLEMENTS = ishare/ishare.entitlements;
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = "${BUILD_NUMBER}";
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_ASSET_PATHS = "";
DEVELOPMENT_TEAM = L988J7YMK5;
ENABLE_HARDENED_RUNTIME = YES;
ENABLE_PREVIEWS = YES;
ENABLE_TESTABILITY = NO;
ENABLE_TESTING_SEARCH_PATHS = NO;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = ishare/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = ishare;
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.utilities";
INFOPLIST_KEY_LSSupportsOpeningDocumentsInPlace = YES;
INFOPLIST_KEY_LSUIElement = YES;
INFOPLIST_KEY_NSHumanReadableCopyright = "";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 15.0;
MARKETING_VERSION = "${VERSION}";
PRODUCT_BUNDLE_IDENTIFIER = dev.adrian.ishare;
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = macosx;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "";
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_VERSION = 5.0;
};
name = GitHub;
};
3ACECAB22C4E673A00ECA151 /* GitHub */ = {
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_ENTITLEMENTS = sharemenuext/sharemenuext.entitlements;
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = "$(BUILD_NUMBER)";
DEVELOPMENT_TEAM = L988J7YMK5;
ENABLE_HARDENED_RUNTIME = YES;
GCC_C_LANGUAGE_STANDARD = gnu17;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = sharemenuext/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = ishare;
INFOPLIST_KEY_NSHumanReadableCopyright = "";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/../Frameworks",
"@executable_path/../../../../Frameworks",
);
LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
MACOSX_DEPLOYMENT_TARGET = 15.0;
MARKETING_VERSION = "$(VERSION)";
PRODUCT_BUNDLE_IDENTIFIER = dev.adrian.ishare.sharemenuext;
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_VERSION = 5.0;
};
name = GitHub;
};
3AF9A8102C4B011A0094B78B /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
Expand Down Expand Up @@ -682,6 +814,7 @@
buildConfigurations = (
3A9A9FF72A5C84B5007BA5C9 /* Debug */,
3A9A9FF82A5C84B5007BA5C9 /* Release */,
3ACECAB02C4E673A00ECA151 /* GitHub */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
Expand All @@ -691,6 +824,7 @@
buildConfigurations = (
3A9A9FFA2A5C84B5007BA5C9 /* Debug */,
3A9A9FFB2A5C84B5007BA5C9 /* Release */,
3ACECAB12C4E673A00ECA151 /* GitHub */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
Expand All @@ -700,6 +834,7 @@
buildConfigurations = (
3AF9A8102C4B011A0094B78B /* Debug */,
3AF9A8112C4B011A0094B78B /* Release */,
3ACECAB22C4E673A00ECA151 /* GitHub */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@
<dict>
<key>SchemeUserState</key>
<dict>
<key>GitHub.xcscheme</key>
<dict>
<key>orderHint</key>
<integer>1</integer>
</dict>
<key>Playground (Playground) 1.xcscheme</key>
<dict>
<key>isShown</key>
Expand Down Expand Up @@ -33,7 +38,7 @@
<key>sharemenuext.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>3</integer>
<integer>2</integer>
</dict>
</dict>
<key>SuppressBuildableAutocreation</key>
Expand Down
4 changes: 2 additions & 2 deletions ishare/App.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import Defaults
import MenuBarExtraAccess
import SwiftUI

#if NOT_APP_STORE
#if GITHUB_RELEASE
import Sparkle
#endif

Expand Down Expand Up @@ -38,7 +38,7 @@ struct ishare: App {
}
}

#if NOT_APP_STORE
#if GITHUB_RELEASE
class AppDelegate: NSObject, NSApplicationDelegate, SPUUpdaterDelegate {
private(set) static var shared: AppDelegate! = nil
var recordGif = false
Expand Down
2 changes: 2 additions & 0 deletions ishare/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@
<string>https://isharemac.app/appcast.xml</string>
<key>SUPublicEDKey</key>
<string>iehPcJsCkc5hgiz6Ehb3X4USID60fQbIAFLNfWhA+44=</string>
<key> SUEnableInstallerLauncherService</key>
<true/>
<key>UTExportedTypeDeclarations</key>
<array>
<dict>
Expand Down
4 changes: 2 additions & 2 deletions ishare/Views/MainMenuView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import ScreenCaptureKit
import SettingsAccess
import SwiftUI
import UniformTypeIdentifiers
#if NOT_APP_STORE
#if GITHUB_RELEASE
import Sparkle
#endif

Expand Down Expand Up @@ -294,7 +294,7 @@ struct MainMenuView: View {
}
.keyboardShortcut("a")

#if NOT_APP_STORE
#if GITHUB_RELEASE
Button {
NSWorkspace.shared.open(URL(string: "https://github.com/sponsors/castdrian")!)
} label: {
Expand Down
5 changes: 5 additions & 0 deletions ishare/ishare.entitlements
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@
<dict>
<key>com.apple.developer.icloud-container-identifiers</key>
<array/>
<key>com.apple.security.temporary-exception.mach-lookup.global-name</key>
<array>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)-spks</string>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)-spki</string>
</array>
<key>com.apple.developer.ubiquity-kvstore-identifier</key>
<string>$(TeamIdentifierPrefix)$(CFBundleIdentifier)</string>
<key>com.apple.security.app-sandbox</key>
Expand Down

0 comments on commit 81bb261

Please sign in to comment.