From 7ff44108af4298970f84ad7345da80a62e9b04a4 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Mon, 17 Oct 2016 16:32:11 +0200 Subject: [PATCH] Update documentation to work without ncdev Signed-off-by: Joas Schilling --- developer_manual/app/startapp.rst | 13 +++---------- developer_manual/app/testing.rst | 2 +- developer_manual/app/tutorial.rst | 17 ++++++++--------- developer_manual/general/devenv.rst | 6 +++--- 4 files changed, 15 insertions(+), 23 deletions(-) diff --git a/developer_manual/app/startapp.rst b/developer_manual/app/startapp.rst index 0f36a7009..bc73379b9 100644 --- a/developer_manual/app/startapp.rst +++ b/developer_manual/app/startapp.rst @@ -4,17 +4,11 @@ Create an app .. sectionauthor:: Bernhard Posselt -After :doc:`you've set up the development environment and installed the dev tool <../general/devenv>` change into the Nextcloud apps directory:: +After :doc:`you've set up the development environment <../general/devenv>` change into the Nextcloud apps directory:: cd /var/www/nextcloud/apps -Then run:: - - ncdev startapp MyApp --email mail@example.com --author "Your Name" --description "My first app" --owncloud 8 - -This will create all the needed files in the current directory. For more information on how to customize the generated app, see the `Project's GitHub page `_ or run:: - - ncdev startapp -h +Then create a skeleton app in the `app store `_. Enable the app -------------- @@ -27,7 +21,6 @@ The following directories have now been created: * **appinfo/**: Contains app metadata and configuration * **css/**: Contains the CSS * **js/**: Contains the JavaScript files -* **lib/Controller/**: Contains the controllers -* **lib/**: Contains the other class files of your app +* **lib/**: Contains the php class files of your app * **templates/**: Contains the templates * **tests/**: Contains the tests diff --git a/developer_manual/app/testing.rst b/developer_manual/app/testing.rst index 40a0b57da..87f6a635e 100644 --- a/developer_manual/app/testing.rst +++ b/developer_manual/app/testing.rst @@ -10,7 +10,7 @@ All PHP classes can be tested with `PHPUnit `_, JavaScript c PHP === -The PHP tests go into the **tests/** directory. Unfortunately the classloader in core requires a running server (as in fully configured and setup up with a database connection). This is unfortunately too complicated and slow so a separate classloader has to be provided. If the app has been generated with the **ncdev startapp** command, the classloader is already present in the the **tests/** directory and PHPUnit can be run with:: +The PHP tests go into the **tests/** directory and PHPUnit can be run with:: phpunit tests/ diff --git a/developer_manual/app/tutorial.rst b/developer_manual/app/tutorial.rst index 7eeda14a9..225b196da 100644 --- a/developer_manual/app/tutorial.rst +++ b/developer_manual/app/tutorial.rst @@ -9,11 +9,13 @@ This tutorial will outline how to create a very simple notes app. The finished a Setup ===== -After the `development tool `_ has been installed the :doc:`development environment needs to be set up <../general/devenv>`. This can be done by either `downloading the zip from the website `_ or cloning it directly from GitHub:: +First the :doc:`development environment <../general/devenv>` needs to be set up. This can be done by either `downloading the zip from the website `_ or cloning it directly from GitHub:: - ncdev setup core --dir nextcloud --branch $BRANCH + git clone git@github.com:nextcloud/server.git --branch $BRANCH + git submodule init + git submodule update -.. note:: $BRANCH is the desired Nextcloud branch (e.g. stable9 for Nextcloud 9, stable10 for Nextcloud 10, etc) +.. note:: ``$BRANCH`` is the desired Nextcloud branch (e.g. ``stable9`` for Nextcloud 9, ``stable10`` for Nextcloud 10, ..., ``master`` for the upcoming release) First you want to enable debug mode to get proper error messages. To do that set ``debug`` to ``true`` in the **nextcloud/config/config.php** file:: @@ -30,14 +32,11 @@ Now open another terminal window and start the development server:: cd nextcloud php -S localhost:8080 -Afterwards the app can be created in the **apps** folder:: +Afterwards a skeleton app can be created in the `app store `_. - cd apps - ncdev startapp OwnNotes +Download the extracted the downloaded file and move it into your ``apps/`` directory. Afterwards the application can be disabled on the `apps page `_. -This creates a new folder called **ownnotes**. Now access and set up Nextcloud through the webinterface at `http://localhost:8080 `_ and enable the OwnNotes application on the `apps page `_. - -The first basic app is now available at `http://localhost:8080/index.php/apps/ownnotes/ `_ +The first basic app is now available at ``http://localhost:8080/index.php/apps/yourappid/`` Routes & Controllers ==================== diff --git a/developer_manual/general/devenv.rst b/developer_manual/general/devenv.rst index b39238567..afa747b33 100644 --- a/developer_manual/general/devenv.rst +++ b/developer_manual/general/devenv.rst @@ -48,15 +48,15 @@ Check out the code The following commands are using **/var/www** as the Web server's directory and **www-data** as user name and group. -Install the `development tool `_ - After the development tool installation make the directory writable:: sudo chmod o+rw /var/www Then install Nextcloud from git:: - ncdev setup --dir /var/www/ server + git clone git@github.com:nextcloud/server.git --branch $BRANCH /var/www/ + git submodule init + git submodule update where is the folder where you want to install Nextcloud.