; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!

[Setup]
#ifdef WIN64
ArchitecturesInstallIn64BitMode=x64
AppName=@CMAKE_PROJECT_NAME@ 64-bit
AppVerName=@CMAKE_PROJECT_NAME@ 64-bit v@VERSION@ (@BUILD@)
#else
AppName=@CMAKE_PROJECT_NAME@
AppVerName=@CMAKE_PROJECT_NAME@ v@VERSION@ (@BUILD@)
#endif
AppVersion=@VERSION@
AppPublisher=The VirtualGL Project
AppPublisherURL=http://www.TurboVNC.org
AppSupportURL=http://www.TurboVNC.org
AppUpdatesURL=http://www.TurboVNC.org
DefaultDirName={pf}\@CMAKE_PROJECT_NAME@
#ifdef WIN64
DefaultGroupName=@CMAKE_PROJECT_NAME@ 64-bit
#else
DefaultGroupName=@CMAKE_PROJECT_NAME@
#endif
AllowNoIcons=yes
InfoBeforeFile=@CMAKE_SOURCE_DIR@\release\InstInfo.rtf
Compression=zip/9
WindowVisible=no
DisableStartupPrompt=yes
BackColor=clBlack
BackColor2=clBlue
DirExistsWarning=no
VersionInfoCompany=The VirtualGL Project
VersionInfoDescription=A highly-optimized version of VNC that can be used with performance-critical applications
VersionInfoVersion=@VERSION@

ChangesAssociations=yes

[Components]
Name: "viewer"; Description: "@CMAKE_PROJECT_NAME@ Viewer"; Types: full compact custom;
#ifdef JAVA
Name: "javaviewer"; Description: "Java @CMAKE_PROJECT_NAME@ Viewer"; Types: full compact custom;
#endif
Name: "doc";    Description: "Documentation";   Types: full custom;

[Files]
Source: "@CMAKE_RUNTIME_OUTPUT_DIRECTORY@\{#BUILDDIR}vncviewer.exe"; DestDir: "{app}"; Flags: ignoreversion restartreplace; Components: viewer
Source: "@CMAKE_RUNTIME_OUTPUT_DIRECTORY@\{#BUILDDIR}putty.exe"; DestDir: "{app}"; Flags: ignoreversion restartreplace; Components: viewer
#ifdef JAVA
Source: "@CMAKE_BINARY_DIR@\java\VncViewer.jar"; DestDir: "{app}\java"; Flags: ignoreversion; Components: javaviewer
Source: "@CMAKE_BINARY_DIR@\win\vncviewer-java\vncviewer-javaw.bat"; DestDir: "{app}"; Flags: ignoreversion; Components: javaviewer
Source: "@CMAKE_BINARY_DIR@\win\vncviewer-java\vncviewer-java.bat"; DestDir: "{app}"; Flags: ignoreversion; Components: javaviewer
Source: "@CMAKE_SOURCE_DIR@\java\com\turbovnc\vncviewer\README.txt"; DestDir: "{app}\java"; Flags: ignoreversion; Components: javaviewer
Source: "@CMAKE_BINARY_DIR@\win\vncviewer-java\turbojpeg.dll"; DestDir: "{app}\java"; Flags: ignoreversion; Components: javaviewer
#endif
Source: "@CMAKE_SOURCE_DIR@\LICENSE.txt"; DestDir: "{app}"; Flags: ignoreversion
Source: "@CMAKE_SOURCE_DIR@\ChangeLog.txt"; DestDir: "{app}"; Flags: ignoreversion
Source: "@CMAKE_SOURCE_DIR@\README.txt"; DestDir: "{app}"; Flags: ignoreversion
Source: "@CMAKE_SOURCE_DIR@\win\TurboVNC.url"; DestDir: "{app}"; Flags: ignoreversion
Source: "@CMAKE_SOURCE_DIR@\doc\*.png"; DestDir: "{app}\doc"; Flags: ignoreversion; Components: doc
Source: "@CMAKE_SOURCE_DIR@\doc\*.html"; DestDir: "{app}\doc"; Flags: ignoreversion; Components: doc
Source: "@CMAKE_SOURCE_DIR@\doc\LIC*.TXT"; DestDir: "{app}\doc"; Flags: ignoreversion; Components: doc
Source: "@CMAKE_SOURCE_DIR@\doc\LIC*.txt"; DestDir: "{app}\doc"; Flags: ignoreversion; Components: doc
Source: "@CMAKE_SOURCE_DIR@\doc\*.css"; DestDir: "{app}\doc"; Flags: ignoreversion; Components: doc

[Icons]
Name: "{group}\@CMAKE_PROJECT_NAME@ Viewer";                      FileName: "{app}\vncviewer.exe";                                 WorkingDir: "{app}";      Components: viewer;
Name: "{group}\@CMAKE_PROJECT_NAME@ Viewer (Listen Mode)";        FileName: "{app}\vncviewer.exe"; Parameters: "-listen";          WorkingDir: "{app}";      Components: viewer;
Name: "{group}\@CMAKE_PROJECT_NAME@ Viewer (Listen Mode - IPv6)"; FileName: "{app}\vncviewer.exe"; Parameters: "-listen -ipv6";    WorkingDir: "{app}";      Components: viewer;
#ifdef JAVA
Name: "{group}\Java @CMAKE_PROJECT_NAME@ Viewer";                 FileName: "{app}\vncviewer-javaw.bat";                           WorkingDir: "{app}";      Flags: "runminimized"
Name: "{group}\Java @CMAKE_PROJECT_NAME@ Viewer (Listen Mode)";   FileName: "{app}\vncviewer-javaw.bat"; Parameters: "-listen";    WorkingDir: "{app}";      Flags: "runminimized"
Name: "{group}\Documentation\Java @CMAKE_PROJECT_NAME@ Viewer README"; FileName: "write.exe";      Parameters: "README.txt";       WorkingDir: "{app}\java"; Flags: "useapppaths"
#endif
Name: "{group}\Uninstall @CMAKE_PROJECT_NAME@";                   FileName: "{uninstallexe}";                                      WorkingDir: "{app}";
Name: "{group}\Documentation\@CMAKE_PROJECT_NAME@ README";        FileName: "write.exe";           Parameters: "README.txt";       WorkingDir: "{app}";      Flags: "useapppaths"
Name: "{group}\Documentation\@CMAKE_PROJECT_NAME@ User's Guide";  FileName: "{app}\doc\index.html";                                WorkingDir: "{app}\doc";  Components: doc;
Name: "{group}\Documentation\Licensing Terms";                    FileName: "write.exe";           Parameters: "LICENSE.txt";      WorkingDir: "{app}\doc";  Flags: "useapppaths"
Name: "{group}\Documentation\@CMAKE_PROJECT_NAME@ Web Site";      FileName: "{app}\TurboVNC.url"
Name: "{group}\Documentation\@CMAKE_PROJECT_NAME@ Change Log";    FileName: "write.exe";           Parameters: "ChangeLog.txt";    WorkingDir: "{app}";      Flags: "useapppaths"

[Tasks]
Name: associate; Description: "&Associate .vnc files with @CMAKE_PROJECT_NAME@ Viewer"; GroupDescription: "File associations:"; Components: viewer

[Registry]
Root: HKCR; Subkey: ".vnc"; ValueType: string; ValueName: ""; ValueData: "VncViewer.Config"; Flags: uninsdeletevalue; Tasks: associate
Root: HKCR; Subkey: "VncViewer.Config"; ValueType: string; ValueName: ""; ValueData: "VNCviewer Config File"; Flags: uninsdeletekey; Tasks: associate
Root: HKCR; Subkey: "VncViewer.Config\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\vncviewer.exe,0"; Tasks: associate
Root: HKCR; Subkey: "VncViewer.Config\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\vncviewer.exe"" -config ""%1"""; Tasks: associate
