caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Grant Olson <kgo@grant-olson.net>
To: Yoann Padioleau <padator@wanadoo.fr>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] Building multiple configurations?
Date: Mon, 22 Mar 2010 23:06:29 -0400	[thread overview]
Message-ID: <4BA83035.7060809@grant-olson.net> (raw)
In-Reply-To: <6A0948D6-EBA8-4EAD-9684-DD8CDEFE0A1C@wanadoo.fr>

On 3/22/2010 9:56 PM, Yoann Padioleau wrote:
> 
> Apparently it's a boolean since you support only 2 different configs ...
> 
> 
> let config1 = {
>  field1 = 1;
>  field2 = true;
> }
> 
> let config2 = {
>  field1 = 2;
>  field2 = true;
> }
> 
> (* settable via command line or config file *)
> let config = ref true 
> 
> let current_config () = 
>  if !config then config1 else config2
> 
> ...
> 
> let main = 
>  let args = [
>  "-config1", Arg.Set config, "";
>  "-config2", Arg.Clear config "";
>  ]
>  in
>  Arg.parse ... blablabla
> 
> 

This is getting a off topic for this list, but it's a usability issue,
not so much a technical one.

Most users will be windows users who double-click on the icon to run it.

I could create a batch file that calls the real .exe with the config
switch to activate the alternate config, but is a user going to click on
the pretty executable file with the custom icon, or the ugly batch file
icon?

I could create a stub executable to call the real one so I can get a
pretty icon, but then people will wonder why the stub breaks when they
copy it somewhere else and don't move the real executable.

I could do some black magic and detect the executable name at runtime,
and set the config based on that, but there's no reason someone
shouldn't be able to hit F2 and rename the file.

So I'd rather just have two stand-alone executables that contain
everything they need.


  reply	other threads:[~2010-03-23  3:06 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-23  0:35 Grant Olson
2010-03-23  1:13 ` [Caml-list] " Yoann Padioleau
2010-03-23  1:32   ` Grant Olson
2010-03-23  1:56     ` Yoann Padioleau
2010-03-23  3:06       ` Grant Olson [this message]
2010-03-23  1:37 ` Michael Ekstrand
2010-03-23  1:47   ` [Caml-list] " Grant Olson
2010-03-23  8:54     ` Daniel Bünzli
2010-03-23  5:50 ` [Caml-list] " Martin Jambon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4BA83035.7060809@grant-olson.net \
    --to=kgo@grant-olson.net \
    --cc=caml-list@inria.fr \
    --cc=padator@wanadoo.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).