Pages: 1
Author Topic: On Settings and Dependencies  (44,254 Views)
Offline (Unknown gender) Josh @ Dreamland

Prince of all Goldfish
Developer
Joined: Feb 2008
Posts: 2,950
View profile
Posted on: May 05, 2010, 02:22:18 AM
It may behoove me to write a makefile generator based off of my C parser; specifically, its preprocessor (rather, the segment of code that preprocesses, since a distinct pass is not made for the matter). The modification would be relatively simple; it seems I can just add anything #include""ed (note the "", not <>)  to the list of dependencies for a file. Automake is another option. A uniform or empty dependency list is a third and final ugly option that would yield pain.
Either way, the proposal is this: Along with a config file to identify the system, each system should have a settings file outlined either in the config file or a settingsOutline file. Basically, the former will read

#define SETTING_PRIMITIVES_REQUIRE_VBO false
#define SETTING_PRIMITIVES_REQUIRE_FBO false


And the latter will contain

Settings:
option "Require VBO Extension" defines "SETTING_PRIMITIVES_REQUIRE_VBO" as boolean defaults to "false"
option "Require FBO Extension" defines "SETTING_PRIMITIVES_REQUIRE_FBO" as boolean defaults to "false"


From that, LGM will generate a checkbox (boolean) with the English string above. Other options than boolean can be discussed later; XML would be a pain but is a consideration for combo boxes, etc.
From the same, ENIGMA will check a settings header, settings.h, to make sure it matches up (yes, perfectly; it should be entirely generated) with the data from LGM. If it doesn't, it will be opened for write and reconstructed.

The reason is quite simple. Make will not rebuild a file as long as nothing it includes has been modified. This means that ENIGMA shouldn't touch the settings file in write mode if it doesn't intend to change something in particular, or stuff will rebuild all the time (This is not what is causing the current problems, as this idea has just been thought up).

Ism's is basically the only opinion that counts here. This means work for both of us, but will greatly increase extensibility and avoid hard-coded options. Problem for Ism is calculated the size of the window and placement of the options; a simple process in Win32 may not be easy with Java.

So...
Offline (Unknown gender) IsmAvatar

LateralGM Developer
LGM Developer
Joined: Apr 2008
Posts: 877
View profile
Reply #1 Posted on: May 05, 2010, 05:17:23 AM
Java UI tends to be a fair bit simpler than Win32 or any of the other ones. I simply add the components to the settings pane. It calculates its own size and their size and placement.
Offline (Unknown gender) score_under

Member
Joined: Aug 2008
Posts: 308
View profile
Reply #2 Posted on: May 05, 2010, 03:53:37 PM
Quote from: Josh @ Dreamland on May 05, 2010, 02:22:18 AMIt may behoove me
Damn, a long time since I last saw that word. You should write fantasy novels, you get to make puns involving centaurs.
Offline (Unknown gender) Josh @ Dreamland

Prince of all Goldfish
Developer
Joined: Feb 2008
Posts: 2,950
View profile
Reply #3 Posted on: May 05, 2010, 05:17:59 PM
Good, then consider it a plan. Can you have it in a scroll field with expandable groups by file, if we have too many options? Or perhaps in different tabs?
Offline (Unknown gender) freezway

Member
Joined: Jan 2010
Posts: 220
View profile
Reply #4 Posted on: May 05, 2010, 10:25:52 PM
score_under: +1
Offline (Unknown gender) IsmAvatar

LateralGM Developer
LGM Developer
Joined: Apr 2008
Posts: 877
View profile
Reply #5 Posted on: May 05, 2010, 10:33:12 PM
I could add a tab for it and list them vertically, once we get more than 2. In the meantime, I'll just add it in with the list of compatibility options. Also, one of these days we need to add Enigma Options in to the communication between Java<->DLL, so that you can actually make use of my options.
Offline (Unknown gender) Josh @ Dreamland

Prince of all Goldfish
Developer
Joined: Feb 2008
Posts: 2,950
View profile
Reply #6 Posted on: May 06, 2010, 12:21:11 AM
Haha, indeed. I forgot I did not, after I spent the effort implementing them. In fact, I guess they are untested except defaults. :D
Offline (Unknown gender) IsmAvatar

LateralGM Developer
LGM Developer
Joined: Apr 2008
Posts: 877
View profile
Reply #7 Posted on: May 06, 2010, 05:25:56 PM
Just tell me what you want the options to read, and they'll be in there before you can figure out the correct pronunciation of "classificatory".
Pages: 1