Getting an application to run from a website.

BlitzPlus Forums/BlitzPlus Programming/Getting an application to run from a website.

gerald(Posted 2010) [#1]
How do you get an application (that runs from a disk in a D: drive) to run when it is clicked on on a website?

Downloads are scary enough to want to run the application from a website. I have no idea where to begin or what to do.

Do you just enter the path to the necessary files in the image load/draw code?

What is the path to a website folder anyway? Who would know? Tech support for the web provider?

Is there a link or button with code attached to do this?

I would appreciate any help.

Gerald Nelson

GaryV(Posted 2010) [#2]

xlsior(Posted 2010) [#3]
When you click on a file link in a website, it's up to your brwoser to determine what happens: Typically you get a "run" or "save" option, to either save it somewhere explicitly on your HD, or to save it into your 'temp' folder and run it from there. The path to the temp folder varies, and depends on the OS and browser used.

Note that many people aren't comfortable running .exe's straight from the web, and there's a lot of antivirus programs that will prevent a .exe from launching from the temp folder as well since it's a common virus attack vector.

If you mean run a game *in* a webbrowser (similar to online flash games), then you'd need a 3rd party wrapper product that can do this for you, such as OSAkit (not sure if it's still available)

Finally, bmx2 (currently under development) is supposed to have the ability to export to some web-friendly formats that can be published directly, but this is still under development and not currently available.

gerald(Posted 2010) [#4]

Thanks for your response.

I am a complete beginner at this so I have alot of questions. My games run on XP from a D:\ drive location. They are coded to do this.
What do I need to do to code them to run from an osakit file on a website?

What code must be used for the path to art/accessory files?
I downloaded the osakit demo and it showed a game having files in the folder. How must my game be packed to work? Who would know?

Someone told me not to "hard code" my art to a path eg. D:\gameart1. What else can you do??

I would like to learn to do as much of this myself as I cant as it is costly to use a product.

The osakit demo took 1 second to "make a file" from a .zip file is it just setting up to run from an osaplayer?

Is this the same for flash/flash player. You code for the playere of the product you use/buy? Is this the same for java, flash and osakit? Code for and then use their player?

Thats alot for now. I would appreciate any input.


xlsior(Posted 2010) [#5]
You should never, ever use absolute paths in your game, always use relative paths.

If you don't specify a folder, your program will automatically try to open any loaded files from its current directory. If you have a subfolder named 'images' with images inside of it, you can simply do a loadimage for "images\mypicture.jpg".

Do *not* put the entire physical path and driveletter in the mix, or you won't be able to run it from any other location.

gerald(Posted 2010) [#6]

OK, so my game is on a disk in the D drive. If the art is in a folder on the D drive also (images1) the application will automatically search the default drive (D) for images1 and use it?

I guess I should try this, at least once to see if it works.

Does this carry over to a website? If the application is on the site will it automatically search the same site for images1 and use it? Or will a simple link connect it? Will tech support know how to do it?

Is this what osakit or flashplayer do. Set up a link from an application on a website to support files?

Thanks for the help.

Download my games from on google. They are still set up for D drive only.

xlsior(Posted 2010) [#7]
Ok, so my game is on a disk in the D drive. If the art is in a folder on the D drive also (image1s1) the application will automatically search the default drive (D) for images1 and use it?

It doesn't really search, it still goes exactly where you tell it to -- except it doesn't matter -where- exactly the folder lisves, so if you move the game folder to another location (or drive) it will still work.

For example:

Your game is called 'super'. You have it installed in d:\games\super. To launch it, you'll run d:\games\super\super.exe
Inside that game, you tell it to load 'images1\image1.jpg', it will then automatically try to go to the subfolder called images1, and load image1.jpg
It's the same thing as if you would have told it to load 'd:\games\super\images1\image1.jpg', but you can ignore the first portion of that altogether and as a bonus benefit it means that your game is no longer tied to that drive and subfolder structure.

How it works from within a wrapper may be a different matter though: I would think it should, but the wrapper may have its own special rules you need to adhere to. Can't help you there.
(Using incbin is definitely recommended though, so at least you can make the whole thing self-contained inside a single executable file with no external dependencies)

gerald(Posted 2010) [#8]

I changed my applications to "no designated drive" and they work. I did get hung up when I tried to debug something though. They all come up invalid image handle as no location for the support file is called during debugging. I had to rely on the fact they all ran OK before I removed the D:\ from al the files.

Is there a way to debug with no designation for support files called in the program? Or do you do it only after you are sure they all work?

Anyway thanks to "xlsior" for the tip on "any location operation" for applications.

I checked a game I have for startup and .ini files. The name install shield corporation comes up in the info. Do these people help with setting up small applications to run from a website? It seems like they
are real pros at it.

Still can't get the idea out of my head. Check out the new setups on if you want. Maybe even give feedback.


xlsior(Posted 2010) [#9]
Installshield is one of the major companies that make installer software for windows -- as far as I know, they don't do any web-based stuff.

xlsior(Posted 2010) [#10]
Let me elaborate on that: installshield will take your program file and install it to the system, typically somewhere under the c:\program files.

You can download/run an installer for your game through the web, which would then isntall it to your c:\program files -- but it would not run *in* a webpage, like a typical flash game would.

I'm still not entirely clear on what exactly you're hoping to accomplish here when you say "from a website".

If a local install is OK, then you may also look at innosetup or nullsoft installer, which are both free and similar to what installshield does.

gerald(Posted 2010) [#11]
How did these posts wind up on a google search engine? If naming my site on the post was an ethical violation I appoligize.

xlsior(Posted 2010) [#12]
...Pretty much everything on the internet ends up on the google search engine, including these forums. That's kind of the whole point of Google.