The MASM Forum Archive 2004 to 2012

Miscellaneous Forums => Miscellaneous Projects => Topic started by: KnuttyD on October 14, 2010, 03:08:58 AM

Title: GUI Frontend for Compiling: QuickCompile!
Post by: KnuttyD on October 14, 2010, 03:08:58 AM
Hey guys!  :P
(I hope this is the right place to post this!  ::) )
This is my first post here, and I would like to show you my GUI Frontend for compiling and linking my ASM files. It works pretty well, or at least the way I've been testing it.
It is written in AutoHotKey, so it should be stable on all Windows OS's Win2000 forward. Its been tested on 7 and XP.

Heres the file:
v1.0.3
http://drafts.thatcompdude.com/QC/QuickCompile1.0.3.exe
Source: http://drafts.thatcompdude.com/QC/1.0.3_src/
Size:  416 KB (No upx)


v1.0.2
http://drafts.thatcompdude.com/QC/QuickCompile1.0.2.exe
Source: http://drafts.thatcompdude.com/QC/QuickCompile1.0.2.ahk
Size:  205 KB


v1.0.1
http://drafts.thatcompdude.com/QC/QuickCompile1.0.1.exe
Source: http://drafts.thatcompdude.com/QC/QuickCompile1.0.1.ahk
Size:  205 KB


v1.0.0
http://drafts.thatcompdude.com/QC/QuickCompile1.0.0.exe
Size: 2,031 KB


Screenshots:
(http://drafts.thatcompdude.com/QC/sc/1.0.3_1.png)(http://drafts.thatcompdude.com/QC/sc/1.0.3_2.png)

Thanks!
If you find any use for it (or any bugs, I'm guessing there's a lot  :bg ), feedback would be greatly appriciated!
Title: Re: GUI Frontend for Compiling: QuickCompile!
Post by: japheth on October 14, 2010, 09:39:31 AM

Welcome!

Quote
f you find any use for it (or any bugs, I'm guessing there's a lot  BigGrin ), feedback would be greatly appriciated!

AFAICS the status is:

- you're a very new member
- your app is supplied as an EXE only
- it's size is 2 MB - for a GUI to assemble+link asm files?

I guess some members - including me - are a bit cautious and won't try your tool under such conditions. Please don't take that personally!
Title: Re: GUI Frontend for Compiling: QuickCompile!
Post by: ramguru on October 14, 2010, 10:40:54 AM
The secret behind its bloated 2Mb size is use of seven identical icons (260.8Kb each) :lol
as for usefulness, it makes more sense to have one package: source code editor + that can be configured to compile / build + and capture console's output, like Scite, PNotepad, etc., wouldn't u agree ?..
Title: Re: GUI Frontend for Compiling: QuickCompile!
Post by: dedndave on October 14, 2010, 10:53:11 AM
i think it's a good idea
but there is room for improvement
one thing i can see is missing is command-line switches for both assembly and linking
switches vary with different versions, too
it would be cool to create editable profiles
under one profile, for example, i might use a specific version of assembler, linker, and a set of switches
you could then remove the windows gui/console selection, as it would be set up in the profile
also - you could add steps to build with resource files
then, the user could select a specific proflle each time they build
after that, add an editor, disassembler, and a debugger, and you have a nice IDE - lol

but - i am with Jeremy - new member - no source - we aren't going to get too excited   :P
Title: Re: GUI Frontend for Compiling: QuickCompile!
Post by: redskull on October 14, 2010, 11:45:09 AM
Where's the option for a resource file and/or script?
Title: Re: GUI Frontend for Compiling: QuickCompile!
Post by: ragdog on October 14, 2010, 11:57:19 AM
A good idea is compile a radasm project from explorer right click

example :

right click on a Radasm project file and compile it .
with popup a little window for information from ml and linker,resource compiler
(like status output from radasm)

This is a nice idea :U
Title: Re: GUI Frontend for Compiling: QuickCompile!
Post by: KnuttyD on October 14, 2010, 02:48:06 PM
Thanks for all the feedback! I'm on a school comp, so I cant upload the source right now, but I'll get to it later today. Ill fix the bloated EXE too.
QuoteI guess some members - including me - are a bit cautious and won't try your tool under such conditions. Please don't take that personally!
Its all good, I've been on a couple of fourms, and I wouldent trust some random guy thats never posted on that forum before  ::)

Also, this was ment to be a little project just for what I was doing: compiling REALLY simple ASM files  :lol not anything with RC files. But as I advance in my ASM ill see if I can add thoes in
Title: Re: GUI Frontend for Compiling: QuickCompile!
Post by: box on October 14, 2010, 03:02:26 PM
masm not a compiler
Title: Re: GUI Frontend for Compiling: QuickCompile!
Post by: 0x401000 on October 14, 2010, 04:22:24 PM
It would be cool if the settings can be selected from a database, for example separately for Masm, and also for jwasm, for example. The choice of keys to build a very useful too!  ::)
Title: Re: GUI Frontend for Compiling: QuickCompile!
Post by: KnuttyD on October 14, 2010, 04:55:17 PM
OK, new versons up. I took out the icons (cut the file size down 10 times!) and the source is there too.

Again, this was written by a person who is JUST starting out with assmebler, so dont expect too much  :bg I just wrote it so I wouldent have to keep going into the command line, and linking and compiling my files  ::) .

If you find any use for it, well, thanks for using it!
As for it being an IDE.. hmm... maybe a future project  :P
Title: Re: GUI Frontend for Compiling: QuickCompile!
Post by: KnuttyD on October 14, 2010, 06:01:26 PM
New vers up. Minor changes.
Title: Re: GUI Frontend for Compiling: QuickCompile!
Post by: 0x401000 on October 14, 2010, 08:28:54 PM
 :U

Can you do the export of all settings in the bat file, or if not at bat, then saved in ini file.
And what about the resource file? Sometimes it is defined in a subdirectory.
Title: Re: GUI Frontend for Compiling: QuickCompile!
Post by: KnuttyD on October 14, 2010, 11:00:39 PM
QuoteAnd what about the resource file? Sometimes it is defined in a subdirectory.
Err.... Resource file? Sorry, but I'm still *very* new to this  :eek so bear with me. I have done (some) GUI progging in C++, is it anything like an RC file in C++?
How would you normally include that if you were compiling at the command line?

QuoteCan you do the export of all settings in the bat file, or if not at bat, then saved in ini file.
I'll see what I can do. Do you mean like export a BAT file that will do the compiling and linking?
Title: Re: GUI Frontend for Compiling: QuickCompile!
Post by: dedndave on October 15, 2010, 12:09:14 AM
just have a look at the batch files that are in masm32\bin
some of them show you how to compile the resource file and link
Title: Re: GUI Frontend for Compiling: QuickCompile!
Post by: jj2007 on October 15, 2010, 01:30:35 AM
You have three hard-coded paths in there,
F:\Macros\SmartGUI\test_header.jpg
C:\masm32\bin\ml.exe
C:\masm32\bin\Link.exe
Are you sure it will work if e.g. the assembler sits in D:\masm32\bin\ml.exe?
I am not eager to test it because I still have not understood why your executable is upx'ed and calls wsock.dll ::)
Title: Re: GUI Frontend for Compiling: QuickCompile!
Post by: redskull on October 15, 2010, 01:58:37 AM
Quote from: KnuttyD on October 14, 2010, 11:00:39 PM
How would you normally include that if you were compiling at the command line?

You would use the rc.exe program to compile an .rc file into an .res file, and the include it on the link command as any other file.  Defenitly a required option for any serious make-style tool

-r
Title: Re: GUI Frontend for Compiling: QuickCompile!
Post by: KnuttyD on October 15, 2010, 02:02:44 AM
Quote from: jj2007 on October 15, 2010, 01:30:35 AM
You have three hard-coded paths in there,
F:\Macros\SmartGUI\test_header.jpg
C:\masm32\bin\ml.exe
C:\masm32\bin\Link.exe
Are you sure it will work if e.g. the assembler sits in D:\masm32\bin\ml.exe?
I am not eager to test it because I still have not understood why your executable is upx'ed and calls wsock.dll ::)
Err I'm not sure why it calls wasock.dll. It was written in AHK, so I suppose that's why, and also why its Upx'ed  :P
You can browse to a different path, its not hardcoded. Its just that I'm assuming that's were most people have installed Masm32, so I set it there by default  :bg

Also, the header image is the pic that says KnuttyD's MASM32 QuickCompile. I guess this is not showing up now, for some reason. I guess the AHK compiler does not pack it with the EXE.

Btw, the EXE is now non-upx'ed, so it runs in ollydbg without saying "encrypted", and you can analyze it w/ Peid and the such. Source is avail on all of the files.
Title: Re: GUI Frontend for Compiling: QuickCompile!
Post by: KnuttyD on October 15, 2010, 02:12:32 AM
Heres the Virustotal of 1.0.3:
http://www.virustotal.com/file-scan/report.html?id=501e7a9cea8ee61f0392c676fe22f5a7707d5a2753872fe0fc9668a4543bfafe-1287108585
Title: Re: GUI Frontend for Compiling: QuickCompile!
Post by: 0x401000 on October 15, 2010, 08:34:40 AM
 :bg

This program that you have done, written in autohotkey scripts http://www.autohotkey.com/docs/Scripts.htm ?

Interesting solution, evoking wsock32 can make the program ahk2exe. Convert a Script to an EXE (ahk2exe): Convert a .ahk script into a .exe file that can run on any PC. http://www.autohotkey.com/docs/Scripts.htm#ahk2exe

Examples of resources ...

@echo on

SET PATH=C:\Masm32\bin
SET INCLUDE=D:\MicroAsm\masm32\INCLUDE
SET LIB=D:\MicroAsm\masm32\LIB

D:\MicroAsm\masm32\bin\Rc.exe MdiTest.Rc
if errorlevel 1 goto errRC
D:\MicroAsm\masm32\bin\Ml.exe /c /coff MdiTest.Asm
if errorlevel 1 goto errasm
D:\MicroAsm\masm32\bin\Link.exe /SUBSYSTEM:WINDOWS MdiDlg.obj MdiTest.RES
if errorlevel 1 goto errlink

dir dialogs
goto TheEnd

:errlink
echo _
echo Link error
goto TheEnd

:errasm
echo _
echo Assembly Error
goto TheEnd

:errRC
echo _
echo RC Error
goto TheEnd
:TheEnd

pause


and

@echo off
if exist clicker.obj del clicker.obj
if exist clicker.dll del clicker.dll
@echo "--> Compiling..."
@c:\MASM32\BIN\Ml.exe /c /coff /Cp /Fl clicker.asm
if errorlevel 1 goto errasm
@echo "--> Building resources..."
@c:\MASM32\BIN\Rc.exe clicker.rc
if errorlevel 1 goto errRC
@echo "--> Linking..."
@c:\MASM32\BIN\Link.exe /SUBSYSTEM:WINDOWS /DLL /DEF:clicker.Def /ALIGN:16 /SECTION:.text,EWR /IGNORE:407 clicker.obj clicker.res
if errorlevel 1 goto errlink
if not exist clicker.dll goto errlink
@echo "--> OK, Finish!"
dir dialogs
goto TheEnd

:errlink
echo _
echo "--> !!Link error!!"
goto TheEnd

:errasm
echo _
echo "--> !!Assembly Error!!"
goto TheEnd

:errRC
echo _
echo "--> !!RC Error!!"
goto TheEnd
:TheEnd
pause