erdbpro 2.4.5-beta.5 → 2.4.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.html +1 -1
- package/dist-server/index.js +1 -1
- package/dist-server/node_modules/better-sqlite3/build/Makefile +2 -2
- package/dist-server/node_modules/better-sqlite3/build/Release/.deps/4292fa9a667d77b27488aa109b010a85bce8e4e7a1c7aa0370cea902395c3866.intermediate.d +1 -1
- package/dist-server/node_modules/better-sqlite3/deps/download.sh +1 -1
- package/dist-server/node_modules/better-sqlite3/deps/sqlite3/sqlite3.c +176 -692
- package/dist-server/node_modules/better-sqlite3/deps/sqlite3/sqlite3.h +5 -17
- package/dist-server/node_modules/better-sqlite3/package.json +1 -1
- package/dist-server/node_modules/better-sqlite3/src/better_sqlite3.cpp +1 -1
- package/dist-server/node_modules/better-sqlite3/src/util/helpers.cpp +1 -1
- package/dist-server/node_modules/better-sqlite3/src/util/macros.cpp +1 -8
- package/package.json +6 -8
- package/dist/assets/index-Bmk-1vOU.js +0 -12701
- package/dist/assets/index-DJM3xl0X.js +0 -12701
- package/dist-server/node_modules/better-sqlite3/build/Release/.deps/Release/obj.target/better_sqlite3/src/better_sqlite3.o.d.raw +0 -82
- package/dist-server/node_modules/better-sqlite3/build/Release/.deps/Release/obj.target/sqlite3/gen/sqlite3/sqlite3.o.d +0 -4
- package/dist-server/node_modules/better-sqlite3/build/Release/.deps/Release/sqlite3.a.d +0 -1
- package/dist-server/node_modules/better-sqlite3/build/Release/better_sqlite3.node +0 -0
- package/dist-server/node_modules/better-sqlite3/build/Release/obj.target/sqlite3/gen/sqlite3/sqlite3.o +0 -0
- package/dist-server/node_modules/better-sqlite3/build/Release/sqlite3.a +0 -0
- package/menubar/ERDBProTray.app/Contents/Info.plist +0 -20
- package/menubar/ERDBProTray.app/Contents/MacOS/ERDBProTray +0 -0
- package/menubar/ERDBProTray.swift +0 -129
- package/menubar/erdbpro-tray +0 -0
- package/menubar/icon.svg +0 -14
- package/menubar/launch.sh +0 -4
- package/menubar/tray.sh +0 -59
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
Release/obj.target/better_sqlite3/src/better_sqlite3.o: \
|
|
2
|
-
../src/better_sqlite3.cpp Release/obj/gen/sqlite3/sqlite3.h \
|
|
3
|
-
/Users/meowpush/Library/Caches/node-gyp/25.9.0/include/node/node.h \
|
|
4
|
-
/Users/meowpush/Library/Caches/node-gyp/25.9.0/include/node/v8.h \
|
|
5
|
-
/Users/meowpush/Library/Caches/node-gyp/25.9.0/include/node/cppgc/common.h \
|
|
6
|
-
/Users/meowpush/Library/Caches/node-gyp/25.9.0/include/node/v8config.h \
|
|
7
|
-
/Users/meowpush/Library/Caches/node-gyp/25.9.0/include/node/v8-array-buffer.h \
|
|
8
|
-
/Users/meowpush/Library/Caches/node-gyp/25.9.0/include/node/v8-local-handle.h \
|
|
9
|
-
/Users/meowpush/Library/Caches/node-gyp/25.9.0/include/node/v8-handle-base.h \
|
|
10
|
-
/Users/meowpush/Library/Caches/node-gyp/25.9.0/include/node/v8-internal.h \
|
|
11
|
-
/Users/meowpush/Library/Caches/node-gyp/25.9.0/include/node/v8-memory-span.h \
|
|
12
|
-
/Users/meowpush/Library/Caches/node-gyp/25.9.0/include/node/v8-object.h \
|
|
13
|
-
/Users/meowpush/Library/Caches/node-gyp/25.9.0/include/node/cppgc/garbage-collected.h \
|
|
14
|
-
/Users/meowpush/Library/Caches/node-gyp/25.9.0/include/node/cppgc/internal/api-constants.h \
|
|
15
|
-
/Users/meowpush/Library/Caches/node-gyp/25.9.0/include/node/cppgc/platform.h \
|
|
16
|
-
/Users/meowpush/Library/Caches/node-gyp/25.9.0/include/node/cppgc/source-location.h \
|
|
17
|
-
/Users/meowpush/Library/Caches/node-gyp/25.9.0/include/node/v8-source-location.h \
|
|
18
|
-
/Users/meowpush/Library/Caches/node-gyp/25.9.0/include/node/v8-platform.h \
|
|
19
|
-
/Users/meowpush/Library/Caches/node-gyp/25.9.0/include/node/cppgc/trace-trait.h \
|
|
20
|
-
/Users/meowpush/Library/Caches/node-gyp/25.9.0/include/node/cppgc/type-traits.h \
|
|
21
|
-
/Users/meowpush/Library/Caches/node-gyp/25.9.0/include/node/cppgc/name-provider.h \
|
|
22
|
-
/Users/meowpush/Library/Caches/node-gyp/25.9.0/include/node/v8-maybe.h \
|
|
23
|
-
/Users/meowpush/Library/Caches/node-gyp/25.9.0/include/node/cppgc/internal/conditional-stack-allocated.h \
|
|
24
|
-
/Users/meowpush/Library/Caches/node-gyp/25.9.0/include/node/cppgc/macros.h \
|
|
25
|
-
/Users/meowpush/Library/Caches/node-gyp/25.9.0/include/node/cppgc/internal/compiler-specific.h \
|
|
26
|
-
/Users/meowpush/Library/Caches/node-gyp/25.9.0/include/node/v8-persistent-handle.h \
|
|
27
|
-
/Users/meowpush/Library/Caches/node-gyp/25.9.0/include/node/v8-weak-callback-info.h \
|
|
28
|
-
/Users/meowpush/Library/Caches/node-gyp/25.9.0/include/node/v8-primitive.h \
|
|
29
|
-
/Users/meowpush/Library/Caches/node-gyp/25.9.0/include/node/v8-data.h \
|
|
30
|
-
/Users/meowpush/Library/Caches/node-gyp/25.9.0/include/node/v8-value.h \
|
|
31
|
-
/Users/meowpush/Library/Caches/node-gyp/25.9.0/include/node/v8-sandbox.h \
|
|
32
|
-
/Users/meowpush/Library/Caches/node-gyp/25.9.0/include/node/v8-traced-handle.h \
|
|
33
|
-
/Users/meowpush/Library/Caches/node-gyp/25.9.0/include/node/v8-container.h \
|
|
34
|
-
/Users/meowpush/Library/Caches/node-gyp/25.9.0/include/node/v8-context.h \
|
|
35
|
-
/Users/meowpush/Library/Caches/node-gyp/25.9.0/include/node/v8-snapshot.h \
|
|
36
|
-
/Users/meowpush/Library/Caches/node-gyp/25.9.0/include/node/v8-isolate.h \
|
|
37
|
-
/Users/meowpush/Library/Caches/node-gyp/25.9.0/include/node/v8-callbacks.h \
|
|
38
|
-
/Users/meowpush/Library/Caches/node-gyp/25.9.0/include/node/v8-promise.h \
|
|
39
|
-
/Users/meowpush/Library/Caches/node-gyp/25.9.0/include/node/v8-debug.h \
|
|
40
|
-
/Users/meowpush/Library/Caches/node-gyp/25.9.0/include/node/v8-script.h \
|
|
41
|
-
/Users/meowpush/Library/Caches/node-gyp/25.9.0/include/node/v8-message.h \
|
|
42
|
-
/Users/meowpush/Library/Caches/node-gyp/25.9.0/include/node/v8-embedder-heap.h \
|
|
43
|
-
/Users/meowpush/Library/Caches/node-gyp/25.9.0/include/node/v8-exception.h \
|
|
44
|
-
/Users/meowpush/Library/Caches/node-gyp/25.9.0/include/node/v8-function-callback.h \
|
|
45
|
-
/Users/meowpush/Library/Caches/node-gyp/25.9.0/include/node/v8-microtask.h \
|
|
46
|
-
/Users/meowpush/Library/Caches/node-gyp/25.9.0/include/node/v8-statistics.h \
|
|
47
|
-
/Users/meowpush/Library/Caches/node-gyp/25.9.0/include/node/v8-unwinder.h \
|
|
48
|
-
/Users/meowpush/Library/Caches/node-gyp/25.9.0/include/node/v8-embedder-state-scope.h \
|
|
49
|
-
/Users/meowpush/Library/Caches/node-gyp/25.9.0/include/node/v8-date.h \
|
|
50
|
-
/Users/meowpush/Library/Caches/node-gyp/25.9.0/include/node/v8-extension.h \
|
|
51
|
-
/Users/meowpush/Library/Caches/node-gyp/25.9.0/include/node/v8-external.h \
|
|
52
|
-
/Users/meowpush/Library/Caches/node-gyp/25.9.0/include/node/v8-function.h \
|
|
53
|
-
/Users/meowpush/Library/Caches/node-gyp/25.9.0/include/node/v8-template.h \
|
|
54
|
-
/Users/meowpush/Library/Caches/node-gyp/25.9.0/include/node/v8-initialization.h \
|
|
55
|
-
/Users/meowpush/Library/Caches/node-gyp/25.9.0/include/node/v8-json.h \
|
|
56
|
-
/Users/meowpush/Library/Caches/node-gyp/25.9.0/include/node/v8-locker.h \
|
|
57
|
-
/Users/meowpush/Library/Caches/node-gyp/25.9.0/include/node/v8-microtask-queue.h \
|
|
58
|
-
/Users/meowpush/Library/Caches/node-gyp/25.9.0/include/node/v8-primitive-object.h \
|
|
59
|
-
/Users/meowpush/Library/Caches/node-gyp/25.9.0/include/node/v8-proxy.h \
|
|
60
|
-
/Users/meowpush/Library/Caches/node-gyp/25.9.0/include/node/v8-regexp.h \
|
|
61
|
-
/Users/meowpush/Library/Caches/node-gyp/25.9.0/include/node/v8-typed-array.h \
|
|
62
|
-
/Users/meowpush/Library/Caches/node-gyp/25.9.0/include/node/v8-value-serializer.h \
|
|
63
|
-
/Users/meowpush/Library/Caches/node-gyp/25.9.0/include/node/v8-version.h \
|
|
64
|
-
/Users/meowpush/Library/Caches/node-gyp/25.9.0/include/node/v8-wasm.h \
|
|
65
|
-
/Users/meowpush/Library/Caches/node-gyp/25.9.0/include/node/node_version.h \
|
|
66
|
-
/Users/meowpush/Library/Caches/node-gyp/25.9.0/include/node/node_api.h \
|
|
67
|
-
/Users/meowpush/Library/Caches/node-gyp/25.9.0/include/node/js_native_api.h \
|
|
68
|
-
/Users/meowpush/Library/Caches/node-gyp/25.9.0/include/node/js_native_api_types.h \
|
|
69
|
-
/Users/meowpush/Library/Caches/node-gyp/25.9.0/include/node/node_api_types.h \
|
|
70
|
-
/Users/meowpush/Library/Caches/node-gyp/25.9.0/include/node/node_object_wrap.h \
|
|
71
|
-
/Users/meowpush/Library/Caches/node-gyp/25.9.0/include/node/node_buffer.h \
|
|
72
|
-
../src/util/macros.cpp ../src/util/helpers.cpp \
|
|
73
|
-
../src/util/constants.cpp ../src/util/bind-map.cpp \
|
|
74
|
-
../src/util/data-converter.cpp ../src/util/data.cpp \
|
|
75
|
-
../src/util/row-builder.cpp ../src/objects/backup.hpp \
|
|
76
|
-
../src/objects/statement.hpp ../src/objects/database.hpp \
|
|
77
|
-
../src/addon.cpp ../src/objects/statement-iterator.hpp \
|
|
78
|
-
../src/util/query-macros.cpp ../src/util/custom-function.cpp \
|
|
79
|
-
../src/util/custom-aggregate.cpp ../src/util/custom-table.cpp \
|
|
80
|
-
../src/util/binder.cpp ../src/objects/backup.cpp \
|
|
81
|
-
../src/objects/statement.cpp ../src/objects/database.cpp \
|
|
82
|
-
../src/objects/statement-iterator.cpp
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
cmd_Release/obj.target/sqlite3/gen/sqlite3/sqlite3.o := cc -o Release/obj.target/sqlite3/gen/sqlite3/sqlite3.o Release/obj/gen/sqlite3/sqlite3.c '-DNODE_GYP_MODULE_NAME=sqlite3' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-D_GLIBCXX_USE_CXX11_ABI=1' '-D_FILE_OFFSET_BITS=64' '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-DHAVE_INT16_T=1' '-DHAVE_INT32_T=1' '-DHAVE_INT8_T=1' '-DHAVE_STDINT_H=1' '-DHAVE_UINT16_T=1' '-DHAVE_UINT32_T=1' '-DHAVE_UINT8_T=1' '-DHAVE_USLEEP=1' '-DSQLITE_DEFAULT_CACHE_SIZE=-16000' '-DSQLITE_DEFAULT_FOREIGN_KEYS=1' '-DSQLITE_DEFAULT_MEMSTATUS=0' '-DSQLITE_DEFAULT_WAL_SYNCHRONOUS=1' '-DSQLITE_DQS=0' '-DSQLITE_ENABLE_COLUMN_METADATA' '-DSQLITE_ENABLE_DBSTAT_VTAB' '-DSQLITE_ENABLE_DESERIALIZE' '-DSQLITE_ENABLE_FTS3' '-DSQLITE_ENABLE_FTS3_PARENTHESIS' '-DSQLITE_ENABLE_FTS4' '-DSQLITE_ENABLE_FTS5' '-DSQLITE_ENABLE_GEOPOLY' '-DSQLITE_ENABLE_JSON1' '-DSQLITE_ENABLE_MATH_FUNCTIONS' '-DSQLITE_ENABLE_PERCENTILE' '-DSQLITE_ENABLE_RTREE' '-DSQLITE_ENABLE_STAT4' '-DSQLITE_ENABLE_UPDATE_DELETE_LIMIT' '-DSQLITE_LIKE_DOESNT_MATCH_BLOBS' '-DSQLITE_OMIT_DEPRECATED' '-DSQLITE_OMIT_PROGRESS_CALLBACK' '-DSQLITE_OMIT_SHARED_CACHE' '-DSQLITE_OMIT_TCL_VARIABLE' '-DSQLITE_SOUNDEX' '-DSQLITE_THREADSAFE=2' '-DSQLITE_TRACE_SIZE_LIMIT=32' '-DSQLITE_USE_URI=0' '-DNDEBUG' -I/Users/meowpush/Library/Caches/node-gyp/25.9.0/include/node -I/Users/meowpush/Library/Caches/node-gyp/25.9.0/src -I/Users/meowpush/Library/Caches/node-gyp/25.9.0/deps/openssl/config -I/Users/meowpush/Library/Caches/node-gyp/25.9.0/deps/openssl/openssl/include -I/Users/meowpush/Library/Caches/node-gyp/25.9.0/deps/uv/include -I/Users/meowpush/Library/Caches/node-gyp/25.9.0/deps/zlib -I/Users/meowpush/Library/Caches/node-gyp/25.9.0/deps/v8/include -I./Release/obj/gen/sqlite3 -O3 -fno-strict-aliasing -mmacosx-version-min=10.7 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -w -std=c99 -MMD -MF ./Release/.deps/Release/obj.target/sqlite3/gen/sqlite3/sqlite3.o.d.raw -c
|
|
2
|
-
Release/obj.target/sqlite3/gen/sqlite3/sqlite3.o: \
|
|
3
|
-
Release/obj/gen/sqlite3/sqlite3.c
|
|
4
|
-
Release/obj/gen/sqlite3/sqlite3.c:
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
cmd_Release/sqlite3.a := rm -f Release/sqlite3.a && /Library/Developer/CommandLineTools/usr/bin/python3 gyp-mac-tool filter-libtool libtool -static -o Release/sqlite3.a Release/obj.target/sqlite3/gen/sqlite3/sqlite3.o
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
3
|
-
<plist version="1.0">
|
|
4
|
-
<dict>
|
|
5
|
-
<key>CFBundleExecutable</key>
|
|
6
|
-
<string>ERDBProTray</string>
|
|
7
|
-
<key>CFBundleIdentifier</key>
|
|
8
|
-
<string>com.erdbuilderpro.tray</string>
|
|
9
|
-
<key>CFBundleName</key>
|
|
10
|
-
<string>ERD Builder Pro</string>
|
|
11
|
-
<key>CFBundleVersion</key>
|
|
12
|
-
<string>2.4.1</string>
|
|
13
|
-
<key>CFBundleShortVersionString</key>
|
|
14
|
-
<string>2.4.1</string>
|
|
15
|
-
<key>LSUIElement</key>
|
|
16
|
-
<true/>
|
|
17
|
-
<key>NSHighResolutionCapable</key>
|
|
18
|
-
<true/>
|
|
19
|
-
</dict>
|
|
20
|
-
</plist>
|
|
Binary file
|
|
@@ -1,129 +0,0 @@
|
|
|
1
|
-
import Cocoa
|
|
2
|
-
import Foundation
|
|
3
|
-
|
|
4
|
-
let port = CommandLine.arguments.count > 1 ? CommandLine.arguments[1] : "3101"
|
|
5
|
-
let home = FileManager.default.homeDirectoryForCurrentUser
|
|
6
|
-
let pidFile = home.appendingPathComponent(".erdbpro/server.pid").path
|
|
7
|
-
let updateFile = home.appendingPathComponent(".erdbpro/update.json").path
|
|
8
|
-
|
|
9
|
-
class AppDelegate: NSObject, NSApplicationDelegate, NSMenuDelegate {
|
|
10
|
-
var statusItem: NSStatusItem!
|
|
11
|
-
var statusMenuItem: NSMenuItem!
|
|
12
|
-
var updateMenuItem: NSMenuItem!
|
|
13
|
-
|
|
14
|
-
func applicationDidFinishLaunching(_ notification: Notification) {
|
|
15
|
-
statusItem = NSStatusBar.system.statusItem(withLength: NSStatusItem.squareLength)
|
|
16
|
-
|
|
17
|
-
if let button = statusItem.button {
|
|
18
|
-
let iconCandidates = [
|
|
19
|
-
Bundle.main.bundlePath + "/../icon.svg",
|
|
20
|
-
"\(home.path)/Projects/erd-builder-pro/cli/menubar/icon.svg"
|
|
21
|
-
]
|
|
22
|
-
var iconLoaded = false
|
|
23
|
-
for iconPath in iconCandidates {
|
|
24
|
-
if let img = NSImage(contentsOfFile: iconPath) {
|
|
25
|
-
img.size = NSSize(width: 18, height: 18)
|
|
26
|
-
button.image = img
|
|
27
|
-
iconLoaded = true
|
|
28
|
-
break
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
if !iconLoaded { button.title = "ERD" }
|
|
32
|
-
button.toolTip = "ERD Builder Pro"
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
let menu = NSMenu()
|
|
36
|
-
menu.delegate = self
|
|
37
|
-
menu.autoenablesItems = false
|
|
38
|
-
|
|
39
|
-
statusMenuItem = NSMenuItem(title: "Server: checking...", action: nil, keyEquivalent: "")
|
|
40
|
-
statusMenuItem.isEnabled = false
|
|
41
|
-
menu.addItem(statusMenuItem)
|
|
42
|
-
menu.addItem(NSMenuItem.separator())
|
|
43
|
-
|
|
44
|
-
updateMenuItem = NSMenuItem(title: "", action: #selector(showUpdate), keyEquivalent: "")
|
|
45
|
-
updateMenuItem.target = self
|
|
46
|
-
updateMenuItem.isHidden = true
|
|
47
|
-
menu.addItem(updateMenuItem)
|
|
48
|
-
|
|
49
|
-
let openItem = NSMenuItem(title: "Open ERD Builder Pro", action: #selector(openApp), keyEquivalent: "o")
|
|
50
|
-
openItem.target = self
|
|
51
|
-
menu.addItem(openItem)
|
|
52
|
-
menu.addItem(NSMenuItem.separator())
|
|
53
|
-
|
|
54
|
-
let quitItem = NSMenuItem(title: "Quit", action: #selector(quitApp), keyEquivalent: "q")
|
|
55
|
-
quitItem.target = self
|
|
56
|
-
menu.addItem(quitItem)
|
|
57
|
-
|
|
58
|
-
statusItem.menu = menu
|
|
59
|
-
|
|
60
|
-
signal(SIGTERM) { _ in
|
|
61
|
-
NSApplication.shared.terminate(nil)
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
func menuWillOpen(_ menu: NSMenu) {
|
|
66
|
-
// Server status
|
|
67
|
-
if let pidStr = try? String(contentsOfFile: pidFile, encoding: .utf8) {
|
|
68
|
-
let pid = pidStr.trimmingCharacters(in: .whitespacesAndNewlines)
|
|
69
|
-
if let pidNum = Int32(pid), kill(pidNum, 0) == 0 {
|
|
70
|
-
statusMenuItem.title = "Server: Running (PID: \(pid))"
|
|
71
|
-
} else {
|
|
72
|
-
statusMenuItem.title = "Server: Stopped"
|
|
73
|
-
}
|
|
74
|
-
} else {
|
|
75
|
-
statusMenuItem.title = "Server: Stopped"
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
// Update notification
|
|
79
|
-
if let data = try? Data(contentsOf: URL(fileURLWithPath: updateFile)),
|
|
80
|
-
let json = try? JSONSerialization.jsonObject(with: data) as? [String: Any],
|
|
81
|
-
let hasUpdate = json["hasUpdate"] as? Bool, hasUpdate,
|
|
82
|
-
let latest = json["latest"] as? String {
|
|
83
|
-
let attr = NSAttributedString(
|
|
84
|
-
string: "Update Available: v\(latest)",
|
|
85
|
-
attributes: [.foregroundColor: NSColor.systemGreen]
|
|
86
|
-
)
|
|
87
|
-
updateMenuItem.attributedTitle = attr
|
|
88
|
-
updateMenuItem.isHidden = false
|
|
89
|
-
} else {
|
|
90
|
-
updateMenuItem.isHidden = true
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
@objc func openApp() {
|
|
95
|
-
if let url = URL(string: "http://localhost:\(port)") {
|
|
96
|
-
NSWorkspace.shared.open(url)
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
@objc func showUpdate() {
|
|
101
|
-
// Open GitHub releases
|
|
102
|
-
if let url = URL(string: "https://github.com/hadziqmtqn/erd-builder-pro/releases/latest") {
|
|
103
|
-
NSWorkspace.shared.open(url)
|
|
104
|
-
}
|
|
105
|
-
// Show update instructions
|
|
106
|
-
let alert = NSAlert()
|
|
107
|
-
alert.messageText = "Update ERD Builder Pro"
|
|
108
|
-
alert.informativeText = "Run this command in your terminal:\n\nnpm update -g erdbpro\n\nThen restart with: erdbpro start --force"
|
|
109
|
-
alert.alertStyle = .informational
|
|
110
|
-
alert.addButton(withTitle: "OK")
|
|
111
|
-
DispatchQueue.main.async { alert.runModal() }
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
@objc func quitApp() {
|
|
115
|
-
if let pidStr = try? String(contentsOfFile: pidFile, encoding: .utf8) {
|
|
116
|
-
let pid = pidStr.trimmingCharacters(in: .whitespacesAndNewlines)
|
|
117
|
-
if let pidNum = Int32(pid) {
|
|
118
|
-
kill(pidNum, SIGTERM)
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
NSApplication.shared.terminate(nil)
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
let app = NSApplication.shared
|
|
126
|
-
app.setActivationPolicy(.accessory)
|
|
127
|
-
let delegate = AppDelegate()
|
|
128
|
-
app.delegate = delegate
|
|
129
|
-
app.run()
|
package/menubar/erdbpro-tray
DELETED
|
Binary file
|
package/menubar/icon.svg
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
<svg width="192" height="192" viewBox="0 0 192 192" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
-
<rect width="192" height="192" rx="42" fill="white"/>
|
|
3
|
-
<g clip-path="url(#clip0_15_112)">
|
|
4
|
-
<path d="M90.6454 19.7997C80.4004 20.7284 71.4436 23.1848 62.4867 27.5583C53.0805 32.1716 45.0223 38.3725 38.3122 46.1311C26.3298 60.0607 19.7095 77.8845 19.7095 96.1877C19.7095 125.395 36.2452 151.936 62.4867 164.817C71.9528 169.46 81.6286 171.947 93.2816 172.725L96.1873 172.935V166.345V159.784L92.6824 159.605C65.7519 158.107 42.7756 139.115 36.3051 112.963C30.6135 89.9568 38.3721 66.0219 56.4955 50.7144C72.7317 37.0245 95.3785 32.6808 115.569 39.4209C124.945 42.5663 132.824 47.4492 139.773 54.399C150.408 65.0334 156.309 77.9444 157.747 93.8511L157.957 95.8881H165.296H172.665L172.485 91.7542C171.527 70.725 160.832 49.9355 144.057 36.5452C133.123 27.798 119.673 22.0764 105.773 20.279C101.25 19.6799 94.3899 19.4702 90.6454 19.7997Z" fill="#2071FB"/>
|
|
5
|
-
<path d="M92.8021 50.0851C81.5985 50.834 71.5034 55.5072 63.3853 63.6552C59.4011 67.6394 56.9447 70.9944 54.6381 75.6676C51.3729 82.1381 50.0848 87.4104 49.8451 94.9892C49.6953 99.4826 49.7852 100.771 50.3244 103.946C52.6011 117.217 59.8205 128.21 71.1139 135.55C77.4646 139.714 85.3431 142.29 93.1316 142.799L96.1871 143.009V119.613V96.1875H108.409C115.119 96.1875 125.574 96.0976 131.655 95.9778L142.709 95.798L142.529 93.0121C141.81 82.0782 137.017 71.7134 128.989 63.6552C121.021 55.6869 110.596 50.7741 100.291 50.175C98.7634 50.0851 97.2056 49.9952 96.7863 49.9353C96.3669 49.9054 94.5695 49.9653 92.8021 50.0851Z" fill="#2071FB"/>
|
|
6
|
-
<path d="M93.9194 65.4379C86.4164 65.9387 79.6557 69.0631 74.2191 74.5109C71.5509 77.1747 69.9059 79.4179 68.3612 82.5423C66.1745 86.8685 65.3118 90.3935 65.1513 95.4607C65.051 98.465 65.1112 99.3262 65.4723 101.449C66.997 110.322 71.8318 117.672 79.3949 122.579C83.6479 125.363 88.9241 127.086 94.14 127.426L96.1863 127.566V111.924V96.2618H104.371C108.865 96.2618 115.867 96.2017 119.939 96.1216L127.342 96.0015L127.221 94.1388C126.74 86.8284 123.53 79.8985 118.154 74.5109C112.817 69.1833 105.836 65.8986 98.9347 65.498C97.9116 65.4379 96.8684 65.3779 96.5875 65.3378C96.3067 65.3178 95.103 65.3578 93.9194 65.4379Z" fill="#363636"/>
|
|
7
|
-
<path d="M104.275 138.875V172.875H131.625C161.102 172.875 161.282 172.845 164.367 171.287C167.632 169.61 170.299 166.644 171.437 163.289C172.096 161.432 172.126 160.952 172.126 151.606C172.126 142.2 172.096 141.811 171.437 140.193C171.077 139.264 170.358 137.886 169.879 137.137C169.04 135.909 168.98 135.7 169.25 134.501C169.669 132.674 169.669 117.876 169.25 115.899C168.172 110.836 163.798 106.343 158.765 105.204C157.927 104.995 147.682 104.875 130.876 104.875H104.275V138.875ZM154.602 125.245V130.637H136.927H119.253V125.245V119.853H136.927H154.602V125.245ZM157.148 151.756V157.747L138.216 157.837L119.253 157.897V151.756V145.615L138.216 145.675L157.148 145.765V151.756Z" fill="#363636"/>
|
|
8
|
-
</g>
|
|
9
|
-
<defs>
|
|
10
|
-
<clipPath id="clip0_15_112">
|
|
11
|
-
<rect width="153.375" height="153.375" fill="white" transform="translate(19.5 19.5)"/>
|
|
12
|
-
</clipPath>
|
|
13
|
-
</defs>
|
|
14
|
-
</svg>
|
package/menubar/launch.sh
DELETED
package/menubar/tray.sh
DELETED
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
# macOS menubar tray icon via AppleScript — no Xcode required
|
|
3
|
-
# Spawns a tiny AppleScript applet that shows a menubar item.
|
|
4
|
-
|
|
5
|
-
PORT="${1:-3101}"
|
|
6
|
-
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
|
7
|
-
|
|
8
|
-
osascript -e "
|
|
9
|
-
use AppleScript version \"2.4\"
|
|
10
|
-
use framework \"AppKit\"
|
|
11
|
-
use scripting additions
|
|
12
|
-
|
|
13
|
-
property statusItem : missing value
|
|
14
|
-
|
|
15
|
-
on run
|
|
16
|
-
set myPort to \"$PORT\"
|
|
17
|
-
|
|
18
|
-
-- Create status bar item
|
|
19
|
-
set bar to current application's NSStatusBar's systemStatusBar
|
|
20
|
-
set statusItem to bar's statusItemWithLength:(current application's NSSquareStatusItemLength)
|
|
21
|
-
|
|
22
|
-
-- Set icon
|
|
23
|
-
set button to statusItem's button
|
|
24
|
-
button's setTitle:\"◈\"
|
|
25
|
-
button's setToolTip:\"ERD Builder Pro\"
|
|
26
|
-
|
|
27
|
-
-- Create menu
|
|
28
|
-
set theMenu to current application's NSMenu's alloc()'s init()
|
|
29
|
-
|
|
30
|
-
set openItem to current application's NSMenuItem's alloc()'s initWithTitle:\"Open ERD Builder Pro\" action:\"openApp:\" keyEquivalent:\"o\"
|
|
31
|
-
openItem's setTarget:me
|
|
32
|
-
theMenu's addItem:openItem
|
|
33
|
-
|
|
34
|
-
theMenu's addItem:(current application's NSMenuItem's separatorItem)
|
|
35
|
-
|
|
36
|
-
set quitItem to current application's NSMenuItem's alloc()'s initWithTitle:\"Quit\" action:\"quitApp:\" keyEquivalent:\"q\"
|
|
37
|
-
quitItem's setTarget:me
|
|
38
|
-
theMenu's addItem:quitItem
|
|
39
|
-
|
|
40
|
-
statusItem's setMenu:theMenu
|
|
41
|
-
|
|
42
|
-
-- Open browser
|
|
43
|
-
openApp(myPort)
|
|
44
|
-
end run
|
|
45
|
-
|
|
46
|
-
on openApp:port
|
|
47
|
-
set urlStr to \"http://localhost:\" & port
|
|
48
|
-
set theURL to current application's NSURL's URLWithString:urlStr
|
|
49
|
-
current application's NSWorkspace's sharedWorkspace's openURL:theURL
|
|
50
|
-
end openApp:
|
|
51
|
-
|
|
52
|
-
on quitApp:sender
|
|
53
|
-
current application's NSApplication's sharedApplication's terminate:me
|
|
54
|
-
end quitApp:
|
|
55
|
-
"
|
|
56
|
-
|
|
57
|
-
# Keep running until killed
|
|
58
|
-
echo "ERD Builder Pro menubar icon active (port $PORT). Ctrl+C to quit."
|
|
59
|
-
while true; do sleep 3600; done
|