Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2010-11

How to stop Lazarus from loading previous project on start?

17 messages · 8 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Bo Berglund

I am trying to re-install the old Sdpo package since I failed to make the SVN version install.

But I can for the life of me not stop Lazarus from opening old projects on startup so I get a chance to select the sdpo package to install...

It seems like closing any open project brings up a dialog where I *have* to select anoter one and if I don't the Lazarus just quits. Is it not possible to have Lazarus open *without* an active project? One would imagine that to be the normal behaviour to open a program and then inside the program select a document/file/project to work with....

Bo Berglund Developer in Sweden

Reply by email

Martin
to Bo Berglund
Bo Berglund wrote
But I can for the life of me not stop Lazarus from opening old projects on startup so I get a chance to select the sdpo package to install...

Enviroment / Options

There is a checkbox "Open last project at start" => uncheck it (it's on the first page "Files")

Lazarus will start with a new, empty, unsaved project.

As for "no project at all", that is not supported, at current Lazarus always has some project open

Reply by email

Bo Berglund
to Martin
Martin wrote 11 lines
On 02/11/2010 21:15, Bo Berglund wrote: > But I can for the life of me not stop Lazarus from opening old > projects on startup so I get a chance to select the sdpo package to > install... Enviroment / Options There is a checkbox "Open last project at start" => uncheck it (it's on the first page "Files") Lazarus will start with a new, empty, unsaved project.

Thanks, that did the trick!

But I am hosed anyway....

I did this:
- Restarted Lazarus, it created a new empty project
- Went to the Package menu and opened the sdposerial.lpk package
- In the package dialog I clicked Compile and this worked fine
- Then clicked Install and this worked for a while, but...

Now I have an error box:

Unable to find file "componenttreeview.pas"
If it belongs to your project, check search path in.... (long text follows)

The thing is that there is NO project loaded besides the default empty one and I don't know a thing about this componenttreeview.pas file, it is not part of the project in any case.

What to do now?
Uninstall Lazarus completely and erase the remaining files and start over?
Or is there some other solution?

All I wanted to do was resinstall the old sdposerial package since the SVN one caused install errors....

Bo Berglund Developer in Sweden

Reply by email

Martin
to Bo Berglund
Bo Berglund wrote 6 lines
Now I have an error box: Unable to find file "componenttreeview.pas" If it belongs to your project, check search path in.... (long text follows)

componenttreeview.pas is part of IDEIntf => a quick file search reveals that)

I assume you are compilng your package? => then you need IDEIntf as dependency to you package

Martin

Reply by email

Bo Berglund
to Martin
Martin wrote 13 lines
On 02/11/2010 21:57, Bo Berglund wrote: > > Now I have an error box: > > Unable to find file "componenttreeview.pas" > If it belongs to your project, check search path in.... (long text > follows) componenttreeview.pas is part of IDEIntf => a quick file search reveals that) I assume you are compilng your package? => then you need IDEIntf as dependency to you package

This is crazy, I just wanted to uninstall the 5dposerial package so I opened the Package/Configure packages dialog, selected the 5dpo package and clicked Uninstall.
Then after a little while the same stupid message appeared:

componenttreeview.pas(41,18) Fatal: Can't find unit ComponentTreeView
used by ObjectInspector

Why can't it find this when it obviously belongs to Lazarus itself? It has nothing to do with 5dpo and even so I am now trying to get rid of 5dpo alltogether....

I have absolutely no idea what to do about that since I have not touched anything remotely like such a file and it must have been present before, otherwise I would not have had a working Lazarus, right?

Note that this is not *my* package at all, it is a package for serial communications that I first downloaded from SF and since it was too old (not the most recent) today I got more recent files from SVN.

Sigh...

Bo Berglund Developer in Sweden

Reply by email

Mattias Gaertner
to Bo Berglund
Show quoted text 25 lines
On Tue, 02 Nov 2010 22:09:04 +0000, Martin wrote: >On 02/11/2010 21:57, Bo Berglund wrote: >> >> Now I have an error box: >> >> Unable to find file "componenttreeview.pas" >> If it belongs to your project, check search path in.... (long text >> follows) >componenttreeview.pas is part of IDEIntf => a quick file search reveals >that) > >I assume you are compilng your package? => then you need IDEIntf as >dependency to you package > This is crazy, I just wanted to uninstall the 5dposerial package so I opened the Package/Configure packages dialog, selected the 5dpo package and clicked Uninstall. Then after a little while the same stupid message appeared: componenttreeview.pas(41,18) Fatal: Can't find unit ComponentTreeView used by ObjectInspector Why can't it find this when it obviously belongs to Lazarus itself?

Because the compiler uses the same compiler message for different types of errors. The lazarus wiki lists more than 20 different reasons for this error message. IMO this is one of the biggest show stoppers. An expert system to help finding the cause is on my todo list. I guess:
The compiler found the objectinspector.ppu, which needs the componenttreeview.ppu, but for some reason, it does not like what it found.
Compile the whole Lazarus clean.
If this does not help:
Compile with -vut.

Show quoted text 11 lines
It has nothing to do with 5dpo and even so I am now trying to get rid of 5dpo alltogether.... I have absolutely no idea what to do about that since I have not touched anything remotely like such a file and it must have been present before, otherwise I would not have had a working Lazarus, right? Note that this is not *my* package at all, it is a package for serial communications that I first downloaded from SF and since it was too old (not the most recent) today I got more recent files from SVN.

When a package sets the wrong search paths it can create a mess.

Mattias

Reply by email

Martin
to Bo Berglund: This is crazy, I just wanted to uninstall the 5dposerial package so I opened the…
Bo Berglund wrote 21 lines
On Tue, 02 Nov 2010 22:09:04 +0000, Martin wrote: > On 02/11/2010 21:57, Bo Berglund wrote: >> Now I have an error box: >> >> Unable to find file "componenttreeview.pas" >> If it belongs to your project, check search path in.... (long text >> follows) > componenttreeview.pas is part of IDEIntf => a quick file search reveals > that) > > I assume you are compilng your package? => then you need IDEIntf as > dependency to you package > This is crazy, I just wanted to uninstall the 5dposerial package so I opened the Package/Configure packages dialog, selected the 5dpo package and clicked Uninstall. Then after a little while the same stupid message appeared: componenttreeview.pas(41,18) Fatal: Can't find unit ComponentTreeView used by ObjectInspector

- new version of fpc?
- 2 installations of lazarus on one PC?
- moved or copied the directory with your lazarus installation?
- removed lazarus, and installed a new lazarus to a diff location?

Reply by email

Bo Berglund
to Martin
Martin wrote 27 lines
On 02/11/2010 22:22, Bo Berglund wrote: > On Tue, 02 Nov 2010 22:09:04 +0000, Martin wrote: > >> On 02/11/2010 21:57, Bo Berglund wrote: >>> Now I have an error box: >>> >>> Unable to find file "componenttreeview.pas" >>> If it belongs to your project, check search path in.... (long text >>> follows) >> componenttreeview.pas is part of IDEIntf => a quick file search reveals >> that) >> >> I assume you are compilng your package? => then you need IDEIntf as >> dependency to you package >> > This is crazy, I just wanted to uninstall the 5dposerial package so I > opened the Package/Configure packages dialog, selected the 5dpo > package and clicked Uninstall. > Then after a little while the same stupid message appeared: > > componenttreeview.pas(41,18) Fatal: Can't find unit ComponentTreeView > used by ObjectInspector - new version of fpc? - 2 installations of lazarus on one PC? - moved or copied the directory with your lazarus installation? - removed lazarus, and installed a new lazarus to a diff location?

None of these...
What I did was this:
1) Installed Lazarus from the binary distro (Windows) a few weeks back
2) Downloaded the 5dpo comonent files from SourceForge
3) Copied them into lazarus/components
4) Installed the SdpoSerial component also a few weeks back
5) When using it found that the SF download contained old code
6) Installed SVN and retrieved the HEAD version of 5dpo
7) Copied this to lazarus/components (renamed existing folder first)
8) In Lazarus tried to install the SdpoSerial component again, failed
9) Renamed the Sdpo folders to reinstate the old situation
10) Tried uninstalling the 5Dpo package, failed
11) Tried compile the SdpoSerial package, no errors
12) Tried Install the SdpoSerial package, still the same error

What can I do except scrapping Lazarus and return to Delphi?

Bo Berglund Developer in Sweden

Reply by email

Bogusław Brandys
to Bo Berglund

W dniu 2010-11-03 07:28, Bo Berglund pisze:

Show quoted text 48 lines
On Wed, 03 Nov 2010 00:00:17 +0000, Martin wrote: > On 02/11/2010 22:22, Bo Berglund wrote: >> On Tue, 02 Nov 2010 22:09:04 +0000, Martin wrote: >> >>> On 02/11/2010 21:57, Bo Berglund wrote: >>>> Now I have an error box: >>>> >>>> Unable to find file "componenttreeview.pas" >>>> If it belongs to your project, check search path in.... (long text >>>> follows) >>> componenttreeview.pas is part of IDEIntf => a quick file search reveals >>> that) >>> >>> I assume you are compilng your package? => then you need IDEIntf as >>> dependency to you package >>> >> This is crazy, I just wanted to uninstall the 5dposerial package so I >> opened the Package/Configure packages dialog, selected the 5dpo >> package and clicked Uninstall. >> Then after a little while the same stupid message appeared: >> >> componenttreeview.pas(41,18) Fatal: Can't find unit ComponentTreeView >> used by ObjectInspector > > - new version of fpc? > - 2 installations of lazarus on one PC? > - moved or copied the directory with your lazarus installation? > - removed lazarus, and installed a new lazarus to a diff location? None of these... What I did was this: 1) Installed Lazarus from the binary distro (Windows) a few weeks back 2) Downloaded the 5dpo comonent files from SourceForge 3) Copied them into lazarus/components 4) Installed the SdpoSerial component also a few weeks back 5) When using it found that the SF download contained old code 6) Installed SVN and retrieved the HEAD version of 5dpo 7) Copied this to lazarus/components (renamed existing folder first) 8) In Lazarus tried to install the SdpoSerial component again, failed 9) Renamed the Sdpo folders to reinstate the old situation 10) Tried uninstalling the 5Dpo package, failed 11) Tried compile the SdpoSerial package, no errors 12) Tried Install the SdpoSerial package, still the same error What can I do except scrapping Lazarus and return to Delphi?

Rebuild Lazarus IDE with Clean all option, if that doesn't work rebuild from command line.

Reply by email

Bo Berglund
to Bogusław Brandys
Bogus?aw Brandys wrote 5 lines
> What can I do except scrapping Lazarus and return to Delphi? > Rebuild Lazarus IDE with Clean all option, if that doesn't work rebuild from command line.

That is something I have never done...

Tried command line after reading the WIKI:

C:\Programs\lazarus>make clean all
... Lots and lots of errors ....
Error makefile 3624: Command syntax error
Error makefile 3625: Command syntax error
*** 1814 errors during make ***

So that was not so successful...

Bo Berglund Developer in Sweden

Reply by email

Vladimir Zhirov
to Bo Berglund
Bo Berglund wrote 9 lines
Tried command line after reading the WIKI: C:\Programs\lazarus>make clean all ... Lots and lots of errors .... Error makefile 3624: Command syntax error Error makefile 3625: Command syntax error *** 1814 errors during make *** So that was not so successful...

You probably have Borland's make.exe or some other incompatible one in your PATH environment variable. You can try to ensure
<fpc install dir>\bin\i386-win32
is first entry in your PATH, or at least appears before Delphi/C++ Builder/etc. paths.

Alternatively you could try to create a batch file like the following:
------------8<------------
setlocal
set PATH=<fpc install dir>\bin\i386-win32;
make clean all
endlocal
------------>8------------
I'm not on Windows though so have not checked if it works. There may be some minor errors to be resolved: additional backslash at the end of path, etc.

Reply by email

Sven Barth
to Vladimir Zhirov
Vladimir Zhirov wrote 30 lines
Bo Berglund wrote: > Tried command line after reading the WIKI: > > C:\Programs\lazarus>make clean all > ... Lots and lots of errors .... > Error makefile 3624: Command syntax error > Error makefile 3625: Command syntax error > *** 1814 errors during make *** > > So that was not so successful... You probably have Borland's make.exe or some other incompatible one in your PATH environment variable. You can try to ensure <fpc install dir>\bin\i386-win32 is first entry in your PATH, or at least appears before Delphi/C++ Builder/etc. paths. Alternatively you could try to create a batch file like the following: ------------8<------------ setlocal set PATH=<fpc install dir>\bin\i386-win32; make clean all endlocal ------------>8------------ I'm not on Windows though so have not checked if it works. There may be some minor errors to be resolved: additional backslash at the end of path, etc.

Or just use in your command window:

C:\Programs\lazarus><fpc install dir>\bin\i386-win32\make clean all

If your Lazarus in C:\Programs was installed by the installer it should be something like this:

C:\Programs\lazarus>fpc\<fpc-version>\bin\i386-win32\make clean all

Regards,
Sven

Reply by email

Bo Berglund
to Vladimir Zhirov: You probably have Borland's make.exe or some other incompatible one in your PATH…
Vladimir Zhirov wrote 14 lines
Bo Berglund wrote: > Tried command line after reading the WIKI: > > C:\Programs\lazarus>make clean all > ... Lots and lots of errors .... > Error makefile 3624: Command syntax error > Error makefile 3625: Command syntax error > *** 1814 errors during make *** > > So that was not so successful... You probably have Borland's make.exe or some other incompatible one in your PATH environment variable.

You were probably right because when I explicitly pointed to the fpc make.exe I did not get all these strange errors. :-)

Question:
I have unsuccessfully thought about this before; is there a command that makes it possible to find out (from the command line) which path is used to a certain program or file?

Something like
findpath make.exe

It would be real handy to have a utility like this that could find out which paths files reside in and this would of course also list all files found in the current path setting...

Maybe I should write one myself...

Bo Berglund Developer in Sweden

Reply by email

Bo Berglund
to Sven Barth: Or just use in your command window: C:\Programs\lazarus><fpc install…
Sven Barth wrote 9 lines
Or just use in your command window: C:\Programs\lazarus><fpc install dir>\bin\i386-win32\make clean all If your Lazarus in C:\Programs was installed by the installer it should be something like this: C:\Programs\lazarus>fpc\<fpc-version>\bin\i386-win32\make clean all

I used this (on one line):
C:\Programs\lazarus>C:\Programs\lazarus\fpc\2.2.4\bin\i386-win32\make clean all

This time everything went fine and Lazarus is now recompiled without the 5dpo package and yet the code I am writing using the SdpoSerial component seems to be OK. :-)

Thanks for the analysis and suggestions!

Bo Berglund Developer in Sweden

Reply by email

Bo Berglund
to Bo Berglund

On Thu, 04 Nov 2010 18:35:19 +0100, Bo Berglund
wrote:

Just a follow-up:
I made a small utility to find a file on path and used it on the PC where Lazarus is installed.
Result:

C:\findfile make.exe
C:\Programs\Borland\BDS\4.0\Bin\make.exe
C:\Programs\Borland\Delphi7\Bin\make.exe

As you can see the only make on path is actually from Borland (two copies).

So this raises the question if FPC should not put itself on path during installation? Otherwise one MUST always specify a long path to the make utility in fpc when rebuilding lazarus....

Bo Berglund Developer in Sweden

Reply by email

Vincent Snijders
to Bo Berglund

2010/11/4 Bo Berglund :

Show quoted text 18 lines
On Thu, 04 Nov 2010 18:35:19 +0100, Bo Berglund wrote: Just a follow-up: I made a small utility to find a file on path and used it on the PC where Lazarus is installed. Result: C:\findfile make.exe C:\Programs\Borland\BDS\4.0\Bin\make.exe C:\Programs\Borland\Delphi7\Bin\make.exe As you can see the only make on path is actually from Borland (two copies). So this raises the question if FPC should not put itself on path during installation? Otherwise one MUST always specify a long path to the make utility in fpc when rebuilding lazarus....

If you install fpc stand-alone, it will after asking.

If you install the lazarus IDE, it doesn't, because you can build using the IDE itself. It will only break existing Delphi tools which use Delphi's make.

So, no, it should not.

Vincent

Reply by email

José Mejuto
to Bo Berglund: On Thu, 04 Nov 2010 18:35:19 +0100, Bo Berglund Just a follow-up: I made a small utility…

Hello Lazarus-List,

Thursday, November 4, 2010, 9:28:45 PM, you wrote:

BB> I made a small utility to find a file on path and used it on the PC BB> where Lazarus is installed.
BB> Result:
BB> C:\findfile make.exe
BB> C:\Programs\Borland\BDS\4.0\Bin\make.exe
BB> C:\Programs\Borland\Delphi7\Bin\make.exe
BB> As you can see the only make on path is actually from Borland (two BB> copies).
BB> So this raises the question if FPC should not put itself on path BB> during installation? Otherwise one MUST always specify a long path to BB> the make utility in fpc when rebuilding lazarus....

Just try to avoid PATH use, it only will bring you problems constantly. My path only points to Windows related folders and maybe to some program that strictly need it to work. Lazarus does not need a path environment set to work properly.

When a path is strictly needed in command line (like the make case) I build a little bat that preserve current path, add the needed path, execute the make or alike and restores the old path.

Since I do this things in this way I had removed a lot of headaches.

Best regards, Jos?

Reply by email