Skip to content

Commit 3466a9e

Browse files
committed
1.0.3b
1 parent 6bfb6ea commit 3466a9e

3 files changed

Lines changed: 48 additions & 26 deletions

File tree

xcf.xcodeproj/project.pbxproj

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -260,11 +260,11 @@
260260
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
261261
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
262262
CODE_SIGN_ENTITLEMENTS = xcf/xcf.entitlements;
263-
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "-";
263+
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development";
264264
CODE_SIGN_STYLE = Automatic;
265265
COMBINE_HIDPI_IMAGES = YES;
266-
CURRENT_PROJECT_VERSION = 3;
267-
DEVELOPMENT_TEAM = "";
266+
CURRENT_PROJECT_VERSION = 4;
267+
DEVELOPMENT_TEAM = 469UCUB275;
268268
ENABLE_HARDENED_RUNTIME = YES;
269269
GENERATE_INFOPLIST_FILE = YES;
270270
INFOPLIST_KEY_LSUIElement = YES;
@@ -276,8 +276,8 @@
276276
"@executable_path/../Frameworks",
277277
);
278278
MACOSX_DEPLOYMENT_TARGET = 13.5;
279-
MARKETING_VERSION = 1.0.2;
280-
PRODUCT_BUNDLE_IDENTIFIER = com.xcodefreeze.xcf;
279+
MARKETING_VERSION = 1.0.3;
280+
PRODUCT_BUNDLE_IDENTIFIER = com.toddbruss.xcf;
281281
PRODUCT_NAME = "$(TARGET_NAME)";
282282
REGISTER_APP_GROUPS = YES;
283283
SWIFT_EMIT_LOC_STRINGS = YES;
@@ -291,11 +291,11 @@
291291
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
292292
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
293293
CODE_SIGN_ENTITLEMENTS = xcf/xcf.entitlements;
294-
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "-";
294+
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development";
295295
CODE_SIGN_STYLE = Automatic;
296296
COMBINE_HIDPI_IMAGES = YES;
297-
CURRENT_PROJECT_VERSION = 3;
298-
DEVELOPMENT_TEAM = "";
297+
CURRENT_PROJECT_VERSION = 4;
298+
DEVELOPMENT_TEAM = 469UCUB275;
299299
ENABLE_HARDENED_RUNTIME = YES;
300300
GENERATE_INFOPLIST_FILE = YES;
301301
INFOPLIST_KEY_LSUIElement = YES;
@@ -307,8 +307,8 @@
307307
"@executable_path/../Frameworks",
308308
);
309309
MACOSX_DEPLOYMENT_TARGET = 13.5;
310-
MARKETING_VERSION = 1.0.2;
311-
PRODUCT_BUNDLE_IDENTIFIER = com.xcodefreeze.xcf;
310+
MARKETING_VERSION = 1.0.3;
311+
PRODUCT_BUNDLE_IDENTIFIER = com.toddbruss.xcf;
312312
PRODUCT_NAME = "$(TARGET_NAME)";
313313
REGISTER_APP_GROUPS = YES;
314314
SWIFT_EMIT_LOC_STRINGS = YES;
Binary file not shown.

xcf/main.swift

Lines changed: 38 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,44 @@
77

88
import Foundation
99
import MCP
10+
import AppKit
1011

11-
// Print welcome message
12-
print(McpConfig.welcomeMessage)
13-
14-
// Main async task
15-
Task {
16-
do {
17-
// Configure and start the MCP server
18-
let server = try await McpServer.configureMcpServer()
19-
20-
// Wait until the server completes
21-
await server.waitUntilCompleted()
22-
} catch {
23-
print(String(format: McpConfig.errorStartingServer, "\(error)"))
12+
// Check command-line arguments for "server" flag
13+
if CommandLine.arguments.count > 1 && CommandLine.arguments[1] == "server" {
14+
// Print welcome message
15+
print(McpConfig.welcomeMessage)
16+
17+
// Main async task
18+
Task {
19+
do {
20+
// Configure and start the MCP server
21+
let server = try await McpServer.configureMcpServer()
22+
23+
// Wait until the server completes
24+
await server.waitUntilCompleted()
25+
} catch {
26+
print(String(format: McpConfig.errorStartingServer, "\(error)"))
27+
}
2428
}
25-
}
29+
30+
// Keep the main thread running
31+
RunLoop.main.run()
32+
} else {
33+
// Show alert that this is a server application
34+
let alert = NSAlert()
2635

27-
// Keep the main thread running
28-
RunLoop.main.run()
36+
alert.messageText = "Use 'server' argument in your mcp.json"
37+
alert.informativeText = "/Applications/xcf.app/Contents/MacOS/xcf server"
38+
alert.alertStyle = .warning
39+
40+
// Add "I Understand, Quit" button with blue styling
41+
let quitButton = alert.addButton(withTitle: "Press to Quit this XCF Xcode MCP Server")
42+
quitButton.hasDestructiveAction = false
43+
quitButton.keyEquivalent = "\r" // Return key
44+
45+
// Run the alert modal
46+
alert.runModal()
47+
48+
// Exit application
49+
exit(0)
50+
}

0 commit comments

Comments
 (0)