=======================================================================
xyscan 3.3
=======================================================================
A data thief for scientist.

Copyright 2002-2011 Thomas S. Ullrich (thomas.ullrich@bnl.gov)
This version: 3.3.1 (May 15, 2011)

xyscan is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; See license.txt and gpl.txt.

This directory contains all sources and files needed to built
xyscan. Supported platforms are LINUX, Windows, and Mac OS X.


Obtaining xyscan.
Binary distributions are available from the xyscan web site:
http://rhig.physics.yale.edu/~ullrich/xyscanDistributionPage
If not available for your system you need to build it from 
scratch.

Building xyscan from scratch
============================
This is straightforward. All what is needed is a C++ compiler and Qt.

Requirements
------------
You need to have Qt 4.6 or higher installed. 

Linux/Unix
----------
qmake (shipped with Qt) makes it easy. After unpacking the tar
ball: 

cd xyscan
qmake -o Makefile xyscan.pro
lrelease xyscan.pro
make

"lrelease" is necessary to create the French translation. 
If you do not need it you can skip it. 

I recommend to put the executable and the required directories
(docs/) as well as license.txt and gpl.txt in the directory:

/usr/local/xyscan 

To allow to launch the application from the command line there are several
option. In what follows I assume that you used the above
installation directory. Of course you can pick any location and
name you want.

Method 1: Start through a shell script

To create the shell script:
echo "/usr/local/xyscan/xyscan $*" > /usr/local/bin/xyscan
chmod +x /usr/local/bin/xyscan

This assumes that /usr/local/bin is in your PATH environment variable
and that you have superuser privileges. If not put it in your $HOME/bin
directory instead.

Method 2: Add /usr/local/xyscan to your PATH variable.

Do NOT link xyscan. That is
ln -s /usr/local/xyscan/xyscan  /usr/local/bin/xyscan
will NOT work since xyscan will not find the required resources.


Mac OS X
--------
Here I assume that you have the Developer package installed
and know a bit on how to work with Xcode.

qmake (shipped with Qt) makes it easy. After unpacking the tar
ball: 

qmake -spec macx-xcode xyscan.pro
lrelease xyscan.pro

This will create xyscan.xcodeproj. 
"lrelease" is necessary to create the French translation. 
Start Xcode and load xyscan.xcodeproj. Run build which will
create the xyscan.app application bundle.

Then you need to copy a couple of files into the application bundle:

i) You then need to copy or move the directory 'docs'
into the folder:
xyscan.app/Contents/Resources/

ii) license.txt and gpl.txt files go directly into:
xyscan.app/Contents/

iii) copy  xyscan_fr.qm into xyscan.app/Contents/Resources/ folder"
(French version only)

iv) For the French version:
create the directory xyscan.app/Contents/Resources/fr.lproj
add a file localisation.plist into this directory with the following content:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN"
 "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
 <plist version="1.0">
 <dict>
     <key>LprojCompatibleVersion</key>
     <string>123</string>
     <key>LprojLocale</key>
     <string>fr</string>
     <key>LprojRevisionLevel</key>
     <string>1</string>
     <key>LprojVersion</key>
     <string>123</string>
 </dict>
 </plist>
 
Then put xyscan.app in the 'Application' folder or wherever
you see fit.


Windows XP/Vista/7
------------------
Trolltech dropped support of VC7 for the OpenSource version of Qt.
Instead they recommend to use MinGW. You will need the open source 
version of Qt 4.6 (or higher). MinGW usually comes with it.

The needed resource files are all in the tar ball. The xyscan.pro
file includes also the resource file needed to assign the application icon.

Make sure that MinGW and Qt bin folders are in your PATH variable.
Unpack the tar ball. It unpacks into a directory "xyscan".

Building xyscan:
From the command line in the directory "xyscan" do
1) qmake xyscan.pro
2) lrelease xyscan.pro
3) mingw32-make (or whatever your make command is)

Installation:
Create a folder xyscan and add
1) xyscan.exe
2) the docs directory with all its content
3) the license.txt and gpl.txt files
4) the xyscan_fr.qm
5) xyscan.ico and this README (just in case)

and put the folder wherever your local applications belong, typically:
C:\Program Files 



