BBCSDL Compile Utility Internal error 189

Here you can talk about anything related to BBC BASIC, not covered in another category
artfizz
Posts: 21
Joined: Wed 11 Dec 2024, 17:15

BBCSDL Compile Utility Internal error 189

Post by artfizz »

This program compiles and runs OK if I tick "deploy as a web application".
Otherwise I get "internal error 189" when I attempt to compile it.
What am I doing wrong?

Code: Select all

      REM Dice
      REM single dice, shown for 3 seconds.
      REM display one digit on *front* face

      VDU 23,22,320;256;32,64,16,128
      REM half-size (mode 8) screen.  4x character size. black text on white b/g

      IF INKEY$(-256) = "W" THEN
        REM BB4W-specific code goes here, for example:
        SYS "SetWindowText", @hwnd%, "Dice"
      ELSE
        REM BBCSDL-specific code goes here, for example:
        SYS "SDL_SetWindowTitle", @hwnd%, "Dice", @memhdc%
      ENDIF

      ORIGIN 100, 100
      PROCdraw_cube(200, 200, 200)
      spot% = RND(6)
      VDU 5
      MOVE -505, 160
      PRINT spot%
      GCOL 15
      REM set foreground colour to white so that the cursor is invisible

      WAIT 300
      QUIT

      DEF PROCdraw_cube(x, y, z)
      MOVE 0, 0 : MOVE 0, y
      GCOL 1 : PLOT 117, x, y
      GCOL 2 : PLOT 117, x + z * 0.4, y + z * 0.4
      GCOL 4 : PLOT 117, x + z * 0.4, z * 0.4
      ENDPROC
Richard Russell
Posts: 272
Joined: Tue 18 Jun 2024, 09:32

Re: BBCSDL Compile Utility Internal error 189

Post by Richard Russell »

artfizz wrote: Sat 14 Dec 2024, 23:52 What am I doing wrong?
You'd need to post a screenshot of the Compiler dialogue to be sure, but most likely you've specified an invalid destination directory for the App bundle. Error number 189 is 'Access denied' which would be consistent with that. Your program doesn't have a REM!Exefile compiler directive, so it will be choosing a default (and possibly unsuitable) location for the bundle.
artfizz
Posts: 21
Joined: Wed 11 Dec 2024, 17:15

Re: BBCSDL Compile Utility Internal error 189

Post by artfizz »

Thanks, Richard. Adding a REM!Exefile compiler directive did the trick.

(Since I have both BB4W and BBCSDE installed, I was anticipating BBCSDE would use the same executable directory that I have been using for BB4W.)
Richard Russell
Posts: 272
Joined: Tue 18 Jun 2024, 09:32

Re: BBCSDL Compile Utility Internal error 189

Post by Richard Russell »

artfizz wrote: Sun 15 Dec 2024, 18:59 (Since I have both BB4W and BBCSDE installed, I was anticipating BBCSDE would use the same executable directory that I have been using for BB4W.)
I thought they both used the exe subdirectory of the directory containing the program itself, and indeed experimentally that does seem to be the case if you look at the screenshots:

bb4w.png
bbcsdl.png
You do not have the required permissions to view the files attached to this post.
artfizz
Posts: 21
Joined: Wed 11 Dec 2024, 17:15

Re: BBCSDL Compile Utility Internal error 189

Post by artfizz »

Richard Russell wrote:
"I thought they both used the exe subdirectory of the directory containing the program itself, and indeed experimentally that does seem to be the case if you look at the screenshots:"

I don't doubt that. While I was using BB4W, I stored my programs OUTSIDE the path where the BB4W application was installed. After the first compile, the system remembered where to store executables.
In switching over to BBCSDK, I omitted to tell it where to store the compiled executable in user filestore.


What I was trying to achieve, in using BBCSDK, was to produce an app that would run on Android. I have belatedly discovered that:
1) .exe's don't run on Android :o
2) BBCSDK does not generate .apk executables :shock:
3) BBCSDK does generate a .bbb web bundle :D - which I could run using the Chrome browser on Android, by referencing

Code: Select all

https://wasm.bbcbasic.co.uk/bbcsdl.html?app=...
Better late than never! :roll:
Richard Russell
Posts: 272
Joined: Tue 18 Jun 2024, 09:32

Re: BBCSDL Compile Utility Internal error 189

Post by Richard Russell »

artfizz wrote: Sun 15 Dec 2024, 22:38 2) BBCSDK does not generate .apk executables :shock:
I don't know what BBCSDK is, but BBC2APK generates .apk bundles, that's its entire purpose! It's how all my Android apps (except BBC BASIC itself of course) were generated, here are a few still available for download:

https://www.bbcbasic.co.uk/Ceefax.apk
https://www.bbcbasic.co.uk/SkyBaby.apk
https://www.bbcbasic.co.uk/calculator.apk
https://www.bbcbasic.co.uk/batteries.apk (for use with GivEnergy batteries)
https://www.bbcbasic.co.uk/inverter.apk (for use with GivEnergy inverters)
https://bbcbasic.itch.io/pinball (download from itch.io)
https://bbcbasic.itch.io/forces-of-darkness (download from itch.io)
artfizz
Posts: 21
Joined: Wed 11 Dec 2024, 17:15

Re: BBCSDL Compile Utility Internal error 189

Post by artfizz »

Richard Russell wrote: Mon 16 Dec 2024, 09:31
artfizz wrote: Sun 15 Dec 2024, 22:38 2) BBCSDK does not generate .apk executables :shock:
I don't know what BBCSDK is, but BBC2APK generates .apk bundles, that's its entire purpose! It's how all my Android apps (except BBC BASIC itself of course) were generated, here are a few still available for download:

https://www.bbcbasic.co.uk/Ceefax.apk
...
[glow]BBC2APK[/glow] That's the magic ingredient I was seeking! Thanks again.
I'm a step closer to creating an Android app.

(By BBCSDK, I meant BBCSDL. Sorry for my confusion.)