Skip to content

Commit c233e2c

Browse files
committed
feat: add macos app bundler
1 parent 16a9b1a commit c233e2c

12 files changed

Lines changed: 237 additions & 5 deletions

File tree

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
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> <key>BuildMachineOSBuild</key>
5+
<string>22F66</string>
6+
<key>CFBundleDevelopmentRegion</key>
7+
<string>en</string>
8+
<key>CFBundleExecutable</key>
9+
<string>NativeScript for macOS</string>
10+
<key>CFBundleIdentifier</key>
11+
<string>com.nativescript.AppKit</string>
12+
<key>CFBundleInfoDictionaryVersion</key>
13+
<string>6.0</string>
14+
<key>CFBundleName</key>
15+
<string>NativeScript for macOS</string>
16+
<key>CFBundlePackageType</key>
17+
<string>APPL</string>
18+
<key>CFBundleShortVersionString</key>
19+
<string>0.1.0</string>
20+
<key>CFBundleSupportedPlatforms</key>
21+
<array>
22+
<string>MacOSX</string>
23+
</array>
24+
<key>CFBundleVersion</key>
25+
<string>0.1.0</string>
26+
<key>CFBundleIconFile</key>
27+
<string>NativeScript</string>
28+
<key>DTCompiler</key>
29+
<string>com.apple.compilers.llvm.clang.1_0</string>
30+
<key>DTPlatformBuild</key>
31+
<string></string>
32+
<key>DTPlatformName</key>
33+
<string>macosx</string>
34+
<key>DTPlatformVersion</key>
35+
<string>13.3</string>
36+
<key>DTSDKBuild</key>
37+
<string>22E245</string>
38+
<key>DTSDKName</key>
39+
<string>macosx10.15</string>
40+
<key>DTXcode</key>
41+
<string>1430</string>
42+
<key>DTXcodeBuild</key>
43+
<string>14E22b</string>
44+
<key>LSMinimumSystemVersion</key>
45+
<string>12.0</string>
46+
</dict>
47+
</plist>
89.4 MB
Binary file not shown.
46.3 KB
Binary file not shown.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
APPL????
46.3 KB
Binary file not shown.
28.4 KB
Loading

‎README.md‎

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,23 @@ deno task build-libffi
1212
deno task build
1313
```
1414

15+
## Bundling sample AppKit app
16+
17+
```sh
18+
deno task bundle # bundle app
19+
deno task open-bundle # run app
20+
```
21+
22+
## Notes
23+
24+
AppKit usage currently relies on struct support, which has an issue with Deno
25+
right now.
26+
27+
So without a custom deno build from the below PR, you can't use AppKit in Deno
28+
(works in Node).
29+
30+
Upstream PR: https://github.com/denoland/deno/pull/19551
31+
1532
## License
1633

1734
Apache 2.0 licensed.

‎assets/NativeScript.icns‎

46.3 KB
Binary file not shown.

‎assets/NativeScript.png‎

28.4 KB
Loading

‎deno.json‎

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,23 @@
11
{
2+
"app": {
3+
"name": "NativeScript for macOS",
4+
"identifier": "com.nativescript.AppKit",
5+
"entryPoint": "test/appkit.js",
6+
"assets": "./assets",
7+
"icon": "./assets/NativeScript.icns",
8+
"version": "0.1.0"
9+
},
10+
211
"tasks": {
312
"build-libffi": "cd libffi && rm -rf build && CC=clang CFLAGS=-w ./configure --with-pic --disable-shared --disable-docs --host=aarch64-apple-darwin --prefix $PWD/build && make install",
413
"cmake-init": "cmake -S . -B build",
514
"cmake-build": "cmake --build build --config Release",
615
"post-build": "cp ./build/libobjc_bridge.dylib ./build/objc.node",
716
"build": "rm -rf build && deno task cmake-init && deno task cmake-build && deno task post-build",
817
"test": "node test/main.mjs",
9-
"deno": "../deno/target/release/deno run -A"
18+
"deno": "../deno/target/release/deno run -A",
19+
"bundle": "deno run -A --unstable test/bundler.ts",
20+
"open-bundle": "open \"NativeScript for macOS.app\""
1021
},
1122

1223
"fmt": {

0 commit comments

Comments
 (0)