From 7f9c9a7df648beb4f57d3f9266226b2057509379 Mon Sep 17 00:00:00 2001 From: Tobias Hagemann Date: Wed, 8 Oct 2025 09:57:10 +0200 Subject: [PATCH] Reinstate original macOS icon shape in macOS 26 Tahoe (#3990) Co-authored-by: Sebastian Stenzel --- .github/workflows/mac-dmg-x64.yml | 14 + .github/workflows/mac-dmg.yml | 14 + dist/mac/.gitignore | 1 + .../CryptomatorDockTilePlugin.swift | 19 ++ .../DockTilePlugin.xcodeproj/project.pbxproj | 314 ++++++++++++++++++ .../contents.xcworkspacedata | 7 + .../xcschemes/DockTilePlugin.xcscheme | 67 ++++ dist/mac/dmg/build.sh | 13 + dist/mac/resources/Info.plist | 3 + 9 files changed, 452 insertions(+) create mode 100644 dist/mac/DockTilePlugin/CryptomatorDockTilePlugin.swift create mode 100644 dist/mac/DockTilePlugin/DockTilePlugin.xcodeproj/project.pbxproj create mode 100644 dist/mac/DockTilePlugin/DockTilePlugin.xcodeproj/project.xcworkspace/contents.xcworkspacedata create mode 100644 dist/mac/DockTilePlugin/DockTilePlugin.xcodeproj/xcshareddata/xcschemes/DockTilePlugin.xcscheme diff --git a/.github/workflows/mac-dmg-x64.yml b/.github/workflows/mac-dmg-x64.yml index 1fd251ac4..6b282583c 100644 --- a/.github/workflows/mac-dmg-x64.yml +++ b/.github/workflows/mac-dmg-x64.yml @@ -151,6 +151,20 @@ jobs: VERSION_NO: ${{ needs.get-version.outputs.semVerNum }} REVISION_NO: ${{ needs.get-version.outputs.revNum }} PROVISIONING_PROFILE_BASE64: ${{ secrets.MACOS_PROVISIONING_PROFILE_BASE64 }} + - name: Build and install DockTilePlugin + env: + DERIVED_DATA_PATH: dist/mac/DockTilePlugin/build + run: | + xcodebuild -project dist/mac/DockTilePlugin/DockTilePlugin.xcodeproj \ + -scheme DockTilePlugin \ + -configuration Release \ + -destination "platform=macOS,arch=x86_64" \ + -derivedDataPath ${DERIVED_DATA_PATH} \ + -quiet \ + clean build + mkdir -p Cryptomator.app/Contents/PlugIns + cp -R ${DERIVED_DATA_PATH}/Build/Products/Release/Cryptomator.docktileplugin Cryptomator.app/Contents/PlugIns/ + rm -rf ${DERIVED_DATA_PATH} - name: Generate license for dmg run: > mvn -B -Djavafx.platform=mac license:add-third-party diff --git a/.github/workflows/mac-dmg.yml b/.github/workflows/mac-dmg.yml index 953780ae6..1ed1c4b3e 100644 --- a/.github/workflows/mac-dmg.yml +++ b/.github/workflows/mac-dmg.yml @@ -150,6 +150,20 @@ jobs: VERSION_NO: ${{ needs.get-version.outputs.semVerNum }} REVISION_NO: ${{ needs.get-version.outputs.revNum }} PROVISIONING_PROFILE_BASE64: ${{ secrets.MACOS_PROVISIONING_PROFILE_BASE64 }} + - name: Build and install DockTilePlugin + env: + DERIVED_DATA_PATH: dist/mac/DockTilePlugin/build + run: | + xcodebuild -project dist/mac/DockTilePlugin/DockTilePlugin.xcodeproj \ + -scheme DockTilePlugin \ + -configuration Release \ + -destination "platform=macOS,arch=arm64" \ + -derivedDataPath ${DERIVED_DATA_PATH} \ + -quiet \ + clean build + mkdir -p Cryptomator.app/Contents/PlugIns + cp -R ${DERIVED_DATA_PATH}/Build/Products/Release/Cryptomator.docktileplugin Cryptomator.app/Contents/PlugIns/ + rm -rf ${DERIVED_DATA_PATH} - name: Generate license for dmg run: > mvn -B -Djavafx.platform=mac license:add-third-party diff --git a/dist/mac/.gitignore b/dist/mac/.gitignore index bd6569978..81a0afdc2 100644 --- a/dist/mac/.gitignore +++ b/dist/mac/.gitignore @@ -1 +1,2 @@ embedded.provisionprofile +xcuserdata/ diff --git a/dist/mac/DockTilePlugin/CryptomatorDockTilePlugin.swift b/dist/mac/DockTilePlugin/CryptomatorDockTilePlugin.swift new file mode 100644 index 000000000..1b54ea17d --- /dev/null +++ b/dist/mac/DockTilePlugin/CryptomatorDockTilePlugin.swift @@ -0,0 +1,19 @@ +// +// CryptomatorDockTilePlugin.swift +// Integrations +// +// Created by Tobias Hagemann on 22.09.25. +// Copyright © 2025 Cryptomator. All rights reserved. +// + +import AppKit + +class CryptomatorDockTilePlugin: NSObject, NSDockTilePlugIn { + func setDockTile(_ dockTile: NSDockTile?) { + guard let dockTile = dockTile, let image = Bundle(for: Self.self).image(forResource: "Cryptomator") else { + return + } + dockTile.contentView = NSImageView(image: image) + dockTile.display() + } +} diff --git a/dist/mac/DockTilePlugin/DockTilePlugin.xcodeproj/project.pbxproj b/dist/mac/DockTilePlugin/DockTilePlugin.xcodeproj/project.pbxproj new file mode 100644 index 000000000..fa7ec5b77 --- /dev/null +++ b/dist/mac/DockTilePlugin/DockTilePlugin.xcodeproj/project.pbxproj @@ -0,0 +1,314 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 77; + objects = { + +/* Begin PBXBuildFile section */ + 74E08DE12E8584DE007E665C /* CryptomatorDockTilePlugin.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74E08DE02E85847E007E665C /* CryptomatorDockTilePlugin.swift */; }; + 74E08DED2E858532007E665C /* Cryptomator.icns in Resources */ = {isa = PBXBuildFile; fileRef = 74E08DEC2E858532007E665C /* Cryptomator.icns */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 74E08DD92E858467007E665C /* Cryptomator.docktileplugin */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = Cryptomator.docktileplugin; sourceTree = BUILT_PRODUCTS_DIR; }; + 74E08DE02E85847E007E665C /* CryptomatorDockTilePlugin.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CryptomatorDockTilePlugin.swift; sourceTree = ""; }; + 74E08DEC2E858532007E665C /* Cryptomator.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; name = Cryptomator.icns; path = ../resources/Cryptomator.icns; sourceTree = SOURCE_ROOT; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 74E08DD62E858467007E665C /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 74E08DD02E858467007E665C = { + isa = PBXGroup; + children = ( + 74E08DE02E85847E007E665C /* CryptomatorDockTilePlugin.swift */, + 74E08DEC2E858532007E665C /* Cryptomator.icns */, + 74E08DDA2E858467007E665C /* Products */, + ); + sourceTree = ""; + }; + 74E08DDA2E858467007E665C /* Products */ = { + isa = PBXGroup; + children = ( + 74E08DD92E858467007E665C /* Cryptomator.docktileplugin */, + ); + name = Products; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 74E08DD82E858467007E665C /* DockTilePlugin */ = { + isa = PBXNativeTarget; + buildConfigurationList = 74E08DDD2E858467007E665C /* Build configuration list for PBXNativeTarget "DockTilePlugin" */; + buildPhases = ( + 74E08DD52E858467007E665C /* Sources */, + 74E08DD62E858467007E665C /* Frameworks */, + 74E08DD72E858467007E665C /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = DockTilePlugin; + packageProductDependencies = ( + ); + productName = DockTilePlugin; + productReference = 74E08DD92E858467007E665C /* Cryptomator.docktileplugin */; + productType = "com.apple.product-type.bundle"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 74E08DD12E858467007E665C /* Project object */ = { + isa = PBXProject; + attributes = { + BuildIndependentTargetsInParallel = 1; + LastUpgradeCheck = 2600; + ORGANIZATIONNAME = Cryptomator; + TargetAttributes = { + 74E08DD82E858467007E665C = { + CreatedOnToolsVersion = 26.0.1; + }; + }; + }; + buildConfigurationList = 74E08DD42E858467007E665C /* Build configuration list for PBXProject "DockTilePlugin" */; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 74E08DD02E858467007E665C; + minimizedProjectReferenceProxies = 1; + preferredProjectObjectVersion = 77; + productRefGroup = 74E08DDA2E858467007E665C /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 74E08DD82E858467007E665C /* DockTilePlugin */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 74E08DD72E858467007E665C /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 74E08DED2E858532007E665C /* Cryptomator.icns in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 74E08DD52E858467007E665C /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 74E08DE12E8584DE007E665C /* CryptomatorDockTilePlugin.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 74E08DDB2E858467007E665C /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + 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; + DEBUG_INFORMATION_FORMAT = dwarf; + DEVELOPMENT_TEAM = YZQJQUHA3L; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + ENABLE_USER_SCRIPT_SANDBOXING = YES; + GCC_C_LANGUAGE_STANDARD = gnu17; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + 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; + LOCALIZATION_PREFERS_STRING_CATALOGS = YES; + MACOSX_DEPLOYMENT_TARGET = 11.5; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = macosx; + SWIFT_VERSION = 5.0; + }; + name = Debug; + }; + 74E08DDC2E858467007E665C /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + 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; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + DEVELOPMENT_TEAM = YZQJQUHA3L; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = YES; + GCC_C_LANGUAGE_STANDARD = gnu17; + 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; + LOCALIZATION_PREFERS_STRING_CATALOGS = YES; + MACOSX_DEPLOYMENT_TARGET = 11.5; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = macosx; + SWIFT_VERSION = 5.0; + }; + name = Release; + }; + 74E08DDE2E858467007E665C /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Manual; + COMBINE_HIDPI_IMAGES = YES; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = ""; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_KEY_NSHumanReadableCopyright = "Copyright © 2025 Cryptomator. All rights reserved."; + INFOPLIST_KEY_NSPrincipalClass = CryptomatorDockTilePlugin; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Bundles"; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = org.cryptomator.DockTilePlugin; + PRODUCT_NAME = Cryptomator; + PROVISIONING_PROFILE_SPECIFIER = ""; + SKIP_INSTALL = YES; + STRING_CATALOG_GENERATE_SYMBOLS = YES; + SWIFT_EMIT_LOC_STRINGS = YES; + WRAPPER_EXTENSION = docktileplugin; + }; + name = Debug; + }; + 74E08DDF2E858467007E665C /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Manual; + COMBINE_HIDPI_IMAGES = YES; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = ""; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_KEY_NSHumanReadableCopyright = "Copyright © 2025 Cryptomator. All rights reserved."; + INFOPLIST_KEY_NSPrincipalClass = CryptomatorDockTilePlugin; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Bundles"; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = org.cryptomator.DockTilePlugin; + PRODUCT_NAME = Cryptomator; + PROVISIONING_PROFILE_SPECIFIER = ""; + SKIP_INSTALL = YES; + STRING_CATALOG_GENERATE_SYMBOLS = YES; + SWIFT_EMIT_LOC_STRINGS = YES; + WRAPPER_EXTENSION = docktileplugin; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 74E08DD42E858467007E665C /* Build configuration list for PBXProject "DockTilePlugin" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 74E08DDB2E858467007E665C /* Debug */, + 74E08DDC2E858467007E665C /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 74E08DDD2E858467007E665C /* Build configuration list for PBXNativeTarget "DockTilePlugin" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 74E08DDE2E858467007E665C /* Debug */, + 74E08DDF2E858467007E665C /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 74E08DD12E858467007E665C /* Project object */; +} diff --git a/dist/mac/DockTilePlugin/DockTilePlugin.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/dist/mac/DockTilePlugin/DockTilePlugin.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 000000000..919434a62 --- /dev/null +++ b/dist/mac/DockTilePlugin/DockTilePlugin.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/dist/mac/DockTilePlugin/DockTilePlugin.xcodeproj/xcshareddata/xcschemes/DockTilePlugin.xcscheme b/dist/mac/DockTilePlugin/DockTilePlugin.xcodeproj/xcshareddata/xcschemes/DockTilePlugin.xcscheme new file mode 100644 index 000000000..7d86bdcc5 --- /dev/null +++ b/dist/mac/DockTilePlugin/DockTilePlugin.xcodeproj/xcshareddata/xcschemes/DockTilePlugin.xcscheme @@ -0,0 +1,67 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dist/mac/dmg/build.sh b/dist/mac/dmg/build.sh index bf63505a5..93dadd7f5 100755 --- a/dist/mac/dmg/build.sh +++ b/dist/mac/dmg/build.sh @@ -133,6 +133,19 @@ sed -i '' "s|###BUNDLE_SHORT_VERSION_STRING###|${VERSION_NO}|g" ${APP_NAME}.app/ sed -i '' "s|###BUNDLE_VERSION###|${REVISION_NO}|g" ${APP_NAME}.app/Contents/Info.plist cp ../embedded.provisionprofile ${APP_NAME}.app/Contents/ +# build and install dock tile plugin +echo "Building and installing Cryptomator.docktileplugin..." +DERIVED_DATA_PATH=../DockTilePlugin/build +xcodebuild -project ../DockTilePlugin/DockTilePlugin.xcodeproj \ + -scheme DockTilePlugin \ + -configuration Release \ + -derivedDataPath ${DERIVED_DATA_PATH} \ + -quiet \ + clean build +mkdir -p ${APP_NAME}.app/Contents/PlugIns +cp -R ${DERIVED_DATA_PATH}/Build/Products/Release/Cryptomator.docktileplugin ${APP_NAME}.app/Contents/PlugIns/ +rm -rf ${DERIVED_DATA_PATH} + # generate license mvn -B -Djavafx.platform=mac -f../../../pom.xml license:add-third-party \ -Dlicense.thirdPartyFilename=license.rtf \ diff --git a/dist/mac/resources/Info.plist b/dist/mac/resources/Info.plist index 21641c708..d59c3fe73 100644 --- a/dist/mac/resources/Info.plist +++ b/dist/mac/resources/Info.plist @@ -116,5 +116,8 @@ NSSupportsAutomaticGraphicsSwitching + + NSDockTilePlugIn + Cryptomator.docktileplugin