add app icon and pkg release script
This commit is contained in:
parent
122eb7f442
commit
5bc1550556
@ -6,8 +6,13 @@
|
||||
objectVersion = 77;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
27AA96F12FE6385E00239646 /* appicon.icon in Resources */ = {isa = PBXBuildFile; fileRef = 27AA96F02FE6385E00239646 /* appicon.icon */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
2711C3652FE221B200EAB169 /* Valentine.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Valentine.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
27AA96F02FE6385E00239646 /* appicon.icon */ = {isa = PBXFileReference; lastKnownFileType = folder.iconcomposer.icon; path = appicon.icon; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFileSystemSynchronizedRootGroup section */
|
||||
@ -32,6 +37,7 @@
|
||||
2711C35C2FE221B200EAB169 = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
27AA96F02FE6385E00239646 /* appicon.icon */,
|
||||
2711C3672FE221B200EAB169 /* Valentine */,
|
||||
2711C3662FE221B200EAB169 /* Products */,
|
||||
);
|
||||
@ -114,6 +120,7 @@
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
27AA96F12FE6385E00239646 /* appicon.icon in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@ -255,8 +262,9 @@
|
||||
2711C3712FE221B300EAB169 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = appicon;
|
||||
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
|
||||
ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = YES;
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
CURRENT_PROJECT_VERSION = 001;
|
||||
@ -277,6 +285,7 @@
|
||||
ENABLE_RESOURCE_ACCESS_USB = NO;
|
||||
ENABLE_USER_SELECTED_FILES = readwrite;
|
||||
GENERATE_INFOPLIST_FILE = YES;
|
||||
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.music";
|
||||
INFOPLIST_KEY_NSHumanReadableCopyright = "";
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
@ -298,8 +307,9 @@
|
||||
2711C3722FE221B300EAB169 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = appicon;
|
||||
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
|
||||
ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = YES;
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
CURRENT_PROJECT_VERSION = 001;
|
||||
@ -320,6 +330,7 @@
|
||||
ENABLE_RESOURCE_ACCESS_USB = NO;
|
||||
ENABLE_USER_SELECTED_FILES = readwrite;
|
||||
GENERATE_INFOPLIST_FILE = YES;
|
||||
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.music";
|
||||
INFOPLIST_KEY_NSHumanReadableCopyright = "";
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
|
||||
@ -10,6 +10,7 @@ import UniformTypeIdentifiers
|
||||
|
||||
struct ContentView: View {
|
||||
@EnvironmentObject var engine: AudioEngine
|
||||
@Environment(\.colorScheme) var colorScheme
|
||||
@State private var isTargeted = false
|
||||
@State private var isPlaylistVisible = true
|
||||
@State private var wasWide = true
|
||||
@ -121,12 +122,31 @@ struct ContentView: View {
|
||||
|
||||
private var emptyStateView: some View {
|
||||
VStack(spacing: 24) {
|
||||
Image(systemName: "play.circle.fill")
|
||||
.resizable()
|
||||
.scaledToFit()
|
||||
.frame(width: 100, height: 100)
|
||||
.foregroundColor(.blue)
|
||||
.shadow(color: .blue.opacity(0.3), radius: 10, x: 0, y: 5)
|
||||
if let appIcon = NSImage(named: NSImage.applicationIconName) {
|
||||
Image(nsImage: appIcon)
|
||||
.resizable()
|
||||
.scaledToFit()
|
||||
.frame(width: 140, height: 140)
|
||||
.shadow(color: colorScheme == .dark ? .white.opacity(0.6) : .accentColor.opacity(0.4), radius: 25, x: 0, y: 0)
|
||||
.shadow(color: .black.opacity(0.2), radius: 10, x: 0, y: 5)
|
||||
.overlay(
|
||||
Image(nsImage: appIcon)
|
||||
.resizable()
|
||||
.scaledToFit()
|
||||
.frame(width: 140, height: 140)
|
||||
.scaleEffect(x: 1, y: -1)
|
||||
.mask(
|
||||
LinearGradient(
|
||||
gradient: Gradient(colors: [.clear, .white.opacity(0.3)]),
|
||||
startPoint: .bottom,
|
||||
endPoint: .top
|
||||
)
|
||||
)
|
||||
.opacity(0.5)
|
||||
.offset(y: 140)
|
||||
)
|
||||
.padding(.bottom, 60)
|
||||
}
|
||||
|
||||
Text("Valentine")
|
||||
.font(.system(size: 32, weight: .bold, design: .rounded))
|
||||
|
||||
BIN
appicon.icon/Assets/IMG_0959.PNG
Normal file
BIN
appicon.icon/Assets/IMG_0959.PNG
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 846 KiB |
41
appicon.icon/icon.json
Normal file
41
appicon.icon/icon.json
Normal file
@ -0,0 +1,41 @@
|
||||
{
|
||||
"fill" : {
|
||||
"automatic-gradient" : "extended-srgb:0.00000,0.53333,1.00000,1.00000"
|
||||
},
|
||||
"groups" : [
|
||||
{
|
||||
"layers" : [
|
||||
{
|
||||
"blend-mode" : "hard-light",
|
||||
"fill" : "automatic",
|
||||
"glass" : true,
|
||||
"hidden" : false,
|
||||
"image-name" : "IMG_0959.PNG",
|
||||
"name" : "IMG_0959",
|
||||
"opacity" : 1,
|
||||
"position" : {
|
||||
"scale" : 1.45,
|
||||
"translation-in-points" : [
|
||||
-1.1368683772161603e-13,
|
||||
15.211058160254424
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"shadow" : {
|
||||
"kind" : "neutral",
|
||||
"opacity" : 0.5
|
||||
},
|
||||
"translucency" : {
|
||||
"enabled" : true,
|
||||
"value" : 0.5
|
||||
}
|
||||
}
|
||||
],
|
||||
"supported-platforms" : {
|
||||
"circles" : [
|
||||
"watchOS"
|
||||
],
|
||||
"squares" : "shared"
|
||||
}
|
||||
}
|
||||
52
create-pkg-release.sh
Executable file
52
create-pkg-release.sh
Executable file
@ -0,0 +1,52 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Script to create a PKG installer for Valentine
|
||||
|
||||
# Arguments
|
||||
INPUT_APP="$1"
|
||||
OUTPUT_PKG="$2"
|
||||
|
||||
# Validate arguments
|
||||
if [ -z "$INPUT_APP" ] || [ -z "$OUTPUT_PKG" ]; then
|
||||
echo "Usage: ./create-pkg-release.sh <path-to-app> <path-to-output-pkg>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -d "$INPUT_APP" ]; then
|
||||
echo "Error: Input app directory not found at '$INPUT_APP'"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Ensure required files exist
|
||||
if [ ! -f "distribution.xml" ]; then
|
||||
echo "Error: distribution.xml not found in the current directory."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -f "LICENSE" ]; then
|
||||
echo "Error: LICENSE not found in the current directory."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Creating PKG from $INPUT_APP to $OUTPUT_PKG..."
|
||||
|
||||
# Create a temporary directory to hold build artifacts
|
||||
TMP_DIR="build_pkg_tmp"
|
||||
mkdir -p "$TMP_DIR/Resources/en.lproj"
|
||||
|
||||
# Copy the license to the English localization folder
|
||||
cp LICENSE "$TMP_DIR/Resources/en.lproj/License.txt"
|
||||
|
||||
# 1. Create the component package inside the temporary directory
|
||||
echo "Building component package..."
|
||||
pkgbuild --component "$INPUT_APP" --install-location "/Applications" "$TMP_DIR/Valentine-component.pkg"
|
||||
|
||||
# 2. Build the final interactive package using the modified distribution.xml
|
||||
echo "Building final interactive package..."
|
||||
productbuild --distribution distribution.xml --resources "$TMP_DIR/Resources" --package-path "$TMP_DIR" "$OUTPUT_PKG"
|
||||
|
||||
# 3. Cleanup temporary artifacts
|
||||
echo "Cleaning up..."
|
||||
rm -rf "$TMP_DIR"
|
||||
|
||||
echo "Done! Installer created at: $OUTPUT_PKG"
|
||||
17
distribution.xml
Normal file
17
distribution.xml
Normal file
@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<installer-gui-script minSpecVersion="1">
|
||||
<title>Valentine Installer</title>
|
||||
<license file="License.txt"/>
|
||||
<pkg-ref id="dev.jesuschapman.Valentine"/>
|
||||
<options customize="never" require-scripts="false" hostArchitectures="arm64"/>
|
||||
<choices-outline>
|
||||
<line choice="default">
|
||||
<line choice="dev.jesuschapman.Valentine"/>
|
||||
</line>
|
||||
</choices-outline>
|
||||
<choice id="default"/>
|
||||
<choice id="dev.jesuschapman.Valentine" visible="false">
|
||||
<pkg-ref id="dev.jesuschapman.Valentine"/>
|
||||
</choice>
|
||||
<pkg-ref id="dev.jesuschapman.Valentine" version="1.0 - 001" onConclusion="none">Valentine-component.pkg</pkg-ref>
|
||||
</installer-gui-script>
|
||||
Loading…
Reference in New Issue
Block a user