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

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