fix windows extensions (#1968)
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
# Windows-Specific Binaries
|
||||
|
||||
This directory contains Windows-specific binaries and scripts that are only included during Windows builds.
|
||||
|
||||
## Components
|
||||
|
||||
### Node.js Installation
|
||||
- `install-node.cmd` - Script to check for and install Node.js if needed
|
||||
- `npx.cmd` - Wrapper script that ensures Node.js is installed and uses system npx
|
||||
|
||||
### Windows Binaries
|
||||
- `*.dll` files - Required Windows dynamic libraries
|
||||
- `*.exe` files - Windows executables
|
||||
|
||||
## Build Process
|
||||
|
||||
These files are generated during the Windows build process by:
|
||||
1. `prepare-windows-npm.sh` - Creates Node.js installation scripts
|
||||
2. `copy-windows-dlls.js` - Copies all Windows-specific files to the output directory
|
||||
|
||||
None of these files should be committed to the repository - they are generated fresh during each Windows build.
|
||||
@@ -0,0 +1,37 @@
|
||||
@echo off
|
||||
setlocal enabledelayedexpansion
|
||||
|
||||
REM Check if Node.js is installed in Program Files
|
||||
if exist "C:\Program Files\nodejs\node.exe" (
|
||||
echo Node.js found in Program Files
|
||||
set "NODE_EXE=C:\Program Files\nodejs\node.exe"
|
||||
goto :found
|
||||
)
|
||||
|
||||
REM Check if Node.js is installed in Program Files (x86)
|
||||
if exist "C:\Program Files (x86)\nodejs\node.exe" (
|
||||
echo Node.js found in Program Files (x86)
|
||||
set "NODE_EXE=C:\Program Files (x86)\nodejs\node.exe"
|
||||
goto :found
|
||||
)
|
||||
|
||||
echo Node.js not found in standard locations, installing...
|
||||
|
||||
REM Download Node.js MSI installer
|
||||
powershell -Command "& {[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; Invoke-WebRequest -Uri '%1' -OutFile '%TEMP%\node-setup.msi'}"
|
||||
|
||||
REM Install Node.js silently
|
||||
msiexec /i "%TEMP%\node-setup.msi" /qn
|
||||
|
||||
REM Wait a bit for installation to complete
|
||||
timeout /t 5 /nobreak
|
||||
|
||||
REM Clean up
|
||||
del "%TEMP%\node-setup.msi"
|
||||
|
||||
REM Set path to installed Node.js
|
||||
set "NODE_EXE=C:\Program Files\nodejs\node.exe"
|
||||
|
||||
:found
|
||||
echo Using Node.js: %NODE_EXE%
|
||||
exit /b 0
|
||||
@@ -0,0 +1,2 @@
|
||||
@echo off
|
||||
"%~dp0\jbang" %*
|
||||
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
@@ -0,0 +1,31 @@
|
||||
@ECHO OFF
|
||||
SETLOCAL EnableDelayedExpansion
|
||||
|
||||
SET "SCRIPT_DIR=%~dp0"
|
||||
|
||||
REM Try to find Node.js in standard locations first
|
||||
if exist "C:\Program Files\nodejs\npx.cmd" (
|
||||
"C:\Program Files\nodejs\npx.cmd" %*
|
||||
exit /b %errorlevel%
|
||||
)
|
||||
|
||||
if exist "C:\Program Files (x86)\nodejs\npx.cmd" (
|
||||
"C:\Program Files (x86)\nodejs\npx.cmd" %*
|
||||
exit /b %errorlevel%
|
||||
)
|
||||
|
||||
REM If Node.js not found, run installer
|
||||
call "%SCRIPT_DIR%install-node.cmd" "https://nodejs.org/dist/v23.10.0/node-v23.10.0-x64.msi"
|
||||
if errorlevel 1 (
|
||||
echo Failed to install Node.js
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
REM Try using the newly installed Node.js
|
||||
if exist "C:\Program Files\nodejs\npx.cmd" (
|
||||
"C:\Program Files\nodejs\npx.cmd" %*
|
||||
exit /b %errorlevel%
|
||||
)
|
||||
|
||||
echo Failed to find npx after Node.js installation
|
||||
exit /b 1
|
||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user