diff --git a/scripts/windows/coco-dev-setup/batch/config/config.coco b/scripts/windows/coco-dev-setup/batch/config/config.coco
index 3e7c256d9..f8a9f6091 100755
--- a/scripts/windows/coco-dev-setup/batch/config/config.coco
+++ b/scripts/windows/coco-dev-setup/batch/config/config.coco
@@ -1,6 +1,6 @@
- 1.0
+ 1.1
GlenDC
CodeCombat.com © 2013-2014
https://github.com/codecombat/codecombat.git
diff --git a/scripts/windows/coco-dev-setup/batch/config/downloads.coco b/scripts/windows/coco-dev-setup/batch/config/downloads.coco
index ff1af0501..b198d59a7 100755
--- a/scripts/windows/coco-dev-setup/batch/config/downloads.coco
+++ b/scripts/windows/coco-dev-setup/batch/config/downloads.coco
@@ -4,29 +4,31 @@
http://nodejs.org/dist/v0.10.25/node-v0.10.25-x86.msi
http://dl.bintray.com/oneclick/rubyinstaller/rubyinstaller-2.0.0-p353.exe?direct
- http://www.python.org/ftp/python/2.7.6/python-2.7.6.msi
+ http://s3.amazonaws.com/CodeCombatLargeFiles/python-32.msi
http://nodejs.org/dist/v0.10.25/x64/node-v0.10.25-x64.msi
http://dl.bintray.com/oneclick/rubyinstaller/rubyinstaller-2.0.0-p353-x64.exe?direct
- http://www.python.org/ftp/python/2.7.6/python-2.7.6.amd64.msi
+ http://s3.amazonaws.com/CodeCombatLargeFiles/python-64.msi
- https://msysgit.googlecode.com/files/Git-1.8.5.2-preview20131230.exe
+
+ https://msysgit.googlecode.com/files/Git-1.8.5.2-preview20131230.exe
+
-
+
http://fastdl.mongodb.org/win32/mongodb-win32-i386-2.5.4.zip
http://fastdl.mongodb.org/win32/mongodb-win32-x86_64-2008plus-2.5.4.zip
-
-
+
+
http://fastdl.mongodb.org/win32/mongodb-win32-i386-2.5.4.zip
http://fastdl.mongodb.org/win32/mongodb-win32-x86_64-2.5.4.zip
-
+
\ No newline at end of file
diff --git a/scripts/windows/coco-dev-setup/batch/scripts/download_and_install_applications.bat b/scripts/windows/coco-dev-setup/batch/scripts/download_and_install_applications.bat
index d2469086e..782ecb783 100755
--- a/scripts/windows/coco-dev-setup/batch/scripts/download_and_install_applications.bat
+++ b/scripts/windows/coco-dev-setup/batch/scripts/download_and_install_applications.bat
@@ -25,7 +25,9 @@ if %system_info_os% == XP (
call print_exit
)
-call get_category ..\\config\\downloads.coco downloads download_names downloads_count general-general general-%system_info_bit% %system_info_os%-%system_info_bit%
+call get_variables ..\\config\\downloads.coco downloads download_names downloads_count 0 general general
+call get_variables ..\\config\\downloads.coco downloads download_names downloads_count 1 %system_info_os% b%system_info_bit%
+call get_variables ..\\config\\downloads.coco downloads download_names downloads_count 2 general b%system_info_bit%
call get_local_text install_process_s1 install process s1
call get_local_text install_process_s2 install process s2
diff --git a/scripts/windows/coco-dev-setup/batch/scripts/get_variables.bat b/scripts/windows/coco-dev-setup/batch/scripts/get_variables.bat
new file mode 100755
index 000000000..a53805fac
--- /dev/null
+++ b/scripts/windows/coco-dev-setup/batch/scripts/get_variables.bat
@@ -0,0 +1,4 @@
+set count=0
+for /F "delims=" %%F in ('call run_script.bat .\\get_variables.ps1 %*') do (
+ %%F
+)
\ No newline at end of file
diff --git a/scripts/windows/coco-dev-setup/batch/scripts/get_variables.ps1 b/scripts/windows/coco-dev-setup/batch/scripts/get_variables.ps1
new file mode 100755
index 000000000..6d94b4324
--- /dev/null
+++ b/scripts/windows/coco-dev-setup/batch/scripts/get_variables.ps1
@@ -0,0 +1,33 @@
+$xml_file = [xml](get-content $args[0])
+$arr_value = $args[1]
+$arr_name = $args[2]
+$arr_counter = $args[3]
+$counter = $args[4]
+
+if($args.count -eq 6)
+{
+ $root = $xml_file.variables.($args[5])
+}
+elseif($args.count -eq 7)
+{
+ $root = $xml_file.variables.($args[5]).($args[6])
+}
+elseif($args.count -eq 8)
+{
+ $root = $xml_file.variables.($args[5]).($args[6]).($args[7])
+}
+elseif($args.count -eq 9)
+{
+ $nodes = $xml_file.variables.($args[5]).($args[6]).($args[7]).($args[8])
+}
+
+foreach ($node in $root.ChildNodes)
+{
+ $counter += 1
+ $value = $node.InnerText
+ $name = $node.Name
+ Write-Host set "$arr_value[$counter]=$value"
+ Write-Host set "$arr_name[$counter]=$name"
+}
+
+Write-Host set "$arr_counter=$counter"
\ No newline at end of file
diff --git a/scripts/windows/coco-dev-setup/batch/scripts/run_script.bat b/scripts/windows/coco-dev-setup/batch/scripts/run_script.bat
index 13e7d3032..1e4797008 100755
--- a/scripts/windows/coco-dev-setup/batch/scripts/run_script.bat
+++ b/scripts/windows/coco-dev-setup/batch/scripts/run_script.bat
@@ -1 +1,2 @@
+@echo off
PowerShell -NoProfile -ExecutionPolicy Bypass -Command "& "%*"
\ No newline at end of file
diff --git a/scripts/windows/coco-dev-setup/batch/scripts/setup.bat b/scripts/windows/coco-dev-setup/batch/scripts/setup.bat
index b552dcced..7c137563f 100755
--- a/scripts/windows/coco-dev-setup/batch/scripts/setup.bat
+++ b/scripts/windows/coco-dev-setup/batch/scripts/setup.bat
@@ -2,7 +2,7 @@
setlocal EnableDelayedExpansion
Color 0A
-mode con: cols=78 lines=55
+mode con: cols=79 lines=55
call print_header
call print_dashed_seperator
@@ -33,7 +33,7 @@ call print_finished_header
call print_dashed_seperator
call get_local_text end_succesfull end succesfull
-call get_local_text end_thankyou end_thankyou
+call get_local_text end_thankyou end thankyou
echo %end_succesfull%
echo %end_thankyou%
diff --git a/scripts/windows/coco-dev-setup/last_step_succesfull/config.coco b/scripts/windows/coco-dev-setup/last_step_succesfull/config.coco
deleted file mode 100755
index ae8c66f56..000000000
--- a/scripts/windows/coco-dev-setup/last_step_succesfull/config.coco
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
- 1.0
- GlenDC
- CodeCombat.com © 2013-2014
-
\ No newline at end of file
diff --git a/scripts/windows/coco-dev-setup/last_step_succesfull/downloads.coco b/scripts/windows/coco-dev-setup/last_step_succesfull/downloads.coco
deleted file mode 100755
index 2a0472c41..000000000
--- a/scripts/windows/coco-dev-setup/last_step_succesfull/downloads.coco
+++ /dev/null
@@ -1,24 +0,0 @@
-
-
-
-
- http://nodejs.org/dist/v0.10.25/node-v0.10.25-x86.msi
- http://dl.bintray.com/oneclick/rubyinstaller/rubyinstaller-2.0.0-p353.exe?direct
- http://www.python.org/ftp/python/2.7.6/python-2.7.6.msi
-
-
- http://nodejs.org/dist/v0.10.25/x64/node-v0.10.25-x64.msi
- http://dl.bintray.com/oneclick/rubyinstaller/rubyinstaller-2.0.0-p353-x64.exe?direct
- http://www.python.org/ftp/python/2.7.6/python-2.7.6.amd64.msi
-
- https://msysgit.googlecode.com/files/Git-1.8.5.2-preview20131230.exe
-
-
- mongodb=http://fastdl.mongodb.org/win32/mongodb-win32-i386-2.5.4.zip
- mongodb=http://fastdl.mongodb.org/win32/mongodb-win32-x86_64-2008plus-2.5.4.zip
-
-
- mongodb=http://fastdl.mongodb.org/win32/mongodb-win32-i386-2.5.4.zip
- mongodb=http://fastdl.mongodb.org/win32/mongodb-win32-x86_64-2.5.4.zip
-
-
\ No newline at end of file
diff --git a/scripts/windows/coco-dev-setup/last_step_succesfull/en.coco b/scripts/windows/coco-dev-setup/last_step_succesfull/en.coco
deleted file mode 100755
index a2e1f9fca..000000000
--- a/scripts/windows/coco-dev-setup/last_step_succesfull/en.coco
+++ /dev/null
@@ -1,53 +0,0 @@
-
-
-
- English
- Bye Bye!
-
-
- Installation has begun, this can take a while... Please stay tuned...
- Don't close any windows please, unless specified explicitly.
-
-
- [DOWNLOADING AND INSTALLING 3RD PARTY SOFTWARE]
- downloading:
- installing:
- Download and Installation cancelled...
- Software has been installed...
- Installation of the Developers Environment is complete!
- Installation has been stopped...
- unpacking and moving:
- Installing bower, brunch, nodemon and sendwithus...
-
-
- CodeCombat is safely stored on a git repository.
- Therefore you need a git command-line application (Git-bash).
- Examples: git-bash, CygWin, ...
- Do you already have git-bash?
- Enter the path to where you installed Git-bash
- Checking out the Git Repository...
- Please enter your github username:
-
-
- Do you already have the latest version of node-js installed?
- Please enter the full path of the location you installed nodejs to:
-
-
- Do you already have the latest version of ruby installed?
-
-
- Do you already have the latest version of mongo-db installed?
- Enter the path where you would like to install MongoDB:
-
-
- Do you already have the latest version of python installed?
-
-
- Sadly we can't support Windows XP... Please upgrade your OS!
- Machine OS cannot be determined...
- Report your OS to the developers @ CodeCombat.com...
- ... Cleaning up has been disabled... Terminating Script!
- The path to your git application is incorrect, please try again...
- The path you entered is invalid, please try again...
-
-
\ No newline at end of file
diff --git a/scripts/windows/coco-dev-setup/last_step_succesfull/get_config.bat b/scripts/windows/coco-dev-setup/last_step_succesfull/get_config.bat
deleted file mode 100755
index 3849e22c2..000000000
--- a/scripts/windows/coco-dev-setup/last_step_succesfull/get_config.bat
+++ /dev/null
@@ -1,3 +0,0 @@
-powershell .\get_var.ps1 config.coco %1 > var.tmp
-set /p %1= < var.tmp
-del /q var.tmp
\ No newline at end of file
diff --git a/scripts/windows/coco-dev-setup/last_step_succesfull/get_download.bat b/scripts/windows/coco-dev-setup/last_step_succesfull/get_download.bat
deleted file mode 100755
index fde3799e3..000000000
--- a/scripts/windows/coco-dev-setup/last_step_succesfull/get_download.bat
+++ /dev/null
@@ -1,4 +0,0 @@
-@ECHO off
-powershell .\get_var.ps1 downloads.coco %2 %3 %4 %5 %6 > var.tmp
-set /p %1= < var.tmp
-del /q var.tmp
\ No newline at end of file
diff --git a/scripts/windows/coco-dev-setup/last_step_succesfull/get_text.bat b/scripts/windows/coco-dev-setup/last_step_succesfull/get_text.bat
deleted file mode 100755
index 5cae1d431..000000000
--- a/scripts/windows/coco-dev-setup/last_step_succesfull/get_text.bat
+++ /dev/null
@@ -1,4 +0,0 @@
-@ECHO off
-powershell .\get_var.ps1 %1.coco %3 %4 %5 %6 %7 > var.tmp
-set /p %2= < var.tmp
-del /q var.tmp
\ No newline at end of file
diff --git a/scripts/windows/coco-dev-setup/last_step_succesfull/get_var.ps1 b/scripts/windows/coco-dev-setup/last_step_succesfull/get_var.ps1
deleted file mode 100755
index 77573929f..000000000
--- a/scripts/windows/coco-dev-setup/last_step_succesfull/get_var.ps1
+++ /dev/null
@@ -1,17 +0,0 @@
-$xml_file = [xml](get-content $args[0])
-if($args.count -eq 2)
-{
- $xml_file.variables.($args[1])
-}
-elseif($args.count -eq 3)
-{
- $xml_file.variables.($args[1]).($args[2])
-}
-elseif($args.count -eq 4)
-{
- $xml_file.variables.($args[1]).($args[2]).($args[3])
-}
-elseif($args.count -eq 5)
-{
- $xml_file.variables.($args[1]).($args[2]).($args[3]).($args[4])
-}
\ No newline at end of file
diff --git a/scripts/windows/coco-dev-setup/last_step_succesfull/run_script.bat b/scripts/windows/coco-dev-setup/last_step_succesfull/run_script.bat
deleted file mode 100755
index dfc6e6cc0..000000000
--- a/scripts/windows/coco-dev-setup/last_step_succesfull/run_script.bat
+++ /dev/null
@@ -1,2 +0,0 @@
-@echo off
-powershell "& "%*"
\ No newline at end of file
diff --git a/scripts/windows/coco-dev-setup/src/get_category.cpp b/scripts/windows/coco-dev-setup/src/get_category.cpp
deleted file mode 100755
index 971c3aefb..000000000
--- a/scripts/windows/coco-dev-setup/src/get_category.cpp
+++ /dev/null
@@ -1,146 +0,0 @@
-#include "stdafx.h"
-#include
-#include
-#include
-#include
-#include
-
-#define tstring std::wstring
-#define tcout std::wcout
-
-static const tstring DEF_URL = L"http://www.google.com";
-
-int ErrorReport(const tstring & str, int value = 0)
-{
- tcout << str.c_str();
- return value;
-}
-
-void GetHashInfo(tstring id, std::vector & info) {
- while(id.size() > 0)
- {
- size_t pos = id.find(L'-');
-
- tstring substr =
- id.substr(0, pos == tstring::npos ? id.length() : pos);
- info.push_back(substr);
-
- if(pos == tstring::npos) id = L"";
- else
- {
- ++pos;
- id = id.substr(pos, id.length() - pos);
- }
- }
-}
-
-void SetArrayVariable(
- const tstring & name,
- int id,
- const tstring & line
- )
-{
- tcout << L"set \"";
- tcout << name;
- tcout << L"[" << id << "]";
- tcout << L"=" << line;
- tcout << L"\"" << std::endl;
-}
-
-void FillArray(
- const std::vector & info,
- const tstring & name,
- const tstring & id_array_name,
- const tstring & file,
- int & id
- )
-{
- if(info.size() == 0) return;
-
- auto it = info.begin();
- size_t indention = 0;
- unsigned int nlc = 0;
-
- std::wifstream infile(file.c_str(), std::ifstream::in);
-
- if(!infile)
- {
- #ifdef _DEBUG
- tcout << file.c_str() << std::endl;
- tcout << strerror(errno) << std::endl;
- #endif
- return;
- }
-
- tstring line;
- int counter = 1;
- while (std::getline(infile, line))
- {
- size_t cpos = line.find('[');
- if(cpos == tstring::npos)
- {
- cpos = line.find_first_not_of(L" \t\r\n");
- }
- if(nlc++ == 0 || cpos == indention)
- {
- indention = cpos;
- if(it == info.end())
- {
- size_t pos = line.find(L'=') + 1;
- SetArrayVariable(
- name, id,
- line.substr(pos, line.size() - pos)
- );
- SetArrayVariable(
- id_array_name, id++,
- line.substr(cpos, pos - 3)
- );
- ++counter;
- }
- else if(line.find(*it) != tstring::npos)
- {
- ++it;
- nlc = 0;
- }
- }
- else if(counter > 1)
- {
- return;
- }
- }
-
- infile.close();
- return;
-}
-
-int _tmain(int argc, _TCHAR* argv[])
-{
- if(argc == 1)
- return ErrorReport(L"Please specify a localisation file.");
- else if(argc == 2)
- return ErrorReport(L"Please specify the name of the array.");
- else if(argc == 3)
- return ErrorReport(L"Please specify the name of the name-array.");
- else if(argc == 4)
- return ErrorReport(L"Please specify the counter parameter.");
- else if(argc == 5)
- return ErrorReport(L"Please specify one or more categories you are looking for.");
-
- tstring file, name, counter_name, id_array_name;
- file = argv[1];
- name = argv[2];
- id_array_name = argv[3];
- counter_name = argv[4];
- int id = 1;
-
- for(int i = 5 ; i < argc ; ++i)
- {
- std::vector information;
- GetHashInfo(argv[i], information);
- FillArray(information, name, id_array_name, file, id);
- }
-
- tcout << L"set \"" << counter_name << L"=" << (id - 1) << L"\"";
-
- return 0;
-}
diff --git a/scripts/windows/coco-dev-setup/src/get_extension.cpp b/scripts/windows/coco-dev-setup/src/get_extension.cpp
deleted file mode 100755
index f311ac93f..000000000
--- a/scripts/windows/coco-dev-setup/src/get_extension.cpp
+++ /dev/null
@@ -1,36 +0,0 @@
-#include "stdafx.h"
-#include
-#include
-#include
-#include
-#include
-
-#define tstring std::wstring
-#define tcout std::wcout
-
-int ErrorReport(const tstring & str, int value = 0)
-{
- tcout << str.c_str();
- return value;
-}
-
-int _tmain(int argc, _TCHAR* argv[])
-{
- if(argc == 1)
- return ErrorReport(L"Please specify a download URL.");
- if(argc == 2)
- return ErrorReport(L"Please specify a name for your variable.");
-
- tstring url, name, extension;
- url = argv[1];
- name = argv[2];
-
- if(url.find(L"exe") != tstring::npos) extension = L"exe";
- else if(url.find(L"msi") != tstring::npos) extension = L"msi";
- else if(url.find(L"zip") != tstring::npos) extension = L"zip";
-
- tcout << L"set \"" << name << L"=";
- tcout << extension << L"\"";
-
- return 0;
-}
\ No newline at end of file
diff --git a/scripts/windows/coco-dev-setup/src/get_var.cpp b/scripts/windows/coco-dev-setup/src/get_var.cpp
deleted file mode 100755
index e69b0be1c..000000000
--- a/scripts/windows/coco-dev-setup/src/get_var.cpp
+++ /dev/null
@@ -1,108 +0,0 @@
-#include "stdafx.h"
-#include
-#include
-#include
-#include
-#include
-
-#define tstring std::wstring
-#define tcout std::wcout
-
-static const tstring DEF_URL = L"http://www.google.com";
-
-int ErrorReport(const tstring & str, int value = 0)
-{
- tcout << str.c_str();
- return value;
-}
-
-void GetHashInfo(tstring id, std::vector & info) {
- while(id.size() > 0)
- {
- size_t pos = id.find(L'-');
-
- tstring substr =
- id.substr(0, pos == tstring::npos ? id.length() : pos);
- info.push_back(substr);
-
- if(pos == tstring::npos) id = L"";
- else
- {
- ++pos;
- id = id.substr(pos, id.length() - pos);
- }
- }
-}
-
-std::wstring GetText(const std::vector & info, const tstring & file)
-{
- if(info.size() == 0) return L"Info Size is 0.";
-
- auto it = info.begin();
- auto last = info.end() - 1;
- size_t indention = 0;
- unsigned int nlc = 0;
-
- std::wifstream infile(file.c_str(), std::ifstream::in);
-
- if(!infile)
- {
- #ifdef _DEBUG
- tcout << file.c_str() << std::endl;
- tcout << strerror(errno) << std::endl;
- #endif
- return L"File couldn't be opened.";
- }
-
- tstring line;
- while (std::getline(infile, line))
- {
- size_t cpos = line.find('[');
- if(nlc++ == 0 || cpos == indention)
- {
- indention = cpos;
- if(line.find(*it) != tstring::npos)
- {
- if(it == last)
- {
- size_t pos = line.find(L'=') + 1;
- infile.close();
- return line.substr(pos, line.size() - pos);
- }
- else
- {
- ++it;
- nlc = 0;
- }
- }
- }
- }
-
- infile.close();
- return L"Var couldn't be found.";
-}
-
-int _tmain(int argc, _TCHAR* argv[])
-{
- if(argc == 1)
- return ErrorReport(L"Please specify a localisation file.");
- else if(argc == 2)
- return ErrorReport(L"Please specify the ID you are looking for.");
-
- tstring file, hash;
- file = argv[1];
- hash = argv[2];
-
- std::vector information;
- GetHashInfo(hash, information);
-
- size_t size = information.size();
- for(unsigned int i = 0 ; i < size ; ++i)
- {
- tcout << information[i];
- if(i != size - 1) tcout << L"_";
- }
- tcout << L"=" << GetText(information, file);
-
- return 0;
-}