Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin

...

Standalone Windows Distribution

If you do not want to build SLIC yourself, there is a Windows executable available for download.

The current version is available as a ZIP file containing a static binary and the required DLLs.

Download the ZIP file using your browser and unzip the contents to C:. You should see the directory C:\slic_win32.

Test out the binary by running it in a console window.

  1. Start -> Run -> cmd.
  2. Press ENTER.
  3. Go to the SLIC directory.
    No Format
    
    C:\
    cd slic_win32
    
  4. Execute SLIC from the command line.
    No Format
    
    slic
    
Warning

Close all Cygwin windows before running SLIC, or the packaged Cygwin DLL will not load properly.

Info

Cygwin needs to be installed to run SLIC.

Download the SLIC Windows binary from this location.

http://www.lcsim.org/dist/slic/slic-current-WIN32-g%2B%2B-bin.tar.gz

Open a Cygwin window and go to the directory where you saved the tarball.

Untar the file after it is saved to your computer.

No Format

tar -zxvf slic-current-WIN32-g++-bin.tar.gz

Now test the binary.

No Format

cd SimDist
./scripts/slic.sh

The slic usage screen should showThe Xerces and Cygwin DLLs are also included so that the package is standalone.

Preliminary Setup for Installation

...

  1. Download the Cygwin setup program.
  2. Double-click on it and click Next.
  3. Select Install from Internet and click Next.
  4. Enter your preferred Root Directory and click Next.
  5. Enter your preferred Local Package Directory, which can be the same as the Root Directory, and then click Next.
  6. Select Direct Connection and click Next.
  7. Select a site from the Available Download Sites. Servers inside your country will probably be fastest. I use ftp://ftp.sunsite.utk.edu.
  8. Click Next.
  9. In the Cygwin Setup - Select Packages window, you need to make sure that the following tools are selected by clicking in the corresponding box under the New column until you see a version number.
    1. Required packages.
      • Devel -> cvs
      • Devel -> gcc-core
      • Devel -> gcc-g++
      • Devel -> make
      • Base -> gzip
      • Base -> tar
    2. If OpenGL visualization is being used, these should also be installed.
      • X11 -> ALL
      • Graphics -> OpenGL
    3. Tool for downloading package tarballs and zip files.
      • Web -> wget
  10. Click Next after you have selected the packages.
  11. Cygwin will now automatically download and install all the selected packages. It might take awhile, so now is the time to go get some coffee.
  12. If desired, select Create icon on Desktop or Add icon to Start Menu, and click Finish.
Tip
titleCygwin Packages

It may be easier to simply install all Cygwin packages instead of selecting them individually.

If you need additional information on this installation process, Norman Graf has more detailed Cygwin installation instructions.

...

Package Installations

CLHEP

CLHEP has installation instructions (http://wwwasd.web.cern.ch/wwwasd/lhc\+\+/clhep/INSTALLATION/newCLHEP-install.html) for version 1.9 and up. But you should not need them to setup the package.

...

  1. Return to the work dir, create a Geant4 subdir and go into it.
    No Format
    cd $sim_work
    mkdir geant4
    cd geant4
    
  2. Download the Geant4 tarball.
    No Format
    wget http://geant4.cern.ch/geant4/source/source/geant4.7.1.tar.gz
    
  3. Unzip it.
    No Format
    tar -zxvf geant4.7.1.tar.gz
    
  4. Set the following variables in setup.sh. (You should not need to run Geant4's Configure script.)
    No Format
    export G4INSTALL=${sim_work}/geant4/geant4.7.1
    export G4SYSTEM=WIN32-g++
    
    Go into the Geant4 base dir If you would like to enable OpenGL visualization, add the following variable definitions.
    This assumes you installed the X11 libraries when you set up cygwin.
    No Format
    
    cd geant4.7.1
    
    
    export OGLHOME=/usr/X11R6
    export G4VIS_BUILD_OPENGLX_DRIVER=1
    export G4VIS_USE_OPENGLX=1
    
  5. Go into the Geant4 base dir.
    No Format
    
    cd geant4.7.1
    
  6. LCPhys LCPhys requires that a special flag is set in order to use the latest Kaon model. At the end of config/architecture.gmk, insert the following line exactly as it appears below:
    No Format
    CPPFLAGS += -DG4BERTINI_KAON
    
    Hopefully, this hack will be remedied soon!
  7. Now for another lovely Geant4 hack. In order to successfully compile the HepRep driver, the following line in the file config/sys/WIN32-g++.gmk
    No Format
    CXXFLAGS  := -Wall -ansi -pedantic -pipe
    
    should be replaced with
    No Format
    CXXFLAGS  := -W -Wall -ansi -pedantic -Wno-non-virtual-dtor -Wno-long-long
    CXXFLAGS  += -Wwrite-strings -Wpointer-arith -Woverloaded-virtual -pipe 
    
  8. Build the libraries, which will be placed at $G4INSTALL/lib/WIN32-g++. (This could take up to a few hours depending on your machine.)
    No Format
    cd source
    make
    
  9. Install the headers into $G4INSTALL/include.
    No Format
    make includes
    
  10. Build the physics list libraries. These will go into $G4INSTALL/lib/plists/WIN32-g++.
    No Format
    cd ../physics_lists/hadronic
    make
    

...

  1. Select Start -> Programs -> Cygwin -> Cygwin Bash Shell.
  2. Add Xerces-C++ bin to the path.
    No Format
    
    export PATH=/cygdrive/c/sim/xerces/bin:$PATH
    
  3. Go to the SLIC directory.
    No Format
    
    cd /cygdrive/c/sim/slic
    
  4. Run the executable.
    No Format
    
    bin/WIN32-g++/slic [options]
    
  5. Shell.
  6. Add Xerces-C++ bin to the path.
    No Format
    
    export PATH=/cygdrive/c/sim/xerces/bin:$PATH
    
  7. Go to the SLIC directory.
    No Format
    
    cd /cygdrive/c/sim/slic
    
  8. Run the executable.
    No Format
    
    bin/WIN32-g++/slic [options]
    

If you receive an error message about a missing DLL cygxerces-c26.dll, then make sure that the PATH is setup correctly and Xerces-C++ was properly installed.

Warning

If you encounter difficulties running macros, it may be due to the different DOS and Unix end-of-line definitions. You can convert files using:

No Format

dos2unix mymacro.mac

In order to run with OpenGL visualization, an X-server needs to be running on your machine.

This command will start the Cygwin X-server.

No Format

startxwin.sh

Then you need to run SLIC from the xterm that pops-up. At least on my setup, it does not work to run the binary from the plain Cygwin windowIf you receive an error message about a missing DLL cygxerces-c26.dll, then make sure that the PATH is setup correctly and Xerces-C++ was properly installed.

Final Setup Script

The final version of setup.sh (without OpenGL visualization) should be similar to this.

...

If you think this guide could be improved in any way, then please contact the author

Links