From d909a97e8b3feced9b88a6501e591b6ef6873e85 Mon Sep 17 00:00:00 2001 From: David Main <51991544+StriderDM@users.noreply.github.com> Date: Fri, 17 Sep 2021 10:13:59 +0200 Subject: [PATCH] fix: remove sqlite from windows installer and scripts sqlite is now static linked in the windows binaries, so installing sqlite separately via scripts can be removed. --- .../windows/runtime/source_base_node_env.bat | 34 -------------- .../windows/runtime/start_tari_base_node.bat | 1 - .../runtime/source_console_wallet_env.bat | 34 -------------- .../runtime/start_tari_console_wallet.bat | 1 - buildtools/install_sqlite.bat | 47 ------------------- buildtools/windows_inno_installer.iss | 2 - 6 files changed, 119 deletions(-) delete mode 100644 buildtools/install_sqlite.bat diff --git a/applications/tari_base_node/windows/runtime/source_base_node_env.bat b/applications/tari_base_node/windows/runtime/source_base_node_env.bat index c0ad98aac5..2146186902 100644 --- a/applications/tari_base_node/windows/runtime/source_base_node_env.bat +++ b/applications/tari_base_node/windows/runtime/source_base_node_env.bat @@ -27,40 +27,6 @@ if ["%my_exe%"]==[""] ( pause exit /b 10101 ) -if ["%sqlite_runtime%"]==[""] ( - echo Problem with "sqlite_runtime" environment variable: '%sqlite_runtime%' - pause - exit /b 10101 -) - -rem Verify SQLite's location and prepend the default location to the system path if it exist -if exist "%TARI_SQLITE_DIR%\%sqlite_runtime%" ( - set "path=%TARI_SQLITE_DIR%;%path%" - echo. - echo Default location of "%sqlite_runtime%" prepended to the system path -) else if exist "%USERPROFILE%\.sqlite\%sqlite_runtime%" ( - set "path=%USERPROFILE%\.sqlite;%path%" - echo. - echo Default location of "%sqlite_runtime%" prepended to the system path -) else ( - set FOUND= - for %%X in (%sqlite_runtime%) do (set FOUND=%%~$PATH:X) - if defined FOUND ( - echo. - echo "%sqlite_runtime%" found in system path: - where "%sqlite_runtime%" - ) else ( - echo. - echo Note: "%sqlite_runtime%" not found in the default location or in the system path; this may be a problem - if ["%TARI_SQLITE_DIR%"]==["%USERPROFILE%\.sqlite"] ( - echo {default location: tried "%TARI_SQLITE_DIR%"} - ) else ( - echo {default location: tried "%TARI_SQLITE_DIR%" and "%USERPROFILE%\.sqlite"} - ) - echo. - pause - ) -) rem Find the base node executable if exist "%my_exe_path%\%my_exe%" ( diff --git a/applications/tari_base_node/windows/runtime/start_tari_base_node.bat b/applications/tari_base_node/windows/runtime/start_tari_base_node.bat index e9e2412cf2..effe9ea1ee 100644 --- a/applications/tari_base_node/windows/runtime/start_tari_base_node.bat +++ b/applications/tari_base_node/windows/runtime/start_tari_base_node.bat @@ -5,7 +5,6 @@ echo Set up environment variables echo ---------------------------- rem These are the base node executable and SQLite dynamic link library names set my_exe=tari_base_node.exe -set sqlite_runtime=sqlite3.dll rem This is the location of the configuration and identity files set config_path=%~dp0..\config diff --git a/applications/tari_console_wallet/windows/runtime/source_console_wallet_env.bat b/applications/tari_console_wallet/windows/runtime/source_console_wallet_env.bat index 9ffdd9471e..8c188b7bde 100644 --- a/applications/tari_console_wallet/windows/runtime/source_console_wallet_env.bat +++ b/applications/tari_console_wallet/windows/runtime/source_console_wallet_env.bat @@ -27,40 +27,6 @@ if ["%my_exe%"]==[""] ( pause exit /b 10101 ) -if ["%sqlite_runtime%"]==[""] ( - echo Problem with "sqlite_runtime" environment variable: '%sqlite_runtime%' - pause - exit /b 10101 -) - -rem Verify SQLite's location and prepend the default location to the system path if it exist -if exist "%TARI_SQLITE_DIR%\%sqlite_runtime%" ( - set "path=%TARI_SQLITE_DIR%;%path%" - echo. - echo Default location of "%sqlite_runtime%" prepended to the system path -) else if exist "%USERPROFILE%\.sqlite\%sqlite_runtime%" ( - set "path=%USERPROFILE%\.sqlite;%path%" - echo. - echo Default location of "%sqlite_runtime%" prepended to the system path -) else ( - set FOUND= - for %%X in (%sqlite_runtime%) do (set FOUND=%%~$PATH:X) - if defined FOUND ( - echo. - echo "%sqlite_runtime%" found in system path: - where "%sqlite_runtime%" - ) else ( - echo. - echo Note: "%sqlite_runtime%" not found in the default location or in the system path; this may be a problem - if ["%TARI_SQLITE_DIR%"]==["%USERPROFILE%\.sqlite"] ( - echo {default location: tried "%TARI_SQLITE_DIR%"} - ) else ( - echo {default location: tried "%TARI_SQLITE_DIR%" and "%USERPROFILE%\.sqlite"} - ) - echo. - pause - ) -) rem Find the console wallet executable if exist "%my_exe_path%\%my_exe%" ( diff --git a/applications/tari_console_wallet/windows/runtime/start_tari_console_wallet.bat b/applications/tari_console_wallet/windows/runtime/start_tari_console_wallet.bat index b41cb22540..6f8a4eaf8c 100644 --- a/applications/tari_console_wallet/windows/runtime/start_tari_console_wallet.bat +++ b/applications/tari_console_wallet/windows/runtime/start_tari_console_wallet.bat @@ -5,7 +5,6 @@ echo Set up environment variables echo ---------------------------- rem These are the console wallet executable and SQLite dynamic link library names set my_exe=tari_console_wallet.exe -set sqlite_runtime=sqlite3.dll rem This is the location of the configuration and identity files set config_path=%~dp0..\config diff --git a/buildtools/install_sqlite.bat b/buildtools/install_sqlite.bat deleted file mode 100644 index 9432b74b64..0000000000 --- a/buildtools/install_sqlite.bat +++ /dev/null @@ -1,47 +0,0 @@ -@echo off - -rem Control variables -rem - SQLite {Note: `powershell` cannot `expand-archive` to `C:\Program Files (x86)`} -set sqlite_zip=sqlite-dll-win64-x64-3310100.zip -set sqlite_folder=%USERPROFILE%\.sqlite -set sqlite_runtime=sqlite3.dll - -echo Downloading and installing SQLite... -echo. - -rem Install dependencies -call :INSTALL_SQLITE -goto END: - -:INSTALL_SQLITE -rem Download install file -del /f "%TEMP%\%sqlite_zip%" 2>null -powershell Invoke-WebRequest https://www.sqlite.org/2020/%sqlite_zip% -outfile "%TEMP%\%sqlite_zip%" -rem Install -powershell Expand-Archive -Force -LiteralPath "%TEMP%\%sqlite_zip%" -DestinationPath '%sqlite_folder%' -rem Set Tari environment variables -set TARI_SQLITE_DIR=%sqlite_folder% -setx TARI_SQLITE_DIR %TARI_SQLITE_DIR% -setx /m USERNAME %USERNAME% -rem Test installation -if not exist "%TARI_SQLITE_DIR%\%sqlite_runtime%" ( -echo. - echo. - echo Problem with SQLite installation, "%sqlite_runtime%" not found! - echo {Please try installing this dependency using the manual procedure described in the README file.} - echo. - pause -) else ( - echo. - echo SQLite installation found at "%TARI_SQLITE_DIR%" -) -goto :eof - -:END -echo. -if not [%1]==[NO_PAUSE] ( - pause -) else ( - ping -n 5 localhost>nul -) -if [%errorlevel%]==[10101] exit diff --git a/buildtools/windows_inno_installer.iss b/buildtools/windows_inno_installer.iss index a72d30a788..a2451154d1 100644 --- a/buildtools/windows_inno_installer.iss +++ b/buildtools/windows_inno_installer.iss @@ -115,7 +115,6 @@ Source: "..\common\config\presets\tari_config_example.toml"; DestDir: "{app}\con Source: "tari_logo_purple.ico"; DestDir: "{userdocs}\..\temp\tari_icons"; Flags: ignoreversion Source: "tor.ico"; DestDir: "{userdocs}\..\temp\tari_icons"; Flags: ignoreversion Source: "xmr_logo.ico"; DestDir: "{userdocs}\..\temp\tari_icons"; Flags: ignoreversion -Source: "install_sqlite.bat"; DestDir: "{app}\runtime"; Flags: ignoreversion Source: "install_tor_services.bat"; DestDir: "{app}\runtime"; Flags: ignoreversion Source: "install_vs2019_redist.bat"; DestDir: "{app}\runtime"; Flags: ignoreversion Source: "install_xmrig.bat"; DestDir: "{app}\runtime"; Flags: ignoreversion @@ -149,7 +148,6 @@ Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\{#BaseNodeName}"; ;PrivilegesRequired=admin [Run] -Filename: "{app}\runtime\install_sqlite.bat"; Parameters: "NO_PAUSE"; Flags: runascurrentuser postinstall; Description: "Install SQLite" Filename: "{app}\runtime\install_tor_services.bat"; Parameters: "NO_PAUSE"; Flags: runascurrentuser postinstall; Description: "Install Tor Services" Filename: "{app}\runtime\install_xmrig.bat"; Parameters: "NO_PAUSE"; Flags: runascurrentuser postinstall; Description: "Install XMRig" Filename: "{app}\runtime\install_vs2019_redist.bat"; Parameters: "NO_PAUSE"; Flags: runascurrentuser postinstall; Description: "Install Redistributable for Visual Studio 2019"