mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-04-26 14:03:28 -04:00
Merge branch 'master' of https://github.com/codecombat/codecombat
This commit is contained in:
commit
cf6dcca432
5 changed files with 1 additions and 837 deletions
scripts/windows/coco-dev-setup
|
@ -1,86 +1,3 @@
|
|||
<<<<<<< HEAD:scripts/windows/coco-dev-setup/batch/localisation/de.coco
|
||||
<?xml version="1.0" encoding="ISO-8859-1" ?>
|
||||
<variables>
|
||||
<global>
|
||||
<native>Deutsch</native>
|
||||
<intro>Ab jetzt senden wir unser Feedback in Englisch!</intro>
|
||||
</global>
|
||||
<install>
|
||||
<system>
|
||||
<bit>-Bit System erkannt.</bit>
|
||||
<prefix>Es wurde das Betriebssystem</prefix>
|
||||
<sufix>erkannt.</sufix>
|
||||
<xp>Windows XP wird nicht unterstützt. Installation abgebrochen.</xp>
|
||||
</system>
|
||||
<process>
|
||||
<sks>Sind die für CodeCombat benötigten Programme bereits installiert?</sks>
|
||||
<skq>Wir empfehlen Ihnen, mit „Nein“ zu antorten, falls Sie unsicher sind.</skq>
|
||||
<skc>Überspringe Installation der Programme...</skc>
|
||||
<s1>Ohne Software von Drittanbietern könnte CodeCombat nicht entwickelt werden.</s1>
|
||||
<s2>Aus diesem Grund müssen Sie diese Software installieren,</s2>
|
||||
<s3>um sich in der Community zu engagieren.</s3>
|
||||
<s4>Wenn Sie ein Programm bereits installiert haben, brechen Sie die Installation bitte ab.</s4>
|
||||
<winpath>Make sure to select the option that adds the application to your Windows Path, if the option is available.</winpath>
|
||||
<prefix>Haben Sie bereits die aktuellste Version von</prefix>
|
||||
<sufix>installiert?</sufix>
|
||||
<downloading>wird heruntergeladen...</downloading>
|
||||
<installing>wird installiert...</installing>
|
||||
<unzipping>wird entpackt...</unzipping>
|
||||
<cleaning>wird aufgeräumt...</cleaning>
|
||||
<mongodbpath>Bitte geben Sie den kompletten Pfad an, an dem MongoDB installiert werden soll</mongodbpath>
|
||||
</process>
|
||||
</install>
|
||||
<github>
|
||||
<intro>
|
||||
<opensource>Wie Du bereits weißt, ist CodeCombat Open Source.</opensource>
|
||||
<online>Unser Quellcode ist komplett auf Github.</online>
|
||||
<manual>Wenn Du möchtest, kannst du das komplette Git Repository selbst herunterladen und nach deinen wünschen einrichten.</manual>
|
||||
<norec>Allerdings empfehlen wir, dass du den Prozess statt dessen uns überlässt.</norec>
|
||||
</intro>
|
||||
<skip>
|
||||
<question>Willst du das lokale Git Setup selbst vornehmen?</question>
|
||||
<consequence>Bit vergewissere dich, dass das Repository korrekt heruntergeladen wurde, bevor du fortfährst.</consequence>
|
||||
<donotclose>Bitte schließe dieses Fenster nicht.</donotclose>
|
||||
<wait>Wenn du fertig bist, drücke eine beliebige Taste zum Fortfahren...</wait>
|
||||
</skip>
|
||||
<process>
|
||||
<path>Gebe bitte den kompletten Pfad zu deinem CodeCombat Git Repository ein: </path>
|
||||
<checkout>Bitte gib den kompletten Pfad ein, an dem du die CodeCombat Umgebung einrichten willst</checkout>
|
||||
<bashi>Diese Installation benötigt die Git Bash.</bashi>
|
||||
<bashp64>Die Git Bash ist standardmäßig in 'C:\Program Files (x86)\Git' installiert.</bashp64>
|
||||
<bashp32>Die Git Bash ist standardmäßig in 'C:\Program Files\Git' installiert.</bashp32>
|
||||
<bashq>Bitte gebe den kompletten Pfad zur Git Bash ein, oder drücke Enter, um den Standardpfad zu verwenden</bashq>
|
||||
<ssh>Willst du das Repository via SSH auschecken?</ssh>
|
||||
</process>
|
||||
</github>
|
||||
<npm>
|
||||
<install>Installing bower, brunch, nodemon and sendwithus...</install>
|
||||
<binstall>Installing bower packages...</binstall>
|
||||
<sass>Installing sass...</sass>
|
||||
<npm>Installing npm...</npm>
|
||||
<brnch>Starting brunch....</brnch>
|
||||
<mongodb>Setting up a MongoDB database for you...</mongodb>
|
||||
<database>Downloading the last version of the CodeCombat database...</database>
|
||||
<script>Preparing the automatic startup script for you...</script>
|
||||
</npm>
|
||||
<error>
|
||||
<path>Dieser Pfad existiert bereits. Willst du ihn wirklich überschreiben?</path>
|
||||
<exist>Dieser Pfad exisitert nicht. Bitte versuche es erneut...</exist>
|
||||
</error>
|
||||
<end>
|
||||
<succesfull>Die CodeCombat Entwicklungsumgebung wurde erfoglreich installiert.</succesfull>
|
||||
<thankyou>Vielen Dank für die Unterstützung und bis bald.</thankyou>
|
||||
<readme>Willst du das README lesen, um weitere Informationen zu erhalten?</readme>
|
||||
</end>
|
||||
<start>
|
||||
<s1>Von nun an kannst du die Entwicklungsumgebung starten unter</s1>
|
||||
<s2>einmal mit der Maus klicken.</s2>
|
||||
<s3> 1) Einfach Doppelklicken</s3>
|
||||
<s4>und warten bis die Entwicklungsumgebung fertig geladen hat.</s4>
|
||||
<s5> 2) Jetzt 'localhost:3000' in deinem bevorzugten Browser aufrufen.</s5>
|
||||
<s6>Fertig. Du bist nun bereit, bei CodeCombat mitzuarbeiten!</s6>
|
||||
</start>
|
||||
=======
|
||||
<?xml version="1.0" encoding="ISO-8859-1" ?>
|
||||
<variables>
|
||||
<global>
|
||||
|
@ -188,5 +105,4 @@
|
|||
<s5> 2) Jetzt 'localhost:3000' in deinem bevorzugten Browser aufrufen.</s5>
|
||||
<s6>Fertig. Du bist nun bereit, bei CodeCombat mitzuarbeiten!</s6>
|
||||
</start>
|
||||
>>>>>>> 072729acc34123c42250d361955438cfd8c210d7:scripts/windows/coco-dev-setup/batch/localization/de.coco
|
||||
</variables>
|
|
@ -1,87 +1,3 @@
|
|||
<<<<<<< HEAD:scripts/windows/coco-dev-setup/batch/localisation/zh-HANS.coco
|
||||
<?xml version="1.0" encoding="ISO-8859-1" ?>
|
||||
<variables>
|
||||
<global>
|
||||
<native>简体中文</native>
|
||||
<intro>目前我们只能用英文给你反馈!</intro>
|
||||
</global>
|
||||
<install>
|
||||
<system>
|
||||
<bit>-位系统.</bit>
|
||||
<prefix>操作系统</prefix>
|
||||
<sufix>被侦测到.</sufix>
|
||||
<xp>我们不支持 Windows XP, 安装取消.</xp>
|
||||
</system>
|
||||
<process>
|
||||
<sks>你是否已经安装好运行 CodeCombat 所需的所有软件?</sks>
|
||||
<skq>如果你不确定的话请回答 No.</skq>
|
||||
<skc>正在跳过此软件的安装...</skc>
|
||||
<s1>CodeCombat 无法在不使用第三方服务的情况下开发.</s1>
|
||||
<s2>这就是为什么你需要安装这些软件,</s2>
|
||||
<s3>为了开始给我们的开源社区做贡献.</s3>
|
||||
<s4>如果你已经有了这些软件 请取消安装.</s4>
|
||||
<winpath>Make sure to select the option that adds the application to your Windows Path, if the option is available.</winpath>
|
||||
<prefix>你是否已经安装了最新版本的</prefix>
|
||||
<sufix>?</sufix>
|
||||
<downloading>正在下载...</downloading>
|
||||
<installing>正在安装...</installing>
|
||||
<unzipping>正在解压...</unzipping>
|
||||
<cleaning>正在清理...</cleaning>
|
||||
<mongodbpath>请输入你希望安装 mongodb 的文件夹的全路径<mongodbpath>
|
||||
</process>
|
||||
</install>
|
||||
<github>
|
||||
<intro>
|
||||
<opensource>CodeCombat 是开源的.</opensource>
|
||||
<online>我们的所有源代码都放在了 Github.</online>
|
||||
<manual>你可以选择自己手工安装 Git.</manual>
|
||||
<norec>但我们仍然建议让程序自动替你完成.</norec>
|
||||
</intro>
|
||||
<skip>
|
||||
<question>你是否想自己手工安装本地 Git 安装?</question>
|
||||
<consequence>请确保在开始处理前, 你有正确设置好你的库.</consequence>
|
||||
<donotclose>请不要关闭此窗口.</donotclose>
|
||||
<wait>如果你准备好了, 请按任意键继续...</wait>
|
||||
</skip>
|
||||
<process>
|
||||
<path>请输入你 CodeCombat git库的全路径: </path>
|
||||
<checkout>请输入你想安装 CodeCombat 环境的全路径</checkout>
|
||||
<bashi>这项安装需要 Git Bash.</bashi>
|
||||
<bashp64>Git bash 默认安装在 'C:\Program Files (x86)\Git'.</bashp64>
|
||||
<bashp32>Git bash 默认安装在 'C:\Program Files\Git'.</bashp32>
|
||||
<bashq>请输入 git bash 的安装全路径, 如果你安装的是默认路径, 那么直接输入回车即可</bashq>
|
||||
<ssh>你是否想使用 ssh 来检出(checkout)库(repository)?</ssh>
|
||||
</process>
|
||||
</github>
|
||||
<npm>
|
||||
<install>正在安装 bower, brunch, nodemon 和 sendwithus...</install>
|
||||
<binstall>正在用 bower 安装依赖包...</binstall>
|
||||
<sass>正在安装 sass...</sass>
|
||||
<npm>正在安装 npm...</npm>
|
||||
<brnch>正在开启 brunch....</brnch>
|
||||
<mongodb>正在为你设置 MongoDB 数据库...</mongodb>
|
||||
<db>正在下载 CodeCombat 数据库的最新版本...</db>
|
||||
<script>Preparing the automatic startup script for you...</script>
|
||||
</npm>
|
||||
<error>
|
||||
<path>这个路径已经存在, 你想要覆盖它吗?</path>
|
||||
<exist>这个路径不存在, 请再次尝试...</exist>
|
||||
</error>
|
||||
<end>
|
||||
<succesfull>CodeCombat 开发环境的搭建已成功.</succesfull>
|
||||
<thankyou>感谢~ 我们会很快再次见面的 :)</thankyou>
|
||||
<readme>你是否想阅读 README 文件以了解更多信息?</readme>
|
||||
</end>
|
||||
<start>
|
||||
<s1>From now on you can start the dev. environment at</s1>
|
||||
<s2>the touch of a single mouse click.</s2>
|
||||
<s3> 1) 双击文件</s3>
|
||||
<s4> 启动开发环境.</s4>
|
||||
<s5> 2) 在浏览器里访问 'localhost:3000' </s5>
|
||||
<s6>好了,你现在可以开始开发 CodeCombat 了!</s6>
|
||||
</start>
|
||||
</variables>
|
||||
=======
|
||||
<?xml version="1.0" encoding="ISO-8859-1" ?>
|
||||
<variables>
|
||||
<global>
|
||||
|
@ -189,5 +105,4 @@
|
|||
<s5> 2) 在浏览器里访问 'localhost:3000' </s5>
|
||||
<s6>好了,你现在可以开始开发 CodeCombat 了!</s6>
|
||||
</start>
|
||||
</variables>
|
||||
>>>>>>> 072729acc34123c42250d361955438cfd8c210d7:scripts/windows/coco-dev-setup/batch/localization/zh-HANS.coco
|
||||
</variables>
|
|
@ -1,86 +1,3 @@
|
|||
<<<<<<< HEAD:scripts/windows/coco-dev-setup/batch/localisation/zh-HANT.coco
|
||||
<?xml version="1.0" encoding="ISO-8859-1" ?>
|
||||
<variables>
|
||||
<global>
|
||||
<native>繁体中文</native>
|
||||
<intro>From now on we'll send our feedback in English!</intro>
|
||||
</global>
|
||||
<install>
|
||||
<system>
|
||||
<bit>-bit computer detected.</bit>
|
||||
<prefix>The operating system</prefix>
|
||||
<sufix>was detected.</sufix>
|
||||
<xp>We don't support Windows XP, installation cancelled.</xp>
|
||||
</system>
|
||||
<process>
|
||||
<sks>Have you already installed all the software needed for CodeCombat?</sks>
|
||||
<skq>We recommand that you reply negative in case you're not sure.</skq>
|
||||
<skc>Skipping the installation of the software...</skc>
|
||||
<s1>CodeCombat couldn't be developed without third-party software.</s1>
|
||||
<s2>That's why you'll need to install this software,</s2>
|
||||
<s3>in order to start contributing to our community.</s3>
|
||||
<s4>Cancel the installation if you already have the application.</s4>
|
||||
<winpath>Make sure to select the option that adds the application to your Windows Path, if the option is available.</winpath>
|
||||
<prefix>Do you already have the latest version of</prefix>
|
||||
<sufix>installed?</sufix>
|
||||
<downloading>is downloading...</downloading>
|
||||
<installing>is installing...</installing>
|
||||
<unzipping>is unzipping...</unzipping>
|
||||
<cleaning>is cleaning...</cleaning>
|
||||
<mongodbpath>Please define the full path where mongodb should be installed</mongodbpath>
|
||||
</process>
|
||||
</install>
|
||||
<github>
|
||||
<intro>
|
||||
<opensource>CodeCombat is opensource, like you already know.</opensource>
|
||||
<online>All our sourcecode can be found online at Github.</online>
|
||||
<manual>You can choose to do the entire Git setup yourself.</manual>
|
||||
<norec>However we recommend that you instead let us handle it instead.</norec>
|
||||
</intro>
|
||||
<skip>
|
||||
<question>Do you want to do the Local Git setup manually yourself?</question>
|
||||
<consequence>Make sure you have correctly setup your repository before processing.</consequence>
|
||||
<donotclose>Do not close this window please.</donotclose>
|
||||
<wait>When you're ready, press any key to continue...</wait>
|
||||
</skip>
|
||||
<process>
|
||||
<path>Please give the full path of your CodeCombat git repository: </path>
|
||||
<checkout>Please enter the full path where you want to install your CodeCombat environment</checkout>
|
||||
<bashi>This installation requires Git Bash.</bashi>
|
||||
<bashp64>Git bash is by default installed at 'C:\Program Files (x86)\Git'.</bashp64>
|
||||
<bashp32>Git bash is by default installed at 'C:\Program Files\Git'.</bashp32>
|
||||
<bashq>Please enter the full path where git bash is installed or just press enter if it's in the default location</bashq>
|
||||
<ssh>Do you want to checkout the repository via ssh?</ssh>
|
||||
</process>
|
||||
</github>
|
||||
<npm>
|
||||
<install>Installing bower, brunch, nodemon and sendwithus...</install>
|
||||
<binstall>Installing bower packages...</binstall>
|
||||
<sass>Installing sass...</sass>
|
||||
<npm>Installing npm...</npm>
|
||||
<brnch>Starting brunch....</brnch>
|
||||
<mongodb>Setting up a MongoDB database for you...</mongodb>
|
||||
<db>Downloading the last version of the CodeCombat database...</db>
|
||||
<script>Preparing the automatic startup script for you...</script>
|
||||
</npm>
|
||||
<error>
|
||||
<path>That path already exists, are you sure you want to overwrite it?</path>
|
||||
<exist>That path doesn't exist. Please try again...</exist>
|
||||
</error>
|
||||
<end>
|
||||
<succesfull>The setup of the CodeCombat Dev. Environment was succesfull.</succesfull>
|
||||
<thankyou>Thank you already for your contribution and see you soon.</thankyou>
|
||||
<readme>Do you want to read the README for more information?</readme>
|
||||
</end>
|
||||
<start>
|
||||
<s1>From now on you can start the dev. environment at</s1>
|
||||
<s2>the touch of a single mouse click.</s2>
|
||||
<s3> 1) Just double click</s3>
|
||||
<s4> and let the environment start up.</s4>
|
||||
<s5> 2) Now just open 'localhost:3000' in your prefered browser.</s5>
|
||||
<s6>That's it, you're now ready to start working on CodeCombat!</s6>
|
||||
</start>
|
||||
=======
|
||||
<?xml version="1.0" encoding="ISO-8859-1" ?>
|
||||
<variables>
|
||||
<global>
|
||||
|
@ -188,5 +105,4 @@
|
|||
<s5> 2) Now just open 'localhost:3000' in your prefered browser.</s5>
|
||||
<s6>That's it, you're now ready to start working on CodeCombat!</s6>
|
||||
</start>
|
||||
>>>>>>> 072729acc34123c42250d361955438cfd8c210d7:scripts/windows/coco-dev-setup/batch/localization/zh-HANT.coco
|
||||
</variables>
|
|
@ -1,533 +0,0 @@
|
|||
@echo off
|
||||
setlocal EnableDelayedExpansion
|
||||
|
||||
Color 0A
|
||||
|
||||
mode con: cols=78 lines=60
|
||||
|
||||
:: Global Variables
|
||||
set "temp-dir=C:\Coco-Temp"
|
||||
set install-log=%temp-dir%\coco-dev-install-log.txt
|
||||
|
||||
:: set correct curl app
|
||||
IF EXIST "%PROGRAMFILES(X86)%" (
|
||||
(set "curl-app=utilities\curl\64bit\curl.exe")
|
||||
) ELSE (
|
||||
set "curl-app=utilities\curl\32bit\curl.exe"
|
||||
)
|
||||
|
||||
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
|
||||
|
||||
:: + 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
|
||||
|
||||
:: + Copy the automated dev batch file to root folder
|
||||
:: => Let user define mongo-db directory
|
||||
:: + Start the dev environment
|
||||
|
||||
:: Create The Temporary Directory
|
||||
IF EXIST %temp-dir% rmdir %temp-dir% /s /q
|
||||
mkdir %temp-dir%
|
||||
|
||||
:: Create Log File
|
||||
copy /y nul %install-log% > nul
|
||||
|
||||
call:parse_aa_and_draw "config\header"
|
||||
call:draw_dss
|
||||
|
||||
call:parse_file_new "config\config" cnfg n
|
||||
|
||||
call:log "Welcome to the automated Installation of the CodeCombat Dev. Environment!"
|
||||
call:log_sse "v%%cnfg[1]%% authored by %%cnfg[2]%% and published by %%cnfg[3]%%."
|
||||
|
||||
:: Language Agreement Stuff
|
||||
|
||||
call:log "In order to continue the installation of the developers environment"
|
||||
call:log "you will have to read and agree with the following license:
|
||||
call:draw_dss
|
||||
echo.
|
||||
call:parse_aa_and_draw "license.txt"
|
||||
echo.
|
||||
call:draw_dss
|
||||
call:strict_user_yn_question "Have you read the license and do you agree with it?"
|
||||
|
||||
if "%res%"=="false" (
|
||||
call:log "Sorry to hear that, have a good day..."
|
||||
call:log_sse "Installation and Setup of the CodeCombat environment is cancelled."
|
||||
GOTO:END
|
||||
)
|
||||
|
||||
:: Tips
|
||||
call:log "Before we start the installation, here are some tips:"
|
||||
echo.
|
||||
|
||||
call:parse_aa_and_draw "config\tips"
|
||||
|
||||
call:draw_ss
|
||||
|
||||
:: Read Language Index
|
||||
call:parse_file_new "localisation\languages" lang lang_c
|
||||
|
||||
:: Read Download URLs
|
||||
call:parse_file_new "config\downloads" downloads n
|
||||
call:parse_file_new "config\downloads_32" downloads_32 n
|
||||
call:parse_file_new "config\downloads_64" downloads_64 n
|
||||
call:parse_file_new "config\downloads_vista_32" downloads_vista_32 n
|
||||
call:parse_file_new "config\downloads_vista_64" downloads_vista_64 n
|
||||
call:parse_file_new "config\downloads_7_32" downloads_7_32 n
|
||||
call:parse_file_new "config\downloads_7_64" downloads_7_64 n
|
||||
|
||||
:: Parse all Localisation Files
|
||||
for /L %%i in (1,1,%lang_c%) do (
|
||||
call:parse_file "localisation\%%lang[%%i]%%" languages languages_c
|
||||
)
|
||||
|
||||
set /A "wc = %languages_c% / %lang_c%"
|
||||
|
||||
:: Start install with language question (Localisation)
|
||||
call:log "Which language do you prefer?"
|
||||
|
||||
set /A c=0
|
||||
for /L %%i in (1,%wc%,%languages_c%) do (
|
||||
set /A "n = %%i - 1"
|
||||
call:log " [%%c%%] %%languages[%%i]%%"
|
||||
set /A c+=1
|
||||
)
|
||||
|
||||
set "lang_id=-1"
|
||||
call:user_enter_language_id
|
||||
goto:user_pick_language
|
||||
|
||||
:user_enter_language_id
|
||||
set /p lang_id= "Enter the language ID and press <ENTER>: "
|
||||
goto:eof
|
||||
|
||||
:user_pick_language
|
||||
set res=false
|
||||
if %lang_id% LSS 0 set res=true
|
||||
if %lang_id% GEQ %lang_c% set res=true
|
||||
if "%res%"=="true" (
|
||||
call:log "Invalid id! Please enter a correct id from the numbers listed above..."
|
||||
call:draw_dss
|
||||
call:user_enter_language_id
|
||||
goto:user_pick_language
|
||||
)
|
||||
|
||||
call:get_lw word 0
|
||||
call:log_ds "You choose '%word%', from now on all feedback will be logged in it."
|
||||
|
||||
call:log_lw 1
|
||||
call:log_lw_sse 2
|
||||
|
||||
:: downloads for all version...
|
||||
|
||||
:: [TODO] The choice between Cygwin && Git ?! Is => HAVE EXTERNAL GIT APPLICATION LIST!!!
|
||||
|
||||
call:log_lw_sse 3
|
||||
|
||||
call:log_lw 6
|
||||
call:log_lw 7
|
||||
call:log_lw 8
|
||||
call:install_software_o "git" "%%downloads[1]%%" exe 9
|
||||
call:draw_dss
|
||||
call:get_lw word 11
|
||||
|
||||
:: [TODO] Add downloads for windows visual studio ?!
|
||||
|
||||
call:user_set_git_path
|
||||
|
||||
:user_set_git_path_fail
|
||||
if not exist "%git_exe_path%" (
|
||||
call:log_lw 27
|
||||
call:draw_dss
|
||||
call:user_set_git_path
|
||||
)
|
||||
:: architecture specific downloads...
|
||||
IF EXIST "%PROGRAMFILES(X86)%" (GOTO 64BIT) ELSE (GOTO 32BIT)
|
||||
goto:eof
|
||||
|
||||
:user_set_git_path
|
||||
set /p git_exe_path="%word%: "
|
||||
call:user_set_git_path_fail
|
||||
goto:eof
|
||||
|
||||
:go_to_platform
|
||||
call:log_ds "Windows %~1 detected..."
|
||||
GOTO %~2
|
||||
goto:eof
|
||||
|
||||
:64BIT
|
||||
call:log_ds "64-bit computer detected..."
|
||||
|
||||
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
|
||||
|
||||
:: Some installations require specific windows versions
|
||||
for /f "tokens=4-5 delims=. " %%i in ('ver') do set VERSION=%%i.%%j
|
||||
if "%version%" == "5.2" ( call:go_to_platform "XP" ver_XP_64 )
|
||||
if "%version%" == "6.0" ( call:go_to_platform "Vista" ver_Vista_64 )
|
||||
if "%version%" == "6.1" ( call:go_to_platform "7" ver_Win7_8_64 )
|
||||
if "%version%" == "6.2" ( call:go_to_platform "8.0" ver_Win7_8_64 )
|
||||
if "%version%" == "6.3" ( call:go_to_platform "8.1" ver_Win7_8_64 )
|
||||
GOTO warn_and_exit
|
||||
GOTO END
|
||||
|
||||
:32BIT
|
||||
call:log_ds "32-bit computer detected..."
|
||||
|
||||
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
|
||||
|
||||
:: Some installations require specific windows versions
|
||||
for /f "tokens=4-5 delims=. " %%i in ('ver') do set VERSION=%%i.%%j
|
||||
if "%version%" == "5.2" ( call:go_to_platform "XP" ver_XP_32 )
|
||||
if "%version%" == "6.0" ( call:go_to_platform "Vista" ver_Vista_32 )
|
||||
if "%version%" == "6.1" ( call:go_to_platform "7" ver_Win7_8_32 )
|
||||
if "%version%" == "6.2" ( call:go_to_platform "8.0" ver_Win7_8_32 )
|
||||
if "%version%" == "6.3" ( call:go_to_platform "8.1" ver_Win7_8_32 )
|
||||
GOTO warn_and_exit
|
||||
GOTO END
|
||||
|
||||
:ver_Win7_8_32
|
||||
call:install_packed_software_o "mongo-db" "%%downloads_7_32[1]%%" 25 14
|
||||
set "mong-db-path = %packed_software_path%"
|
||||
goto git_rep_checkout
|
||||
|
||||
:ver_Vista_32
|
||||
call:install_packed_software_o "mongo-db" "%%downloads_vista_32[1]%%" 25 14
|
||||
set "mong-db-path = %packed_software_path%"
|
||||
goto git_rep_checkout
|
||||
|
||||
:ver_XP_32
|
||||
call:log_lw_ds 15
|
||||
goto END
|
||||
|
||||
:ver_Win7_8_64
|
||||
call:install_packed_software_o "mongo-db" "%%downloads_7_64[1]%%" 25 14
|
||||
set "mong-db-path = %packed_software_path%"
|
||||
goto git_rep_checkout
|
||||
|
||||
:ver_Vista_64
|
||||
call:install_packed_software_o "mongo-db" "%%downloads_vista_64[1]%%" 25 14
|
||||
set "mong-db-path = %packed_software_path%"
|
||||
goto git_rep_checkout
|
||||
|
||||
:ver_XP_64
|
||||
call:log_lw_ds 15
|
||||
goto END
|
||||
|
||||
:git_rep_checkout
|
||||
call:log_lw_ss 16
|
||||
call:log_lw_sse 17
|
||||
|
||||
set "PATH=%PATH%;%git_exe_path%\bin;%git_exe_path%\cmd" /M
|
||||
|
||||
call:log_lw 36
|
||||
call:log_lw 37
|
||||
call:log_lw 38
|
||||
|
||||
call:draw_dss
|
||||
|
||||
call:get_lw word 39
|
||||
set /p git_username="%word% "
|
||||
|
||||
call:draw_dss
|
||||
|
||||
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%"
|
||||
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
|
||||
call:log_lw 18
|
||||
call:log_lw_sse 19
|
||||
|
||||
:: Open README file
|
||||
call:open_readme
|
||||
|
||||
goto clean_up
|
||||
|
||||
:open_readme
|
||||
call:open_txt_file "config/info"
|
||||
goto:eof
|
||||
|
||||
:warn_and_exit
|
||||
call:log_lw_ss 20
|
||||
call:log_lw_sse 21
|
||||
goto error_report
|
||||
|
||||
:error_report
|
||||
call:log_lw_ds 22
|
||||
goto END
|
||||
|
||||
:clean_up
|
||||
call:log_lw_sse 23
|
||||
rmdir %temp-dir% /s /q
|
||||
goto END
|
||||
|
||||
:: ============================ INSTALL SOFTWARE FUNCTIONS ======================
|
||||
|
||||
:download_software
|
||||
call:get_lw word 4
|
||||
call:log "%word% %~1..."
|
||||
%curl-app% -sS -k %~2 -o %temp-dir%\%~1-setup.%~3
|
||||
goto:eof
|
||||
|
||||
:install_software
|
||||
call:download_software %~1 %~2 %~3
|
||||
call:get_lw word 5
|
||||
call:log "%word% %~1..."
|
||||
START /WAIT %temp-dir%\%~1-setup.%~3
|
||||
goto:eof
|
||||
|
||||
:install_software_o
|
||||
call:get_lw word %~4
|
||||
call:user_yn_question "%word%"
|
||||
if "%res%"=="true" (
|
||||
call:install_software %~1 %~2 %~3
|
||||
) else (
|
||||
call:log_lw 10
|
||||
)
|
||||
goto:eof
|
||||
|
||||
:install_packed_software
|
||||
call:download_software %~1 %~2 zip
|
||||
|
||||
call:draw_dss
|
||||
|
||||
call:get_lw word %~3
|
||||
|
||||
set /p packed_software_path="%word% "
|
||||
|
||||
:: remove chosen directory of user if it already exists (to prevent a window from popping up)
|
||||
IF EXIST %packed_software_path% rmdir %packed_software_path% /s /q
|
||||
|
||||
%ZU-app% x %temp-dir%\%~1-setup.zip -o%packed_software_path%
|
||||
|
||||
call:draw_dss
|
||||
|
||||
for /f "delims=" %%a in ('dir "%packed_software_path%\" /on /ad /b') do @set temp_dir=%%a
|
||||
for /f "delims=" %%a in ('dir "%packed_software_path%\%temp_dir%\" /on /ad /b') do (
|
||||
xcopy %packed_software_path%\%temp_dir% %packed_software_path%\ /S /E
|
||||
)
|
||||
|
||||
call:draw_dss
|
||||
rmdir %packed_software_path%\%temp_dir%\ /s /q
|
||||
goto:eof
|
||||
|
||||
:user_yn_question
|
||||
set /p result="%~1 [Y/N]: "
|
||||
call:draw_dss
|
||||
set "res=false"
|
||||
if "%result%"=="N" (set "res=true")
|
||||
if "%result%"=="n" (set "res=true")
|
||||
goto:eof
|
||||
|
||||
:strict_user_yn_question
|
||||
set /p result="%~1 [Y/N]: "
|
||||
call:draw_dss
|
||||
set "res=unset"
|
||||
if "%result%"=="N" (set "res=false")
|
||||
if "%result%"=="n" (set "res=false")
|
||||
if "%result%"=="Y" (set "res=true")
|
||||
if "%result%"=="y" (set "res=true")
|
||||
|
||||
if "%res%"=="unset" (
|
||||
call:log "Please answer the question with either Y or N..."
|
||||
call:draw_dss
|
||||
call:strict_user_yn_question "%~1"
|
||||
)
|
||||
goto:eof
|
||||
|
||||
:install_packed_software_o
|
||||
call:get_lw word %~4
|
||||
call:user_yn_question "%word%"
|
||||
if "%res%"=="true" (
|
||||
call:install_packed_software %~1 %~2 %~3
|
||||
) else (
|
||||
call:log_lw 10
|
||||
)
|
||||
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
|
||||
echo %~1
|
||||
echo %~1 >> %install-log%
|
||||
goto:eof
|
||||
|
||||
:draw_ss
|
||||
echo.
|
||||
call:log "-----------------------------------------------------------------------------"
|
||||
echo.
|
||||
goto:eof
|
||||
|
||||
:draw_dss
|
||||
echo.
|
||||
call:log "- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -"
|
||||
echo.
|
||||
goto:eof
|
||||
|
||||
:draw_seperator
|
||||
echo.
|
||||
echo + + + + + + + +
|
||||
echo.
|
||||
goto:eof
|
||||
|
||||
:log_ss
|
||||
call:draw_ss
|
||||
call:log "%~1"
|
||||
goto:eof
|
||||
|
||||
:log_sse
|
||||
call:log "%~1"
|
||||
call:draw_ss
|
||||
goto:eof
|
||||
|
||||
:log_ds
|
||||
call:log_ss "%~1"
|
||||
call:draw_ss
|
||||
goto:eof
|
||||
|
||||
:: ============================== IO FUNCTIONS ====================================
|
||||
|
||||
:open_txt_file
|
||||
start "" notepad.exe %~1
|
||||
goto:eof
|
||||
|
||||
:parse_aa_and_draw
|
||||
set "file=%~1"
|
||||
for /f "usebackq tokens=* delims=;" %%a in ("%file%") do (
|
||||
echo.%%a
|
||||
)
|
||||
goto:eof
|
||||
|
||||
:parse_file
|
||||
set "file=%~1"
|
||||
for /F "usebackq delims=" %%a in ("%file%") do (
|
||||
set /A %~3+=1
|
||||
call set %~2[%%%~3%%]=%%a
|
||||
)
|
||||
goto:eof
|
||||
|
||||
:parse_file_new
|
||||
set /A %~3=0
|
||||
call:parse_file %~1 %~2 %~3
|
||||
goto:eof
|
||||
|
||||
:: ============================== LOCALISATION FUNCTIONS ================
|
||||
|
||||
:get_lw
|
||||
call:get_lw_id %~1 %lang_id% %~2
|
||||
goto:eof
|
||||
|
||||
:get_lw_id
|
||||
set /A count = %~2 * %wc% + %~3 + 1
|
||||
set "%~1=!languages[%count%]!"
|
||||
goto:eof
|
||||
|
||||
:log_lw
|
||||
call:get_lw str %~1
|
||||
call:log "%str%"
|
||||
goto:eof
|
||||
|
||||
:log_lw_prfx
|
||||
call:get_lw str %~1
|
||||
call:log "%~2%str%"
|
||||
goto:eof
|
||||
|
||||
:log_lw_ss
|
||||
call:get_lw str %~1
|
||||
call:log_ss "%str%"
|
||||
goto:eof
|
||||
|
||||
:log_lw_ds
|
||||
call:get_lw str %~1
|
||||
call:log_ds "%str%"
|
||||
goto:eof
|
||||
|
||||
:log_lw_sse
|
||||
call:get_lw str %~1
|
||||
call:log_sse "%str%"
|
||||
goto:eof
|
||||
|
||||
:: ============================== WINDOWS FUNCTIONS ======================
|
||||
|
||||
:set_env_var
|
||||
setx -m %~1 %~2
|
||||
goto:eof
|
||||
|
||||
:: ============================== EOF ====================================
|
||||
|
||||
:END
|
||||
exit
|
||||
goto:eof
|
||||
|
||||
endlocal
|
|
@ -1,50 +0,0 @@
|
|||
@echo off
|
||||
setlocal EnableDelayedExpansion
|
||||
|
||||
:: + 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
|
||||
|
||||
echo "Moving to your git repository..."
|
||||
C:
|
||||
cd C:\CodeCombat
|
||||
|
||||
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
|
Loading…
Add table
Add a link
Reference in a new issue