diff --git a/.gitignore b/.gitignore index bcf927590..8bc9f477c 100755 --- a/.gitignore +++ b/.gitignore @@ -23,4 +23,5 @@ variants/*/cache/ variants/KnownWorld_901/ ghostRatingData.* gr.php -adminInfo.php \ No newline at end of file +adminInfo.php +vendor/ diff --git a/README.txt b/README.txt index 287ce67b7..a36b63f97 100755 --- a/README.txt +++ b/README.txt @@ -55,6 +55,14 @@ Edit config.sample.php to work with your setup, being very careful to read the w about security issues. The salts/secrets, errorlog/orderlog directories, can all leave your server wide open if you don't set them right. Rename to config.php when ready. +=> Composer + +Install Composer via https://getcomposer.org/. Then run: + + composer install + +This will install all external dependencies that webDiplomacy uses. + => Log-on Once you've set config.php up you can use the random gameMasterSecret you entered to authenticate as the admin. First create a user via the registration page, then diff --git a/composer.json b/composer.json new file mode 100644 index 000000000..d00e6d31b --- /dev/null +++ b/composer.json @@ -0,0 +1,18 @@ +{ + "name": "kestasjk/web-diplomacy", + "description": "webDiplomacy", + "keywords": ["diplomacy"], + "type": "project", + "repositories": [], + "require": { + "php": "^7.0" + }, + "require-dev": {}, + "config": { + "preferred-install": "dist", + "sort-packages": true, + "optimize-autoloader": true + }, + "minimum-stability": "dev", + "prefer-stable": true +} \ No newline at end of file diff --git a/composer.lock b/composer.lock new file mode 100644 index 000000000..7e614a206 --- /dev/null +++ b/composer.lock @@ -0,0 +1,19 @@ +{ + "_readme": [ + "This file locks the dependencies of your project to a known state", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", + "This file is @generated automatically" + ], + "content-hash": "8bb0a2358b29066c199dfaca0f0e7c6a", + "packages": [], + "packages-dev": [], + "aliases": [], + "minimum-stability": "dev", + "stability-flags": [], + "prefer-stable": true, + "prefer-lowest": false, + "platform": { + "php": "^7.0" + }, + "platform-dev": [] +} diff --git a/header.php b/header.php index 4898207f3..e41cef086 100755 --- a/header.php +++ b/header.php @@ -47,6 +47,7 @@ function setExpires($expires) { if( !defined('IN_CODE') ) define('IN_CODE', 1); // A flag to tell scripts they aren't being executed by themselves +require_once 'vendor/autoload.php'; require_once('config.php'); require_once('global/definitions.php');