Skip to content

Commit

Permalink
Merge pull request #19 from Silmar/master
Browse files Browse the repository at this point in the history
Funciona novamente
  • Loading branch information
danimaribeiro authored Feb 19, 2018
2 parents aeacae8 + faac0b5 commit c23a0cf
Showing 1 changed file with 181 additions and 56 deletions.
237 changes: 181 additions & 56 deletions install_odoo_trustcodebr.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#! /bin/bash

ODOO_VERSION='10'
ODOO_VERSION='11'

echo "Esse script é focado na instalação do odoo V.$ODOO_VERSION"
echo "com o foco em desenvolvimento."
Expand Down Expand Up @@ -53,7 +53,7 @@ sudo apt-get install --no-install-recommends python-libxml2 -y
sudo apt-get install --no-install-recommends libxmlsec1-dev -y
sudo apt-get install --no-install-recommends python-openssl -y
sudo apt-get install --no-install-recommends python-cffi -y

sudo apt-get install --no-install-recommends libxmlsec1-opensslopenssl
echo "==== Instalando dependências do WKHTMLTOX ===="
sudo apt-get install --no-install-recommends zlib1g-dev -y
sudo apt-get install --no-install-recommends fontconfig -y
Expand All @@ -67,63 +67,174 @@ wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.1/wkhtmlt
sudo dpkg -i ~/wkhtmltox-0.12.1_linux-trusty-amd64.deb

echo "==== Instalação dependências pip para os módulos ===="
sudo -H pip install --upgrade pip
sudo -H pip install --upgrade setuptools
sudo -H pip install Babel==1.3
sudo -H pip install Jinja2==2.7.3
sudo -H pip install Mako==1.0.1
sudo -H pip install MarkupSafe==0.23
sudo -H pip install Pillow==2.7.0
sudo -H pip install Python-Chart==1.39
sudo -H pip install PyYAML==3.11
sudo -H pip install Werkzeug==0.9.6
sudo -H pip install argparse==1.2.1
sudo -H pip install decorator==3.4.0
sudo -H pip install docutils==0.12
sudo -H pip install feedparser==5.1.3
sudo -H pip install gdata==2.0.18
sudo -H pip install gevent==1.0.2
sudo -H pip install greenlet==0.4.7
sudo -H pip install jcconv==0.2.3
sudo -H pip install lxml==3.4.1
sudo -H pip install mock==1.0.1
sudo -H pip install ofxparse==0.14
sudo -H pip install passlib==1.6.2
sudo -H pip install psutil==2.2.0
sudo -H pip install psycogreen==1.0
sudo -H pip install psycopg2==2.5.4
sudo -H pip install pyPdf==1.13
sudo -H pip install pydot==1.0.2
sudo -H pip install pyparsing==2.0.3
sudo -H pip install pyserial==2.7
sudo -H pip install python-dateutil==2.4.0
sudo -H pip install python-ldap==2.4.19
sudo -H pip install python-openid==2.2.5
sudo -H pip install pytz==2014.10
sudo -H pip install pyusb==1.0.0b2
sudo -H pip install qrcode==5.1
sudo -H pip install reportlab==3.1.44
sudo -H pip install requests==2.6.0
sudo -H pip install six==1.9.0
sudo -H pip install suds-jurko==0.6
sudo -H pip install vobject==0.6.6
sudo -H pip install wsgiref==0.1.2
sudo -H pip install XlsxWriter==0.7.7
sudo -H pip install xlwt==0.7.5
sudo -H pip install openpyxl==2.4.0-b1
sudo -H pip install boto==2.38.0
sudo -H pip install odoorpc
sudo -H pip install suds_requests
sudo -H pip install pytrustnfe
sudo -H pip install python-boleto
sudo -H pip install python-cnab
sudo -H pip install wheel
sudo -H pip install http://labs.libre-entreprise.org/frs/download.php/897/pyxmlsec-0.3.1.tar.gz

if [ $ODOO_VERSION == '10' ]
then

echo "======== Caso a versão a versão seja odoo 10 ========"
echo "============= Virtualenv 2.7 será criado ============"

mkdir ~/src
cd ~
wget http://www.python.org/ftp/python/2.7.9/Python-2.7.9.tgz
tar -zxvf Python-2.7.9.tgz
cd Python-2.7.9
sudo mkdir /odoopython

sudo ./configure --prefix=/odoopython
sudo make
sudo make install

cd ~/src
wget https://pypi.python.org/packages/d4/0c/9840c08189e030873387a73b90ada981885010dd9aea134d6de30cd24cb8/virtualenv-15.1.0.tar.gz#md5=44e19f4134906fe2d75124427dc9b716
tar -zxvf virtualenv-15.1.0.tar.gz
cd virtualenv-15.1.0/
sudo /odoopython/bin/python setup.py install
mkdir ~/odooenv27
/odoopython/bin/virtualenv ~/odooenv27/ve -p /odoopython/bin/python2.7
source ~/odooenv27/ve/bin/activate
pip install --upgrade pip
pip install --upgrade setuptools
pip install Babel==1.3
pip install Jinja2==2.7.3
pip install Mako==1.0.1
pip install MarkupSafe==0.23
pip install Pillow==2.7.0
pip install Python-Chart==1.39
pip install PyYAML==3.11
pip install Werkzeug==0.9.6
pip install argparse==1.2.1
pip install decorator==3.4.0
pip install docutils==0.12
pip install feedparser==5.1.3
pip install gdata==2.0.18
pip install gevent==1.0.2
pip install greenlet==0.4.7
pip install jcconv==0.2.3
pip install lxml==3.4.1
pip install mock==1.0.1
pip install ofxparse==0.14
pip install passlib==1.6.2
pip install psutil==2.2.0
pip install psycogreen==1.0
pip install psycopg2==2.5.4
pip install pyPdf==1.13
pip install pydot==1.0.2
pip install pyparsing==2.0.3
pip install pyserial==2.7
pip install python-dateutil==2.4.0
pip install python-ldap==2.4.19
pip install python-openid==2.2.5
pip install pytz==2014.10
pip install pyusb==1.0.0b2
pip install qrcode==5.1
pip install reportlab==3.1.44
pip install requests==2.6.0
pip install six==1.9.0
pip install suds-jurko==0.6
pip install vobject==0.6.6
pip install wsgiref==0.1.2
pip install XlsxWriter==0.7.7
pip install xlwt==0.7.5
pip install openpyxl==2.4.0-b1
pip install boto==2.38.0
pip install odoorpc
pip install suds_requests
pip install urllib3
pip install pytrustnfe
pip install python-boleto
pip install python-cnab
pip install wheel

elif [ $ODOO_VERSION == '11' ]
then
echo "======== Caso a versão a versão seja odoo 11 ========"
echo "============= Virtualenv 3.5 será criado ============"

mkdir ~/odooenv35
sudo apt install python3-pip -y
sudo pip3 install virtualenv
cd ~/odooenv35
mkdir envpacks
cd envpacks

virtualenv -p /usr/bin/python3.5 ve
source ve/bin/activate
pip3 install --upgrade pip
pip3 install --upgrade setuptools
pip3 install Babel==1.3
pip3 install Jinja2==2.7.3
pip3 install Mako==1.0.1
pip3 install MarkupSafe==0.23
pip3 install Pillow==2.7.0
pip3 install Python-Chart==1.39
pip3 install PyYAML==3.11
pip3 install Werkzeug==0.9.6
pip3 install argparse==1.2.1
pip3 install decorator==3.4.0
pip3 install docutils==0.12
pip3 install feedparser==5.1.3
pip3 install gdata==2.0.18
pip3 install gevent==1.0.2
pip3 install greenlet==0.4.7
#pip3 install jcconv==0.2.3
#Versão que roda em python3 não está no repo oficial. Git it
git clone https://github.com/ghyde/jcconv
cd jcconv
python setup.py install
cd ..
pip3 install lxml==3.4.1
pip3 install mock==1.0.1
pip3 install ofxparse==0.14
pip3 install passlib==1.6.2
pip3 install psutil==2.2.0
pip3 install psycogreen==1.0
pip3 install psycopg2==2.5.4
pip3 install pyPdf==1.13
pip3 install pydot==1.2.4
pip3 install pyparsing==2.0.3
pip3 install pyserial==2.7
pip3 install python-dateutil==2.4.0
pip3 install python-ldap==3.0.0b4
pip3 install python-openid==2.2.5
pip3 install pytz==2014.10
pip3 install pyusb==1.0.0b2
pip3 install qrcode==5.1
pip3 install reportlab==3.1.44
pip3 install requests==2.6.0
pip3 install six==1.9.0
pip3 install suds-jurko==0.6
pip3 install vobject==0.9.5
#pip3 install wsgiref==0.1.2 Already included by default(python 3)
pip3 install XlsxWriter==0.7.7
pip3 install xlwt==1.3.0
pip3 install openpyxl==2.4.0-b1
pip3 install boto==2.38.0
pip3 install odoorpc
#pip3 install suds_requests
git clone https://github.com/armooo/suds_requests
cd suds_requests/
python setup.py install
cd ..
pip3 install urllib3
#pip3 install pytrustnfe
git clone https://github.com/danimaribeiro/PyTrustNFe
cd PyTrustNFe/
python setup.py install
cd ..
pip3 install python3-boleto
pip3 install python3-cnab
pip3 install wheel

fi



echo ">>> pip e seus requerimentos estão instalados. <<<"

echo "Clonando repositório oficial Odoo no GitHub. Isso pode demorar um bom tempo."
echo "Se sua internet é lenta, recomenda-se tomar um café enquanto aguarda."
git clone https://github.com/odoo/odoo.git ~/odoo
git clone --depth 1 -b $ODOO_VERSION.0 https://github.com/odoo/odoo.git ~/odoo

echo "Terminando o arquivo de configuração, quase lá."
rm ~/odoo/odoo-config
Expand All @@ -143,7 +254,7 @@ echo "db_password = 123" >> ~/odoo/odoo-config

echo "Clonando repositório oficial dos módulos Odoo Brasil no GitHub."
echo "Agora falta pouco."
git clone https://github.com/Trust-Code/odoo-brasil.git ~/odoo-brasil
git clone -b $ODOO_VERSION.0 https://github.com/Trust-Code/odoo-brasil.git ~/odoo-brasil

echo "==== Instalação e configuração Odoo Brasil completa ===="
echo "---- PostgreSQL ---- "
Expand All @@ -155,3 +266,17 @@ echo "Pasta de Addons: addons, ~/odoo/addons, ~/odoo-brasil"
echo "========================================================"
echo "A instalação está completa !"
echo "Obrigado por usar este script !!!"
echo "iniciar o sistema com os comandos"
if [ $ODOO_VERSION == '10' ]
then
echo "source ~/odooenv27/ve/bin/activate"
echo "cd ~/odoo"
echo "git checkout $ODOO_VERSION.0"
echo "./odoo-bin --config=odoo-config"
elif [ $ODOO_VERSION == '11' ]
then
echo "source ~/odooenv35/ve/bin/activate"
echo "cd ~/odoo"
echo "git checkout $ODOO_VERSION.0"
echo "./odoo-bin --config=odoo-config"
fi

0 comments on commit c23a0cf

Please sign in to comment.