Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scripts/win32/check_drivers.bat17
-rw-r--r--scripts/win32/installer.nsi2
2 files changed, 19 insertions, 0 deletions
diff --git a/scripts/win32/check_drivers.bat b/scripts/win32/check_drivers.bat
new file mode 100644
index 0000000000..4aed3ff38c
--- /dev/null
+++ b/scripts/win32/check_drivers.bat
@@ -0,0 +1,17 @@
+@echo off
+setlocal
+set rambo="drivers/rambo.inf"
+set arduino="drivers/arduino.inf"
+
+FOR /F "usebackq" %%A IN ('%rambo%') DO set rambosize=%%~zA
+FOR /F "usebackq" %%A IN ('%arduino%') DO set arduinosize=%%~zA
+if not "%rambosize%" == "1257" (
+ echo RAMBo driver file size is wrong. This could be caused by your local git settings changing the LF line into into CRLF.
+ echo Make sure you use the correct INF files
+ taskkill.exe /F /IM "makensis.exe"
+)
+if not "%arduinosize%" == "6460" (
+ echo Arduino driver file size is wrong. This could be caused by your local git settings changing the CRLF line into into LF.
+ echo Make sure you use the correct INF files
+ taskkill.exe /F /IM "makensis.exe"
+)
diff --git a/scripts/win32/installer.nsi b/scripts/win32/installer.nsi
index 06dd0c6eeb..2f11ad2444 100644
--- a/scripts/win32/installer.nsi
+++ b/scripts/win32/installer.nsi
@@ -26,6 +26,8 @@ SetCompressor /SOLID lzma
!include "MUI2.nsh"
!include "Library.nsh"
+!system "check_drivers.bat"
+
;--------------------------------
; StrContains