Commit 2e550c3d authored by Adrenesis's avatar Adrenesis

Update README for windows, add a php version of clone_courses

parent 827830e8
Pipeline #280 failed with stage
in 52 seconds
...@@ -8,6 +8,8 @@ Only the php vendors are not included. ...@@ -8,6 +8,8 @@ Only the php vendors are not included.
## Run locally for fast development ## Run locally for fast development
### LINUX/MAC
PHP `7.1` (or above) is recommended. Do tell us what works or not for you. PHP `7.1` (or above) is recommended. Do tell us what works or not for you.
Apparently, PHP `5.6` works as well. To confirm by @cmeny. Apparently, PHP `5.6` works as well. To confirm by @cmeny.
...@@ -49,6 +51,49 @@ Finally, visit http://localhost:8000 in your favorite browser. ...@@ -49,6 +51,49 @@ Finally, visit http://localhost:8000 in your favorite browser.
At this point, you should be asked to set admin credentials. At this point, you should be asked to set admin credentials.
These are local and will allow you into [the `/admin` section](http://localhost:8000/admin) of the website. These are local and will allow you into [the `/admin` section](http://localhost:8000/admin) of the website.
### WINDOWS
Download php 7.xx
Create C:\php7\
Add "C:\php7\" to environnement variable
Right click "computer"
"Properties"
"advanced parameter" (on the left part)
then "Environement Variable" (button at the bottom)
In the "System Variable" part, find "Path"
Click on it the "Edit"
go the end of the second field (Value of variable), which should be ended by ";", if it's not the case, add ";"
then Add "C:\php7\;"
CLick "OK" then "OK"
Enable gd and curl
Open C:/php7/php.ini
Ctrl+F to search for "curl"
You should find ";extension=curl"
Remove the ; to enable curl extension
You should find ";extension=gd2" 2 lines below
Remove the ; to enable gd extension
Install git
TODO
Clone your project
Shift+Right click where you want to put m3p2 to "Open Command line here"
use the command: "git clone --recursive https://m3p2.ljbac.com/m3p2/grav-website.git m3p2-html-generator"
download https://getcomposer.org/composer.phar and copy it in m3p2-html-generator/bin
Install grav:
go inside m3p2-html-generator
Shift+Right click where you want to put m3p2 to "Open Command line here"
use the command "php bin/grav install"
## Mirror the courses to generate a static website ## Mirror the courses to generate a static website
......
#!/usr/bin/env php
<?php
echo "Fetching fresh courses from server…";
$return = shell_exec ( "git submodule update --init --recursive");
echo $return;
$return = shell_exec ( "git submodule foreach git checkout master");
echo $return;
$return = shell_exec ( "git submodule foreach git pull origin master");
echo $return;
echo "Done!";
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment