Release Notes for p4thumb, The Perforce thumbnail generator GA Release 2008.1 July 22, 2008 The Perforce thumbnail daemon creates thumbnails of graphics files managed by Perforce and stores the thumbnails in the server. P4V displays the thumbnails in the right pane when you choose View>Show Files As>Thumbnails. P4V does not communicate directly with the thumbnail daemon but rather obtains thumbnails from the server. By default, P4V displays thumbnails for image files in the workspace. P4V can also display thumbnails that have been stored on the server by the thumbnail generator (p4thumb). When you start the thumbnail daemon against a server for the first time, it creates thumbnails for all graphics file versions in its client view. When new versions of images are added to the depot, the thumbnail daemon adds thumbnails for them. To avoid affecting Perforce server performance, run p4thumb on a machine other than the server machine. The thumbnail daemon can communicate with Perforce servers on any other platform, as long as the server is accessible through the network. This README file is intended for Perforce administrators who need to configure, start and stop the Perforce thumbnail daemon (p4thumb). p4thumb can create thumbnails for the following file formats: * PSD (Photoshop) * MB (Maya) * MAX (3ds Max) * TGA * BMP * GIF * JPEG * MNG * PBM * PGM * PNG * PPM * XBM * XPM Requirements The 32-bit version of p4thumb, the Perforce thumbnail generator, runs on: * Linux 2.6.4 kernel * Windows 2000, Windows XP, Windows Server 2003, and Windows Vista * FreeBSD 5.4 and FreeBSD 6.0 for X86 * Solaris 10 for X86 and Solaris 10 SPARC The 64-bit version of p4thumb, the Perforce thumbnail generator, runs on: * Linux 2.6.4 kernel * FreeBSD 5.4 and FreeBSD 6.0 for x64 p4thumb 2008.1 works with a Perforce Server at Release 2005.1 or higher. System Requirements (disk space) Thumbnail generation p4thumb requires enough disk space to (temporarily) hold the largest set of image files you have (or plan to ) submit in a single changelist. For best performance, it is advisable to run p4thumb on a machine that has enough RAM to hold the largest image in memory. Having less RAM slows down thumbnail generation, but has no other side effects. When you run p4thumb, the Perforce server requires more disk space to store thumbnails. To calculate the approximate disk space usage, create a client specification that maps the image files for which you want thumbnails, then obtain the number of revisions for those files by issuing the following command: p4 files -a //image-client/... | wc Multiply the number of revisions by 40 to get the number of kilobytes of storage the server needs. This value is a worst-case estimate. p4thumb generates thumbnails as .png files, which compress best when images are simple. The complexity of your images has significant impact on the amount of disk space that PTD consumes. Checkpoints and journals The thumbnails are stored in both the journal and checkpoint files in hexidecimal format. Checkpointing, restoring from checkpoints, and journalling run more slowly as a result, and the resulting files are larger, so ensure that your server machine has adequate disk space. Running p4thumb does not noticeably slow the Perforce server down, though the retrieval and display of thumbnails does have some effect on P4V performance. Installation p4thumb does not need to run on the same machine as the Perforce Server, though it does require network access to the machine where the server runs. To avoid affecting server performance, run p4thumb on another machine. Windows 1. Download the p4thumb zip file from the Perforce web site downloads page. 2. Unzip the file on the machine where you intend to run it. 3. In the unzipped folder run vcredist_x86.exe to install the Visual C++ 2005 libraries. 4. On the server where your image files reside, create a client specification for p4thumb that maps only the files for which you want thumbnails. For example, this view maps all of the image formats that Qt supports, plus formats for Perforce created plugins to a client named 'p4thumb' (change this to your dedicated client name): //depot/....ppm //p4thumb/....ppm //depot/....PPM //p4thumb/....PPM //depot/....bmp //p4thumb/....bmp //depot/....BMP //p4thumb/....BMP //depot/....jpg //p4thumb/....jpg //depot/....JPG //p4thumb/....JPG //depot/....bpm //p4thumb/....bpm //depot/....BPM //p4thumb/....BPM //depot/....gif //p4thumb/....gif //depot/....GIF //p4thumb/....GIF //depot/....pgm //p4thumb/....pgm //depot/....PGM //p4thumb/....PGM //depot/....png //p4thumb/....png //depot/....PNG //p4thumb/....PNG //depot/....mng //p4thumb/....mng //depot/....MNG //p4thumb/....MNG //depot/....xbm //p4thumb/....xbm //depot/....XBM //p4thumb/....XBM //depot/....xpm //p4thumb/....xpm //depot/....XPM //p4thumb/....XPM //depot/....max //p4thumb/....max //depot/....MAX //p4thumb/....MAX //depot/....ma //p4thumb/....ma //depot/....MA //p4thumb/....MA //depot/....mb //p4thumb/....mb //depot/....MB //p4thumb/....MB //depot/....tga //p4thumb/....tga //depot/....TGA //p4thumb/....TGA //depot/....psd //p4thumb/....psd //depot/....PSD //p4thumb/....PSD 5. (optional)Install additional image plugins you want to use. Get the plugin files from the Perforce public depot and copy the .dll files to a folder called "imageformats" in the "plugins" folder where the p4thumb executable resides. P4thumb automatically loads the new plugins the next time it starts. Additionally, you will need to add the newly supported file types to the p4thumb client. Note: if you want to see thumbnails for Photoshop, Maya, and 3DS filetypes for local files that are not in the depot or files that are checked out, you need to install the corresponding plugins on the client computer, in the directory where P4V is installed. Unix 1. Download the p4thumb tgz file from the Perforce web site downloads page. 2. Uncompress the file with gzip and extract the runtime files into the directory of your choice. You can create a symbolic link that points to the P4V executable script. For example, to create the link where the distribution files were untarred, issue the following commands: $cd /foo $gunzip p4thumb.tgz $tar xvf p4thumb.tar $ln -s foo/p4thumb-2008.1-123456/bin/p4thumb /usr/local/bin/p4thumb 3. On the server where your image files reside, create a client specification for p4thumb that maps only the files for which you want thumbnails. For example, this view maps all of the image formats that Qt supports, plus formats for Perforce created plugins to a client named 'p4thumb' (change this to your dedicated client name): //depot/....ppm //p4thumb/....ppm //depot/....PPM //p4thumb/....PPM //depot/....bmp //p4thumb/....bmp //depot/....BMP //p4thumb/....BMP //depot/....jpg //p4thumb/....jpg //depot/....JPG //p4thumb/....JPG //depot/....bpm //p4thumb/....bpm //depot/....BPM //p4thumb/....BPM //depot/....gif //p4thumb/....gif //depot/....GIF //p4thumb/....GIF //depot/....pgm //p4thumb/....pgm //depot/....PGM //p4thumb/....PGM //depot/....png //p4thumb/....png //depot/....PNG //p4thumb/....PNG //depot/....mng //p4thumb/....mng //depot/....MNG //p4thumb/....MNG //depot/....xbm //p4thumb/....xbm //depot/....XBM //p4thumb/....XBM //depot/....xpm //p4thumb/....xpm //depot/....XPM //p4thumb/....XPM //depot/....max //p4thumb/....max //depot/....MAX //p4thumb/....MAX //depot/....ma //p4thumb/....ma //depot/....MA //p4thumb/....MA //depot/....mb //p4thumb/....mb //depot/....MB //p4thumb/....MB //depot/....tga //p4thumb/....tga //depot/....TGA //p4thumb/....TGA //depot/....psd //p4thumb/....psd //depot/....PSD //p4thumb/....PSD 4. (optional)Install additional image plugins you want to use. Copy the plugin files to a folder called "imageformats" in the "plugins" folder where the p4thumb executable resides. P4thumb automatically loads the new plugins the next time it starts. Additionally, you will need to add the newly supported file types to the p4thumb client. Note: if you want to see thumbnails for Photoshop, Maya, and 3DS filetypes for local files that are not in the depot or files that are checked out, you need to install the corresponding plugins on the client computer, in the directory where P4V is installed. Starting p4thumb Run one instance of p4thumb for each server in which you want to enable thumbnails. Do not run multiple instances of p4thumb using the same client view and server. (You might improve performance by running multiple instances with differing client views, for example, one instance for each large project.) Note that the user associated with p4thumb does not need to be dedicated to p4thumb, but the workspace must be dedicated for use only by p4thumb. Also, the user must have 'admin' privileges on the server to run the daemon. Note: The first time you start p4thumb for a specified Perforce server, it creates thumbnails for all images in its client view, which is likely to affect server performance. After the initial thumbnails are created, p4thumb does not have a significant effect on server performance. To start p4thumb, issue the following command specifying the server containing the images files, the workspace for p4thumb to use, and the Perforce username associated with p4thumb activity. p4thumb -p -c -u [flags] Flags -t : Specifies the interval for p4thumb to poll the Perforce Server for new or changed images. Specify a value from 1 to 2147483 (25 days). The default is 30 seconds. -n [<,stopchangelist>]: Specifies a range of changelists to be processed. If you specify a range of changelists, p4thumb exits after processing the range. If you specify only the start changelist, p4thumb processes from the specified changelist to the most recent, then continues to run, polling normally. -d: Erases the thumbnails in the client view that are associated with the revisions in the range of changelists specified with the -n flag. -f: Forces creation of a thumbnail even if there already is one present for the given revision. Only valid if you specify the -n flag. -L : Specifies the location and name of the p4thumb log file (ex: C:\Program Files\perforce\thumblog.txt). By default, log output is displayed on the system console. -v 0|1|2: Specifies logging level: level 0 logs errors, level 1 logs errors plus all p4 commands, level 2 logs errors, commands, and plus hex-encoded thumbnails. -help: display p4thumb flags. -V: display version information. Stopping p4thumb In the command window where you started p4thumb, type CTRL-C. By default, when you restart p4thumb, it resumes processing starting with the last changelist that was processed. p4thumb maintains a counter for this purpose on the specified server. Starting p4thumb from a specified changelist using the "-n" flag resets this counter if it exceeds the specified value. Deleting thumbnails does not affect the counter. Adding thumbnails for proprietary image formats p4thumb is based on technology created by Trolltech, which can be extended to support other image formats. If you want to write a plugin for an image format not listed above, note that Trolltech offers a free development version for Unix/X11 and Mac OS X, but development of Windows plugins requires a paid license. See www.trolltech.com for details, and search for QImageFormatPlugin information. Perforce provides sample source code and links to QT documentation in our public depot, including complied Windows plugins for 3DS, Maya, Photoshop, and .tga files. See //public/perforce/utils/image-plugins/ to obtain these files. Bugs fixed in release 2008.1 #158823 Low disk-space on Windows is now reported correctly. Locking the log file no longer crashes on Windows using Qt4. (Bug #30014) #158381 P4Thumb now correctly processes image files and logging capability. P4Thumb no longer crashes when running against an empty depot. (Bug #29971)