Making progress, git checkout is complete, working on configuration...

This commit is contained in:
GlenDC 2014-02-06 01:13:50 +01:00
parent cc8469c208
commit 6138ff8b87
5 changed files with 110 additions and 31 deletions
scripts/windows/coco-dev-setup/batch

View file

@ -18,19 +18,25 @@ IF EXIST "%PROGRAMFILES(X86)%" (
set "ZU-app=utilities\7za.exe"
:: BUGS:
:: + DEBUG ALL STEPS UNTILL NOW DONE
:: TODO:
:: + Write code to install vs if it's not yet installed on users pc
:: + Write Tips...
:: + Write Git Checkout repository code:
:: 1) Let user specify destination
:: 3) Let user specify his username etc...
:: 2) do a git clone with the git application
:: + Configuraton and installation checklist:
:: 1) ... ?!
:: 1) cd codecombat
:: 2) npm install -g bower brunch nodemon sendwithus
:: 3) bower install
:: 4) gem install sass
:: 5) npm install
:: 6) brunch -w
:: Extra... @ Fail run npm install
:: + Copy the automated dev batch file to root folder
:: => Let user define mongo-db directory
:: + Start the dev environment
:: + Exit message and warn user that he can quit the window now
:: Create The Temporary Directory
IF EXIST %temp-dir% rmdir %temp-dir% /s /q
@ -168,6 +174,11 @@ goto:eof
call:install_software_o "node-js" "%%downloads_64[1]%%" msi 12
call:draw_dss
call:get_path_from_user 41 42
set "node_js_path=%user_tmp_path%"
Call:draw_dss
call:install_software_o "ruby" "%%downloads_64[2]%%" exe 13
call:draw_dss
call:install_software_o "python" "%%downloads_64[3]%%" msi 26
@ -187,6 +198,11 @@ GOTO END
call:install_software_o "node-js" "%%downloads_32[1]%%" msi 12
call:draw_dss
call:get_path_from_user 41 42
set "node_js_path=%user_tmp_path%"
Call:draw_dss
call:install_software_o "ruby" "%%downloads_32[2]%%" exe 13
call:draw_dss
call:install_software_o "python" "%%downloads_32[3]%%" msi 26
@ -246,23 +262,10 @@ goto END
call:draw_dss
call:user_set_git_repository
goto:eof
:user_set_git_repository
call:get_lw word 32
set /p git_repository_path="%word% "
call:user_set_git_repository_sc
goto:eof
:user_set_git_repository_sc
if exist "%git_repository_path%" (
call:log_lw 33
call:draw_dss
call:user_set_git_repository
)
goto git_rep_checkout_auto
goto:eof
call:get_empty_path_from_user 32
set "git_repository_path=%user_tmp_path%"
goto:git_rep_checkout_auto
:git_rep_checkout_auto
git clone https://github.com/%git_username%/codecombat.git "%git_repository_path%"
@ -271,6 +274,13 @@ goto:git_repo_configuration
:git_repo_configuration
call:log_lw_ss 35
call:log_lw_sse 36
SET "PATH=%PATH%;%node_js_path%" /M
setx -m git "%git_exe_path%\bin"
call:log_lw 40
start cmd /k "npm install -g bower brunch nodemon sendwithus & exit"
goto report_ok
:report_ok
@ -384,6 +394,28 @@ goto:eof
)
goto:eof
:: ===================== USER - INTERACTION - FUNCTIONS ========================
:get_path_from_user
call:get_lw word %~1
set /p user_tmp_path="%word% "
if not exist "%user_tmp_path%" (
call:log_lw 43
call:draw_dss
call:get_path_from_user %~1 %~2
)
goto:eof
:get_empty_path_from_user
call:get_lw word %~1
set /p user_tmp_path="%word% "
if exist "%user_tmp_path%" (
call:log_lw 33
call:draw_dss
call:get_path_from_user %~1
)
goto:eof
:: ============================== FUNCTIONS ====================================
:log

View file

@ -1,12 +1,50 @@
@echo off
setlocal EnableDelayedExpansion
set "git-path=C:\Program Files (x86)\Git"
:: + Configuraton and installation checklist:
:: 1) cd codecombat
:: 2) npm install -g bower brunch nodemon sendwithus
:: 3) bower install
:: 4) gem install sass
:: 5) npm install
:: 6) brunch -w
:: Extra... @ Fail run npm install
set "PATH=%PATH%;%git-path%\bin;%git-path%\cmd" /M
echo "Moving to your git repository..."
C:
cd C:\CodeCombat
git clone https://github.com/codecombat/codecombat.git C:\Coco\
PAUSE
pause
SET "PATH=%PATH%;C:\Program Files\Nodejs" /M
setx -m git "C:\Program Files (x86)\Git\bin"
SET "PATH=%PATH%;C:\Program Files (x86)\Git\bin;C:\Program Files (x86)\Git\cmd" /M
PAUSE
echo "Installing bower, brunch, nodemon and sendwithus..."
start cmd /k "npm install -g bower brunch nodemon sendwithus & exit"
PAUSE
echo "running npm install..."
start cmd /k "npm install & exit"
PAUSE
echo "Activating bower install..."
start cmd /k "bower install & PAUSE & exit"
PAUSE
echo "Installing sass via gem..."
start cmd /k "install sass & PAUSE & exit"
PAUSE
echo "comping repository via brunch..."
start cmd /k "brunch -w & exit"
PAUSE
endlocal

View file

@ -37,4 +37,7 @@ Started the configuration of your git repository...
You need a fork of the official CodeCombat...
Haven't you done that yet, really...?
Go over to https://github.com/codecombat/codecombat and do it now!
Now then... Please enter your github username:
Now then... Please enter your github username:
Installing bower, brunch, nodemon and sendwithus...
Please enter the full path of the location you installed nodejs to:
The path you intered is invalid, please try again...

View file

@ -37,4 +37,7 @@ Started the configuration of your git repository...
You need a fork of the official CodeCombat...
Haven't you done that yet, really...?
Go over to https://github.com/codecombat/codecombat and do it now!
Now then... Please enter your github username:
Now then... Please enter your github username:
Installing bower, brunch, nodemon and sendwithus...
Please enter the full path of the location you installed nodejs to:
The path you intered is invalid, please try again...

View file

@ -37,4 +37,7 @@ Started the configuration of your git repository...
You need a fork of the official CodeCombat...
Haven't you done that yet, really...?
Go over to https://github.com/codecombat/codecombat and do it now!
Now then... Please enter your github username:
Now then... Please enter your github username:
Installing bower, brunch, nodemon and sendwithus...
Please enter the full path of the location you installed nodejs to:
The path you intered is invalid, please try again...