Page 1 of 1

Creating a standalone exe?

PostPosted: Mon Apr 29, 2019 1:43 pm
by segfault
Hi, I've just starting playing around with Blackbox and am having problems finding out how to create a standalone executable, can anyone advise? Apologies for the newbie question. I've just starting programming again after many years, having learned Turbo Pascal in the 90's... I'm using Linux but the IDE seems to work just fine with Wine.

Thanks in advance for any help.

Re: Creating a standalone exe?

PostPosted: Tue Apr 30, 2019 8:27 am
by Ivan Denisov
You are welcome!

Please, take a look Dev/Docu/Linker.odc
There is also the example of simple WinApi application without dependencies there.
The most difficult step for making the single executable for your app is to take into account all the dependencies.
There is a tool which helps. Select the module name and call from menu Info->Create Tool.
Usually this module, you should select is Config. However during packing do not forget to take it from Code location (not from System/Code).
Take a look simple demo screenshot, which I just did. I had marked essential places with red.
exeDemo.png


However usually BlackBox workflow does not assume, that you create single executable.
The concept is:
1. Create your modules and add them to System/Mod/Config.odc
2. Make a copy of BlackBox IDE and remove all subsytems and modules, those not need for your application (for example there can be Dev, Sql, Obx, Xhtml, Ctl, Docu)
3. Make your own menu System/Rsrc/Menu.odc
4. Recompile BlackBox.exe with your icon file as it is described in Dev/Docu/Linker.odc and rename it.
5. Distribute in archive or make an installation file with InnoSetup utility.

There are two articles about your question:
https://oberoncore.ru/wiki/blackbox/make_exe
http://obertone.ru/blackbox/noappwin
They are both in Russian, however with Google it can be well translated.

Re: Creating a standalone exe?

PostPosted: Tue Apr 30, 2019 1:07 pm
by segfault
Hi Ivan,
Thanks for the reply and links. I managed to create an exe from the "simple" code, using the directions given in Linker.odc, but for apps using more modules it seems quite a complicated and long-winded process. Is there a way to find out which modules I need for a specific app? I can get a list by using Info/loaded modules but I only want to see those which are relevant for my app. Anyway I think I need to learn more about the framework before I tackle this, so I'll come back to it when I've done some more studying. I have obtained a copy of the book "Computing Fundamentals" which seems like a good resource for learning Blackbox.

Thanks again.

Re: Creating a standalone exe?

PostPosted: Wed May 01, 2019 5:11 pm
by Ivan Denisov
segfault wrote:Is there a way to find out which modules I need for a specific app? I can get a list by using Info/loaded modules but I only want to see those which are relevant for my app.

BlackBox is loading modules dynamically according the user call of some commands in your application. Also the import order is relevant sometimes. So this is not that simple to build strict mathematical graph of all modules that you need.

Info->Create Tool make a good work. The command DevPacker.ListLoadedModules will prepare all loaded modules, for you can pack them to your application file. You are right, that this question is not so essential in the beginning. Please, if you will need some help to build and pack your ready application, just let me know. I will find the time to help you distant way by TeamViewer etc.

segfault wrote:Anyway I think I need to learn more about the framework before I tackle this, so I'll come back to it when I've done some more studying. I have obtained a copy of the book "Computing Fundamentals" which seems like a good resource for learning Blackbox.

The old book, however still good and open-source.
Actually there is the book "Component-based Software Development with BlackBox" embedded in BlackBox help. I found it useful, when learning BlackBox several years ago.

Re: Creating a standalone exe?

PostPosted: Thu May 02, 2019 6:40 am
by manumart1
To know all the modules imported by a given module, I think you can use the subsystem Bbt: http://zinnamturm.eu/downloadsAC.htm#Bbt.
The subsystem Bbt adds two entries in the menu: Unicode tools and Compile tools.
You can select with the mouse the name of a module, and execute Compile tools > Build Module Compile List.

But be very careful with the entry menu Unicode tools, because you can inadvertently modify all the files of the folders Docu, Mod, etc.

Regards