News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

MASM32 Builder

Started by zooba, June 16, 2005, 02:25:23 AM

Previous topic - Next topic

zooba

Not sure if this is the right place to put this, but I figured it's a possible addition to the MASM32 package so here it is:  :8)

Presenting...

MASM32(R) Builder
(apologies if I'm breaching some law somewhere by having MASM32 in the name. Let me know and I'll change it  :bg)

I was sick and tired of having twenty million different choices in the Projects menu and having to remember which one I was using for the current project. Builder reads the first line of the file you pass to it and then does all the work for you.

This is best illustrated with an example:

If this is the first line of your project
;;  DEBUG CONSOLE CLEAN
Builder will automatically pass your file to ML.EXE and LINK.EXE with debug flags set, and then clean up OBJ files (but not PDB or ILK).
;;  RESOURCE LINKALL VERBOSE
Builder will assemble RSRC.RC file, your project file, pass LINK.EXE a wildcard file (*.OBJ) and display each command line as it executes.

It's not releasable yet, but I'd appreciate some people testing it and, as I mentioned above, inclusion in the MASM32 package when its ready would be an honour.

Run BUILD.EXE in a console without any parameters to get a run down of how to use it. I have no more documentation at this time.

Tip: If you preceed each option with anything but a space, they will be ignored.  :U So !DEBUG means 'not a debug build'  :green

Cheers,

hutch--

Steve,

It looks like a nice toy, as far as the name it may be a good idea to call it MASM builder rather than MASM32 as the project enquiries tend to get pointed at me.


MASM32 (R) Builder Version 0.5.0000
Copyright (C) Steve Dower. All rights reserved.


Probably change this to something like,


MASM 32 Bit Builder Version 0.5.0000
Copyright (C) Steve Dower. All rights reserved.


This way it won't be confused with the stuff I have written and users will know who to ask about it if they need more info.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

zooba

Okay, I've changed the name and tightened some of the code up a bit  :8)

I'd really appreciate some testing and comments  :wink I've really found this helpful already and I'm sure others will too  :toothy

[attachment deleted by admin]

hutch--

Steve,

I downloaded the current version and placed it in the masm32\bin directory. I can get it to build a project with no problems but the options don't seem to work yet.

I tried ;
    [VERBOSE][DEBUG] on both ML 6.14 and 7.00 but they only build a normal release version.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

zooba

I wouldn't be putting in up here if the options weren't working ;)

The square braces around each item indicate that their use is optional as is the standard for most DOS commands. The terms also have to be in the first line of the file, it truncates at the first CR it finds (but not LF... I'll fix that), otherwise it searches the first 256 bytes for the options.

Also, a space is required before each option to indicate it's a seperate word (ie. VERBOSEDEBUG will find verbose but not debug but VERBOSE DEBUG will work as intended) I'm sorry for the lack of sample code and documentation, I'll get there  :bg Until then, here's the first few lines of the source (no interesting code, just an example of the options ;) )

; !debug !linkall console clean !verbose resource
; «««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««
    .nolist

    .386                       ; create 32 bit code
    .model flat, stdcall       ; 32 bit memory model
    option casemap :none       ; case sensitive


Which demonstrates a few things:
1. options are not case sensitive
2. any character besides a space before an option will ignore it (ie. !debug won't be recognised at all)
3. the limit of the number of options is the length of the line

Hope this helps  :green

hutch--

Certainly does, without the square brackets it build the options I tried fine. Just as a comment, for the verbose switch,  would be inclined to use the linker /VERBOSE as well as the assembler options.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

zooba

I just checked out the /VERBOSE option for LINK. It doesn't appear to show anything particularly interesting, which according to the documentation is expected. It basically displays messages about the libraries it searches and any procedures which don't practise safe-SEH. If someone requires this advanced output they'll probably use their own.

I'm considering automatically detecting a 'makeit.bat' in the project folder and using that instead of the options in the file. This would remove the necessity for a "Run makeit.bat" menu item which you could potentially mis-choose... the whole reason I did this in the first place. My Project menu is very nice  :wink

Mark Jones

makeit.bat's are useful, but I like your idea better Zooba. Less files to edit and cleaner code. :)
"To deny our impulses... foolish; to revel in them, chaos." MCJ 2003.08