With ArahPaint4, easy things remain easy, while complicated ones remain impossible ;-)
To compile ArahPaint4, you will need a C and C++ compiler and development environment for:
After uncompressing the source files with command
tar -jxf apaint4.1f.tar.bz2
you will need the edit one configuration file with a text editor of your choice.
xedit apaint4.1f/main/makeRelease
In that file, you need to edit the line
export QMAKESPEC=/home/dusan/apaint4.1f/main/default
so that it will reference the directory in which you have placed the source. You need to replace /home/dusan with your development directory.
You may also change the line
make -j 4
so that the number after -j reflects the number of CPU cores of your computer. Your compilation will be much faster in parallel.
Later, if you wish you can also change the file
makeReleaseIcc (if you use Intel C/C++ compiler) or makeDebug (if you wish to make a version with debug symbols).
This was the only way we could customize compile Qt environment, without requiring root permissions.
The rest should be easy.
The easiest way to build ArahPaint4 is to type
./makeAll
in apaint4 directory.
If all goes well, you should be able to type
cd main
./apaint
and be able to run the program.
If it fails, here are the steps involved:
cd into each of the library directories
llib
iolib
plib
and type make in each of those directories.
Then go in the main directory and type
makeClean
to clean up the garbage from any previous build, and type
makeRelease
to compile the whole ArahPaint4 program.
If you wish, and know how to configure the beast, you can also
use Qt designer to compile and debug the program.
On OpenSuse 10.3, you can run the Qt designer with command
/usr/lib/qt3/bin/designer
If ArahPaint4 runs correctly, and you want to use your own
version, it is best if you just make a link to the desktop to
the script
./main/apaint
Due to some strange bug in qt3 library, the qt library shipped with OpenSUSE 11.0 or 11.1, program runs, and mostly works, but drawing operations (draw line, circle, rectangle), do not work.
In order to fix this problem, you need to take the qt library from OpenSUSE 10.3, and it will work. Copy the file libqt-mt.so.3 to main/common/lib, so program will use this library and it will start working correctly.
| main/msg/*.msg | all text files for different languages, all texts are UTF8 encoded |
|---|---|
| main/src/arahpaint4 | program's executable |
| main/apaint | script to run the program |
| main/common/icons | directory with all the icons needed by the program (many are also from ArahWeave). All icons need to be 32 bit PNG with alpha channel transparency. |
| main/common/lib/libAload.so | library for all file formats for loading |
| main/common/lib/libAprint.so | library for printing and saving all supported image formats |
| main/common/lib/libAiconio.so | library which handles creation of icons for image browsing |
| main/common/aspawngp | program to print via gimp-print as a separate process |
| main/common/agutenp | program to print via gutenprint as a separate process |
| main/common/profile/screen | screen color profile, unused in ArahPaint4 |
ArahPaint4 also reads the
.arahne
configuration file from the user's home directory.
If you use ArahWeave DEMO, you will already have it in place and you do not need to worry about anything. Only ArahWeave can write the .arahne configuration file, to avoid confusion of several programs writing settings at the same time. If you wish to configure ArahPaint4 to your defaults, but you do not have ArahWeave, you will need to edit .arahne file by hand. Here is a sample contents of .arahne file, which you need to place at the home directory:
#MESSAGES_FILE=eng.txt | choose the program language: chi, eng, fin, fre, ger, ita, slo, spa, tha, tur | |
#PRINTER_XDPI=1440000 | printer x dpi x 1000 | |
#PRINTER_YDPI=720000 | printer y dpi x 1000 | |
#PRINTER_TYPE=StylusR200 (gimp-print) | selected printer name | |
#PRINT_LEFT_BORDER=3.00 | left print border in mm | |
#PRINT_UPPER_BORDER=3.00 | upper print border in mm | |
#PRINT_WIDTH=203.00 | print width in mm | |
#PRINT_HEIGHT=279.00 | print height in mm | |
#PATH_IMAGES=/home/capdam/data/img | change default image directory | |
#METRIC_SYSTEM=1 | do we prefer metric or imperial system (for ruler) | |
#PRINT_COMMAND=/usr/bin/lpr -o raw -Plp -#%d | command to send the binary print file to printer | |
#CLEAR_ICON_CACHE_DAYS=100 | after how many days of inactivity should unused icons be cleared from icon cache | |
#RULER_ON=1 | should the program open with visible ruler or not | |
#PRINTER_NAME_PRINTCAP=StylusR220 | the printer name of selected printer from printcap | |
#FONT_SMALL_PT=80 | small screen font size (in points) | |
#FONT_NORMAL_PT=100 | normal screen font size (in points) | |
#FONT_SCALE=-*-helvetica-medium-r-normal-- | name of screen font, when antialiased fonts are not used | |
#FONT_SCALE_PRINT=-*-utopia-bold-r-normal-- | name of print font, when antialiased fonts are not used | |
#XFT_STATUS=1 0 0 | enable antialiased fonts, bold, italic | |
#FONT_XFT=Sans | antialiased font name | |
#SCREEN_WIDTH_MM=408 | width of the screen in mm | |
#SCREEN_HEIGHT_MM=307 | height of the screen in mm | |
#SCREEN_WIDTH_PIXELS=1600 | horizontal screen pixels | |
#SCREEN_HEIGHT_PIXELS=1200 | vertical screen pixels | |
#OPEN_WITH_BROWSE=0 | should the program immediately open with browse window to load image | |
#BROWSE_WITH_FILTER=1 | should filter fields be enabled by default on browse window | |
#DEF_SIZE_MAIN=1541 1315 | default size of main window | |
#DEF_SIZE_IMAGE_BROWSE=1366 955 | default size of image browse window | |
#USE_SHARED_MEMORY=1 | should we use MIT SHM extension to get faster refreshes. Users on Mac OSX need to disable it in order for program to work. | |
#HIDE_SAVE_MENU=0 | should we hide Save menu and leave just Save as... so people do not overwrite their files by mistake |
The original ArahWeave's .arahne configuration file contains many
more options (about 200), but only the ones listed above are used by ArahPaint4.
If you don't want to run ArahWeave in order to make a configuration file automatically by using Files > Save setup from ArahWeave,
you can take the sample.arahne file from the distribution, copy it to the home directory and rename it to .arahne
Please provide the image which manifests the bug, and step by step instructions to reproduce the bug.
If you want to debug a problem more in detail, you can
compile a debug version by typing
cd main
./makeClean
./makeDebug
Then you can run the program in ddd debugger by typing
./debug
This is is most useful if you have a core dump, which
you are able to reproduce, and you want to check where
in the source does it happen, and what is the state of the variables
at that moment.
If you suspect a small memory overwrite or a subtle bug
which does not manifest in immediate crash, you can
also try running the program with valgrind by typing
./grind
This will give you positions of errors in the source,
with descriptions of the errors. It is especially useful
for memory leaks and memory overwrites. But program runs
much slower.
Obviously, you need to have ddd or valgrind installed to use the respective tools.
Good luck in compiling,
Arahne development team