Board Logo
« Creating EXE (Stand-alone) Programs »

Welcome Guest. Please Login or Register.
Sep 23rd, 2017, 3:05pm


Conforums Terms of Service | Membership Rules | Home | Search | Recent Posts | Notification | Format Your Message | Installation FAQ


« Previous Topic | Next Topic »
Pages: 1  Notify Send Topic Print
 thread  Author  Topic: Creating EXE (Stand-alone) Programs  (Read 638 times)
Ralph
New Member
Image


member is offline

Avatar




PM


Posts: 12
xx Creating EXE (Stand-alone) Programs
« Thread started on: Oct 20th, 2011, 07:17am »

I have followed the instructions in Welopez's article "Creating EXE (Stand-alone) Programs"
http://www.jbasicnews.com/1/createEXE.html
and my newly-created folder containing all the necessary files, including my .exe file, appear exactly as shown in the article. But when I click the .exe file (or the desktop shortcut created for it), only gobbledegook appears. Is there a way to get it to work?
User IP Logged

tsh73
JB-Supporter


member is offline

Avatar




PM

Gender: Male
Posts: 3553
xx Re: Creating EXE (Stand-alone) Programs
« Reply #1 on: Oct 20th, 2011, 07:41am »

Hello Ralph,
(since others managed to do it, there sure must be a way).

However, "gobbledegook" doesn't look very descriptive.
How about a screenshot?

User IP Logged

Q: "And if I took your codes and compile them, and sell them for a profit"?
A: Go ahead. I had my share of good then I coded it for fun, if you can make better use of it - please do.
(enjoying JB 1.01 on WinXP, netbook and desktop)
Ralph
New Member
Image


member is offline

Avatar




PM


Posts: 12
xx Re: Creating EXE (Stand-alone) Programs
« Reply #2 on: Oct 20th, 2011, 08:17am »

Got the screenshot - tried unsuccessfully to paste it here, and using "insert image" icon above seems to require text - so how do I display it to you?
User IP Logged

tsh73
JB-Supporter


member is offline

Avatar




PM

Gender: Male
Posts: 3553
xx Re: Creating EXE (Stand-alone) Programs
« Reply #3 on: Oct 20th, 2011, 08:23am »

Take any "image hosting" site (google), post image there, post a link here.
User IP Logged

Q: "And if I took your codes and compile them, and sell them for a profit"?
A: Go ahead. I had my share of good then I coded it for fun, if you can make better use of it - please do.
(enjoying JB 1.01 on WinXP, netbook and desktop)
Ralph
New Member
Image


member is offline

Avatar




PM


Posts: 12
xx Re: Creating EXE (Stand-alone) Programs
« Reply #4 on: Oct 20th, 2011, 09:24am »

Hope this does it - sorry for delay - had to join image hoster, convert shot via Photoshop to JPEG, cope with computer overloading as the problematical .exe file kept running, etc.

As you can see from the scrollbars, the screenshot is just the upper left-hand corner of the full display.

User Image
User IP Logged

Ralph
New Member
Image


member is offline

Avatar




PM


Posts: 12
xx Re: Creating EXE (Stand-alone) Programs
« Reply #5 on: Oct 20th, 2011, 09:51am »

Two things I've noticed that can be seen in the screenshot:
(1) the extension appears as .exe.exe - I don't know why it's doubled and have tried unsuccessfully to rename it to have just one .exe - it's clearly incorrect doubled,
(2) one intelligible thing that appears in the first line is
"This program cannot be run in DOS mode."
User IP Logged

Jimmu
Junior Member
ImageImageImage


member is offline

Avatar




PM

Gender: Male
Posts: 119
xx Re: Creating EXE (Stand-alone) Programs
« Reply #6 on: Oct 20th, 2011, 10:24am »

It looks like you are trying to load the .exe file into JustBASIC. Have you tried to run it from Windows Explorer?
User IP Logged

I know many things. Some of them are even true!
Ralph
New Member
Image


member is offline

Avatar




PM


Posts: 12
xx Re: Creating EXE (Stand-alone) Programs
« Reply #7 on: Oct 20th, 2011, 10:46am »

I think you're onto it, Jimmu. Yes, I was trying to open it from Just BASIC. Following your suggestion, I've just tried to open it from both Windows Explorer and Internet Explorer - the standard "do you want to run this?" window appeared as it should, but unfortunately both run attempts resulted in the file not being found - this un-found file was listed as having an .exe.TKN extension. So I'll redo it all in a few hours' time (it's 2:40 a.m. here now), and see how we go, and will post the outcome. Many thanks also to "tsh73"!
User IP Logged

tsh73
JB-Supporter


member is offline

Avatar




PM

Gender: Male
Posts: 3553
xx Re: Creating EXE (Stand-alone) Programs
« Reply #8 on: Oct 20th, 2011, 1:03pm »

Aha!
Quote:
this un-found file was listed as having an .exe.TKN extension.


You have something.tkn
Now, you should rename jbrun.exe to something.exe

But you end up with something.exe.exe
So it looks for something.exe.tkn
(and cannot find it).

So you should rename .exe.exe to just .exe
- in XP, it was possible "not to hide file extensions".

EDIT
probably if you just rename it to "something" without extension, it will really turn to "something.exe", Windows just hides last ".exe"
« Last Edit: Oct 20th, 2011, 1:21pm by tsh73 » User IP Logged

Q: "And if I took your codes and compile them, and sell them for a profit"?
A: Go ahead. I had my share of good then I coded it for fun, if you can make better use of it - please do.
(enjoying JB 1.01 on WinXP, netbook and desktop)
Ralph
New Member
Image


member is offline

Avatar




PM


Posts: 12
xx Re: Creating EXE (Stand-alone) Programs
« Reply #9 on: Oct 20th, 2011, 10:58pm »

Success! Thank you Jimmu and tsh73. It now works perfectly, either by clicking the .exe file directly or the desktop icon pointing to it - very handy.

What I've learnt from this adventure:
(1) don't attempt to open .exe file from within JustBASIC,
(2) make sure all file extensions are visible (in my case: Windows XP > Windows Explorer > Tools > Folder options > View > Hide extensions for known file types - uncheck this last box),
(3) exactly as in Welopez's article, change jbrun.exe to "your tkn filename".exe (omitting, of course, the ".tkn").
Also, I've learnt how to post images on this forum (see previous posts in this thread).

Now, I'd like to know if (and how) such stand-alone applications can be included in a company-hosted web page for a user to download. I sent my host the following query taken from RunBASIC's Q&A:

"Q - Can I use Run BASIC to create applications that work with GoDaddy or other webhosting companies?
A - You will need to ask your webhosting company if they permit the installation of custom software like Run BASIC."

They replied:
"We checked this module, but it is not suitable for our environment. You won't be able to use it on our server.

The server-side scripting languages that we support are PHP, Perl, Python, Ruby, and TCL. The available database server is MySQL."

Finally, I'd like to share this nifty bit of code for accurately rounding off any decimalized number to two decimal places, such as for displaying currency amounts (the number is x):
Code:
    x = INT(x*100+.5)/100 
User IP Logged

Ralph
New Member
Image


member is offline

Avatar




PM


Posts: 12
xx Re: Creating EXE (Stand-alone) Programs
« Reply #10 on: Oct 23rd, 2011, 10:17am »

OK - I figured it out. After you have followed the instructions in Welopez's excellent article, you will have a folder containing your application's .exe and .tkn file(s), and a few others.
Now you convert this folder to a .zip file, and rename it if necessary so its name is as short as possible with no capital letters, spaces or punctuation marks. You upload this to your website in the same place as your normal HTML files.
On your webpage from which you want this .zip file to be downloaded, you simply place a normal link, giving your site's url followed by the .zip's name, as follows:
<a href="http://yourwebsite/name.zip">anything</a>
where "yourwebsite" may be "abcd.com" and "name.zip" is what you named the .zip file and "anything" is whatever text or image you want the user to click.
Upload this HTML file. That's all.
The user will see the usual window asking if they want to run or save the download, etc. They may need to be told in your HTML page that once they have extracted ("unzipped") the files (probably best to their desktop), the .exe file(s) to make your application run is/are the one(s) with the "B" icon, and it can be handy to turn these into desktop icons for easy access.
The above is how you can get around web hosts which cannot run Run BASIC. I successfully used only Just BASIC.
User IP Logged

Mark J
Guest
xx Re: Creating EXE (Stand-alone) Programs
« Reply #11 on: Sep 17th, 2013, 1:37pm »

Please could someone establish the article at http://www.jbasicnews.com/1/createEXE.html again as it does not appear. I keep getting a account suspended notification. I have also looked in the help file for how to create a Tokenized file which I believe is also an exe but this also does not come up. PLease can someone help
User IP Logged

Facundo
Board Moderator


member is offline

Avatar




PM

Gender: Male
Posts: 1289
xx Re: Creating EXE (Stand-alone) Programs
« Reply #12 on: Sep 17th, 2013, 2:05pm »

on Sep 17th, 2013, 1:37pm, Guest-Mark J wrote:
Please could someone establish the article at http://www.jbasicnews.com/1/createEXE.html again as it does not appear. I keep getting a account suspended notification. I have also looked in the help file for how to create a Tokenized file which I believe is also an exe but this also does not come up. PLease can someone help


Here: http://web.archive.org/web/20051024010735/http://www.jbasicnews.com/1/createEXE.html

But better use our wiki, you will find excellent articles there.Your Standalone JB Program
« Last Edit: Sep 17th, 2013, 2:09pm by Facundo » User IP Logged

cundo aka MSlayer
Rod
Administrator
ImageImageImageImageImage


member is offline

Avatar

Graphics = Goosebumps!


PM

Gender: Male
Posts: 3089
xx Re: Creating EXE (Stand-alone) Programs
« Reply #13 on: Sep 18th, 2013, 01:48am »

@Mark. If you cannot see the content of the help file then follow the advice in the installation faq at the top of the home page. Download and use the .chm version or right click on the .hlp file and under properties, unlock it.
User IP Logged

Pages: 1  Notify Send Topic Print
« Previous Topic | Next Topic »

Conforums Terms of Service | Membership Rules | Home | Search | Recent Posts | Notification | Format Your Message | Installation FAQ

Donate $6.99 for 50,000 Ad-Free Pageviews!

| |

This forum powered for FREE by Conforums ©
Sign up for your own Free Message Board today!
Terms of Service | Privacy Policy | Conforums Support | Parental Controls