Skip to content

Commit

Permalink
simplified install_dependencies.bat
Browse files Browse the repository at this point in the history
  • Loading branch information
srbcheema1 committed Jul 24, 2018
1 parent 05f9376 commit 2c94e17
Showing 1 changed file with 4 additions and 29 deletions.
33 changes: 4 additions & 29 deletions install_dependencies.bat
@@ -1,8 +1,5 @@
@echo off

if %1'==/?' goto :help

:main
if not exist windows_dependencies mkdir windows_dependencies
if exist windows_dependencies/odb exit /b
cd windows_dependencies
Expand All @@ -14,18 +11,10 @@ powershell -command "(new-object System.Net.WebClient).DownloadFile('https://www
powershell -command "(new-object System.Net.WebClient).DownloadFile('https://www.sqlite.org/2018/sqlite-amalgamation-3240000.zip','sqlite-amalgamation.zip')"

:: Unzip zip files
ver | findstr /i "10\.0\." > nul && (set use=expand_archive)
if "%use%" == "expand_archive" (
powershell -command "Expand-Archive libodb-2.4.0.zip ."
powershell -command "Expand-Archive libodb-sqlite-2.4.0.zip ."
powershell -command "Expand-Archive sqlite-dll.zip ."
powershell -command "Expand-Archive sqlite-amalgamation.zip ."
) ELSE (
unzip libodb-2.4.0.zip
unzip libodb-sqlite-2.4.0.zip
unzip sqlite-dll.zip
unzip sqlite-amalgamation.zip
)
powershell -command "Expand-Archive libodb-2.4.0.zip ."
powershell -command "Expand-Archive libodb-sqlite-2.4.0.zip ."
powershell -command "Expand-Archive sqlite-dll.zip ."
powershell -command "Expand-Archive sqlite-amalgamation.zip ."

:: Restructure directory
move libodb-sqlite-2.4.0\etc\sqlite .\
Expand All @@ -47,17 +36,3 @@ rmdir /s /q sqlite-amalgamation-3240000

dir
cd ..

goto :eof

:help
echo Usage:
echo install_dependencies.bat run install scripts
echo install_dependencies.bat /? displays help
echo.
echo it downloads the given dependencies:
echo - odb common runtime library libodb-2.4.0
echo - odb sqlite runtime library libodb-sqlite-2.4.0
echo.
echo Requires unzip for windows version below 10

0 comments on commit 2c94e17

Please sign in to comment.