mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-27 17:45:40 -05:00
Installation almost over.
This commit is contained in:
parent
0050bef8f1
commit
ffa8094a1d
3 changed files with 110 additions and 24 deletions
|
@ -2,11 +2,11 @@
|
|||
[32]
|
||||
nodejs=http://nodejs.org/dist/v0.10.25/node-v0.10.25-x86.msi
|
||||
ruby=http://dl.bintray.com/oneclick/rubyinstaller/rubyinstaller-2.0.0-p353.exe?direct
|
||||
python=http://www.python.org/ftp/python/2.7.6/python-2.7.6.msi
|
||||
python=https://www.python.org/ftp/python/2.7.6/python-2.7.6.msi
|
||||
[64]
|
||||
nodejs=http://nodejs.org/dist/v0.10.25/x64/node-v0.10.25-x64.msi
|
||||
ruby=http://dl.bintray.com/oneclick/rubyinstaller/rubyinstaller-2.0.0-p353-x64.exe?direct
|
||||
python=http://www.python.org/ftp/python/2.7.6/python-2.7.6.amd64.msi
|
||||
python=https://www.python.org/ftp/python/2.7.6/python-2.7.6.amd64.msi
|
||||
winsdk=http://download.microsoft.com/download/A/6/A/A6AC035D-DA3F-4F0C-ADA4-37C8E5D34E3D/winsdk_web.exe
|
||||
[general]
|
||||
gitbash=https://msysgit.googlecode.com/files/Git-1.8.5.2-preview20131230.exe
|
||||
|
|
|
@ -1,11 +1,23 @@
|
|||
set "temp_directory=c:\\.coco\\"
|
||||
set "curl_app=..\\utilities\\curl.exe"
|
||||
set "zu_app=..\\utilities\\7za.exe"
|
||||
set "temp_directory=c:\.coco\"
|
||||
set "curl_app=..\utilities\curl.exe"
|
||||
set "zu_app=..\utilities\7za.exe"
|
||||
|
||||
if NOT exist "%temp_directory%" (
|
||||
md %temp_directory%
|
||||
)
|
||||
|
||||
:: =================================================================
|
||||
:: NOTE
|
||||
:: -----------------------------------------------------------------
|
||||
:: For now only mongodb is downloaded in packaged format
|
||||
:: Mongodb doesn't require any packaging so we just hardcode
|
||||
:: the exception in this file.
|
||||
|
||||
:: If we have ever another install file, that is packaged,
|
||||
:: We'll have to make sure that mongodb is handled as an exception,
|
||||
:: rather than that it's behaviour is the default for zip files.
|
||||
:: =================================================================
|
||||
|
||||
call get_local_text install-process-prefix
|
||||
call get_local_text install-process-sufix
|
||||
|
||||
|
@ -13,41 +25,80 @@ call ask_question "!install_process_prefix! %1 !install_process_sufix!"
|
|||
call print_dashed_seperator
|
||||
|
||||
if "%result%"=="false" (
|
||||
get_extension %2 download_extension
|
||||
call get_extension %2 download_extension
|
||||
|
||||
call get_local_text install-process-downloading
|
||||
echo %1 !install_process_downloading!
|
||||
set "install_file=!temp_directory!%1.!download_extension!"
|
||||
set "install_file=%temp_directory%%1.%download_extension%"
|
||||
%curl_app% -k %2 -o !install_file!
|
||||
|
||||
if "%download_extension%"=="zip" (
|
||||
pause
|
||||
if "%1"=="mongodb" (
|
||||
pause
|
||||
call get_local_text install-process-unzipping
|
||||
echo %1 !install_process_unzipping!
|
||||
|
||||
set "package_path=!temp_directory!%1\\"
|
||||
set "package_path=!temp_directory!%1\"
|
||||
if exist "!package_path!" (
|
||||
rmdir /s /q !package_path!
|
||||
)
|
||||
|
||||
%zu_app% x !install_file! -o!package_path!
|
||||
pause
|
||||
)
|
||||
%zu_app% x %install_file% -o%package_path% -y
|
||||
|
||||
call get_local_text install-process-installing
|
||||
echo %1 !install_process_installing!
|
||||
echo.
|
||||
if "%download_extension%"=="zip" (
|
||||
for /f "tokens=*" %%a in ( dir %package_path% /b *.exe' ) do (
|
||||
set unpacked_installed_file=%%a
|
||||
for /f "delims=" %%a in ('dir %package_path% /on /ad /b') do @set mongodb_original_directory=%%a
|
||||
|
||||
call print_dashed_seperator
|
||||
goto:get_mongodb_path
|
||||
|
||||
:get_mongodb_path
|
||||
set /p "mongodb_path=define path: "
|
||||
if exist "%mongodb_path%" (
|
||||
call ask_question "That path already exists, are you sure you want to overwrite it?"
|
||||
if "%result%"=="false" (
|
||||
call print_dashed_seperator
|
||||
goto:get_mongodb_path
|
||||
) else (
|
||||
rmdir /s /q %mongodb_path%
|
||||
)
|
||||
)
|
||||
md %mongodb_path%
|
||||
)
|
||||
start /WAIT %unpacked_installed_file%
|
||||
%systemroot%\System32\xcopy %mongodb_original_directory% %path% /r /h /s /e /y
|
||||
goto:clean_up
|
||||
) else (
|
||||
start /WAIT !install_file!
|
||||
if "%download_extension%"=="zip" (
|
||||
call get_local_text install-process-unzipping
|
||||
echo %1 !install_process_unzipping!
|
||||
|
||||
set "package_path=!temp_directory!%1\\"
|
||||
if exist "!package_path!" (
|
||||
rmdir /s /q !package_path!
|
||||
)
|
||||
|
||||
%zu_app% x !install_file! -o!package_path!
|
||||
pause
|
||||
)
|
||||
|
||||
call get_local_text install-process-installing
|
||||
echo %1 !install_process_installing!
|
||||
echo.
|
||||
if "%download_extension%"=="zip" (
|
||||
for /f "tokens=*" %%a in ( dir %package_path% /b *.exe' ) do (
|
||||
set unpacked_installed_file=%%a
|
||||
)
|
||||
start /WAIT %unpacked_installed_file%
|
||||
) else (
|
||||
start /WAIT !install_file!
|
||||
)
|
||||
|
||||
goto:clean_up
|
||||
)
|
||||
)
|
||||
|
||||
call get_local_text install-process-cleaning
|
||||
echo %1 !install_process_cleaning!
|
||||
rmdir /s /q "!temp_directory!"
|
||||
:clean_up
|
||||
call get_local_text install-process-cleaning
|
||||
echo %1 !install_process_cleaning!
|
||||
rmdir /s /q "!temp_directory!"
|
||||
|
||||
call print_dashed_seperator
|
||||
call print_dashed_seperator
|
||||
goto:eof
|
35
scripts/windows/coco-dev-setup/batch/scripts/package_install_test.bat
Executable file
35
scripts/windows/coco-dev-setup/batch/scripts/package_install_test.bat
Executable file
|
@ -0,0 +1,35 @@
|
|||
@echo off
|
||||
setlocal EnableDelayedExpansion
|
||||
set "temp_directory=c:\.coco\"
|
||||
set "curl_app=..\utilities\curl.exe"
|
||||
set "zu_app=..\utilities\7za.exe"
|
||||
|
||||
set "install_file=c:\.coco\mongodb.zip"
|
||||
set "package_path=%temp_directory%mongodb"
|
||||
|
||||
%zu_app% x %install_file% -o%package_path% -y
|
||||
|
||||
for /f "delims=" %%a in ('dir %package_path% /on /ad /b') do @set mongodb_original_directory=%%a
|
||||
|
||||
call print_dashed_seperator
|
||||
goto:get_mongodb_path
|
||||
|
||||
:get_mongodb_path
|
||||
set /p "mongodb_path=define path: "
|
||||
if exist "%mongodb_path%" (
|
||||
call ask_question "That path already exists, are you sure you want to overwrite it?"
|
||||
if "%result%"=="false" (
|
||||
call print_dashed_seperator
|
||||
goto:get_mongodb_path
|
||||
) else (
|
||||
rmdir /s /q %mongodb_path%
|
||||
)
|
||||
)
|
||||
md %mongodb_path%
|
||||
)
|
||||
|
||||
%systemroot%\System32\xcopy %mongodb_original_directory% %path% /r /h /s /e /y
|
||||
|
||||
pause
|
||||
|
||||
endlocal
|
Loading…
Reference in a new issue