Add first draft of a README for the portable version

This commit is contained in:
Andy Kittner 2012-04-23 21:36:30 +02:00
parent b01493659c
commit 4048283a1f
2 changed files with 84 additions and 0 deletions

View File

@ -0,0 +1,64 @@
**XXX** Maybe add an introduction section (what is openslides, link to homepage, etc.)?
**XXX** Add a note that openslides should only be run on trusted networks
Getting started
===============
Simply running openslides.exe will start openslides using djangos
development server. It will also try to open openslides in your
default webbrowser.
The server will listen on the IP address of your current hostname on
port 80 (if port 80 is not available port 8000 will be used).
This means that the server will be available to everyone on your
local network (at least for commonly used network configurations).
See `Command line options` below if you need to change this.
The login for the default admin user after (created on first start),
is as follows:
Username: admin
Password: admin
Command line options
====================
The following command line options are available:
-a, --address=ADDRESS
Changes the address on which the server will listen for connections
-p, --port
Changes the port on which the server will listen for connections
--syncdb
Create/ update the database
--reset-admin
This will reset the password of the user
Example 1: Openslides should only be accessible on this computer:
openslides.exe -a 127.0.0.1
Example 2: Like above, but also specify the port as 8080
openslides.exe -a 127.0.0.01 -p 8080
Supported operating systems and browsers
========================================
Windows XP or newer (32 and 64bit)
**TODO** browsers
Included Packages
=================
${PACKAGE_LIST}
License
=======
openslides is distributed under the GNU General Public License
version 2. For details about this license and the licenses of the
bundled packages, please refer to the corresponding file in the
licenses/ directory.

View File

@ -12,6 +12,7 @@ import distutils.ccompiler
import distutils.sysconfig import distutils.sysconfig
from contextlib import nested from contextlib import nested
from string import Template
import pkg_resources import pkg_resources
@ -245,6 +246,22 @@ def copy_msvcr(odir):
dest = os.path.join(msvcr_dest_dir, "{0}.manifest".format(MSVCR_NAME)) dest = os.path.join(msvcr_dest_dir, "{0}.manifest".format(MSVCR_NAME))
shutil.copyfile(src, dest) shutil.copyfile(src, dest)
def write_readme(template_file, outfile):
with open(template_file, "rU") as f:
tmpl = Template(f.read())
packages = ["openslides-{0}".format(openslides.get_version())]
for pkg in SITE_PACKAGES:
dist = pkg_resources.get_distribution(pkg)
packages.append("{0}-{1}".format(dist.project_name, dist.version))
tmpl_vars = {"PACKAGE_LIST": "\n".join(packages)}
with open(outfile, "w") as f:
f.write(tmpl.substitute(tmpl_vars))
def main(): def main():
prefix = os.path.dirname(sys.executable) prefix = os.path.dirname(sys.executable)
libdir = os.path.join(prefix, "Lib") libdir = os.path.join(prefix, "Lib")
@ -283,6 +300,9 @@ def main():
fp = os.path.join("dist", "openslides-{0}-portable.zip".format( fp = os.path.join("dist", "openslides-{0}-portable.zip".format(
openslides.get_version())) openslides.get_version()))
write_readme("extras/win32-portable/README.txt.in",
os.path.join(odir, "README.txt"))
with zipfile.ZipFile(fp, "w", zipfile.ZIP_DEFLATED) as zf: with zipfile.ZipFile(fp, "w", zipfile.ZIP_DEFLATED) as zf:
for dp, dnames, fnames in os.walk(odir): for dp, dnames, fnames in os.walk(odir):
for fn in fnames: for fn in fnames: