mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-30 15:50:25 +02:00
implemented check for missing installed packages before openening a designer form
git-svn-id: trunk@7241 -
This commit is contained in:
parent
c0cd818f26
commit
f63de75308
@ -2128,8 +2128,8 @@ resourcestring
|
|||||||
lisProbablyYouNeedToInstallSomePackagesForBeforeConti = 'Probably you need '
|
lisProbablyYouNeedToInstallSomePackagesForBeforeConti = 'Probably you need '
|
||||||
+'to install some packages for before continuing.%s%sWarning:%sThe '
|
+'to install some packages for before continuing.%s%sWarning:%sThe '
|
||||||
+'project depends on some packages, which contain units with the Register '
|
+'project depends on some packages, which contain units with the Register '
|
||||||
+'procedure. The Register procedure is normally used to install '
|
+'procedure. The Register procedure is normally used to install '
|
||||||
+'components in the IDE. But the following units belong to packages '
|
+'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 '
|
+'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 '
|
+'the IDE, that uses such components, you will get errors about missing '
|
||||||
+'components and the form loading will probably create very unpleasant '
|
+'components and the form loading will probably create very unpleasant '
|
||||||
|
16
ide/main.pp
16
ide/main.pp
@ -4132,12 +4132,14 @@ end;
|
|||||||
|
|
||||||
function TMainIDE.DoLoadLFM(AnUnitInfo: TUnitInfo;
|
function TMainIDE.DoLoadLFM(AnUnitInfo: TUnitInfo;
|
||||||
Flags: TOpenFlags): TModalResult;
|
Flags: TOpenFlags): TModalResult;
|
||||||
|
// if there is a .lfm file, open the resource
|
||||||
var
|
var
|
||||||
LFMFilename: string;
|
LFMFilename: string;
|
||||||
LFMBuf: TCodeBuffer;
|
LFMBuf: TCodeBuffer;
|
||||||
begin
|
begin
|
||||||
CloseDesignerForm(AnUnitInfo);
|
CloseDesignerForm(AnUnitInfo);
|
||||||
|
|
||||||
|
// Note: think about virtual and normal .lfm files.
|
||||||
LFMFilename:=ChangeFileExt(AnUnitInfo.Filename,'.lfm');
|
LFMFilename:=ChangeFileExt(AnUnitInfo.Filename,'.lfm');
|
||||||
LFMBuf:=nil;
|
LFMBuf:=nil;
|
||||||
if not FileExistsInIDE(LFMFilename,[pfsfOnlyEditorFiles]) then begin
|
if not FileExistsInIDE(LFMFilename,[pfsfOnlyEditorFiles]) then begin
|
||||||
@ -4170,6 +4172,17 @@ var
|
|||||||
APersistentClass: TPersistentClass;
|
APersistentClass: TPersistentClass;
|
||||||
ACaption, AText: String;
|
ACaption, AText: String;
|
||||||
begin
|
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
|
if CloseDsgnForm then
|
||||||
CloseDesignerForm(AnUnitInfo);
|
CloseDesignerForm(AnUnitInfo);
|
||||||
|
|
||||||
@ -11695,6 +11708,9 @@ end.
|
|||||||
|
|
||||||
{ =============================================================================
|
{ =============================================================================
|
||||||
$Log$
|
$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
|
Revision 1.872 2005/06/08 08:02:08 mattias
|
||||||
added message parts to Help interface
|
added message parts to Help interface
|
||||||
|
|
||||||
|
@ -527,7 +527,9 @@ begin
|
|||||||
|
|
||||||
gtk_window_set_modal(GtkWindow, true);
|
gtk_window_set_modal(GtkWindow, true);
|
||||||
gtk_widget_show(PGtkWidget(GtkWindow));
|
gtk_widget_show(PGtkWidget(GtkWindow));
|
||||||
|
{$IFDEF Gtk1}
|
||||||
GDK_WINDOW_ACTIVATE(PGdkWindowPrivate(PGtkWidget(GtkWindow)^.window));
|
GDK_WINDOW_ACTIVATE(PGdkWindowPrivate(PGtkWidget(GtkWindow)^.window));
|
||||||
|
{$ENDIF}
|
||||||
|
|
||||||
{$IFDEF VerboseTransient}
|
{$IFDEF VerboseTransient}
|
||||||
DebugLn('TGtkWidgetSet.ShowModal ',Sender.ClassName);
|
DebugLn('TGtkWidgetSet.ShowModal ',Sender.ClassName);
|
||||||
|
@ -137,7 +137,7 @@ if [ "$PkgType" = "deb" ]; then
|
|||||||
else
|
else
|
||||||
# build fpc rpm
|
# build fpc rpm
|
||||||
|
|
||||||
SpecFile=$TmpDir/install/fpc.spec
|
SpecFile=rpm/fpc.spec
|
||||||
SrcPatch=fpcsrc-patch
|
SrcPatch=fpcsrc-patch
|
||||||
|
|
||||||
# update smart_strip.sh
|
# update smart_strip.sh
|
||||||
@ -155,16 +155,13 @@ else
|
|||||||
#----------------------------------------------------------------------------
|
#----------------------------------------------------------------------------
|
||||||
# compile
|
# compile
|
||||||
#----------------------------------------------------------------------------
|
#----------------------------------------------------------------------------
|
||||||
cd $TmpDir
|
|
||||||
#make rtl
|
|
||||||
#make compiler
|
|
||||||
if [ "$WithDOCS" = "no" ]; then
|
if [ "$WithDOCS" = "no" ]; then
|
||||||
make rpm NODOCS=1
|
export NODOCS=1
|
||||||
else
|
|
||||||
make rpm
|
|
||||||
fi
|
fi
|
||||||
|
cd $TmpDir
|
||||||
cd -
|
cd -
|
||||||
|
rpmbuild --nodeps -ba $SpecFile
|
||||||
|
|
||||||
#----------------------------------------------------------------------------
|
#----------------------------------------------------------------------------
|
||||||
# put rpms to normal places
|
# put rpms to normal places
|
||||||
#----------------------------------------------------------------------------
|
#----------------------------------------------------------------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user