Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ TheIDE » U++ TheIDE: Packages » Why each package should reside in its own directory?
icon5.gif  Why each package should reside in its own directory? [message #15263] Sun, 13 April 2008 19:12 Go to next message
Novo is currently offline  Novo
Messages: 1358
Registered: December 2006
Ultimate Contributor
Directory per project seems to be a strong constraint.

Why not just use a name of an UPP project file to name a project if there is more than one project file in a directory?

Otherwise it is hard to adapt old projects to TheIDE, especially when they are third-party projects and TheIDE is used as a build tool.

Please correct me if I'm wrong.


Regards,
Novo

[Updated on: Sun, 13 April 2008 19:14]

Report message to a moderator

Re: Why each package should reside in its own directory? [message #15264 is a reply to message #15263] Mon, 14 April 2008 08:17 Go to previous messageGo to next message
Mindtraveller is currently offline  Mindtraveller
Messages: 917
Registered: August 2007
Location: Russia, Moscow rgn.
Experienced Contributor

One dir per project came from years of experience with environments like MS Visual Studio or Borland C++ Builder, and complex projects developed under them. The main idea of IDE is creation of "real" (complex enough to be commercial) applications, not etudes or simple tests. So this way one dir per project (package) seems very natural. If you`ve developed commercial apps, you should know that it`s rather obvious solution.
Re: Why each package should reside in its own directory? [message #15270 is a reply to message #15264] Mon, 14 April 2008 17:01 Go to previous messageGo to next message
Novo is currently offline  Novo
Messages: 1358
Registered: December 2006
Ultimate Contributor
I do have some experience in commercial software development Wink

And I’m not saying that packages are a bad idea. Smile

The problem is that the package system in its current state cannot be used to build non package-organized software. For example, I have a bunch of third-party libraries I’m using in my projects, sometimes I need to improve these third-party libraries. That means that I cannot change structure of somebodies code because I want to keep that code up-to-date using different version control systems, and I cannot use TheIDE to build that code because it is non package-organized.

I also have approximately 50 my own libraries. Many of them are package-organized, but several reside in one directory. Restructuring that bunch of code just to be able to build it under TheIDE is quite painful.

I’ll try to restructure my own code. But what I’m supposed to do with somebodies code?

TIA



Regards,
Novo

[Updated on: Tue, 15 April 2008 22:31]

Report message to a moderator

Re: Why each package should reside in its own directory? [message #15280 is a reply to message #15270] Tue, 15 April 2008 11:13 Go to previous messageGo to next message
masu is currently offline  masu
Messages: 378
Registered: February 2006
Senior Member
I would keep them separately and add includes and libs as needed.
Then you can update the external libs as you want and also use it within TheIDE.
It is equivalent of handling for example OpenGL libs within TheIDE.

You could even use TheIDE's command line feature to automate your building tasks (update external libs, rebuild them, recompile TheIDE project).

I do not see any disadvantages in doing so.

Matthias
Re: Why each package should reside in its own directory? [message #15298 is a reply to message #15280] Tue, 15 April 2008 22:27 Go to previous messageGo to next message
Novo is currently offline  Novo
Messages: 1358
Registered: December 2006
Ultimate Contributor
masu wrote on Tue, 15 April 2008 05:13

I would keep them separately and add includes and libs as needed.
Then you can update the external libs as you want and also use it within TheIDE.
It is equivalent of handling for example OpenGL libs within TheIDE.



GLCtrl is using a prebuilt version of OpenGL.

In case of prebuilt third-party libraries I would lose such nice features of TheIDE’s like BLITZ, code navigation, and code completion. Actually, I’d like to use BLITZ because in large projects changing of one line of code can cause 15-30 minutes of recompilation. UPP files are easy to create and they work on Windows and Linux.

B.T.W. Creating of a package, which includes only one file, seems to be overkill. (I mean one cpp file per directory.)

Quote:


You could even use TheIDE's command line feature to automate your building tasks (update external libs, rebuild them, recompile TheIDE project).

I do not see any disadvantages in doing so.

Matthias


Sorry, I couldn’t figure out how to use it.


Regards,
Novo

[Updated on: Tue, 15 April 2008 22:29]

Report message to a moderator

Re: Why each package should reside in its own directory? [message #15302 is a reply to message #15298] Tue, 15 April 2008 23:39 Go to previous messageGo to next message
Novo is currently offline  Novo
Messages: 1358
Registered: December 2006
Ultimate Contributor
Novo wrote on Tue, 15 April 2008 16:27


Quote:


You could even use TheIDE's command line feature to automate your building tasks (update external libs, rebuild them, recompile TheIDE project).

I do not see any disadvantages in doing so.

Matthias


Sorry, I couldn’t figure out how to use it.



I found that in the manual. Wink

An -h command-line key for umk would make that process much easier. Smile

Putting command-line keys into first position would make umk even easier to use, because the very first thing I (and probably everybody else) would do is to call "umk -h". It is somewhat complicated to figure out that you have to call "umk assembly package build_method -h" to get a help screen. Wink

Thanks for pointing out.


Regards,
Novo

[Updated on: Fri, 02 May 2008 03:32]

Report message to a moderator

Re: Why each package should reside in its own directory? [message #15351 is a reply to message #15263] Thu, 17 April 2008 06:16 Go to previous messageGo to next message
Novo is currently offline  Novo
Messages: 1358
Registered: December 2006
Ultimate Contributor
Novo wrote on Sun, 13 April 2008 13:12


Otherwise it is hard to adapt old projects to TheIDE, especially when they are third-party projects and TheIDE is used as a build tool.



I figured out that myself Wink

The answer is:

Do not keep your C++ and project files in one basket (directory).


Putting project files somewhere else doesn't force you to create a bunch of subdirectories in your project and follow good design principles. Wink

There is always a way to avoid good design ...


Regards,
Novo
Re: Why each package should reside in its own directory? [message #18301 is a reply to message #15263] Sun, 21 September 2008 20:34 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Novo wrote on Sun, 13 April 2008 13:12

Directory per project seems to be a strong constraint.

Why not just use a name of an UPP project file to name a project if there is more than one project file in a directory?

Otherwise it is hard to adapt old projects to TheIDE, especially when they are third-party projects and TheIDE is used as a build tool.

Please correct me if I'm wrong.



Actually, it is a directory per package.

E.g. "ide" project has definitely much more than single directory...

And there is even more flexibility to it: Package directory can have subdirectories, which can either be packages too or sources from them can be directly referenced in package.

Also, sometimes when adopting 3rdparty sources, you can use approach demonstrated in plugin/png...

Mirek
Re: Why each package should reside in its own directory? [message #18304 is a reply to message #18301] Sun, 21 September 2008 22:37 Go to previous messageGo to next message
Novo is currently offline  Novo
Messages: 1358
Registered: December 2006
Ultimate Contributor
luzr wrote on Sun, 21 September 2008 14:34


Also, sometimes when adopting 3rdparty sources, you can use approach demonstrated in plugin/png...

Mirek


In case of plugin/png and other plugins you copy files into plugin/<pakage> directory. I do not want to do that because I want to keep original source code structure, and I want that because I want to be able to update third-party source code from original VCS (CVS, SVN, Mercurial, Monotone, etc).

Another issue with UPP-project files is that project-files use absolute absolute paths. That makes impossible to move project files between computers and different OS. Actually, it is possible, but you need to fix directory names all the time. It is complicated if you have a hundred of them.


Regards,
Novo
Re: Why each package should reside in its own directory? [message #18305 is a reply to message #18304] Mon, 22 September 2008 00:23 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Novo wrote on Sun, 21 September 2008 16:37

luzr wrote on Sun, 21 September 2008 14:34


Also, sometimes when adopting 3rdparty sources, you can use approach demonstrated in plugin/png...

Mirek


In case of plugin/png and other plugins you copy files into plugin/<pakage> directory. I do not want to do that because I want to keep original source code structure, and I want that because I want to be able to update third-party source code from original VCS (CVS, SVN, Mercurial, Monotone, etc).



Why cannot your original source code structure start at package folder? (with U++ wrapper if needed).

Quote:


Another issue with UPP-project files is that project-files use absolute absolute paths. That makes impossible to move project files between computers and different OS.



Huh? The main purpose is to AVOID the need for absolute paths. All package file paths are package directory relative, UNLESS you use "Add any file" (which is only for the use in very specific situations).

Mirek
Re: Why each package should reside in its own directory? [message #18308 is a reply to message #18305] Mon, 22 September 2008 06:25 Go to previous messageGo to next message
Novo is currently offline  Novo
Messages: 1358
Registered: December 2006
Ultimate Contributor
luzr wrote on Sun, 21 September 2008 18:23



Why cannot your original source code structure start at package folder? (with U++ wrapper if needed).



Because they are big and have complicated structure.
Actually, as I wrote previously, I found a solution.
I can create a fake package structure with no source code in it. The source code resides somewhere else. Absolute and relative path seem to work with project files, but the ability to use environment variables in project files (like SOMETHING_ROOT) would make them even more flexible. (Probably, it is already possible, and I just do not know how to do that.)

Quote:


Quote:


Another issue with UPP-project files is that project-files use absolute absolute paths. That makes impossible to move project files between computers and different OS.



Huh? The main purpose is to AVOID the need for absolute paths. All package file paths are package directory relative, UNLESS you use "Add any file" (which is only for the use in very specific situations).

Mirek



Sorry, it passed a long time since I opened this discussion, so I forgot the details Sad. I meant var-files. I believe they are assembly-files.


Basically, everything is fine with the assembly-package-etc structure. I like BLITZ and I'd like to convert all my projects to TheIDE. It is just not that easy because I have more than fifty of them. I cannot afford to wait for an hour till they all rebuild. So, I'm spending my time developing parsers and project-file generators.


Regards,
Novo

[Updated on: Mon, 22 September 2008 06:27]

Report message to a moderator

Re: Why each package should reside in its own directory? [message #18310 is a reply to message #18308] Mon, 22 September 2008 07:45 Go to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Novo wrote on Mon, 22 September 2008 00:25


Sorry, it passed a long time since I opened this discussion, so I forgot the details Sad. I meant var-files. I believe they are assembly-files.



Well, but you need to specify some path in the end... With assemblies, you specify as little as possible...

Quote:


Basically, everything is fine with the assembly-package-etc structure. I like BLITZ and I'd like to convert all my projects to TheIDE. It is just not that easy because I have more than fifty of them. I cannot afford to wait for an hour till they all rebuild. So, I'm spending my time developing parsers and project-file generators.



I see.

Well, of course not in all cases is source-based conversion desirable or possible. I remember that we gave-up with SSL - there is simply too many files and configuration in sources...

Mirek
Previous Topic: vsprintf() doesn't support "%I64u" format in Win32 platform?
Next Topic: Problem trying to run the example package OleCalc
Goto Forum:
  


Current Time: Thu Mar 28 13:07:00 CET 2024

Total time taken to generate the page: 0.01408 seconds