1. Compile it as console app and name "fasm.exe"
2. Goto "compilers" folder, rename true fasm.exe to "fasm_true.exe"
3. Place compiled file to it's place
It will produce PureBasic.asm file on user desktop after every compilation
Code: Select all
EnableExplicit
Import "kernel32.lib"
GetConsoleWindow()
EndImport
ShowWindow_(GetConsoleWindow(), #SW_HIDE) ; hide this console window manually
Define TInt.i, Params.i = CountProgramParameters()
Define AsmParams.s
For TInt = 0 To Params - 1
AsmParams + ProgramParameter(TInt) + " "
Next TInt
Define AsmFile.s = ProgramParameter(0) ; 1st param is .asm file inside temp folder
Define OutPath.s = GetHomeDirectory() + "desktop\" + AsmFile ; placing output to user desktop [windows]
If FileSize(AsmFile) > 0 : CopyFile(AsmFile, OutPath) : EndIf
Define FASM.i = RunProgram("fasm_true.exe", AsmParams, GetCurrentDirectory(), #PB_Program_Open)
Define iRet.i = 1
If FASM
WaitProgram (FASM)
iRet = ProgramExitCode(FASM)
CloseProgram(FASM)
EndIf
End iRet