Post Reply 
WARNING: Do NOT convert your HP Prime programs into applications!
07-14-2015, 02:04 AM (This post was last modified: 07-14-2015 02:43 AM by Kevin Ouellet.)
Post: #1
WARNING: Do NOT convert your HP Prime programs into applications!
I am posting this because I notice that more and more HP programmers are switching from program to apps lately, and they might be doing so too early. If you are working on HP Prime programs and another member or even an HP staff suggests that you convert your program into an application, I highly advise you against doing so. Do NOT convert your HP Prime programs into applications! Otherwise, you will simply make it next to impossible for everyone else to use your softwares and reduce your audience in the process.

Two OSes ago, HP implemented support for custom icons and including images inside your applications, with the ability to send the folder containing the files into your applications library via the HP Connectivity Kit software. However, despite claims that it is supposed to make it easier to launch and distribute softwares (they show up in the application list), it is currently the complete opposite. Not only support for this new application format (.hpappdir) is completely broken in both firmwares that support it, but there is no official documentation on how to send such application to your calculator and once you know how to do it, there are about 90% chances that the game or software will not run at all: Instead, a spreadsheet or graph will show up, and that, even if this advice by Timwessman is followed. There are also chances that the calculator will freeze during application transfer, as I witnessed twice, requiring a paper clip to press the RESET button on the back of the device (since ON+Symb won't help you there).

Also, there is only one specific way to transfer an application to the calculator: Sending the ZIP file itself will not send the custom icon and going inside the folder then sending all files at once from there will not send them at all, so your solution is to send the folder, unzipped. And then, that's if it sends at all and if it does, then it's not guaranteed that the result will work as intended.

Until HP fixes all of this, we highly recommend everyone to stick to the .hpprgm format. This will allow you to keep your games and softwares into 1 file and if more than 1 file is required, then at least there won't be all the serious transfer issues that comes with .hpappdir transfers. In addition to that, it's easier to debug code on-calc.

HP, If it ain't broke, don't fix it. Or at least, don't replace it with something even more broken than the HP 39gII.

Cross-posted from http://codewalr.us/index.php?topic=610.0 (also at http://tiplanet.org/forum/viewtopic.php?f=69&t=16955 in French)

-Dream of Omnimaga
https://djomnimaga.music-2000.com
Visit this user's website Find all posts by this user
Quote this message in a reply
07-14-2015, 03:27 AM
Post: #2
RE: WARNING: Do NOT convert your HP Prime programs into applications!
The only time I tried to send an app, it worked flawlessly (the png viewer posted in this same forum) and I felt a warm feeling because it really worked. How are you generating the zip file? Does the same happens if you copy your hpappdir folder into My Documents\HP Connectivity Kit\Content folder on your PC and then install it from the conn4x?

My website: erwin.ried.cl
Visit this user's website Find all posts by this user
Quote this message in a reply
07-14-2015, 04:31 AM
Post: #3
RE: WARNING: Do NOT convert your HP Prime programs into applications!
Hello,

I am sorry that you have experienced such difficulties, If you could post more information, we would be more than happy to look at it.

That being said, and in some ways, as you pointed out yourself, we strongly believe that programs should be "apps". Standalone programs should really be used only for persons who are learning how to program and need a quick way to create small algorithms. Or for calculations extending functionality.
Basically, anything which is graphical in nature, or that has a limited scope of use should be in an app so that it is contained and does not affect the rest of the system.

The change to .HPAppDir was dictated by the need to allow packaging of files with the app (which is a great new feature), and also by the realization that there is a practical limit to the number of files that can be in a single directory before the OS file system starts to slow down. Imagine 40 apps with 10 to 20 files each... That make a very large number of files in a single directory to keep track of.

Anyhow, we will continue to improve the system, so do not hesitate to send your feedback/comments so that we can focus on what is important!

Cyrille
Find all posts by this user
Quote this message in a reply
07-14-2015, 05:03 AM
Post: #4
RE: WARNING: Do NOT convert your HP Prime programs into applications!
Please be aware that the link "advice by Timwessman" appears instead to be from Codewalrus not TW and will offer Tapatalk to your device - at which point I stopped reading having suffered Tapatalk previously, although some Tapatalk 's may be benign.

Stephen Lewkowicz (G1CMZ)
https://my.numworks.com/python/steveg1cmz
Visit this user's website Find all posts by this user
Quote this message in a reply
07-14-2015, 05:30 AM (This post was last modified: 07-14-2015 05:36 AM by Kevin Ouellet.)
Post: #5
RE: WARNING: Do NOT convert your HP Prime programs into applications!
@eried: Yes, I got the same problem using your method. And like the other method I used, it took me about three tries before the app successfully sends.

@Cyrille: This Minecraft clone is an example and is what I am trying to get to run on my calculator with no success: http://codewalr.us/index.php?action=dlat...attach=426 . And I still maintain that people should wait before starting to use apps instead of programs, because currently, it seems like the application transfer feature is in Alpha or Beta stage, so it would be better that people wait until it's bug-free so that enough people can use their programs.

@StephenG1CMZ: You don't have to use Tapatalk to browse the link. Simply close the ad. Normally it should not re-appear afterwards unless your mobile browser is old. I need to find a way to get rid of that Tapatalk splash screen without breaking Tapatalk updater (there used to be a feature for that, but Tapatalk team got rid of it). Also the post is from Tim Wessman, since he posted there. Here is the post in question in case you are still unable to access the other site:

timwessman Wrote:
Code:

#pragma mode( separator(.,;) integer(h32) )

//Declare function
SIFS_PROG_RUN();

//Local vars
Local ProgNum; //Prog number to display/edit
....
<snip>

You'll want to put this at the top of your source file.

The pragma line is so that anyone who has different internationalization/integer settings won't have issues. It tells: , is the separator for arguments, . is the separator for mantissa, ; terminates your command statements.

The next part is why the program isn't running. There is a error when trying to compile because the compiler has no idea what SIFS_PROG_RUN() is since you are creating it on runtime (not sure why exactly, haven't looked at the code). Hence, you should declare it as a function earlier and it will run fine.

The reason the icon isn't showing is because it isn't being sent. I went through this process: Unzip to the content directory, drag the zip file to the calculator tree and it was all sent fine. I will investigate if coming directly from a zip is having an issue or something.

The Minecraft game above, by Alexgt, is supposed to have added the code quoted above, yet I still can't run the game: It simply shows a spreadsheet instead.

-Dream of Omnimaga
https://djomnimaga.music-2000.com
Visit this user's website Find all posts by this user
Quote this message in a reply
07-14-2015, 12:28 PM
Post: #6
RE: WARNING: Do NOT convert your HP Prime programs into applications!
Perhaps I was unduly pessimistic in my early-morning post earlier.
But I still remember the relief I felt when a factory reset removed a Tapatalk that would not otherwise uninstall. Only to have to do it again after accidentally clicking OK.

Stephen Lewkowicz (G1CMZ)
https://my.numworks.com/python/steveg1cmz
Visit this user's website Find all posts by this user
Quote this message in a reply
07-15-2015, 01:50 AM (This post was last modified: 07-15-2015 01:55 AM by Kevin Ouellet.)
Post: #7
RE: WARNING: Do NOT convert your HP Prime programs into applications!
Ok so I tried recompiling the app code from the program menu on the emulator and it still won't run. However, I noticed that the following screen appears for about 0.1 seconds before the spreadsheet appears:

[Image: mineprime2.png]

I had to use a video capture software in order to extract the frame, else it disappeared too fast.

Also, I forgot to mention that earlier, the first three times I tried to delete then resend the app to my calc, my calc froze.


After further tests, I managed to run it on-calc! (somewhat)! O.O However, at first, it wouldn't get past the loading screen (the spreadsheet would appear afterward) >.<

On the emulator, it still displays the title screen or parts of it for a split second before quitting to the spreadsheet. The farthest it reached was this screen:

[Image: mineprime2s.png]

And after another ON+Symb, the game now runs on-calc! I can't count how many tries it took me.

From symptoms seen in MViewer GX (crashes when sending many 2 MB files) I am thinking that the calculator RAM gets lower and lower after every APP transfer and MinePrime probably runs out of RAM. In fact, I ran the game again now then moved east for one minute and it eventually exited to the spreadsheet.

This is the new version of the game by alexgt, by the way: http://codewalr.us/index.php?action=dlat...attach=427


HP should make the firmware clear any RAM usage after file transfers and everytime we exit a program back to the home screen or program menu. With mViewer GX, we basically have to press ON+Symb after every file transfer and that's when the actual transfer won't freeze the calc.

-Dream of Omnimaga
https://djomnimaga.music-2000.com
Visit this user's website Find all posts by this user
Quote this message in a reply
03-09-2017, 12:54 PM
Post: #8
RE: WARNING: Do NOT convert your HP Prime programs into applications!
Just wondering what the situation is re this now, 18 months down the line?

I have an idea of an app that I want to develop based on the spreadsheet app.
Find all posts by this user
Quote this message in a reply
03-09-2017, 02:57 PM
Post: #9
RE: WARNING: Do NOT convert your HP Prime programs into applications!
(03-09-2017 12:54 PM)grsbanks Wrote:  Just wondering what the situation is re this now, 18 months down the line?

I have an idea of an app that I want to develop based on the spreadsheet app.

Actually I can reply to this myself having done some work on this.

The icon disappeared and my app derived from the Spreadsheet app became one derived from the Function app for no reason.

Not quite ready for prime time!
Find all posts by this user
Quote this message in a reply
03-09-2017, 05:47 PM (This post was last modified: 03-09-2017 05:52 PM by Tim Wessman.)
Post: #10
RE: WARNING: Do NOT convert your HP Prime programs into applications!
Well, that doesn't match what all the many other people that have made apps report...

Suspect it is something in what you were doing possibly. Were you trying to move between a newer/older version of software? You can't move backwards...

The only way that can happen (of which I am aware) is if you are trying to put a new application with new internal data structure into an old version of the Prime software.

Also, the original poster was complaining about a piece of software that was consuming the entire memory of the calculator... it had nothing to do with "creating apps" but rather using up all the RAM with very inefficiently encoded image data.

TW

Although I work for HP, the views and opinions I post here are my own.
Find all posts by this user
Quote this message in a reply
03-09-2017, 06:13 PM
Post: #11
RE: WARNING: Do NOT convert your HP Prime programs into applications!
Thanks Tim.

I wasn't updating anything. I had actually only just started writing the app, only about a dozen lines of code at that point, using the Conn Kit to talk to the HP Prime Emulator running the latest and greatest 11226.

After saving the work I noticed that the app's icon had switched from the one I added to it, but not to the generic Spreadsheet icon. It had become the Function app icon and going into Symbolic view (of the app I'd just created, which was based on the Spreadsheet app!) showed the usual F1(X), F2(X) etc. list. I would expect to see a white exclamation mark on a yellow circle given that the Spreadsheet app doesn't actually have a symbolic view!
Find all posts by this user
Quote this message in a reply
03-09-2017, 08:42 PM (This post was last modified: 03-09-2017 08:43 PM by Han.)
Post: #12
RE: WARNING: Do NOT convert your HP Prime programs into applications!
(03-09-2017 06:13 PM)grsbanks Wrote:  Thanks Tim.

I wasn't updating anything. I had actually only just started writing the app, only about a dozen lines of code at that point, using the Conn Kit to talk to the HP Prime Emulator running the latest and greatest 11226.

After saving the work I noticed that the app's icon had switched from the one I added to it, but not to the generic Spreadsheet icon. It had become the Function app icon and going into Symbolic view (of the app I'd just created, which was based on the Spreadsheet app!) showed the usual F1(X), F2(X) etc. list. I would expect to see a white exclamation mark on a yellow circle given that the Spreadsheet app doesn't actually have a symbolic view!


Did you make any calls to the STARTVIEW command? You may have unknowingly switched to the function app. If all you did was simply edit a copy of the spreadsheet app, and saved your app, then (on the calculator side), the only thing that will happen is that it (the emulator, assuming it was synced with the conn. kit) will exit into the Home view but remain in whatever app you were using during the instant you pressed the save button in the conn. kit.

Graph 3D | QPI | SolveSys
Find all posts by this user
Quote this message in a reply
03-10-2017, 11:29 AM
Post: #13
RE: WARNING: Do NOT convert your HP Prime programs into applications!
(03-09-2017 08:42 PM)Han Wrote:  Did you make any calls to the STARTVIEW command? You may have unknowingly switched to the function app. If all you did was simply edit a copy of the spreadsheet app, and saved your app, then (on the calculator side), the only thing that will happen is that it (the emulator, assuming it was synced with the conn. kit) will exit into the Home view but remain in whatever app you were using during the instant you pressed the save button in the conn. kit.

You might be on to something there, Han.

I'll have to investigate further when I get a minute to come back to this.

What it doesn't explain is how the new app would retain the name I gave it when I selected the Spreadsheet app in the App view on the emulated Prime, hit "Save" and gave it the new name.
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)