; @configure_input@
[Setup]
AppName=@PRETTYPACKAGE@
DefaultDirName={autopf}\@PRETTYPACKAGE@
DefaultGroupName=@PRETTYPACKAGE@
OutputBaseFilename=@PACKAGE@-microsoft-windows-@VERSION@
; FIXME translate this!
;AppComments=Survex Cave Surveying Software
AppPublisher=The Survex Project
AppPublisherURL=https://survex.com/
AppVersion=@VERSION@
VersionInfoTextVersion=@VERSION@
VersionInfoVersion=@VERSION@
ChangesAssociations=yes
LicenseFile=COPYING.txt
Uninstallable=yes
AppCopyright=@COPYRIGHT_MSG@
;WizardImageFile=survey.bmp
;WizardSmallImageFile=??? (up to 55x58)
LZMANumFastBytes=273
SolidCompression=yes
; Only show the "choose language" dialog if there isn't an exact match for
; the UI language the user has set.
ShowLanguageDialog=auto
;SetupIconFile=FIXME ; file in installation source directory
;UninstallDisplayIcon=FIXME
;AppReadmeFile=FIXME
;AppSupportURL=FIXME
;AppUpdatesURL=FIXME
AppContact=olly@survex.com
; Install file timestamps correctly!
TimeStampsInUTC=yes
; SignedUninstaller ???
; If upgrading, default to the language selected last time.
UsePreviousLanguage=yes
WizardStyle=modern
; Allow installing without admin rights.
PrivilegesRequiredOverridesAllowed=dialog

[Languages]
; Official translations:
Name: "bg"; MessagesFile: "compiler:Languages/Bulgarian.isl"
Name: "ca"; MessagesFile: "compiler:Languages/Catalan.isl"
Name: "cs"; MessagesFile: "compiler:Languages/Czech.isl"
Name: "de"; MessagesFile: "compiler:Languages/German.isl"
Name: "en"; MessagesFile: "compiler:Default.isl"
Name: "es"; MessagesFile: "compiler:Languages/Spanish.isl"
Name: "fr"; MessagesFile: "compiler:Languages/French.isl"
Name: "hu"; MessagesFile: "compiler:Languages/Hungarian.isl"
Name: "it"; MessagesFile: "compiler:Languages/Italian.isl"
Name: "pl"; MessagesFile: "compiler:Languages/Polish.isl"
Name: "pt"; MessagesFile: "compiler:Languages/Portuguese.isl"
Name: "pt_br"; MessagesFile: "compiler:Languages/BrazilianPortuguese.isl"
Name: "ru"; MessagesFile: "compiler:Languages/Russian.isl"
Name: "sk"; MessagesFile: "compiler:Languages/Slovak.isl"
; Unofficial:
Name: "el"; MessagesFile: "Greek.isl"
Name: "en_gb"; MessagesFile: "EnglishBritish.isl"
Name: "id"; MessagesFile: "Indonesian.isl"
Name: "ro"; MessagesFile: "Romanian.isl"
Name: "zh_CN"; MessagesFile: "ChineseSimplified.isl"
Name: "zh_TW"; MessagesFile: "ChineseTraditional.isl"

[Dirs]
Name: "{app}\manual"
Name: "{app}\images"
Name: "{app}\proj"

; Remove any cad3d.exe from a previous install - it has now been replaced
; by survexport.exe.
[InstallDelete]
Type: files; Name: "{app}\cad3d.exe"

[Files]
Source: "*.exe"; Excludes: "aven.exe,survexport.exe,wrapaven.exe,wrapsurvexport.exe"; DestDir: "{app}"
; Install aven.exe as ave_.exe and survexport.exe as survexpor_.exe.
Source: "aven.exe"; DestDir: "{app}"; DestName: "ave_.exe"
Source: "survexport.exe"; DestDir: "{app}"; DestName: "survexpor_.exe"
; Install wrapper versions under real name.
Source: "wrapaven.exe"; DestDir: "{app}"; DestName: "aven.exe"
Source: "wrapsurvexport.exe"; DestDir: "{app}"; DestName: "survexport.exe"
; Also install wrapsurvexport.exe as 3dtopos.exe so existing Tunnel releases work.
Source: "wrapsurvexport.exe"; DestDir: "{app}"; DestName: "3dtopos.exe"
; Always update installed DLLs if the files differ rather than checking the
; embedded version information.  This avoids problems when DLLs change in an
; upwardly but not downwardly compatible way but keep the same version number.
; It also means downgrading gives an install more like installing the older
; version from scratch would.  Our DLLs are all private and installed into our
; own install directory so there are no concerns with breaking other installed
; software.
Source: "*.dll"; DestDir: "{app}"; Flags: ignoreversion skipifsourcedoesntexist
Source: "*.svx"; DestDir: "{app}"
Source: "*.ico"; DestDir: "{app}"
Source: "*.pixelfont"; DestDir: "{app}"
Source: "*.png"; DestDir: "{app}\images"
Source: "*.msg"; DestDir: "{app}"
Source: "*.htm"; DestDir: "{app}"
Source: "proj\*"; DestDir: "{app}\proj"
Source: "manual\*.*"; DestDir: "{app}\manual"
; Generate iss file for including the wxstd.mo files
#include "i18nfiles.iss"

; FIXME This should be translated (think there's a standard custommessage)
;[Run]
;Filename: "{app}\aven.exe"; Description: "Launch aven"; Flags: postinstall nowait skipifsilent unchecked

[Icons]
; Name: "{group}\SvxEdit"; Filename: "{app}\editwrap.exe"; Comment: "Enter survey data"
Name: "{group}\Aven"; Filename: "{app}\aven.exe"; Comment: "View processed surveys"
Name: "{group}\Documentation"; Filename: "{app}\index.htm"; Comment: "View the documentation for Survex"
Name: "{group}\{cm:UninstallProgram,@PRETTYPACKAGE@}"; Filename: "{uninstallexe}"

[CustomMessages]
CompassPlotFile=Compass Plot File
CMapProcessedData=CMAP Processed Data
SurvexRawSurveyData=Survex Raw Survey Data
SurvexProcessedData=Survex Processed Data
SurvexLoopClosureErrors=Survex Loop Closure Errors
SurvexStationPositions=Survex Station Positions
OutputLog=Output Log

[Registry]
; Support for loading Compass Plot files
Root: HKA; Subkey: "Software\Classes\.plt"; ValueType: string; ValueData: "CompassPlotFile"
Root: HKA; Subkey: "Software\Classes\.plf"; ValueType: string; ValueData: "CompassPlotFile"
Root: HKA; Subkey: "Software\Classes\CompassPlotFile"; ValueType: string; ValueData: "{cm:CompassPlotFile}"
Root: HKA; Subkey: "Software\Classes\CompassPlotFile\DefaultIcon"; ValueType: string; ValueData:"{app}\plt.ico"
Root: HKA; Subkey: "Software\Classes\CompassPlotFile\shell\Open with Aven\command"; ValueType: string; ValueData: """{app}\aven.exe"" ""%1"""; Flags: uninsdeletekey
; Support for loading CMAP XYZ files
Root: HKA; Subkey: "Software\Classes\.xyz"; ValueType: string; ValueData: "CMAP.XYZ"
Root: HKA; Subkey: "Software\Classes\CMAP.XYZ"; ValueType: string; ValueData: "{cm:CMapProcessedData}"
;Root: HKA; Subkey: "Software\Classes\CMAP.XYZ\DefaultIcon"; ValueType: string; ValueData:"{app}\plt.ico"
Root: HKA; Subkey: "Software\Classes\CMAP.XYZ\shell\Open with Aven\command"; ValueType: string; ValueData: """{app}\aven.exe"" ""%1"""; Flags: uninsdeletekey
;
Root: HKA; Subkey: "Software\Classes\.svx"; ValueType: string; ValueData: "survex.source"; Flags: uninsdeletevalue
Root: HKA; Subkey: "Software\Classes\.3d"; ValueType: string; ValueData: "survex.bin"; Flags: uninsdeletevalue
Root: HKA; Subkey: "Software\Classes\.err"; ValueType: string; ValueData: "survex.error"; Flags: uninsdeletevalue
Root: HKA; Subkey: "Software\Classes\.pos"; ValueType: string; ValueData: "survex.pos"; Flags: uninsdeletevalue
Root: HKA; Subkey: "Software\Classes\.log"; ValueType: string; ValueData: "survex.log"; Flags: uninsdeletevalue
Root: HKA; Subkey: "Software\Classes\survex.source"; ValueType: string; ValueData: "{cm:SurvexRawSurveyData}"; Flags: uninsdeletevalue
Root: HKA; Subkey: "Software\Classes\survex.source\DefaultIcon"; ValueType: string; ValueData: "{app}\svx.ico"; Flags: uninsdeletevalue
Root: HKA; Subkey: "Software\Classes\survex.source\shell\Open"; ValueType: none; Flags: deletekey
Root: HKA; Subkey: "Software\Classes\survex.source\shell\Process"; ValueType: none; Flags: deletekey
Root: HKA; Subkey: "Software\Classes\survex.source\shell\Open in Notepad\command"; ValueType: string; ValueData: """notepad.exe"" ""%1"""; Flags: uninsdeletevalue
;Root: HKA; Subkey: "Software\Classes\survex.source\shell\Open in SvxEdit\command"; ValueType: string; ValueData: """{app}\editwrap.exe"" ""%1"""; Flags: uninsdeletevalue
Root: HKA; Subkey: "Software\Classes\survex.source\shell\Process\command"; ValueType: string; ValueData: """{app}\aven.exe"" ""%1"""; Flags: uninsdeletevalue
Root: HKA; Subkey: "Software\Classes\survex.bin"; ValueType: string; ValueData: "{cm:SurvexProcessedData}"; Flags: uninsdeletevalue
Root: HKA; Subkey: "Software\Classes\survex.bin\DefaultIcon"; ValueType: string; ValueData:"{app}\3d.ico"; Flags: uninsdeletevalue
Root: HKA; Subkey: "Software\Classes\survex.bin\shell\Open\command"; ValueType: string; ValueData: """{app}\aven.exe"" ""%1"""; Flags: uninsdeletevalue
Root: HKA; Subkey: "Software\Classes\survex.bin\shell\Print\command"; ValueType: string; ValueData: """{app}\aven.exe"" --print ""%1"""; Flags: uninsdeletevalue
Root: HKA; Subkey: "Software\Classes\survex.bin\shell\Extend\command"; ValueType: string; ValueData: """{app}\extend.exe"" ""%1"""; Flags: uninsdeletevalue
Root: HKA; Subkey: "Software\Classes\survex.error"; ValueType: string; ValueData: "{cm:SurvexLoopClosureErrors}"; Flags: uninsdeletevalue
Root: HKA; Subkey: "Software\Classes\survex.error\DefaultIcon"; ValueType: string; ValueData: "{app}\err.ico"; Flags: uninsdeletevalue
Root: HKA; Subkey: "Software\Classes\survex.error\shell\Open\command"; ValueType: string; ValueData: """notepad.exe"" ""%1"""; Flags: uninsdeletevalue
Root: HKA; Subkey: "Software\Classes\survex.error\shell\Sort by Error\command"; ValueType: string; ValueData: """{app}\sorterr.exe"" -r ""%1"""; Flags: uninsdeletevalue
Root: HKA; Subkey: "Software\Classes\survex.error\shell\Sort by Horizontal Error\command"; ValueType: string; ValueData: """{app}\sorterr.exe"" -r -h ""%1"""; Flags: uninsdeletevalue
Root: HKA; Subkey: "Software\Classes\survex.error\shell\Sort by Vertical Error\command"; ValueType: string; ValueData: """{app}\sorterr.exe"" -r -v ""%1"""; Flags: uninsdeletevalue
Root: HKA; Subkey: "Software\Classes\survex.error\shell\Sort by Percentage Error\command"; ValueType: string; ValueData: """{app}\sorterr.exe"" -r -p ""%1"""; Flags: uninsdeletevalue
Root: HKA; Subkey: "Software\Classes\survex.error\shell\Sort by Error per Leg\command"; ValueType: string; ValueData: """{app}\sorterr.exe"" -r -l ""%1"""; Flags: uninsdeletevalue
Root: HKA; Subkey: "Software\Classes\survex.pos"; ValueType: string; ValueData: "{cm:SurvexStationPositions}"; Flags: uninsdeletevalue
Root: HKA; Subkey: "Software\Classes\survex.pos\DefaultIcon"; ValueType: string; ValueData: "{app}\pos.ico"; Flags: uninsdeletevalue
Root: HKA; Subkey: "Software\Classes\survex.pos\shell\Open\command"; ValueType: string; ValueData: """notepad.exe"" ""%1"""; Flags: uninsdeletevalue
Root: HKA; Subkey: "Software\Classes\survex.log"; ValueType: string; ValueData: "{cm:OutputLog}"; Flags: uninsdeletevalue
Root: HKA; Subkey: "Software\Classes\survex.log\shell\Open\command"; ValueType: string; ValueData: """notepad.exe"" ""%1"""; Flags: uninsdeletevalue
; Remove old menu items which can now be better achieved via Aven.
Root: HKA; Subkey: "Software\Classes\survex.bin\shell\Convert to DXF\command"; ValueType: none; Flags: deletekey
Root: HKA; Subkey: "Software\Classes\survex.bin\shell\Convert for hand plotting\command"; ValueType: none; Flags: deletekey
