Downloading the source code: различия между версиями

Материал из Chaotic Onyx
Перейти к навигацииПерейти к поиску
м (Откат правок Vlasik (обсуждение) к версии MasterOfDmx)
(Немного перевел, если кто-то понимает в датабазе, займитесь ей, пожалуйста.)
Строка 1: Строка 1:
 
{{Заготовка}}
 
{{Заготовка}}
  
This page contains the information and steps needed to download the latest version of the code, compile it and host your own server.
+
Эта страница содержит информацию о том, как скачать, настроить и запустить свой собственный сервер.
 
{{toc_right}}
 
{{toc_right}}
 
<div class="toccolours mw-collapsible mw-collapsed" style="width:99%">
 
<div class="toccolours mw-collapsible mw-collapsed" style="width:99%">
Строка 11: Строка 11:
 
The /tg/station 13 source code is under [http://www.gnu.org/licenses/agpl-3.0.html GNU AGPL v3 license] and the assets are [http://freedomdefined.org/Licenses/CC-BY-SA CC-BY-SA].
 
The /tg/station 13 source code is under [http://www.gnu.org/licenses/agpl-3.0.html GNU AGPL v3 license] and the assets are [http://freedomdefined.org/Licenses/CC-BY-SA CC-BY-SA].
  
== Downloading ==
+
== Загрузка ==
  
We use GitHub to host our project.
+
Мы используем GitHub в качестве репозитория для нашего проекта.
  
A zip download is available here: [https://github.com/tgstation/-tg-station]
+
Загрузить архив можно по этой ссылке: [https://github.com/tgstation/-tg-station]
  
If you don't want to download 30MB of data every time an update is made, you can [[Setting up git|follow this guide]] to set up TortoiseGit.
+
Если вы не хотите скачивать по 30мб после каждого апдейта, то вы можете [[Setting up git|использовать это руководство]] для установки TortoiseGit.
  
== "I did not change anything, but the code does not work anymore!" ==
+
== "Я ничего не трогал, но все перестало работать!" ==
  
This is likely due to corrupted files.
+
Вероятнее всего были повреждены файлы при загрузке.
To fix this, you need to:
+
Чтобы исправить проблему, вам нужно:
  
*Re-download everything
+
*Скачать заново все файлы
*Copy over your config folder and the data folder
+
*Заменить файлы конфига вашими собственными
*Clean compile
+
*Скомпилировать сервер
  
(There is no good alternative to this with TortoiseGit)
+
(Если вы используете TortoiseGit, то у вас не должно возникнуть таких проблем)
  
== Hosting a server ==
+
== Запуск своего собственного сервера ==
  
To get a simple server running first
+
Чтобы запустить свой простенький сервер, следуйте этим шагам:
* Download the source code as explained [[Downloading_the_source_code#Downloading|above]]
+
* Скачайте билд, как уже было рассказано [[Downloading_the_source_code#Downloading|до этого]].
* Open tgstation.dme in dream maker (double click it)
+
* Откройте tgstation.dme в Dream Maker (двойной клик)
* Once it opens select Build > Compile
+
* Как только он откроется, нажмите Build > Compile
* Wait until it compiles. Once it does a new file "tgstation.dmb" will be created in the same folder where "tgstation.dme" is. The dmb file has an orange icon. Compile time usually takes between 1 and 10 minutes, depending on your computer. Dream maker will show as 'not responding' during this time, but it is compiling.
+
* Подождите, пока билд скомпилируется. Как только компил закончится, у вас появится новый файл "tgstation.dmb" в той папке, в которой находится "tgstation.dme". Новый файл имеет оранжевую иконку. Компилирование чаще всего занимает от одной, до десяти минут, в зависимости от мощности вашего компьютера. Вы так же не сможете пользоваться Dream Maker в это время.
* Open dream daemon (Win7: start menu > all programs > BYOND > Dream Daemon; Win8: start > type Dream Daemon > Dream Daemon)
+
* Откройте Dream Daemon (Win7: start menu > all programs > BYOND > Dream Daemon; Win8: start > type Dream Daemon > Dream Daemon)
* Select the "..." in the lower right corner and select the file "tgstation.dmb".
+
* Выберите "..." в правом нижнем углу и выберите файл "tgstation.dmb".
* Click the "GO" button and wait until it changes to a red "stop" button. Starting the server usually takes between 1 and 5 minutes. It is fully started once you can normally interact with Dream Daemon and a byond://xxx.xxx.xxx.xxx:xxxxx link is present at the bottom.
+
* Нажмите на кнопку "GO" и подождите, пока она заменится на кнопку "stop". Запуск сервера чаще всего занимает от одной до пяти минут. Он полностью запустится, когда вы сможете взаимодействовать с Dream Daemon и появится надпись адреса вашего сервера byond://xxx.xxx.xxx.xxx:xxxxx .
* Click the yellow button (former "...") to auto-join
+
* Нажмите на желтую кнопку (бывшая "...") для авто-коннекта.
* Left click the link (byond://xxx.xxx.xxx.xxx:xxxxx) to copy it to clipboard
+
* Левый щелчок по адресу (byond://xxx.xxx.xxx.xxx:xxxxx) скопирует его в буфер обмена.
* Paste the link (ctrl+v) to your friends so they can join.
+
* Отправьте эту ссылку (ctrl+v) вашим друзьям, чтобы они могли зайти.
  
== Making your server visible on byond.com ==
+
== Открытие вашего сервера на byond.com ==
  
You '''DO NOT NEED''' to pay for membership to make your server visible on byond.com!
+
Вам '''НЕ НУЖНО''' платить за членство, чтобы ваш сервер увидели на byond.com!
  
To make your server show up, go to the /code/hub file. That file contains information on how to make your server visible. Be sure to edit that file '''BEFORE''' you compile. If this doesn't work, you may ask for help on our [irc://irc.rizon.net/tgstation13 IRC].
+
Чтобы его увидели, откройте /code/hub file. Этот файл содержит всю информацию о том, как сделать ваш сервер видимым. Убедитесь, что вы изменили этот файл '''ПЕРЕД ТЕМ''', как вы запустили компиляцию. Если у вас что-то не работает, вы всегда можете задать свой вопрос здесь [irc://irc.rizon.net/tgstation13 IRC].
  
== Setting up the database ==
+
== Настройка дата базы ==
  
Also see [[Working with the database]].
+
Можете посмотреть [[Working with the database]].
  
 
* Download and install XAMPP ([http://www.apachefriends.org/en/xampp-windows.html Windows], [http://www.apachefriends.org/en/xampp-linux.html Linux]). Make sure you have both apache and mysql selected when you install it.
 
* Download and install XAMPP ([http://www.apachefriends.org/en/xampp-windows.html Windows], [http://www.apachefriends.org/en/xampp-linux.html Linux]). Make sure you have both apache and mysql selected when you install it.
Строка 108: Строка 108:
 
'''Baystation12'''
 
'''Baystation12'''
 
<div class="mw-collapsible-content">
 
<div class="mw-collapsible-content">
=Baystation12 Download, Compile, and Initial Setup=
+
=Baystation12. Загрузка. Настройка. Запуск.=
# Install BYOND and create an account at  http://www.byond.com/   
+
# Установите BYOND и создайте аккаунт на сайте http://www.byond.com/   
 
# Checkout the source using [http://git-scm.com/ Git] or download it directly from the [https://github.com/Baystation12/Baystation12/zipball/master ZIP button on Github] and extract it into a folder of your choosing.
 
# Checkout the source using [http://git-scm.com/ Git] or download it directly from the [https://github.com/Baystation12/Baystation12/zipball/master ZIP button on Github] and extract it into a folder of your choosing.
 
# Open '''baystation12.dme'''.
 
# Open '''baystation12.dme'''.

Версия от 10:55, 15 ноября 2015

В разработке…


Jobeng.png
Данная статья помечена как неоконченная. Это означает, что статья находится на доработке, поэтому может быть неверна или неактуальна.

Вы можете помочь проекту Onyxyeye@256x256.png Onyx и сообществу Animus-logo.png SS13 в целом — зайдите на наш Bus Mainframes.gif Портал сообщества.


Эта страница содержит информацию о том, как скачать, настроить и запустить свой собственный сервер.

/tg/station 13

/tg/station 13 Licensing

The /tg/station 13 source code is under GNU AGPL v3 license and the assets are CC-BY-SA.

Загрузка

Мы используем GitHub в качестве репозитория для нашего проекта.

Загрузить архив можно по этой ссылке: [1]

Если вы не хотите скачивать по 30мб после каждого апдейта, то вы можете использовать это руководство для установки TortoiseGit.

"Я ничего не трогал, но все перестало работать!"

Вероятнее всего были повреждены файлы при загрузке. Чтобы исправить проблему, вам нужно:

  • Скачать заново все файлы
  • Заменить файлы конфига вашими собственными
  • Скомпилировать сервер

(Если вы используете TortoiseGit, то у вас не должно возникнуть таких проблем)

Запуск своего собственного сервера

Чтобы запустить свой простенький сервер, следуйте этим шагам:

  • Скачайте билд, как уже было рассказано до этого.
  • Откройте tgstation.dme в Dream Maker (двойной клик)
  • Как только он откроется, нажмите Build > Compile
  • Подождите, пока билд скомпилируется. Как только компил закончится, у вас появится новый файл "tgstation.dmb" в той папке, в которой находится "tgstation.dme". Новый файл имеет оранжевую иконку. Компилирование чаще всего занимает от одной, до десяти минут, в зависимости от мощности вашего компьютера. Вы так же не сможете пользоваться Dream Maker в это время.
  • Откройте Dream Daemon (Win7: start menu > all programs > BYOND > Dream Daemon; Win8: start > type Dream Daemon > Dream Daemon)
  • Выберите "..." в правом нижнем углу и выберите файл "tgstation.dmb".
  • Нажмите на кнопку "GO" и подождите, пока она заменится на кнопку "stop". Запуск сервера чаще всего занимает от одной до пяти минут. Он полностью запустится, когда вы сможете взаимодействовать с Dream Daemon и появится надпись адреса вашего сервера byond://xxx.xxx.xxx.xxx:xxxxx .
  • Нажмите на желтую кнопку (бывшая "...") для авто-коннекта.
  • Левый щелчок по адресу (byond://xxx.xxx.xxx.xxx:xxxxx) скопирует его в буфер обмена.
  • Отправьте эту ссылку (ctrl+v) вашим друзьям, чтобы они могли зайти.

Открытие вашего сервера на byond.com

Вам НЕ НУЖНО платить за членство, чтобы ваш сервер увидели на byond.com!

Чтобы его увидели, откройте /code/hub file. Этот файл содержит всю информацию о том, как сделать ваш сервер видимым. Убедитесь, что вы изменили этот файл ПЕРЕД ТЕМ, как вы запустили компиляцию. Если у вас что-то не работает, вы всегда можете задать свой вопрос здесь IRC.

Настройка дата базы

Можете посмотреть Working with the database.

  • Download and install XAMPP (Windows, Linux). Make sure you have both apache and mysql selected when you install it.
  • Run XAMPP Control Panel (Open start menu, type 'xampp' in the search field and run it)
  • Click 'Start' next to Apache and MySQL in the control panel. (Apache often conflicts with skype, so make sure you have skype off: Right click it's icon in the tray and click quit. Hiding it is not enough.)
  • Go to the following address in your browser: http://localhost/phpmyadmin (will only work once you start up both Apache and MySQL in the XAMPP Control Panel)
  • Click on the button titled SQL in the row of buttons at the top.
  • Open the file 'SQL/tgstation_schema.sql' in notepad and copy its content. You can also find it here, but it may be newer than the version you are using.
  • Paste the file's content into the input field for sql in phpmyadmin and hit 'Execute' in the bottom right
  • Once you execute this, a new database should be added to the list on the left, called 'feedback'. If not, refresh the page. If you click on the database, it should show you all the tables it includes. At this point, you have created the database 'infrastructure'. You now have to create a user for it.
  • Click on 'SQL' in the top again, and execute the following statement: CREATE USER 'myuser'@'localhost' IDENTIFIED BY 'mypass'; GRANT ALL ON feedback.* TO 'myuser'@'%'; Replace both instances of myuser with some username and mypass with some password. Be careful to copy all the apostrophes. This will create a new user and grant him all privileges for the feedback database.
  • Please keep phpmyadmin open for a while longer.
  • Open the file: config/dbconfig.txt in notepad
  • Make sure to set it so that:
    • SQL_ENABLED does not have a # in front of it
    • ADDRESS localhost
    • PORT 3306
    • FEEDBACK_DATABASE feedback
    • FEEDBACK_LOGIN myuser (where myuser is the username you set in the CREATE USER statement)
    • FEEDBACK_PASSWORD mypass (where mypass is the password you set in the CREATE USER statement)
  • The database is now set up for death logging, population logging, polls (Tutorial), library, privacy poll, connection logging and player logging. There are two more features which you should consider. And it's best to do so now, since adopting them later can be a pain.

Database based banning

Offers temporary jobbans, admin bans, cross-server bans, keeps bans logged even after they've expired or were unbanned, and allows for the use of the off-server ban log.

To enable database based banning:

  • Open config/config.txt
  • Add a # in front of BAN_LEGACY_SYSTEM, so the line looks like "#BAN_LEGACY_SYSTEM"
  • Done. Note that any legacy bans are no longer enforced once this is done! So it's a good idea to do it when you're starting up.

Database based administration

DATABASE BASED ADMINISTRATION CURRENTLY DOES NOT WORK.

The rest of this section remains for when it gets fixed.

Offers a changelog for changes done to admins, which increases accountability (adding/removing admins, adding/removing permissions, changing ranks); allows admins with +PERMISSIONS to edit other admins' permissions ingame, meaning they don't need remote desktop access to edit admins; Allows for custom ranks, with permissions not being tied to ranks, offering a better ability for the removal or addition of permissions to certain admins, if they need to be punished, or need extra permissions. Enabling this can be done any time, it's just a bit tedious the first time you do it, if you don't have direct access to the database.

To enable database based administration:

  • Open config/config.txt
  • Add a # in front of ADMIN_LEGACY_SYSTEM, so the line looks like "#ADMIN_LEGACY_SYSTEM"
  • Do the steps described in Adding your first admin.
  • Done. Note that anyone in admins.txt lost admin status, including you! So do the step above! You can repeat it for everyone, as it's a lot easier to do that and just correct permissions with the ingame panel called 'permissions panel'.
  • If your database ever dies, your server will revert to the old admin system, so it is a good idea to have admins.txt and admin_ranks.txt set up with some admins too, just so the loss of the database doesn't completely destroy everything.

Baystation12

Baystation12. Загрузка. Настройка. Запуск.

  1. Установите BYOND и создайте аккаунт на сайте http://www.byond.com/
  2. Checkout the source using Git or download it directly from the ZIP button on Github and extract it into a folder of your choosing.
  3. Open baystation12.dme.
  4. In the menu at the top, select Build > Compile.
    • Compile time depends on your computer specs. Expect to wait between 2-10 minutes. When it finishes you will see the following message:
      saving baystation12.dmb (DEBUG mode)
      baystation12.dmb - 0 errors, 0 warnings
    • If you see any errors or warnings, something has gone wrong - possibly a corrupt download or the files extracted wrong.
  5. Browse into the /config folder. In the sub-folder "example", there's an example set of config files; copy these into the main /config folder and edit them to taste. You'll want to edit config.txt to set the probabilities for different gamemodes in Secret and to set your server location so that all your players don't get disconnected at the end of each round. It's recommended you don't turn on the gamemodes with probability 0, except Extended, as they have various issues and aren't currently being tested, so they may have unknown and bizarre bugs. Extended is essentially no mode, and isn't in the Secret rotation by default.
  6. Open admins.txt and remove the default admins to add your own. Some available levels (from highest to lowest) are: Game Master, Game Admin, Moderator. The Host level is the highest level and should let you use all available commands, and it's especially useful for creating a private server with which to test things.
    • The admins.txt format is:
      byondkey - Rank
    • ...where the BYOND key must be in lowercase and the admin rank must be properly capitalized. Additional levels and specific commands accessible by each level can be seen in /code/modules/admin/admin_verbs.dm. (Check to be sure you've removed the # comment tag if you copy the format over from the example rank.)

Starting the Server

  1. To start the server, run the BYOND client, log in, and select File > "Start Dream Daemon..." from the menu.
  2. At the bottom of Dream Daemon, enter the path to your compiled baystation12.dmb file.
  3. Set Port to the one you specified in the config.txt.
    • Note: If you are running it locally for testing, the port can be empty and one will be selected for you. However, choosing a port will prevent needing to edit your bookmark (below). A example testing port is 50000.
  4. Security: (Trusted is recommended. You can use Safe mode if you prefer, but you'll be clicking alert windows when the server needs to edit the info.json every time it boots up.)
    • Trusted mode allows the game to access files, run system commands, and perform other actions without asking for permission. This is usually not a good idea except for games that you have created yourself, and even then it is not advisable.
    • Safe mode is the default. File access is allowed within the same directory as the world's .dmb file, and any directories underneath that one. Most actions such as running a system command require your approval.
    • Ultrasafe mode means that nothing that could affect your system in any way will be allowed without your permission. For games that use save files, this is usually not desirable.
  5. Visibility: (Invisible is recommended)
    • Public mode is the default. The game will be seen by everyone on the hub.
    • Private mode means your friends on the pager will see your game. However if they are logged in, it will also be visible on their pager.
    • Invisible mode prevents the game from appearing on the hub or pager.
  6. Press the green GO button in the bottom-right. This step may take up to 10 minutes to complete as the world loads. If your Dream Daemon stops responding, simply wait longer.

Logging In

  1. In the BYOND client's menu, select Bookmarks > Add...
  2. URL: 127.0.0.1:12345
    • ...where 12345 is the port you chose in the section above. You may also use the External IP address and port (shown as xxx.x.x.xxx:xxxxx) at the bottom of the Dream Daemon window after pressing "GO".
  3. Name: Test Server (or whatever you want to call it)
  4. Click OK
  5. Find your new Test Server bookmark in the Bookmarks menu and select it to start playing.

Updating

  1. Download a new .ZIP from the Baystation 12 Github site (as explained in the first section above).
  2. Backup your /config and /data folders. These store your server configuration, player preferences and ban list.
  3. Extract the new files (preferably into a clean directory, but replacing existing files should work fine).
  4. Copy your /config and /data folders back into the new install, overwriting when prompted except if we've specified otherwise
  5. Re-compile the game.

MySQL Setup

The SQL backend for the library and stats tracking requires a MySQL server. Your server details go in /config/dbconfig.txt, and the SQL schema is in /SQL/tgstation_schema.sql. More detailed setup instructions are coming soon, for now ask in our IRC channel.

Luna

Luna

1. Скачиваем сборку - https://github.com/SS13/luna/tree/e13cf12d2e591d01db76c5cf6fa28412376d11d2
2. Распаковываем в любую подходящую папку.
3. Качаем набор с сайта http://www.denwer.ru/
4. Распаковываем архив, устанавливаем и запускаем denwer. Для denwer сойдут стандартные настройки установки.
5. Открываем в браузере http://localhost/Tools/phpMyAdmin/
5.1 (Пропустить если открылось нормально) Гуглим освобождение 80 порта в винде 7. Обычно нужно прибить службу W3SVC в диспетчере задач.
Перезапускаем denwer. Откроется phpMyAdmin - переходим к пункту 4 .
6. Базы данных - создать базу данных luna .
7. Нажимаем на luna в списке, переходим на вкладку SQL.
8. Копипастим туда содержимое database.sql и удаляем первую строчку. Жмем ОК.
9. Вкладка Структура, таблица admins, действие Вставить.
10. В поле ckey бьендник главного админа прописными буквами, в rank число 6. Жмем ОК.
11. В папке config в файле db_config.txt прописываем такие значения:

DB_SERVER 127.0.0.1
DB_USER root
DB_PASSWORD
DB_DBNAME luna
DB_PORT 3306

12. Компилим Луну и, помолясь, запускаем ее. ОНА НЕ УПАЛА! ОНА ЖИВАЯ! ЖИВАЯ! АХАХАХА!