From c965acde252db83d4194f1d5802800c4f526a0ef Mon Sep 17 00:00:00 2001 From: Claudia Bedoya Date: Mon, 23 Jul 2018 19:33:49 -0500 Subject: [PATCH 1/5] new windows configuration to run phone and server --- docs/overview/running_project_windows.md | 49 ++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 docs/overview/running_project_windows.md diff --git a/docs/overview/running_project_windows.md b/docs/overview/running_project_windows.md new file mode 100644 index 0000000..0077396 --- /dev/null +++ b/docs/overview/running_project_windows.md @@ -0,0 +1,49 @@ +# How to get the code running on Windows for testing +There are some different steps to follow in order to run the e-mission server and the e-mission phone app in Windows from the command prompt. In this document, we will highlight the steps in the main documentation page (https://github.com/e-mission/e-mission-server#dependencies) where there are different steps to perform. + +Before start following the steps above, the first thing you want to do is to create this path in your computer: +``` +C:\var\tmp +``` +## e-mission server +### Python distribution +After installing and configuring Anaconda, there is the following step: +- *Setup the emission environment* +instead of running the command stated in this step, please run the following commands into your command prompt: +``` +conda env update --name emission --file setup/environment36.yml +activate emission +pip install six --upgrade +``` +Note that every time you need to run the code, you have to run the command ```activate emission```. Also, note that you must be at the root of the project in order to access the directory setup/ in the first command stated before. + +### Development +In the development section, we will change the step 3 "Start the server". Instead of doing that, first, you have to create or update the following environment variable on windows: + +Name of the variable: PYTHONPATH +Value of the variable: C:\MyPath\Anaconda3;C:\MyPath\e-mission-server + +Note that in the field "value of the variable" there are two paths separated by a semicolon. The first one is the path on your computer to the folder in which you installed Anaconda. The second is the path in your computer where you have the root folder of the server code. + +After doing so, you have to copy the e-mission.bat script into the root of your project and run the following command: +``` +e-mission.bat . emission/net/api/cfc_webapp.py +``` +Yes, with that dot in the middle... +So, note that every time you see the command ```./e-mission-py.bash``` in the documentation, you need to run instead ```e-mission.bat . ``` (with the dot after ".bat"). +## e-mission phone +### Installation +In step 4 of the installation called "Setup the config" you have run following commands: +``` +cd bin +node configure_xml_and_json.js "serve" +``` +You need to change the property "setup-serve" in the files: +- package.json +- package.cordobabuild.json +- package.serve.json +You have to change it to look like the following: +``` +"setup-serve": "node bin/download_settings_controls.js" +``` + From 605676c383fc5857f6f7de72841c198fd79404df Mon Sep 17 00:00:00 2001 From: Claudia Bedoya Date: Mon, 23 Jul 2018 19:37:51 -0500 Subject: [PATCH 2/5] fixing some extra issues like spaces, etc --- docs/overview/running_project_windows.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/overview/running_project_windows.md b/docs/overview/running_project_windows.md index 0077396..6a4d585 100644 --- a/docs/overview/running_project_windows.md +++ b/docs/overview/running_project_windows.md @@ -9,6 +9,7 @@ C:\var\tmp ### Python distribution After installing and configuring Anaconda, there is the following step: - *Setup the emission environment* + instead of running the command stated in this step, please run the following commands into your command prompt: ``` conda env update --name emission --file setup/environment36.yml From 4d455dc929171fe4c78ae64773263d2625cc2d2e Mon Sep 17 00:00:00 2001 From: Claudia Bedoya Date: Mon, 23 Jul 2018 19:39:54 -0500 Subject: [PATCH 3/5] fixing some extra issues like spaces, etc --- docs/overview/running_project_windows.md | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/docs/overview/running_project_windows.md b/docs/overview/running_project_windows.md index 6a4d585..c72f1b4 100644 --- a/docs/overview/running_project_windows.md +++ b/docs/overview/running_project_windows.md @@ -8,6 +8,7 @@ C:\var\tmp ## e-mission server ### Python distribution After installing and configuring Anaconda, there is the following step: + - *Setup the emission environment* instead of running the command stated in this step, please run the following commands into your command prompt: @@ -16,34 +17,40 @@ conda env update --name emission --file setup/environment36.yml activate emission pip install six --upgrade ``` -Note that every time you need to run the code, you have to run the command ```activate emission```. Also, note that you must be at the root of the project in order to access the directory setup/ in the first command stated before. +Note that every time you need to run the code, you have to run the command ```activate emission```. Also, note that you must be at the root of the project in order to access the directory ```setup/``` in the first command stated before. ### Development In the development section, we will change the step 3 "Start the server". Instead of doing that, first, you have to create or update the following environment variable on windows: -Name of the variable: PYTHONPATH -Value of the variable: C:\MyPath\Anaconda3;C:\MyPath\e-mission-server +- Name of the variable: PYTHONPATH + +- Value of the variable: C:\MyPath\Anaconda3;C:\MyPath\e-mission-server Note that in the field "value of the variable" there are two paths separated by a semicolon. The first one is the path on your computer to the folder in which you installed Anaconda. The second is the path in your computer where you have the root folder of the server code. After doing so, you have to copy the e-mission.bat script into the root of your project and run the following command: + ``` e-mission.bat . emission/net/api/cfc_webapp.py ``` + Yes, with that dot in the middle... So, note that every time you see the command ```./e-mission-py.bash``` in the documentation, you need to run instead ```e-mission.bat . ``` (with the dot after ".bat"). ## e-mission phone ### Installation In step 4 of the installation called "Setup the config" you have run following commands: + ``` cd bin node configure_xml_and_json.js "serve" ``` + You need to change the property "setup-serve" in the files: - package.json - package.cordobabuild.json - package.serve.json You have to change it to look like the following: + ``` "setup-serve": "node bin/download_settings_controls.js" ``` From 027d13cb35616f9e14f351cc10b1c7402602f398 Mon Sep 17 00:00:00 2001 From: Claudia Bedoya Date: Mon, 23 Jul 2018 19:42:26 -0500 Subject: [PATCH 4/5] new windows configuration to run phone and server fixing spaces an style --- docs/overview/running_project_windows.md | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/docs/overview/running_project_windows.md b/docs/overview/running_project_windows.md index c72f1b4..eae7d77 100644 --- a/docs/overview/running_project_windows.md +++ b/docs/overview/running_project_windows.md @@ -7,26 +7,23 @@ C:\var\tmp ``` ## e-mission server ### Python distribution -After installing and configuring Anaconda, there is the following step: +After installing and configuring Anaconda, there is the following step "*Setup the emission environment*". Instead of running the command stated in this step, please run the following commands into your command prompt: -- *Setup the emission environment* - -instead of running the command stated in this step, please run the following commands into your command prompt: ``` conda env update --name emission --file setup/environment36.yml activate emission pip install six --upgrade ``` + Note that every time you need to run the code, you have to run the command ```activate emission```. Also, note that you must be at the root of the project in order to access the directory ```setup/``` in the first command stated before. ### Development -In the development section, we will change the step 3 "Start the server". Instead of doing that, first, you have to create or update the following environment variable on windows: +In the development section, we will change the step 3 "*Start the server*". Instead of doing that, first, you have to create or update the following environment variable on windows: - Name of the variable: PYTHONPATH - - Value of the variable: C:\MyPath\Anaconda3;C:\MyPath\e-mission-server -Note that in the field "value of the variable" there are two paths separated by a semicolon. The first one is the path on your computer to the folder in which you installed Anaconda. The second is the path in your computer where you have the root folder of the server code. +Note that in the field "*Value of the variable*" there are two paths separated by a semicolon. The first one is the path on your computer to the folder in which you installed Anaconda. The second is the path in your computer where you have the root folder of the server code. After doing so, you have to copy the e-mission.bat script into the root of your project and run the following command: From 22903b8ecf180dcb580e17b2c257f51c7b6ddd4f Mon Sep 17 00:00:00 2001 From: Claudia Bedoya Date: Mon, 23 Jul 2018 19:50:33 -0500 Subject: [PATCH 5/5] script on new folder called scripts --- docs/overview/running_project_windows.md | 2 +- scripts/overview/running_project_windows/e-mission.bat | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 scripts/overview/running_project_windows/e-mission.bat diff --git a/docs/overview/running_project_windows.md b/docs/overview/running_project_windows.md index eae7d77..8ca9d2d 100644 --- a/docs/overview/running_project_windows.md +++ b/docs/overview/running_project_windows.md @@ -25,7 +25,7 @@ In the development section, we will change the step 3 "*Start the server*". Inst Note that in the field "*Value of the variable*" there are two paths separated by a semicolon. The first one is the path on your computer to the folder in which you installed Anaconda. The second is the path in your computer where you have the root folder of the server code. -After doing so, you have to copy the e-mission.bat script into the root of your project and run the following command: +After doing so, you have to copy the e-mission.bat script (located at scripts/overview/running_project_windows) into the root of your project and run the following command: ``` e-mission.bat . emission/net/api/cfc_webapp.py diff --git a/scripts/overview/running_project_windows/e-mission.bat b/scripts/overview/running_project_windows/e-mission.bat new file mode 100644 index 0000000..1235dac --- /dev/null +++ b/scripts/overview/running_project_windows/e-mission.bat @@ -0,0 +1,5 @@ +@ECHO OFF +setlocal +set PYTHONPATH=%1 +python %2 %3 +endlocal \ No newline at end of file