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
1 change: 1 addition & 0 deletions tauri/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,6 @@ dist-ssr
*.sw?

*target/
*target-dev/

*.yarn/install-state.gz
14 changes: 11 additions & 3 deletions tauri/Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,19 @@ tasks:
cmds:
- |
# Create repl hopp_core binary
cp src-tauri/target/debug/hopp_core src-tauri/target/debug/hopp_core_repl
ARGS=""
TEMP_FILE=$(mktemp /tmp/tauri.conf.json.XXXXXX)
if [[ "{{.VITE_OS}}" == "windows" ]]; then
TEMP_FILE=$(cygpath -w $TEMP_FILE)
mkdir -p src-tauri/target-dev/debug
cp src-tauri/target/debug/hopp_core.exe src-tauri/target-dev/debug/hopp_core_repl.exe
ARGS="--no-watch -- --target-dir target-dev"
else
cp src-tauri/target/debug/hopp_core src-tauri/target/debug/hopp_core_repl
fi
# Copy the contents of tauri.conf.json to the temporary file
cp src-tauri/tauri.conf.json "$TEMP_FILE"
if [[ "{{.VITE_OS}}" == "linux" ]]; then
if [[ "{{.VITE_OS}}" == "linux" || "{{.VITE_OS}}" == "windows" ]]; then
SED_INPLACE="sed -i"
else
SED_INPLACE="sed -i ''"
Expand All @@ -65,7 +73,7 @@ tasks:
$SED_INPLACE 's/"productName": "hopp"/"productName": "hopp_repl"/' "$TEMP_FILE"
$SED_INPLACE 's/"beforeDevCommand": "yarn dev"/"beforeDevCommand": "yarn dev:replica"/' "$TEMP_FILE"
# Run the Tauri development server using the temporary configuration file
RUST_LOG=info yarn tauri dev -c "$TEMP_FILE"
RUST_LOG=info yarn tauri dev -c "$TEMP_FILE" $ARGS

generate-openapi-types:
desc: Generate type-safe code from the OpenAPI specification.
Expand Down