diff --git a/setup/package.py b/setup/package.py index 76f6d5cd0f8470f909cc8ca1393d70c7e187ce93..743e9c63f18e581a8f425f00830ed3151a61c32a 100755 --- a/setup/package.py +++ b/setup/package.py @@ -199,6 +199,8 @@ class KVMWinBuildExe(KVM): 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('.', '')) + 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)) diff --git a/setup/win32/Makefile b/setup/win32/Makefile index ab8bc88831d91156723cc38d30ca2deddab0daf1..c0d33c904b12b361f709b54893e0621bf59b1650 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 0000000000000000000000000000000000000000..bf47e07d731db67d161c4f28d6630a3b9ce711a6 --- /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 dc0552dc4ec83bc9b90865dde9518a782b1cfea1..a243c39b12acb0c3141c6b788c9f37ffd4c4f1fd 100755 --- a/setup/win32/setup.nsi +++ b/setup/win32/setup.nsi @@ -236,11 +236,10 @@ Section $(TITLE_OpenERP_Server) SectionOpenERP_Server 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 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