edbrowse-dev - development list for edbrowse
 help / color / mirror / Atom feed
* [Edbrowse-dev] Just edbrowse
@ 2016-01-02 16:09 Karl Dahlke
  2016-01-02 20:17 ` Geoff McLane
  2016-01-03 10:48 ` Adam Thompson
  0 siblings, 2 replies; 6+ messages in thread
From: Karl Dahlke @ 2016-01-02 16:09 UTC (permalink / raw)
  To: Edbrowse-dev

Boy we do some silly things for historical reasons.

edbrowse-js was once a different executable, so of course had to be called
something different, like edbrowse-js.
But then there was one executable doing two different things,
and still I called the js version edbrowse-js.
Software inertia I suppose.
switch on argv[0], set whichproc to 'e' or 'j', etc etc.
I could symlink one to the other in unix, but not in windows.
It has to be a copy, in the same bin.
In fact this opens up a whole can of worms in windows.
We have to copy the same exe to different names,
and then there's the debug convention that sticks d somewhere in the name,
not entirely sure,
but there's a lot of code to try to build the pathname of edbrowse-js, or edbrowse-d-js.exe,
in whatever bin, and wow!

We really don't need this complexity.

For the js engine, invoke
edbrowse --runjs
for the curl server, invoke
edbrowse --runcurl
and so on for as many variations as we wish, never having to change makefiles
or CMakeLists.txt again.
And we can throw away all that code around ebjs.c line 67,
because all you have to do is run argv[0] with different arguments.
If argv[1] is one of our magic strings, set whichproc appropriately
and run in that mode.

Perhaps magic string arguments aren't your cup of tea,
but it's far better than all the build / distribution issues, and symlinks or copies
of renamed images in the correct bins, and so on.
Geoff is on this list now, so feel free to chime in and tell us
that this is definitely the way to go.

Karl Dahlke

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-01-03 19:11 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-02 16:09 [Edbrowse-dev] Just edbrowse Karl Dahlke
2016-01-02 20:17 ` Geoff McLane
2016-01-03 10:48 ` Adam Thompson
2016-01-03 15:52   ` Karl Dahlke
2016-01-03 17:56     ` Geoff McLane
2016-01-03 19:12       ` Karl Dahlke

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).