final fixes and create-dmg script

This commit is contained in:
Ethan Pippin 2022-08-04 11:04:39 -06:00
parent a39c8a2c2c
commit 7b21d1bc37
10 changed files with 45 additions and 26 deletions

View File

@ -1,2 +1,3 @@
For jellyfin-server-macos:
* Anthony Lavado ([@anthonylavad](https://github.com/anthonylavado))
* Ethan Pippin ([@LePips](https://github.com/LePips))

8
Jellyfin Server.xcodeproj/project.pbxproj Executable file → Normal file
View File

@ -340,7 +340,7 @@
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
DEVELOPMENT_TEAM = "";
DEVELOPMENT_TEAM = TY84JMYEFE;
ENABLE_HARDENED_RUNTIME = YES;
INFOPLIST_FILE = "Jellyfin Server/Info.plist";
LD_RUNPATH_SEARCH_PATHS = (
@ -348,7 +348,7 @@
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 10.14;
MARKETING_VERSION = 10.5.5;
MARKETING_VERSION = 1.2.3;
PRODUCT_BUNDLE_IDENTIFIER = Jellyfin.Server;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
@ -364,7 +364,7 @@
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
DEVELOPMENT_TEAM = "";
DEVELOPMENT_TEAM = TY84JMYEFE;
ENABLE_HARDENED_RUNTIME = YES;
INFOPLIST_FILE = "Jellyfin Server/Info.plist";
LD_RUNPATH_SEARCH_PATHS = (
@ -372,7 +372,7 @@
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 10.14;
MARKETING_VERSION = 10.5.5;
MARKETING_VERSION = 1.2.3;
PRODUCT_BUNDLE_IDENTIFIER = Jellyfin.Server;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";

View File

@ -1,9 +1,9 @@
//
// AlertWindow.swift
// Jellyfin Server
// Swiftfin is subject to the terms of the Mozilla Public
// License, v2.0. If a copy of the MPL was not distributed with this
// file, you can obtain one at https://mozilla.org/MPL/2.0/.
//
// Created by Ethan Pippin on 8/3/22.
// Copyright © 2022 Jellyfin. All rights reserved.
// Copyright (c) 2022 Jellyfin & Jellyfin Contributors
//
import AppKit

View File

@ -8,7 +8,6 @@
import AppKit
import Cocoa
import LaunchAtLogin
@NSApplicationMain
class AppDelegate: NSObject, NSApplicationDelegate {
@ -21,7 +20,7 @@ class AppDelegate: NSObject, NSApplicationDelegate {
statusItem.button?.image = NSImage(named: "StatusBarButtonImage")
createAppFolder()
startJellyfinTask()
// startJellyfinTask()
createStatusBarMenu()
}

View File

@ -17,9 +17,9 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>$(MARKETING_VERSION)</string>
<string>2.3.4</string>
<key>CFBundleVersion</key>
<string>1</string>
<string>2.3.4</string>
<key>LSApplicationCategoryType</key>
<string>public.app-category.entertainment</string>
<key>LSMinimumSystemVersion</key>
@ -27,7 +27,7 @@
<key>LSUIElement</key>
<true/>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 2022 Jellyfin Contributors. All rights reserved.</string>
<string>Copyright © 2022 Jellyfin Contributors</string>
<key>NSMainStoryboardFile</key>
<string>Main</string>
<key>NSPrincipalClass</key>

View File

@ -48,6 +48,9 @@
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
<font key="font" metaFont="system"/>
</buttonCell>
<connections>
<binding destination="bU7-R8-ocO" name="value" keyPath="launchAtLogin.isEnabled" id="HbU-1F-ccK"/>
</connections>
</button>
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="gxh-eI-cDG">
<rect key="frame" x="108" y="111" width="134" height="32"/>
@ -114,7 +117,8 @@
</constraints>
</view>
<connections>
<outlet property="launchAtLoginToggle" destination="iV1-fg-N8A" id="LnK-p3-p5s"/>
<outlet property="copyrightLabel" destination="a23-zM-ylI" id="trm-Z4-WYg"/>
<outlet property="versionLabel" destination="qEc-pa-mey" id="Rya-Fg-5pP"/>
</connections>
</viewController>
<customObject id="9uD-mB-xHs" userLabel="First Responder" customClass="NSResponder" sceneMemberID="firstResponder"/>

View File

@ -7,13 +7,24 @@
//
import AppKit
import LaunchAtLogin
class PreferencesViewController: NSViewController {
@IBOutlet weak var launchAtLoginToggle: NSButton!
@IBOutlet weak var versionLabel: NSTextField!
@objc dynamic var launchAtLogin = LaunchAtLogin.kvo
@IBOutlet weak var copyrightLabel: NSTextField!
override func viewDidLoad() {
super.viewDidLoad()
let appVersion = Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String
versionLabel.stringValue = "Version \(appVersion ?? "0.0.1")"
let copyright = Bundle.main.infoDictionary?["NSHumanReadableCopyright"] as? String
copyrightLabel.stringValue = copyright ?? ""
}
@IBAction func launchWebUISelected(_ sender: Any) {

Binary file not shown.

15
deployment/create-dmg.sh Executable file
View File

@ -0,0 +1,15 @@
if [[ $# -ne 1 ]] ; then
echo 'Error: version required'
echo 'deploy.sh <version>'
exit 1
fi
VERSION=$1
cd ..
xcrun agvtool new-version -all $VERSION
cd deployment
create-dmg 'Jellyfin Server.app' --dmg-title="Jellyfin Server-$VERSION"

View File

@ -1,11 +0,0 @@
{
"title": "Jellyfin Server",
"icon": "AppIcon.icns",
"icon-size": 80,
"window": {
"size": { "width": 240, "height": 160 }
},
"contents": [
{ "x": 160, "y": 90, "type": "file", "path": "Jellyfin.app" }
]
}