@@ -4,117 +4,138 @@ The Ren'Py Visual Novel Engine
4
4
5
5
http://www.renpy.org
6
6
7
- * Currently these instructions are Ubuntu/Debian specific, and these instructions will work, without
8
- modification only on this platform until further notice and changes in the near future. *
7
+ Ren'Py development takes place on the `` master `` branch, and occasionally
8
+ on feature branches.
9
9
10
- Branches
11
- ========
10
+ Getting Started
11
+ ===============
12
12
13
- Ren'Py development takes place on two branches, ``master `` and
14
- ``devel ``, as well as the occasional feature branch.
13
+ Ren'Py depends on a number of python modules written in Cython and C. For
14
+ changes to Ren'Py that only involve python modules, you can use the modules
15
+ found in the latest nightly build. Otherwise, you'll have to compile the
16
+ modules yourself.
15
17
16
- Master
17
- ------
18
-
19
- The master branch contains code that can be run using the precompiled libraries in
20
- the latest (release or pre-release) version of Ren'Py. It is mainly used for
21
- bugfixes and features that do not require C or Cython code to implement.
22
-
23
- To start please check out from devel into the `master ` branch::
18
+ The development scripts assume a POSIX-like platform. The scripts should run
19
+ on Linux or Mac OS X, and can be made to run on Windows using an environment
20
+ like Msys.
24
21
25
- git checkout master
22
+ Nightly Build
23
+ -------------
26
24
27
- After checking out master, run: :
25
+ Nightly builds can be downloaded from :
28
26
29
- ./after_checkout.sh <path-to-built-renpysdk>
27
+ http://nightly.renpy.org
30
28
31
- to link in the libraries from the most recent Ren'Py.
29
+ Note that the latest nightly build is at the bottom of the list. Once you've
30
+ unpacked the nightly, change into this repository, and run::
32
31
33
- Ren'Py can then be run by running renpy.exe, renpy.sh, or renpy.app as
34
- appropriate.
32
+ ./after_checkout.sh <path-to-nightly>
35
33
36
- *NB * After completion of these steps, there will be an error in the symlink
37
- of the folder `doc `, making this inaccessible. This is because the documentation
38
- has not been built using the documentation generator `sphinx `.
34
+ Once this script completes, you should be able to run Ren'Py using renpy.sh,
35
+ renpy.app, or renpy.exe, as appropriate for your platform.
39
36
40
- To build this please install the sphinx documentation generator using the python
41
- package installation tool `pip `, install sphinx::
37
+ If the current nightly build doesn't work, please wait 24 hours for a new
38
+ build to occur. If that build still doesn't work, contact Tom (`pytom at bishoujo.us `,
39
+ or @renpytom on twitter) to find out what's wrong.
42
40
43
- pip install sphinx
41
+ The ``doc `` symlink will dangle until documentation is built, as described
42
+ below.
44
43
45
- Change directory into renpy/sphinx and run this command to build the documentation::
44
+ Compiling the Modules
45
+ ----------------------
46
46
47
- ./build.sh
48
-
49
- This will be helpful to those who wish to change documentation files, and want to
50
- see the end result by running this build script.
51
-
52
- Devel
53
- -----
47
+ Building the modules requires you have the many dependencies installed on
48
+ your system. On Ubuntu, these dependencies can be installed with the
49
+ command::
54
50
55
- The devel branch contains code that requires a recompile of modules
56
- implemented in C or Cython. Building devel requires you to have the
57
- prerequisite libraries installed in addition to cython and other tools
58
- such as sphinx mentioned above to get a complete package. The installation
59
- of some of the libraries requires permission to install them globally
60
- however if one does not wish to do so, this can be overcome by installing
61
- the libraries into a python `virtualenv ` (more information to this below under "Without Global Permissions")
51
+ apt-get install python-dev python-pygame libavcodec-dev libavformat-dev \
52
+ libfreetype6-dev libglew1.6-dev libsdl1.2-dev libsdl-image1.2-dev \
53
+ libfribidi-dev libswscale-dev libesd0-dev libpulse-dev
62
54
63
- ** With Global Permissions **
64
- The required software can be installed using ` pip `::
55
+ Other platforms may have an equivalent command. Otherwise, you'll need to
56
+ build ` renpy-deps < https://github.com/renpy/renpy-deps >`_.
65
57
66
- pip install sphinx cython
67
-
68
- Or ` apt ` and ` easy_install `::
58
+ We strongly suggest installing the Ren'Py modules into a Python
59
+ virtualenv. ` This page < http://dabapps.com/blog/introduction-to-pip-and-virtualenv-python/ >`_
60
+ describes how to install pip and the virtualenv tool, and set up a new virtualenv.
69
61
70
- apt-get install cython && easy_install -U sphinx
62
+ After activating the virtualenv, install cython::
71
63
72
- Then install the necessary libraries::
64
+ pip install -U cython
73
65
74
- apt-get install python-dev python-pygame libavcodec-dev libavformat-dev \
75
- libfreetype6-dev libglew1.6-dev libsdl1.2-dev libsdl-image1.2-dev \
76
- libfribidi-dev libswscale-dev libesd0-dev libpulse-dev
77
-
78
- RENPY_DEPS_INSTALLED to a \: :-separated list of paths containing dependencies::
66
+ Next, set RENPY_DEPS_INSTALL To a \: :-separated list of paths containing the
67
+ dependencies, and RENPY_CYTHON to the name of the cython command::
79
68
80
69
export RENPY_DEPS_INSTALL=/usr::/usr/lib/x86_64-linux-gnu/
81
70
export RENPY_CYTHON=cython
82
-
83
- Finally, change into the modules directory, and run::
71
+
72
+ Finally, change into the ` modules ` directory, and run::
84
73
85
74
python setup.py install
86
75
87
- Ren'Py can then be run by using python to run renpy.py
76
+ Ren'Py will be installed into the activated virtualenv. It can then be run
77
+ using the command::
78
+
79
+ python -O renpy.py
80
+
81
+
82
+ Documentation
83
+ =============
84
+
85
+ Building
86
+ --------
87
+
88
+ Building the documentation requires Ren'Py to work. You'll either need to
89
+ link in a nightly build, or compile the modules as described above. You'll
90
+ also need the `Sphinx <http://sphinx-doc.org/ >`_ documentation generator.
91
+ If you have pip working, install Sphinx using::
92
+
93
+ pip install -U sphinx
94
+
95
+ Once Sphinx is installed, change into the ``sphinx `` directory inside the
96
+ Ren'Py checkout and run::
97
+
98
+ ./build.sh
99
+
100
+ Format
101
+ ------
102
+
103
+ Ren'Py's documentation consists of reStructuredText files found in sphinx/source, and
104
+ generated documentation found in function docstrings scattered throughout the code. Do
105
+ not edit the files in sphinx/source/inc directly, as they will be overwritten.
88
106
89
- ** Without Global Permissions **
107
+ Docstrings may include tags on the first few lines:
90
108
91
- If one does not have global permissions (or does not wish to use them) one can use python
92
- `virtualenv `. `virtualenv ` is essentially a smaller installation of python made in the $HOME
93
- directory to which one can add modules without su rights.
109
+ \: doc: `section ` `kind `
110
+ Indicates that this functions should be documented. `section ` gives
111
+ the name of the include file the function will be documented in, while
112
+ `kind ` indicates the kind of object to be documented (one of ``function ``,
113
+ ``method `` or ``class ``. If omitted, `kind ` will be auto-detected.
114
+ \: name: `name `
115
+ The name of the function to be documented. Function names are usually
116
+ detected, so this is only necessary when a function has multiple aliases.
117
+ \: args: `args `
118
+ This overrides the detected argument list. It can be used if some arguments
119
+ to the function are deprecated.
94
120
95
- The easiest way to do this is to install `virtualenvwrapper ` which includes more features
96
- than the stock `virtualenv ` using pip::
121
+ For example::
97
122
98
- pip install virtualenvwrapper
99
-
100
- Once this is done, please restart the shell so that ` virtualenv ` is available for use. Then
101
- one can make wrappers for managing the virtual environments and work on Ren'Py after
102
- installing the required libraries and modules::
123
+ def warp_speed(factor, transwarp=False):
124
+ """
125
+ :doc: warp
126
+ :name: renpy.warp_speed
127
+ :args: (factor)
103
128
104
- mkvirtualenv renpy
105
- workon renpy
106
-
107
- Now one can install software into this virtual environment using `pip ` as in the section *With Global Permission *.
108
- More information on how to use this tool can be found here: (http://virtualenvwrapper.readthedocs.org/en/latest/)
129
+ Exceeds the speed of light.
130
+ """
109
131
110
- Finally one can run renpy using::
132
+ renpy.engine.warp_drive.engage(factor)
111
133
112
- python renpy.py
113
134
114
135
Contributing
115
136
============
116
137
117
138
For bug fixes, documentation improvements, and simple changes, just
118
139
make a pull request. For more complex changes, it might make sense
119
- to file an issue so we can discuss the design.
140
+ to file an issue first so we can discuss the design.
120
141
0 commit comments