2021-04-23 16:20:55 +00:00
|
|
|
set DIR=%~dp0
|
|
|
|
cd "%DIR%"
|
2021-05-20 15:28:53 +00:00
|
|
|
|
|
|
|
if not "%1"=="am_admin" (powershell start -verb runas '%0' am_admin & exit /b)
|
|
|
|
|
2021-07-29 11:22:33 +00:00
|
|
|
@REM Update the Time
|
|
|
|
w32tm /config /manualpeerlist:DC_HostName.DomainName.com /syncfromflags:manual /reliable:yes /update
|
|
|
|
gpupdate /force
|
|
|
|
|
2021-04-23 16:20:55 +00:00
|
|
|
@echo off
|
2021-05-20 15:28:53 +00:00
|
|
|
git stash
|
2021-10-15 06:41:37 +00:00
|
|
|
git checkout lib
|
2021-04-23 16:20:55 +00:00
|
|
|
git pull
|
|
|
|
|
|
|
|
%@Try%
|
|
|
|
@REM Uninstall IO-Server
|
|
|
|
node .\dist\lib\cli\ioServerService.js -m uninstall
|
|
|
|
%@EndTry%
|
|
|
|
:@Catch
|
|
|
|
echo uninstall IO-Server
|
|
|
|
:@EndCatch
|
|
|
|
|
|
|
|
@REM Uninstall all Services
|
|
|
|
for /f "delims=" %%a in ('dir /s /o /b *03-uninstall.bat') do (
|
|
|
|
echo %%a
|
|
|
|
call %%a
|
|
|
|
)
|
|
|
|
|
|
|
|
@REM Delete old Files.
|
2021-04-23 16:28:39 +00:00
|
|
|
rmdir dist /s /q
|
|
|
|
rmdir services /s /q
|
2021-05-20 15:28:53 +00:00
|
|
|
rmdir node_modules /s /q
|
2021-07-29 14:07:26 +00:00
|
|
|
rmdir logs /s /q
|
2021-05-20 15:28:53 +00:00
|
|
|
|
|
|
|
%@Try%
|
|
|
|
@REM Install New Node Packages
|
2021-05-21 10:33:01 +00:00
|
|
|
start /separate /wait cmd /c "npm install" &
|
2021-05-20 15:28:53 +00:00
|
|
|
%@EndTry%
|
|
|
|
:@Catch
|
2021-05-21 07:43:07 +00:00
|
|
|
echo removed node_modules
|
2021-05-20 15:28:53 +00:00
|
|
|
:@EndCatch
|
2021-04-23 16:20:55 +00:00
|
|
|
|
|
|
|
@REM compile
|
|
|
|
%@Try%
|
|
|
|
echo Recompiling
|
|
|
|
call npx tsc -p ./tsconfigBackend.json --pretty
|
|
|
|
%@EndTry%
|
|
|
|
:@Catch
|
|
|
|
echo Expected some errors
|
|
|
|
:@EndCatch
|
|
|
|
|
|
|
|
@REM update the Configuration:
|
|
|
|
node .\dist\modules\wamo\cli\generateConfig.js
|
2021-05-21 07:33:49 +00:00
|
|
|
@REM create the new services
|
2021-10-20 19:06:46 +00:00
|
|
|
@REM node .\dist\lib\cli\createService.js --noFuncs --runInstances --runEveryService --runExtra --layer io-client --log info
|
2021-10-20 19:25:25 +00:00
|
|
|
node .\dist\lib\cli\createService.js --noFuncs --runInstances --runEveryService --runExtra --layer mqtt --log info --params mqtt://mqtt.demonstrator04.local
|
|
|
|
@REM node .\dist\lib\cli\ioServerService.js -m install
|
|
|
|
@REM node .\dist\lib\cli\ioServerService.js -m start
|
2021-04-23 16:20:55 +00:00
|
|
|
|
|
|
|
@REM now reinstall the services
|
|
|
|
|
2021-05-20 15:28:53 +00:00
|
|
|
@REM Install all Services
|
2021-07-29 13:27:35 +00:00
|
|
|
for /f "delims=" %%a in ('dir /s /o /b *00-install.bat') do (
|
2021-04-23 16:20:55 +00:00
|
|
|
echo %%a
|
|
|
|
call %%a
|
2021-07-29 06:37:45 +00:00
|
|
|
)
|
|
|
|
@REM Start all Services
|
2021-07-29 13:27:35 +00:00
|
|
|
for /f "delims=" %%a in ('dir /s /o /b *01-start.bat') do (
|
2021-07-29 06:37:45 +00:00
|
|
|
echo %%a
|
|
|
|
call %%a
|
2021-04-23 16:20:55 +00:00
|
|
|
)
|