diff --git a/extras/win32-portable/README.txt.in b/extras/win32-portable/README.txt.in new file mode 100644 index 000000000..e08e4cf53 --- /dev/null +++ b/extras/win32-portable/README.txt.in @@ -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. diff --git a/extras/win32-portable/prepare_portable.py b/extras/win32-portable/prepare_portable.py index 8459b92fa..151c04326 100644 --- a/extras/win32-portable/prepare_portable.py +++ b/extras/win32-portable/prepare_portable.py @@ -12,6 +12,7 @@ import distutils.ccompiler import distutils.sysconfig from contextlib import nested +from string import Template import pkg_resources @@ -245,6 +246,22 @@ def copy_msvcr(odir): dest = os.path.join(msvcr_dest_dir, "{0}.manifest".format(MSVCR_NAME)) 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(): prefix = os.path.dirname(sys.executable) libdir = os.path.join(prefix, "Lib") @@ -283,6 +300,9 @@ def main(): fp = os.path.join("dist", "openslides-{0}-portable.zip".format( 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: for dp, dnames, fnames in os.walk(odir): for fn in fnames: