- Complete Particle-OS rebranding from uBlue-OS - Professional installation system with standardized paths - Self-initialization system with --init and --reset commands - Enhanced error messages and dependency checking - Comprehensive testing infrastructure - All source scriptlets updated with runtime improvements - Clean codebase with redundant files moved to archive - Complete documentation suite
4 KiB
4 KiB
Particle-OS Compilation on Windows
Since Particle-OS tools are Bash scripts, they need to be compiled in a Linux environment. Here are your options on Windows:
Option 1: Use WSL (Windows Subsystem for Linux) - Recommended
Prerequisites
- Install WSL: https://docs.microsoft.com/en-us/windows/wsl/install
- Install Ubuntu on WSL (or your preferred Linux distribution)
Compilation Steps
-
Open WSL terminal
-
Navigate to your project:
cd /mnt/c/Users/rob/Documents/Projects/Particle-OS/tools -
Compile all tools:
# Compile apt-layer cd src/apt-layer && ./compile.sh && cd ../.. # Compile composefs cd src/composefs && ./compile.sh && cd ../.. # Compile bootc cd src/bootc && ./compile.sh && cd ../.. # Compile bootupd cd src/bootupd && ./compile.sh && cd ../.. -
Or use the batch file:
compile-windows.bat -
Or use the PowerShell script:
.\compile-windows.ps1
Option 2: Use Git Bash
Prerequisites
- Install Git for Windows (includes Git Bash): https://git-scm.com/download/win
Compilation Steps
-
Open Git Bash
-
Navigate to your project:
cd /c/Users/rob/Documents/Projects/Particle-OS/tools -
Compile all tools (same commands as WSL)
Option 3: Use Docker
Prerequisites
- Install Docker Desktop: https://www.docker.com/products/docker-desktop
Compilation Steps
-
Create a Dockerfile:
FROM ubuntu:24.04 RUN apt update && apt install -y bash coreutils WORKDIR /workspace COPY . . CMD ["bash", "-c", "cd src/apt-layer && ./compile.sh && cd ../composefs && ./compile.sh && cd ../bootc && ./compile.sh && cd ../bootupd && ./compile.sh"] -
Build and run:
docker build -t particle-os-compile . docker run -v %cd%:/workspace particle-os-compile
Option 4: Use Your VM
Since you already have a VM, you can:
-
Copy the source files to your VM:
scp -r src/ particle-os:/tmp/particle-os-src/ -
Compile on the VM:
ssh particle-os cd /tmp/particle-os-src # Compile all tools cd apt-layer && ./compile.sh && cd .. cd composefs && ./compile.sh && cd .. cd bootc && ./compile.sh && cd .. cd bootupd && ./compile.sh && cd .. -
Copy compiled scripts back:
scp particle-os:/tmp/particle-os-src/*/apt-layer.sh . scp particle-os:/tmp/particle-os-src/*/composefs.sh . scp particle-os:/tmp/particle-os-src/*/bootc.sh . scp particle-os:/tmp/particle-os-src/*/bootupd.sh .
Troubleshooting
Common Issues
-
Line ending problems:
- The compilation scripts include
dos2unixto fix Windows line endings - If you still have issues, manually convert files:
dos2unix src/*/scriptlets/*.sh
- The compilation scripts include
-
Permission problems:
- Make sure scripts are executable:
chmod +x src/*/compile.sh chmod +x src/*/scriptlets/*.sh
- Make sure scripts are executable:
-
Missing dependencies:
- Install required packages in WSL:
sudo apt update sudo apt install -y dos2unix jq
- Install required packages in WSL:
Verification
After compilation, you should have these files:
apt-layer.sh(in tools directory)composefs.sh(in tools directory)bootc.sh(in tools directory)bootupd.sh(in tools directory)
Next Steps
After successful compilation:
-
Copy scripts to your VM:
scp *.sh particle-os:/tmp/ -
Run the fix scripts on your VM:
ssh particle-os cd /tmp chmod +x *.sh ./quick-fix-particle-os.sh sudo ./fix-system-permissions.sh ./test-particle-os-system.sh -
Install the tools:
sudo ./dev-install.sh
Recommended Approach
For your situation, I recommend Option 4 (Use Your VM) because:
- You already have the VM set up
- It's the same environment where the tools will run
- No additional software installation needed
- Can test the tools immediately after compilation