-
Notifications
You must be signed in to change notification settings - Fork 253
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve glue code generation #729
Conversation
I like the idea of using a script for generating asm defines but batch really is an awfull scripting language IMO. Do you think we can use something that could be cross platform? |
Hmm... the Travis CI indicator has glitched. But it passed.
Python, Lua, Perl, Ruby, JavaScript. Any language works, the task is stupidly easy. Display an object as a list, look for the
It's funny, we're literally using batch for AppVeyor building, not to mention that Visual Studio uses native functions for commands (by default CMD). Batch Inception. |
I do not have control over those ;-)
I do like python, I know it's an easy task that's why I think the batch script looks complicated for the task. |
I prefer anything within VS commands that return a logical error code when they fail, that a mixture command string that returns random values. Or always
You're welcome, BTW... don't forget to use |
I'm not sure if this is the case, probably I misunderstood this whole thing, but some time ago @bsmiles32 made an effort to migrate the code to meson, python-based build system (http://mesonbuild.com/) |
This is the code without security measures:
The proposed code contains the minimum security conditions "for monkeys on the keyboard". @Mastergatto, Meson is another completely different beast. |
That's a big job, but wow, it's not nice to read. |
I take that as a compliment, even knowing that it's not. The part that requires a clear explanation even knowing the language is this:
Many programs in Windows inherit the open path of the program that invokes them, in this case VS. If VS launch the script from the shortest possible logical path Edit: |
Ok let's not add python dependency to core building. Even if batch is awfull to read, it does the job without external dependencies so that's a pretty strong point. |
If this is merged we can get rid of gawk in win32-deps! |
f236fe1
to
4caa7dd
Compare
Well, I made the code a little more descriptive, I have the bad habit of wanting to make the code take up too little bytes... floppy mindset.
And even more my batch =P Edit: OMG, bilingual dyslexia... that new in myself. |
TBH, I think one comment per line, starting from the for loop, wouldn't be too much. |
9009123
to
f57fb96
Compare
More syntax, more variables to mess up, new logic, more intricated code, more robust, more mindfuck, BETTER. The only way to understand the code is to play with it. This is already in "debug" mode, run this from CMD, change GAS_VS_ARG2 to whatever you want and move the script to different folder levels to see the differences, a USB is fine too. To see error codes, execute
|
7920ca9
to
c57b068
Compare
Yeah... too complex, good for me, bad for everything else. Take the Lite version. |
Does it make sense to add some comments in the current If we can't add comments, I will merge it like this but a general explanation of the script would be great. |
Thanks a lot @Jj0YzL5nvJ, it's perfect ! |
These changes make us independent of
gawk
in Windows, and avoid issues with AppVeyor listed in #722More info in #728