implemented check for missing installed packages before openening a designer form

git-svn-id: trunk@7241 -
This commit is contained in:
mattias 2005-06-17 13:29:06 +00:00
parent c0cd818f26
commit f63de75308
4 changed files with 25 additions and 10 deletions

View File

@ -2128,8 +2128,8 @@ resourcestring
lisProbablyYouNeedToInstallSomePackagesForBeforeConti = 'Probably you need '
+'to install some packages for before continuing.%s%sWarning:%sThe '
+'project depends on some packages, which contain units with the Register '
+'procedure. The Register procedure is normally used to install '
+'components in the IDE. But the following units belong to packages '
+'procedure. The Register procedure is normally used to install '
+'components in the IDE. But the following units belong to packages '
+'which are not yet installed in the IDE. If you try to open a form in '
+'the IDE, that uses such components, you will get errors about missing '
+'components and the form loading will probably create very unpleasant '

View File

@ -4132,12 +4132,14 @@ end;
function TMainIDE.DoLoadLFM(AnUnitInfo: TUnitInfo;
Flags: TOpenFlags): TModalResult;
// if there is a .lfm file, open the resource
var
LFMFilename: string;
LFMBuf: TCodeBuffer;
begin
CloseDesignerForm(AnUnitInfo);
// Note: think about virtual and normal .lfm files.
LFMFilename:=ChangeFileExt(AnUnitInfo.Filename,'.lfm');
LFMBuf:=nil;
if not FileExistsInIDE(LFMFilename,[pfsfOnlyEditorFiles]) then begin
@ -4170,6 +4172,17 @@ var
APersistentClass: TPersistentClass;
ACaption, AText: String;
begin
// check installed packages
debugln('TMainIDE.DoLoadLFM A ',AnUnitInfo.Filename,' ',dbgs(AnUnitInfo.IsPartOfProject),' ');
if (Flags*[ofProjectLoading,ofMultiOpen]=[]) and AnUnitInfo.IsPartOfProject
then begin
debugln('TMainIDE.DoLoadLFM B ');
// opening a single form of the project -> check installed packages
Result:=PkgBoss.CheckProjectHasInstalledPackages(Project1);
if not (Result in [mrOk,mrIgnore]) then exit;
end;
// close old designer form
if CloseDsgnForm then
CloseDesignerForm(AnUnitInfo);
@ -11695,6 +11708,9 @@ end.
{ =============================================================================
$Log$
Revision 1.873 2005/06/17 13:29:05 mattias
implemented check for missing installed packages before openening a designer form
Revision 1.872 2005/06/08 08:02:08 mattias
added message parts to Help interface

View File

@ -527,7 +527,9 @@ begin
gtk_window_set_modal(GtkWindow, true);
gtk_widget_show(PGtkWidget(GtkWindow));
{$IFDEF Gtk1}
GDK_WINDOW_ACTIVATE(PGdkWindowPrivate(PGtkWidget(GtkWindow)^.window));
{$ENDIF}
{$IFDEF VerboseTransient}
DebugLn('TGtkWidgetSet.ShowModal ',Sender.ClassName);

View File

@ -137,7 +137,7 @@ if [ "$PkgType" = "deb" ]; then
else
# build fpc rpm
SpecFile=$TmpDir/install/fpc.spec
SpecFile=rpm/fpc.spec
SrcPatch=fpcsrc-patch
# update smart_strip.sh
@ -155,16 +155,13 @@ else
#----------------------------------------------------------------------------
# compile
#----------------------------------------------------------------------------
cd $TmpDir
#make rtl
#make compiler
if [ "$WithDOCS" = "no" ]; then
make rpm NODOCS=1
else
make rpm
export NODOCS=1
fi
cd $TmpDir
cd -
rpmbuild --nodeps -ba $SpecFile
#----------------------------------------------------------------------------
# put rpms to normal places
#----------------------------------------------------------------------------