1. Bitten by Bind
- Posted by Michael J. Sabal <m_sabal at yahoo.com> Apr 17, 2006
- 441 views
I've been using the various bind utilities since version 1.4. It's actually one of the reasons I started using Euphoria back in 1996. I'll generally only need to distribute a bound program two or three times a year, so if the syntax changes, I tend to forget. It used to be that I would need to use the --clear_routines parameter when binding with win32lib. That parameter has been removed from the 2.5 binder. But even now, I forget and still try to put it in. When it's my first parameter, and I put the .exw file as the second, the binder comes back and asks me for the file name to bind. Foolishly, I put the name of the file in again and press Enter. The result, rather than a bound EXE and clear text source file, is a shrouded source file that I can no longer edit. Fortunately, I've made backups of the source before binding, so I was able to recover. But if Euphoria advertises itself to be "safe," there should be a protection against unintentionally shrouding a source file. <he says, tossing another two cents into the cup...>
2. Re: Bitten by Bind
- Posted by Robert Craig <rds at RapidEuphoria.com> Apr 17, 2006
- 456 views
- Last edited Apr 18, 2006
Michael J. Sabal wrote: > It used to be that I would need to use > the --clear_routines parameter when binding with win32lib. That parameter > has been removed from the 2.5 binder. Right. It's not needed any more. > But even now, I forget and still try > to put it in. When it's my first parameter, and I put the .exw file as the > > second, the binder comes back and asks me for the file name to bind. > Foolishly, I put the name of the file in again and press Enter. The result, > rather than a bound EXE and clear text source file, is a shrouded source file > that I can no longer edit. Fortunately, I've made backups of the source > before binding, so I was able to recover. But if Euphoria advertises itself > to be "safe," there should be a protection against unintentionally shrouding > a source file. I can see what happened. When the binder checks for command-line options, it's very permissive. It uses match() rather than equal(), so actually any option you type containing the substring "OUT" will be accepted as the -OUT option which specifies a target file to overwrite. I'll do it a safer way for the next release. I was thinking that people might sometimes misspell an option slightly, and rather than complain, I'd just accept it. e.g. they might say "-console" instead of "-con". Regards, Rob Craig Rapid Deployment Software http://www.RapidEuphoria.com
3. Re: Bitten by Bind
- Posted by "Greg Haberek" <ghaberek at gmail.com> Apr 17, 2006
- 473 views
- Last edited Apr 18, 2006
> I can see what happened. When the binder checks for > command-line options, it's very permissive. It uses > match() rather than equal(), so actually any option > you type containing the substring "OUT" will be accepted as > the -OUT option which specifies a target file to overwrite. > I'll do it a safer way for the next release. > I was thinking that people might sometimes misspell an option > slightly, and rather than complain, I'd just accept it. > e.g. they might say "-console" instead of "-con". Perhaps the best option would be:
if match( "-con", lower(argv) ) = 1 then -- do stuff here end if
~Greg
4. Re: Bitten by Bind
- Posted by Robert Craig <rds at RapidEuphoria.com> Apr 17, 2006
- 455 views
- Last edited Apr 18, 2006
Greg Haberek wrote: > Perhaps the best option would be: > > }}} <eucode> > if match( "-con", lower(argv) ) = 1 then > -- do stuff here > end if > </eucode> {{{ Yes. That's a good idea. I think I'll do that. Thanks, Rob Craig Rapid Deployment Software http://www.RapidEuphoria.com