Author |
Topic: LBBRUN.exe and make Executable (Read 199 times) |
|
kigohhere
New Member
member is offline
Posts: 11
|
|
LBBRUN.exe and make Executable
« Thread started on: Jan 5th, 2018, 10:04am » |
|
Hi, I have a question about the file LBBRUN.EXE. What is the use of this file actually.? Thank you!
Furthermore, I have a question about "Make Executable". There is a "Make Executable" selection in the pull-down menu of the LBBRUN.EXE. However, there is no such selection in the pull-down menu of the Cross-platform BBC BASIC. Will there be this selection in the next version of the Cross-platform BBC BASIC? Thank you very much!
|
|
Logged
|
|
|
|
Richard Russell
Administrator
member is offline
Posts: 1348
|
|
Re: LBBRUN.exe and make Executable
« Reply #1 on: Jan 5th, 2018, 12:04pm » |
|
on Jan 5th, 2018, 10:04am, kigohhere wrote:Hi, I have a question about the file LBBRUN.EXE. What is the use of this file actually? |
|
I make it available for two reasons. One is simply because Liberty BASIC provides an equivalent facility: that is, it allows you to convert your program into a TKN file which can be executed using the supplied run-time-engine (e.g.) run451.exe.
The other is to support a situation such as the following. Suppose you wish to create a 'menu' program that allows you to select, and run, one of a number of different utilities (each coded in Liberty BASIC). For example you might have written a suite of games that you want to distribute as an integrated application.
You could 'compile' each of your games into a separate executable file, and package all those EXEs with the menu program. But each of those executables is going to be more than 100 kBytes in size, however simple the game itself is. So if you are including, say, a dozen or more games the size of the overall package is going to be quite large.
LBBRUN.exe (or LB's equivalent) allows you instead to convert each of your games into a compact LBB file (which will typically be significantly smaller than the BAS file from which it was derived). You can then package those LBB files along with LBBRUN.exe, plus the menu program, with the result that the final application is much smaller than the previous approach.
The downside of this approach is security. The 'tokenised' LBB files are easily converted back to something close to the original BAS file (as are LB's TKN files), although in both cases REMarks will have been stripped out. So if you are concerned about keeping your programs 'secret' this is not an appropriate technique.
Quote:There is a "Make Executable" selection in the pull-down menu of the LBBRUN.EXE. However, there is no such selection in the pull-down menu of the Cross-platform BBC BASIC. Will there be this selection in the next version of the Cross-platform BBC BASIC? |
|
In the next version? No, unfortunately not. The 'problem' is the very cross-platform nature of BBCSDL: creating a 'standalone' executable (or its equivalent) requires a completely different approach on each of the platforms. For example on Windows it means building an EXE (Portable Executable) file; on Mac OS it means creating a DMG (disc image) file; on Android it means creating an APK and so on.
On Windows it's not too difficult; the software tools necessary to create an EXE file are built into the OS. On Mac OS it is harder; the tools you need are typically command-line utilities that aren't even necessarily installed on the end-users Mac - and Mac OS expects you to 'digitally sign' each application. On Android it is much harder, with the available tools not being directly adaptable to build an APK from a BBC BASIC program - and again it needs to be signed.
Add to this that doing so requires knowledge that I don't have (except in the case of Windows). I have managed to create the 'cross-platform' BBC BASIC by virtue of SDL (the Simple Directmedia Layer) which takes care of all the platform-dependent features and presents my program with a unified API. But SDL provides no support at all for building standalone applications, so I am on my own.
I have asked for help at the BBC BASIC forums, in the hope that there are users out there who are more knowledgable about Mac OS, Linux, Android etc. than I am and who may therefore be able to provide valuable assistance. But none has been forthcoming.
If you can suggest a way in which this difficulty can be overcome I would be very interested.
Richard.
|
|
Logged
|
|
|
|
kigohhere
New Member
member is offline
Posts: 11
|
|
Re: LBBRUN.exe and make Executable
« Reply #2 on: Jan 6th, 2018, 02:05am » |
|
Thanks a lot. Now I understand more about LB Booster and the Cross-platform BBC BASIC after reading your two very detailed explanations...yes.! Thanks.
However, your explanation of the Cross-platform BBC BASIC is too complicated for me. Ha...I am only a gamer. Programming is too difficult for me.....
Do you mean:
There are different editions for ordinary users to download to use. http://bbcbasic.conforums.com/index.cgi?board=announcements&action=display&num=1510751284
However, ordinary users can only use the editors to write programs,and run programs inside the editors. Now It is nearly impossible or extremely diffcult for them to distribute their finished programs to other people.
Am I right.? Ok...I see. I am looking forward to your solutions to these serious problems.
|
|
Logged
|
|
|
|
Richard Russell
Administrator
member is offline
Posts: 1348
|
|
Re: LBBRUN.exe and make Executable
« Reply #3 on: Jan 6th, 2018, 10:22am » |
|
on Jan 6th, 2018, 02:05am, kigohhere wrote:It is nearly impossible or extremely diffcult for them to distribute their finished programs to other people. Am I right.? |
|
No. It does not follow that because you cannot create a 'standalone executable' you cannot distribute programs to other users (that would be a pretty serious limitation!).
As this is an LBB support group I can use Liberty BASIC as an analogy. LBB supports generating standalone executables (as does BB4W) but LB 4 doesn't (like BBCSDL, currently). However you can of course still distribute your LB program in the form of a 'bundle' (perhaps as a ZIP file) rather than as a single EXE file.
Indeed the analogy is even closer. The way LB 4 works is that you rename the run-time engine to have the same name as your TKN program, but with an EXE extension. When executed it will automatically look for, and run, the TKN (it's a bit like a Windows side-by-side assembly). BBCSDL works in exactly the same way,
Suppose you have created some amazing video game, as the program MyGame.bbc. If you want to distribute it you make a copy of bbcsdl.exe as MyGame.exe and you distribute the two files as a package - possibly in conjunction with the DLLs they need to run. This isn't quite as convenient as a standalone EXE, but it's what LB users have always had to do and it's a perfectly workable solution, at least until there is something better.
Edit: I should add that BBCSDL will never be able to generate a self-contained .EXE file in quite the way that BB4W and LBB do, because of the dependence on SDL. Even if your BASIC program and the run-time engine are combined in a single EXE it will still need the set of SDL, FreeType and Zlib DLLs, just as a distributed LB 4 program needs the SmallTalk DLLs to run.
Strictly speaking one could probably statically link all these components, but it would result in a grossly bloated EXE and the whole point of DLLs is, after all, that they can be shared.
Richard.
|
|
|
|
kigohhere
New Member
member is offline
Posts: 11
|
|
Re: LBBRUN.exe and make Executable
« Reply #4 on: Jan 20th, 2018, 12:43am » |
|
on Jan 6th, 2018, 10:22am, Richard Russell wrote:Indeed the analogy is even closer. The way LB 4 works is that you rename the run-time engine to have the same name as your TKN program, but with an EXE extension. When executed it will automatically look for, and run, the TKN (it's a bit like a Windows side-by-side assembly). BBCSDL works in exactly the same way,
Suppose you have created some amazing video game, as the program MyGame.bbc. If you want to distribute it you make a copy of bbcsdl.exe as MyGame.exe and you distribute the two files as a package - possibly in conjunction with the DLLs they need to run. This isn't quite as convenient as a standalone EXE, but it's what LB users have always had to do and it's a perfectly workable solution, at least until there is something better. |
|
Hello.
I understand now.
Your explanation is very detailed and very good!!!!!
Thank you very much!!
|
|
Logged
|
|
|
|
|