1DESCRIPTION 2=========== 3 4PRIMA is a general purpose extensible graphical user interface toolkit with a 5rich set of standard widgets and an emphasis on 2D image processing tasks. A 6Perl program using PRIMA looks and behaves identically on X11 and Win32. 7 8PREREQUISITES 9============= 10 11Debian/Ubuntu 12------------- 13 14For easy setup, run this: 15 16 apt-get install libgtk2.0-dev libgif-dev libjpeg-dev libtiff-dev libxpm-dev 17 libwebp-dev libfribidi-dev libharfbuzz-dev 18 19OpenSUSE 20-------- 21 22 zypper install gtk2-devel giflib-devel libjpeg-devel libtiff-devel 23 libXpm-devel libXrandr-devel libXcomposite-devel libXcursor-devel 24 libfribidi-devel libwebp-devel libharfbuzz-devel 25 26Solaris 27------- 28 29Download and install Oracle Developer Studio as perl there is compiled with cc, not gcc. 30 31Cygwin 32------ 33 34- install apt-cyg: 35 36 wget https://raw.githubusercontent.com/transcode-open/apt-cyg/master/apt-cyg -O /usr/bin/apt-cyg 37 38 chmod +x /usr/bin/apt-cyg 39 40- install prerequisites: 41 42 apt-cyg install libgtk2.0-devel libfribidi-devel libgif-devel libjpeg-devel libtiff-devel libXpm-devel 43 libwebp-devel libharfbuzz-devel 44 45 46Graphic libraries 47----------------- 48 49Prima can use several graphic libraries to handle image files. Compiling Prima 50with at least one library, preferably for GIF files is strongly recommended, 51because internal library images are stored in GIFs. Support for the following 52libraries can be compiled in on all platforms: 53 54 - libXpm 55 - libpng 56 - libjpeg 57 - libgif 58 - libtiff 59 - libwebp,libwebpdemux,libwebpmux 60 61Win32 62----- 63 64Modern Strawberry perl come with all of these libraries already, so nothing 65specific needs to be done. However for the older distributions, or ActiveState, 66or custom builds, CPAN contains binary distributions that can be installed just 67for this purpose: 68 69 - http://search.cpan.org/~karasik/Prima-codecs-win32/ 70 - http://search.cpan.org/~karasik/Prima-codecs-win64/ 71 72it should work for all MSVC and GCC compilers and for native, 73cygwin, and mingw/strawberry perl runtimes. 74 75MacOSX 76------ 77 78You'll need homebrew, XQuartz, and a set of extra libraries. 79 80- install homebrew: 81 82 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" 83 84- install XQuartz: 85 86 brew install --cask xquartz 87 88- install support libraries: 89 90 brew install libiconv libxcomposite libxrandr libxcursor libxft fribidi fontconfig 91 freetype giflib gtk+ harfbuzz jpeg libpng libtiff webp libxpm 92 93Note: if Prima crashes in libxft, do this: remove libxft and install custom built xorg libraries, either very minimal 94 95 brew install dk/x11/xorg-macros dk/x11/libxft 96 97or linux-homebrew's (not tested) 98 99 brew tap linuxbrew/xorg 100 101 brew install linuxbrew/xorg/libxft 102 103Bidirectional input and complex scripts 104--------------------------------------- 105 106To support bi-directional unicode text input and output you'll need the fribidi 107library. Additionally for unix builds you'll need harfbuzz library for output 108of complex scripts and font ligature support. 109 110Prima can compile and work fine without these, but the support of these 111features will be rather primitive. 112 113SOURCE DISTRIBUTION INSTALLATION 114================================ 115 116Create a makefile by running Makefile.PL using perl and then run make ( or 117gmake, or nmake for Win32): 118 119 perl Makefile.PL 120 make 121 make test 122 make install 123 124If 'perl Makefile.PL' fails, the compilation history along with errors can be 125found in makefile.log. 126 127If make fails with message 128 129 ** No image codecs found 130 131that means you don't have image libraries that Prima supports in your path. 132See PREREQUISITES section. 133 134If some of the required libraries or include files can not be found, 135INC=-I/some/include and LIBS=-L/some/lib semantics should be used to tell 136Makefile.PL about these. Check ExtUtils::MakeMaker for more. 137 138GTK3/GTK2 139--------- 140 141It is recommended to build Prima with GTK3/GTK2 on X11 installations, 142because in that case Prima will use standard GTK fonts, colors, and file dialogs. 143By default Prima tries to build with it, but if you don't want it, run 144 145 perl Makefile.PL WITH_GTK2=0 WITH_GTK3=0 146 147BINARY DISTRIBUTION INSTALLATION 148================================ 149 150Available only for MSWin32. Please use installation from source for 151the other platforms. 152 153To install the toolkit from the binary distribution run 154 155 perl ms_install.pl 156 157You have to patch Prima::Config.pm manually if you need to compile 158prima-dependent modules. 159 160USAGE EXAMPLES 161============== 162 163Try running the toolkit examples, by default installed in 164INSTALLSITEARCH/Prima/examples directory ( find it by running perl 165-V:installsitearch ). All examples and programs included into the distribution 166can be run either by their name or with perl as argument - for example, 167..../generic or perl ..../generic . ( perl ..../generic.bat for win32 ) 168 169Typical code starts with 170 171 use Prima qw(Application); 172 173and ends with 174 175 run Prima; 176 177, the event loop. Start from the following code: 178 179 use Prima qw(Application Buttons); 180 181 new Prima::MainWindow( 182 text => 'Hello world!', 183 size => [ 200, 200], 184 )-> insert( Button => 185 centered => 1, 186 text => 'Hello world!', 187 onClick => sub { $::application-> close }, 188 ); 189 190 run Prima; 191 192Or, alternatively, start the VB program, the toolkit visual builder. 193 194MORE INFORMATION 195================ 196 197The toolkit contains set of POD files describing its features, and the 198programming interfaces. Run 'podview Prima' or 'perldoc Prima' command to 199start with the main manual page. 200 201Visit http://www.prima.eu.org/ for the recent versions of the toolkit. You can 202use github.com/dk/Prima to keep in touch. The mailing list on the toolkit is 203available, you can ask questions there. See the Prima homepage for details. 204 205COPYRIGHT 206========= 207 208(c) 1997-2003 The Protein Laboratory, University of Copenhagen 209 210(c) 1997-2021 Dmitry Karasik 211 212AUTHOR 213====== 214 215 - Dmitry Karasik <dmitry@karasik.eu.org> 216 217CREDITS 218======= 219 220 - Anton Berezin 221 - Vadim Belman 222 - David Scott 223 - Teo Sankaro 224 - Kai Fiebach 225 - Johannes Blankenstein 226 - Mike Castle 227 - H.Merijn Brand 228 - Richard Morgan 229 - Kevin Ryde 230 - Chris Marshall 231 - Slaven Rezic 232 - Waldemar Biernacki 233 - Andreas Hernitscheck 234 - David Mertens 235 - Gabor Szabo 236 - Fabio D'Alfonso 237 - Rob "Sisyphus" 238 - Chris Marshall 239 - Reini Urban 240 - Nadim Khemir 241 - Vikas N Kumar 242 - Upasana Shukla 243 - Sergey Romanov 244 - Mathieu Arnold 245 - Petr Pisar 246 - Judy Hawkins 247 - Myra Nelson 248 - Sean Healy 249 - Ali Yassen 250 - Maximilian Lika 251 - kmx 252 - Mario Roy 253 254