diff options
author | Umberto Baldi <u.baldi@arduino.cc> | 2021-12-16 18:39:51 +0100 |
---|---|---|
committer | Umberto Baldi <u.baldi@arduino.cc> | 2021-12-16 18:39:51 +0100 |
commit | 2685b9b1426fc8344abe30fdb94254f7d0f770ef (patch) | |
tree | 037b8c27c7749b8894555dcb048eaa2163ea09b0 /post_install.bat | |
parent | 6154b7a7c1fba34737562aa4c29cec7451a82989 (diff) |
initial import from https://github.com/arduino/Arduino/tree/master/build/windows/dist/drivers (moved also gemma stuff under `gemma/`)
Diffstat (limited to 'post_install.bat')
-rw-r--r-- | post_install.bat | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/post_install.bat b/post_install.bat new file mode 100644 index 0000000..73b9a24 --- /dev/null +++ b/post_install.bat @@ -0,0 +1,28 @@ +@echo off
+set ARGS=/SE /SW /SA
+if "%PROCESSOR_ARCHITECTURE%" == "AMD64" (
+ drivers\dpinst-amd64.exe %ARGS%
+) ELSE IF "%PROCESSOR_ARCHITEW6432%" == "AMD64" (
+ drivers\dpinst-amd64.exe %ARGS%
+) ELSE (
+ drivers\dpinst-x86.exe %ARGS%
+)
+
+@echo off
+setlocal
+for /f "tokens=4-5 delims=[.] " %%i in ('ver') do @(if %%i==Version (set VERSION=%%j) else (set VERSION=%%i))
+if %VERSION% GEQ 10 (
+ exit /b 0
+)
+endlocal
+
+REM dpinst /PATH has problems with relative paths, so use absolute path.
+if "%PROCESSOR_ARCHITECTURE%" == "AMD64" (
+ drivers\dpinst-amd64.exe /PATH %cd%\drivers\prewin10 %ARGS%
+) ELSE IF "%PROCESSOR_ARCHITEW6432%" == "AMD64" (
+ drivers\dpinst-amd64.exe /PATH %cd%\drivers\prewin10 %ARGS%
+) ELSE (
+ drivers\dpinst-x86.exe /PATH %cd%\drivers\prewin10 %ARGS%
+)
+
+exit /b 0
|