Understated Ur-Drakon Celtic Minstrel Posted July 20, 2014 Share Posted July 20, 2014 Okay, I fixed some of the minor errors in alint and uploaded new binaries here. I also put the source on github and created a makefile that works with the Microsoft compiler (this didn't take a lot of work). I ran the four preset scenarios through it; they seem to give quite a few errors, but I'm not sure if these are a problem with alint or actually a problem with the scenarios. Also, this version currently accepts both "set_flag" and "set_sdf" as correct, and also accepts both "print_big_str_num" and "print_big_str_color". I'm not quite sure if this is right/ Quote Link to comment Share on other sites More sharing options...
Well-Actually War Trall Ishad Nha Posted July 20, 2014 Share Posted July 20, 2014 (edited) Searching the Windows program I found "print_big_str" and "print_big_str_num" but not "print_big_str_color". I don't know about the Mac version. It is easy to write a program to get a list of the calls found in Blades of Avernum.exe, even I can do it. Hopefully we can work towards a bug-free Alint. Also, knowing how Alint works we can better understand its error messages. I can now download it and check it on Of Good and Evil. 03 August 2014 Latest build is found at: the link shown in post #19 below: http://te.calref.net:8080/job/alint/ Edited August 3, 2014 by Ishad Nha Quote Link to comment Share on other sites More sharing options...
Understated Ur-Drakon Celtic Minstrel Posted July 20, 2014 Author Share Posted July 20, 2014 Also, knowing how Alint works we can better understand its error messages. Or even improve its error messages. Quote Link to comment Share on other sites More sharing options...
Magnificent Ornk Kelandon Posted July 20, 2014 Share Posted July 20, 2014 Also, this version currently accepts both "set_flag" and "set_sdf" as correct, and also accepts both "print_big_str_num" and "print_big_str_color". I'm not quite sure if this is right/ I'm reasonably sure that one of the two print_big_str calls doesn't work, but I forget which one. You should just create a quick experiment scenario and try it to find out. I also vaguely recall set_sdf() not working, but, again, you should just try it, because I may be remembering something else. Quote Link to comment Share on other sites More sharing options...
Understated Ur-Drakon Celtic Minstrel Posted July 20, 2014 Author Share Posted July 20, 2014 Well, the four preset scenarios apparently use set_sdf, so I decided to guess it was valid. Quote Link to comment Share on other sites More sharing options...
Well-Actually War Trall Ishad Nha Posted July 20, 2014 Share Posted July 20, 2014 I can't run the Windows version of Alint, I am on Windows XP SP3. I get a Pop-up message: "C:\WINDOWS\alint.exe is not a valid Win32 application." Then the Command Prompt prints: "Access is denied." Nothing then happens. Quote Link to comment Share on other sites More sharing options...
Chittering Clawbug Vox Posted July 20, 2014 Share Posted July 20, 2014 I'm using Mac. Sometimes when I use Alint it crashes! I'm guessing in the thousands of lines of code, somewhere there is a call that it doesn't like. I'm yet to figure it out. So lately I've just been copying and pasting the lines of code I need checked and not the entire script. (I think it's something in the INIT state or START state of scripts that clashes with certain calls. I'm thinking it may be my cutscenes. My scenario works fine, just not Alint) Quote Link to comment Share on other sites More sharing options...
Understated Ur-Drakon Celtic Minstrel Posted July 20, 2014 Author Share Posted July 20, 2014 I can't run the Windows version of Alint, I am on Windows XP SP3. It was built on Windows 7, so being on XP still could be something of an issue. You should be able to build the code yourself though. If you have some version of Visual Studio (including an express version, which can be downloaded for free) you should be able to build it from the console by something like this: "C:\Progam Files\MS Visual Studio\Common7\Tools\vsvars32.bat" nmake -f Makefile.win The exact path on the first line depends on where Visual Studio is installed, so you'd need to check that. You also need to have flex and bison installed (probably from the sourceforge link you mentioned) and accessible in your %PATH%, with the executable files named flex.exe and bison.exe. If on the other hand you're using MinGW, you should be able to just type "make" to build it. This should create an output file "alint" which you'd have to rename to "alint.exe". Again, you'll need flex and bixon install; I'm not sure if MinGW comes with versions of them, but if it doesn't, you'd need to install it, rename the executables, and put it in your %PATH%. As for how to add it to your %PATH%, try this. Quote Link to comment Share on other sites More sharing options...
Well-Actually War Trall Ishad Nha Posted July 21, 2014 Share Posted July 21, 2014 (edited) Hell, have to learn two new programs: Visual Studio and Bison. Need a donation of gray matter fast. Edit: XP is not a supported operating system for Visual Studio Express! Is there any other way to handle this? Lex.l, known errors: line 72 ends with: fl_shortcut_key|fl_anim_steps|floor_shimmers|fl_out_fight_town_used return Should be: fl_shortcut_key|fl_anim_steps|fl_shimmers|fl_out_fight_town_used return line 128: print_big_str_color { yylval.t = 'v' ; strcpy(yylval.args, "sisi"); return FUNCTION;} should be: print_big_str_num { yylval.t = 'v' ; strcpy(yylval.args, "sisi"); return FUNCTION;} (This is true for Windows, don't know about the Mac version.) Edited July 21, 2014 by Ishad Nha Quote Link to comment Share on other sites More sharing options...
Understated Ur-Drakon Celtic Minstrel Posted July 21, 2014 Author Share Posted July 21, 2014 XP is not a supported operating system for Visual Studio Express! Is there any other way to handle this? I dunno, is there an older version of VS Express around somewhere? Or you could try MinGW, or maybe even Dev C++. Or I could try to figure out how to build an XP-compatible binary, I suppose. Quote Link to comment Share on other sites More sharing options...
Easygoing Eyebeast keira Posted July 21, 2014 Share Posted July 21, 2014 If I get a chance I'll add this to my Jenkins server for handy auto-building. Quote Link to comment Share on other sites More sharing options...
Understated Ur-Drakon Celtic Minstrel Posted July 21, 2014 Author Share Posted July 21, 2014 Ishad Nha, I've uploaded another version to the same place that (theoretically) supports Windows XP. Try it and let me know it it works. Quote Link to comment Share on other sites More sharing options...
Well-Actually War Trall Ishad Nha Posted July 22, 2014 Share Posted July 22, 2014 (edited) It is working to a degree. But, in multi-variable calls, it won't accept commas as seperating variables! C:\Program Files\Blades of Avernum\Blades of Avernum Scenarios\Of Good and Evil Win>alint mathe.txt Checking file 'mathe.txt': Error line 19: Wrong arguments to function Have '(null)x', want 'ii' This is line 19 from the relevant file: set_mobility(ME,0); (I deleted the rest of the printout for brevity's sake.) Then it does not accept batch checking of all scripts, a good thing to do before uploading a scenario. C:\Program Files\Blades of Avernum\Blades of Avernum Scenarios\Of Good and Evil Win>alint -a C:\Program Files\Blades of Avernum\Blades of Avernum Scenarios\Of Good and Evil Win>alint *.txt Couldn't open file '*.txt': Unknown error The help command works: C:\Program Files\Blades of Avernum\Blades of Avernum Scenarios\Of Good and Evil Win>alint Usage:alint [-advwV] file ... -a: Check all files, not just *.txt -d: Print bison debug trace information (You don't want to do this) -v: More verbose output -w: Print warnings -V: Print current version --: Check stdin Options only apply to files appearing after them Edited July 22, 2014 by Ishad Nha Quote Link to comment Share on other sites More sharing options...
Understated Ur-Drakon Celtic Minstrel Posted July 22, 2014 Author Share Posted July 22, 2014 Hm, curious, your example works correctly on my Mac but fails on my Windows, just as you say... I wonder why that could be... Failing to open "*.txt" could be a result of trying to run it in a directory with no text files, maybe? I'm not sure if that last line of your post is a complaint or just a random observation. Quote Link to comment Share on other sites More sharing options...
Well-Actually War Trall Ishad Nha Posted July 22, 2014 Share Posted July 22, 2014 "I'm not sure if that last line of your post is a complaint or just a random observation." Options only apply to files appearing after them (That is the last line of the help printout.) "Failing to open "*.txt" could be a result of trying to run it in a directory with no text files, maybe?" The directory was full of the scenario's text files, so the batch-check should have worked. Quote Link to comment Share on other sites More sharing options...
Understated Ur-Drakon Celtic Minstrel Posted July 22, 2014 Author Share Posted July 22, 2014 Okay, I uploaded a version that should fix the non-working *.txt. The issue with commas will need more investigation, I think. I suppose it could also be an issue with the version of bison or flex being used. Quote Link to comment Share on other sites More sharing options...
Well-Actually War Trall Ishad Nha Posted July 22, 2014 Share Posted July 22, 2014 The batch-checking works okay, the printout is 9,000+ lines in length of course. "Hm, curious, your example works correctly on my Mac but fails on my Windows, just as you say... I wonder why that could be..." Have you accidentally put something Mac in your Windows code? "-a: Check all files, not just *.txt" This sounds like another batch-check, rewriting the description might make it clearer: "-a: Check any file, not just a file with the .txt extension" Quote Link to comment Share on other sites More sharing options...
Understated Ur-Drakon Celtic Minstrel Posted July 22, 2014 Author Share Posted July 22, 2014 "Hm, curious, your example works correctly on my Mac but fails on my Windows, just as you say... I wonder why that could be..." Have you accidentally put something Mac in your Windows code? I haven't actually touched any code yet, just tweaked the lex.l file a little (to fix things like floor_shimmers), added a couple of lines to common.h (which were needed for it to compile with Visual Studio tools), and fiddled with makefiles. "-a: Check all files, not just *.txt" This sounds like another batch-check, rewriting the description might make it clearer: "-a: Check any file, not just a file with the .txt extension" I think what that actually does is, normally it skips any file without a .txt extension, but with -a it checks those files too (if they're passed on the arguments list at least). So yes, the description could be clearer. Quote Link to comment Share on other sites More sharing options...
Easygoing Eyebeast keira Posted July 29, 2014 Share Posted July 29, 2014 Alint is now covered by CalRef's Jenkins server at http://te.calref.net:8080/job/alint/ with builds successful for 32- and 64-bit windows! CM: If you add a webhook for the "Jenkins (GitHub plugin)" to your repo, with the url pointing to http://te.calref.net:8080/github-webhook/ it should automatically build on every push. Quote Link to comment Share on other sites More sharing options...
Understated Ur-Drakon Celtic Minstrel Posted July 29, 2014 Author Share Posted July 29, 2014 Done! Quote Link to comment Share on other sites More sharing options...
Well-Actually War Trall Ishad Nha Posted July 29, 2014 Share Posted July 29, 2014 Is this a rule of Alint: "Every call should end with a Paragraph Mark"? In the Windows 32 bit version, everything seems to be working except for the batch-checking function: Couldn't open file '*.txt': Unknown error Quote Link to comment Share on other sites More sharing options...
Easygoing Eyebeast keira Posted July 29, 2014 Share Posted July 29, 2014 Is this a rule of Alint: "Every call should end with a Paragraph Mark"? I'm not sure if it is, but for stylistic reasons you definitely should use proper whitespace in your scripts. In the Windows 32 bit version, everything seems to be working except for the batch-checking function: Couldn't open file '*.txt': Unknown error This is not the program's fault. This is a fault with cmd.exe (Windows shell). I just popped it open in bash and it worked like a charm (Win7 x64). http://cdn.calref.net/sylae/images/misc/69efcd26c31ec52d7b5f389d63e881ba.png Quote Link to comment Share on other sites More sharing options...
Understated Ur-Drakon Celtic Minstrel Posted July 29, 2014 Author Share Posted July 29, 2014 That was because cl.exe by default links in a very simplistic command parsing routine. I had to explicitly tell it to link a different one that supports globbing. I guess cmd.exe doesn't expand the globs before forking, so the program is responsible for doing it. Or something like that. Main thing is, I think I fixed the issue, and it does now work in cmd.exe, so your test might've been biased (but that said, I wouldn't be surprised if it would've worked in bash before changing that, as well as in powershell). EDIT: Wait a second! I forgot to commit that fix. Whoops! Quote Link to comment Share on other sites More sharing options...
Well-Actually War Trall Ishad Nha Posted July 30, 2014 Share Posted July 30, 2014 Build #7 still has no ability to understand the meaning of "*.txt". Quote Link to comment Share on other sites More sharing options...
Easygoing Eyebeast keira Posted July 30, 2014 Share Posted July 30, 2014 I'll take a look at the mingw builds and see what's going on. Build 7 was supposed to have a fix but I guess the fix sucked. For now, I'd recommend using bash or powershell instead of cmd, as they do expansions properly (read: do expansions). Quote Link to comment Share on other sites More sharing options...
Well-Actually War Trall Ishad Nha Posted July 30, 2014 Share Posted July 30, 2014 It is not working on my newly-installed version of Powershell, but the previous version of Alint is working. Windows XP issue? (I know nothing much about PowerShell of course...) Quote Link to comment Share on other sites More sharing options...
Easygoing Eyebeast keira Posted July 30, 2014 Share Posted July 30, 2014 this pull will fix wildcards on the mingw builds; the last attempt was using the wrong setting (and the wrong flag--causing it to only be applied to x64). T4ested it this time Quote Link to comment Share on other sites More sharing options...
Understated Ur-Drakon Celtic Minstrel Posted July 30, 2014 Author Share Posted July 30, 2014 Pulled! The latest build should work for you, Ishad. Quote Link to comment Share on other sites More sharing options...
Well-Actually War Trall Ishad Nha Posted July 31, 2014 Share Posted July 31, 2014 Build #9 did not work for me... Do I need to sign up for GitHub before I can access the "Pull#4"? Quote Link to comment Share on other sites More sharing options...
Easygoing Eyebeast keira Posted July 31, 2014 Share Posted July 31, 2014 Okay, this is weird. Can you try this version and see if it works? Please make sure (using alint -V) that you are using build 5ecffa0. Thanks. Quote Link to comment Share on other sites More sharing options...
Well-Actually War Trall Ishad Nha Posted July 31, 2014 Share Posted July 31, 2014 Yes, it worked properly on the PowerShell! It also worked on the old Command Prompt. Windows PowerShell Copyright © 2009 Microsoft Corporation. All rights reserved. PS C:\Documents and Settings\Ishad Nha> cd "C:\Program Files\Blades of Avernum\Blades of Avernum Scenarios\Of Good and Evil Win" PS C:\Program Files\Blades of Avernum\Blades of Avernum Scenarios\Of Good and Evil Win> alint -V alint version 0.9.1a (Git revision 5ecffa0) Compiled using i686-w64-mingw32-gcc v4.6.3 PS C:\Program Files\Blades of Avernum\Blades of Avernum Scenarios\Of Good and Evil Win> alint *.txt Checking file 'goodevil.txt': Error line 500: Function used incorrectly ( a few hundred lines of error reporting...) Checking file 't98Grand Tempdlg.txt': Error line 57: Talking node error PS C:\Program Files\Blades of Avernum\Blades of Avernum Scenarios\Of Good and Evil Win> Quote Link to comment Share on other sites More sharing options...
Understated Ur-Drakon Celtic Minstrel Posted July 31, 2014 Author Share Posted July 31, 2014 Do I need to sign up for GitHub before I can access the "Pull#4"? No, as the owner of the repository it's my responsibility to make sure the pull request is handled. I already did that as of my last post, so if there's still an issue it's with Sylae's Jenkins, I'd guess. Quote Link to comment Share on other sites More sharing options...
Easygoing Eyebeast keira Posted August 1, 2014 Share Posted August 1, 2014 Yeah, the conditional to set windcard expansion done by the program was not working, so in that test build I just got rid of it entirely so all (GCC/mingw) builds will have it built-in. CM, I'll issue a new pull from sylae/alint to get that into the master repo Quote Link to comment Share on other sites More sharing options...
Well-Actually War Trall Ishad Nha Posted August 3, 2014 Share Posted August 3, 2014 Kel's Pink and Pretty Page seems to have disappeared! All links to it are broken. Link to Alint in the home page of this sub-forum is thus broken. Possibly we could add a link to the new build of Alint? Quote Link to comment Share on other sites More sharing options...
Magnificent Ornk Kelandon Posted August 3, 2014 Share Posted August 3, 2014 KPPP is back up. Apparently I hadn't logged into Freewebs in an excessively long time. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.