Alpha Software Mobile Development Tools:   Alpha Anywhere    |   Alpha TransForm subscribe to our YouTube Channel  Follow Us on LinkedIn  Follow Us on Twitter  Follow Us on Facebook

Announcement

Collapse

The Alpha Software Forum Participation Guidelines

The Alpha Software Forum is a free forum created for Alpha Software Developer Community to ask for help, exchange ideas, and share solutions. Alpha Software strives to create an environment where all members of the community can feel safe to participate. In order to ensure the Alpha Software Forum is a place where all feel welcome, forum participants are expected to behave as follows:
  • Be professional in your conduct
  • Be kind to others
  • Be constructive when giving feedback
  • Be open to new ideas and suggestions
  • Stay on topic


Be sure all comments and threads you post are respectful. Posts that contain any of the following content will be considered a violation of your agreement as a member of the Alpha Software Forum Community and will be moderated:
  • Spam.
  • Vulgar language.
  • Quotes from private conversations without permission, including pricing and other sales related discussions.
  • Personal attacks, insults, or subtle put-downs.
  • Harassment, bullying, threatening, mocking, shaming, or deriding anyone.
  • Sexist, racist, homophobic, transphobic, ableist, or otherwise discriminatory jokes and language.
  • Sexually explicit or violent material, links, or language.
  • Pirated, hacked, or copyright-infringing material.
  • Encouraging of others to engage in the above behaviors.


If a thread or post is found to contain any of the content outlined above, a moderator may choose to take one of the following actions:
  • Remove the Post or Thread - the content is removed from the forum.
  • Place the User in Moderation - all posts and new threads must be approved by a moderator before they are posted.
  • Temporarily Ban the User - user is banned from forum for a period of time.
  • Permanently Ban the User - user is permanently banned from the forum.


Moderators may also rename posts and threads if they are too generic or do not property reflect the content.

Moderators may move threads if they have been posted in the incorrect forum.

Threads/Posts questioning specific moderator decisions or actions (such as "why was a user banned?") are not allowed and will be removed.

The owners of Alpha Software Corporation (Forum Owner) reserve the right to remove, edit, move, or close any thread for any reason; or ban any forum member without notice, reason, or explanation.

Community members are encouraged to click the "Report Post" icon in the lower left of a given post if they feel the post is in violation of the rules. This will alert the Moderators to take a look.

Alpha Software Corporation may amend the guidelines from time to time and may also vary the procedures it sets out where appropriate in a particular case. Your agreement to comply with the guidelines will be deemed agreement to any changes to it.



Bonus TIPS for Successful Posting

Try a Search First
It is highly recommended that a Search be done on your topic before posting, as many questions have been answered in prior posts. As with any search engine, the shorter the search term, the more "hits" will be returned, but the more specific the search term is, the greater the relevance of those "hits". Searching for "table" might well return every message on the board while "tablesum" would greatly restrict the number of messages returned.

When you do post
First, make sure you are posting your question in the correct forum. For example, if you post an issue regarding Desktop applications on the Mobile & Browser Applications board , not only will your question not be seen by the appropriate audience, it may also be removed or relocated.

The more detail you provide about your problem or question, the more likely someone is to understand your request and be able to help. A sample database with a minimum of records (and its support files, zipped together) will make it much easier to diagnose issues with your application. Screen shots of error messages are especially helpful.

When explaining how to reproduce your problem, please be as detailed as possible. Describe every step, click-by-click and keypress-by-keypress. Otherwise when others try to duplicate your problem, they may do something slightly different and end up with different results.

A note about attachments
You may only attach one file to each message. Attachment file size is limited to 2MB. If you need to include several files, you may do so by zipping them into a single archive.

If you forgot to attach your files to your post, please do NOT create a new thread. Instead, reply to your original message and attach the file there.

When attaching screen shots, it is best to attach an image file (.BMP, .JPG, .GIF, .PNG, etc.) or a zip file of several images, as opposed to a Word document containing the screen shots. Because Word documents are prone to viruses, many message board users will not open your Word file, therefore limiting their ability to help you.

Similarly, if you are uploading a zipped archive, you should simply create a .ZIP file and not a self-extracting .EXE as many users will not run your EXE file.
See more
See less

check for new versions

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    check for new versions

    Hello all,
    The A5 help menu option --> check for new versions.... somehow looks into the current alpha version and matches it against the latest version listed on a website. I would like to be able to have this built into an application I am developing. Can someone try to help me understand the elements necessary and how this is accomplished?
    Mike W
    __________________________
    "I rebel in at least small things to express to the world that I have not completely surrendered"

    #2
    Re: check for new versions

    Hi Mike
    No expert here
    you can use a function to get your app version from alpha and if you post the newest version number on a website some where alpha can go to the site and read it? I think I am right on that.
    A5_GetAppVersionNumber()reads the app version to a variable

    Maybe HTTP_GET() for the web side.

    I have never done this at all, but sounds like something I need to do.
    Dave Mason
    [email protected]
    Skype is dave.mason46

    Comment


      #3
      Re: check for new versions

      I use Actual Installer to build my install packages. It has the option of including an update utility that you can then call from your Alpha app. It will then look on the web (where you specify) and compare the users installed version against the latest update version you have on the web. If there is an available update it will then ask them if they wish to download it.

      When creating the actual update installer with Actual Installer, you specify that it is an update and you can also specify a minimum and maximum current version of your app to allow the update to install. This is useful for keeping users from installing a update on a very old release of your app.

      Comment


        #4
        Re: check for new versions

        Are you wanting to check for the current version of Alpha or your Application.
        If its the former then

        a5_HelpMenuNewVersionTest()

        Does the trick
        Bob
        Bob Whitaker

        Comment


          #5
          Re: check for new versions

          Hi Bob,
          I've been working on other things, sorry for the lack of response. I want to look for the version of our software. Alpha gives the functionality to have a version of our software retrievable and updated. Now I need for the capabilities to go to a website and capture the version value from a webpage..... somehow. Not versed in web stuff, and maybe I should post this on the web side of the MB.
          Mike W
          __________________________
          "I rebel in at least small things to express to the world that I have not completely surrendered"

          Comment


            #6
            Re: check for new versions

            Mike,

            I am working on this right now for a very solid app that I have almost finished that I expect to have around 1500 copies sold over a few years.

            If you dropped a new file in an ftp spot on your website and used something like this

            Code:
            dim fgetname as c = myfile  ' this being the name of the file on your ftp folder on web
            FTP_GET_FILE("ftp.Smarterasp.net","alda-001","Mypassword",var->fgetname,"c:\cchub.txt")  'last could be whatever you name it like "c:\myapp\checked.dvf" 
            FTP_GET_FILE("your ftp site","name needed","Yourftppassword",var->fgetname,"c:\cchub.txt")
            You could then read the first(or any) line on the .txt file to get your newest version and check that against you current version.

            You could then have a zip or install.exe file to download in the same place for the update.

            How you do that is up to you, but very possible.


            updatesftp.png
            Last edited by DaveM; 05-10-2015, 01:57 PM.
            Dave Mason
            [email protected]
            Skype is dave.mason46

            Comment


              #7
              Re: check for new versions

              Thanks David,
              Will investigate this
              Mike W
              __________________________
              "I rebel in at least small things to express to the world that I have not completely surrendered"

              Comment


                #8
                Re: check for new versions

                Mike,

                Are you wanting the latest A5 release build from an Alpha web site or the latest release of your app from your own web site? Probably the latter, and if so you could easily build a script or function using using http_get_page2() on which you could do some screen scraping using Alpha's scanner functions to get the latest release number, something you could make easy and foolproof on your own web page. I have done quite a bit of screen scraping this way on web sites I do not control. Once you study the various scanner functions it is not difficult, though on sites you don't control it could be impossible and/or a bit difficult. Still, everything I have tried has worked so far, except when someone changes the site and my scanners have to look for something different.

                I am sure (!) I could get the latest A5V11 build number off the A5V11 View Release Notes page.

                Raymond Lyons

                Comment


                  #9
                  Re: check for new versions

                  Ray,
                  I am almost positive he is looking to give update or information from his own website. (I think).
                  a simple text file with one line including the newest up date is all that is needed.
                  bring it to your site with and ftp function. read the first line with alpha to a variable, compare it to the variable for current in the adb and pop a message box up if needed. With a choice from that, can do nothing or can download the update file to wherever necessary (like desktop). the run the update. All is good again.

                  I am working on that whole thing right now and will share all the details when done and fully tested.

                  Similar is also going to be used for app registration. Again, I will share it when done.

                  A little precursor to this though. I used cpanel to create a folder in ftp and then a ftp user name to go directly to that folder. text file is name newest.txt. One line in it is "15.0514"(without the quotes) to match the date like I use for my apps.
                  The app version is in the adb, so any updates I put there will include the adb and any other changes applicable to my app.

                  What I showed above in another post was an image from filezilla. That is not the final, but a rough idea.
                  Last edited by DaveM; 05-14-2015, 01:47 AM.
                  Dave Mason
                  [email protected]
                  Skype is dave.mason46

                  Comment


                    #10
                    Re: check for new versions

                    Dave,

                    That's all well and good--there almost always is more than one way to skin a cat, and your way is probably as good as any. Still, if it is his web site, on which he lists and maintains his app's latest version number, the method I described should be just as easy and simple as your suggestion. Or at least it would be for me, but of course I have plenty of experience with using the scanner functions to scrape things off web pages. Mike is more brilliant than I am, so I am sure he could figure it out in short order. I could give a detailed example, but I am too busy being retired.

                    Ray Lyons

                    Comment


                      #11
                      Re: check for new versions

                      Originally posted by Raymond Lyons View Post
                      ...I could give a detailed example, but I am too busy being retired.
                      Ray Lyons
                      Okay, I guess I'm not quite that busy, especially since it is so simple. Below is just one example using the A5V11 Release Notes web page as an example. If it was Mike's own web page it would, if anything, be easier and more foolproof. Once he got the build number he could do whatever with it. Also, it needs to be noted that the scanner method I use below is only one of many scanner methods one could use to get the same thing. On highly complex web pages where, for example, the "Build" you are after is not the first "Build" on the page, other scanner methods would need to be employed. Try the code. It works.

                      Raymond Lyons

                      Code:
                      URL="http://downloads.alphasoftware.com/A5V11Download/releasenotes.html"
                      
                      result=http_get_page2(url,.f.)
                      
                      '*********** for testing ************
                      'CLIPBOARD.SET_DATA(result)	'capture so can put it into a text file to examine it to determine
                      				'how best to capture what you are after.
                      'end
                      '**********End of testing **********
                      
                      dim scanner as P
                      dim Startpoint as L =.F.
                      dim Build_Number as c =""
                      
                      scanner=stringscanner.create(Result)	'loads the entire web page into memory (Result)
                      
                      Startpoint=scanner.SkipToStringI("Build")	'The 1st "Build" on the web page. Only works cuz
                      					'Alpha puts the latest release at the top. Otherwise you
                      					'need to examine the HTML for another way to find
                      					'what you need. If it is your own web page you can
                      					'make it even easier and more foolproof.
                      If Startpoint =.F.
                      	msgbox("NADA","'Build' not found.")
                      	END
                      end if
                      Build_Number=scanner.ScanOver(16)	'16 beacause that's enough--could be more or less
                      					'plus there are other scanner ways to get what you want.
                      msgbox("A5V11 Build #",Build_Number)
                      end

                      Comment


                        #12
                        Re: check for new versions

                        Code:
                        this is real
                        'created a txt file with notepad with one line in it: the one line is simply "15.0514"  = 2015 may 14
                        
                        'I have this and the second part in a button.  
                        
                        FTP_FILE_XFER("ftp.aldweb.com","rthupt","eeles195","c:\alda12\church\reg.txt","/public_html/dnload/"+"reg.txt","put")
                        
                        ' sent the file directly to my sites
                        
                        
                        ' this is all you need in the users install:
                        FTP_GET_FILE("ftp.aldweb.com","rthupt","eeles195","/public_html/dnload/reg.txt","c:\samefile.txt")
                        'brought it back
                        
                        'Sorry, but I changed passwords and stuff for my own safety

                        This happens in an instant

                        If you do this with a windows server, the pathing will be different, but not by much.
                        Last edited by DaveM; 05-14-2015, 09:12 PM.
                        Dave Mason
                        [email protected]
                        Skype is dave.mason46

                        Comment


                          #13
                          Re: check for new versions

                          Originally posted by DaveM View Post
                          ...This happens in an instant....
                          I am not 100% sure what Mike was asking for but from Mike's 3rd post above:
                          Originally posted by Mike Wilson;
                          I want to look for the version of our software. Alpha gives the functionality to have a version of our software retrievable and updated. Now I need for the capabilities to go to a website and capture the version value from a webpage..... somehow.
                          I thought my sample code was responsive to what he was looking for. Maybe not--beats me.

                          As for doing it in a mere "instant", your mileage may vary, but I timed my code (my old machine, my mediocre internet speed, etc.) and it ran in (roughly) 0.09 seconds in V10, V11 and V12. So I don't think speed is much of an issue. If my approach to what I thought Mike was asking is of no use to him or to others, so be it.

                          In any case, I decided to see if the approach I used for the A5V11 build # would work to get the latest V12 build #, and sure enough simply scanning for the first "Build" won't work, as that word first appears the V12 release notes in places that are of no help. So, after examining the text from my clipboard testing, I first scanned for "Alpha Anywhere V3.11". Once that was found I scanned again, this time for the first "Build" after "Alpha Anywhere V3.11" (plus a whole lot of blank space). This too ran in 0.09 seconds. The V12 code appears below.

                          Now, what I really thought Mike was looking for has little or nothing to do with the Alpha builds in my examples. My examples are just to show the basics of how it could be done with a sample web page we all have. From what Mike wrote I assumed he would be going to his own web page to get his app's latest version # and compare that to the version # of the inquiring user, and if they don't match then do something else. In a case like that getting the latest version from his web page, using some scanning method or another, is almost child's play, and it is very fast.

                          If Dave's approach to whatever Mike was after is the way to go, I am not here to argue otherwise. I'm just trying to point out some methods that might be useful in some context or another (I suspect the scanner methods are little used by desktop users, but I have found them to be very powerful, if a tad confusing).

                          I am done with this thread--I hope!

                          Raymond Lyons
                          Code:
                          URL="http://downloads.alphasoftware.com/A5V12Download/ReleaseNotes/releasenotes.html"
                          result=http_get_page2(url,.f.)
                          
                          '*********** for testing ************
                          'CLIPBOARD.SET_DATA(result)	'capture so can put it into a text file to examine
                          'end
                          '**********End of testing **********
                          
                          dim scanner as P
                          dim Startpoint as L =.F.
                          dim Buildpoint as L =.F.
                          dim Build_Number as c =""
                          
                          scanner=stringscanner.create(Result)	'loads the entire web page into memory (Result)
                          Startpoint=scanner.SkipToStringI("Alpha Anywhere V3.11")	'The 1st "Alpha Anywhere V3.11" 
                          If Startpoint =.F.
                          	msgbox("NADA","'Alpha Anywhere V3.11' not found.")
                          	END
                          end if
                          
                          Buildpoint=scanner.SkipToStringI("Build")
                          If Buildpoint =.F.
                          	msgbox("NADA","'Build' not found.")
                          	END
                          end if
                          Build_Number=scanner.ScanOver(16)
                          msgbox("A5V12 Build #",Build_Number)
                          
                          end

                          Comment


                            #14
                            Re: check for new versions

                            In my scenario the way I will use it,

                            First step is to make the txt file.
                            send it to the web folder
                            My users will check it automatically when the log on to the app. ( no buttons)
                            app will autodownload the txt file
                            read it
                            compare the numbers using variables
                            if there is a new update, user will be prompted with the choice to continue or update.
                            if choice is update
                            app will download the update(probably to the desktop) and instructions(if needed)
                            user gets out of alpha
                            runs the update
                            --Or I could set it up so that the update is auto run on users exit.
                            restarts alpha with updates complete.

                            I will build a small app when time permits that will demonstrate the whole thing that all can see how it will work. It is a good test for me as well.
                            I still won't be giving my usernammes and passwords out though. LOL
                            Last edited by DaveM; 05-15-2015, 11:46 AM.
                            Dave Mason
                            [email protected]
                            Skype is dave.mason46

                            Comment


                              #15
                              Re: check for new versions

                              As an alternative to what Dave is proposing, here is how one might proceed using the scanner functions to get the latest app build # and a zipped update of the application files (not data files):

                              Of course the latest build # has to be on a web site, along with--for my way of doing this--a zip file containing the latest application files. Since my method of checking for the latest build # is so fast, this could be done in the autoexec, at the top, each time the autoexec is run. The autoexec would then check the users build # (also very fast). If the latest build # is greater than the user's app build #, ask if they want to update. If yes, use A5 download functions to download the zip file and put it in a specified location (probably just in the user's app folder, which the autoexec code could quickly determine). Next you may need a wait for idle (or??) and then still in the autoexec use an A5 unzip function to unzip the downloaded zip file into the application folder�including if need be the ABD and associated files (yes, the ADB files will be replaced while the user is still in and going to continue with the old autoexec). When unzipping is complete the user could continue with the rest of the old autoexec to open the app. However, as the new autoexec may be different, you would probably want the old autoexec to exit the app and automatically restart the app with the new autoexec. Or, something like the above! Oh wait, I forgot: I would also have the autoexec routine do a pre-specified backup of at least the old application files�maybe even all the files in the application folder. Always better to be safe than sorry.

                              Or, do it Dave's way.

                              Now, I have no use for any of this and don't sell anything, so I am not going to take the time to build a sample like Dave says he is going to do. However, I have used and/or tested the basics functions involved enough to be confident everything I outlined above will work. It really is fairly simple and it uses nothing but A5 functions.

                              Now if Mike would only tell what he is really after! Come on Mike!

                              Raymond Lyons

                              Comment

                              Working...
                              X