Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,11 @@ The current suggested toolchain to build the project is Swift 6.1.2 / Xcode 16.4
> [!NOTE]
> This project's configuration is heavily based on many environment variables.
>
> You can use tools like [EnvPane](https://github.com/hschmidt/EnvPane/releases/) or [MenuHelper](https://github.com/Kyle-Ye/MenuHelper/releases)
> on macOS platform to manage the environment variable more easily.
> You can use the following tools on macOS platform to manage the environment variable more easily.
>
> - [EnvPane](https://github.com/hschmidt/EnvPane/releases/): A macOS preference pane for environment variables
> - [MenuHelper](https://github.com/Kyle-Ye/MenuHelper/releases): A Finder Extension App to improve your efficiency.
> - launchctl via `Scripts/sync_launchagent.sh`

## Supported platforms

Expand Down
18 changes: 18 additions & 0 deletions Scripts/org.openswiftuiproject.openswiftui.environment.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>org.openswiftuiproject.openswiftui</string>
<key>ProgramArguments</key>
<array>
<string>sh</string>
<string>-c</string>
<string>
launchctl setenv OPENSWIFTUI_DEVELOPMENT 1;
</string>
</array>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>
12 changes: 12 additions & 0 deletions Scripts/sync_launchagent.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash

set -e

PLIST_SRC="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/org.openswiftuiproject.openswiftui.environment.plist"
PLIST_DEST="$HOME/Library/LaunchAgents/org.openswiftuiproject.openswiftui.environment.plist"

mkdir -p "$HOME/Library/LaunchAgents"
cp "$PLIST_SRC" "$PLIST_DEST"
echo "Synced $PLIST_SRC to $PLIST_DEST"

# launchctl load $PLIST_DEST