GUI Frontend for Compiling: QuickCompile!

Started by KnuttyD, October 14, 2010, 03:08:58 AM

Previous topic - Next topic

redskull

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
Strange women, lying in ponds, distributing swords, is no basis for a system of government

KnuttyD

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.


0x401000

 :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