Re: BBC BASIC for SDL 2.0 v1.00a released

Richard Russell

On Sat, Feb 2, 2019 at 10:20 PM, R.E. wrote:
Or do I need to load BBC basic on a Mac (I  don't have one) and compile it there?
Yes.  There are several reasons why you must 'compile' (that is, create an application bundle) on the target platform.  Firstly the process must, of course, have access to the correct edition of the run-time engine.  Secondly, it is highly likely that the process will rely on tools that are only available on the target platform (that is certainly true of MacOS, on which the 'hdiutil' utility must be used to create the .dmg file).

Last, but not least, it is essential that you test your program on every platform that you target.  Whilst BBCSDL is a cross-platform language, and every effort has been made to maximise compatibility across the range of supported platforms, that does not mean that every program which runs on (say) Windows will run on every other platform without modification.

For example, Linux uses case-sensitive filenames, and if you don't test your program it is easy to have a mismatch between a filename that your program uses and the actual name of the file.  MacOS has thread-dependencies that other platforms don't have, which can mean some API calls (even basic ones like SDL_ShowSimpleMessageBox) need to be written with this is mind.  Android doesn't have the concept of Current Directory, and so on.

So since you will always need to test your program on every platform you target, it should not be a major inconvenience to have to build the application on that platform too.  That may well involve purchasing a suitable machine if you don't have one, but it needn't imply a huge expense if you get it second-hand from (say) eBay.  Sadly, but inevitably, distributing software these days often involves expenditure, e.g. for things like Code Signing Certificates which are increasingly necessary in this malware-infested world.

But when it comes down to it a Mac is probably the only major investment that most cross-platform software developers will have to make.  If they have a Windows PC they can dual-boot it into Linux for no expense, a Raspberry Pi costs less than £35, and they or a family member or friend are likely to have Android and iOS devices.

Join to automatically receive all group messages.