Topics

BBC2APK

LifesVoyager
 

This topic follows from "I have a little Program" but I thought it deserved its own thread as we were diverging from the original posting.

I'm trying to generate an APK using BBC2APK.

So far, I've filled in the dialogue box apparently successfully and click Create APK.
Several cmd windows open in succession, the last one requests "Keystore password for signer #1 :
but none of the keyboard keys works except Enter. The result is that the APK gets generated but with the warning :
APK was not signed successfully .   The resultant APK does not run on my android phone, giving an error message about not being correctly signed.

What am I doing wrong, please?

[I have an image of the final cmd window, is there a way to include it here?]

Richard Russell
 

On Sun, Dec 30, 2018 at 04:32 PM, LifesVoyager wrote:
Several cmd windows open in succession, the last one requests "Keystore password for signer #1: but none of the keyboard keys works except Enter.
You say "none of the keyboard keys works" but it's requesting a password so it's entirely normal for the keypresses not to be echoed.  Are you sure you're not misinterpreting the lack of echo as an indication that your entry isn't being accepted?  What happens if you, carefully, type the correct password (ignoring the lack of echo)?  I wonder if you've become so used to Windows printing blobs, or asterisks or something, when you type a password that the traditional lack of echo - which is normal in a command window - is confusing you.

LifesVoyager
 

On Sun, Dec 30, 2018 at 11:38 AM, Richard Russell wrote:
traditional lack of echo - which is normal in a command window - is confusing you.
You are absolutely right Richard. I was unaware of this.

In that case, my problem is with Generate.  When I click this, an empty cmd window flashes up and immediately disappears. So I'm not getting any of the " to choose a password and then to enter some personal details" part of the process.

LifesVoyager
 

Actually, I need to backup a bit more, sorry for my stupidity :

I browse for the .bbc file that I want to convert - ok, no problem

then I Browse APK  - this I don't understand

also - where is the template APK file ?

I have bbc2apk installed at C:\Users\Tristan Cooper\AppData\Roaming\BBC2APK
where there is :  bin  lib  bbc2apk (.exe) and bbc2apk (text)

Richard Russell
 

On Sun, Dec 30, 2018 at 07:54 PM, LifesVoyager wrote:
When I click this, an empty cmd window flashes up and immediately disappears.
I suspect you've done so many 'unexpected' things that you've confused the setup.  Uninstall BBC2APK and try to delete every vestige on your disk that it was ever there!  Then reboot and start again from scratch.  I must admit you are not the first person to have struggled with BBC2APK because of lacking a basic knowledge of how command-line programs work.  I tend to forget that not everybody has come to Windows via CP/M and MS-DOS like I (and most people my age) have.

If reinstalling doesn't fix the problem I've run out of ideas.  Ideally, if possible, I'd like you to try to debug the issue yourself and let me know what I need to change to save other people a similar struggle.

Richard Russell
 

On Sun, Dec 30, 2018 at 08:22 PM, LifesVoyager wrote:
then I Browse APK  - this I don't understand
I'm really struggling to understand why you are finding this difficult.  The tool is called BBC2APK because it takes as input a '.BBC' file (that is, a tokenised BBC BASIC program) and creates as output a .APK file (that is, an Android application package).  It asks you to enter (or browse to) the path and name of the .BBC file that it should use for its input, and to enter (or browse to) the path and name of the .APK file that it should be using for its output.  Having these two file paths - one for the input and one for the output - is a prerequisite for it being able to do its job!

To me this is quite obvious, but I'm not an expert in writing user-friendly interfaces (I think software writers rarely have that skill).  You are probably used to applications that have been developed by a team of people with a wide spectrum of expertise: software engineers to create the functional parts of the program, user interface experts to create the control panel, documentation experts to write the manual, language experts to do translations, and accessibility experts to make it usable by people with disabilities.  But with my software all you've got is me!

The bottom line is that BBC2APK is free, and you get what you pay for.

Richard Russell
 

On Sun, Dec 30, 2018 at 08:22 PM, LifesVoyager wrote:
also - where is the template APK file ?
It can be anywhere, if you choose to enter a location yourself (the field is editable).  But if you leave it blank, the utility chooses a default place which is in a sub-directory of your %APPDATA% folder.

 

Richard, Happy Old Year!

On Mon, 31 Dec 2018, at 12:57, Richard Russell wrote:
On Sun, Dec 30, 2018 at 08:22 PM, LifesVoyager wrote:
also - where is the template APK file ? It can be anywhere, if you
choose to enter a location yourself (the field is editable).
I wonder if LifesVoyager assumes that the "template file" is something
- a template? - that the BBC2APK program has to read?

Your answer suggests that the program creates this. Why then is it
described as a 'template'?

--
Jeremy Nicoll - my opinions are my own.

Richard Russell
 

On Mon, Dec 31, 2018 at 01:39 PM, Jeremy Nicoll wrote:
Your answer suggests that the program creates this. Why then is it described as a 'template'?
Your question suggests that you haven't bothered to read the Help instructions!  What does the very first item in those instructions say?  How can there possibly be any ambiguity about the source of the template file given those instructions?  Do you not think the labelling of the button itself is sufficient to avoid confusion?

Richard Russell
 

On Sun, Dec 30, 2018 at 07:54 PM, LifesVoyager wrote:
In that case, my problem is with Generate.  When I click this, an empty cmd window flashes up and immediately disappears.
As a 'sanity check' I downloaded a fresh copy of BBCAPK onto a Windows 7 PC (fully up-to-date, and everything 'standard'), clicked on Generate and it worked exactly as it should.  If you are still having problems you might want check the 'usual suspects' (for example if you have a virus scanner other than Windows Defender - the only one I trust - disable it, or preferably delete it!).

LifesVoyager
 

Richard, I greatly appreciate your help, the support you provide for your software goes far beyond what anyone could expect.

Part of my problem is possibly my failing faculties, both physical and mental, as Parkinson's takes its toll. Regardless, I will continue to try to entertain myself with BB4W. If I run into problems and post on the forum, it will be a reflection of my own failings only. I don't wish to imply any fault with the software nor do I expect anyone to spend much time on me.

I list below how I have proceeded with BBC2APK. Maybe I have made a glaring error. If not, I don't mind giving up.

Thank you for all the help you've given. 
Tristan

 

  1. Turn off anti-virus software

  2. Delete all vestiges of BBC2APK

  3. Create folder : C:\Program Files (x86)\BBC2APK\

  4. Create folder : C:\Users\Tristan Cooper\AppData\Roaming\BBC2APK\

  5. Download BBC2APK.exe to the folder at 3.

  6. RUN BBC2APK.exe

  7. Enter details in Package & Title

  8. Browse for source .bbc file

  9. Select a suitable destination folder for the apk file

  10. Choose a splash BMP

  11. Click Download – this creates template.apk in the folder at 4.

  12. Click Generate - a cmd window opens and immediately closes.

  13. Proceeding to Create APK is not useful as step 12. did not work.





Richard Russell
 

On Wed, Jan 2, 2019 at 03:01 PM, LifesVoyager wrote:
Click Generate - a cmd window opens and immediately closes.
Try running the keytool manually to see what error it is reporting:

cC:\Program Files (x86)\BBC2APK\bin\
keytool -genkeypair

That should prompt you to enter a password.  If it doesn't, what does happen?

For reference, this is the full command that BBC2APK should be trying to run:

keytool -genkeypair -v -keystore "C:\Users\Tristan Cooper\AppData\Roaming\BBC2APK\release.keystore" -alias BBC2APK -keyalg RSA -keysize 2048 -validity 10000

You can try entering it manually to see exactly what is happening (but it's a rather long command!).

LifesVoyager
 

On Wed, Jan 2, 2019 at 09:03 AM, Richard Russell wrote:

cC:\Program Files (x86)\BBC2APK\bin\
keytool -genkeypair


keytool -genkeypair -v -keystore "C:\Users\Tristan Cooper\AppData\Roaming\BBC2APK\release.keystore" -alias BBC2APK -keyalg RSA -keysize 2048 -validity 10000
I tried both and they both produced this :

Error: opening registry key 'Software\JavaSoft\Java Runtime Environment
Error: could not find java.dll
Error: Could not find Java SE Runtime Environment.

I recently installed Java and if I check my Java installation, I get You have the recommended Java installed (Version 8 Update 191).

I have no experience with Java so am at a loss as to what to do with these errors.

Richard Russell
 

On Wed, Jan 2, 2019 at 06:33 PM, LifesVoyager wrote:
I have no experience with Java so am at a loss as to what to do with these errors.
Nor me, but there's a useful resource called Google that you might have heard of (that's not meant to be insulting, but not checking Google when receiving errors of this sort leaves me totally mystified)!   If you do a search you will find hits for that exact error message; two suggestions for the possible cause are:

1. You have installed the 64-bit version of Java when you need the 32-bit version, or vice versa (it wasn't clear which).
2. You have an earlier version of Java installed which is confusing things, that needs to be un-installed.

I would suggest you check the Registry to try to establish which of these (if either) is the cause.

LifesVoyager
 

On Wed, Jan 2, 2019 at 10:59 AM, Richard Russell wrote:
Nor me, but there's a useful resource called Google that you might have heard of
Yes, I did Google it but got so much spurious information that I thought it might be an issue that you were familiar with.

It turns out that I should have installed the 32 bit version rather than 64.
I have now sorted out the Java problem and have used BBC2APK successfully.
The app generated runs perfectly on my Android XiaoMi Redmi Note 5 phone.

I thank you for your patient support.

Regards

Tristan

Richard Russell
 

On Wed, Jan 2, 2019 at 09:02 PM, LifesVoyager wrote:
I thank you for your patient support.
Not all that patient really, as must have been obvious!   What change(s) could I make to the tool that would have saved you - and potentially others - so much grief?

LifesVoyager
 

On Sun, Jan 6, 2019 at 02:51 PM, Richard Russell wrote:
On Wed, Jan 2, 2019 at 09:02 PM, LifesVoyager wrote:
I thank you for your patient support.
Not all that patient really, as must have been obvious!   What change(s) could I make to the tool that would have saved you - and potentially others - so much grief?

Perhaps this would help, maybe as a readme1st file :

(Item 12. needs further input)

 

  1. Turn off anti-virus software

  2. Check that you have the correct version of Java installed. See below.

  3. Create folder : C:\Program Files (x86)\BBC2APK\

  4. Create folder : C:\Users\Tristan Cooper\AppData\Roaming\BBC2APK\

  5. Download BBC2APK.exe to the folder at 3.

  6. RUN BBC2APK.exe

  7. Click on Help for additional important details.

  8. Enter relevant info in Package & Title & Version.

  9. Browse for source .bbc file

  10. Browsee fo and select a suitable destination folder for the apk file

  11. Choose a splash BMP

  12. Embedded files - ** does this need an explanation? I have no experience of this **

  13. Click Download – this creates template.apk in the folder at 4.

  14. Click Generate - a cmd window opens and requests various details.

  15. Click Create APK

  16. Enter a passwod when requested. NB it will not echo onscreen.

  17. The APK will appear in the folder specified at 10.

 

 

 

Java - See https://www.java.com/en/download/faq/java_win64bit.xml

 

First determine whether your IE browser is 32 or 64 bit, then download the appropriate version of Java. I needed the 32 bit version : Java Runtime Environment 32-bit 8.0 build 191 and downloaded it from file hippo as I couldn't find it on the java site.

 

Regards

Richard Russell
 

On Mon, Jan 7, 2019 at 04:06 PM, LifesVoyager wrote:

Turn off anti-virus software

If I were to say that, some people (understandably) would refuse to run it!  Better to use anti-virus software that doesn't itself behave as 'malware' in blocking legitimate applications: I would recommend MS Windows Defender.

  1. Create folder : C:\Program Files (x86)\BBC2APK\

  2. Create folder : C:\Users\Tristan Cooper\AppData\Roaming\BBC2APK\

Not necessary.  Any folders that need to be created are (of course) created by the tool itself.

  1. Embedded files - ** does this need an explanation? I have no experience of this **

Naturally I assume that anybody trying to use BBC2APK will be familiar with BB4W or BBCSDL, so this should not need explanation.  In any case if embedded files are required it can only be because the programmer has referenced such files in his program, so he must already understand what the @dir$ and @lib$ system variables do and how to use them!  If he doesn't, by definition he can't have used them and no embedded files will be required.

As you hopefully spotted, I deliberately made the BBC2APK GUI very similar to the 'Compile' dialogue in BB4W and the 'Create Application' dialogue in BBCSDL, so that things like crunch options and embedded files would be familiar to the user.  Indeed the REM!Embed compiler directive which is recognised by BB4W and BBCSDL is also recognised by BBC2APK.

  1. Enter a passwod when requested. NB it will not echo onscreen.

That the password will not be echoed is the only thing in your list that isn't already covered by the Help file, or 'obvious', in my opinion.  I honestly don't think many people are going to be thrown by it (it's an extremely common behaviour in command line utilities, such as FTP).  But I can certainly add a note to that effect if you think it would help.

Thanks for the suggestions.