winflexbison icon indicating copy to clipboard operation
winflexbison copied to clipboard

Install guide lines?

Open papaathome opened this issue 4 years ago • 4 comments

Hi, first thanks for the time you put into this project. It is much appreciated, at least by me ;-)

I have one question about the use of winflexbison. The documentation says to use the command line or use de Visual studio build rules. Both are clear to me.

I want to replace the executables to another location on my disk. What can I do with the skeleton (and other) files? Is there a presumed structure or can I put it all in one directory?

I also have a GnuWin32 version of Flex/Bison available (And it performs fine for C projects). Can I mix the two? (Most likely not) Any advise on how to keep them both available but separated? The difference in executable names should be enough to select the correct version.

Kind regards, Andre.

papaathome avatar Jan 23 '21 13:01 papaathome

Hi Andre,

Thank you for such a warm words.

I want to replace the executables to another location on my disk.

You could put whole winflexbison folder in any place you want. If you add path to winflexbison folder to PATH environment variable you will be able to run win_flex or win_bison executables from any place in the system

What can I do with the skeleton (and other) files? Is there a presumed structure or can I put it all in one directory?

You could place bison's data subfolder in a different place, just set env var BISON_PKGDATADIR to point to this folder.

Can I mix the two? (Most likely not) Any advise on how to keep them both available but separated? The difference in executable names should be enough to select the correct version.

I guess different executable names flex vs win_flex and bison vs win_bison should be enough to separate these tools.

Best regards, Alex

lexxmark avatar Jan 24 '21 22:01 lexxmark

Hi ALex,

Thanks for the quick reply. Your answer is is good and complete enough to close this item.

Moving all files to another location is what I did (and it works), after I had written my message. But I have a feeling that not all files are required, such as changelog.md and data/local.mk for instance. On deployment locations I don't like to see items that are required for a build but that is just my opinion.

The file FlexLexer.h makes it risky (in my opinion) to combine WinFlexBison with existing GnuWin32 locations. The original Flex uses a file with the same name (in .../GnuWin32/include) and it might clash with that one. In any way, it is confusing to users. Which file is (or should be) used by which version of Flex? Even if the two (the GnuWin32 version and the WinFlex version) are identical it is not a smart move to combine the executables in one location. Later in time there might be a difference, (however unlikely now).

Good to know that there is an environment variable for locating the data subfolder. I had a quick browse through the source code but did not see that one.

Maybe, if you can find some spare time, you can mention some of the details in changelog.md or in a separate readme.md

Kind regards, Andre.

papaathome avatar Jan 25 '21 07:01 papaathome

As a footnote, I'll note that win_bison sometimes cannot find its data directory if win_bison is invoked via a symlink. I say sometimes, because it doesn't work when invoked via VS but does work when invoked from a cygwin command line (and works via either windows soft links or via cygwin soft links).

ArcaneTourist avatar Jun 22 '21 16:06 ArcaneTourist