Compilation of Ultracopier

From Ultracopier wiki
Jump to: navigation, search

If this page don't helpm take look to my compilation chain: https://github.com/alphaonex86/Ultracopier/tree/master/tools/to-pack

Prepare

Drop the debug

The debug mode is very expensive for resources, you can disable it by:

find -name "Variable.h" -exec sed -i "s/#define ULTRACOPIER_DEBUG/\/\/#define ULTRACOPIER_DEBUG/g" {} \;
find -name "Variable.h" -exec sed -i "s/#define ULTRACOPIER_PLUGIN_DEBUG/\/\/#define ULTRACOPIER_PLUGIN_DEBUG/g" {} \;
find -name "Variable.h" -exec sed -i "s/#define ULTRACOPIER_PLUGIN_DEBUG_WINDOW/\/\/#define ULTRACOPIER_PLUGIN_DEBUG_WINDOW/g" {} \;

Install the tool to compil if needed

ubuntu

sudo apt-get install build-essential gcc automake qt5-qmake liblzma-dev qttools5-dev qt5-default qttools5-dev-tools

debian

sudo apt-get install build-essential gcc automake qt5-qmake liblzma-dev qttools5-dev qt5-default qttools5-dev-tools

See: Compilation of UltraCopier on Debian 8

Compilation

Compile the .ts file into .qm

You need use:

 lrelease lang/en.ts;lrelease lang/fr.ts;lrelease lang/es.ts

And lrelease on any .ts to generate the .qm missing.

This commande should work for linux:

 find ./ -name '*.ts' -exec lrelease {} \;

Compile the binary

To compil the main application, do in console:

qmake [desired version].pro;make

For example:

qmake ultracopier-all-in-one-direct.pro;make

For the plugin

If not static version or ultracopier-all-in-one-direct.pro (static version too)

Do the same as the main application above.

Assemble (deprecated)

Into informations.xml, replace:

<architecture>windows-x86</architecture>

By (or you platform code found into platform.h):

<architecture>linux-x86_64-pc</architecture>

Assemble this structure into search path (~/.config/Ultracopier/, near the binary, /usr/share/ultracopier/, /usr/lib/ultracopier/), given for linux (remplace .so by .dll or .dylib if needed):

CopyEngine/Ultracopier/informations.xml
CopyEngine/Ultracopier/Languages/fr/translation.qm
CopyEngine/Ultracopier/libcopyEngine.so
Themes/Oxygen/informations.xml
Themes/Oxygen/Languages/fr/translation.qm
Themes/Oxygen/libinterface.so
fr/translation.qm
fr/informations.xml
fr/flag.png
Listener/catchcopy-v0002/informations.xml
Listener/catchcopy-v0002/liblistener.so
SessionLoader/KDE4/informations.xml
SessionLoader/KDE4/libsessionLoader.so

For debian

From a source Debian package [1][2] using dpkg-buildpackage or a wrapper around it that from a git repo of an unpacked source Debian package [3] creates a source Debian package and build it in a clean Debian environment.

  1. http://deb.debian.org/debian/pool/main/u/ultracopier/ultracopier_1.4.0.5-1.dsc example:
 -----BEGIN PGP SIGNED MESSAGE-----
 Hash: SHA256
 
 Format: 3.0 (quilt)
 Source: ultracopier
 Binary: ultracopier
 Architecture: any
 Version: 1.4.0.4-1
 Maintainer: Thomas Preud'homme <robotux@debian.org>
 Homepage: http://ultracopier.first-world.info/
 Standards-Version: 4.1.3
 Vcs-Browser: https://salsa.debian.org/debian/ultracopier
 Vcs-Git: https://salsa.debian.org/debian/ultracopier.git
 Build-Depends: debhelper (>= 11), qtbase5-dev, kdelibs5-dev, qt5-qmake, qttools5-dev-tools
 Package-List:
  ultracopier deb utils optional arch=any
 Checksums-Sha1:
  6aca50dcc738634c61cc7265400e902cb49e018d 637352 ultracopier_1.4.0.4.orig.tar.xz
  000947fd438eb403b9a60e81523f33901a90a0f4 5064 ultracopier_1.4.0.4-1.debian.tar.xz
 Checksums-Sha256:
  6672dda5bdc49da3cb5e41d5e40045d8c75880dd3ab75448141e32a642699dc1 637352 ultracopier_1.4.0.4.orig.tar.xz
  dc1372c6ee039e5c3c4c919766235ac6763eef2428d413ec246624073a3f7e37 5064 ultracopier_1.4.0.4-1.debian.tar.xz
 Files:
  5bb089fc86cc6a7c18437899f02dd3f3 637352 ultracopier_1.4.0.4.orig.tar.xz
  6f9b4a68271d67eb91fb94828e7d6c25 5064 ultracopier_1.4.0.4-1.debian.tar.xz
 
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAEBCAAdFiEEXzX2e6+ottWBygjr0AOFL71SUp4FAlqYhBgACgkQ0AOFL71S
 Up4g1xAAp+6w+vJUdSBb7Wz+lzoV6P0DAMWM9OiQGmCLGol8M8oQKq7dFcYwcd3z
 Ej6nr5E8PTFsAUpbSf0KNZ+SZ9prhlg16KVIzvjkZgotSvkOoXJ9nYVfdrI99Jlj
 SbvFfnKZa2OpMvlo3JX3o6NMovbJZMjtDuQKuvH20ASPOspKPpDINlpnDRPnpaFR
 c+mdT9W7xoNLXojpbqiOSTkyiuGfG5fBOk1cqn4/e+OSb0DOApKXE+uPyZAzWcIz
 Mt1fOm1ooommJ9tEYdOSEK1K3eUDZnJhMx6vqIT3UJ3nh+kehCGZRx/2U4chj9Q9
 uzYcxEMV/GmTLANWBNXbrCdGkfUyA2c8DTu4RTS6jT9D2nTffrbt6lgVsoCTzaj9
 nhuxEiObWrzTC1UrzuB6DVtNRwNfz/wZ0iorRigDxhvKlax3EJ+DryiSo1sYX5XK
 KxBibVlwdTXXkgHYGBPyWVghPzMtxlcyKwnljqL6Zc3IoN0GWnce0TGY69FqqSoO
 71H5HI3MfivTch155ZxhwQJnAxJLtlWMfdjOmfk8rOK1xeCgK4aF7qJUi61BTvgH
 d8zcpP3UO65LVl8vsr+4aC26JSQJDIphd6EDn0djGp4/drHC5OxwyEM70KBhL4o8
 K89/fgWPMb4Apb07Lb25jqjt6C39GRxj9jM4jfgAVG6Wl3cdgQo=
 =NY8E
 -----END PGP SIGNATURE-----
  1. a source Debian package is (usually) made of 3 files, a .dsc that describe the other 2 files, a .debian.tar.* that contains the debian packaging and a .orig.tar.* which is the source tarball that upstream provide
  2. https://salsa.debian.org/debian/ultracopier (git repository)