From 286051cbb9899a642d4dad1908a8d26d151b395b Mon Sep 17 00:00:00 2001 From: Bryan Kowal Date: Wed, 26 Mar 2014 14:56:48 -0500 Subject: [PATCH] Issue #2851 - msi build updates for two shortcuts instead of a single launcher; added amd64 scripts Former-commit-id: 386723d9048f6d6b6bd0281f273210949672acd2 --- cave/build/alertviz/customTargets.xml | 7 ++ cave/build/cave/customTargets.xml | 7 ++ cave/build/static/README.txt | 1 + .../static/win32.amd64/alertviz/alertviz.bat | 65 +++++++++++++++++ cave/build/static/win32.amd64/cave/cave.bat | 68 ++++++++++++++++++ msi/AWIPSII.CAVE/AWIPSII.CAVE/AWIPSII.wxs | 39 ++++++---- msi/build/A2Staging/Scripts/WiXBuild.ps1 | Bin 4396 -> 4372 bytes 7 files changed, 174 insertions(+), 13 deletions(-) create mode 100644 cave/build/static/win32.amd64/alertviz/alertviz.bat create mode 100644 cave/build/static/win32.amd64/cave/cave.bat diff --git a/cave/build/alertviz/customTargets.xml b/cave/build/alertviz/customTargets.xml index 79edccff28..e4ce225673 100644 --- a/cave/build/alertviz/customTargets.xml +++ b/cave/build/alertviz/customTargets.xml @@ -188,6 +188,13 @@ excludes="cave/**" /> + + + + + diff --git a/cave/build/cave/customTargets.xml b/cave/build/cave/customTargets.xml index 059679fa9c..6b84d61793 100644 --- a/cave/build/cave/customTargets.xml +++ b/cave/build/cave/customTargets.xml @@ -197,6 +197,13 @@ + + + + + diff --git a/cave/build/static/README.txt b/cave/build/static/README.txt index c474efd14d..51b6e5476a 100644 --- a/cave/build/static/README.txt +++ b/cave/build/static/README.txt @@ -15,4 +15,5 @@ designation. linux.x86 - these files will only be installed on a 32-bit Linux Operating System. linux.x86_64 - these files will only be installed on a 64-bit Linux Operating System. win32.x86 - these files will only be installed on a 32-bit MS Windows Operating System. + win32.amd64 - these files will only be installed on a 64-bit Windows Operating System. macosx.x86 - these files will only be installed on a 32-bit Apple OS X Operating System. \ No newline at end of file diff --git a/cave/build/static/win32.amd64/alertviz/alertviz.bat b/cave/build/static/win32.amd64/alertviz/alertviz.bat new file mode 100644 index 0000000000..a5da035812 --- /dev/null +++ b/cave/build/static/win32.amd64/alertviz/alertviz.bat @@ -0,0 +1,65 @@ +@echo OFF + +REM Always use the System32 (64-bit) reg.exe. +SET REG_EXE=C:\Windows\System32\reg.exe + +REM Determine where we are located. +SET CONTAINING_DIRECTORY=%~dp0 + +REM Prepare the environment. + +REM Registry Query Variables. +SET A2_JAVA_REG="HKLM\Software\Raytheon\Runtime Environment\AWIPS II Java" +SET A2_PYTHON_REG="HKLM\Software\Raytheon\Runtime Environment\AWIPS II Python" +REM Determine where AWIPS II Java (the jre) is located. +%REG_EXE% QUERY %A2_JAVA_REG% /v JavaJreDirectory > NUL 2>&1 +IF ERRORLEVEL 1 (echo ENVIRONMENT ERROR - Unable to find AWIPS II Java. && PAUSE && EXIT) +FOR /F "tokens=2* delims= " %%A IN ( +'%REG_EXE% QUERY %A2_JAVA_REG% /v JavaJreDirectory') DO ( +SET JavaJreDirectory=%%B) +REM Determine where AWIPS II Python is located. +%REG_EXE% QUERY %A2_PYTHON_REG% /v PythonInstallDirectory > NUL 2>&1 +IF ERRORLEVEL 1 (echo ENVIRONMENT ERROR - Unable to find AWIPS II Python. && PAUSE && EXIT) +FOR /F "tokens=2* delims= " %%A IN ( +'%REG_EXE% QUERY %A2_PYTHON_REG% /v PythonInstallDirectory') DO ( +SET PythonInstallDirectory=%%B) + +REM Add Java and Python to the path. +SET Path=%PythonInstallDirectory%;%PythonInstallDirectory%\DLLs;%Path% +SET Path=%JavaJreDirectory%\bin;%Path% +REM Define 'PythonPath'. +SET PythonPath=%PythonInstallDirectory%\Lib\lib-tk;%PythonPath% +SET PythonPath=%PythonInstallDirectory%\DLLs;%PythonPath% +SET PythonPath=%PythonInstallDirectory%\Lib;%PythonPath% +SET PythonPath=%PythonInstallDirectory%;%PythonPath% + +REM Eliminate variables that will no longer be used. +SET PythonInstallDirectory= +SET JavaJreDirectory= +SET REG_EXE= +SET A2_JAVA_REG= +SET A2_PYTHON_REG= + +REM Determine where we will be logging to. +SET HOME_DIRECTORY=%HOMEDRIVE%%HOMEPATH% +SET CAVEDATA_LOG_DIRECTORY=%HOMEDRIVE%%HOMEPATH%\caveData\logs +SET CONSOLE_LOG_DIRECTORY=%CAVEDATA_LOG_DIRECTORY%\consoleLogs\%COMPUTERNAME% +IF NOT EXIST "%CONSOLE_LOG_DIRECTORY%" (MKDIR "%CONSOLE_LOG_DIRECTORY%") + +echo Starting ALERTVIZ; leave this CMD window open to enable AlertViz 'restart'. +REM Start AlertViz (and implement the alertviz restart capability). +:AlertVizLoopStart +SET RND=%random% +SET RND_DATETIME_FILE=%TMP%\awips2dt_%RND%.tmp +REM Python is used to retrieve the current date and time because the order +REM of the Windows date/time fields is not necessarily guaranteed and the +REM Windows date/time fields can only be extracted using substring operations +REM instead of -formatter- strings like Linux allows. +python -c "from datetime import datetime; print datetime.now().strftime('%%Y%%m%%d_%%H%%M%%S');" > %RND_DATETIME_FILE% +SET /p LOG_DATETIME= < %RND_DATETIME_FILE% +DEL %RND_DATETIME_FILE% +"%CONTAINING_DIRECTORY%alertviz.exe" %* > "%CONSOLE_LOG_DIRECTORY%\alertviz_%LOG_DATETIME%.log" 2>&1 +IF %ERRORLEVEL% == 0 (EXIT) +echo Restarting AlertViz. +GOTO AlertVizLoopStart + diff --git a/cave/build/static/win32.amd64/cave/cave.bat b/cave/build/static/win32.amd64/cave/cave.bat new file mode 100644 index 0000000000..5ea5df3de3 --- /dev/null +++ b/cave/build/static/win32.amd64/cave/cave.bat @@ -0,0 +1,68 @@ +@echo OFF + +REM Always use the System32 (64-bit) reg.exe. +SET REG_EXE=C:\Windows\System32\reg.exe + +REM Determine where we are located. +SET CONTAINING_DIRECTORY=%~dp0 + +REM Prepare the environment. + +REM Registry Query Variables. +SET A2_JAVA_REG="HKLM\Software\Raytheon\Runtime Environment\AWIPS II Java" +SET A2_PYTHON_REG="HKLM\Software\Raytheon\Runtime Environment\AWIPS II Python" +REM Determine where AWIPS II Java (the jre) is located. +%REG_EXE% QUERY %A2_JAVA_REG% /v JavaJreDirectory > NUL 2>&1 +IF ERRORLEVEL 1 (echo ENVIRONMENT ERROR - Unable to find AWIPS II Java. && PAUSE && EXIT) +FOR /F "tokens=2* delims= " %%A IN ( +'%REG_EXE% QUERY %A2_JAVA_REG% /v JavaJreDirectory') DO ( +SET JavaJreDirectory=%%B) +REM Determine where AWIPS II Python is located. +%REG_EXE% QUERY %A2_PYTHON_REG% /v PythonInstallDirectory > NUL 2>&1 +IF ERRORLEVEL 1 (echo ENVIRONMENT ERROR - Unable to find AWIPS II Python. && PAUSE && EXIT) +FOR /F "tokens=2* delims= " %%A IN ( +'%REG_EXE% QUERY %A2_PYTHON_REG% /v PythonInstallDirectory') DO ( +SET PythonInstallDirectory=%%B) + +REM Add Java and Python to the path. +SET Path=%PythonInstallDirectory%;%PythonInstallDirectory%\DLLs;%Path% +SET Path=%JavaJreDirectory%\bin;%Path% +REM Add the CAVE lib directory to the path. +SET Path=%CONTAINING_DIRECTORY%lib;%Path% +REM Define 'PythonPath'. +SET PythonPath=%CONTAINING_DIRECTORY%lib;%PythonPath% +SET PythonPath=%PythonInstallDirectory%\Lib\lib-tk;%PythonPath% +SET PythonPath=%PythonInstallDirectory%\DLLs;%PythonPath% +SET PythonPath=%PythonInstallDirectory%\Lib;%PythonPath% +SET PythonPath=%PythonInstallDirectory%;%PythonPath% + +REM Eliminate variables that will no longer be used. +SET PythonInstallDirectory= +SET JavaJreDirectory= +SET REG_EXE= +SET A2_JAVA_REG= +SET A2_PYTHON_REG= + +REM Determine where we will be logging to. +SET HOME_DIRECTORY=%HOMEDRIVE%%HOMEPATH% +SET CAVEDATA_LOG_DIRECTORY=%HOMEDRIVE%%HOMEPATH%\caveData\logs +SET CONSOLE_LOG_DIRECTORY=%CAVEDATA_LOG_DIRECTORY%\consoleLogs\%COMPUTERNAME% +IF NOT EXIST "%CONSOLE_LOG_DIRECTORY%" (MKDIR "%CONSOLE_LOG_DIRECTORY%") + +SET RND=%random% +SET RND_DATETIME_FILE=%TMP%\awips2dt_%RND%.tmp +REM Python is used to retrieve the current date and time because the order +REM of the Windows date/time fields is not necessarily guaranteed and the +REM Windows date/time fields can only be extracted using substring operations +REM instead of -formatter- strings like Linux allows. +python -c "from datetime import datetime; print datetime.now().strftime('%%Y%%m%%d_%%H%%M%%S');" > %RND_DATETIME_FILE% +SET /p LOG_DATETIME= < %RND_DATETIME_FILE% +DEL %RND_DATETIME_FILE% + +echo THIS CMD WINDOW CAN BE CLOSED AT ANY TIME! +cd %HOMEPATH% +REM Start CAVE. +"%CONTAINING_DIRECTORY%cave.exe" %* > "%CONSOLE_LOG_DIRECTORY%\cave_%LOG_DATETIME%.log" 2>&1 +IF ERRORLEVEL 1 (echo CAVE ERROR - check the logs for additional information. && PAUSE) + +EXIT diff --git a/msi/AWIPSII.CAVE/AWIPSII.CAVE/AWIPSII.wxs b/msi/AWIPSII.CAVE/AWIPSII.CAVE/AWIPSII.wxs index 43f0b45823..ff3181a90c 100644 --- a/msi/AWIPSII.CAVE/AWIPSII.CAVE/AWIPSII.wxs +++ b/msi/AWIPSII.CAVE/AWIPSII.CAVE/AWIPSII.wxs @@ -24,14 +24,30 @@ - - - - + + + + + + + + + + + + + @@ -55,6 +71,7 @@ + @@ -63,20 +80,16 @@ + - - - - + diff --git a/msi/build/A2Staging/Scripts/WiXBuild.ps1 b/msi/build/A2Staging/Scripts/WiXBuild.ps1 index f246f81f19e4538a9adbc80e3416193913caa939..1e6006f90691528a9f6d02d05817f818e994d8e4 100644 GIT binary patch delta 226 zcmZ3ZG(~AcC?jhSLn=e=WI0YrWj%%@hD3%E1_g#Rh9ZW1hFl=4gdqbcufUKDN!w}3+0%WBCMe-RSGF1#ds2UmcfZ8h