[Meta-diff-devel] SF.net SVN: meta-diff: [112] trunk/setup/metadiff.iss
Brought to you by:
undees
|
From: <ey...@us...> - 2007-10-10 22:36:09
|
Revision: 112
http://meta-diff.svn.sourceforge.net/meta-diff/?rev=112&view=rev
Author: eyebex
Date: 2007-10-10 15:36:04 -0700 (Wed, 10 Oct 2007)
Log Message:
-----------
Store config files now in user's app data directory (still need to implement copying configs from a previous installation).
Modified Paths:
--------------
trunk/setup/metadiff.iss
Modified: trunk/setup/metadiff.iss
===================================================================
--- trunk/setup/metadiff.iss 2007-10-10 21:26:15 UTC (rev 111)
+++ trunk/setup/metadiff.iss 2007-10-10 22:36:04 UTC (rev 112)
@@ -17,14 +17,23 @@
APP_VER
[Code]
+const
+ CSIDL_APPDATA=$001a;
+
+function GetConfigFolder(Param:string):string;
+begin
+ // Ignore the "Param" argument.
+ Result:=GetShellFolderByCSIDL(CSIDL_APPDATA,False);
+end;
+
var
ProgramPage:TInputFileWizardPage;
procedure InitializeWizard;
begin
// Use a mono spaced font in the license dialog.
- //WizardForm.LicenseMemo.Font.Name:='Courier New';
- //WizardForm.LicenseMemo.Font.Size:=8;
+ WizardForm.LicenseMemo.Font.Name:='Lucida Console';
+ WizardForm.LicenseMemo.Font.Size:=7;
// Create a custom page to specify comparison programs.
ProgramPage:=CreateInputFilePage(
@@ -55,10 +64,11 @@
// ssInstall - Just before the actual installation starts
// ssPostInstall - Just after the actual installation finishes
// ssDone - Just before Setup terminates after a successful install
- if CurStep<>ssDone then
+ if CurStep<>ssDone then begin
Exit;
+ end;
- ConfigFile:=ExpandConstant('{app}\.metadiff');
+ ConfigFile:=ExpandConstant('{userappdata}\.metadiff');
// Add the programs to the configuration file.
DirProgram:=RemoveQuotes(Trim(ProgramPage.Values[0]));
@@ -72,9 +82,9 @@
end;
// Only add '*.vi ' to the config file if there is no such entry yet.
- if LoadStringFromFile(ConfigFile,ConfigData) then
- if Pos('*.vi ',ConfigData)>0 then
- Exit;
+ if LoadStringFromFile(ConfigFile,ConfigData) and (Pos('*.vi ',ConfigData)>0) then begin
+ Exit;
+ end;
lvdiff:=ExpandConstant('{app}\lvdiff.exe');
if FileExists(lvdiff) then begin
@@ -115,7 +125,7 @@
Source: metadiff.iss; DestDir: {app}\source; Components: src
; meta-diff
-Source: ..\meta-diff\.metadiff; DestDir: {app}; Components: main; Flags: confirmoverwrite
+Source: ..\meta-diff\.metadiff; DestDir: {code:GetConfigFolder}; Components: main; Flags: confirmoverwrite
Source: ..\meta-diff\license.txt; DestDir: {app}; DestName: metadiff-license.txt; Components: main
Source: ..\meta-diff\metadiff.exe; DestDir: {app}; Components: main
Source: ..\meta-diff\readme.txt; DestDir: {app}; DestName: metadiff-readme.txt; Components: main; Flags: isreadme
@@ -127,7 +137,7 @@
Source: ..\meta-diff\metadiff.vcproj; DestDir: {app}\source\meta-diff; Components: src
; LVDiff
-Source: ..\lv-diff\.lvdiff; DestDir: {app}; Components: lvdiff; Flags: confirmoverwrite
+Source: ..\lv-diff\.lvdiff; DestDir: {code:GetConfigFolder}; Components: lvdiff; Flags: confirmoverwrite
Source: ..\lv-diff\license.txt; DestDir: {app}; DestName: lvdiff-license.txt; Components: lvdiff
Source: ..\lv-diff\lvdiff.exe; DestDir: {app}; Components: lvdiff
Source: ..\lv-diff\*.vi; DestDir: {app}; Components: lvdiff
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|