; Script generated by the Inno Setup Script Wizard. ; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! ; ; $Id: documancer.iss,v 1.15 2005/02/06 11:51:04 vaclavslavik Exp $ #define VERSION "0.2.4" [Setup] AppName=Documancer AppVerName=Documancer {#VERSION} AppPublisher=Vaclav Slavik AppPublisherURL=http://documancer.sourceforge.net AppSupportURL=http://documancer.sourceforge.net AppUpdatesURL=http://documancer.sourceforge.net DefaultDirName={pf}\Documancer DefaultGroupName=Documancer AllowNoIcons=true LicenseFile=COPYING Compression=lzma ShowTasksTreeLines=false AlwaysShowComponentsList=true ShowComponentSizes=true OutputDir=. OutputBaseFilename=documancer-{#VERSION}-setup ChangesAssociations=yes SolidCompression=true ShowLanguageDialog=yes InternalCompressLevel=max VersionInfoVersion={#VERSION} VersionInfoDescription=Documancer AppVersion={#VERSION} UninstallDisplayIcon={app}\documancer.exe [Tasks] Name: desktopicon; Description: Create a &desktop icon; GroupDescription: Additional icons: Name: quicklaunchicon; Description: Create a &Quick Launch icon; GroupDescription: Additional icons:; Flags: unchecked Name: unicows; Description: Download and install MSLU; Flags: unchecked; Components: app; GroupDescription: Due to Microsoft's draconian licensing terms for The Microsoft Layer for Unicode on Windows 95/98/ME, poEdit cannot ship with working Unicode support, additional DLL files must be obtained from Microsoft. The installer can download them from Microsoft's site for you and run the installer.; MinVersion: 4.0.950,0; OnlyBelowVersion: 0,0 [Files] Source: win32\win32scriptwrapper.exe; DestDir: {app}; Components: app; DestName: documancer.exe; Flags: ignoreversion Source: win32\minipython\*; DestDir: {app}; Flags: recursesubdirs ignoreversion; Components: python Source: win32\mozilla\*; DestDir: {app}; Flags: recursesubdirs ignoreversion; Components: mozilla Source: src\data\*.*; DestDir: {app}\data; Components: app Source: FAQ; DestDir: {app}; Components: app Source: NEWS; DestDir: {app}; Components: app Source: README; DestDir: {app}; Components: app Source: TODO; DestDir: {app}; Components: app Source: AUTHORS; DestDir: {app}; Components: app Source: COPYING; DestDir: {app}; Components: app Source: src\*.py; DestDir: {app}; Components: app Source: src\indexers\*.py; DestDir: {app}\indexers; Components: app Source: src\gui\*.py; DestDir: {app}\gui; Components: app Source: src\providers\__init__.py; DestDir: {app}\providers; Components: app Source: src\providers\html\*.py; DestDir: {app}\providers\html; Components: app Source: src\providers\pythondoc\*.py; DestDir: {app}\providers\pythondoc; Components: app ; unicows support: Source: win32\isxdl.dll; Flags: dontcopy Source: {tmp}\unicows.exe; DestDir: {app}; Flags: deleteafterinstall external skipifsourcedoesntexist; Tasks: unicows [Registry] Root: HKLM; Subkey: Software\Vaclav Slavik; Flags: uninsdeletekeyifempty; Check: InstallGlobally Root: HKLM; Subkey: Software\Vaclav Slavik\Documancer; Flags: uninsdeletekey; Check: InstallGlobally Root: HKLM; Subkey: Software\Vaclav Slavik\Documancer\{#VERSION}; ValueType: string; ValueName: application_path; ValueData: {app}; Flags: uninsdeletevalue; Check: InstallGlobally Root: HKCU; Subkey: Software\Vaclav Slavik; Flags: uninsdeletekeyifempty; Check: InstallLocally Root: HKCU; Subkey: Software\Vaclav Slavik\Documancer; Flags: uninsdeletekey; Check: InstallLocally Root: HKCU; Subkey: Software\Vaclav Slavik\Documancer\{#VERSION}; ValueType: string; ValueName: application_path; ValueData: {app}; Flags: uninsdeletevalue; Check: InstallLocally Root: HKCR; Subkey: .dmbk; ValueType: string; ValueName: ; ValueData: DocumancerBook; Flags: uninsdeletevalue Root: HKCR; Subkey: DocumancerBook; ValueType: string; ValueName: ; ValueData: Documancer Book; Flags: uninsdeletekey Root: HKCR; Subkey: DocumancerBook\DefaultIcon; ValueType: string; ValueName: ; ValueData: {app}\documancer.exe,0 Root: HKCR; Subkey: DocumancerBook\shell\open\command; ValueType: string; ValueName: ; ValueData: """{app}\documancer.exe"" ""--load-book='%1'""" [Icons] Name: {group}\Documancer; Filename: {app}\documancer.exe; WorkingDir: {app}; IconIndex: 0 Name: {userdesktop}\Documancer; Filename: {app}\documancer.exe; Tasks: desktopicon; WorkingDir: {app}; IconIndex: 0 Name: {userappdata}\Microsoft\Internet Explorer\Quick Launch\Documancer; Filename: {app}\documancer.exe; Tasks: quicklaunchicon; WorkingDir: {app}; IconIndex: 0 [Run] Filename: {app}\unicows.exe; Tasks: unicows; Flags: skipifdoesntexist; Parameters: "/T:""{app}"""; StatusMsg: Installing MSLU... [_ISTool] EnableISX=true Use7zip=false [Components] Name: app; Description: Application; Flags: fixed; Types: custom compact full Name: python; Description: Python runtime; Flags: fixed; Types: custom compact full Name: mozilla; Description: Mozilla HTML browser; Flags: fixed; Types: custom compact full [Dirs] Name: {app}\data; Components: app Name: {app}\gui; Components: app Name: {app}\indexers; Components: app Name: {app}\providers; Components: app Name: {app}\providers\html; Components: app Name: {app}\providers\pythondoc; Components: app [UninstallDelete] Name: {app}\*.pyc; Type: filesandordirs Name: {app}\data; Type: filesandordirs Name: {app}\gui; Type: filesandordirs Name: {app}\indexers; Type: filesandordirs Name: {app}\providers; Type: filesandordirs Name: {app}\lib; Type: filesandordirs Name: {app}\License.Txt; Type: files; Tasks: unicows Name: {app}\redist.txt; Type: files; Tasks: unicows Name: {app}\unicows.*; Type: files; Tasks: unicows [Messages] BeveledLabel=http://documancer.sourceforge.net [Code] function InstallLocally : boolean; begin result := not IsAdminLoggedOn; end; function InstallGlobally : boolean; begin result := IsAdminLoggedOn; end; { ------------------------------------------------------------------ } { Download of unicows.dll from Microsoft site: } { ------------------------------------------------------------------ } const UNICOWS_URL = 'http://download.microsoft.com/download/b/7/5/b75eace3-00e2-4aa0-9a6f-0b6882c71642/unicows.exe'; procedure isxdl_AddFile(URL, Filename: PChar); external 'isxdl_AddFile@files:isxdl.dll stdcall'; function isxdl_DownloadFiles(hWnd: Integer): Integer; external 'isxdl_DownloadFiles@files:isxdl.dll stdcall'; function isxdl_SetOption(Option, Value: PChar): Integer; external 'isxdl_SetOption@files:isxdl.dll stdcall'; function DownloadFiles: Boolean; var hWnd: Integer; begin { check if we already have the file (e.g. on CD): } if FileExists(ExpandConstant('{src}\unicows.exe')) then begin FileCopy(ExpandConstant('{src}\unicows.exe'), ExpandConstant('{tmp}\unicows.exe'), False); end else begin isxdl_SetOption('label', 'Downloading MSLU'); isxdl_SetOption('description', 'Please wait while Setup is downloading MSLU files to your computer.'); isxdl_AddFile(UNICOWS_URL, ExpandConstant('{tmp}\unicows.exe')); if isxdl_DownloadFiles(hWnd) = 0 then begin MsgBox('Error while downloading. Setup will now continue installing normally.', mbError, mb_Ok); end; end; Result := True; end; { ------------------------------------------------------------------ } { UI scripting: } { ------------------------------------------------------------------ } function ScriptDlgPages(CurPage: Integer; BackClicked: Boolean): Boolean; begin if not BackClicked and (CurPage = wpReady) and (ShouldProcessEntry('app', 'unicows') = srYes) then begin Result := DownloadFiles; end else begin Result := True; end; end; function NextButtonClick(CurPage: Integer): Boolean; begin Result := ScriptDlgPages(CurPage, False); end; function BackButtonClick(CurPage: Integer): Boolean; begin Result := ScriptDlgPages(CurPage, True); end;