diff options
| author | Simon Lejeune <sle@openerp.com> | 2014-12-19 17:31:12 +0100 |
|---|---|---|
| committer | Simon Lejeune <sle@openerp.com> | 2014-12-19 17:31:35 +0100 |
| commit | 9ed6accd2e8fca404018b2f998d0c913453e101b (patch) | |
| tree | ae48a528ea6a258adaeed150d30ea989063f6225 /setup | |
| parent | 10984ad49a3755bc8f8e136f7264c65ad5e777ab (diff) | |
[REF] Packaging: Backport of v8 packaging
[REF] Packaging: backport of a7ab5a4109ec99d77f61a6d4c8bc7696149ea09c
[REF] Packaging: backport of a700a1139ee19d71bc4669ff74bc53c87b38dc7b
[REF] Packaging: backport of 9d0bd2807e2c2b949ece62fd6be04a1cf39c8e0d
[REF] Packaging: backport of b0722d3e5d6bebdf19dc29b8ba04651ae508839f
[REF] Packaging: backport of 24b2c93814dfa18fa1aa88bb0497a73b7b8b3e6e
[REF] Packaging: backport of e874cdafaa9675251cd7852b8e9b1662cee7d19a
[REF] Packaging: backport of 56b61da16387e642130477e604022207a77e3f74
[REF] Packaging: backport of be96dd85959528b86f7535b9b4cc0dc86981ca33
[REF] Packaging: backport of 50a4da99f051d125b8435477657ee2b115a8e0bd
[REF] Packaging: backport of 1c41f3699303da770797002025b7c8226fb562eb
[REF] Packaging: backport of cc11331733a5cb8aff6c7f0d4def1404e83b80e8
[FIX] Packaging: backport of 134716308266ff
[REF] Package: backport of 93845d683c0420118c162eb855abb690150b692d
[REF] Package: backport of 012bc01c113c8d008a0eb94219f1cb519519ff0d
[FIX] Package: partial apply of d9e72a3716488ce8
[REF] Package: backport of 67036feff4f3d2d86a9e9e3e19f85fc183f466c6
[REF] Package: backport of 73de0138dedfe0faaae857544746915315a0dbeb
[REF] Package: backport of 30d987ed30e64a498ef392a0aa83ca7f4d220a97
[REF] Package: backport of 29132669a16792a84960f03c5627f04e0ad8ff6a
[REF] Package: backport of 7db12dc47b1e89ba0a7315c567fafdc722f47b90
[REF] Package: backport of f668f9c6cdc4fcea1c647959feed42359eb78009
[REF] Package: backport of 2cf4051a1556d64a1ff321658c4c2e0a60a13132
[REF] Packaging: backport of 735924878f89041f3b74540848baef71790872a1
[REF] Packaging: backport of f2598ecdce169f8134ff1f5c84eb12e14a5d6f34
[REF] Package: backport of fd21912cfe76f90447059cdf2617bcd7631cc122
[REF] Package: backport of 9a8cdf49b08ce9e1b4238bf122ee2c4271d44f62
[REF] Package: backport of 2f4984b8381c6407a720b122733242e6cf3101da
[REF] Package: backport of 6e9edeeb46d4161bf7be02f570073c9c1edf45c7
[REF] Package: partial backport of d4624fa826a5e9542782f2c53c8ba2c766d093bc
[REF] Package: backport of 9f13722f7837a80e423ca6e7a7337d66f900e564
Diffstat (limited to 'setup')
| -rw-r--r-- | setup/package.dfcentos | 25 | ||||
| -rw-r--r-- | setup/package.dfdebian | 108 | ||||
| -rwxr-xr-x | setup/package.py | 502 | ||||
| -rw-r--r-- | setup/redhat/install.sh | 3 | ||||
| -rw-r--r-- | setup/redhat/postinstall.sh | 91 | ||||
| -rw-r--r-- | setup/win32/Makefile | 33 | ||||
| -rw-r--r-- | setup/win32/Makefile.python | 1 | ||||
| -rw-r--r-- | setup/win32/Makefile.version | 1 | ||||
| -rwxr-xr-x | setup/win32/setup.nsi | 476 | ||||
| -rw-r--r-- | setup/win32/static/doc/LICENSE | 669 | ||||
| -rw-r--r-- | setup/win32/static/doc/License.rtf | 672 | ||||
| -rw-r--r-- | setup/win32/static/pixmaps/openerp-header.bmp | bin | 0 -> 19038 bytes | |||
| -rw-r--r-- | setup/win32/static/pixmaps/openerp-icon.ico | bin | 0 -> 2238 bytes | |||
| -rw-r--r-- | setup/win32/static/pixmaps/openerp-intro.bmp | bin | 0 -> 206054 bytes | |||
| -rw-r--r-- | setup/win32/static/pixmaps/openerp-slogan.bmp | bin | 0 -> 142054 bytes | |||
| -rw-r--r-- | setup/win32/static/pixmaps/openerp.ico | bin | 0 -> 4286 bytes | |||
| -rw-r--r-- | setup/win32/win32_service.py | 53 | ||||
| -rw-r--r-- | setup/win32/win32_setup.py | 54 |
18 files changed, 2688 insertions, 0 deletions
diff --git a/setup/package.dfcentos b/setup/package.dfcentos new file mode 100644 index 00000000000..eb986347afb --- /dev/null +++ b/setup/package.dfcentos @@ -0,0 +1,25 @@ +# Please note that this Dockerfile is used for testing nightly builds and should +# not be used to deploy Odoo +FROM centos:centos6 +MAINTAINER Odoo S.A. <info@odoo.com> + +RUN rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm && \ + yum -y -d 0 -e 0 update -y && yum -y -d 0 -e 0 upgrade -y && \ + yum -y -d 0 -e 0 install \ + python-pip \ + gcc \ + python-devel \ + postgresql \ + postgresql-server \ + postgresql-libs \ + postgresql-contrib \ + postgresql-devel && \ + yum clean all && \ + pip install xlwt http://download.gna.org/pychart/PyChart-1.39.tar.gz + +# Manual start of postgres +RUN mkdir -p /var/lib/postgres/data +RUN chown -R postgres:postgres /var/lib/postgres/data +RUN chmod 0700 /var/lib/postgres/data +RUN su postgres -c "initdb -D /var/lib/postgres/data -E UTF-8" +RUN cp /usr/share/pgsql/postgresql.conf.sample /var/lib/postgres/data/postgresql.conf
\ No newline at end of file diff --git a/setup/package.dfdebian b/setup/package.dfdebian new file mode 100644 index 00000000000..4995a4150b8 --- /dev/null +++ b/setup/package.dfdebian @@ -0,0 +1,108 @@ +# Please note that this Dockerfile is used for testing nightly builds and should +# not be used to deploy Odoo +FROM debian:stable +MAINTAINER Odoo S.A. <info@odoo.com> + +# Change policy-rc.d so that services start automatically once installed +RUN echo "#!/bin/sh\nexit 0" > /usr/sbin/policy-rc.d + +RUN apt-get update && \ + apt-get install -y locales && \ + rm -rf /var/lib/apt/lists/* + +# Reconfigure locales such that postgresql uses UTF-8 encoding +RUN dpkg-reconfigure locales && \ + locale-gen C.UTF-8 && \ + /usr/sbin/update-locale LANG=C.UTF-8 +ENV LC_ALL C.UTF-8 + +RUN apt-get update -qq && \ + apt-get upgrade -qq -y && \ + apt-get install \ + postgresql \ + postgresql-server-dev-all \ + postgresql-client \ + adduser \ + libxml2-dev \ + libxslt1-dev \ + libldap2-dev \ + libsasl2-dev \ + libssl-dev \ + libjpeg-dev \ + python-dev \ + python-pip \ + build-essential \ + python \ + python-dateutil \ + python-decorator \ + python-docutils \ + python-feedparser \ + python-imaging \ + python-jinja2 \ + python-ldap \ + python-libxslt1 \ + python-lxml \ + python-mako \ + python-mock \ + python-openid \ + python-passlib \ + python-psutil \ + python-psycopg2 \ + python-pybabel \ + python-pychart \ + python-pydot \ + python-pyparsing \ + python-pypdf \ + python-reportlab \ + python-requests \ + python-simplejson \ + python-tz \ + python-unittest2 \ + python-vatnumber \ + python-vobject \ + python-werkzeug \ + python-xlwt \ + python-yaml -y && \ + rm -rf /var/lib/apt/lists/* + +RUN pip install Babel==1.3 \ + Jinja2==2.7.3 \ + Mako==1.0.0 \ + MarkupSafe==0.23 \ + Pillow==2.5.1 \ + http://download.gna.org/pychart/PyChart-1.39.tar.gz \ + PyYAML==3.11 \ + Werkzeug==0.9.6 \ + argparse==1.2.1 \ + decorator==3.4.0 \ + docutils==0.12 \ + feedparser==5.1.3 \ + gdata==2.0.18 \ + gevent==1.0.1 \ + greenlet==0.4.2 \ + jcconv==0.2.3 \ + lxml==3.3.5 \ + mock==1.0.1 \ + passlib==1.6.2 \ + psutil==2.1.1 \ + psycogreen==1.0 \ + psycopg2==2.5.3 \ + pyPdf==1.13 \ + pydot==1.0.2 \ + pyparsing==1.5.7 \ + pyserial==2.7 \ + python-dateutil==1.5 \ + python-ldap==2.4.15 \ + python-openid==2.2.5 \ + pytz==2014.4 \ + pyusb==1.0.0b1 \ + qrcode==5.0.1 \ + reportlab==3.1.8 \ + requests==2.3.0 \ + simplejson==3.5.3 \ + six==1.7.3 \ + unittest2==0.5.1 \ + vatnumber==1.2 \ + vobject==0.6.6 \ + wsgiref==0.1.2 \ + xlwt==0.7.5 diff --git a/setup/package.py b/setup/package.py new file mode 100755 index 00000000000..d3d2465beef --- /dev/null +++ b/setup/package.py @@ -0,0 +1,502 @@ +#!/usr/bin/env python2 +# -*- coding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# Copyright (C) 2004-Today OpenERP SA (<http://www.openerp.com>). +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. +# +############################################################################## + +import optparse +import os +import pexpect +import shutil +import signal +import subprocess +import tempfile +import time +import xmlrpclib +from contextlib import contextmanager +from glob import glob +from os.path import abspath, dirname, join +from sys import stdout +from tempfile import NamedTemporaryFile + + +#---------------------------------------------------------- +# Utils +#---------------------------------------------------------- +execfile(join(dirname(__file__), '..', 'openerp', 'release.py')) +version = version.split('-')[0] +GPGPASSPHRASE = os.getenv('GPGPASSPHRASE') +GPGID = os.getenv('GPGID') +timestamp = time.strftime("%Y%m%d", time.gmtime()) +PUBLISH_DIRS = { + 'debian': 'deb', + 'redhat': 'rpm', + 'tarball': 'src', + 'windows': 'exe', +} +EXTENSIONS = [ + '.tar.gz', + '.zip', + '.deb', + '.dsc', + '.changes', + '.noarch.rpm', + '.exe', +] + +def mkdir(d): + if not os.path.isdir(d): + os.makedirs(d) + +def system(l, chdir=None): + print l + if chdir: + cwd = os.getcwd() + os.chdir(chdir) + if isinstance(l, list): + rc = os.spawnvp(os.P_WAIT, l[0], l) + elif isinstance(l, str): + tmp = ['sh', '-c', l] + rc = os.spawnvp(os.P_WAIT, tmp[0], tmp) + if chdir: + os.chdir(cwd) + return rc + +def _rpc_count_modules(addr='http://127.0.0.1', port=8069, dbname='mycompany'): + time.sleep(5) + modules = xmlrpclib.ServerProxy('%s:%s/xmlrpc/object' % (addr, port)).execute( + dbname, 1, 'admin', 'ir.module.module', 'search', [('state', '=', 'installed')] + ) + if modules and len(modules) > 1: + time.sleep(1) + toinstallmodules = xmlrpclib.ServerProxy('%s:%s/xmlrpc/object' % (addr, port)).execute( + dbname, 1, 'admin', 'ir.module.module', 'search', [('state', '=', 'to install')] + ) + if toinstallmodules: + print("Package test: FAILED. Not able to install dependencies of base.") + raise Exception("Installation of package failed") + else: + print("Package test: successfuly installed %s modules" % len(modules)) + else: + print("Package test: FAILED. Not able to install base.") + raise Exception("Installation of package failed") + +def publish(o, type, releases): + def _publish(o, release): + arch = '' + filename = release.split(os.path.sep)[-1] + + extension = None + for EXTENSION in EXTENSIONS: + if filename.endswith(EXTENSION): + extension = EXTENSION + filename = filename.replace(extension, '') + break + if extension is None: + raise Exception("Extension of %s is not handled" % filename) + + # keep _all or _amd64 + if filename.count('_') > 1: + arch = '_' + filename.split('_')[-1] + + release_dir = PUBLISH_DIRS[type] + release_filename = 'openerp_%s.%s%s%s' % (version, timestamp, arch, extension) + release_path = join(o.pub, release_dir, release_filename) + + system('mkdir -p %s' % join(o.pub, release_dir)) + shutil.move(join(o.build_dir, release), release_path) + + # Latest/symlink handler + release_abspath = abspath(release_path) + latest_abspath = release_abspath.replace(timestamp, 'latest') + + if os.path.islink(latest_abspath): + os.unlink(latest_abspath) + + os.symlink(release_abspath, latest_abspath) + + return release_path + + published = [] + if isinstance(releases, basestring): + published.append(_publish(o, releases)) + elif isinstance(releases, list): + for release in releases: + published.append(_publish(o, release)) + return published + +class OdooDocker(object): + def __init__(self): + self.log_file = NamedTemporaryFile(mode='w+b', prefix="bash", suffix=".txt", delete=False) + self.port = 8069 # TODO sle: reliable way to get a free port? + self.prompt_re = '(\r\nroot@|bash-).*# ' + self.timeout = 1000 + + def system(self, command): + self.docker.sendline(command) + self.docker.expect(self.prompt_re) + + def start(self, docker_image, build_dir, pub_dir): + self.build_dir = build_dir + self.pub_dir = pub_dir + + self.docker = pexpect.spawn( + 'docker run -v %s:/opt/release -p 127.0.0.1:%s:8069' + ' -t -i %s /bin/bash --noediting' % (self.build_dir, self.port, docker_image), + timeout=self.timeout + ) + time.sleep(2) # let the bash start + self.docker.logfile_read = self.log_file + self.id = subprocess.Popen('docker ps -l -q', shell=True, stdout=subprocess.PIPE).communicate()[0] + + def end(self): + try: + _rpc_count_modules(port=str(self.port)) + except Exception, e: + print('Exception during docker execution: %s:' % str(e)) + print('Error during docker execution: printing the bash output:') + with open(self.log_file.name) as f: + print '\n'.join(f.readlines()) + raise + finally: + self.docker.close() + system('docker rm -f %s' % self.id) + self.log_file.close() + os.remove(self.log_file.name) + +@contextmanager +def docker(docker_image, build_dir, pub_dir): + _docker = OdooDocker() + try: + _docker.start(docker_image, build_dir, pub_dir) + try: + yield _docker + except Exception, e: + raise + finally: + _docker.end() + +class KVM(object): + def __init__(self, o, image, ssh_key='', login='openerp'): + self.o = o + self.image = image + self.ssh_key = ssh_key + self.login = login + + def timeout(self,signum,frame): + print "vm timeout kill",self.pid + os.kill(self.pid,15) + + def start(self): + l="kvm -net nic,model=rtl8139 -net user,hostfwd=tcp:127.0.0.1:10022-:22,hostfwd=tcp:127.0.0.1:18069-:8069,hostfwd=tcp:127.0.0.1:15432-:5432 -drive".split(" ") + #l.append('file=%s,if=virtio,index=0,boot=on,snapshot=on'%self.image) + l.append('file=%s,snapshot=on'%self.image) + #l.extend(['-vnc','127.0.0.1:1']) + l.append('-nographic') + print " ".join(l) + self.pid=os.spawnvp(os.P_NOWAIT, l[0], l) + time.sleep(10) + signal.alarm(2400) + signal.signal(signal.SIGALRM, self.timeout) + try: + self.run() + finally: + signal.signal(signal.SIGALRM, signal.SIG_DFL) + os.kill(self.pid,15) + time.sleep(10) + + def ssh(self,cmd): + l=['ssh','-o','UserKnownHostsFile=/dev/null','-o','StrictHostKeyChecking=no','-p','10022','-i',self.ssh_key,'%s@127.0.0.1'%self.login,cmd] + system(l) + + def rsync(self,args,options='--delete --exclude .bzrignore'): + cmd ='rsync -rt -e "ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 10022 -i %s" %s %s' % (self.ssh_key, options, args) + system(cmd) + + def run(self): + pass + +class KVMWinBuildExe(KVM): + def run(self): + with open(join(self.o.build_dir, 'setup/win32/Makefile.version'), 'w') as f: + f.write("VERSION=%s\n" % self.o.version_full) + with open(join(self.o.build_dir, 'setup/win32/Makefile.python'), 'w') as f: + f.write("PYTHON_VERSION=%s\n" % self.o.vm_winxp_python_version.replace('.', '')) + + self.ssh("mkdir -p build") + self.rsync('%s/ %s@127.0.0.1:build/server/' % (self.o.build_dir, self.login)) + self.ssh("cd build/server/setup/win32;time make allinone;") + self.rsync('%s@127.0.0.1:build/server/setup/win32/release/ %s/' % (self.login, self.o.build_dir), '') + print "KVMWinBuildExe.run(): done" + +class KVMWinTestExe(KVM): + def run(self): + # Cannot use o.version_full when the version is not correctly parsed + # (for instance, containing *rc* or *dev*) + setuppath = glob("%s/openerp-server-setup-*.exe" % self.o.build_dir)[0] + setupfile = setuppath.split('/')[-1] + setupversion = setupfile.split('openerp-server-setup-')[1].split('.exe')[0] + + self.rsync('"%s" %s@127.0.0.1:' % (setuppath, self.login)) + self.ssh("TEMP=/tmp ./%s /S" % setupfile) + self.ssh('PGPASSWORD=openpgpwd /cygdrive/c/"Program Files"/"OpenERP %s"/PostgreSQL/bin/createdb.exe -e -U openpg mycompany' % setupversion) + self.ssh('/cygdrive/c/"Program Files"/"OpenERP %s"/server/openerp-server.exe -d mycompany -i base --stop-after-init' % setupversion) + self.ssh(['/cygdrive/c/"Program Files"/"OpenERP %s"/server/openerp-server.exe -d mycompany &' % setupversion, '&']) + _rpc_count_modules(port=18069) + +#---------------------------------------------------------- +# Stage: building +#---------------------------------------------------------- +def _prepare_build_dir(o): + cmd = ['rsync', '-a', '--exclude', '.git', '--exclude', '*.pyc', '--exclude', '*.pyo'] + system(cmd + ['%s/' % o.odoo_dir, o.build_dir]) + for i in glob(join(o.build_dir, 'addons/*')): + shutil.move(i, join(o.build_dir, 'openerp/addons')) + +def build_tgz(o): + system(['python', 'setup.py', 'sdist', '--quiet', '--formats=gztar,zip'], o.build_dir) + system(['cp', glob('%s/dist/openerp-*.tar.gz' % o.build_dir)[0], '%s/openerp.tar.gz' % o.build_dir]) + system(['cp', glob('%s/dist/openerp-*.zip' % o.build_dir)[0], '%s/openerp.zip' % o.build_dir]) + +def build_deb(o): + deb = pexpect.spawn('dpkg-buildpackage -rfakeroot -k%s' % GPGID, cwd=o.build_dir) + deb.logfile = stdout + deb.expect_exact('Enter passphrase: ', timeout=1200) + deb.send(GPGPASSPHRASE + '\r\n') + deb.expect_exact('Enter passphrase: ') + deb.send(GPGPASSPHRASE + '\r\n') + deb.expect(pexpect.EOF) + system(['mv', glob('%s/../openerp_*.deb' % o.build_dir)[0], '%s' % o.build_dir]) + system(['mv', glob('%s/../openerp_*.dsc' % o.build_dir)[0], '%s' % o.build_dir]) + system(['mv', glob('%s/../openerp_*_amd64.changes' % o.build_dir)[0], '%s' % o.build_dir]) + system(['mv', glob('%s/../openerp_*.tar.gz' % o.build_dir)[0], '%s' % o.build_dir]) + +def build_rpm(o): + # echo "%_unpackaged_files_terminate_build 0" >> /etc/rpm/macros + system(['python2.6', 'setup.py', 'bdist_rpm'], o.build_dir) + system(['cp', glob('%s/dist/openerp-*.noarch.rpm' % o.build_dir)[0], '%s/openerp.noarch.rpm' % o.build_dir]) + +def build_exe(o): + KVMWinBuildExe(o, o.vm_winxp_image, o.vm_winxp_ssh_key, o.vm_winxp_login).start() + system(['cp', glob('%s/openerp*.exe' % o.build_dir)[0], '%s/openerp.exe' % o.build_dir]) + +#---------------------------------------------------------- +# Stage: testing +#---------------------------------------------------------- +def _prepare_testing(o): + if not o.no_tarball or not o.no_debian: + subprocess.call(["mkdir", "docker_debian"], cwd=o.build_dir) + subprocess.call(["cp", "package.dfdebian", os.path.join(o.build_dir, "docker_debian", "Dockerfile")], + cwd=os.path.join(o.odoo_dir, "setup")) + subprocess.call(["docker", "build", "-t", "openerp-debian-nightly-tests", "."], + cwd=os.path.join(o.build_dir, "docker_debian")) + if not o.no_rpm: + subprocess.call(["mkdir", "docker_centos"], cwd=o.build_dir) + subprocess.call(["cp", "package.dfcentos", os.path.join(o.build_dir, "docker_centos", "Dockerfile")], + cwd=os.path.join(o.odoo_dir, "setup")) + subprocess.call(["docker", "build", "-t", "openerp-centos-nightly-tests", "."], + cwd=os.path.join(o.build_dir, "docker_centos")) + +def test_tgz(o): + with docker('openerp-debian-nightly-tests', o.build_dir, o.pub) as wheezy: + wheezy.release = 'openerp.tar.gz' + wheezy.system("service postgresql start") + wheezy.system('/usr/local/bin/pip install /opt/release/%s' % wheezy.release) + wheezy.system("useradd --system --no-create-home openerp") + wheezy.system('su postgres -s /bin/bash -c "createuser -s openerp"') + wheezy.system('su postgres -s /bin/bash -c "createdb mycompany"') + wheezy.system('mkdir /var/lib/openerp') + wheezy.system('chown openerp:openerp /var/lib/openerp') + wheezy.system('su openerp -s /bin/bash -c "openerp-server --addons-path=/usr/local/lib/python2.7/dist-packages/openerp/addons -d mycompany -i base --stop-after-init"') + wheezy.system('su openerp -s /bin/bash -c "openerp-server --addons-path=/usr/local/lib/python2.7/dist-packages/openerp/addons -d mycompany &"') + +def test_deb(o): + with docker('openerp-debian-nightly-tests', o.build_dir, o.pub) as wheezy: + wheezy.release = '*.deb' + wheezy.system("service postgresql start") + wheezy.system('su postgres -s /bin/bash -c "createdb mycompany"') + wheezy.system('dpkg -i /opt/release/%s' % wheezy.release) + wheezy.system('apt-get install -f -y') + wheezy.system('su openerp -s /bin/bash -c "openerp-server -c /etc/openerp/openerp-server.conf -d mycompany -i base --stop-after-init"') + wheezy.system('su openerp -s /bin/bash -c "openerp-server -c /etc/openerp/openerp-server.conf -d mycompany &"') + +def test_rpm(o): + with docker('openerp-centos-nightly-tests', o.build_dir, o.pub) as centos6: + centos6.release = 'openerp.noarch.rpm' + # Start postgresql + centos6.system('su postgres -c "/usr/bin/pg_ctl -D /var/lib/postgres/data start"') + centos6.system('sleep 5') + centos6.system('su postgres -c "createdb mycompany"') + # Odoo install + centos6.system('yum install -d 0 -e 0 /opt/release/%s -y' % centos6.release) + centos6.system('su openerp -s /bin/bash -c "openerp-server -c /etc/openerp/openerp-server.conf -d mycompany -i base --stop-after-init"') + centos6.system('su openerp -s /bin/bash -c "openerp-server -c /etc/openerp/openerp-server.conf -d mycompany &"') + +def test_exe(o): + KVMWinTestExe(o, o.vm_winxp_image, o.vm_winxp_ssh_key, o.vm_winxp_login).start() + +#--------------------------------------------------------- +# Generates Packages, Sources and Release files of debian package +#--------------------------------------------------------- +def gen_deb_package(o, published_files): + # Executes command to produce file_name in path, and moves it to o.pub/deb + def _gen_file(o, (command, file_name), path): + cur_tmp_file_path = os.path.join(path, file_name) + with open(cur_tmp_file_path, 'w') as out: + subprocess.call(command, stdout=out, cwd=path) + system(['cp', cur_tmp_file_path, os.path.join(o.pub, 'deb', file_name)]) + + # Copy files to a temp directory (required because the working directory must contain only the + # files of the last release) + temp_path = tempfile.mkdtemp(suffix='debPackages') + for pub_file_path in published_files: + system(['cp', pub_file_path, temp_path]) + + commands = [ + (['dpkg-scanpackages', '.'], "Packages"), # Generate Packages file + (['dpkg-scansources', '.'], "Sources"), # Generate Sources file + (['apt-ftparchive', 'release', '.'], "Release") # Generate Release file + ] + # Generate files + for command in commands: + _gen_file(o, command, temp_path) + # Remove temp directory + shutil.rmtree(temp_path) + + # Generate Release.gpg (= signed Release) + # Options -abs: -a (Create ASCII armored output), -b (Make a detach signature), -s (Make a signature) + subprocess.call(['gpg', '--default-key', GPGID, '--passphrase', GPGPASSPHRASE, '--yes', '-abs', '--no-tty', '-o', 'Release.gpg', 'Release'], cwd=os.path.join(o.pub, 'deb')) + +#--------------------------------------------------------- +# Generates an RPM repo +#--------------------------------------------------------- +def gen_rpm_repo(o, file_name): + # Sign the RPM + rpmsign = pexpect.spawn('/bin/bash', ['-c', 'rpm --resign %s' % file_name], cwd=os.path.join(o.pub, 'rpm')) + rpmsign.expect_exact('Enter pass phrase: ') + rpmsign.send(GPGPASSPHRASE + '\r\n') + rpmsign.expect(pexpect.EOF) + + # Removes the old repodata + subprocess.call(['rm', '-rf', os.path.join(o.pub, 'rpm', 'repodata')]) + + # Copy files to a temp directory (required because the working directory must contain only the + # files of the last release) + temp_path = tempfile.mkdtemp(suffix='rpmPackages') + subprocess.call(['cp', file_name, temp_path]) + + subprocess.call(['createrepo', temp_path]) # creates a repodata folder in temp_path + subprocess.call(['cp', '-r', os.path.join(temp_path, "repodata"), os.path.join(o.pub, 'rpm')]) + + # Remove temp directory + shutil.rmtree(temp_path) + +#---------------------------------------------------------- +# Options and Main +#---------------------------------------------------------- +def options(): + op = optparse.OptionParser() + root = os.path.dirname(os.path.dirname(os.path.realpath(__file__))) + build_dir = "%s-%s" % (root, timestamp) + + op.add_option("-b", "--build-dir", default=build_dir, help="build directory (%default)", metavar="DIR") + op.add_option("-p", "--pub", default=None, help="pub directory (%default)", metavar="DIR") + op.add_option("", "--no-testing", action="store_true", help="don't test the builded packages") + op.add_option("-v", "--version", default='7.0', help="version (%default)") + + op.add_option("", "--no-debian", action="store_true", help="don't build the debian package") + op.add_option("", "--no-rpm", action="store_true", help="don't build the rpm package") + op.add_option("", "--no-tarball", action="store_true", help="don't build the tarball") + op.add_option("", "--no-windows", action="store_true", help="don't build the windows package") + + # Windows VM() + op.add_option("", "--vm-winxp-image", default='/home/odoo/vm/winxp27/winxp27.vdi', help="%default") + op.add_option("", "--vm-winxp-ssh-key", default='/home/odoo/vm/winxp27/id_rsa', help="%default") + op.add_option("", "--vm-winxp-login", default='Naresh', help="Windows login (%default)") + op.add_option("", "--vm-winxp-python-version", default='2.7', help="Windows Python version installed in the VM (default: %default)") + + (o, args) = op.parse_args() + # derive other options + o.odoo_dir = root + o.pkg = join(o.build_dir, 'pkg') + o.version_full = '%s-%s' % (o.version, timestamp) + o.work = join(o.build_dir, 'openerp-%s' % o.version_full) + o.work_addons = join(o.work, 'openerp', 'addons') + + return o + +def main(): + o = options() + _prepare_build_dir(o) + if not o.no_testing: + _prepare_testing(o) + try: + if not o.no_tarball: + build_tgz(o) + try: + if not o.no_testing: + test_tgz(o) + published_files = publish(o, 'tarball', ['openerp.tar.gz', 'openerp.zip']) + except Exception, e: + print("Won't publish the tgz release.\n Exception: %s" % str(e)) + if not o.no_debian: + build_deb(o) + try: + if not o.no_testing: + test_deb(o) + + to_publish = [] + to_publish.append(glob("%s/openerp*.deb" % o.build_dir)[0]) + to_publish.append(glob("%s/openerp*.dsc" % o.build_dir)[0]) + to_publish.append(glob("%s/openerp*.changes" % o.build_dir)[0]) + to_publish.append(glob("%s/openerp*.tar.gz" % o.build_dir)[0]) + published_files = publish(o, 'debian', to_publish) + gen_deb_package(o, published_files) + except Exception, e: + print("Won't publish the deb release.\n Exception: %s" % str(e)) + if not o.no_rpm: + build_rpm(o) + try: + if not o.no_testing: + test_rpm(o) + published_files = publish(o, 'redhat', ['openerp.noarch.rpm']) + gen_rpm_repo(o, published_files[0]) + except Exception, e: + print("Won't publish the rpm release.\n Exception: %s" % str(e)) + if not o.no_windows: + build_exe(o) + try: + if not o.no_testing: + test_exe(o) + published_files = publish(o, 'windows', ['openerp.exe']) + except Exception, e: + print("Won't publish the exe release.\n Exception: %s" % str(e)) + except: + pass + finally: + shutil.rmtree(o.build_dir) + print('Build dir %s removed' % o.build_dir) + + if not o.no_testing: + system("docker rm -f `docker ps -a | awk '{print $1 }'` 2>>/dev/null") + print('Remaining dockers removed') + + +if __name__ == '__main__': + main() diff --git a/setup/redhat/install.sh b/setup/redhat/install.sh new file mode 100644 index 00000000000..434a3aa7fef --- /dev/null +++ b/setup/redhat/install.sh @@ -0,0 +1,3 @@ +#!/bin/sh +set -e +python2.6 setup.py install --prefix=/usr --root=$RPM_BUILD_ROOT --record=INSTALLED_FILES diff --git a/setup/redhat/postinstall.sh b/setup/redhat/postinstall.sh new file mode 100644 index 00000000000..d689677da10 --- /dev/null +++ b/setup/redhat/postinstall.sh @@ -0,0 +1,91 @@ +#!/bin/sh + +set -e + +ODOO_CONFIGURATION_FILE=/etc/openerp/openerp-server.conf +ODOO_CONFIGURATION_DIR=/etc/openerp +ODOO_DATA_DIR=/var/lib/openerp +ODOO_GROUP="openerp" +ODOO_LOG_DIR=/var/log/openerp +ODOO_USER="openerp" + +if ! getent passwd | grep -q "^openerp:"; then + groupadd $ODOO_GROUP + adduser --system --no-create-home $ODOO_USER -g $ODOO_GROUP +fi +# Register "openerp" as a postgres superuser +su - postgres -c "createuser -s openerp" 2> /dev/null || true +# Configuration file +mkdir -p $ODOO_CONFIGURATION_DIR +echo "[options] +; This is the password that allows database operations: +; admin_passwd = admin +db_host = False +db_port = False +db_user = openerp +db_password = False +addons_path = /usr/lib/python2.6/site-packages/openerp/addons +" > $ODOO_CONFIGURATION_FILE +chown $ODOO_USER:$ODOO_GROUP $ODOO_CONFIGURATION_FILE +chmod 0640 $ODOO_CONFIGURATION_FILE +# Log +mkdir -p $ODOO_LOG_DIR +chown $ODOO_USER:$ODOO_GROUP $ODOO_LOG_DIR +chmod 0750 $ODOO_LOG_DIR +# Data dir +mkdir -p $ODOO_DATA_DIR +chown $ODOO_USER:$ODOO_GROUP $ODOO_DATA_DIR + +echo '#!/bin/sh +### BEGIN INIT INFO +# Provides: openerp-server +# Required-Start: $remote_fs $syslog +# Required-Stop: $remote_fs $syslog +# Should-Start: $network +# Should-Stop: $network +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Enterprise Resource Management software +# Description: Open ERP is a complete ERP and CRM software. +### END INIT INFO +PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin +DAEMON=/usr/bin/openerp-server +NAME=openerp-server +DESC=openerp-server +CONFIG=/etc/openerp/openerp-server.conf +LOGFILE=/var/log/openerp/openerp-server.log +USER=openerp +test -x ${DAEMON} || exit 0 +set -e +do_start () { + echo -n "Starting ${DESC}: " + start-stop-daemon --start --quiet --pidfile /var/run/${NAME}.pid --chuid ${USER} --background --make-pidfile --exec ${DAEMON} -- --config=${CONFIG} --logfile=${LOGFILE} + echo "${NAME}." +} +do_stop () { + echo -n "Stopping ${DESC}: " + start-stop-daemon --stop --quiet --pidfile /var/run/${NAME}.pid --oknodo + echo "${NAME}." +} +case "${1}" in + start) + do_start + ;; + stop) + do_stop + ;; + restart|force-reload) + echo -n "Restarting ${DESC}: " + do_stop + sleep 1 + do_start + ;; + *) + N=/etc/init.d/${NAME} + echo "Usage: ${NAME} {start|stop|restart|force-reload}" >&2 + exit 1 + ;; +esac +exit 0 +' > /etc/init.d/openerp +chmod 700 /etc/init.d/openerp diff --git a/setup/win32/Makefile b/setup/win32/Makefile new file mode 100644 index 00000000000..ab8bc88831d --- /dev/null +++ b/setup/win32/Makefile @@ -0,0 +1,33 @@ +include Makefile.version +include Makefile.python + +SERVER_DIRECTORY=../.. +FILES_DIRECTORY=release + +LAUNCH_PY2EXE_SERVICE=/cygdrive/c/python${PYTHON_VERSION}/python.exe win32_setup.py py2exe +LAUNCH_PY2EXE=/cygdrive/c/python${PYTHON_VERSION}/python.exe setup.py py2exe + +MAKENSIS_ARGUMENTS=/DVERSION=$(VERSION) + +LAUNCH_MAKENSIS=/cygdrive/c/cygwin/makensis $(MAKENSIS_ARGUMENTS) setup.nsi + +default: allinone + +clean: server_clean + rm -rf $(FILES_DIRECTORY)/*.exe + rm -rf *.exe + +server_clean: + rm -rf $(SERVER_DIRECTORY)/dist + rm -rf $(SERVER_DIRECTORY)/build + rm -rf $(SERVER_DIRECTORY)/win32/dist + rm -rf $(SERVER_DIRECTORY)/win32/build + rm -rf $(SERVER_DIRECTORY)/*.exe + rm -rf $(SERVER_DIRECTORY)/.cyg* + +allinone: server_clean + (cd $(SERVER_DIRECTORY)/setup/win32 && $(LAUNCH_PY2EXE_SERVICE)) + (cd $(SERVER_DIRECTORY) && $(LAUNCH_PY2EXE)) + (cd $(SERVER_DIRECTORY)/setup/win32 && $(LAUNCH_MAKENSIS)) + (cd $(SERVER_DIRECTORY)/setup/win32 && mkdir -p $(FILES_DIRECTORY)) + (cd $(SERVER_DIRECTORY)/setup/win32 && cp openerp-*.exe $(FILES_DIRECTORY)/openerp-server-setup-$(VERSION).exe) diff --git a/setup/win32/Makefile.python b/setup/win32/Makefile.python new file mode 100644 index 00000000000..84e766c5c92 --- /dev/null +++ b/setup/win32/Makefile.python @@ -0,0 +1 @@ +PYTHON_VERSION=27 diff --git a/setup/win32/Makefile.version b/setup/win32/Makefile.version new file mode 100644 index 00000000000..e278258465f --- /dev/null +++ b/setup/win32/Makefile.version @@ -0,0 +1 @@ +VERSION= diff --git a/setup/win32/setup.nsi b/setup/win32/setup.nsi new file mode 100755 index 00000000000..dd94e0e6f2c --- /dev/null +++ b/setup/win32/setup.nsi @@ -0,0 +1,476 @@ +#####################################################################################
+#
+# Copyright (c) 2004-TODAY OpenERP S.A. (http://www.openerp.com) All Rights Reserved.
+#
+# WARNING: This program as such is intended to be used by professional
+# programmers who take the whole responsability of assessing all potential
+# consequences resulting from its eventual inadequacies and bugs
+# End users who are looking for a ready-to-use solution with commercial
+# garantees and support are strongly adviced to contract a Free Software
+# Service Company
+#
+# This program is Free Software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 3
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#####################################################################################
+
+# TODO: Avoid to uninstall the database
+# TODO: We can update the server or the clients without to uninstall the all-in-one
+# TODO: Add startmenu handling (link to localhost + uninstall)
+
+!include 'MUI2.nsh'
+!include 'FileFunc.nsh'
+!include 'LogicLib.nsh'
+!include 'Sections.nsh'
+!include 'LogicLib.nsh'
+
+!macro IfKeyExists ROOT MAIN_KEY KEY
+ # This macro comes from http://nsis.sourceforge.net/Check_for_a_Registry_Key
+ Push $R0
+ Push $R1
+ Push $R2
+
+ # XXX bug if ${ROOT}, ${MAIN_KEY} or ${KEY} use $R0 or $R1
+
+ StrCpy $R1 "0" # loop index
+ StrCpy $R2 "0" # not found
+
+ ${Do}
+ EnumRegKey $R0 ${ROOT} "${MAIN_KEY}" "$R1"
+ ${If} $R0 == "${KEY}"
+ StrCpy $R2 "1" # found
+ ${Break}
+ ${EndIf}
+ IntOp $R1 $R1 + 1
+ ${LoopWhile} $R0 != ""
+
+ ClearErrors
+
+ Exch 2
+ Pop $R0
+ Pop $R1
+ Exch $R2
+!macroend
+
+!define PUBLISHER 'OpenERP S.A.'
+
+!ifndef MAJOR_VERSION
+ !define MAJOR_VERSION '7'
+!endif
+
+!ifndef MINOR_VERSION
+ !define MINOR_VERSION '0'
+!endif
+
+!ifndef REVISION_VERSION
+ !define REVISION_VERSION '0'
+!endif
+
+!ifndef VERSION
+ !define VERSION "0"
+#!define VERSION "${MAJOR_VERSION}.${MINOR_VERSION}-r${REVISION_VERSION}"
+!endif
+
+!define PRODUCT_NAME "OpenERP"
+!define DISPLAY_NAME "${PRODUCT_NAME} ${MAJOR_VERSION}.${MINOR_VERSION}"
+
+!define REGISTRY_ROOT HKLM
+!define UNINSTALL_BASE_REGISTRY_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall"
+!define UNINSTALL_REGISTRY_KEY "${UNINSTALL_BASE_REGISTRY_KEY}\${DISPLAY_NAME}"
+
+!define UNINSTALL_REGISTRY_KEY_SERVER "${UNINSTALL_BASE_REGISTRY_KEY}\OpenERP Server ${VERSION}"
+
+!define REGISTRY_KEY "Software\${DISPLAY_NAME}"
+
+!define DEFAULT_POSTGRESQL_HOSTNAME 'localhost'
+!define DEFAULT_POSTGRESQL_PORT 5432
+!define DEFAULT_POSTGRESQL_USERNAME 'openpg'
+!define DEFAULT_POSTGRESQL_PASSWORD 'openpgpwd'
+
+Name '${DISPLAY_NAME}'
+Caption "${PRODUCT_NAME} ${VERSION} Setup"
+OutFile "openerp-allinone-setup-${VERSION}.exe"
+#SetCompressor /final /solid lzma
+#SetCompress auto
+ShowInstDetails show
+
+XPStyle on
+
+InstallDir "$PROGRAMFILES\OpenERP ${VERSION}"
+InstallDirRegKey HKCU "${REGISTRY_KEY}" ""
+
+BrandingText '${PRODUCT_NAME} ${VERSION}'
+
+RequestExecutionLevel admin
+
+#VIAddVersionKey "ProductName" "${PRODUCT_NAME}"
+#VIAddVersionKey "CompanyName" "${PUBLISHER}"
+#VIAddVersionKey "FileDescription" "Installer of ${DISPLAY_NAME}"
+#VIAddVersionKey "LegalCopyright" "${PUBLISHER}"
+#VIAddVersionKey "LegalTrademark" "OpenERP is a trademark of ${PUBLISHER}"
+#VIAddVersionKey "FileVersion" "${MAJOR_VERSION}.${MINOR_VERSION}.${REVISION_VERSION}"
+#VIProductVersion "${MAJOR_VERSION}.${MINOR_VERSION}.${REVISION_VERSION}"
+
+!insertmacro GetParameters
+!insertmacro GetOptions
+
+Var Option_AllInOne
+Var HasPostgreSQL
+Var cmdLineParams
+
+Var TextPostgreSQLHostname
+Var TextPostgreSQLPort
+Var TextPostgreSQLUsername
+Var TextPostgreSQLPassword
+
+Var HWNDPostgreSQLHostname
+Var HWNDPostgreSQLPort
+Var HWNDPostgreSQLUsername
+Var HWNDPostgreSQLPassword
+
+!define STATIC_PATH "static"
+!define PIXMAPS_PATH "${STATIC_PATH}\pixmaps"
+!define POSTGRESQL_EXE_FILENAME "postgresql-9.3.5-1-windows.exe"
+!define POSTGRESQL_EXE "${STATIC_PATH}\${POSTGRESQL_EXE_FILENAME}"
+
+!define MUI_ABORTWARNING
+!define MUI_ICON "${PIXMAPS_PATH}\openerp-icon.ico"
+
+!define MUI_WELCOMEFINISHPAGE_BITMAP "${PIXMAPS_PATH}\openerp-intro.bmp"
+!define MUI_UNWELCOMEFINISHPAGE_BITMAP "${PIXMAPS_PATH}\openerp-intro.bmp"
+!define MUI_HEADERIMAGE
+!define MUI_HEADERIMAGE_BITMAP "${PIXMAPS_PATH}\openerp-slogan.bmp"
+!define MUI_HEADERIMAGE_BITMAP_NOSTRETCH
+!define MUI_HEADER_TRANSPARENT_TEXT ""
+
+!insertmacro MUI_PAGE_WELCOME
+!insertmacro MUI_PAGE_LICENSE "${STATIC_PATH}\doc\LICENSE"
+!define MUI_COMPONENTSPAGE_SMALLDESC
+!define MUI_PAGE_CUSTOMFUNCTION_LEAVE ComponentLeave
+!insertmacro MUI_PAGE_COMPONENTS
+Page Custom ShowPostgreSQL LeavePostgreSQL
+!insertmacro MUI_PAGE_DIRECTORY
+!insertmacro MUI_PAGE_INSTFILES
+
+!define MUI_FINISHPAGE_NOAUTOCLOSE
+!define MUI_FINISHPAGE_RUN
+!define MUI_FINISHPAGE_RUN_CHECKED
+!define MUI_FINISHPAGE_RUN_TEXT "$(DESC_FinishPageText)"
+!define MUI_FINISHPAGE_RUN_FUNCTION "LaunchLink"
+!define MUI_FINISHPAGE_LINK $(DESC_FinishPage_Link)
+!define MUI_FINISHPAGE_LINK_LOCATION "http://www.openerp.com/contact"
+!insertmacro MUI_PAGE_FINISH
+
+!insertmacro MUI_UNPAGE_WELCOME
+!insertmacro MUI_UNPAGE_CONFIRM
+!insertmacro MUI_UNPAGE_INSTFILES
+!insertmacro MUI_UNPAGE_FINISH
+
+!insertmacro MUI_LANGUAGE "English"
+!insertmacro MUI_LANGUAGE "French"
+!insertmacro MUI_RESERVEFILE_LANGDLL
+
+; English
+LangString DESC_OpenERP_Server ${LANG_ENGLISH} "Install the OpenERP Server with all the OpenERP standard modules."
+LangString DESC_PostgreSQL ${LANG_ENGLISH} "Install the PostgreSQL RDBMS used by OpenERP."
+LangString DESC_FinishPage_Link ${LANG_ENGLISH} "Contact OpenERP for Partnership and/or Support"
+LangString DESC_AtLeastOneComponent ${LANG_ENGLISH} "You have to choose at least one component"
+LangString DESC_CanNotInstallPostgreSQL ${LANG_ENGLISH} "You can not install the PostgreSQL database without the OpenERP Server"
+LangString WARNING_HostNameIsEmpty ${LANG_ENGLISH} "The hostname for the connection to the PostgreSQL Server is empty"
+LangString WARNING_UserNameIsEmpty ${LANG_ENGLISH} "The username for the connection to the PostgreSQL Server is empty"
+LangString WARNING_PasswordIsEmpty ${LANG_ENGLISH} "The password for the connection to the PostgreSQL Server is empty"
+LangString WARNING_PortIsWrong ${LANG_ENGLISH} "The port for the connexion to the PostgreSQL Server is wrong (default: 5432)"
+LangString DESC_PostgreSQLPage ${LANG_ENGLISH} "Configure the information for the PostgreSQL connection"
+LangString DESC_PostgreSQL_Hostname ${LANG_ENGLISH} "Hostname"
+LangString DESC_PostgreSQL_Port ${LANG_ENGLISH} "Port"
+LangString DESC_PostgreSQL_Username ${LANG_ENGLISH} "Username"
+LangString DESC_PostgreSQL_Password ${LANG_ENGLISH} "Password"
+LangString Profile_AllInOne ${LANG_ENGLISH} "All In One"
+LangString Profile_Server ${LANG_ENGLISH} "Server only"
+LangString TITLE_OpenERP_Server ${LANG_ENGLISH} "OpenERP Server"
+LangString TITLE_PostgreSQL ${LANG_ENGLISH} "PostgreSQL Database"
+LangString DESC_FinishPageText ${LANG_ENGLISH} "Start OpenERP"
+
+; French
+LangString DESC_OpenERP_Server ${LANG_FRENCH} "Installation du Serveur OpenERP avec tous les modules OpenERP standards."
+LangString DESC_PostgreSQL ${LANG_FRENCH} "Installation de la base de donn?es PostgreSQL utilis?e par OpenERP."
+LangString DESC_FinishPage_Link ${LANG_FRENCH} "Contactez OpenERP pour un Partenariat et/ou du Support"
+LangString DESC_AtLeastOneComponent ${LANG_FRENCH} "Vous devez choisir au moins un composant"
+LangString DESC_CanNotInstallPostgreSQL ${LANG_FRENCH} "Vous ne pouvez pas installer la base de donn?es PostgreSQL sans le serveur OpenERP"
+LangString WARNING_HostNameIsEmpty ${LANG_FRENCH} "L'adresse pour la connection au serveur PostgreSQL est vide"
+LangString WARNING_UserNameIsEmpty ${LANG_FRENCH} "Le nom d'utilisateur pour la connection au serveur PostgreSQL est vide"
+LangString WARNING_PasswordIsEmpty ${LANG_FRENCH} "Le mot de passe pour la connection au serveur PostgreSQL est vide"
+LangString WARNING_PortIsWrong ${LANG_FRENCH} "Le port pour la connection au serveur PostgreSQL est erron? (d?faut: 5432)"
+LangString DESC_PostgreSQLPage ${LANG_FRENCH} "Configurez les informations de connection pour le serveur PostgreSQL"
+LangString DESC_PostgreSQL_Hostname ${LANG_FRENCH} "H?te"
+LangString DESC_PostgreSQL_Port ${LANG_FRENCH} "Port"
+LangString DESC_PostgreSQL_Username ${LANG_FRENCH} "Utilisateur"
+LangString DESC_PostgreSQL_Password ${LANG_FRENCH} "Mot de passe"
+LangString Profile_AllInOne ${LANG_FRENCH} "All In One"
+LangString Profile_Server ${LANG_FRENCH} "Seulement le serveur"
+LangString TITLE_OpenERP_Server ${LANG_FRENCH} "Serveur OpenERP"
+LangString TITLE_PostgreSQL ${LANG_FRENCH} "Installation du serveur de base de donn?es PostgreSQL"
+LangString DESC_FinishPageText ${LANG_FRENCH} "Démarrer OpenERP"
+
+InstType $(Profile_AllInOne)
+InstType $(Profile_Server)
+
+Section $(TITLE_OpenERP_Server) SectionOpenERP_Server
+ SectionIn 1 2
+
+ # TODO: install in a temp dir before
+
+ SetOutPath "$INSTDIR\server"
+ File /r "..\..\dist\*"
+
+ SetOutPath "$INSTDIR\service"
+ File /r "dist\*"
+ File "start.bat"
+ File "stop.bat"
+
+# If there is a previous install of the OpenERP Server, keep the login/password from the config file
+ WriteIniStr "$INSTDIR\server\openerp-server.conf" "options" "db_host" $TextPostgreSQLHostname
+ WriteIniStr "$INSTDIR\server\openerp-server.conf" "options" "db_user" $TextPostgreSQLUsername
+ WriteIniStr "$INSTDIR\server\openerp-server.conf" "options" "db_password" $TextPostgreSQLPassword
+ WriteIniStr "$INSTDIR\server\openerp-server.conf" "options" "db_port" $TextPostgreSQLPort
+ # Fix the addons path
+ WriteIniStr "$INSTDIR\server\openerp-server.conf" "options" "addons_path" "$INSTDIR\server\openerp\addons"
+
+ # if we're going to install postgresql force it's path,
+ # otherwise we consider it's always done and/or correctly tune by users
+ ${If} $HasPostgreSQL == 0
+ WriteIniStr "$INSTDIR\server\openerp-server.conf" "options" "pg_path" "$INSTDIR\PostgreSQL\bin"
+ ${EndIf}
+
+ nsExec::Exec '"$INSTDIR\server\openerp-server.exe" --stop-after-init --logfile "$INSTDIR\server\openerp-server.log" -s'
+ nsExec::Exec '"$INSTDIR\service\win32_service.exe" -auto -install'
+
+ # TODO: don't hardcode the service name
+ nsExec::Exec "net stop openerp-server-7.0"
+ sleep 2
+
+ nsExec::Exec "net start openerp-server-7.0"
+ sleep 2
+
+SectionEnd
+
+Section $(TITLE_PostgreSQL) SectionPostgreSQL
+ SectionIn 1 2
+ SetOutPath '$TEMP'
+ nsExec::Exec 'net user openpgsvc /delete'
+
+ File ${POSTGRESQL_EXE}
+
+ ReadRegStr $0 HKLM "System\CurrentControlSet\Control\ComputerName\ActiveComputerName" "ComputerName"
+ StrCmp $0 "" win9x
+ Goto done
+ win9x:
+ ReadRegStr $0 HKLM "System\CurrentControlSet\Control\ComputerName\ComputerName" "ComputerName"
+ done:
+ Rmdir /r "$INSTDIR\PostgreSQL"
+ ExecWait '"$TEMP\${POSTGRESQL_EXE_FILENAME}" \
+ --mode unattended \
+ --prefix "$INSTDIR\PostgreSQL" \
+ --datadir "$INSTDIR\PostgreSQL\data" \
+ --servicename "PostgreSQL_For_OpenERP" \
+ --serviceaccount "openpgsvc" --servicepassword "0p3npgsvcPWD" \
+ --superaccount "$TextPostgreSQLUsername" --superpassword "$TextPostgreSQLPassword" \
+ --serverport $TextPostgreSQLPort'
+SectionEnd
+
+Section -Post
+ WriteRegExpandStr HKLM "${UNINSTALL_REGISTRY_KEY}" "UninstallString" "$INSTDIR\Uninstall.exe"
+ WriteRegExpandStr HKLM "${UNINSTALL_REGISTRY_KEY}" "InstallLocation" "$INSTDIR"
+ WriteRegStr HKLM "${UNINSTALL_REGISTRY_KEY}" "DisplayName" "${DISPLAY_NAME}"
+ WriteRegStr HKLM "${UNINSTALL_REGISTRY_KEY}" "DisplayVersion" "${MAJOR_VERSION}.${MINOR_VERSION}"
+ WriteRegStr HKLM "${UNINSTALL_REGISTRY_KEY}" "Publisher" "${PUBLISHER}"
+; WriteRegDWORD HKLM "${UNINSTALL_REGISTRY_KEY}" "Version" "${VERSION}"
+; WriteRegDWORD HKLM "${UNINSTALL_REGISTRY_KEY}" "VersionMajor" "${MAJOR_VERSION}.${MINOR_VERSION}"
+; WriteRegDWORD HKLM "${UNINSTALL_REGISTRY_KEY}" "VersionMinor" "${REVISION_VERSION}"
+ WriteRegStr HKLM "${UNINSTALL_REGISTRY_KEY}" "HelpLink" "support@openerp.com"
+ WriteRegStr HKLM "${UNINSTALL_REGISTRY_KEY}" "HelpTelephone" "+32.81.81.37.00"
+ WriteRegStr HKLM "${UNINSTALL_REGISTRY_KEY}" "URLInfoAbout" "http://www.openerp.com"
+ WriteRegStr HKLM "${UNINSTALL_REGISTRY_KEY}" "Contact" "sales@openerp.com"
+ WriteRegDWORD HKLM "${UNINSTALL_REGISTRY_KEY}" "NoModify" "1"
+ WriteRegDWORD HKLM "${UNINSTALL_REGISTRY_KEY}" "NoRepair" "1"
+ WriteUninstaller "$INSTDIR\Uninstall.exe"
+SectionEnd
+
+!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
+ !insertmacro MUI_DESCRIPTION_TEXT ${SectionOpenERP_Server} $(DESC_OpenERP_Server)
+ !insertmacro MUI_DESCRIPTION_TEXT ${SectionPostgreSQL} $(DESC_PostgreSQL)
+!insertmacro MUI_FUNCTION_DESCRIPTION_END
+
+Section "Uninstall"
+ # Check if the server is installed
+ !insertmacro IfKeyExists "HKLM" "${UNINSTALL_REGISTRY_KEY_SERVER}" "UninstallString"
+ Pop $R0
+ ReadRegStr $0 HKLM "${UNINSTALL_REGISTRY_KEY_SERVER}" "UninstallString"
+ ExecWait '"$0" /S'
+
+ nsExec::Exec "net stop openerp-server-7.0"
+ nsExec::Exec "sc delete openerp-server-7.0"
+ sleep 2
+
+ Rmdir /r "$INSTDIR\server"
+ Rmdir /r "$INSTDIR\service"
+
+ DeleteRegKey HKLM "${UNINSTALL_REGISTRY_KEY}"
+SectionEnd
+
+Function .onInit
+ Push $R0
+
+ ${GetParameters} $cmdLineParams
+ ClearErrors
+
+ Pop $R0
+
+ StrCpy $Option_AllInOne 0
+ StrCpy $HasPostgreSQL 0
+
+ StrCpy $TextPostgreSQLHostname ${DEFAULT_POSTGRESQL_HOSTNAME}
+ StrCpy $TextPostgreSQLPort ${DEFAULT_POSTGRESQL_PORT}
+ StrCpy $TextPostgreSQLUsername ${DEFAULT_POSTGRESQL_USERNAME}
+ StrCpy $TextPostgreSQLPassword ${DEFAULT_POSTGRESQL_PASSWORD}
+
+ Push $R0
+ ${GetOptions} $cmdLineParams '/allinone' $R0
+ IfErrors +2 0
+ StrCpy $Option_AllInOne 1
+ Pop $R0
+
+ StrCmp $Option_AllInOne 1 AllInOneMode
+ StrCmp $Option_AllInOne 0 NoAllInOneMode
+
+ AllInOneMode:
+ MessageBox MB_OK|MB_ICONINFORMATION "All In One"
+
+ NoAllInOneMode:
+
+ !insertmacro MUI_LANGDLL_DISPLAY
+
+ ClearErrors
+ EnumRegKey $0 HKLM "SOFTWARE\PostgreSQL\Installations" 0
+ IfErrors DoInstallPostgreSQL 0
+ StrCmp $0 "" DoInstallPostgreSQL
+ StrCpy $HasPostgreSQL 1
+ #SectionSetText ${SectionPostgreSQL} ""
+ !insertmacro UnselectSection ${SectionPostgreSQL}
+ SectionSetFlags ${SectionPostgreSQL} ${SF_RO}
+
+ DoInstallPostgreSQL:
+FunctionEnd
+
+Function .onSelChange
+ ${If} $HasPostgreSQL == 1
+ !insertmacro UnselectSection ${SectionPostgreSQL}
+ ${EndIf}
+FunctionEnd
+
+Function PostgreSQLOnBack
+FunctionEnd
+
+Function ShowPostgreSQL
+ SectionGetFlags ${SectionOpenERP_Server} $0
+ IntOp $0 $0 & ${SF_SELECTED}
+ IntCmp $0 ${SF_SELECTED} LaunchPostgreSQLConfiguration
+ Abort
+ LaunchPostgreSQLConfiguration:
+
+ nsDialogs::Create /NOUNLOAD 1018
+ Pop $0
+
+ ${If} $0 == error
+ Abort
+ ${EndIf}
+
+ GetFunctionAddress $0 PostgreSQLOnBack
+ nsDialogs::OnBack $0
+
+ ${NSD_CreateLabel} 0 0 100% 10u $(DESC_PostgreSQLPage)
+ Pop $0
+
+ ${NSD_CreateLabel} 0 45 60u 12u $(DESC_PostgreSQL_Hostname)
+ Pop $0
+ ${NSD_CreateText} 100 45 150u 12u $TextPostgreSQLHostname
+ Pop $HWNDPostgreSQLHostname
+
+ ${NSD_CreateLabel} 0 75 60u 12u $(DESC_PostgreSQL_Port)
+ Pop $0
+ ${NSD_CreateNumber} 100 75 150u 12u $TextPostgreSQLPort
+ Pop $HWNDPostgreSQLPort
+ ${NSD_CreateLabel} 0 105 60u 12u $(DESC_PostgreSQL_Username)
+ Pop $0
+ ${NSD_CreateText} 100 105 150u 12u $TextPostgreSQLUsername
+ Pop $HWNDPostgreSQLUsername
+ ${NSD_CreateLabel} 0 135 60u 12u $(DESC_PostgreSQL_Password)
+ Pop $0
+ ${NSD_CreateText} 100 135 150u 12u $TextPostgreSQLPassword
+ Pop $HWNDPostgreSQLPassword
+
+ nsDialogs::Show
+FunctionEnd
+
+Function LeavePostgreSQL
+ ${NSD_GetText} $HWNDPostgreSQLHostname $TextPostgreSQLHostname
+ ${NSD_GetText} $HWNDPostgreSQLPort $TextPostgreSQLPort
+ ${NSD_GetText} $HWNDPostgreSQLUsername $TextPostgreSQLUsername
+ ${NSD_GetText} $HWNDPostgreSQLPassword $TextPostgreSQLPassword
+ StrLen $1 $TextPostgreSQLHostname
+ ${If} $1 == 0
+ MessageBox MB_ICONEXCLAMATION|MB_OK $(WARNING_HostNameIsEmpty)
+ Abort
+ ${EndIf}
+
+ ${If} $TextPostgreSQLPort <= 0
+ ${OrIf} $TextPostgreSQLPort > 65535
+ MessageBox MB_ICONEXCLAMATION|MB_OK $(WARNING_PortIsWrong)
+ Abort
+ ${EndIf}
+
+ StrLen $1 $TextPostgreSQLUsername
+ ${If} $1 == 0
+ MessageBox MB_ICONEXCLAMATION|MB_OK $(WARNING_UserNameIsEmpty)
+ Abort
+ ${EndIf}
+
+ StrLen $1 $TextPostgreSQLPassword
+ ${If} $1 == 0
+ MessageBox MB_ICONEXCLAMATION|MB_OK $(WARNING_PasswordIsEmpty)
+ Abort
+ ${EndIf}
+FunctionEnd
+
+Function ComponentLeave
+ SectionGetFlags ${SectionOpenERP_Server} $0
+ IntOp $0 $0 & ${SF_SELECTED}
+ IntCmp $0 ${SF_SELECTED} Done
+
+ SectionGetFlags ${SectionPostgreSQL} $0
+ IntOp $0 $0 & ${SF_SELECTED}
+ IntCmp $0 ${SF_SELECTED} DontInstallPostgreSQL
+
+ ChooseAtLeastOneComponent:
+ MessageBox MB_ICONEXCLAMATION|MB_OK $(DESC_AtLeastOneComponent)
+ Abort
+
+ DontInstallPostgreSQL:
+ MessageBox MB_ICONEXCLAMATION|MB_OK $(DESC_CanNotInstallPostgreSQL)
+ Abort
+ Done:
+FunctionEnd
+
+Function LaunchLink
+ ExecShell "open" "http://localhost:8069/"
+FunctionEnd
diff --git a/setup/win32/static/doc/LICENSE b/setup/win32/static/doc/LICENSE new file mode 100644 index 00000000000..5df3f7fbd14 --- /dev/null +++ b/setup/win32/static/doc/LICENSE @@ -0,0 +1,669 @@ +OpenERP is published under the GNU AFFERO GENERAL PUBLIC LICENSE, Version 3 +(AGPLv3), as included below. Some external libraries and contributions bundled +with OpenERP may be published under other AGPLv3-compatible licenses. For +these, please refer to the relevant source files and/or license files, in the +source code tree. + +************************************************************************** + + GNU AFFERO GENERAL PUBLIC LICENSE + Version 3, 19 November 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU Affero General Public License is a free, copyleft license for +software and other kinds of works, specifically designed to ensure +cooperation with the community in the case of network server software. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +our General Public Licenses are intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + Developers that use our General Public Licenses protect your rights +with two steps: (1) assert copyright on the software, and (2) offer +you this License which gives you legal permission to copy, distribute +and/or modify the software. + + A secondary benefit of defending all users' freedom is that +improvements made in alternate versions of the program, if they +receive widespread use, become available for other developers to +incorporate. Many developers of free software are heartened and +encouraged by the resulting cooperation. However, in the case of +software used on network servers, this result may fail to come about. +The GNU General Public License permits making a modified version and +letting the public access it on a server without ever releasing its +source code to the public. + + The GNU Affero General Public License is designed specifically to +ensure that, in such cases, the modified source code becomes available +to the community. It requires the operator of a network server to +provide the source code of the modified version running there to the +users of that server. Therefore, public use of a modified version, on +a publicly accessible server, gives the public access to the source +code of the modified version. + + An older license, called the Affero General Public License and +published by Affero, was designed to accomplish similar goals. This is +a different license, not a version of the Affero GPL, but Affero has +released a new version of the Affero GPL which permits relicensing under +this license. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU Affero General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Remote Network Interaction; Use with the GNU General Public License. + + Notwithstanding any other provision of this License, if you modify the +Program, your modified version must prominently offer all users +interacting with it remotely through a computer network (if your version +supports such interaction) an opportunity to receive the Corresponding +Source of your version by providing access to the Corresponding Source +from a network server at no charge, through some standard or customary +means of facilitating copying of software. This Corresponding Source +shall include the Corresponding Source for any work covered by version 3 +of the GNU General Public License that is incorporated pursuant to the +following paragraph. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the work with which it is combined will remain governed by version +3 of the GNU General Public License. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU Affero General Public License from time to time. Such new versions +will be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU Affero General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU Affero General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU Affero General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + <one line to give the program's name and a brief idea of what it does.> + Copyright (C) <year> <name of author> + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. + +Also add information on how to contact you by electronic and paper mail. + + If your software can interact with users remotely through a computer +network, you should also make sure that it provides a way for users to +get its source. For example, if your program is a web application, its +interface could display a "Source" link that leads users to an archive +of the code. There are many ways you could offer source, and different +solutions will be better for different programs; see section 13 for the +specific requirements. + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU AGPL, see +<http://www.gnu.org/licenses/>. diff --git a/setup/win32/static/doc/License.rtf b/setup/win32/static/doc/License.rtf new file mode 100644 index 00000000000..83afb4dd22e --- /dev/null +++ b/setup/win32/static/doc/License.rtf @@ -0,0 +1,672 @@ +{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fswiss\fcharset0 Arial;}}
+{\*\generator Msftedit 5.41.21.2509;}\viewkind4\uc1\pard\f0\fs20 OpenERP is published under the GNU AFFERO GENERAL PUBLIC LICENSE, Version 3\par
+(AGPLv3), as included below. Some external libraries and contributions bundled\par
+with OpenERP may be published under other AGPLv3-compatible licenses. For\par
+these, please refer to the relevant source files and/or license files, in the\par
+source code tree.\par
+\par
+**************************************************************************\par
+\par
+ GNU AFFERO GENERAL PUBLIC LICENSE\par
+ Version 3, 19 November 2007\par
+\par
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>\par
+ Everyone is permitted to copy and distribute verbatim copies\par
+ of this license document, but changing it is not allowed.\par
+\par
+ Preamble\par
+\par
+ The GNU Affero General Public License is a free, copyleft license for\par
+software and other kinds of works, specifically designed to ensure\par
+cooperation with the community in the case of network server software.\par
+\par
+ The licenses for most software and other practical works are designed\par
+to take away your freedom to share and change the works. By contrast,\par
+our General Public Licenses are intended to guarantee your freedom to\par
+share and change all versions of a program--to make sure it remains free\par
+software for all its users.\par
+\par
+ When we speak of free software, we are referring to freedom, not\par
+price. Our General Public Licenses are designed to make sure that you\par
+have the freedom to distribute copies of free software (and charge for\par
+them if you wish), that you receive source code or can get it if you\par
+want it, that you can change the software or use pieces of it in new\par
+free programs, and that you know you can do these things.\par
+\par
+ Developers that use our General Public Licenses protect your rights\par
+with two steps: (1) assert copyright on the software, and (2) offer\par
+you this License which gives you legal permission to copy, distribute\par
+and/or modify the software.\par
+\par
+ A secondary benefit of defending all users' freedom is that\par
+improvements made in alternate versions of the program, if they\par
+receive widespread use, become available for other developers to\par
+incorporate. Many developers of free software are heartened and\par
+encouraged by the resulting cooperation. However, in the case of\par
+software used on network servers, this result may fail to come about.\par
+The GNU General Public License permits making a modified version and\par
+letting the public access it on a server without ever releasing its\par
+source code to the public.\par
+\par
+ The GNU Affero General Public License is designed specifically to\par
+ensure that, in such cases, the modified source code becomes available\par
+to the community. It requires the operator of a network server to\par
+provide the source code of the modified version running there to the\par
+users of that server. Therefore, public use of a modified version, on\par
+a publicly accessible server, gives the public access to the source\par
+code of the modified version.\par
+\par
+ An older license, called the Affero General Public License and\par
+published by Affero, was designed to accomplish similar goals. This is\par
+a different license, not a version of the Affero GPL, but Affero has\par
+released a new version of the Affero GPL which permits relicensing under\par
+this license.\par
+\par
+ The precise terms and conditions for copying, distribution and\par
+modification follow.\par
+\par
+ TERMS AND CONDITIONS\par
+\par
+ 0. Definitions.\par
+\par
+ "This License" refers to version 3 of the GNU Affero General Public License.\par
+\par
+ "Copyright" also means copyright-like laws that apply to other kinds of\par
+works, such as semiconductor masks.\par
+\par
+ "The Program" refers to any copyrightable work licensed under this\par
+License. Each licensee is addressed as "you". "Licensees" and\par
+"recipients" may be individuals or organizations.\par
+\par
+ To "modify" a work means to copy from or adapt all or part of the work\par
+in a fashion requiring copyright permission, other than the making of an\par
+exact copy. The resulting work is called a "modified version" of the\par
+earlier work or a work "based on" the earlier work.\par
+\par
+ A "covered work" means either the unmodified Program or a work based\par
+on the Program.\par
+\par
+ To "propagate" a work means to do anything with it that, without\par
+permission, would make you directly or secondarily liable for\par
+infringement under applicable copyright law, except executing it on a\par
+computer or modifying a private copy. Propagation includes copying,\par
+distribution (with or without modification), making available to the\par
+public, and in some countries other activities as well.\par
+\par
+ To "convey" a work means any kind of propagation that enables other\par
+parties to make or receive copies. Mere interaction with a user through\par
+a computer network, with no transfer of a copy, is not conveying.\par
+\par
+ An interactive user interface displays "Appropriate Legal Notices"\par
+to the extent that it includes a convenient and prominently visible\par
+feature that (1) displays an appropriate copyright notice, and (2)\par
+tells the user that there is no warranty for the work (except to the\par
+extent that warranties are provided), that licensees may convey the\par
+work under this License, and how to view a copy of this License. If\par
+the interface presents a list of user commands or options, such as a\par
+menu, a prominent item in the list meets this criterion.\par
+\par
+ 1. Source Code.\par
+\par
+ The "source code" for a work means the preferred form of the work\par
+for making modifications to it. "Object code" means any non-source\par
+form of a work.\par
+\par
+ A "Standard Interface" means an interface that either is an official\par
+standard defined by a recognized standards body, or, in the case of\par
+interfaces specified for a particular programming language, one that\par
+is widely used among developers working in that language.\par
+\par
+ The "System Libraries" of an executable work include anything, other\par
+than the work as a whole, that (a) is included in the normal form of\par
+packaging a Major Component, but which is not part of that Major\par
+Component, and (b) serves only to enable use of the work with that\par
+Major Component, or to implement a Standard Interface for which an\par
+implementation is available to the public in source code form. A\par
+"Major Component", in this context, means a major essential component\par
+(kernel, window system, and so on) of the specific operating system\par
+(if any) on which the executable work runs, or a compiler used to\par
+produce the work, or an object code interpreter used to run it.\par
+\par
+ The "Corresponding Source" for a work in object code form means all\par
+the source code needed to generate, install, and (for an executable\par
+work) run the object code and to modify the work, including scripts to\par
+control those activities. However, it does not include the work's\par
+System Libraries, or general-purpose tools or generally available free\par
+programs which are used unmodified in performing those activities but\par
+which are not part of the work. For example, Corresponding Source\par
+includes interface definition files associated with source files for\par
+the work, and the source code for shared libraries and dynamically\par
+linked subprograms that the work is specifically designed to require,\par
+such as by intimate data communication or control flow between those\par
+subprograms and other parts of the work.\par
+\par
+ The Corresponding Source need not include anything that users\par
+can regenerate automatically from other parts of the Corresponding\par
+Source.\par
+\par
+ The Corresponding Source for a work in source code form is that\par
+same work.\par
+\par
+ 2. Basic Permissions.\par
+\par
+ All rights granted under this License are granted for the term of\par
+copyright on the Program, and are irrevocable provided the stated\par
+conditions are met. This License explicitly affirms your unlimited\par
+permission to run the unmodified Program. The output from running a\par
+covered work is covered by this License only if the output, given its\par
+content, constitutes a covered work. This License acknowledges your\par
+rights of fair use or other equivalent, as provided by copyright law.\par
+\par
+ You may make, run and propagate covered works that you do not\par
+convey, without conditions so long as your license otherwise remains\par
+in force. You may convey covered works to others for the sole purpose\par
+of having them make modifications exclusively for you, or provide you\par
+with facilities for running those works, provided that you comply with\par
+the terms of this License in conveying all material for which you do\par
+not control copyright. Those thus making or running the covered works\par
+for you must do so exclusively on your behalf, under your direction\par
+and control, on terms that prohibit them from making any copies of\par
+your copyrighted material outside their relationship with you.\par
+\par
+ Conveying under any other circumstances is permitted solely under\par
+the conditions stated below. Sublicensing is not allowed; section 10\par
+makes it unnecessary.\par
+\par
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.\par
+\par
+ No covered work shall be deemed part of an effective technological\par
+measure under any applicable law fulfilling obligations under article\par
+11 of the WIPO copyright treaty adopted on 20 December 1996, or\par
+similar laws prohibiting or restricting circumvention of such\par
+measures.\par
+\par
+ When you convey a covered work, you waive any legal power to forbid\par
+circumvention of technological measures to the extent such circumvention\par
+is effected by exercising rights under this License with respect to\par
+the covered work, and you disclaim any intention to limit operation or\par
+modification of the work as a means of enforcing, against the work's\par
+users, your or third parties' legal rights to forbid circumvention of\par
+technological measures.\par
+\par
+ 4. Conveying Verbatim Copies.\par
+\par
+ You may convey verbatim copies of the Program's source code as you\par
+receive it, in any medium, provided that you conspicuously and\par
+appropriately publish on each copy an appropriate copyright notice;\par
+keep intact all notices stating that this License and any\par
+non-permissive terms added in accord with section 7 apply to the code;\par
+keep intact all notices of the absence of any warranty; and give all\par
+recipients a copy of this License along with the Program.\par
+\par
+ You may charge any price or no price for each copy that you convey,\par
+and you may offer support or warranty protection for a fee.\par
+\par
+ 5. Conveying Modified Source Versions.\par
+\par
+ You may convey a work based on the Program, or the modifications to\par
+produce it from the Program, in the form of source code under the\par
+terms of section 4, provided that you also meet all of these conditions:\par
+\par
+ a) The work must carry prominent notices stating that you modified\par
+ it, and giving a relevant date.\par
+\par
+ b) The work must carry prominent notices stating that it is\par
+ released under this License and any conditions added under section\par
+ 7. This requirement modifies the requirement in section 4 to\par
+ "keep intact all notices".\par
+\par
+ c) You must license the entire work, as a whole, under this\par
+ License to anyone who comes into possession of a copy. This\par
+ License will therefore apply, along with any applicable section 7\par
+ additional terms, to the whole of the work, and all its parts,\par
+ regardless of how they are packaged. This License gives no\par
+ permission to license the work in any other way, but it does not\par
+ invalidate such permission if you have separately received it.\par
+\par
+ d) If the work has interactive user interfaces, each must display\par
+ Appropriate Legal Notices; however, if the Program has interactive\par
+ interfaces that do not display Appropriate Legal Notices, your\par
+ work need not make them do so.\par
+\par
+ A compilation of a covered work with other separate and independent\par
+works, which are not by their nature extensions of the covered work,\par
+and which are not combined with it such as to form a larger program,\par
+in or on a volume of a storage or distribution medium, is called an\par
+"aggregate" if the compilation and its resulting copyright are not\par
+used to limit the access or legal rights of the compilation's users\par
+beyond what the individual works permit. Inclusion of a covered work\par
+in an aggregate does not cause this License to apply to the other\par
+parts of the aggregate.\par
+\par
+ 6. Conveying Non-Source Forms.\par
+\par
+ You may convey a covered work in object code form under the terms\par
+of sections 4 and 5, provided that you also convey the\par
+machine-readable Corresponding Source under the terms of this License,\par
+in one of these ways:\par
+\par
+ a) Convey the object code in, or embodied in, a physical product\par
+ (including a physical distribution medium), accompanied by the\par
+ Corresponding Source fixed on a durable physical medium\par
+ customarily used for software interchange.\par
+\par
+ b) Convey the object code in, or embodied in, a physical product\par
+ (including a physical distribution medium), accompanied by a\par
+ written offer, valid for at least three years and valid for as\par
+ long as you offer spare parts or customer support for that product\par
+ model, to give anyone who possesses the object code either (1) a\par
+ copy of the Corresponding Source for all the software in the\par
+ product that is covered by this License, on a durable physical\par
+ medium customarily used for software interchange, for a price no\par
+ more than your reasonable cost of physically performing this\par
+ conveying of source, or (2) access to copy the\par
+ Corresponding Source from a network server at no charge.\par
+\par
+ c) Convey individual copies of the object code with a copy of the\par
+ written offer to provide the Corresponding Source. This\par
+ alternative is allowed only occasionally and noncommercially, and\par
+ only if you received the object code with such an offer, in accord\par
+ with subsection 6b.\par
+\par
+ d) Convey the object code by offering access from a designated\par
+ place (gratis or for a charge), and offer equivalent access to the\par
+ Corresponding Source in the same way through the same place at no\par
+ further charge. You need not require recipients to copy the\par
+ Corresponding Source along with the object code. If the place to\par
+ copy the object code is a network server, the Corresponding Source\par
+ may be on a different server (operated by you or a third party)\par
+ that supports equivalent copying facilities, provided you maintain\par
+ clear directions next to the object code saying where to find the\par
+ Corresponding Source. Regardless of what server hosts the\par
+ Corresponding Source, you remain obligated to ensure that it is\par
+ available for as long as needed to satisfy these requirements.\par
+\par
+ e) Convey the object code using peer-to-peer transmission, provided\par
+ you inform other peers where the object code and Corresponding\par
+ Source of the work are being offered to the general public at no\par
+ charge under subsection 6d.\par
+\par
+ A separable portion of the object code, whose source code is excluded\par
+from the Corresponding Source as a System Library, need not be\par
+included in conveying the object code work.\par
+\par
+ A "User Product" is either (1) a "consumer product", which means any\par
+tangible personal property which is normally used for personal, family,\par
+or household purposes, or (2) anything designed or sold for incorporation\par
+into a dwelling. In determining whether a product is a consumer product,\par
+doubtful cases shall be resolved in favor of coverage. For a particular\par
+product received by a particular user, "normally used" refers to a\par
+typical or common use of that class of product, regardless of the status\par
+of the particular user or of the way in which the particular user\par
+actually uses, or expects or is expected to use, the product. A product\par
+is a consumer product regardless of whether the product has substantial\par
+commercial, industrial or non-consumer uses, unless such uses represent\par
+the only significant mode of use of the product.\par
+\par
+ "Installation Information" for a User Product means any methods,\par
+procedures, authorization keys, or other information required to install\par
+and execute modified versions of a covered work in that User Product from\par
+a modified version of its Corresponding Source. The information must\par
+suffice to ensure that the continued functioning of the modified object\par
+code is in no case prevented or interfered with solely because\par
+modification has been made.\par
+\par
+ If you convey an object code work under this section in, or with, or\par
+specifically for use in, a User Product, and the conveying occurs as\par
+part of a transaction in which the right of possession and use of the\par
+User Product is transferred to the recipient in perpetuity or for a\par
+fixed term (regardless of how the transaction is characterized), the\par
+Corresponding Source conveyed under this section must be accompanied\par
+by the Installation Information. But this requirement does not apply\par
+if neither you nor any third party retains the ability to install\par
+modified object code on the User Product (for example, the work has\par
+been installed in ROM).\par
+\par
+ The requirement to provide Installation Information does not include a\par
+requirement to continue to provide support service, warranty, or updates\par
+for a work that has been modified or installed by the recipient, or for\par
+the User Product in which it has been modified or installed. Access to a\par
+network may be denied when the modification itself materially and\par
+adversely affects the operation of the network or violates the rules and\par
+protocols for communication across the network.\par
+\par
+ Corresponding Source conveyed, and Installation Information provided,\par
+in accord with this section must be in a format that is publicly\par
+documented (and with an implementation available to the public in\par
+source code form), and must require no special password or key for\par
+unpacking, reading or copying.\par
+\par
+ 7. Additional Terms.\par
+\par
+ "Additional permissions" are terms that supplement the terms of this\par
+License by making exceptions from one or more of its conditions.\par
+Additional permissions that are applicable to the entire Program shall\par
+be treated as though they were included in this License, to the extent\par
+that they are valid under applicable law. If additional permissions\par
+apply only to part of the Program, that part may be used separately\par
+under those permissions, but the entire Program remains governed by\par
+this License without regard to the additional permissions.\par
+\par
+ When you convey a copy of a covered work, you may at your option\par
+remove any additional permissions from that copy, or from any part of\par
+it. (Additional permissions may be written to require their own\par
+removal in certain cases when you modify the work.) You may place\par
+additional permissions on material, added by you to a covered work,\par
+for which you have or can give appropriate copyright permission.\par
+\par
+ Notwithstanding any other provision of this License, for material you\par
+add to a covered work, you may (if authorized by the copyright holders of\par
+that material) supplement the terms of this License with terms:\par
+\par
+ a) Disclaiming warranty or limiting liability differently from the\par
+ terms of sections 15 and 16 of this License; or\par
+\par
+ b) Requiring preservation of specified reasonable legal notices or\par
+ author attributions in that material or in the Appropriate Legal\par
+ Notices displayed by works containing it; or\par
+\par
+ c) Prohibiting misrepresentation of the origin of that material, or\par
+ requiring that modified versions of such material be marked in\par
+ reasonable ways as different from the original version; or\par
+\par
+ d) Limiting the use for publicity purposes of names of licensors or\par
+ authors of the material; or\par
+\par
+ e) Declining to grant rights under trademark law for use of some\par
+ trade names, trademarks, or service marks; or\par
+\par
+ f) Requiring indemnification of licensors and authors of that\par
+ material by anyone who conveys the material (or modified versions of\par
+ it) with contractual assumptions of liability to the recipient, for\par
+ any liability that these contractual assumptions directly impose on\par
+ those licensors and authors.\par
+\par
+ All other non-permissive additional terms are considered "further\par
+restrictions" within the meaning of section 10. If the Program as you\par
+received it, or any part of it, contains a notice stating that it is\par
+governed by this License along with a term that is a further\par
+restriction, you may remove that term. If a license document contains\par
+a further restriction but permits relicensing or conveying under this\par
+License, you may add to a covered work material governed by the terms\par
+of that license document, provided that the further restriction does\par
+not survive such relicensing or conveying.\par
+\par
+ If you add terms to a covered work in accord with this section, you\par
+must place, in the relevant source files, a statement of the\par
+additional terms that apply to those files, or a notice indicating\par
+where to find the applicable terms.\par
+\par
+ Additional terms, permissive or non-permissive, may be stated in the\par
+form of a separately written license, or stated as exceptions;\par
+the above requirements apply either way.\par
+\par
+ 8. Termination.\par
+\par
+ You may not propagate or modify a covered work except as expressly\par
+provided under this License. Any attempt otherwise to propagate or\par
+modify it is void, and will automatically terminate your rights under\par
+this License (including any patent licenses granted under the third\par
+paragraph of section 11).\par
+\par
+ However, if you cease all violation of this License, then your\par
+license from a particular copyright holder is reinstated (a)\par
+provisionally, unless and until the copyright holder explicitly and\par
+finally terminates your license, and (b) permanently, if the copyright\par
+holder fails to notify you of the violation by some reasonable means\par
+prior to 60 days after the cessation.\par
+\par
+ Moreover, your license from a particular copyright holder is\par
+reinstated permanently if the copyright holder notifies you of the\par
+violation by some reasonable means, this is the first time you have\par
+received notice of violation of this License (for any work) from that\par
+copyright holder, and you cure the violation prior to 30 days after\par
+your receipt of the notice.\par
+\par
+ Termination of your rights under this section does not terminate the\par
+licenses of parties who have received copies or rights from you under\par
+this License. If your rights have been terminated and not permanently\par
+reinstated, you do not qualify to receive new licenses for the same\par
+material under section 10.\par
+\par
+ 9. Acceptance Not Required for Having Copies.\par
+\par
+ You are not required to accept this License in order to receive or\par
+run a copy of the Program. Ancillary propagation of a covered work\par
+occurring solely as a consequence of using peer-to-peer transmission\par
+to receive a copy likewise does not require acceptance. However,\par
+nothing other than this License grants you permission to propagate or\par
+modify any covered work. These actions infringe copyright if you do\par
+not accept this License. Therefore, by modifying or propagating a\par
+covered work, you indicate your acceptance of this License to do so.\par
+\par
+ 10. Automatic Licensing of Downstream Recipients.\par
+\par
+ Each time you convey a covered work, the recipient automatically\par
+receives a license from the original licensors, to run, modify and\par
+propagate that work, subject to this License. You are not responsible\par
+for enforcing compliance by third parties with this License.\par
+\par
+ An "entity transaction" is a transaction transferring control of an\par
+organization, or substantially all assets of one, or subdividing an\par
+organization, or merging organizations. If propagation of a covered\par
+work results from an entity transaction, each party to that\par
+transaction who receives a copy of the work also receives whatever\par
+licenses to the work the party's predecessor in interest had or could\par
+give under the previous paragraph, plus a right to possession of the\par
+Corresponding Source of the work from the predecessor in interest, if\par
+the predecessor has it or can get it with reasonable efforts.\par
+\par
+ You may not impose any further restrictions on the exercise of the\par
+rights granted or affirmed under this License. For example, you may\par
+not impose a license fee, royalty, or other charge for exercise of\par
+rights granted under this License, and you may not initiate litigation\par
+(including a cross-claim or counterclaim in a lawsuit) alleging that\par
+any patent claim is infringed by making, using, selling, offering for\par
+sale, or importing the Program or any portion of it.\par
+\par
+ 11. Patents.\par
+\par
+ A "contributor" is a copyright holder who authorizes use under this\par
+License of the Program or a work on which the Program is based. The\par
+work thus licensed is called the contributor's "contributor version".\par
+\par
+ A contributor's "essential patent claims" are all patent claims\par
+owned or controlled by the contributor, whether already acquired or\par
+hereafter acquired, that would be infringed by some manner, permitted\par
+by this License, of making, using, or selling its contributor version,\par
+but do not include claims that would be infringed only as a\par
+consequence of further modification of the contributor version. For\par
+purposes of this definition, "control" includes the right to grant\par
+patent sublicenses in a manner consistent with the requirements of\par
+this License.\par
+\par
+ Each contributor grants you a non-exclusive, worldwide, royalty-free\par
+patent license under the contributor's essential patent claims, to\par
+make, use, sell, offer for sale, import and otherwise run, modify and\par
+propagate the contents of its contributor version.\par
+\par
+ In the following three paragraphs, a "patent license" is any express\par
+agreement or commitment, however denominated, not to enforce a patent\par
+(such as an express permission to practice a patent or covenant not to\par
+sue for patent infringement). To "grant" such a patent license to a\par
+party means to make such an agreement or commitment not to enforce a\par
+patent against the party.\par
+\par
+ If you convey a covered work, knowingly relying on a patent license,\par
+and the Corresponding Source of the work is not available for anyone\par
+to copy, free of charge and under the terms of this License, through a\par
+publicly available network server or other readily accessible means,\par
+then you must either (1) cause the Corresponding Source to be so\par
+available, or (2) arrange to deprive yourself of the benefit of the\par
+patent license for this particular work, or (3) arrange, in a manner\par
+consistent with the requirements of this License, to extend the patent\par
+license to downstream recipients. "Knowingly relying" means you have\par
+actual knowledge that, but for the patent license, your conveying the\par
+covered work in a country, or your recipient's use of the covered work\par
+in a country, would infringe one or more identifiable patents in that\par
+country that you have reason to believe are valid.\par
+\par
+ If, pursuant to or in connection with a single transaction or\par
+arrangement, you convey, or propagate by procuring conveyance of, a\par
+covered work, and grant a patent license to some of the parties\par
+receiving the covered work authorizing them to use, propagate, modify\par
+or convey a specific copy of the covered work, then the patent license\par
+you grant is automatically extended to all recipients of the covered\par
+work and works based on it.\par
+\par
+ A patent license is "discriminatory" if it does not include within\par
+the scope of its coverage, prohibits the exercise of, or is\par
+conditioned on the non-exercise of one or more of the rights that are\par
+specifically granted under this License. You may not convey a covered\par
+work if you are a party to an arrangement with a third party that is\par
+in the business of distributing software, under which you make payment\par
+to the third party based on the extent of your activity of conveying\par
+the work, and under which the third party grants, to any of the\par
+parties who would receive the covered work from you, a discriminatory\par
+patent license (a) in connection with copies of the covered work\par
+conveyed by you (or copies made from those copies), or (b) primarily\par
+for and in connection with specific products or compilations that\par
+contain the covered work, unless you entered into that arrangement,\par
+or that patent license was granted, prior to 28 March 2007.\par
+\par
+ Nothing in this License shall be construed as excluding or limiting\par
+any implied license or other defenses to infringement that may\par
+otherwise be available to you under applicable patent law.\par
+\par
+ 12. No Surrender of Others' Freedom.\par
+\par
+ If conditions are imposed on you (whether by court order, agreement or\par
+otherwise) that contradict the conditions of this License, they do not\par
+excuse you from the conditions of this License. If you cannot convey a\par
+covered work so as to satisfy simultaneously your obligations under this\par
+License and any other pertinent obligations, then as a consequence you may\par
+not convey it at all. For example, if you agree to terms that obligate you\par
+to collect a royalty for further conveying from those to whom you convey\par
+the Program, the only way you could satisfy both those terms and this\par
+License would be to refrain entirely from conveying the Program.\par
+\par
+ 13. Remote Network Interaction; Use with the GNU General Public License.\par
+\par
+ Notwithstanding any other provision of this License, if you modify the\par
+Program, your modified version must prominently offer all users\par
+interacting with it remotely through a computer network (if your version\par
+supports such interaction) an opportunity to receive the Corresponding\par
+Source of your version by providing access to the Corresponding Source\par
+from a network server at no charge, through some standard or customary\par
+means of facilitating copying of software. This Corresponding Source\par
+shall include the Corresponding Source for any work covered by version 3\par
+of the GNU General Public License that is incorporated pursuant to the\par
+following paragraph.\par
+\par
+ Notwithstanding any other provision of this License, you have\par
+permission to link or combine any covered work with a work licensed\par
+under version 3 of the GNU General Public License into a single\par
+combined work, and to convey the resulting work. The terms of this\par
+License will continue to apply to the part which is the covered work,\par
+but the work with which it is combined will remain governed by version\par
+3 of the GNU General Public License.\par
+\par
+ 14. Revised Versions of this License.\par
+\par
+ The Free Software Foundation may publish revised and/or new versions of\par
+the GNU Affero General Public License from time to time. Such new versions\par
+will be similar in spirit to the present version, but may differ in detail to\par
+address new problems or concerns.\par
+\par
+ Each version is given a distinguishing version number. If the\par
+Program specifies that a certain numbered version of the GNU Affero General\par
+Public License "or any later version" applies to it, you have the\par
+option of following the terms and conditions either of that numbered\par
+version or of any later version published by the Free Software\par
+Foundation. If the Program does not specify a version number of the\par
+GNU Affero General Public License, you may choose any version ever published\par
+by the Free Software Foundation.\par
+\par
+ If the Program specifies that a proxy can decide which future\par
+versions of the GNU Affero General Public License can be used, that proxy's\par
+public statement of acceptance of a version permanently authorizes you\par
+to choose that version for the Program.\par
+\par
+ Later license versions may give you additional or different\par
+permissions. However, no additional obligations are imposed on any\par
+author or copyright holder as a result of your choosing to follow a\par
+later version.\par
+\par
+ 15. Disclaimer of Warranty.\par
+\par
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY\par
+APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT\par
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY\par
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,\par
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\par
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM\par
+IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF\par
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.\par
+\par
+ 16. Limitation of Liability.\par
+\par
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\par
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS\par
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY\par
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE\par
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF\par
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD\par
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),\par
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF\par
+SUCH DAMAGES.\par
+\par
+ 17. Interpretation of Sections 15 and 16.\par
+\par
+ If the disclaimer of warranty and limitation of liability provided\par
+above cannot be given local legal effect according to their terms,\par
+reviewing courts shall apply local law that most closely approximates\par
+an absolute waiver of all civil liability in connection with the\par
+Program, unless a warranty or assumption of liability accompanies a\par
+copy of the Program in return for a fee.\par
+\par
+ END OF TERMS AND CONDITIONS\par
+\par
+ How to Apply These Terms to Your New Programs\par
+\par
+ If you develop a new program, and you want it to be of the greatest\par
+possible use to the public, the best way to achieve this is to make it\par
+free software which everyone can redistribute and change under these terms.\par
+\par
+ To do so, attach the following notices to the program. It is safest\par
+to attach them to the start of each source file to most effectively\par
+state the exclusion of warranty; and each file should have at least\par
+the "copyright" line and a pointer to where the full notice is found.\par
+\par
+ <one line to give the program's name and a brief idea of what it does.>\par
+ Copyright (C) <year> <name of author>\par
+\par
+ This program is free software: you can redistribute it and/or modify\par
+ it under the terms of the GNU Affero General Public License as published by\par
+ the Free Software Foundation, either version 3 of the License, or\par
+ (at your option) any later version.\par
+\par
+ This program is distributed in the hope that it will be useful,\par
+ but WITHOUT ANY WARRANTY; without even the implied warranty of\par
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\par
+ GNU Affero General Public License for more details.\par
+\par
+ You should have received a copy of the GNU Affero General Public License\par
+ along with this program. If not, see <http://www.gnu.org/licenses/>.\par
+\par
+Also add information on how to contact you by electronic and paper mail.\par
+\par
+ If your software can interact with users remotely through a computer\par
+network, you should also make sure that it provides a way for users to\par
+get its source. For example, if your program is a web application, its\par
+interface could display a "Source" link that leads users to an archive\par
+of the code. There are many ways you could offer source, and different\par
+solutions will be better for different programs; see section 13 for the\par
+specific requirements.\par
+\par
+ You should also get your employer (if you work as a programmer) or school,\par
+if any, to sign a "copyright disclaimer" for the program, if necessary.\par
+For more information on this, and how to apply and follow the GNU AGPL, see\par
+<http://www.gnu.org/licenses/>.\par
+}
+ diff --git a/setup/win32/static/pixmaps/openerp-header.bmp b/setup/win32/static/pixmaps/openerp-header.bmp Binary files differnew file mode 100644 index 00000000000..61226b99ad7 --- /dev/null +++ b/setup/win32/static/pixmaps/openerp-header.bmp diff --git a/setup/win32/static/pixmaps/openerp-icon.ico b/setup/win32/static/pixmaps/openerp-icon.ico Binary files differnew file mode 100644 index 00000000000..89ed393f7cc --- /dev/null +++ b/setup/win32/static/pixmaps/openerp-icon.ico diff --git a/setup/win32/static/pixmaps/openerp-intro.bmp b/setup/win32/static/pixmaps/openerp-intro.bmp Binary files differnew file mode 100644 index 00000000000..a7e21abaa7b --- /dev/null +++ b/setup/win32/static/pixmaps/openerp-intro.bmp diff --git a/setup/win32/static/pixmaps/openerp-slogan.bmp b/setup/win32/static/pixmaps/openerp-slogan.bmp Binary files differnew file mode 100644 index 00000000000..a3cffd104f2 --- /dev/null +++ b/setup/win32/static/pixmaps/openerp-slogan.bmp diff --git a/setup/win32/static/pixmaps/openerp.ico b/setup/win32/static/pixmaps/openerp.ico Binary files differnew file mode 100644 index 00000000000..cde3e961e79 --- /dev/null +++ b/setup/win32/static/pixmaps/openerp.ico diff --git a/setup/win32/win32_service.py b/setup/win32/win32_service.py new file mode 100644 index 00000000000..fcc6b897059 --- /dev/null +++ b/setup/win32/win32_service.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- + +import servicemanager +import win32api +import win32process +import win32service +import win32serviceutil + +import subprocess +import sys +from os.path import dirname, join, split + + +execfile(join(dirname(__file__), '..', 'server', 'openerp', 'release.py')) + + +class OdooService(win32serviceutil.ServiceFramework): + _svc_name_ = nt_service_name + _svc_display_name_ = "%s %s" % (nt_service_name, serie) + + def __init__(self, args): + win32serviceutil.ServiceFramework.__init__(self, args) + self.odooprocess = None # Reference to the server's process + + def SvcStop(self): + # Before we do anything, tell the SCM we are starting the stop process. + self.ReportServiceStatus(win32service.SERVICE_STOP_PENDING) + # Stop the running Odoo: say it's a normal exit + win32api.TerminateProcess(int(self.odooprocess._handle), 0) + servicemanager.LogInfoMsg("Odoo stopped correctly") + + def SvcDoRun(self): + # We start Odoo as an independent process, but we keep its handle + service_dir = dirname(sys.argv[0]) + server_dir = split(service_dir)[0] + server_path = join(server_dir, 'server', 'openerp-server.exe') + self.odooprocess = subprocess.Popen( + [server_path], cwd=server_dir, creationflags=win32process.CREATE_NO_WINDOW + ) + servicemanager.LogInfoMsg('Odoo up and running') + # exit with same exit code as Odoo process + sys.exit(self.odooprocess.wait()) + + +def option_handler(opts): + # configure the service to auto restart on failures... + subprocess.call([ + 'sc', 'failure', nt_service_name, 'reset=', '0', 'actions=', 'restart/0/restart/0/restart/0' + ]) + + +if __name__ == '__main__': + win32serviceutil.HandleCommandLine(OdooService, customOptionHandler=option_handler) diff --git a/setup/win32/win32_setup.py b/setup/win32/win32_setup.py new file mode 100644 index 00000000000..dcebaf3630f --- /dev/null +++ b/setup/win32/win32_setup.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- + +import os +import glob +import py2exe +from distutils.core import setup + + +execfile(os.path.join(os.path.dirname(__file__), '..', '..', 'openerp', 'release.py')) + + +def generate_files(): + actions = { + 'start': ['stop', 'start'], + 'stop': ['stop'], + } + + files = [] + if os.name == 'nt': + files.append(("Microsoft.VC90.CRT", glob.glob('C:\Microsoft.VC90.CRT\*.*'))) + for action, steps in actions.items(): + fname = action + '.bat' + files.append(fname) + with open(fname, 'w') as fp: + fp.write('@PATH=%WINDIR%\system32;%WINDIR%;%WINDIR%\System32\Wbem;.\n') + for step in steps: + fp.write('@net %s %s\n' % (step, nt_service_name)) + return files + +setup( + service=["win32_service"], + version=version, + license=license, + url=url, + author=author, + author_email=author_email, + data_files=generate_files(), + options={ + "py2exe": { + "excludes": [ + 'Tkconstants', + 'Tkinter', + 'tcl', + '_imagingtk', + 'PIL._imagingtk', + 'ImageTk', + 'PIL.ImageTk', + 'FixTk' + ], + "skip_archive": 1, + "optimize": 2, + } + }, +) |
