From: <ah...@us...> - 2007-06-23 22:59:00
|
Revision: 11379 http://svn.sourceforge.net/jvcl/?rev=11379&view=rev Author: ahuser Date: 2007-06-23 15:58:58 -0700 (Sat, 23 Jun 2007) Log Message: ----------- moved experimental innosetup files to archive Added Paths: ----------- trunk/jvcl/archive/innosetupfiles/ trunk/jvcl/archive/innosetupfiles/DelphiUtils.iss trunk/jvcl/archive/innosetupfiles/JVCL.iss trunk/jvcl/archive/innosetupfiles/JVCLPackages.iss trunk/jvcl/archive/innosetupfiles/JediPackInstall.pas trunk/jvcl/archive/innosetupfiles/clean.bat trunk/jvcl/archive/innosetupfiles/install.txt Added: trunk/jvcl/archive/innosetupfiles/DelphiUtils.iss =================================================================== --- trunk/jvcl/archive/innosetupfiles/DelphiUtils.iss (rev 0) +++ trunk/jvcl/archive/innosetupfiles/DelphiUtils.iss 2007-06-23 22:58:58 UTC (rev 11379) @@ -0,0 +1,212 @@ +const + DelphiIDEFileName = 'Bin\delphi32.exe'; + DelphiRepositoryFileName = 'Bin\delphi32.dro'; + DCC32FileName = 'Bin\dcc32.exe'; + BRCC32FileName = 'Bin\brcc32.exe'; + DelphiKeyName = 'SOFTWARE\Borland\Delphi'; + BCBKeyName = 'SOFTWARE\Borland\C++Builder'; + + LibraryKeyName = 'Library'; + LibraryRootDir = 'RootDir'; + LibrarySearchPathValueName = 'Search Path'; + LibraryBPLOutputValueName = 'Package DPL Output'; + LibraryDCPOutputValueName = 'Package DCP Output'; + KnownPackagesKeyName = 'Known Packages'; + DCC32CFGFileName = 'DCC32.CFG'; + + DelphiHelpContentFileName = 'Help\%s.ohc'; + DelphiHelpIndexFileName = 'Help\%s.ohi'; + DelphiHelpLinkFileName = 'Help\%s.ohl'; + DelphiHelpProjectFileName = 'Help\%s.ohp'; + DelphiHelpGidFileName = 'Help\%s.gid'; + MSHelpSystemKeyName = 'Software\Microsoft\Windows\Help'; + +#define DEBUGOUTPUT +procedure Log(Msg:String); +begin +#if defined DEBUGOUTPUT + MsgBox(Msg,mbInformation, MB_OK); +#endif +end; + +// utility function for testing the Check: attribute +function ResultFalse:boolean; +begin + Result := false; +end; + +// utility function for testing the Check: attribute +function ResultTrue:boolean; +begin + Result := true; +end; + + +function ExtractDOFDirectories(DOFFilename:string;UnitOutputDir:boolean):string; +var + S:TStringlist; + i,j:integer; + AFind:string; +begin + Result := ''; + DOFFilename := ExpandConstant(DOFFilename); + if not FileExists(DOFFilename) then Exit; + if UnitOutputDir then + AFind := LowerCase('UnitOutputDir=') + else + AFind := LowerCase('SearchPath='); + + S := TStringlist.Create; + try + S.LoadFromFile(DOFFilename); + for i := 0 to S.Count - 1 do + begin + j := Pos(AFind,LowerCase(S.Strings[i])); + if j = 1 then + begin + j := Pos('=',S.Strings[i]); + if j > 0 then + Result := Copy(S.Strings[i],j + 1,Length(S.Strings[I])); + Exit; + end; + end; + finally + S.Free; + end; +end; + +function IsVersionEqualOrAbove(S:string;Major, Minor, Release, Build:integer):boolean; +var + Version:array of integer;i,j:integer; +begin + SetArrayLength(Version,4); + for i := 0 to 3 do + begin + Version[i] := 0; + j := Pos('.',S); + if j > 0 then + begin + Version[i] := StrToIntDef(Copy(S,1,j-1),0); + S := Copy(S,j+1, Length(S)); + end + else + begin + Version[i] := StrToIntDef(S,0); + S := ''; + end; + end; + Result := false; + if Version[0] < Major then Exit; + if Version[1] < Minor then Exit; + if Version[2] < Release then Exit; + if Version[3] < Build then Exit; + Result := true; +end; + + +// folder where DCP files are output. DelphiVersion should be on the form '5.0', '6.0' etc +function DelphiDCPFolder(DelphiVersion:string):string; +var S:string; +begin + S := AddBackSlash(DelphiKeyName) + AddBackSlash(DelphiVersion) + LibraryKeyName; + if not RegQueryStringValue(HKCU, S, LibraryDCPOutputValueName,Result) then + Result := ''; +end; + +// folder where BPL files are output. DelphiVersion should be on the form '5.0', '6.0' etc +function DelphiBPLFolder(DelphiVersion:string):string; +var S:string; +begin + S := AddBackSlash(DelphiKeyName) + AddBackSlash(DelphiVersion) + LibraryKeyName; + if not RegQueryStringValue(HKCU, S, LibraryBPLOutputValueName,Result) then + Result := ''; +end; + +// root folder where Delphi is installed (without trailing backslash). DelphiVersion should be on the form '5.0', '6.0' etc +function DelphiRootDir(DelphiVersion:string):string; +begin + if not RegQueryStringValue(HKLM, AddBackSlash(DelphiKeyName) + DelphiVersion, LibraryRootDir, Result) then + Result := ''; +end; + +// path and filename of dcc.exe +function DelphiDCC(DelphiVersion:string):string; +begin + Result := DelphiRootDir(DelphiVersion); + if Result <> '' then + begin + Result := AddBackSlash(Result) + DCC32FileName; + if not FileExists(Result) then + Result := ''; + end; +end; + +// path and filename of brcc32.exe +function DelphiBRCC(DelphiVersion:string):string; +begin + Result := DelphiRootDir(DelphiVersion); + if Result <> '' then + begin + Result := AddBackSlash(Result) + BRCC32FileName; + if not FileExists(Result) then + Result := ''; + end; +end; + +function IsDelphiInstalled(DelphiVersion:string):boolean; +begin + Result := FileExists(AddBackSlash(DelphiRootDir(DelphiVersion)) + DelphiIDEFileName); +// Result := RegKeyExists(HKLM, 'Software\Borland\Delphi\' + DelphiVersion); +end; + +function IsBCBInstalled(BCBVersion:string):boolean; +begin + Result := RegKeyExists(HKLM, AddBackSlash(BCBKeyName) + BCBVersion); +end; + +function DCCCompile(DelphiVersion, CommandLine, WorkDir:string):boolean; +var S,OldDir:string;ACode:integer; +begin + Result := false; + S := DelphiDCC(DelphiVersion); + if FileExists(S) then + begin + OldDir := GetCurrentDir; + try + SetCurrentDir(ExpandConstant(WorkDir)); + if FileExists(DCC32CFGFileName) then DeleteFile(DCC32CFGFileName); +// Log('DCCCompile: ' + #13#10 + S + ' ' + CommandLine + ' (' + WorkDir + ')'); + Result := InstExec(S, CommandLine, WorkDir, true, false, SW_HIDE, ACode); + finally + SetCurrentDir(OldDir); + end; + if not Result then SysErrorMessage(ACode); + end; +end; + +function InstallDelphiPackage(DelphiVersion, PackageFileName, PackageDescription:string):boolean; +begin + Result := RegWriteStringValue(HKCU,AddBackSlash(DelphiKeyName) + DelphiVersion + KnownPackagesKeyName, + ExpandConstant(PackageFileName), PackageDescription); +end; + +function BuildDelphiPackage(DelphiVersion, PackageName, PackageDescription:String; Install:boolean):boolean; +var DCC:string; +begin + Result := false; + DCC := DelphiDCC(DelphiVersion); + if DCC = '' then Exit; + // extract paths from dof, build command-line, call dcc.exe + if Result and Install then + Result := InstallDelphiPackage(AddBackSlash(DelphiBPLFolder(DelphiVersion)) + ChangeFileExt(ExtractFileName(PackageName),'.bpl'), + PackageDescription, DelphiVersion); +end; + +// installs the specified help file in the OpenHelp system +// DelphiVersion should be on the form '5.0', '6.0' etc +function InstallDelphiOpenHelpFile(DelphiVersion, HelpFile:string):boolean; +begin + HelpFile := ExpandConstant(HelpFile); + +end; + Added: trunk/jvcl/archive/innosetupfiles/JVCL.iss =================================================================== --- trunk/jvcl/archive/innosetupfiles/JVCL.iss (rev 0) +++ trunk/jvcl/archive/innosetupfiles/JVCL.iss 2007-06-23 22:58:58 UTC (rev 11379) @@ -0,0 +1,269 @@ +; Setup script for building the JVCL setup +; NB: uses ISX and ISPP. You need both or a fairly new version of InnoSetup to compile this script +; JVCL is delivered in three versions: sources only, sources + demos and full install with JCL +; This script can compile all three. The version compiled is controlled by the JVCLRELEASE below. +; If the user selects any of the additional "Build and Install XXX Packages" tasks (these are only available if the corresponding +; compiler is installed), the installer finds the correct dcc version and builds and installs the packages for the invoked compiler +; +; TODO: +; 1. Write functions to call dcc.exe and also install the compiled packages as well as the help files into the IDE. +; 2. Add "Install Run" items that calls the build and install functions for each package +; 3. Add infobefore.txt, infoafter.txt and license.txt (MPL1.1) + +;#pragma option -C- +; uncomment this line to not include any files while testing the script (mainly used for syntax-checking the Code section) +#define DEBUGNOFILES + +; set up macro terminators (so we avoid those pesky escapes) +#pragma inlinestart "<$" +#pragma inlineend "$>" + +;general values +#define JVCLNAMELONG "JEDI VCL Library" +#define JVCLNAMESHORT "JVCL" +#define JVCLVER "3.00" +#define JVCLURL "http://jvcl.sourceforge.net" +#define JVCLAPPID "JVCL" +#define JVCLDEFDIR "\JEDI\JVCL" +#define JCLFOLDER "..\..\JCL" + +;NB: define the various versions we can build +#define SMALL "small" +#define MEDIUM "medium" +#define LARGE "large" + +;define the actual release we are going to build now +#define JVCLRELEASE SMALL + +;define the name of the setup file +#if JVCLRELEASE == SMALL +#define JVCLSETUPNAME JVCLNAMESHORT + JVCLVER + "SourceOnly" +#elif JVCLRELEASE == MEDIUM +#define JVCLSETUPNAME JVCLNAMESHORT + JVCLVER + "SourceExamples" +#else +#define JVCLSETUPNAME JVCLNAMESHORT + JVCLVER + "FullWithJCL" +#endif + + +[Setup] +AppName=<$JVCLNAMELONG$> +AppVerName=<$JVCLNAMESHORT$> <$JVCLVER$> +DefaultGroupName=<$JVCLNAMELONG$> +AppPublisher=<$JVCLNAMELONG$> +AppPublisherURL=<$JVCLURL$> +AppVersion=<$JVCLNAMESHORT$> <$JVCLVER$> +AppID=<$JVCLAPPID$> +AppSupportURL=<$JVCLURL$> +AppUpdatesURL=<$JVCLURL$> +DefaultDirName={pf}<$JVCLDEFDIR$> +OutputBaseFilename=<$JVCLSETUPNAME$> +AllowNoIcons=true +DisableStartupPrompt=true +DisableProgramGroupPage=true +UsePreviousGroup=false +OutputDir=. + +[_ISTool] +EnableISX=true + +[Components] +Name: SOURCEFILES; Description: Source files; Flags: fixed; Types: custom compact full +Name: CONVERTERFILES; Description: Converter files; Types: custom full + +#if JVCLRELEASE != SMALL +Name: EXAMPLESFILES; Description: Examples; Types: custom full +#endif + +#if JVCLRELEASE == LARGE +Name: ARCHIVEFILES; Description: Archived files; Types: custom full +Name: DEVTOOLSFILES; Description: Developer tools; Types: custom full +#endif + +Name: JVCLHELPFILES; Description: JVCL Help file; Types: custom compact full +Name: JCLFILES; Description: JCL files; Types: custom full +; Delphi 5 Packages ============================================================================================================= +Name: d5; Description: Delphi 5 Packages; Types: custom compact full; Check: IsDelphiInstalled(5.0) +Name: d5\dcc; Description: Build Packages; Types: custom compact full; Check: IsDelphiInstalled(5.0) +Name: d5\dcc\JvCore; Description: Install Core Package; Types: custom compact full; Check: IsDelphiInstalled(5.0) +Name: d5\dcc\JvSystem; Description: Install System Package; Types: custom compact full; Check: IsDelphiInstalled(5.0) +Name: d5\dcc\JvCtrls; Description: Install Visual Controls; Types: custom compact full; Check: IsDelphiInstalled(5.0) +Name: d5\dcc\JvStdCtrls; Description: Install Standard Controls; Types: custom compact full; Check: IsDelphiInstalled(5.0) +Name: d5\dcc\JvCmp; Description: Install Non-Visual Components; Types: custom compact full; Check: IsDelphiInstalled(5.0) +Name: d5\dcc\JvCustom; Description: Install Custom Controls; Types: custom compact full; Check: IsDelphiInstalled(5.0) +Name: d5\dcc\JvDlgs; Description: Install Dialog Components; Types: custom compact full; Check: IsDelphiInstalled(5.0) +Name: d5\dcc\JvCrypt; Description: Install Crypt and Compress Components; Types: custom compact full; Check: IsDelphiInstalled(5.0) +Name: d5\dcc\JvNet; Description: Install Networking Components; Types: custom compact full; Check: IsDelphiInstalled(5.0) +Name: d5\dcc\JvMM; Description: Install Multimedia Components; Types: custom compact full; Check: IsDelphiInstalled(5.0) +Name: d5\dcc\JvDB; Description: Install Database Components; Types: custom compact full; Check: IsDelphiInstalled(5.0) +Name: d5\dcc\JvBDE; Description: Install BDE Components; Types: custom compact full; Check: IsDelphiInstalled(5.0) +Name: d5\dcc\JvInterpreter; Description: Install Interpreter Components; Types: custom compact full; Check: IsDelphiInstalled(5.0) +Name: d5\dcc\JvPlugin; Description: Install Plugin Components; Types: custom compact full; Check: IsDelphiInstalled(5.0) +Name: d5\dcc\JvJans; Description: Install Jans Components; Types: custom compact full; Check: IsDelphiInstalled(5.0) +Name: d5\dcc\JvGlobus; Description: Install Globus Components; Types: custom compact full; Check: IsDelphiInstalled(5.0) +Name: d5\dcc\JvPrintPreview; Description: Install Print Preview Components; Types: custom compact full; Check: IsDelphiInstalled(5.0) +Name: d5\dcc\JvPageComps; Description: Install Page List Components; Types: custom compact full; Check: IsDelphiInstalled(5.0) +Name: d5\dcc\JvValidators; Description: Install Validator Components; Types: custom compact full; Check: IsDelphiInstalled(5.0) +Name: d5\dcc\JvUIB; Description: Install Unified InterBase Components; Types: custom compact full; Check: IsDelphiInstalled(5.0) +Name: d5\dcc\JvTimeFramework; Description: Install Time Framework Components; Types: custom compact full; Check: IsDelphiInstalled(5.0) +Name: d5\dcc\JvHMI; Description: Install HMI Components; Types: custom compact full; Check: IsDelphiInstalled(7.0) +Name: d5\dcc\JvWizard; Description: Install Wizard Components; Types: custom compact full; Check: IsDelphiInstalled(7.0) + +; Delphi 6 Packages ============================================================================================================= +Name: d6; Description: Delphi 6 Packages; Types: custom compact full +Name: d6\dcc; Description: Build Packages; Types: custom compact full +Name: d6\dcc\JvCore; Description: Install Core Package; Types: custom compact full; Check: IsDelphiInstalled(6.0) +Name: d6\dcc\JvSystem; Description: Install System Package; Types: custom compact full; Check: IsDelphiInstalled(6.0) +Name: d6\dcc\JvCtrls; Description: Install Visual Controls; Types: custom compact full; Check: IsDelphiInstalled(6.0) +Name: d6\dcc\JvStdCtrls; Description: Install Standard Controls; Types: custom compact full; Check: IsDelphiInstalled(6.0) +Name: d6\dcc\JvCmp; Description: Install Non-Visual Components; Types: custom compact full; Check: IsDelphiInstalled(6.0) +Name: d6\dcc\JvCustom; Description: Install Custom Controls; Types: custom compact full; Check: IsDelphiInstalled(6.0) +Name: d6\dcc\JvDlgs; Description: Install Dialog Components; Types: custom compact full; Check: IsDelphiInstalled(6.0) +Name: d6\dcc\JvCrypt; Description: Install Crypt and Compress Components; Types: custom compact full; Check: IsDelphiInstalled(6.0) +Name: d6\dcc\JvNet; Description: Install Networking Components; Types: custom compact full; Check: IsDelphiInstalled(6.0) +Name: d6\dcc\JvMM; Description: Install Multimedia Components; Types: custom compact full; Check: IsDelphiInstalled(6.0) +Name: d6\dcc\JvDB; Description: Install Database Components; Types: custom compact full; Check: IsDelphiInstalled(6.0) +Name: d6\dcc\JvBDE; Description: Install BDE Components; Types: custom compact full; Check: IsDelphiInstalled(6.0) +Name: d6\dcc\JvInterpreter; Description: Install Interpreter Components; Types: custom compact full; Check: IsDelphiInstalled(6.0) +Name: d6\dcc\JvPlugin; Description: Install Plugin Components; Types: custom compact full; Check: IsDelphiInstalled(6.0) +Name: d6\dcc\JvJans; Description: Install Jans Components; Types: custom compact full; Check: IsDelphiInstalled(6.0) +Name: d6\dcc\JvGlobus; Description: Install Globus Components; Types: custom compact full; Check: IsDelphiInstalled(6.0) +Name: d6\dcc\JvPrintPreview; Description: Install Print Preview Components; Types: custom compact full; Check: IsDelphiInstalled(6.0) +Name: d6\dcc\JvPageComps; Description: Install Page List Components; Types: custom compact full; Check: IsDelphiInstalled(6.0) +Name: d6\dcc\JvValidators; Description: Install Validator Components; Types: custom compact full; Check: IsDelphiInstalled(6.0) +Name: d6\dcc\JvUIB; Description: Install Unified InterBase Components; Types: custom compact full; Check: IsDelphiInstalled(6.0) +Name: d6\dcc\JvTimeFramework; Description: Install Time Framework Components; Types: custom compact full; Check: IsDelphiInstalled(6.0) +Name: d6\dcc\JvHMI; Description: Install HMI Components; Types: custom compact full; Check: IsDelphiInstalled(7.0) +Name: d6\dcc\JvWizard; Description: Install Wizard Components; Types: custom compact full; Check: IsDelphiInstalled(7.0) + +; Delphi 7 Packages ============================================================================================================= +Name: d7; Description: Delphi 7 Packages; Types: custom compact full +Name: d7\dcc; Description: Build Packages; Types: custom compact full; Check: IsDelphiInstalled(8.0) +Name: d7\dcc\JvCore; Description: Install Core Package; Types: custom compact full; Check: IsDelphiInstalled(7.0) +Name: d7\dcc\JvSystem; Description: Install System Package; Types: custom compact full; Check: IsDelphiInstalled(7.0) +Name: d7\dcc\JvCtrls; Description: Install Visual Controls; Types: custom compact full; Check: IsDelphiInstalled(7.0) +Name: d7\dcc\JvStdCtrls; Description: Install Standard Controls; Types: custom compact full; Check: IsDelphiInstalled(7.0) +Name: d7\dcc\JvCmp; Description: Install Non-Visual Components; Types: custom compact full; Check: IsDelphiInstalled(7.0) +Name: d7\dcc\JvCustom; Description: Install Custom Controls; Types: custom compact full; Check: IsDelphiInstalled(7.0) +Name: d7\dcc\JvDlgs; Description: Install Dialog Components; Types: custom compact full; Check: IsDelphiInstalled(7.0) +Name: d7\dcc\JvCrypt; Description: Install Crypt and Compress Components; Types: custom compact full; Check: IsDelphiInstalled(7.0) +Name: d7\dcc\JvNet; Description: Install Networking Components; Types: custom compact full; Check: IsDelphiInstalled(7.0) +Name: d7\dcc\JvMM; Description: Install Multimedia Components; Types: custom compact full; Check: IsDelphiInstalled(7.0) +Name: d7\dcc\JvDB; Description: Install Database Components; Types: custom compact full; Check: IsDelphiInstalled(7.0) +Name: d7\dcc\JvBDE; Description: Install BDE Components; Types: custom compact full; Check: IsDelphiInstalled(7.0) +Name: d7\dcc\JvInterpreter; Description: Install Interpreter Components; Types: custom compact full; Check: IsDelphiInstalled(7.0) +Name: d7\dcc\JvPlugin; Description: Install Plugin Components; Types: custom compact full; Check: IsDelphiInstalled(7.0) +Name: d7\dcc\JvJans; Description: Install Jans Components; Types: custom compact full; Check: IsDelphiInstalled(7.0) +Name: d7\dcc\JvGlobus; Description: Install Globus Components; Types: custom compact full; Check: IsDelphiInstalled(7.0) +Name: d7\dcc\JvPrintPreview; Description: Install Print Preview Components; Types: custom compact full; Check: IsDelphiInstalled(7.0) +Name: d7\dcc\JvPageComps; Description: Install Page List Components; Types: custom compact full; Check: IsDelphiInstalled(7.0) +Name: d7\dcc\JvValidators; Description: Install Validator Components; Types: custom compact full; Check: IsDelphiInstalled(7.0) +Name: d7\dcc\JvUIB; Description: Install Unified InterBase Components; Types: custom compact full; Check: IsDelphiInstalled(7.0) +Name: d7\dcc\JvTimeFramework; Description: Install Time Framework Components; Types: custom compact full; Check: IsDelphiInstalled(7.0) +Name: d7\dcc\JvHMI; Description: Install HMI Components; Types: custom compact full; Check: IsDelphiInstalled(7.0) +Name: d7\dcc\JvWizard; Description: Install Wizard Components; Types: custom compact full; Check: IsDelphiInstalled(7.0) +; TODO +;Name: bcb5; Description: C++Builder 5 Packages; Types: custom compact full +;Name: bcb6; Description: C++Builder 6 Packages; Types: custom compact full +;Name: k2; Description: Kylix 2 Packages; Types: custom compact full +;Name: k3; Description: Kylix 3 Packages; Types: custom compact full +; TODO + +[Files] +#ifndef DEBUGNOFILES +; SOURCEFILES +Source: ..\*.*; DestDir: {app}; Components: SOURCEFILES +Source: ..\common\*.pas; DestDir: {app}\common; Components: SOURCEFILES +Source: ..\common\*.INC; DestDir: {app}\common; Components: SOURCEFILES +Source: ..\resources\*.dcr; DestDir: {app}\resources; Components: SOURCEFILES +Source: ..\resources\*.res; DestDir: {app}\resources; Components: SOURCEFILES +Source: ..\design\*.*; DestDir: {app}\design; Components: SOURCEFILES +Source: ..\run\*.*; DestDir: {app}\run; Components: SOURCEFILES + +#if JVCLRELEASE == LARGE +; ARCHIVEFILES ================================================================================================================== +Source: ..\archive\*.*; DestDir: {app}\archive; Components: ARCHIVEFILES +; CONVERTERFILES ================================================================================================================ +Source: ..\converter\*.dat; DestDir: {app}\converter; Components: CONVERTERFILES DEVTOOLSFILES +; DEVTOOLSFILES ================================================================================================================= +Source: ..\devtools\*.*; DestDir: {app}\devtools; Flags: recursesubdirs; Components: DEVTOOLSFILES +Source: ..\devtools\JVCLConverter\*.*; DestDir: {app}\devtools\JVCLConverter; Flags: recursesubdirs; Components: CONVERTERFILES DEVTOOLSFILES + +Source: ..\images\*.*; DestDir: {app}\images; Components: DEVTOOLSFILES +#endif + +#if JVCLRELEASE != SMALL +; EXAMPLESFILES ================================================================================================================= +Source: ..\dict\*.dic; DestDir: {app}\dict; Components: EXAMPLESFILES +Source: ..\examples\*.*; DestDir: {app}\examples; Flags: recursesubdirs; Components: EXAMPLESFILES +#endif + +; JVCLHELPFILES ================================================================================================================= +Source: ..\help\*.hlp; DestDir: {app}\help; Components: JVCLHELPFILES +Source: ..\help\*.cnt; DestDir: {app}\help; Components: JVCLHELPFILES + +; PACKAGES ====================================================================================================================== +;Source: ..\packages\BCB5 Packages.bpg; DestDir: {app}\packages; Components: bcb5 +;Source: ..\packages\BCB5\*.*; DestDir: {app}\packages\bcb5; Components: bcb5 +Source: ..\packages\D5 Packages.bpg; DestDir: {app}\packages; Components: d5 +Source: ..\packages\D5\*.*; DestDir: {app}\packages\d5; Components: d5 +Source: ..\packages\D6 Packages.bpg; DestDir: {app}\packages; Components: d6 +Source: ..\packages\D6\*.*; DestDir: {app}\packages\d6; Components: d6 +Source: ..\packages\D7 Packages.bpg; DestDir: {app}\packages; Components: d7 +Source: ..\packages\D7\*.*; DestDir: {app}\packages\d7; Components: d7 +;Source: ..\packages\K2 Packages.bpg; DestDir: {app}\packages; Components: k2 +;Source: ..\packages\K2\*.*; DestDir: {app}\packages\k2; Components: k2 +;Source: ..\packages\K3 Packages.bpg; DestDir: {app}\packages; Components: k3 +;Source: ..\packages\K3\*.*; DestDir: {app}\packages\k3; Components: k3 + +#if JVCLRELEASE == LARGE +; JCLFILES +Source: <$JCLFOLDER$>\*.*; DestDir: {app}\..\JCL; Components: JCLFILES +Source: <$JCLFOLDER$>\examples\*.*; DestDir: {app}\..\JCL\examples; Flags: recursesubdirs; Components: JCLFILES +Source: <$JCLFOLDER$>\help\*.*; DestDir: {app}\..\JCL\help; Components: JCLFILES +Source: <$JCLFOLDER$>\packages\*.*; DestDir: {app}\..\JCL\packages; Components: JCLFILES +Source: <$JCLFOLDER$>\source\*.*; DestDir: {app}\..\JCL\source; Components: JCLFILES +#endif + + +[Dirs] +Name: {app}\bin; Flags: uninsalwaysuninstall; Components: SOURCEFILES +Name: {app}\dcu; Flags: uninsalwaysuninstall; Components: SOURCEFILES +Name: {app}\lib\d5; Flags: uninsalwaysuninstall; Components: SOURCEFILES +Name: {app}\lib\d6; Flags: uninsalwaysuninstall; Components: SOURCEFILES +Name: {app}\lib\d7; Flags: uninsalwaysuninstall; Components: SOURCEFILES +#if JVCLRELEASE = LARGE +Name: <$JCLFOLDER$>\dcu; Flags: uninsalwaysuninstall; Components: JCLFILES +Name: <$JCLFOLDER$>\bin; Flags: uninsalwaysuninstall; Components: JCLFILES +#endif + +#endif // DEBUGNOFILES + +[UninstallDelete] +Name: {app}\bin; Type: filesandordirs +Name: {app}\dcu; Type: filesandordirs +Name: {app}\lib\d5; Type: filesandordirs +Name: {app}\lib\d6; Type: filesandordirs +Name: {app}\lib\d7; Type: filesandordirs +#if JVCLRELEASE != SMALL +Name: {app}\examples\bin; Type: filesandordirs +Name: {app}\examples\dcu; Type: filesandordirs +Name: {app}\devtools\bin; Type: filesandordirs +Name: {app}\devtools\dcu; Type: filesandordirs +#endif + +[Registry] +; add some registry keys so we know where JVCL/JCL is installed. We don't use this yet, but might need it in the future. +Root: HKCU; Subkey: Software\JEDI\JVCL; ValueType: string; ValueName: InstallPath; ValueData: {app}; Flags: uninsdeletekey +Root: HKCU; Subkey: Software\JEDI\JCL; ValueType: string; ValueName: InstallPath; ValueData: {app}; Flags: uninsdeletekey; Components: JCLFILES + +[Run] +; the JVCLPackages.iss is the unit that really handles the entire Delphi installation +Filename: {code:InstallJVCLPackages|{app}}; WorkingDir: {app}; Flags: skipifdoesntexist + + +[Code] +#include "JVCLPackages.iss" + +[_ISToolPreCompile] +; just clean all dcu's, exe's and all other files we don't want to include before we begin +Name: clean.bat; Parameters: ; Flags: abortonerror runminimized Added: trunk/jvcl/archive/innosetupfiles/JVCLPackages.iss =================================================================== --- trunk/jvcl/archive/innosetupfiles/JVCLPackages.iss (rev 0) +++ trunk/jvcl/archive/innosetupfiles/JVCLPackages.iss 2007-06-23 22:58:58 UTC (rev 11379) @@ -0,0 +1,52 @@ +# include "DelphiUtils.iss" + +function InstallJVCLPackages(AppDir: string): string; +var + PackSrcFolder, BPLFolder, DCPFolder, PackFileName, + AComponent, SearchPath, CommandLine: string; +begin + { Tasks to perform: + * For each selected package version, build the JCL packages and install the JCL help file if the user selected the JCL files + * For each selected package version, build the selected R and D packages + * For each selected package version, install the selected D packages + * For each selected package version, install the help file if the user selected the help file + } + if ShouldProcessEntry('d5\dcc', '') = srYes then + begin + BPLFolder := DelphiBPLFolder('5.0'); + DCPFolder := DelphiDCPFolder('5.0'); + PackSrcFolder := AddBackSlash(ExpandConstant('{app}')) + 'packages\D5'; + // build packages + PackFileName := FindFirst(PackSrcFolder + '\*.dpk'); + while PackFileName <> '' do + begin + SearchPath := ExtractDOFDirectories(AddBackSlash(PackSrcFolder) + ChangeFileExt(PackFileName,'.dof'),false); + CommandLine := PackFileName + ' -N"'+ ExtractDOFDirectories(AddBackSlash(PackSrcFolder) + ChangeFileExt(PackFileName,'.dof'),true) + '"' + + ' -I"' + SearchPath + '"' + + ' -R"' + SearchPath + '"' + + ' -LE"' + BPLFolder + '"' + + ' -LN"' + DCPFolder + '"' + + ' -U"' + DCPFolder + ';' + SearchPath; + // call compiler + DCCCompile('5.0',CommandLine,PackSrcFolder); + PackFileName := FindNext; + end; + // install selected,compiled design packages + PackFileName := FindFirst(BPLFolder + '\*D5D.bpl'); + while PackFileName <> '' do + begin + AComponent := ExtractFileName(Copy(PackFileName,1,Length(PackFileName) - 7)); + if ShouldProcessEntry('d5\dcc\' + AComponent, '') = srYes then +// InstallDelphiPackage('5.0',PackFileName,''); + PackFileName := FindNext; + end; + end; + + if ShouldProcessEntry('d6\dcc', '') = srYes then + begin + end; + if ShouldProcessEntry('d7\dcc', '') = srYes then + begin + end; +end; + Added: trunk/jvcl/archive/innosetupfiles/JediPackInstall.pas =================================================================== --- trunk/jvcl/archive/innosetupfiles/JediPackInstall.pas (rev 0) +++ trunk/jvcl/archive/innosetupfiles/JediPackInstall.pas 2007-06-23 22:58:58 UTC (rev 11379) @@ -0,0 +1,571 @@ +{**************************************************************************************************} +{ } +{ Project JEDI Code Library (JCL) extension } +{ } +{ The contents of this file are subject to the Mozilla Public License Version 1.1 (the "License"); } +{ you may not use this file except in compliance with the License. You may obtain a copy of the } +{ License at http://www.mozilla.org/MPL/ } +{ } +{ Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF } +{ ANY KIND, either express or implied. See the License for the specific language governing rights } +{ and limitations under the License. } +{ } +{ The Original Code is JediPackInstall.pas. } +{ } +{ The Initial Developer of the Original Code is documented in the accompanying } +{ help file JCL.chm. Portions created by these individuals are Copyright (C) of these individuals. } +{ } +{**************************************************************************************************} +{ } +{ JEDI API/JCL/JVCL installation code } +{ } +{ Unit owner: Petr Vones } +{ Last modified: July 29, 2002 } +{ } +{**************************************************************************************************} + +unit JediPackInstall; + +interface + +{$I jcl.inc} + +uses + Windows, SysUtils, Classes, ComCtrls, JediInstallIntf; + +type + TJediPackInstall = class (TInterfacedObject, IJediInstall) + private + FApiPath: string; + FApiSourcePath: string; + FJclPath: string; + FJclSourcePath: string; + FClxDialogFileName: string; + FVclDialogFileName: string; + FClxDialogIconFileName: string; + FVclDialogIconFileName: string; + FJclChmHelpFileName: string; + FJclHlpHelpFileName: string; + FJclReadmeFileName: string; + FVclPath: string; + FVclSourcePath: string; + FVclCommonPath: string; + FVclReadmeFileName: string; + FVclChmHelpFileName: string; + FVclHlpHelpFileName: string; + FTool: IJediInstallTool; + public + function InitInformation(const ApplicationFileName: string): Boolean; + function Install: Boolean; + function PopulateTreeView(Nodes: TTreeNodes; VersionNumber: Integer; Page: TTabSheet): Boolean; + function SelectedNodeCollapsing(Node: TTreeNode): Boolean; + procedure SelectedNodeChanged(Node: TTreeNode); + procedure SetTool(const Value: IJediInstallTool); + property Tool: IJediInstallTool read FTool; + end; + +function CreateJediInstall: IJediInstall; + +implementation + +uses + JclBase, JclFileUtils, JclStrings, DelphiInstall; + +const + // JCL + DialogsPath = 'examples\debugextension\dialog\'; + ClxDialogFileName = 'ClxExceptDlg.pas'; + VclDialogFileName = 'ExceptDlg.pas'; + ClxDialogName = 'CLX Exception Dialog'; + VclDialogName = 'Exception Dialog'; + DialogDescription = 'JCL Application exception dialog'; + DialogAuthor = 'Project JEDI'; + DialogPage = 'Dialogs'; + + JclChmHelpFile = 'Help\JCLHelp.chm'; + JclHlpHelpFile = 'Help\JCLHelp.hlp'; + JclHelpTitle = 'JEDI Code Library Help'; + JclHelpIndexName = 'JEDI Code Library Reference'; + HHFileName = 'HH.EXE'; + + JclRuntimeDpk = 'packages\JCL%d0.dpk'; + JclIdeDebugDpk = 'examples\debugextension\JclDebugIde%d0.dpk'; + JclIdeAnalyzerDpk = 'examples\projectanalyzer\ProjectAnalyzer%d0.dpk'; + JclIdeFavoriteDpk = 'examples\idefavopendialogs\IdeOpenDlgFavorite%d0.dpk'; + JclIdeThrNamesDpk = 'examples\debugextension\threadnames\ThreadNameExpert%d0.dpk'; + + // JVCL + VclRuntimeDpk = 'packages\JVCL200_R%d0.dpk'; + VclRuntimeDpkPers = 'packages\JVCL200_R%d0Personal.dpk'; + VclDesignDpk = 'packages\JVCL200_D%d0.dpk'; + VclDesignDpkPers = 'packages\JVCL200_D%d0Personal.dpk'; + VclRuntimeDpkStd = 'packages\JVCL200_R%d0Standard.dpk'; + VclDesignDpkStd = 'packages\JVCL200_D%d0Standard.dpk'; + + VclChmHelpFile = 'Help\JVCL.chm'; + VclHlpHelpFile = 'Help\JVCL.hlp'; + VclHelpTitle = 'JEDI Visual Component Library Help'; + VclHelpIndexName = 'JEDI Visual Component Library Reference'; + + // Feature IDs + FID_API = $01000000; + FID_JCL = $02000000; + FID_VCL = $03000000; + + FID_API_Env = FID_API + $00010000; + FID_API_EnvLibPath = FID_API + $00010001; + + FID_JCL_Env = FID_JCL + $00010000; + FID_JCL_EnvLibPath = FID_JCL + $00010001; + FID_JCL_Help = FID_JCL + $00020000; + FID_JCL_HelpHlp = FID_JCL + $00020100; + FID_JCL_HelpChm = FID_JCL + $00020200; + FID_JCL_Experts = FID_JCL + $00030000; + FID_JCL_ExpertDebug = FID_JCL + $00030100; + FID_JCL_ExpertAnalyzer = FID_JCL + $00030200; + FID_JCL_ExpertFavorite = FID_JCL + $00030300; + FID_JCL_ExpertsThrNames = FID_JCL + $00030400; + FID_JCL_ExcDialog = FID_JCL + $00040000; + FID_JCL_ExcDialogVCL = FID_JCL + $00040100; + FID_JCL_ExcDialogCLX = FID_JCL + $00040200; + + FID_VCL_Env = FID_VCL + $00010000; + FID_VCL_EnvLibPath = FID_VCL + $00010001; + FID_VCL_EnvDesignPkg = FID_VCL + $00010002; + FID_VCL_Help = FID_VCL + $00020000; + FID_VCL_HelpHlp = FID_VCL + $00020100; + FID_VCL_HelpChm = FID_VCL + $00020200; + + // Products + RsAPI = 'JEDI API Library'; + RsJCL = 'JEDI Code Library'; + RsJVCL = 'JEDI Visual Component Library'; + + // Common features + RsEnvironment = 'Environment'; + RsEnvLibPath = 'Include source code location to IDE Library Path'; + RsHelpFiles = 'Help files'; + RsIdeExperts = 'IDE experts'; + RsIdeHelpHlp = 'Add help file to Delphi IDE help system'; + RsIdeHelpChm = 'Add HTML help to the Tools menu'; + + // Product specific features + RsJCLExceptDlg = 'Sample Exception Dialogs in the Object Reporitory'; + RsJCLDialogVCL = 'VCL Exception Dialog'; + RsJCLDialogCLX = 'CLX Exception Dialog'; + RsJCLIdeDebug = 'Debug Extension'; + RsJCLIdeAnalyzer = 'Project Analyzer'; + RsJCLIdeFavorite = 'Favorite combobox in Open/Save dialogs'; + RsJCLIdeThrNames = 'Displaying thread names in Thread Status window'; + RsVCLDesignPkg = 'Install design-time component packages'; + +resourcestring + RsSourceLibHint = 'Adds "%s" to the Library Path'; + RsStatusMessage = 'Compiling / Installing %s ...'; + RsInstallFailed = 'Installation of %s failed. Try running the installer again. If it still doesn''t work, try doing a manual install from Delphi.'; + +function CreateJediInstall: IJediInstall; +begin + Result := TJediPackInstall.Create as IJediInstall; +end; + +{ TJediPackInstall } + +function TJediPackInstall.InitInformation(const ApplicationFileName: string): Boolean; +begin + // API + FApiPath := PathAddSeparator(PathCanonicalize(PathExtractFileDirFixed(ApplicationFileName) + '..\..\API')); + FApiSourcePath := FApiPath + 'Pas'; + // JCL + FJclPath := PathAddSeparator(PathCanonicalize(PathExtractFileDirFixed(ApplicationFileName) + '..')); + FJclSourcePath := FJclPath + 'Source'; + FClxDialogFileName := AnsiUpperCase(FJclPath + DialogsPath + ClxDialogFileName); + FVclDialogFileName := AnsiUpperCase(FJclPath + DialogsPath + VclDialogFileName); + FClxDialogIconFileName := ChangeFileExt(FClxDialogFileName, '.ICO'); + FVclDialogIconFileName := ChangeFileExt(FVclDialogFileName, '.ICO'); + FJclChmHelpFileName := FJclPath + JclChmHelpFile; + FJclHlpHelpFileName := FJclPath + JclHlpHelpFile; + if not FileExists(FJclChmHelpFileName) then + FJclChmHelpFileName := ''; + if not FileExists(FJclHlpHelpFileName) then + FJclHlpHelpFileName := ''; + // Reset ReadOnly flag for dialog forms + FileSetAttr(FClxDialogFileName, faArchive); + FileSetAttr(ChangeFileExt(FClxDialogFileName, '.xfm'), faArchive); + FileSetAttr(FVclDialogFileName, faArchive); + FileSetAttr(ChangeFileExt(FVclDialogFileName, '.dfm'), faArchive); + Result := (FileExists(FClxDialogFileName) and FileExists(FVclDialogFileName) and + FileExists(FClxDialogIconFileName) and FileExists(FVclDialogIconFileName)); + FJclReadmeFileName := FJclPath + 'Readme.txt'; + // VCL + FVclPath := PathAddSeparator(PathCanonicalize(PathExtractFileDirFixed(ApplicationFileName) + '..\..\JVCL')); + FVclSourcePath := FVclPath + 'Source'; + FVclCommonPath := FVclPath + 'Common'; + FVclReadmeFileName := FVclPath + 'Readme.txt'; + FVclChmHelpFileName := FVclPath + VclChmHelpFile; + FVclHlpHelpFileName := FVclPath + VclHlpHelpFile; + if not FileExists(FVclHlpHelpFileName) then + FVclHlpHelpFileName := ''; + if not FileExists(FVclChmHelpFileName) then + FVclChmHelpFileName := ''; +end; + +function TJediPackInstall.Install: Boolean; +var + Installation: TJclDelphiInstallation; + + procedure AddJclHelpToDelphiHelp; + begin + Installation.OpenHelp.AddHelpFile(FJclHlpHelpFileName, JclHelpIndexName); + end; + + procedure AddJclHelpToIdeTools; + var + ToolsIndex: Integer; + begin + if Installation.IdeTools.IndexOfTitle(JclHelpTitle) = -1 then + begin + ToolsIndex := Installation.IdeTools.Count; + Installation.IdeTools.Count := ToolsIndex + 1; + Installation.IdeTools.Title[ToolsIndex] := JclHelpTitle; + Installation.IdeTools.Path[ToolsIndex] := HHFileName; + Installation.IdeTools.Parameters[ToolsIndex] := StrDoubleQuote(FJclChmHelpFileName); + Installation.IdeTools.WorkingDir[ToolsIndex] := FJclPath; + end; + end; + + procedure AddVclHelpToDelphiHelp; + begin + Installation.OpenHelp.AddHelpFile(FVclHlpHelpFileName, VclHelpIndexName); + end; + + procedure AddVclHelpToIdeTools; + var + ToolsIndex: Integer; + begin + if Installation.IdeTools.IndexOfTitle(VclHelpTitle) = -1 then + begin + ToolsIndex := Installation.IdeTools.Count; + Installation.IdeTools.Count := ToolsIndex + 1; + Installation.IdeTools.Title[ToolsIndex] := VclHelpTitle; + Installation.IdeTools.Path[ToolsIndex] := HHFileName; + Installation.IdeTools.Parameters[ToolsIndex] := StrDoubleQuote(FVclChmHelpFileName); + Installation.IdeTools.WorkingDir[ToolsIndex] := FVclPath; + end; + end; + + function InstallPackage(const Path, Name: string): Boolean; + var + PackageFileName: string; + begin + PackageFileName := Path + Format(Name, [Installation.VersionNumber]); + Tool.UpdateStatus(Format(RsStatusMessage, [ExtractFileName(PackageFileName)])); + Result := Installation.Compiler.InstallPackage(PackageFileName,Tool.BPLPath(Installation.VersionNumber), + Tool.DCPPath(Installation.VersionNumber)); + Tool.UpdateStatus(''); + if not Result then + Tool.MessageBox(Format(RsInstallFailed, [PackageFileName]), MB_OK or MB_ICONERROR); + end; + + procedure D4Install; + begin + Tool.UpdateStatus(Format(RsStatusMessage, [Installation.Name])); + // JCL + if Tool.FeatureChecked(FID_JCL_EnvLibPath, Installation.VersionNumber) then + Installation.AddToLibrarySearchPath(FJclSourcePath); + if Tool.FeatureChecked(FID_JCL_HelpHlp, Installation.VersionNumber) then + AddJclHelpToDelphiHelp; + if Tool.FeatureChecked(FID_JCL_HelpChm, Installation.VersionNumber) then + AddJclHelpToIdeTools; + if Tool.FeatureChecked(FID_JCL_ExcDialogVCL, Installation.VersionNumber) then + Installation.Repository.AddObject(FVclDialogFileName, DelphiRepositoryFormTemplate, + Installation.Repository.FindPage(DialogPage, 1), VclDialogName, FVclDialogIconFileName, + DialogDescription, DialogAuthor, DelphiRepositoryDesignerDfm); + if Tool.FeatureChecked(FID_JCL_Experts, Installation.VersionNumber) then + InstallPackage(FJclPath, JclRuntimeDpk); + if Tool.FeatureChecked(FID_JCL_ExpertDebug, Installation.VersionNumber) then + InstallPackage(FJclPath, JclIdeDebugDpk); + if Tool.FeatureChecked(FID_JCL_ExpertAnalyzer, Installation.VersionNumber) then + InstallPackage(FJclPath, JclIdeAnalyzerDpk); + if Tool.FeatureChecked(FID_JCL_ExpertFavorite, Installation.VersionNumber) then + InstallPackage(FJclPath, JclIdeFavoriteDpk); + if Tool.FeatureChecked(FID_JCL_ExpertsThrNames, Installation.VersionNumber) then + InstallPackage(FJclPath, JclIdeThrNamesDpk); + end; + + procedure D5Install; + begin + Tool.UpdateStatus(Format(RsStatusMessage, [Installation.Name])); + // JCL + if Tool.FeatureChecked(FID_JCL_EnvLibPath, Installation.VersionNumber) then + Installation.AddToLibrarySearchPath(FJclSourcePath); + if Tool.FeatureChecked(FID_JCL_HelpHlp, Installation.VersionNumber) then + AddJclHelpToDelphiHelp; + if Tool.FeatureChecked(FID_JCL_HelpChm, Installation.VersionNumber) then + AddJclHelpToIdeTools; + if Tool.FeatureChecked(FID_JCL_ExcDialogVCL, Installation.VersionNumber) then + Installation.Repository.AddObject(FVclDialogFileName, DelphiRepositoryFormTemplate, + Installation.Repository.FindPage(DialogPage, 1), VclDialogName, FVclDialogIconFileName, + DialogDescription, DialogAuthor, DelphiRepositoryDesignerDfm); + if Tool.FeatureChecked(FID_JCL_Experts, Installation.VersionNumber) then + InstallPackage(FJclPath, JclRuntimeDpk); + if Tool.FeatureChecked(FID_JCL_ExpertDebug, Installation.VersionNumber) then + InstallPackage(FJclPath, JclIdeDebugDpk); + if Tool.FeatureChecked(FID_JCL_ExpertAnalyzer, Installation.VersionNumber) then + InstallPackage(FJclPath, JclIdeAnalyzerDpk); + if Tool.FeatureChecked(FID_JCL_ExpertFavorite, Installation.VersionNumber) then + InstallPackage(FJclPath, JclIdeFavoriteDpk); + if Tool.FeatureChecked(FID_JCL_ExpertsThrNames, Installation.VersionNumber) then + InstallPackage(FJclPath, JclIdeThrNamesDpk); + // JVCL + if Tool.FeatureChecked(FID_VCL_EnvLibPath, Installation.VersionNumber) then + begin + Installation.AddToLibrarySearchPath(FVclSourcePath); + Installation.AddToLibrarySearchPath(FVclCommonPath); + end; + if Tool.FeatureChecked(FID_VCL_HelpHlp, Installation.VersionNumber) then + AddVclHelpToDelphiHelp; + if Tool.FeatureChecked(FID_VCL_HelpChm, Installation.VersionNumber) then + AddVclHelpToIdeTools; + if Tool.FeatureChecked(FID_VCL_EnvDesignPkg, Installation.VersionNumber) then + case Installation.Edition of + deSTD: + begin + InstallPackage(FVclPath, VclRuntimeDpkStd); + InstallPackage(FVclPath, VclDesignDpkStd); + end; + dePRO, deCSS: + begin + InstallPackage(FVclPath, VclRuntimeDpk); + InstallPackage(FVclPath, VclDesignDpk); + end; + end; + end; + + procedure D6Install; + begin + Tool.UpdateStatus(Format(RsStatusMessage, [Installation.Name])); + // JCL + if Tool.FeatureChecked(FID_JCL_EnvLibPath, Installation.VersionNumber) then + Installation.AddToLibrarySearchPath(FJclSourcePath); + if Tool.FeatureChecked(FID_JCL_HelpHlp, Installation.VersionNumber) then + AddJclHelpToDelphiHelp; + if Tool.FeatureChecked(FID_JCL_HelpChm, Installation.VersionNumber) then + AddJclHelpToIdeTools; + if Tool.FeatureChecked(FID_JCL_ExcDialogVCL, Installation.VersionNumber) then + Installation.Repository.AddObject(FVclDialogFileName, DelphiRepositoryFormTemplate, + Installation.Repository.FindPage(DialogPage, 1), VclDialogName, FVclDialogIconFileName, + DialogDescription, DialogAuthor, DelphiRepositoryDesignerDfm); + if Tool.FeatureChecked(FID_JCL_ExcDialogCLX, Installation.VersionNumber) then + Installation.Repository.AddObject(FClxDialogFileName, DelphiRepositoryFormTemplate, + Installation.Repository.FindPage(DialogPage, 1), ClxDialogName, FClxDialogIconFileName, + DialogDescription, DialogAuthor, DelphiRepositoryDesignerXfm); + if Tool.FeatureChecked(FID_JCL_Experts, Installation.VersionNumber) then + InstallPackage(FJclPath, JclRuntimeDpk); + if Tool.FeatureChecked(FID_JCL_ExpertDebug, Installation.VersionNumber) then + InstallPackage(FJclPath, JclIdeDebugDpk); + if Tool.FeatureChecked(FID_JCL_ExpertAnalyzer, Installation.VersionNumber) then + InstallPackage(FJclPath, JclIdeAnalyzerDpk); + if Tool.FeatureChecked(FID_JCL_ExpertFavorite, Installation.VersionNumber) then + InstallPackage(FJclPath, JclIdeFavoriteDpk); + if Tool.FeatureChecked(FID_JCL_ExpertsThrNames, Installation.VersionNumber) then + InstallPackage(FJclPath, JclIdeThrNamesDpk); + // JVCL + if Tool.FeatureChecked(FID_VCL_EnvLibPath, Installation.VersionNumber) then + begin + Installation.AddToLibrarySearchPath(FVclSourcePath); + Installation.AddToLibrarySearchPath(FVclCommonPath); + end; + if Tool.FeatureChecked(FID_VCL_HelpHlp, Installation.VersionNumber) then + AddVclHelpToDelphiHelp; + if Tool.FeatureChecked(FID_VCL_HelpChm, Installation.VersionNumber) then + AddVclHelpToIdeTools; + if Tool.FeatureChecked(FID_VCL_EnvDesignPkg, Installation.VersionNumber) then + case Installation.Edition of + deSTD: + begin + InstallPackage(FVclPath, VclRuntimeDpkPers); + InstallPackage(FVclPath, VclDesignDpkPers); + end; + dePRO, deCSS: + begin + InstallPackage(FVclPath, VclRuntimeDpk); + InstallPackage(FVclPath, VclDesignDpk); + end; + end; + end; + + procedure D7Install; + begin + Tool.UpdateStatus(Format(RsStatusMessage, [Installation.Name])); + // JCL + if Tool.FeatureChecked(FID_JCL_EnvLibPath, Installation.VersionNumber) then + Installation.AddToLibrarySearchPath(FJclSourcePath); + if Tool.FeatureChecked(FID_JCL_HelpHlp, Installation.VersionNumber) then + AddJclHelpToDelphiHelp; + if Tool.FeatureChecked(FID_JCL_HelpChm, Installation.VersionNumber) then + AddJclHelpToIdeTools; + if Tool.FeatureChecked(FID_JCL_ExcDialogVCL, Installation.VersionNumber) then + Installation.Repository.AddObject(FVclDialogFileName, DelphiRepositoryFormTemplate, + Installation.Repository.FindPage(DialogPage, 1), VclDialogName, FVclDialogIconFileName, + DialogDescription, DialogAuthor, DelphiRepositoryDesignerDfm); + if Tool.FeatureChecked(FID_JCL_ExcDialogCLX, Installation.VersionNumber) then + Installation.Repository.AddObject(FClxDialogFileName, DelphiRepositoryFormTemplate, + Installation.Repository.FindPage(DialogPage, 1), ClxDialogName, FClxDialogIconFileName, + DialogDescription, DialogAuthor, DelphiRepositoryDesignerXfm); + if Tool.FeatureChecked(FID_JCL_Experts, Installation.VersionNumber) then + InstallPackage(FJclPath, JclRuntimeDpk); + if Tool.FeatureChecked(FID_JCL_ExpertDebug, Installation.VersionNumber) then + InstallPackage(FJclPath, JclIdeDebugDpk); + if Tool.FeatureChecked(FID_JCL_ExpertAnalyzer, Installation.VersionNumber) then + InstallPackage(FJclPath, JclIdeAnalyzerDpk); + if Tool.FeatureChecked(FID_JCL_ExpertFavorite, Installation.VersionNumber) then + InstallPackage(FJclPath, JclIdeFavoriteDpk); + // JVCL + if Tool.FeatureChecked(FID_VCL_EnvLibPath, Installation.VersionNumber) then + begin + Installation.AddToLibrarySearchPath(FVclSourcePath); + Installation.AddToLibrarySearchPath(FVclCommonPath); + end; + if Tool.FeatureChecked(FID_VCL_HelpHlp, Installation.VersionNumber) then + AddVclHelpToDelphiHelp; + if Tool.FeatureChecked(FID_VCL_HelpChm, Installation.VersionNumber) then + AddVclHelpToIdeTools; + if Tool.FeatureChecked(FID_VCL_EnvDesignPkg, Installation.VersionNumber) then + case Installation.Edition of + deSTD: + begin + InstallPackage(FVclPath, VclRuntimeDpkPers); + InstallPackage(FVclPath, VclDesignDpkPers); + end; + dePRO, deCSS: + begin + InstallPackage(FVclPath, VclRuntimeDpk); + InstallPackage(FVclPath, VclDesignDpk); + end; + end; + end; + +begin + Result := True; + try + Installation := Tool.DelphiInstallations.InstallationFromVersion[4]; + if Assigned(Installation) and Installation.Valid then + D4Install; + Installation := Tool.DelphiInstallations.InstallationFromVersion[5]; + if Assigned(Installation) and Installation.Valid then + D5Install; + Installation := Tool.DelphiInstallations.InstallationFromVersion[6]; + if Assigned(Installation) and Installation.Valid then + D6Install; + Installation := Tool.DelphiInstallations.InstallationFromVersion[7]; + if Assigned(Installation) and Installation.Valid then + D7Install; + finally + Tool.UpdateStatus(''); + end; +end; + +function TJediPackInstall.PopulateTreeView(Nodes: TTreeNodes; VersionNumber: Integer; Page: TTabSheet): Boolean; +var + InstallationNode, ProductNode, TempNode: TTreeNode; + Installation: TJclDelphiInstallation; + + function AddNode(Parent: TTreeNode; const Caption: string; FeatureID: Cardinal): TTreeNode; + begin + FeatureID := FeatureID or FID_Checked; + Result := Nodes.AddChildObject(Parent, Caption, Pointer(FeatureID)); + Result.ImageIndex := IcoChecked; + Result.SelectedIndex := IcoChecked; + end; + +begin + Installation := Tool.DelphiInstallations.InstallationFromVersion[VersionNumber]; + Result := Assigned(Installation) and Installation.Valid; + Nodes.BeginUpdate; + try + if Result then + begin + InstallationNode := AddNode(nil, Installation.Name, 0); + InstallationNode.StateIndex := 0; + if Assigned(Installation) and Installation.Valid then + begin + // API Library + if DirectoryExists(FApiSourcePath) then + begin + ProductNode := AddNode(InstallationNode, RsAPI, FID_API); + TempNode := AddNode(ProductNode, RsEnvironment, FID_API_Env); + AddNode(TempNode, RsEnvLibPath, FID_API_EnvLibPath); + end; + // JCL + ProductNode := AddNode(InstallationNode, RsJCL, FID_JCL); + TempNode := AddNode(ProductNode, RsEnvironment, FID_JCL_Env); + AddNode(TempNode, RsEnvLibPath, FID_JCL_EnvLibPath); + if (FJclHlpHelpFileName <> '') or (FJclChmHelpFileName <> '') then + begin + TempNode := AddNode(ProductNode, RsHelpFiles, FID_JCL_Help); + if FJclHlpHelpFileName <> '' then + AddNode(TempNode, RsIdeHelpHlp, FID_JCL_HelpHlp); + if FJclChmHelpFileName <> '' then + AddNode(TempNode, RsIdeHelpChm, FID_JCL_HelpChm); + end; + TempNode := AddNode(ProductNode, RsJCLExceptDlg, FID_JCL_ExcDialog); + AddNode(TempNode, RsJCLDialogVCL, FID_JCL_ExcDialogVCL); + if (Installation.VersionNumber >= 6) and (Installation.Edition <> deSTD) then + AddNode(TempNode, RsJCLDialogCLX, FID_JCL_ExcDialogCLX); + TempNode := AddNode(ProductNode, RsIdeExperts, FID_JCL_Experts); + AddNode(TempNode, RsJCLIdeDebug, FID_JCL_ExpertDebug); + AddNode(TempNode, RsJCLIdeAnalyzer, FID_JCL_ExpertAnalyzer); + AddNode(TempNode, RsJCLIdeFavorite, FID_JCL_ExpertFavorite); + if Installation.VersionNumber <= 6 then + AddNode(TempNode, RsJCLIdeThrNames, FID_JCL_ExpertsThrNames); + InstallationNode.Expand(True); + // JVCL + if DirectoryExists(FVclSourcePath) and (Installation.VersionNumber >= 5) then + begin + ProductNode := AddNode(InstallationNode, RsJVCL, FID_VCL); + TempNode := AddNode(ProductNode, RsEnvironment, FID_VCL_Env); + AddNode(TempNode, RsEnvLibPath, FID_VCL_EnvLibPath); + AddNode(TempNode, RsVCLDesignPkg, FID_VCL_EnvDesignPkg); + if (FVclHlpHelpFileName <> '') or (FVclChmHelpFileName <> '') then + begin + TempNode := AddNode(ProductNode, RsHelpFiles, FID_VCL_Help); + if FVclHlpHelpFileName <> '' then + AddNode(TempNode, RsIdeHelpHlp, FID_VCL_HelpHlp); + if FVclChmHelpFileName <> '' then + AddNode(TempNode, RsIdeHelpChm, FID_VCL_HelpChm); + end; + end; + end; + InstallationNode.Expand(True); + end; + finally + Nodes.EndUpdate; + end; +end; + +function TJediPackInstall.SelectedNodeCollapsing(Node: TTreeNode): Boolean; +begin + Result := False; + // Result := Cardinal(Node.Data) and FID_Category <> 0; +end; + +procedure TJediPackInstall.SelectedNodeChanged(Node: TTreeNode); +var + ReadmeText: string; +begin + case Cardinal(Node.Data) and FID_Product of + FID_JCL: ReadmeText := FileToString(FJclReadmeFileName); + FID_VCL: ReadmeText := FileToString(FVclReadmeFileName); + else + ReadmeText := ''; + end; + Tool.UpdateInfo(Tool.ActiveVersionNumberPage, ReadmeText); +end; + +procedure TJediPackInstall.SetTool(const Value: IJediInstallTool); +begin + FTool := Value; +end; + +end. Added: trunk/jvcl/archive/innosetupfiles/clean.bat =================================================================== --- trunk/jvcl/archive/innosetupfiles/clean.bat (rev 0) +++ trunk/jvcl/archive/innosetupfiles/clean.bat 2007-06-23 22:58:58 UTC (rev 11379) @@ -0,0 +1,3 @@ +cd ..\ +del /s .cvsignore *.ddp *.dcu *.exe *.dsk *.cfg *.~* +cd install \ No newline at end of file Added: trunk/jvcl/archive/innosetupfiles/install.txt =================================================================== --- trunk/jvcl/archive/innosetupfiles/install.txt (rev 0) +++ trunk/jvcl/archive/innosetupfiles/install.txt 2007-06-23 22:58:58 UTC (rev 11379) @@ -0,0 +1,3 @@ +Before creating the install, make sure the JCLFOLDER define is correctly set for your current system. Also, +make a release checkout from CVS (to leave out all the CVS subfolders) and build the install with this script +from that folder. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |