Leadwerks Publisher for BlitzMax

BlitzMax Forums/BlitzMax Programming/Leadwerks Publisher for BlitzMax

JoshK(Posted 2008) [#1]
Download
http://forum.leadwerks.com/viewtopic.php?f=4&t=405

Leadwerks Publisher is a free compiler front-end for BlitzMax with the following features:
-Build and document modules
-View module source code
-Build applications in release and debug mode
-Compile dynamic linked libraries
-Auto-generate DEF files for making DLLs.






Who was John Galt?(Posted 2008) [#2]
Nifty little util. Cheers.


plash(Posted 2008) [#3]
Very similar to the BLIde "Advanced module builder and documenter" (which is now only available in the paid version - which I don't have). Thanks.


The r0nin(Posted 2008) [#4]
I've been very impressed with the production rate of Leadwerks. He has coded lots of these little tools for use with his engine, etc. (sandbox, publisher, et al.) All this while making a very feature-rich engine...


Retimer(Posted 2008) [#5]
Very similar to the BLIde "Advanced module builder and documenter"


Exactly, this is great. Thanks.


JoshK(Posted 2008) [#6]
I like my module builder better because it subdivides the module hierarchy so it is easier to find the module you want, and it starts up really quickly. However, BLIde Plus includes BLIde Professional Publisher, which allows you to compile an icon into your application, and uses UPX compression automatically. In fact, that is what I used to compile this program.

So I would use this for modules and dlls, and I would use BLIde for compiling applications.


Zeke(Posted 2008) [#7]

If you have BlitzMax installed somewhere other than C:/Program Files/BlitzMax, you need to set the BlitzMax path in the configuration file.

1. If the file "Publisher.cfg" does not exist, create it.

2. Add this line to the file:

BlitzMaxPath=(your path here)



There is also BlitzMaxPath() command. so no need manually add path.
Print BlitzMaxPath()



ziggy(Posted 2008) [#8]
@Zeke: This function doesn't work unless called from inside the BlitzMaxPath. It is used by the bmk utility and the like, but it is not safe to use it on any program to determine the blitzmax installation folder.

@LeadWerks: that's great. I'll add this functionality to BLIde also.


MGE(Posted 2008) [#9]
Noob question:

Normally when I compile my mods the command is just:

bmk.exe makemods -r name.mod
bmk.exe makemods -d name.mod

Leadworks command line looks like:

bmk.exe makemods -a -t gui name.mod

What is -a -t gui commands? Is there a way to just publish release or debug builds?

Looks like a nice handy utility, thanks!


ziggy(Posted 2008) [#10]
-a means all (release and debug, with quick build off).
-t gui is ignored. This flag means the EXE will be a non-console executable. This has no effect on modules (as far as I know).


MGE(Posted 2008) [#11]
Thanks ziggy!

"So I would use this for modules and dlls, and I would use BLIde for compiling applications."

That's what I'll probably have as well. Nice!


Yan(Posted 2008) [#12]
[pedant]
I think you'll find that '-a' just means *always* build. The default behaviour is to build debug *and* release versions anyway, unless '-r' or '-b' are used.
[/pedant]


JoshK(Posted 2008) [#13]
I gave the source to Manuel, so he can add the dll compiling into BLIde.

I wanted to add options for SSE and other crazy stuff but couldn't figure out how.

I'm not going to add icons or any preprocessing like that. Use BLIde Publisher for that.


Retimer(Posted 2008) [#14]
Would be pretty awesome if the module builder here was integrated into MaxIDE..*hint* *request*


JoshK(Posted 2008) [#15]
Mark can distribute this along with future installations of BlitzMax if he wants, with no strings attached. I'll change the name to "BlitzMax Publisher" or something like that, and add his icon, and give him the source. But we all know that won't happen.


degac(Posted 2008) [#16]
Great application.

BTW, I would like to dont' have to edit manually a configuration file to choose the BlitzMax Path. Why don't just use RequestDir() the first time the application runs?


Mark Tiffany(Posted 2008) [#17]
If you're happy to have it added to the official IDE, would you be equally happy to have it added to the CE IDE (slightly higher chance)?


JoshK(Posted 2008) [#18]
It requires some MaxGUI module hacks to compile. Do you want to just include the EXE and make a menu item that opens it?


ziggy(Posted 2008) [#19]
it could provide output due standard io streams, and be a separated EXE. This way it could be added to any ide.


JoshK(Posted 2008) [#20]
How would this be done, by printing to the console? Should the program be invisible/silent? If so, what is the point of making a command-line program to execute another command-line program?


Mark Tiffany(Posted 2008) [#21]
It requires some MaxGUI module hacks to compile.

What sort of hacks - "legit" ones that would make sense to be added to the codebase or really hacky ones? (i.e. are they worth seeing if Seb thinks they're valid to add?).

Should the program be invisible/silent? If so, what is the point of making a command-line program to execute another command-line program?

I also don't see the point of having this available without the front-end - that's the point isn't it???


ziggy(Posted 2008) [#22]
@Leadwerks: Maybe add an argument to the program to tell it is being run from a host application and let the program exit with errorlevel if anything is not compiled properly or the like writing to the error pipe, so if someone uses this publisher from an ide, the ide can display any source code and line causing any possible error. The easiest way would be to bypass the bmk output using print statements, and the bmk error output to the error pipe, and also bypassing the errorlevel after compilation. It sounds more than it really is (I think).


JoshK(Posted 2008) [#23]
So just compile the app in console mode? It already prints everything you see in the log window.


plash(Posted 2008) [#24]
This would be a real piece of work if it were in the CE IDE (multi-platform).

Just give 'em the code and let it be sorted out.


ziggy(Posted 2008) [#25]
@Leadwerks: I'm porting this to C# to integrate it on BLIde. I've found some small bugs (nothing important) but I hope it'll be available on the next BETA version of BLIde.


JoshK(Posted 2009) [#26]
New version 1.3 posted with support for threaded builds.