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:
authorYouness Alaoui <kakaroto@kakaroto.homelinux.net>2014-12-24 23:09:16 +0300
committerYouness Alaoui <kakaroto@kakaroto.homelinux.net>2014-12-24 23:10:35 +0300
commitb5e6e5009498b87cab0a3668756b5904d720228b (patch)
treedea639e04604a1f12df6e42dd69b13f902afab10 /scripts
parenta2be286cef7bb02226489e657abd8b5d9642e676 (diff)
Adding a pre-build script for NSIS to ensure drivers have the correct size
This is to avoid a LF/CRLF issue with git (depends on local settings) which causes the driver signature to fail. Fixes issue #52
Diffstat (limited to 'scripts')
-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