BBC BASIC for Windows
General >> General Board >> internet file depoyment http://bb4w.conforums.com/index.cgi?board=general&action=display&num=1284869130 internet file depoyment
Post by yshua on Sep 19th, 2010, 04:05am
Hello all:
I have a game I contracted with web developers to deploy from my own domain space. Everything went great till they asked for the executable file to deploy when customer click their "download now" pretty, green button. I was unaware my executable could never use the copy command to copy a file from some internet pathname to a pc pathname. I could use a few ideas.... Help!
Thanks for any input, Yshua Calkins
Re: internet file depoyment
Post by admin on Sep 19th, 2010, 10:54am
Everything went great till they asked for the executable file to deploy when customer click their "download now" pretty, green button.
It depends on the browser.
With Internet Explorer clicking on a link to an EXE file results in a 'Save or Run' option. If the user clicks 'Run' it will do exactly what you have been asked for - your executable will be downloaded (behind the scenes) to a temporary location and then executed automatically.
With Firefox you only get the option to 'Save'; once the file has been downloaded a list of recently downloaded files appears and you must double-click on the one you've just downloaded.
With Google Chrome, you only get the option to 'Save'; once the file has been downloaded a button appears at the bottom of the screen which executes the program.
Opera just seems to get confused!
In all cases the user may have to accept a security warning before the program is run. Obviously, running an EXE is only possible if the browser is running under Windows!
So IE comes closest to what you are being asked for. You may be able to reduce or eliminate the need for the user to accept a security warning by 'digitally signing' the executable - but obtaining a code-signing certificate is not cheap!
Richard.
Re: internet file depoyment
Post by yshua on Sep 19th, 2010, 11:34am
That's wonderful to know that. But then how does one download a manifest with an executable? Is it in a similar filespace in the domain files?
Re: internet file depoyment
Post by admin on Sep 19th, 2010, 1:46pm
how does one download a manifest with an executable?
The most 'elegant' way is probably to use a resource editor to incorporate the manifest into the executable as a resource.
Failing that (assuming we're talking about a BBC BASIC executable here) embed the manifest file in the executable (in @dir$). The manifest won't be acted upon the first time the EXE is run (because it isn't there yet!) but the second and subsequent times it will be, because by then it's been extracted to the same folder.
You'd need to build in a test for the EXE being run the first time - such as checking for the presence of a file that the EXE creates specifically for the purpose - and if so execute itself!
Richard.
Re: internet file depoyment
Post by yshua on Sep 19th, 2010, 9:49pm
Dear Richard:
Sounds brilliant_ how to get the manifest to execute on a second pass!! But I also want to know how to use the resource editor for one or two left over, very large Liberty Basic files as well. Can you please explain?
Powerful, Yshua Re: internet file depoyment
Post by admin on Sep 19th, 2010, 10:28pm