Skip to content

Commit e70bf2a

Browse files
committed
Merge pull request #20 from codebendercc/installation_script
Installation script updated for new process
2 parents ca979c1 + b8e8624 commit e70bf2a

16 files changed

+1557
-459
lines changed

.travis.yml

+3-14
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,11 @@ before_install:
77
- sudo apt-get update
88

99
before_script:
10-
- cd Symfony
11-
- cp app/config/parameters.yml.dist app/config/parameters.yml
12-
- composer install
13-
- sudo apt-get install -y unzip
14-
- sudo mkdir /opt/codebender
15-
- wget https://github.com/codebendercc/arduino-core-files/archive/master.zip
16-
- unzip master.zip
17-
- sudo cp -r arduino-core-files-master /opt/codebender/codebender-arduino-core-files
18-
- rm master.zip
19-
- wget https://github.com/codebendercc/external_cores/archive/master.zip
20-
- unzip master.zip
21-
- sudo cp -r external_cores-master /opt/codebender/external-core-files
22-
10+
- scripts/install.sh
11+
- cd /opt/codebender/compiler/Symfony
2312
script:
2413
- mkdir -p build/logs
25-
- phpunit -c app/ --coverage-clover build/logs/clover.xml
14+
- ../scripts/run_tests.sh
2615

2716
after_script:
2817
- php composer.phar update satooshi/php-coveralls --dev

README.md

+33-7
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,48 @@ This repository is part of the [codebender.cc](http://www.codebender.cc) maker a
44

55
## And what's that?
66

7-
codebender comes to fill the need for reliable and easy to use tools for makers.
8-
A need that from our own experience could not be totally fulfilled by any of the existing solutions. Things like installing libraries, updating the software or installing the IDE can be quite a painful process.
7+
codebender fills the need for reliable, easy to use tools for makers, a need that couldn't be completely fulfilled by any existing solution according to our experience.
98

10-
In addition to the above, the limited features provided (e.g. insufficient highlighting, indentation and autocompletion) got us starting building codebender, a completely web-based IDE, that requires virtually no installation and offers a great code editor. It also stores your sketches on the cloud.
9+
Things like installing libraries or the IDE and updating software sometimes were (and still are) quite a painful process. But in addition to the above, the limited features provided (e.g. insufficient highlighting, indentation and autocompletion) got us to start codebender, a completely web-based IDE that requires virtually no installation and offers a great code editor. Plus it stores your sketches on the cloud. Yeah!
1110

12-
That way, you can still access your sketches safely even if your laptop is stolen or your hard drive fails! codebender also takes care of compilation, giving you extremely descriptive warnings on terrible code. On top of that, when you are done, you can upload your code to your Arduino straight from the browser.
11+
With your code on the cloud, you can access your sketches safely even if your laptop is stolen or your hard drive fails! codebender also compiles your code giving you extremely descriptive error descriptions on terrible code. There's even more, you can upload your code to your Arduino straight from the browser.
1312

1413
## How does the compiler come into the picture?
1514

16-
The compiler repository includes all the necessary files needed to run the compiler as a service. It receives the code as input and outputs the errors in the code, or the compiled output if the compilation was successful. We provide a really easy to use interface to allow us to send the code to the compiler easily.
15+
The compiler repository includes all the necessary files needed to run the compiler as a service. It receives the code as input and outputs the compiled output if the compilation was successful or the errors present in the code. We provide an easy interface to send the code to the compiler.
1716

1817
Here's a list of open source projects we use
1918
* Clang
2019
* gcc-avr
2120
* avr binutils (avrsize)
2221

23-
For development, we've used it on a variety of Linux and Mac OS X machines.
22+
For development we've run it on a variety of Linux and Mac OS X machines.
2423

25-
For production, we are using Ubuntu Server 12.04, and we know it works perfectly with that, so we suggest using that as well.
24+
For production we are using Ubuntu Server 12.04. We know the compiler works perfectly on it, so we suggest you using it as well.
25+
26+
## How to install
27+
28+
Check out the code in any directory you wish
29+
30+
`git clone https://github.com/codebendercc/compiler.git`
31+
32+
Then cd in the created directory (if you run the command as is above, it would be named `compiler`) and run
33+
34+
`scripts/install.sh`
35+
36+
(don't cd into scripts directory and run install.sh from there, it won't work)
37+
38+
If you now visit `http://localhost/status` you'll see a JSON response telling you everything's ok:
39+
`{"success":true,"status":"OK"}`
40+
41+
## What's next?
42+
43+
Visit the [wiki](https://github.com/codebendercc/compiler/wiki) for more information.
44+
45+
## How can someone contribute?
46+
47+
Contribution is always welcome whether it is by creating an issue for a bug or suggestion you can't fix yourself or a pull request for something you can.
48+
49+
If you write new code or edit old code please don't forget to add/update relative unit tests that come with it. It is always a good idea to run tests localy to make sure nothing breaks before you create a pull request.
50+
51+
We expect new code to be [PSR-2](http://www.php-fig.org/psr/psr-2/) but we know we carry legacy code with different coding styles. You're welcome to fix that.

Symfony/app/SymfonyRequirements.php

+16-2
Original file line numberDiff line numberDiff line change
@@ -554,6 +554,20 @@ function_exists('simplexml_import_dom'),
554554
'Your project might not work properly due to the PHP bug #61453 ("Cannot dump definitions which have method calls"). Install PHP 5.4.1 or newer.'
555555
);
556556

557+
$this->addRecommendation(
558+
version_compare($installedPhpVersion, '5.4.11', '>='),
559+
'When using the logout handler from the Symfony Security Component, you should have at least PHP 5.4.11 due to PHP bug #63379 (as a workaround, you can also set invalidate_session to false in the security logout handler configuration)',
560+
'Install PHP 5.4.11 or newer if your project uses the logout handler from the Symfony Security Component.'
561+
);
562+
563+
$this->addRecommendation(
564+
(version_compare($installedPhpVersion, '5.3.18', '>=') && version_compare($installedPhpVersion, '5.4.0', '<'))
565+
||
566+
version_compare($installedPhpVersion, '5.4.8', '>='),
567+
'You should use PHP 5.3.18+ or PHP 5.4.8+ to always get nice error messages for fatal errors in the development environment due to PHP bug #61767/#60909',
568+
'Install PHP 5.3.18+ or PHP 5.4.8+ if you want nice error messages for all fatal errors in the development environment.'
569+
);
570+
557571
if (null !== $pcreVersion) {
558572
$this->addRecommendation(
559573
$pcreVersion >= 8.0,
@@ -564,8 +578,8 @@ function_exists('simplexml_import_dom'),
564578

565579
$this->addRecommendation(
566580
class_exists('DomDocument'),
567-
'PHP-XML module should be installed',
568-
'Install and enable the <strong>PHP-XML</strong> module.'
581+
'PHP-DOM and PHP-XML modules should be installed',
582+
'Install and enable the <strong>PHP-DOM</strong> and the <strong>PHP-XML</strong> modules.'
569583
);
570584

571585
$this->addRecommendation(

Symfony/composer.json

+8-4
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,14 @@
2020
"sensio/generator-bundle": "2.3.*",
2121
"incenteev/composer-parameter-handler": "~2.0"
2222
},
23-
"require-dev": {
24-
"satooshi/php-coveralls": "dev-master"
25-
},
26-
"scripts": {
23+
"require-dev": {
24+
"phpunit/phpunit": "3.7.*",
25+
"satooshi/php-coveralls": "dev-master",
26+
"squizlabs/php_codesniffer": "1.*",
27+
"sebastian/phpcpd": "*",
28+
"phpmd/phpmd": "2.0.*"
29+
},
30+
"scripts": {
2731
"post-install-cmd": [
2832
"Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
2933
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",

0 commit comments

Comments
 (0)