From 8a93957c640ccb7bd8b8d1f8e2a80627032abd80 Mon Sep 17 00:00:00 2001 From: samvaio Date: Mon, 30 Jan 2017 06:47:49 +0530 Subject: [PATCH 1/2] added libs to support 32bit windows --- scripts/Latest.bat | 44 ++++++++++++++++++++++++++++++++++++++------ scripts/Stable.bat | 44 ++++++++++++++++++++++++++++++++++++++------ 2 files changed, 76 insertions(+), 12 deletions(-) diff --git a/scripts/Latest.bat b/scripts/Latest.bat index 8d59ec86..9af911a7 100644 --- a/scripts/Latest.bat +++ b/scripts/Latest.bat @@ -1,5 +1,5 @@ @ECHO off -TITLE Downloading NadekoBot, please wait +TITLE Downloading Latest Build of NadekoBot... ::Setting convenient to read variables which don't delete the windows temp folder SET root=%~dp0 CD /D %root% @@ -24,30 +24,43 @@ ECHO Downloading Nadeko... ECHO. git clone -b dev --recursive --depth 1 --progress https://github.com/Kwoth/NadekoBot.git >nul IF %ERRORLEVEL% EQU 128 (GOTO :giterror) -TITLE Installing NadekoBot, please wait +TITLE Installing NadekoBot, please wait... ECHO. -ECHO Installing... +ECHO Installing Discord.Net(1/4)... ::Building Nadeko CD /D %build1% dotnet restore >nul 2>&1 +ECHO Installing Discord.Net(2/4)... CD /D %build2% dotnet restore >nul 2>&1 +ECHO Installing Discord.Net(3/4)... CD /D %build3% dotnet restore >nul 2>&1 +ECHO Installing Discord.Net(4/4)... CD /D %build4% dotnet restore >nul 2>&1 +ECHO. +ECHO Discord.Net installation completed successfully... +ECHO. +ECHO Installing NadekoBot... CD /D %build5% dotnet restore >nul 2>&1 dotnet build --configuration Release >nul 2>&1 +ECHO. +ECHO NadekoBot installation completed successfully... ::Attempts to backup old files if they currently exist in the same folder as the batch file IF EXIST "%root%NadekoBot\" (GOTO :backupinstall) :freshinstall ::Moves the NadekoBot folder to keep things tidy + ECHO. + ECHO Moving files, Please wait... ROBOCOPY "%root%NadekoInstall_Temp" "%rootdir%" /E /MOVE >nul 2>&1 IF %ERRORLEVEL% GEQ 8 (GOTO :copyerror) - GOTO :end + IF EXIST "%PROGRAMFILES(X86)%" (GOTO 64BIT) ELSE (GOTO 32BIT) :backupinstall - TITLE Backing up old files + TITLE Backing up old files... + ECHO. + ECHO Moving and Backing up old files... ::Recursively copies all files and folders from NadekoBot to NadekoBot_Old ROBOCOPY "%root%NadekoBot" "%root%NadekoBot_Old" /MIR >nul 2>&1 IF %ERRORLEVEL% GEQ 8 (GOTO :copyerror) @@ -70,7 +83,7 @@ IF EXIST "%root%NadekoBot\" (GOTO :backupinstall) RMDIR "%root%NadekoBot\" /S /Q >nul 2>&1 ROBOCOPY "%root%NadekoInstall_Temp" "%rootdir%" /E /MOVE >nul 2>&1 IF %ERRORLEVEL% GEQ 8 (GOTO :copyerror) - GOTO :end + IF EXIST "%PROGRAMFILES(X86)%" (GOTO 64BIT) ELSE (GOTO 32BIT) :dotnet ::Terminates the batch script if it can't run dotnet --version TITLE Error! @@ -102,6 +115,25 @@ IF EXIST "%root%NadekoBot\" (GOTO :backupinstall) PAUSE >nul 2>&1 CD /D "%root%" GOTO :EOF +:64BIT +ECHO. +ECHO Your System Architecture is 64bit... +GOTO end +:32BIT +ECHO. +ECHO Your System Architecture is 32bit... +timeout /t 5 +ECHO. +ECHO Downloading libsodium.dll and libopus.dll... +SET "FILENAME=%~dp0\NadekoBot\src\NadekoBot\libsodium.dll" +bitsadmin.exe /transfer "Downloading libsodium.dll" /priority high https://github.com/Kwoth/NadekoBot/raw/dev/src/NadekoBot/_libs/32/libsodium.dll "%FILENAME%" +ECHO libsodium.dll downloaded. +ECHO. +timeout /t 5 +SET "FILENAME=%~dp0\NadekoBot\src\NadekoBot\opus.dll" +bitsadmin.exe /transfer "Downloading libopus.dll" /priority high https://github.com/Kwoth/NadekoBot/raw/dev/src/NadekoBot/_libs/32/opus.dll "%FILENAME%" +ECHO libopus.dll downloaded. +GOTO end :end ::Normal execution of end of script TITLE Installation complete! diff --git a/scripts/Stable.bat b/scripts/Stable.bat index a2016889..827326b3 100644 --- a/scripts/Stable.bat +++ b/scripts/Stable.bat @@ -1,5 +1,5 @@ @ECHO off -TITLE Downloading NadekoBot, please wait +TITLE Downloading Stable Build of NadekoBot... ::Setting convenient to read variables which don't delete the windows temp folder SET root=%~dp0 CD /D %root% @@ -24,30 +24,43 @@ ECHO Downloading Nadeko... ECHO. git clone -b master --recursive --depth 1 --progress https://github.com/Kwoth/NadekoBot.git >nul IF %ERRORLEVEL% EQU 128 (GOTO :giterror) -TITLE Installing NadekoBot, please wait +TITLE Installing NadekoBot, please wait... ECHO. -ECHO Installing... +ECHO Installing Discord.Net(1/4)... ::Building Nadeko CD /D %build1% dotnet restore >nul 2>&1 +ECHO Installing Discord.Net(2/4)... CD /D %build2% dotnet restore >nul 2>&1 +ECHO Installing Discord.Net(3/4)... CD /D %build3% dotnet restore >nul 2>&1 +ECHO Installing Discord.Net(4/4)... CD /D %build4% dotnet restore >nul 2>&1 +ECHO. +ECHO Discord.Net installation completed successfully... +ECHO. +ECHO Installing NadekoBot... CD /D %build5% dotnet restore >nul 2>&1 dotnet build --configuration Release >nul 2>&1 +ECHO. +ECHO NadekoBot installation completed successfully... ::Attempts to backup old files if they currently exist in the same folder as the batch file IF EXIST "%root%NadekoBot\" (GOTO :backupinstall) :freshinstall ::Moves the NadekoBot folder to keep things tidy + ECHO. + ECHO Moving files, Please wait... ROBOCOPY "%root%NadekoInstall_Temp" "%rootdir%" /E /MOVE >nul 2>&1 IF %ERRORLEVEL% GEQ 8 (GOTO :copyerror) - GOTO :end + IF EXIST "%PROGRAMFILES(X86)%" (GOTO 64BIT) ELSE (GOTO 32BIT) :backupinstall - TITLE Backing up old files + TITLE Backing up old files... + ECHO. + ECHO Moving and Backing up old files... ::Recursively copies all files and folders from NadekoBot to NadekoBot_Old ROBOCOPY "%root%NadekoBot" "%root%NadekoBot_Old" /MIR >nul 2>&1 IF %ERRORLEVEL% GEQ 8 (GOTO :copyerror) @@ -70,7 +83,7 @@ IF EXIST "%root%NadekoBot\" (GOTO :backupinstall) RMDIR "%root%NadekoBot\" /S /Q >nul 2>&1 ROBOCOPY "%root%NadekoInstall_Temp" "%rootdir%" /E /MOVE >nul 2>&1 IF %ERRORLEVEL% GEQ 8 (GOTO :copyerror) - GOTO :end + IF EXIST "%PROGRAMFILES(X86)%" (GOTO 64BIT) ELSE (GOTO 32BIT) :dotnet ::Terminates the batch script if it can't run dotnet --version TITLE Error! @@ -102,6 +115,25 @@ IF EXIST "%root%NadekoBot\" (GOTO :backupinstall) PAUSE >nul 2>&1 CD /D "%root%" GOTO :EOF +:64BIT +ECHO. +ECHO Your System Architecture is 64bit... +GOTO end +:32BIT +ECHO. +ECHO Your System Architecture is 32bit... +timeout /t 5 +ECHO. +ECHO Downloading libsodium.dll and libopus.dll... +SET "FILENAME=%~dp0\NadekoBot\src\NadekoBot\libsodium.dll" +bitsadmin.exe /transfer "Downloading libsodium.dll" /priority high https://github.com/Kwoth/NadekoBot/raw/dev/src/NadekoBot/_libs/32/libsodium.dll "%FILENAME%" +ECHO libsodium.dll downloaded. +ECHO. +timeout /t 5 +SET "FILENAME=%~dp0\NadekoBot\src\NadekoBot\opus.dll" +bitsadmin.exe /transfer "Downloading libopus.dll" /priority high https://github.com/Kwoth/NadekoBot/raw/dev/src/NadekoBot/_libs/32/opus.dll "%FILENAME%" +ECHO libopus.dll downloaded. +GOTO end :end ::Normal execution of end of script TITLE Installation complete! From a5b40ae608980485bf1f97ca7df8cd95d04414bd Mon Sep 17 00:00:00 2001 From: samvaio Date: Wed, 1 Feb 2017 03:08:31 +0530 Subject: [PATCH 2/2] changed libopus names to opus (minor) --- scripts/Latest.bat | 6 +++--- scripts/Stable.bat | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/Latest.bat b/scripts/Latest.bat index 9af911a7..a4f9e15b 100644 --- a/scripts/Latest.bat +++ b/scripts/Latest.bat @@ -124,15 +124,15 @@ ECHO. ECHO Your System Architecture is 32bit... timeout /t 5 ECHO. -ECHO Downloading libsodium.dll and libopus.dll... +ECHO Downloading libsodium.dll and opus.dll... SET "FILENAME=%~dp0\NadekoBot\src\NadekoBot\libsodium.dll" bitsadmin.exe /transfer "Downloading libsodium.dll" /priority high https://github.com/Kwoth/NadekoBot/raw/dev/src/NadekoBot/_libs/32/libsodium.dll "%FILENAME%" ECHO libsodium.dll downloaded. ECHO. timeout /t 5 SET "FILENAME=%~dp0\NadekoBot\src\NadekoBot\opus.dll" -bitsadmin.exe /transfer "Downloading libopus.dll" /priority high https://github.com/Kwoth/NadekoBot/raw/dev/src/NadekoBot/_libs/32/opus.dll "%FILENAME%" -ECHO libopus.dll downloaded. +bitsadmin.exe /transfer "Downloading opus.dll" /priority high https://github.com/Kwoth/NadekoBot/raw/dev/src/NadekoBot/_libs/32/opus.dll "%FILENAME%" +ECHO opus.dll downloaded. GOTO end :end ::Normal execution of end of script diff --git a/scripts/Stable.bat b/scripts/Stable.bat index 827326b3..f55fc958 100644 --- a/scripts/Stable.bat +++ b/scripts/Stable.bat @@ -124,15 +124,15 @@ ECHO. ECHO Your System Architecture is 32bit... timeout /t 5 ECHO. -ECHO Downloading libsodium.dll and libopus.dll... +ECHO Downloading libsodium.dll and opus.dll... SET "FILENAME=%~dp0\NadekoBot\src\NadekoBot\libsodium.dll" bitsadmin.exe /transfer "Downloading libsodium.dll" /priority high https://github.com/Kwoth/NadekoBot/raw/dev/src/NadekoBot/_libs/32/libsodium.dll "%FILENAME%" ECHO libsodium.dll downloaded. ECHO. timeout /t 5 SET "FILENAME=%~dp0\NadekoBot\src\NadekoBot\opus.dll" -bitsadmin.exe /transfer "Downloading libopus.dll" /priority high https://github.com/Kwoth/NadekoBot/raw/dev/src/NadekoBot/_libs/32/opus.dll "%FILENAME%" -ECHO libopus.dll downloaded. +bitsadmin.exe /transfer "Downloading opus.dll" /priority high https://github.com/Kwoth/NadekoBot/raw/dev/src/NadekoBot/_libs/32/opus.dll "%FILENAME%" +ECHO opus.dll downloaded. GOTO end :end ::Normal execution of end of script