Commit 9943bfca authored by Wohlgemuth, Jason's avatar Wohlgemuth, Jason
Browse files

feat: Move acorn.exe into bin folder

parent bdb1b308
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -57,7 +57,7 @@ npm run copy # Copies src/data to public/data for runtime access

**Key Insight**: `src/data` is the build-time source (Astro content collections), `public/data` is runtime source (for image paths, API-like access).

**Cross-Platform**: All npm scripts use `scripts/run.js` wrapper that automatically selects the correct binary (`acorn` on Linux/Mac, `acorn.exe` on Windows).
**Cross-Platform**: All npm scripts use `scripts/run.js` wrapper loading the binary from `./bin/` (`bin/acorn` or `bin/acorn.exe`).

### Development
```bash
(35.6 MiB)

File moved.

+6 −5
Original line number Diff line number Diff line
@@ -2,12 +2,13 @@
$ACORN_VERSION = "0.1.27"
$URL = "https://code.ornl.gov/api/v4/projects/16689/packages/generic/x86_64-pc-windows-msvc/v$ACORN_VERSION/acorn.exe"

Write-Host "Downloading ACORN CLI version $ACORN_VERSION for Windows..."
Invoke-WebRequest -Uri $URL -OutFile "acorn.exe"
Write-Host "Downloading ACORN CLI version $ACORN_VERSION for Windows into ./bin ..."
if (-not (Test-Path "bin")) { New-Item -ItemType Directory -Path "bin" | Out-Null }
Invoke-WebRequest -Uri $URL -OutFile "bin/acorn.exe"

if (Test-Path "acorn.exe") {
    Write-Host "ACORN CLI installed successfully!"
    & .\acorn.exe --version
if (Test-Path "bin/acorn.exe") {
    Write-Host "ACORN CLI installed successfully (./bin/acorn.exe)"
    & ./bin/acorn.exe --version
} else {
    Write-Error "Failed to download ACORN CLI"
    exit 1
+4 −2
Original line number Diff line number Diff line
@@ -2,7 +2,9 @@

main() {
    local ACORN_VERSION=0.1.27
    curl -LO https://code.ornl.gov/api/v4/projects/16689/packages/generic/x86_64-unknown-linux-gnu/v${ACORN_VERSION}/acorn
    chmod +x ./acorn
    mkdir -p bin
    curl -L https://code.ornl.gov/api/v4/projects/16689/packages/generic/x86_64-unknown-linux-gnu/v${ACORN_VERSION}/acorn -o bin/acorn
    chmod +x ./bin/acorn
    ./bin/acorn --version || echo "ACORN downloaded to ./bin";
}
main
 No newline at end of file
+3 −3
Original line number Diff line number Diff line
@@ -9,9 +9,9 @@ const __dirname = dirname(__filename);

// Determine the binary name based on platform
const isWindows = platform() === 'win32';
const binaryName = isWindows ? 'acorn.exe' : './acorn';
// Go up one directory from scripts/ to find the binary in the project root
const binaryPath = join(__dirname, binaryName);
const binaryName = isWindows ? 'acorn.exe' : 'acorn';
// Binary relocated to ./bin at project root
const binaryPath = join(__dirname, '..', 'bin', binaryName);

// Pass all arguments to the acorn binary
const args = process.argv.slice(2);