-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun.sh
More file actions
executable file
·24 lines (20 loc) · 871 Bytes
/
run.sh
File metadata and controls
executable file
·24 lines (20 loc) · 871 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/usr/bin/env bash
set -e
# This is a poor mans build script. It should be simple enough to get relevant information
# from this script and use it in your own build system.
# Replace with your codesign certificate name.
# For example, to create a self-signed certificate:
# https://support.apple.com/guide/keychain-access/create-self-signed-certificates-kyca8916/mac
codesign_cert=bitflips
# vscode-clangd reads this file from the project root to get compile flags
# alternative would be to create a compile_commands.json file but that's more complicated
compile_flags_txt=`cat compile_flags.txt`
executable=bundle.app/app
clang++ -o "$executable" \
src/main.mm \
$compile_flags_txt \
-Wl,-sectcreate,_\_TEXT,__info_plist,src/Info.plist \
-framework UserNotifications \
-framework Cocoa
codesign -s "$codesign_cert" "$executable"
./$executable