From 3556e4abc9724d648543db17e0f8e555d27ea368 Mon Sep 17 00:00:00 2001 From: Craig Raw Date: Wed, 5 Aug 2020 09:12:06 +0200 Subject: [PATCH] configure file logging --- build.gradle | 5 ++- src/main/deploy/package/macosx/Info.plist | 39 +++++++++++++++++++ .../package/macosx/Sparrow.entitlements | 2 + src/main/resources/logback.xml | 10 ++++- 4 files changed, 53 insertions(+), 3 deletions(-) create mode 100644 src/main/deploy/package/macosx/Info.plist diff --git a/build.gradle b/build.gradle index 04747959..45fd6772 100644 --- a/build.gradle +++ b/build.gradle @@ -110,7 +110,8 @@ jlink { "--add-opens=javafx.graphics/com.sun.glass.ui=com.sparrowwallet.merged.module", "--add-opens=javafx.controls/com.sun.javafx.scene.control=com.sparrowwallet.merged.module", "--add-opens=javafx.graphics/com.sun.javafx.menu=com.sparrowwallet.merged.module", - "--add-opens=javafx.graphics/com.sun.glass.ui.mac=com.sparrowwallet.merged.module"] + "--add-opens=javafx.graphics/com.sun.glass.ui.mac=com.sparrowwallet.merged.module", + "--add-reads=com.sparrowwallet.merged.module=java.desktop"] } addExtraDependencies("javafx") jpackage { @@ -127,7 +128,7 @@ jlink { } if (org.gradle.internal.os.OperatingSystem.current().macOsX) { installerOptions += ['--mac-sign', '--mac-signing-key-user-name', 'Craig Raw (UPLVMSK9D7)'] - imageOptions += ['--icon', 'src/main/deploy/package/macosx/sparrow.icns'] + imageOptions += ['--icon', 'src/main/deploy/package/macosx/sparrow.icns', '--resource-dir', 'src/main/deploy/package/macosx/'] installerType = "dmg" } } diff --git a/src/main/deploy/package/macosx/Info.plist b/src/main/deploy/package/macosx/Info.plist new file mode 100644 index 00000000..74ed4dfd --- /dev/null +++ b/src/main/deploy/package/macosx/Info.plist @@ -0,0 +1,39 @@ + + + + + LSMinimumSystemVersion + 10.9 + CFBundleDevelopmentRegion + English + CFBundleAllowMixedLocalizations + + CFBundleExecutable + Sparrow + CFBundleIconFile + Sparrow.icns + CFBundleIdentifier + com.sparrowwallet.sparrow + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + Sparrow + CFBundlePackageType + APPL + CFBundleShortVersionString + 0.6 + CFBundleSignature + ???? + + LSApplicationCategoryType + Unknown + CFBundleVersion + 100 + NSHumanReadableCopyright + Copyright (C) 2020 + NSHighResolutionCapable + true + NSCameraUsageDescription + Sparrow requires access to the camera in order to scan QR codes + + \ No newline at end of file diff --git a/src/main/deploy/package/macosx/Sparrow.entitlements b/src/main/deploy/package/macosx/Sparrow.entitlements index b5f24c57..12d6f154 100644 --- a/src/main/deploy/package/macosx/Sparrow.entitlements +++ b/src/main/deploy/package/macosx/Sparrow.entitlements @@ -12,5 +12,7 @@ com.apple.security.cs.allow-dyld-environment-variables + com.apple.security.device.camera + \ No newline at end of file diff --git a/src/main/resources/logback.xml b/src/main/resources/logback.xml index 398bc3d4..bf3bf87f 100644 --- a/src/main/resources/logback.xml +++ b/src/main/resources/logback.xml @@ -1,13 +1,21 @@ + + ${user.home}/.sparrow/sparrow.log + + %date %level [%thread] %logger{10} [%file:%line] %msg%n + + + %date %level %msg%n - + + \ No newline at end of file