Recompiling WAPT from source¶
Building the WAPT Agent for Windows¶
WAPT requirements¶
Python environment¶
Python 2.7.13;
client python libraries in
requirements.txt
;server python libraries in
requirements-server.txt
;
Lazarus environment¶
WAPT relies on the following third-party freepascal/ lazarus librairies:
pl_indy: https://www.pilotlogic.com/sitejoom/index.php/115-wiki/ct-packages/networking/271-pl-indy;
superobject: https://github.com/hgourvest/superobject;
virtualtrees: https://www.pilotlogic.com/sitejoom/index.php/85-wiki/codetyphon-studio/ct-packages/301-pl-virtualtrees and https://github.com/blikblum/VirtualTreeView-Lazarus;
python4delphi: https://github.com/pyscripter/python4delphi;
delphizmq: https://github.com/bvarga/delphizmq;
thmtlport: https://svn.code.sf.net/p/lazarus-ccr/svn/components/thtmlport/;
Tranquil IT packages¶
pltis_python4delphi: https://github.com/tranquilit/pltis_python4delphi;
pltis_utils: https://github.com/tranquilit/pltis_utils: subset of libraries from JEDI JCL project adapted to lazarus;
pltis_sogrid: https://github.com/tranquilit/pltis_sogrid;
pltis_superobject: https://github.com/tranquilit/pltis_superobject;
Creating a development environment with virtualenv¶
With a clean Windows installed:
install python2.7.15 from https://www.python.org/ftp/python/2.7.15/python-2.7.15.msi;
upgrade python-setuptools:
c:\python27\python -m pip install -U pip setuptools
create a development environment with
virtualenv
;mkdir c:\tranquilit git clone git@github.com:tranquilit/WAPT.git (ou git clean -fxd ...) cd c:\tranquilit\wapt init_workdir.bat
Installing the WAPT development environment¶
On a clean Windows 7 install as a Local Administrator:
install the WAPT agent from https://srvwapt.mydomain.lan/wapt/waptagent.exe;
deactivate UAC;
show hidden files and file extensions;
increase the width of the CMD windows and flip to quick edit mode;
Installing Lazarus¶
wapt-get install tis-pyscripter tis-tortoisegit tis-7zip tis-python27 tis-notepadplusplus tis-firefox tis-putty tis-lazarus tis-openssh tis-signtool
wget https://www.sqlite.org/2018/sqlite-dll-win32-x86-3250200.zip
unzip sqlite3.dll dans C:\Windows\SysWOW64
md c:\tranquilit
REM git.exe clone --recurse-submodules "https://github.com/tranquilit/WAPT.git" "C:\tranquilit\wapt"
git.exe clone --recurse-submodules "https://github.com/tranquilit/WAPT.git" "C:\tranquilit\wapt"
REM git pull --recurse-submodules=yes --ff-only)
cd \tranquilit\wapt
init_workdir.bat
git clone https://github.com/tranquilit/pltis_indy.git c:\tranquilit\pltis_indy
git clone https://github.com/tranquilit/pltis_utils.git c:\tranquilit\pltis_utils
git clone https://github.com/tranquilit/pltis_sogrid.git c:\tranquilit\pltis_sogrid
git clone https://github.com/tranquilit/pltis_superobject.git c:\tranquilit\pltis_superobject
git clone https://github.com/tranquilit/pltis_python4delphi.git c:\tranquilit\pltis_python4delphi
git clone https://github.com/tranquilit/pltis_virtualtrees.git c:\tranquilit\pltis_virtualtrees
git clone https://github.com/tranquilit/pltis_virtualtreesextra.git c:\tranquilit\pltis_virtualtreesextra
git clone https://github.com/tranquilit/pltis_dcpcrypt.git c:\tranquilit\pltis_dcpcrypt
git clone https://github.com/tranquilit/pltis_luipack.git c:\tranquilit\pltis_luipack
git clone https://github.com/tranquilit/pltis_synapse.git c:\tranquilit\pltis_synapse
c:\lazarus\lazbuild.exe --add-package c:\tranquilit\pltis_dcpcrypt\dcpcrypt_laz.lpk
c:\lazarus\lazbuild.exe --add-package c:\tranquilit\pltis_indy\indylaz.lpk
c:\lazarus\lazbuild.exe c:\tranquilit\pltis_utils\pltis_utils.lpk
c:\lazarus\lazbuild.exe c:\tranquilit\pltis_superobject\pltis_superobject.lpk
c:\lazarus\lazbuild.exe --add-package c:\tranquilit\pltis_virtualtrees\pltis_virtualtrees.lpk
c:\lazarus\lazbuild.exe --add-package c:\tranquilit\pltis_virtualtreesextra\pltis_virtualtreesextra.lpk
c:\lazarus\lazbuild.exe --add-package c:\tranquilit\pltis_sogrid\pltis_sogrid.lpk
c:\lazarus\lazbuild.exe --add-package c:\tranquilit\pltis_dcpcrypt\dcpcrypt_laz.lpk
c:\lazarus\lazbuild.exe c:\tranquilit\pltis_synapse\laz_synapse.lpk
c:\lazarus\lazbuild.exe --add-package c:\tranquilit\pltis_luipack\luicomponents\luicomponents.lpk
c:\lazarus\lazbuild.exe --add-package c:\tranquilit\pltis_luipack\luicomponents\luicomponents.lpk
c:\lazarus\lazbuild.exe --add-package C:\tranquilit\pltis_python4delphi\PythonForDelphi\Components\p4dlaz.lpk
c:\lazarus\lazbuild.exe --add-package C:\lazarus\components\anchordocking\design\anchordockingdsgn.lpk
c:\lazarus\lazbuild.exe --build-ide=
c:\lazarus\lazbuild.exe c:\tranquilit\wapt\wapt-get\pltis_wapt.lpk
REM depending on version, change community to enterprise
waptpython build_exe.py community
Installing the server environment on Windows¶
cd \tranquilit\wapt
waptpython waptserver\winsetup.py all
Creating the InnoSetup installers¶
install Innosetup from https://jrsoftware.org/download.php/ispack-unicode.exe
The .iss
files are located in C:\tranquilit\wapt\waptsetup
;
The waptsetup installer includes the python libraries, the command line tool wapt-get, the local webservice waptservice, the packaging tool and the WAPT console waptconsole.
The file waptserver.iss
allows to build an installer that includes
a Nginx web server in front and the Flask webservice waptserver.py.
The waptstarter
installer only includes the local webservice and
the command line tool wapt-get. It does not include the WAPT console
waptconsole, nor the packaging tools.
.
or using the command line:
"C:\Program Files (x86)\Inno Setup 5\ISCC.exe" C:\tranquilit\wapt\waptsetup\waptsetup.iss
The installer’s global parameters are defined with #define in the file header.
If you do not sign the installers, you may comment
the lines #define signtool ..
.
Building the WAPT Agent for MacOS¶
Generating the agent package¶
if you do not have access to the sudo command, you’ll need to enable the root user;
from the root of the WAPT directory, navigate to waptservice/pkg;
execute the createpkg script with administrator rights;
sudo ./createpkg.py
It may ask for additional software (the Command Line Developer Tools) and install them after a prompt which you should answer Yes to;
the agent package should have been generated, under a name along the lines of
tis-waptagent-1.7.6.6550-tismacos-fdc24bca.pkg
;
Installing the agent package¶
execute the following command on your MacOS:
sudo installer -pkg tis-waptagent*.pkg -target /
If the installation is successful, you should have the wapt files in
/opt
and access to the wapt, wapt-get,
waptpython and waptservice commands.
the agent should launch at the next reboot, but you probably want to start it right away with the following command:
sudo launchctl load -w /Library/LaunchDaemons/wapt.plist
Building the WAPT Agent for Linux¶
Building the environment on Debian Linux¶
mkdir ~/tranquilit/
cd ~/tranquilit/
git clone git@github.com:tranquilit/WAPT.git
cd ~/tranquilit/wapt/waptserver/deb
python createdeb.py
cd ~/tranquilit/wapt/waptrepo/deb
python createdeb.py