Creating a standalone exe?

Usage of the framework, compiler and tools
Post Reply
segfault
Posts: 2
Joined: Mon Apr 29, 2019 1:37 pm

Creating a standalone exe?

Post 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.
User avatar
Ivan Denisov
Posts: 362
Joined: Tue Sep 17, 2013 12:21 am
Location: Krasnoyarsk, Russia

Re: Creating a standalone exe?

Post 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://wiki.oberon.org/blackbox/noappwin
They are both in Russian, however with Google it can be well translated.
segfault
Posts: 2
Joined: Mon Apr 29, 2019 1:37 pm

Re: Creating a standalone exe?

Post 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.
User avatar
Ivan Denisov
Posts: 362
Joined: Tue Sep 17, 2013 12:21 am
Location: Krasnoyarsk, Russia

Re: Creating a standalone exe?

Post 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.
manumart1
Posts: 67
Joined: Tue Sep 17, 2013 6:25 am

Re: Creating a standalone exe?

Post 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
Post Reply