Sign in Join

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

Mailing lists / lazarus / 2012-01

moving a project and its files

8 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

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

Roberto P.

Hi List,

I need to move a project from a folder to another one; I tried using "publish project", but not all files belonging to it were moved. Also the hierarchy was lost; my projects always have the following folder structure:
project_folder
\------------------- project.lpi
\------------------- project.lpr
\------------------- project.exe
\------------------- UnitMain.pas
\------------------- UnitMain.lfm
... other "main" files ...
\------------------- src\
\--------------------------- UnitDebug.pas
\--------------------------- UnitOther.pas
... other source files ...
\------------------- obj\
\--------------------------- all the files that are automatically created during build.

I then tried to "Save project as" into the new folder and then moving all the following:
*.lfm
*.pas
*.lpi
*.lpr

but then it complains that there are missing resources. The original project was created with lazarus 0.9.28.2 and now I'm using an own built 0.9.31 (specific svn r30999), so the resource management has changed.
I then removed all $I with .lrs and added the {$R *.res}

Finally, it compiles and build fine.......but: the main form doesn't show up when the application starts !!!
Of course I can see it and change in the IDE, I checked it is listed in the Forms List.....

What can i check next ?
BTW, what is the correct "project move" procedure? (given that publishing it has missed a lot of files).
Finally, any opinion on my choice of project folder structure? Any better suggestion?

Thanks all!

R#
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20120125/26a6d655/attachment.html>

Reply by email

Roberto P.
to Mattias Gaertner

2012/1/25 Mattias Gaertner

Show quoted text 10 lines
On Wed, 25 Jan 2012 09:14:00 +0100 "Roberto P." wrote: > Hi List, > > I need to move a project from a folder to another one; Use your favorite file browser and copy/move the folder.

Ok, I wasn't clear....with "moving" I also meant that I have to rename it while reconstructing it at the other place.
Meanwhile I discovered that somehow (maybe with the save project as?) the auto-creation of the main form disappered from the list in the project options, together with the corresponding line in the .lpr file. After adding that back it works.

What are the files that have to be added to our versioning system to be able to chekout a copy somewhere else? Or, which files are automatically generated by lazarus?

Thanks

Show quoted text 10 lines
>[...] Mattias -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20120125/08e6fb64/attachment.html>

Reply by email

Mattias Gaertner
to Roberto P.
Show quoted text 22 lines
2012/1/25 Mattias Gaertner > On Wed, 25 Jan 2012 09:14:00 +0100 > "Roberto P." wrote: > > > Hi List, > > > > I need to move a project from a folder to another one; > > Use your favorite file browser and copy/move the folder. > > Ok, I wasn't clear....with "moving" I also meant that I have to rename it while reconstructing it at the other place. Meanwhile I discovered that somehow (maybe with the save project as?) the auto-creation of the main form disappered from the list in the project options, together with the corresponding line in the .lpr file. After adding that back it works. What are the files that have to be added to our versioning system to be able to chekout a copy somewhere else? Or, which files are automatically generated by lazarus?

Set a unit output directory in the compiler options and then compile. These files don't need to be stored in the versioning system. The project target file (.exe or .app) is also auto created if missing.

And see here:
http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_meaning_of_the_various_file_extensions_used_by_Lazarus.3F

Mattias

Reply by email

Roberto P.
to Mattias Gaertner

2012/1/25 Mattias Gaertner

Show quoted text 19 lines
On Wed, 25 Jan 2012 12:20:50 +0100 "Roberto P." wrote: > 2012/1/25 Mattias Gaertner > > > On Wed, 25 Jan 2012 09:14:00 +0100 > > "Roberto P." wrote: > > > > > Hi List, Set a unit output directory in the compiler options and then compile. These files don't need to be stored in the versioning system. The project target file (.exe or .app) is also auto created if missing. And see here: http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_meaning_of_the_various_file_extensions_used_by_Lazarus.3F

Thanks! I haven't found that wiki page before.

R#
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20120125/c62a58d7/attachment.html>

Reply by email

Hans-Peter Diettrich
to Roberto P.: 2012/1/25 Mattias Gaertner Ok, I wasn't clear....with "moving" I also meant that I have…
What are the files that have to be added to our versioning system to be able to chekout a copy somewhere else? Or, which files are automatically generated by lazarus?

I don't remember where exporting projects is described :-(

Recommended are certain project settings, which force evitable (editing, session specific...) information into distinct files. Also the resource type (lrs/fpc) should be set to <what?>. The help on Project Options may shed some light on it, in detail on Session and Miscellaneous options, but I found it not really helpful :-(

Some default files (program icon...) can be omitted from the distribution, they can be generated by the IDE on demand. E.g. "Save .lrs files in the output directory" suggests that these files can be omitted from a distribution.

If somebody remembers where exporting/distributing projects is described in the wiki, please supply the according link.

DoDi

Reply by email

Roberto P.
to Hans-Peter Diettrich

2012/1/25 Hans-Peter Diettrich

Show quoted text 22 lines
Roberto P. schrieb: What are the files that have to be added to our versioning system to be > able to chekout a copy somewhere else? Or, which files are automatically > generated by lazarus? > I don't remember where exporting projects is described :-( Recommended are certain project settings, which force evitable (editing, session specific...) information into distinct files. Also the resource type (lrs/fpc) should be set to <what?>. The help on Project Options may shed some light on it, in detail on Session and Miscellaneous options, but I found it not really helpful :-( Some default files (program icon...) can be omitted from the distribution, they can be generated by the IDE on demand. E.g. "Save .lrs files in the output directory" suggests that these files can be omitted from a distribution.

I usually use the output directory, as I wrote in my first email, but in the main folder there are .rc and .res file that seems to be generated automatically. Shall they be versioned?

Show quoted text 13 lines
If somebody remembers where exporting/distributing projects is described in the wiki, please supply the according link. DoDi -- ______________________________**_________________ Lazarus mailing list .**freepascal.org http://lists.lazarus.**freepascal.org/mailman/**listinfo/lazarus<http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20120125/6e54a59f/attachment.html>

Reply by email

Mattias Gaertner
to Roberto P.
Show quoted text 6 lines
2012/1/25 Hans-Peter Diettrich [...] I usually use the output directory, as I wrote in my first email, but in the main folder there are .rc and .res file that seems to be generated automatically. Shall they be versioned?

Yes.

Mattias

Reply by email