thomthom / citygen

Automatically exported from code.google.com/p/citygen
MIT License
1 stars 1 forks source link

Make existing modules installation location relative to installer. #3

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Rewrite existing modules so that theya re not hardwired to a specific 
directory.  They need to be able to install regardless of their path.  Or 
something like that.

Original issue reported on code.google.com by fullmer....@gmail.com on 5 Jun 2009 at 8:57

GoogleCodeExporter commented 8 years ago
Do we really want modules scattered?

Original comment by thomasse...@gmail.com on 9 Jun 2009 at 7:24

GoogleCodeExporter commented 8 years ago
I don't know.  In my mind I see like 20 building generators being possible.  
The idea
of them all floating around a folder with all the street generators and block
generators and such seems messy.  But I'm open.  We can always change the 
structure
later, especially if we make them so they load relative to the loader file.

Also, Jim is possibly setting up his mercurial differently, which would require 
the
plugins to load from a relative location to the loader file and not a fixed 
location.

But should we just plan on having all modules live together inside the single 
modules
folder?  I'm fine with that.  I'm sure it won't get overcrowded for quite a 
while.

I think we need some sort of method for the module to let the core know what 
type of
module it is so the core knows how to load it.  Global variable?  Or can we use 
a
class variable across multiple files?

Original comment by fullmer....@gmail.com on 9 Jun 2009 at 7:36

GoogleCodeExporter commented 8 years ago
If you check out my SG module you'll see that I have some ID and version info 
that's
available for the module so it can be identified.

As things are now, the core loads all .rb files in the /modules/ folder. You 
could
keep only a loader for that folder, and keep the various building modules in a
Building Module folder.

Original comment by thomasse...@gmail.com on 10 Jun 2009 at 10:42

GoogleCodeExporter commented 8 years ago
There's also the issue with webdialogs.

At the moment I put some core JS and CSS files in the /citygen/modules/ folder. 
In
order for the SG webdialog it needs to be able to locate these files - and that
requires a predictable relative path...

Original comment by thomasse...@gmail.com on 10 Jun 2009 at 11:22