Here, steps to build using windows, setup allinone, client GTK, server,
client-web

Info from topic :

http://www.openobject.com/forum/topic10994.html
original procedure :
http://bazaar.launchpad.net/~openerp/openerp/win-installer-trunk/annotate/he
ad%3A/doc/INSTALL

thanks to :

openerp & Axelor : for the work , codes and scripts
Stéphane Wirteel : for original scripts and library
ChristianD : for answers
dharival , David L: for questions and answers
Gem 

First, itt's necessary to clean your computer :

Uninstall GTK, GTK-dev if you don’t have version 2.12.9
Uninstall all programs with GTK include like the gimp or Dia (to build
openerp module with UML)
Uninstall pyton-2.5 and all modules, at the end delete the folder python25

After uninstall openerp you should clean up too
in C:\user delete all user postgresql "openpgsvc"
in C:\user\Administrateur delete .\openpg, openerp-client.log, 

Clean with programs like glary utilities XOR comodo
http://www.glaryutilities.com/
http://system-cleaner.comodo.com/
you can clean completly registry (start->execute type regedit) with keyword 
(CTRL+F  check just key) openerp (allinone(never deleted), client web 
openerpc), openpg, pga (pgadmin III, pgagent), postgresql, pgsql.
clean before all new installation of openerp.

if not do yet, install bazaar :
http://bazaar-vcs.org/Download

create a folder to stock sources and build :
C:\openerp

Open a windows console start->execute cmd ok
cd C:\ openerp (enter)
bzr branch lp:~openerp/openerp/win-installer-trunk (enter) (don’t worry for 
the warning’s message of launchpad, stand the end, a few minutes)

a new folder has been created : C:\openerp\win-installer-trunk
copy all in win-installer\ and copy it in C:\openerp

install programs and libraries (with installation and options by
default=>else the scripts don’t work) which are in the folder dependencies, 
just this
listing and in this order :

nsis-2.40-setup.exe
graphviz-2.20.2.exe
python-2.5.2.msi
(do not install pytz-2008i.win32.exe but if you want, you must add at the end 
the listing of timezone all_timezone and common-timezone)
egenix-mx-base-3.1.1.win32-py2.5.msi
egenix-pyopenssl-0.8.0_0.9.8i_1.win32-py2.5.msi (not in the OpenERP Quick 
Installation Guide)
PyXML-0.8.4.win32-py2.5.exe
libxml2-python-2.7.1.win32-py2.5.exe
lxml-2.1.2.win32-py2.5.exe
matplotlib-0.98.3.win32-py2.5.exe
numpy-1.2.1-win32-superpack-python2.5.exe
PIL-1.1.6.win32-py2.5.exe
PyChart-1.39.win32.exe ( created by Stephane Wirtel )
ReportLab-2.2.win32-py2.5.exe
vobject-0.7.1.win32.exe ( created by Stephane Wirtel )
pygobject-2.14.1-1.win32-py2.5.exe
pygtk-2.12.1-2.win32-py2.5.exe
pycairo-1.4.12-1.win32-py2.5.exe
install by default (in C:\GTK with options by default) 
gtk-2.12.9-win32-2.exe 
install by default (in C:\GTK with options by default )
gtk-dev-2.12.9-win32-2.exe 
pydot-1.0.2.win32.exe ( created by Stephane Wirtel )
pyparsing-1.5.0.win32.exe
pywin32-212.win32-py2.5.exe
py2exe-0.6.8.win32-py2.5.exe
hippo-canvas-0.3.0-win32.zip unzip (files "libhippocanvas-1-0.dll" and
"hippo.pyd") in C:\Python25\DLLs\
msvcp71.zip unzip dll (msvcp71.dll) in C:\WINDOWS\SYSTEM32 if necessary ( for 
system before windows xp)
psycopg2-2.0.8.win32-py2.5-pg8.3.4-release.exe
setuptools-0.6c9.win32-py2.5.exe

in C:\python25\Lib\site-packages\matplotlib\figure.py
line 623 comment the line with "#"
you must have :
#add_axes.__doc__ = add_axes.__doc__ % (", ".join(get_projection_names()), 
'%(Axes)s')
(if you want an editor with line number download notepad++ : 
http://notepad-plus.sourceforge.net/fr/site.htm)

verify environment variables :
on deskop right clic on computer->properties->advanced parameters 
system->environment variable
in system variable clic on "path":
you should have :
%GTK_BASEPATH%\bin;
C:\Python25;
C:\Python25\bin;
C:\Python25\scripts;
C:\Program Files\NSIS\bin;
C:\Program Files\NSIS;
C:\Program Files\Graphviz2.20\bin;
C:\Program Files\Bazaar 

search name of your local timezone in your windows :
start->execute type regedit
go to HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Windows NT/CurrentVersion/Time 
Zones/
search your timezone
by example for me "Romance Standard Time" -> subkey on the right "std" value 
"Paris, Madrid"
copy python25\Lib\site-packages\pytz\zoneinfo\Europe\Paris in 
python25\Lib\site-packages\pytz\zoneinfo\Paris, Madrid
in python25\Lib\site-packages\pytz\__init__.py at the end of the script in 
all_timezones list add the line :
'Paris, Madrid',
you must do this with your own timezone installed on your computer.


You have now installed all you need to build the different setup with
following scripts :
warning : the trunk version is not stable, you can change 5.0 by trunk if you 
want.

BUILD OPENERP SETUP ALLINONE :

In C:\openerp\make.bat right click modify
File->Save as make-allinone.bat

Delete all, paste, save, read commentary of this :

::beginning of script
:: Disabled/Enable echoing
@echo off

:: Set some script wide variable
set POSTGRESQL_MSI=postgresql-8.3-int.msi
set OPENERP_NSIS=setup.nsi
set OPENERP_DEMO_DIR=demo

:: Get current date (YYYYMMDD)
set TODAY=%DATE:~6,4%%DATE:~3,2%%DATE:~0,2%
:: Save current directory
set TOPDIR=%CD%

:: Set correct a subdirectory for packaging,
:: dont trash the current directory...
set SUBDIR=%1
if "%1"=="" goto usage
if "%2"=="" goto usage
set VERSION=%2

goto create_subdir

:usage
echo "make.bat TITLE_OF_BUILD VERSION"
goto end

:: Prepare sub-directory
:create_subdir
echo Creating subdir %SUBDIR%.
mkdir %SUBDIR%
echo.

echo Copying PostgreSQL installer...
copy /Y %POSTGRESQL_MSI% %SUBDIR%
echo.
echo Copying OpenERP Nullsoft installer script...
copy /Y %OPENERP_NSIS% %SUBDIR%
echo.
echo Copying `demo' files...
mkdir %SUBDIR%\demo
xcopy /E /I /Y %OPENERP_DEMO_DIR% %SUBDIR%\demo
cd %SUBDIR%

:: Get sources from launchpad
:bzr_clone

echo.
echo Downloading OpenERP Server/Development version...
bzr clone lp:~openerp/openobject-server/5.0 server
echo OpenERP Server downloaded !

echo.
echo Downloading OpenERP Client/Development version...
bzr clone lp:~openerp/openobject-client/5.0 client
echo OpenERP Client downloaded !

echo.
echo Downloading OpenERP Web Client/Development version...
bzr clone lp:~openerp/openobject-client-web/5.0 client-web
echo OpenERP Web Client downloaded !
echo pause client web config
::in C:\openerp\trunk\client-web\config\default.cfg delete "#" for line 
::server.socket_host = "127.0.0.1"
::server.socket_port = 8080 (enter to run)
echo type enter to continue
pause 


echo.
echo Downloading OpenERP Addons/Development version...
bzr clone lp:~openerp/openobject-addons/trunk-extra-addons addons
xcopy /E /Y addons\* server\bin\addons\
echo OpenERP Addons downloaded !


:: delete ":" for each line if you want extra-addons
:echo.
:echo Downloading OpenERP extra-addons/Development version...
:bzr clone lp:~openerp-commiter/openobject-addons/trunk extra-addons
:xcopy /E  extra-addons\* server\bin\addons\
:echo OpenERP extra-addons downloaded !


:clean build and dist python file compiled
rmdir /S /Q client-web\win32\build
rmdir /S /Q client-web\build
rmdir /S /Q server\win32\build
rmdir /S /Q server\build
rmdir /S /Q server\win32\dist
rmdir /S /Q server\dist
rmdir /S /Q client\build
rmdir /S /Q client\dist
del /F client\msgfmt.pyc
del /F client\mydistutils.pyc
del /F C:\openerp\trunk\client-web\win32\util.pyc


:packaging

:: package client for allinone
echo.
echo begin client build
cd client
python setup.py --quiet py2exe
makensis /DVERSION=%VERSION% /DALLINONE=1 /V1 setup.nsi
echo.
echo end client build

:: package server for allinone
echo.
echo begin server build
cd ..
cd server\win32
python setup.py --quiet py2exe
cd ..
python setup.py --quiet py2exe
makensis /DVERSION=%VERSION% /DALLINONE=1 /V1 setup.nsi
echo.
echo end server build

:: package client-web for allinone
echo.
echo begin client-web build
cd ..
cd client-web
python win32\setup.py --quiet bdist_wininst 
move win32\openerp-web-setup-* win32\openerp-web-setup-%VERSION%.exe
makensis /DVERSION=%VERSION% /DALLINONE=1 /V1 win32\setup.nsi
move win32\openerp-web-setup-%VERSION%.exe .
echo.
echo end client-web build 

:: package all-in-one
echo.
echo begin allinone build
cd ..
makensis /DVERSION=%VERSION% /V1 setup.nsi
echo.
echo end allinone build

:end

:: Do some clean-up,
:: return to TOPDIR, and unset script environment vars
:cleanup
cd %TOPDIR%
set POSTGRESQL_MSI=
set OPENERP_NSIS=
set OPENERP_DEMO_DIR=
set TODAY=
set TOPDIR=
set SUBDIR=

pause
::end of script

start->execute type cmd, in the console type:
Cd C:\ openerp\ (enter)
make-allinone.bat trunk 5.0.1-trunk (enter, some minutes)

trunk is the folder which will be created, in which sources and build will
be stocked (you can choose what you want)
5.0.1-trunk is the name for the build (you can choose what you want)

The build setup is stocked in my case, in the folder C:\ openerp\trunk

You can install your openerp allinone setup (uninstall precedent first
naturally)



BUILD OPENERP ALLINONE AND INDEPENDENT SERVER, CLIENT GTK AND CLIENT WEB :

In C:\openerp\make.bat right click modify
File->Save as make-allinone-solo.bat

Delete all, paste, save, read commentary of this :

::beginning of script
:: Disabled/Enable echoing
@echo off

:: Set some script wide variable
set POSTGRESQL_MSI=postgresql-8.3-int.msi
set OPENERP_NSIS=setup.nsi
set OPENERP_DEMO_DIR=demo

:: Get current date (YYYYMMDD)
set TODAY=%DATE:~6,4%%DATE:~3,2%%DATE:~0,2%
:: Save current directory
set TOPDIR=%CD%

:: Set correct a subdirectory for packaging,
:: dont trash the current directory...
set SUBDIR=%1
if "%1"=="" goto usage
if "%2"=="" goto usage
set VERSION=%2

goto create_subdir

:usage
echo "make.bat TITLE_OF_BUILD VERSION"
goto end

:: Prepare sub-directory
:create_subdir
echo Creating subdir %SUBDIR%.
mkdir %SUBDIR%
echo.

echo Copying PostgreSQL installer...
copy /Y %POSTGRESQL_MSI% %SUBDIR%
echo.
echo Copying OpenERP Nullsoft installer script...
copy /Y %OPENERP_NSIS% %SUBDIR%
echo.
echo Copying `demo' files...
mkdir %SUBDIR%\demo
xcopy /E /I /Y %OPENERP_DEMO_DIR% %SUBDIR%\demo
cd %SUBDIR%

:: Get sources from launchpad
:bzr_clone

echo.
echo Downloading OpenERP Server/Development version...
bzr clone lp:~openerp/openobject-server/5.0 server
echo OpenERP Server downloaded !

echo.
echo Downloading OpenERP Client/Development version...
bzr clone lp:~openerp/openobject-client/5.0 client
echo OpenERP Client downloaded !

echo.
echo Downloading OpenERP Web Client/Development version...
bzr clone lp:~openerp/openobject-client-web/5.0 client-web
echo OpenERP Web Client downloaded !
echo pause client web config
::in C:\openerp\trunk\client-web\config\default.cfg delete "#" for line 
::server.socket_host = "127.0.0.1"
::server.socket_port = 8080 (enter to run)
echo type enter to continue
pause 


echo.
echo Downloading OpenERP Addons/Development version...
bzr clone lp:~openerp/openobject-addons/trunk-extra-addons addons
xcopy /E /Y addons\* server\bin\addons\
echo OpenERP Addons downloaded !


:: delete ":" for each line if you want extra-addons
:echo.
:echo Downloading OpenERP extra-addons/Development version...
:bzr clone lp:~openerp-commiter/openobject-addons/trunk extra-addons
:xcopy /E  extra-addons\* server\bin\addons\
:echo OpenERP extra-addons downloaded !


:clean build and dist python file compiled
rmdir /S /Q client-web\win32\build
rmdir /S /Q client-web\build
rmdir /S /Q server\win32\build
rmdir /S /Q server\build
rmdir /S /Q server\win32\dist
rmdir /S /Q server\dist
rmdir /S /Q client\build
rmdir /S /Q client\dist
del /F client\msgfmt.pyc
del /F client\mydistutils.pyc
del /F C:\openerp\trunk\client-web\win32\util.pyc


:packaging

:: package client for allinone
echo.
echo begin client build
cd client
python setup.py --quiet py2exe
makensis /DVERSION=%VERSION% /DALLINONE=1 /V1 setup.nsi
echo.
echo end client build

:: package server for allinone
echo.
echo begin server build
cd ..
cd server\win32
python setup.py --quiet py2exe
cd ..
python setup.py --quiet py2exe
makensis /DVERSION=%VERSION% /DALLINONE=1 /V1 setup.nsi
echo.
echo end server build

:: package client-web for allinone
echo.
echo begin client-web build
cd ..
cd client-web
python win32\setup.py --quiet bdist_wininst 
move win32\openerp-web-setup-* win32\openerp-web-setup-%VERSION%.exe
makensis /DVERSION=%VERSION% /DALLINONE=1 /V1 win32\setup.nsi
move win32\openerp-web-setup-%VERSION%.exe .
echo.
echo end client-web build 

:: package all-in-one
echo.
echo begin allinone build
cd ..
makensis /DVERSION=%VERSION% /V1 setup.nsi
echo.
echo end allinone build



:packaging :: package client
echo.
echo begin client build
cd client
python setup.py --quiet py2exe
makensis /DVERSION=%VERSION%  /V1 setup.nsi
echo.
echo end client build

:: package server for allinone
echo.
echo begin server build
cd ..
cd server\win32
python setup.py --quiet py2exe
cd ..
python setup.py --quiet py2exe
makensis /DVERSION=%VERSION%  /V1 setup.nsi
echo.
echo end server build

:: package client-web for allinone
echo.
echo begin client-web build
cd ..
cd client-web
python win32\setup.py --quiet bdist_wininst 
move win32\openerp-web-setup-* win32\openerp-web-setup-%VERSION%.exe
makensis /DVERSION=%VERSION%  /V1 win32\setup.nsi
move win32\openerp-web-setup-%VERSION%.exe .
echo.
echo end client-web build 

cd ..

copy server\openerp-server-setup-%VERSION%.exe .
copy client\openerp-client-setup-%VERSION%.exe .
copy client-web\openerp-web-setup-%VERSION%.exe .


:end

:: Do some clean-up,
:: return to TOPDIR, and unset script environment vars
:cleanup
cd %TOPDIR%
set POSTGRESQL_MSI=
set OPENERP_NSIS=
set OPENERP_DEMO_DIR=
set TODAY=
set TOPDIR=
set SUBDIR=

pause
::end of script

Save the file 



BUILD SERVER+CLIENT-GTK+CLIENT-WEB INDEPENDANT

In C:\openerp\win-installer-trunk\ make.bat right click modify
File->Save as make-allinone-solo.bat

Delete all, paste, save, read commentary of this :

::beginning of script
:: Disabled/Enable echoing
@echo off

:: Set some script wide variable
set POSTGRESQL_MSI=postgresql-8.3-int.msi
set OPENERP_NSIS=setup.nsi
set OPENERP_DEMO_DIR=demo

:: Get current date (YYYYMMDD)
set TODAY=%DATE:~6,4%%DATE:~3,2%%DATE:~0,2%
:: Save current directory
set TOPDIR=%CD%

:: Set correct a subdirectory for packaging,
:: dont trash the current directory...
set SUBDIR=%1
if "%1"=="" goto usage
if "%2"=="" goto usage
set VERSION=%2

goto create_subdir

:usage
echo "make.bat TITLE_OF_BUILD VERSION"
goto end

:: Prepare sub-directory
:create_subdir
echo Creating subdir %SUBDIR%.
mkdir %SUBDIR%
echo.

echo Copying PostgreSQL installer...
copy /Y %POSTGRESQL_MSI% %SUBDIR%
echo.
echo Copying OpenERP Nullsoft installer script...
copy /Y %OPENERP_NSIS% %SUBDIR%
echo.
echo Copying `demo' files...
mkdir %SUBDIR%\demo
xcopy /E /I /Y %OPENERP_DEMO_DIR% %SUBDIR%\demo
cd %SUBDIR%

:: Get sources from launchpad
:bzr_clone

echo.
echo Downloading OpenERP Server/Development version...
bzr clone lp:~openerp/openobject-server/5.0 server
echo OpenERP Server downloaded !

echo.
echo Downloading OpenERP Client/Development version...
bzr clone lp:~openerp/openobject-client/5.0 client
echo OpenERP Client downloaded !

echo.
echo Downloading OpenERP Web Client/Development version...
bzr clone lp:~openerp/openobject-client-web/5.0 client-web
echo OpenERP Web Client downloaded !
echo pause client web config
::in C:\openerp\trunk\client-web\config\default.cfg delete "#" for line 
::server.socket_host = "127.0.0.1"
::server.socket_port = 8080 (enter to run)
echo type enter to continue
pause 


echo.
echo Downloading OpenERP Addons/Development version...
bzr clone lp:~openerp/openobject-addons/trunk-extra-addons addons
xcopy /E /Y addons\* server\bin\addons\
echo OpenERP Addons downloaded !


:: delete ":" for each line if you want extra-addons
:echo.
:echo Downloading OpenERP extra-addons/Development version...
:bzr clone lp:~openerp-commiter/openobject-addons/trunk extra-addons
:xcopy /E  extra-addons\* server\bin\addons\
:echo OpenERP extra-addons downloaded !


:clean build and dist python file compiled
rmdir /S /Q client-web\win32\build
rmdir /S /Q client-web\build
rmdir /S /Q server\win32\build
rmdir /S /Q server\build
rmdir /S /Q server\win32\dist
rmdir /S /Q server\dist
rmdir /S /Q client\build
rmdir /S /Q client\dist
del /F client\msgfmt.pyc
del /F client\mydistutils.pyc
del /F C:\openerp\trunk\client-web\win32\util.pyc


:packaging

:: package client for allinone
echo.
echo begin client build
cd client
python setup.py --quiet py2exe
makensis /DVERSION=%VERSION%  /V1 setup.nsi
echo.
echo end client build

:: package server for allinone
echo.
echo begin server build
cd ..
cd server\win32
python setup.py --quiet py2exe
cd ..
python setup.py --quiet py2exe
makensis /DVERSION=%VERSION%  /V1 setup.nsi
echo.
echo end server build

:: package client-web for allinone
echo.
echo begin client-web build
cd ..
cd client-web
python win32\setup.py --quiet bdist_wininst 
move win32\openerp-web-setup-* win32\openerp-web-setup-%VERSION%.exe
makensis /DVERSION=%VERSION%  /V1 win32\setup.nsi
move win32\openerp-web-setup-%VERSION%.exe .
echo.
echo end client-web build 

cd ..

copy server\openerp-server-setup-%VERSION%.exe .
copy client\openerp-client-setup-%VERSION%.exe .
copy client-web\openerp-web-setup-%VERSION%.exe .


:end

:: Do some clean-up,
:: return to TOPDIR, and unset script environment vars
:cleanup
cd %TOPDIR%
set POSTGRESQL_MSI=
set OPENERP_NSIS=
set OPENERP_DEMO_DIR=
set TODAY=
set TOPDIR=
set SUBDIR=

pause
::end of script

Save the file as make-solo.bat

NOTICE :

If you don’t change the folder to stock build and sources, (first argument
after make.bat, here : trunk, bazaar don’t download a second time the
sources.

If you want to insert a database in the allinone installer or server follow
this (not tested) :
In the folder C:\...\wininstaller-trunk\trunk\server in the file setup.nsi,
insert this command at the end :
ExecWait '"$PROGRAMFILES\\PostgreSQL4TinyERP\\bin\pg_dump" -d postgres -C
"$PROGRAMFILES\\OpenERP Server\\addons\mydatabase.backup" -U openpg'
IfErrors 0 +2
MessageBox MB_OK "Database Dump Finished"
Type the good PATH, database name and id admin for postgresql(openpg by
default for all in one)

Good Build (be patient)

------------------------
Linux is not Unix, and not Microsoft !!!!!!




-------------------- m2f --------------------

--
http://www.openobject.com/forum/viewtopic.php?p=39926#39926

-------------------- m2f --------------------


_______________________________________________
Tinyerp-users mailing list
http://tiny.be/mailman2/listinfo/tinyerp-users

Reply via email to