Skip to content
Draft
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 .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"task.allowAutomaticTasks": "on",
"editor.formatOnSave": true,
"prettier.endOfLine": "auto",
"files.eol": "auto",
Expand Down
44 changes: 44 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,50 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "Create terminals",
"dependsOn": ["BloomBrowserUI", "content"],
"runOptions": {
"runOn": "folderOpen"
}
},
{
"label": "BloomBrowserUI",
"type": "shell",
"command": "bash",
"options": {
"cwd": "${workspaceFolder}/src/BloomBrowserUI"
},
// Mark as a background task to avoid the spinner animation on the terminal tab
"isBackground": true,
// Create the tasks in a terminal group (split)
"presentation": {
"group": "my-group"
}
},
{
"label": "content",
"type": "shell",
"command": "bash",
"options": {
"cwd": "${workspaceFolder}/src/content"
},
"isBackground": true,
"presentation": {
"group": "my-group"
}
},
{
"label": "Ensure Development Environment Initialized",
"type": "shell",
"command": "bash build/ensure-initialized.sh",
"runOptions": {
"runOn": "folderOpen"
},
"presentation": {
"reveal": "always"
}
},
{
"label": "build",
"command": "dotnet",
Expand Down
54 changes: 54 additions & 0 deletions build/ensure-initialized.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
#!/bin/bash
set -e

echo "=========================================================="
echo "Bloom Desktop - Ensure Development Environment Initialized"
echo "=========================================================="
echo ""

# Get the repository root directory (parent of the build directory)
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
REPO_ROOT="$(dirname "$SCRIPT_DIR")"


echo "Checking for Bloom.chm file in DistFiles..."
echo "--------------------------------------"
if [ ! -e "$REPO_ROOT/DistFiles/Bloom.chm" ]; then
echo "Bloom.chm file not found. Running getDependencies-windows.sh..."
cd "$SCRIPT_DIR"
bash getDependencies-windows.sh
else
echo "Bloom.chm file found. Skipping getDependencies-windows.sh."
fi
echo ""


echo "Checking node_modules in content directory..."
echo "--------------------------------------"
cd "$REPO_ROOT/src/content"
if [ ! -d "node_modules" ]; then
echo "node_modules not found. Running yarn in content directory..."
yarn
else
echo "node_modules already exists in content directory. Skipping yarn."
fi
echo ""


echo "Checking node_modules in BloomBrowserUI directory..."
echo "--------------------------------------"
cd "$REPO_ROOT/src/BloomBrowserUI"
if [ ! -d "node_modules" ]; then
echo "node_modules not found. Running yarn and yarn build in BloomBrowserUI directory..."
yarn
yarn build
else
echo "node_modules already exists in BloomBrowserUI directory. Skipping yarn and yarn build."
fi
echo ""

echo "=========================================================="
echo "✓ Development environment initialization complete!"
echo "=========================================================="
echo ""
echo "You can now build and run Bloom Desktop."