Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 19 additions & 4 deletions installation_and_upgrade/instrument_install_latest_build_only.bat
Original file line number Diff line number Diff line change
Expand Up @@ -63,23 +63,38 @@ set "GALIL_DIR=C:\Instrument\Apps\EPICS\ioc\master\GALIL"
set "GALIL_OLD_DIR=C:\Instrument\Apps\EPICS\ioc\master\GALIL-OLD"
if exist "%TEMP%\%GALIL_OLD_FILE%" del "%TEMP%\%GALIL_OLD_FILE%"
if exist "%TEMP%\%GALIL_NEW_FILE%" del "%TEMP%\%GALIL_NEW_FILE%"

if exist "%GALIL_DIR%\%GALIL_OLD_FILE%" (
@echo Detected old Galil driver - %GALIL_OLD_FILE% in %GALIL_DIR%
robocopy "%GALIL_DIR%" "%TEMP%" "%GALIL_OLD_FILE%" /R:2 /IS /NFL /NDL /NP /NC /NS /LOG:NUL
set "DETECT_OLD_GALIL=YES"
)
if exist "%GALIL_OLD_DIR%\%GALIL_OLD_FILE%" (
REM GALIL-OLD has not been renamed to GALIL hence we must be using new driver
@echo Detected new Galil driver - %GALIL_OLD_FILE% in %GALIL_OLD_DIR%
copy /y "%GALIL_OLD_DIR%\%GALIL_OLD_FILE%" "%TEMP%\%GALIL_NEW_FILE%"
set "DETECT_NEW_GALIL=YES"
)
REM jenkins
if not "%JOB_NAME%" == "" (
if "%JOB_NAME%" == "System_Tests_galilold" (
set "DETECT_OLD_GALIL=YES"
set "DETECT_NEW_GALIL="
) else (
set "DETECT_OLD_GALIL="
set "DETECT_NEW_GALIL=YES"
)
)
if "%DETECT_OLD_GALIL%" == "YES" (
if "%DETECT_NEW_GALIL%" == "YES" (
@echo ERROR - both NEW and OLD GALIL driver appear enabled, this should not be possible
exit /b 1
)
)
if "%DETECT_OLD_GALIL%" == "YES" (
@echo Detected old Galil driver - %GALIL_OLD_FILE% in %GALIL_DIR%
robocopy "%GALIL_DIR%" "%TEMP%" "%GALIL_OLD_FILE%" /R:2 /IS /NFL /NDL /NP /NC /NS /LOG:NUL
)
if "%DETECT_NEW_GALIL%" == "YES" (
@echo Detected new Galil driver - %GALIL_OLD_FILE% in %GALIL_OLD_DIR%
copy /y "%GALIL_OLD_DIR%\%GALIL_OLD_FILE%" "%TEMP%\%GALIL_NEW_FILE%"
)

if "%1" == "RELEASE" (
REM set INSTALL_TYPE=instrument_install
Expand Down
Loading