build.sh 770 B

123456789101112131415161718192021222324252627
  1. #!/usr/bin/env bash
  2. set -e # Exit immediately if a command exits with a non-zero status
  3. echo "Building Lumacs..."
  4. # Ensure we are in the Nix shell environment for building
  5. # This command will either enter the shell or execute the subsequent commands within it.
  6. # It will ensure all build inputs (cmake, pkg-config, gtkmm4 etc.) are available.
  7. nix-shell --run "
  8. # Create build directory if it doesn't exist
  9. mkdir -p build
  10. echo 'Configuring with CMake...'
  11. cmake -S . -B build
  12. echo 'Building project...'
  13. cmake --build build
  14. if [ -f build/lumacs ]; then
  15. echo '✓ Build successful! Binary created at build/lumacs'
  16. echo 'Run 'build/lumacs' to start the editor'
  17. else
  18. echo '✗ Build failed: No binary found at build/lumacs'
  19. exit 1
  20. fi
  21. "