summaryrefslogtreecommitdiff
path: root/setup
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2016-09-30 17:23:30 +0200
committerChristophe Simonis <chs@odoo.com>2016-09-30 17:23:30 +0200
commitc8cc54559b75a621e4444ecdca6abd901b45e494 (patch)
tree92141325d4dbbf70bbfb8e0c040d4435c8d2378f /setup
parentb2804b1d2ae5fd7ec5c0eca79a8db77476badc84 (diff)
parent91a14488250bc2bb405cc6d300359aa272642484 (diff)
[MERGE] forward port branch 10.0 up to 91a1448
Diffstat (limited to 'setup')
-rw-r--r--setup/odoo6
-rw-r--r--setup/odoo-wsgi.example.py53
-rw-r--r--setup/package.dffedora (renamed from setup/package.dfcentos)10
-rwxr-xr-xsetup/package.py56
-rw-r--r--setup/redhat/postinstall.sh6
-rwxr-xr-xsetup/setup_dev.py159
-rw-r--r--setup/win32/Makefile3
-rw-r--r--setup/win32/Makefile.servicename1
-rwxr-xr-xsetup/win32/setup.nsi25
-rwxr-xr-xsetup/win32/static/getfiles.sh2
-rw-r--r--setup/win32/win32_service.py4
-rw-r--r--setup/win32/win32_setup.py2
12 files changed, 272 insertions, 55 deletions
diff --git a/setup/odoo b/setup/odoo
new file mode 100644
index 00000000000..b2a0e17ff83
--- /dev/null
+++ b/setup/odoo
@@ -0,0 +1,6 @@
+#!/usr/bin/env python
+__import__('pkg_resources').declare_namespace('odoo.addons')
+import odoo
+
+if __name__ == "__main__":
+ odoo.cli.main()
diff --git a/setup/odoo-wsgi.example.py b/setup/odoo-wsgi.example.py
new file mode 100644
index 00000000000..7bc9c7f95e5
--- /dev/null
+++ b/setup/odoo-wsgi.example.py
@@ -0,0 +1,53 @@
+# WSGI Handler sample configuration file.
+#
+# Change the appropriate settings below, in order to provide the parameters
+# that would normally be passed in the command-line.
+# (at least conf['addons_path'])
+#
+# For generic wsgi handlers a global application is defined.
+# For uwsgi this should work:
+# $ uwsgi_python --http :9090 --pythonpath . --wsgi-file openerp-wsgi.py
+#
+# For gunicorn additional globals need to be defined in the Gunicorn section.
+# Then the following command should run:
+# $ gunicorn odoo:service.wsgi_server.application -c openerp-wsgi.py
+
+import odoo
+
+#----------------------------------------------------------
+# Common
+#----------------------------------------------------------
+odoo.multi_process = True # Nah!
+
+# Equivalent of --load command-line option
+odoo.conf.server_wide_modules = ['web']
+conf = odoo.tools.config
+
+# Path to the OpenERP Addons repository (comma-separated for
+# multiple locations)
+
+conf['addons_path'] = '../../addons/trunk,../../web/trunk/addons'
+
+# Optional database config if not using local socket
+#conf['db_name'] = 'mycompany'
+#conf['db_host'] = 'localhost'
+#conf['db_user'] = 'foo'
+#conf['db_port'] = 5432
+#conf['db_password'] = 'secret'
+
+#----------------------------------------------------------
+# Generic WSGI handlers application
+#----------------------------------------------------------
+application = odoo.service.wsgi_server.application
+
+odoo.service.server.load_server_wide_modules()
+
+#----------------------------------------------------------
+# Gunicorn
+#----------------------------------------------------------
+# Standard OpenERP XML-RPC port is 8069
+bind = '127.0.0.1:8069'
+pidfile = '.gunicorn.pid'
+workers = 4
+timeout = 240
+max_requests = 2000
diff --git a/setup/package.dfcentos b/setup/package.dffedora
index 96f0450906f..1e059543d3e 100644
--- a/setup/package.dfcentos
+++ b/setup/package.dffedora
@@ -1,17 +1,17 @@
# Please note that this Dockerfile is used for testing nightly builds and should
# not be used to deploy Odoo
-FROM centos:centos7
+FROM fedora:24
MAINTAINER Odoo S.A. <info@odoo.com>
# Dependencies and postgres
-RUN yum install -d 0 -e 0 epel-release -y && \
- yum update -d 0 -e 0 -y && \
- yum install -d 0 -e 0 \
+RUN dnf update -d 0 -e 0 -y && \
+ dnf install -d 0 -e 0 \
babel \
libxslt-python \
nodejs-less \
pychart \
pyparsing \
+ python-babel \
python-dateutil \
python-decorator \
python-docutils \
@@ -38,7 +38,7 @@ RUN yum install -d 0 -e 0 epel-release -y && \
postgresql-libs \
postgresql-contrib \
postgresql-devel -y && \
- yum clean all
+ dnf clean all
RUN easy_install pyPdf vatnumber pydot psycogreen suds ofxparse XlsxWriter
diff --git a/setup/package.py b/setup/package.py
index 862d54def63..d5bd0564423 100755
--- a/setup/package.py
+++ b/setup/package.py
@@ -17,11 +17,12 @@ from os.path import abspath, dirname, join
from sys import stdout
from tempfile import NamedTemporaryFile
+# apt-get install rsync python-pexpect debhelper python-setuptools
#----------------------------------------------------------
# Utils
#----------------------------------------------------------
-execfile(join(dirname(__file__), '..', 'openerp', 'release.py'))
+execfile(join(dirname(__file__), '..', 'odoo', 'release.py'))
version = version.split('-')[0]
timestamp = time.strftime("%Y%m%d", time.gmtime())
GPGPASSPHRASE = os.getenv('GPGPASSPHRASE')
@@ -33,7 +34,6 @@ PUBLISH_DIRS = {
'windows': 'exe',
}
ADDONS_NOT_TO_PUBLISH = [
- 'web_analytics'
]
def mkdir(d):
@@ -196,9 +196,11 @@ class KVM(object):
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)
+ f.write("VERSION=%s\n" % version)
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('.', ''))
+ with open(join(self.o.build_dir, 'setup/win32/Makefile.servicename'), 'w') as f:
+ f.write("SERVICENAME=%s\n" % nt_service_name)
self.ssh("mkdir -p build")
self.rsync('%s/ %s@127.0.0.1:build/server/' % (self.o.build_dir, self.login))
@@ -208,8 +210,6 @@ class KVMWinBuildExe(KVM):
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]
@@ -217,8 +217,8 @@ class KVMWinTestExe(KVM):
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"/"Odoo %s"/PostgreSQL/bin/createdb.exe -e -U openpg mycompany' % setupversion)
- self.ssh('/cygdrive/c/"Program Files"/"Odoo %s"/server/openerp-server.exe -d mycompany -i base --stop-after-init' % setupversion)
- self.ssh('net start odoo-server-%s' % version)
+ self.ssh('/cygdrive/c/"Program Files"/"Odoo %s"/server/odoo-bin.exe -d mycompany -i base --stop-after-init' % setupversion)
+ self.ssh('net start %s' % nt_service_name)
_rpc_count_modules(port=18069)
#----------------------------------------------------------
@@ -232,9 +232,9 @@ def _prepare_build_dir(o, win32=False):
try:
for addon_path in glob(join(o.build_dir, 'addons/*')):
if addon_path.split(os.path.sep)[-1] not in ADDONS_NOT_TO_PUBLISH:
- shutil.move(addon_path, join(o.build_dir, 'openerp/addons'))
+ shutil.move(addon_path, join(o.build_dir, 'odoo/addons'))
except shutil.Error:
- # Thrown when the add-on is already in openerp/addons (if _prepare_build_dir
+ # Thrown when the add-on is already in odoo/addons (if _prepare_build_dir
# has already been called once)
pass
@@ -291,11 +291,11 @@ def _prepare_testing(o):
subprocess.call(["docker", "build", "-t", "odoo-%s-debian-nightly-tests" % version, "."],
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")],
+ subprocess.call(["mkdir", "docker_fedora"], cwd=o.build_dir)
+ subprocess.call(["cp", "package.dffedora", os.path.join(o.build_dir, "docker_fedora", "Dockerfile")],
cwd=os.path.join(o.odoo_dir, "setup"))
- subprocess.call(["docker", "build", "-t", "odoo-%s-centos-nightly-tests" % version, "."],
- cwd=os.path.join(o.build_dir, "docker_centos"))
+ subprocess.call(["docker", "build", "-t", "odoo-%s-fedora-nightly-tests" % version, "."],
+ cwd=os.path.join(o.build_dir, "docker_fedora"))
def test_tgz(o):
with docker('odoo-%s-src-nightly-tests' % version, o.build_dir, o.pub) as wheezy:
@@ -307,8 +307,8 @@ def test_tgz(o):
wheezy.system('su postgres -s /bin/bash -c "createdb mycompany"')
wheezy.system('mkdir /var/lib/odoo')
wheezy.system('chown odoo:odoo /var/lib/odoo')
- wheezy.system('su odoo -s /bin/bash -c "odoo.py --addons-path=/usr/local/lib/python2.7/dist-packages/openerp/addons -d mycompany -i base --stop-after-init"')
- wheezy.system('su odoo -s /bin/bash -c "odoo.py --addons-path=/usr/local/lib/python2.7/dist-packages/openerp/addons -d mycompany &"')
+ wheezy.system('su odoo -s /bin/bash -c "odoo --addons-path=/usr/local/lib/python2.7/dist-packages/odoo/addons -d mycompany -i base --stop-after-init"')
+ wheezy.system('su odoo -s /bin/bash -c "odoo --addons-path=/usr/local/lib/python2.7/dist-packages/odoo/addons -d mycompany &"')
def test_deb(o):
with docker('odoo-%s-debian-nightly-tests' % version, o.build_dir, o.pub) as wheezy:
@@ -317,20 +317,20 @@ def test_deb(o):
wheezy.system('su postgres -s /bin/bash -c "createdb mycompany"')
wheezy.system('/usr/bin/dpkg -i /opt/release/%s' % wheezy.release)
wheezy.system('/usr/bin/apt-get install -f -y')
- wheezy.system('su odoo -s /bin/bash -c "odoo.py -c /etc/odoo/openerp-server.conf -d mycompany -i base --stop-after-init"')
- wheezy.system('su odoo -s /bin/bash -c "odoo.py -c /etc/odoo/openerp-server.conf -d mycompany &"')
+ wheezy.system('su odoo -s /bin/bash -c "odoo -c /etc/odoo/odoo.conf -d mycompany -i base --stop-after-init"')
+ wheezy.system('su odoo -s /bin/bash -c "odoo -c /etc/odoo/odoo.conf -d mycompany &"')
def test_rpm(o):
- with docker('odoo-%s-centos-nightly-tests' % version, o.build_dir, o.pub) as centos7:
- centos7.release = '*.noarch.rpm'
+ with docker('odoo-%s-fedora-nightly-tests' % version, o.build_dir, o.pub) as fedora24:
+ fedora24.release = '*.noarch.rpm'
# Start postgresql
- centos7.system('su postgres -c "/usr/bin/pg_ctl -D /var/lib/postgres/data start"')
- centos7.system('sleep 5')
- centos7.system('su postgres -c "createdb mycompany"')
+ fedora24.system('su postgres -c "/usr/bin/pg_ctl -D /var/lib/postgres/data start"')
+ fedora24.system('sleep 5')
+ fedora24.system('su postgres -c "createdb mycompany"')
# Odoo install
- centos7.system('yum install -d 0 -e 0 /opt/release/%s -y' % centos7.release)
- centos7.system('su odoo -s /bin/bash -c "openerp-server -c /etc/odoo/openerp-server.conf -d mycompany -i base --stop-after-init"')
- centos7.system('su odoo -s /bin/bash -c "openerp-server -c /etc/odoo/openerp-server.conf -d mycompany &"')
+ fedora24.system('dnf install -d 0 -e 0 /opt/release/%s -y' % fedora24.release)
+ fedora24.system('su odoo -s /bin/bash -c "odoo -c /etc/odoo/odoo.conf -d mycompany -i base --stop-after-init"')
+ fedora24.system('su odoo -s /bin/bash -c "odoo -c /etc/odoo/odoo.conf -d mycompany &"')
def test_exe(o):
KVMWinTestExe(o, o.vm_winxp_image, o.vm_winxp_ssh_key, o.vm_winxp_login).start()
@@ -402,7 +402,6 @@ def options():
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='9.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")
@@ -419,9 +418,8 @@ def options():
# 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')
+ o.work = join(o.build_dir, 'openerp-%s' % version)
+ o.work_addons = join(o.work, 'odoo', 'addons')
return o
diff --git a/setup/redhat/postinstall.sh b/setup/redhat/postinstall.sh
index 19ea5292739..cfc4f754233 100644
--- a/setup/redhat/postinstall.sh
+++ b/setup/redhat/postinstall.sh
@@ -3,7 +3,7 @@
set -e
ODOO_CONFIGURATION_DIR=/etc/odoo
-ODOO_CONFIGURATION_FILE=$ODOO_CONFIGURATION_DIR/openerp-server.conf
+ODOO_CONFIGURATION_FILE=$ODOO_CONFIGURATION_DIR/odoo.conf
ODOO_DATA_DIR=/var/lib/odoo
ODOO_GROUP="odoo"
ODOO_LOG_DIR=/var/log/odoo
@@ -27,7 +27,7 @@ db_host = False
db_port = False
db_user = $ODOO_USER
db_password = False
-addons_path = /usr/lib/python2.7/site-packages/openerp/addons
+addons_path = /usr/lib/python2.7/site-packages/odoo/addons
" > $ODOO_CONFIGURATION_FILE
chown $ODOO_USER:$ODOO_GROUP $ODOO_CONFIGURATION_FILE
chmod 0640 $ODOO_CONFIGURATION_FILE
@@ -52,7 +52,7 @@ After=network.target
Type=simple
User=odoo
Group=odoo
-ExecStart=/usr/bin/odoo.py --config=/etc/odoo/openerp-server.conf
+ExecStart=/usr/bin/odoo --config=/etc/odoo/odoo.conf
[Install]
WantedBy=multi-user.target
diff --git a/setup/setup_dev.py b/setup/setup_dev.py
new file mode 100755
index 00000000000..5ddac8b1a6f
--- /dev/null
+++ b/setup/setup_dev.py
@@ -0,0 +1,159 @@
+#!/usr/bin/env python
+#----------------------------------------------------------
+# odoo cli
+#
+# To install your odoo development environement type:
+#
+# wget -O- https://raw.githubusercontent.com/odoo/odoo/10.0/setup/setup_dev.py | python
+#
+# The setup_* subcommands used to boostrap odoo are defined here inline and may
+# only depends on the python 2.7 stdlib
+#
+# The rest of subcommands are defined in odoo/cli or in <module>/cli by
+# subclassing the Command object
+#
+#----------------------------------------------------------
+import os
+import re
+import sys
+import subprocess
+
+GIT_HOOKS_PRE_PUSH = """
+#!/usr/bin/env python2
+import re
+import sys
+if re.search('github.com[:/]odoo/odoo.git$', sys.argv[2]):
+ print "Pushing to /odoo/odoo.git is forbidden, please push to odoo-dev, use --no-verify to override"
+ sys.exit(1)
+"""
+
+def printf(f,*l):
+ print "odoo:" + f % l
+
+def run(*l):
+ if isinstance(l[0], list):
+ l = l[0]
+ printf("running %s", " ".join(l))
+ subprocess.check_call(l)
+
+def git_locate():
+ # Locate git dir
+ # TODO add support for os.environ.get('GIT_DIR')
+
+ # check for an odoo child
+ if os.path.isfile('odoo/.git/config'):
+ os.chdir('odoo')
+
+ path = os.getcwd()
+ while path != os.path.abspath(os.sep):
+ gitconfig_path = os.path.join(path, '.git/config')
+ if os.path.isfile(gitconfig_path):
+ release_py = os.path.join(path, 'odoo/release.py')
+ if os.path.isfile(release_py):
+ break
+ path = os.path.dirname(path)
+ if path == os.path.abspath(os.sep):
+ path = None
+ return path
+
+def cmd_setup_git():
+ git_dir = git_locate()
+ if git_dir:
+ printf('git repo found at %s',git_dir)
+ else:
+ run("git", "init", "odoo")
+ os.chdir('odoo')
+ git_dir = os.getcwd()
+ if git_dir:
+ # push sane config for git < 2.0, and hooks
+ #run('git','config','push.default','simple')
+ # alias
+ run('git','config','alias.st','status')
+ # merge bzr style
+ run('git','config','merge.commit','no')
+ # pull let me choose between merge or rebase only works in git > 2.0, use an alias for 1
+ run('git','config','pull.ff','only')
+ run('git','config','alias.pl','pull --ff-only')
+ pre_push_path = os.path.join(git_dir, '.git/hooks/pre-push')
+ open(pre_push_path,'w').write(GIT_HOOKS_PRE_PUSH.strip())
+ os.chmod(pre_push_path, 0755)
+ # setup odoo remote
+ run('git','config','remote.odoo.url','https://github.com/odoo/odoo.git')
+ run('git','config','remote.odoo.pushurl','git@github.com:odoo/odoo.git')
+ run('git','config','--add','remote.odoo.fetch','dummy')
+ run('git','config','--unset-all','remote.odoo.fetch')
+ run('git','config','--add','remote.odoo.fetch','+refs/heads/*:refs/remotes/odoo/*')
+ # setup odoo-dev remote
+ run('git','config','remote.odoo-dev.url','https://github.com/odoo-dev/odoo.git')
+ run('git','config','remote.odoo-dev.pushurl','git@github.com:odoo-dev/odoo.git')
+ run('git','remote','update')
+ # setup 9.0 branch
+ run('git','config','branch.9.0.remote','odoo')
+ run('git','config','branch.9.0.merge','refs/heads/9.0')
+ run('git','checkout','9.0')
+ else:
+ printf('no git repo found')
+
+def cmd_setup_git_dev():
+ git_dir = git_locate()
+ if git_dir:
+ # setup odoo-dev remote
+ run('git','config','--add','remote.odoo-dev.fetch','dummy')
+ run('git','config','--unset-all','remote.odoo-dev.fetch')
+ run('git','config','--add','remote.odoo-dev.fetch','+refs/heads/*:refs/remotes/odoo-dev/*')
+ run('git','config','--add','remote.odoo-dev.fetch','+refs/pull/*:refs/remotes/odoo-dev/pull/*')
+ run('git','remote','update')
+
+def cmd_setup_git_review():
+ git_dir = git_locate()
+ if git_dir:
+ # setup odoo-dev remote
+ run('git','config','--add','remote.odoo.fetch','dummy')
+ run('git','config','--unset-all','remote.odoo.fetch')
+ run('git','config','--add','remote.odoo.fetch','+refs/heads/*:refs/remotes/odoo/*')
+ run('git','config','--add','remote.odoo.fetch','+refs/tags/*:refs/remotes/odoo/tags/*')
+ run('git','config','--add','remote.odoo.fetch','+refs/pull/*:refs/remotes/odoo/pull/*')
+
+def setup_deps_debian(git_dir):
+ debian_control_path = os.path.join(git_dir, 'debian/control')
+ debian_control = open(debian_control_path).read()
+ debs = re.findall('python-[0-9a-z]+',debian_control)
+ debs += ["postgresql"]
+ proc = subprocess.Popen(['sudo','apt-get','install'] + debs, stdin=open('/dev/tty'))
+ proc.communicate()
+
+def cmd_setup_deps():
+ git_dir = git_locate()
+ if git_dir:
+ if os.path.isfile('/etc/debian_version'):
+ setup_deps_debian(git_dir)
+
+def setup_pg_debian(git_dir):
+ cmd = ['sudo','su','-','postgres','-c','createuser -s %s' % os.environ['USER']]
+ subprocess.call(cmd)
+
+def cmd_setup_pg():
+ git_dir = git_locate()
+ if git_dir:
+ if os.path.isfile('/etc/debian_version'):
+ setup_pg_debian(git_dir)
+
+def cmd_setup():
+ cmd_setup_git()
+ cmd_setup_deps()
+ cmd_setup_pg()
+
+def main():
+ # registry of commands
+ g = globals()
+ cmds = dict([(i[4:],g[i]) for i in g if i.startswith('cmd_')])
+ # if curl URL | python2 then use command setup
+ if len(sys.argv) == 1 and __file__ == '<stdin>':
+ cmd_setup()
+ elif len(sys.argv) == 2 and sys.argv[1] in cmds:
+ cmds[sys.argv[1]]()
+ else:
+ sys.exit('Unknow command. Command available: %r' % (cmds.keys(),))
+
+if __name__ == "__main__":
+ main()
diff --git a/setup/win32/Makefile b/setup/win32/Makefile
index ab8bc88831d..c0d33c904b1 100644
--- a/setup/win32/Makefile
+++ b/setup/win32/Makefile
@@ -1,5 +1,6 @@
include Makefile.version
include Makefile.python
+include Makefile.servicename
SERVER_DIRECTORY=../..
FILES_DIRECTORY=release
@@ -7,7 +8,7 @@ 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)
+MAKENSIS_ARGUMENTS=/DVERSION=$(VERSION) /DSERVICENAME=${SERVICENAME}
LAUNCH_MAKENSIS=/cygdrive/c/cygwin/makensis $(MAKENSIS_ARGUMENTS) setup.nsi
diff --git a/setup/win32/Makefile.servicename b/setup/win32/Makefile.servicename
new file mode 100644
index 00000000000..bf47e07d731
--- /dev/null
+++ b/setup/win32/Makefile.servicename
@@ -0,0 +1 @@
+SERVICENAME= \ No newline at end of file
diff --git a/setup/win32/setup.nsi b/setup/win32/setup.nsi
index 67b1551ff9c..8a70867e602 100755
--- a/setup/win32/setup.nsi
+++ b/setup/win32/setup.nsi
@@ -41,7 +41,7 @@
!define PUBLISHER 'Odoo S.A.'
!ifndef MAJOR_VERSION
- !define MAJOR_VERSION '9'
+ !define MAJOR_VERSION '10'
!endif
!ifndef MINOR_VERSION
@@ -116,7 +116,7 @@ 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_FILENAME "postgresql-9.5.4-2-windows.exe"
!define POSTGRESQL_EXE "${STATIC_PATH}\${POSTGRESQL_EXE_FILENAME}"
!define MUI_ABORTWARNING
@@ -219,28 +219,27 @@ Section $(TITLE_OpenERP_Server) SectionOpenERP_Server
File /r "${STATIC_PATH}\less\*"
# 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
+ WriteIniStr "$INSTDIR\server\odoo.conf" "options" "db_host" $TextPostgreSQLHostname
+ WriteIniStr "$INSTDIR\server\odoo.conf" "options" "db_user" $TextPostgreSQLUsername
+ WriteIniStr "$INSTDIR\server\odoo.conf" "options" "db_password" $TextPostgreSQLPassword
+ WriteIniStr "$INSTDIR\server\odoo.conf" "options" "db_port" $TextPostgreSQLPort
# Fix the addons path
- WriteIniStr "$INSTDIR\server\openerp-server.conf" "options" "addons_path" "$INSTDIR\server\openerp\addons"
- WriteIniStr "$INSTDIR\server\openerp-server.conf" "options" "bin_path" "$INSTDIR\thirdparty"
+ WriteIniStr "$INSTDIR\server\odoo.conf" "options" "addons_path" "$INSTDIR\server\odoo\addons"
+ WriteIniStr "$INSTDIR\server\odoo.conf" "options" "bin_path" "$INSTDIR\thirdparty"
# 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"
+ WriteIniStr "$INSTDIR\server\odoo.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\server\odoo-bin.exe" --stop-after-init --logfile "$INSTDIR\server\odoo.log" -s'
nsExec::Exec '"$INSTDIR\service\win32_service.exe" -auto -install'
- # TODO: don't hardcode the service name
- nsExec::Exec "net stop odoo-server-10.0"
+ nsExec::Exec "net stop ${SERVICENAME}"
sleep 2
- nsExec::Exec "net start odoo-server-10.0"
+ nsExec::Exec "net start ${SERVICENAME}"
sleep 2
SectionEnd
diff --git a/setup/win32/static/getfiles.sh b/setup/win32/static/getfiles.sh
index a2095e2c349..4975efa3705 100755
--- a/setup/win32/static/getfiles.sh
+++ b/setup/win32/static/getfiles.sh
@@ -10,7 +10,7 @@ function cleanup {
trap cleanup EXIT
# postgresql
-wget -q http://get.enterprisedb.com/postgresql/postgresql-9.3.5-1-windows.exe
+wget -q http://get.enterprisedb.com/postgresql/postgresql-9.5.4-2-windows.exe
# wkhtmltopdf
wget -q -P $TEMPDIR http://download.gna.org/wkhtmltopdf/0.12/0.12.1/wkhtmltox-0.12.1.2_msvc2013-win32.exe
diff --git a/setup/win32/win32_service.py b/setup/win32/win32_service.py
index fcc6b897059..76b21f4050f 100644
--- a/setup/win32/win32_service.py
+++ b/setup/win32/win32_service.py
@@ -11,7 +11,7 @@ import sys
from os.path import dirname, join, split
-execfile(join(dirname(__file__), '..', 'server', 'openerp', 'release.py'))
+execfile(join(dirname(__file__), '..', 'server', 'odoo', 'release.py'))
class OdooService(win32serviceutil.ServiceFramework):
@@ -33,7 +33,7 @@ class OdooService(win32serviceutil.ServiceFramework):
# 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')
+ server_path = join(server_dir, 'server', 'odoo-bin.exe')
self.odooprocess = subprocess.Popen(
[server_path], cwd=server_dir, creationflags=win32process.CREATE_NO_WINDOW
)
diff --git a/setup/win32/win32_setup.py b/setup/win32/win32_setup.py
index dcebaf3630f..d973f90674a 100644
--- a/setup/win32/win32_setup.py
+++ b/setup/win32/win32_setup.py
@@ -6,7 +6,7 @@ import py2exe
from distutils.core import setup
-execfile(os.path.join(os.path.dirname(__file__), '..', '..', 'openerp', 'release.py'))
+execfile(os.path.join(os.path.dirname(__file__), '..', '..', 'odoo', 'release.py'))
def generate_files():