Board Logo
« Creating Your First Executable Program (.EXE) »

Welcome Guest. Please Login or Register.
Jan 21st, 2018, 12:53am


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

Please use the forums Search feature before asking.
Please post code using the code box described in Format Your Messages.
This will keep indentation, separate it better form the message and prevent gibberish.
If the code is too long for one post or additional files are needed, upload a ZIP archive to the Just BASIC Files Archive Site.

« Previous Topic | Next Topic »
Pages: 1 2 3  ...  5 Notify Send Topic Print
 sticky  Author  Topic: Creating Your First Executable Program (.EXE)  (Read 4125 times)
Janet Terra
Global Moderator
ImageImageImageImageImage


member is offline

Avatar




Homepage PM

Gender: Female
Posts: 3061
xx Creating Your First Executable Program (.EXE)
« Thread started on: Oct 23rd, 2005, 9:10pm »

The most often asked question in this forum is -

"How can a make an executable program from my .bas file?" The answer, like so many answers, can be found in the Just BASIC Help File.

Left Click on the ? button in Top Center Right Menu Bar of Just BASIC. This opens the Help File.

Click the upper Contents Tab.

Left Double Click the Book icon next to Just BASIC Help. This Book icon should be the open view so that the subcategories are displayed.

Double Click ? Creating a Tokenized File

Follow the Directions. These directions are straightforward and are also accompanied with illustrations.

If you have questions about Just BASIC coding, searching this Help File should be your first action. Every command is described in the Help File and every description contains a short code demo. The Help File is truly the best resource there is for Just BASIC. smiley

The first issue of the Just BASIC Newsletter also has an illustrative tutorial with this same information. The link is
Creating EXE (Stand-alone) Programs
written by Welopez.

The second most asked question is -

How can I make an executable with just one file instead of all these files? The answer is, Just BASIC requires these files. They need to be included. It is possible to use one or more 3rd party utilities to compress all these files into one. Not all of these utilities are freeware.

« Last Edit: Jul 8th, 2007, 1:35pm by Stefan Pendl » User IP Logged

Janet Visit me at BASIC Samplings
MottHaven
New Member
Image


member is offline

Avatar




PM

Gender: Male
Posts: 1
xx Re: Creating Your First Executable Program
« Reply #1 on: Jan 31st, 2007, 08:23am »

Although I have programmed in a dozen languages, I am a newuie ri JUST BASIC.

To start I want to write a very simple program: Read two numbers and print their total.

You have iissued detailed instructions.
But I c annot find the first link.


Left Click on the ? button in Top Center Right Menu Bar of Just BASIC. This opens the Help File.

MAYBE I AM ON WRONG PAGE
nOR CAN i FIND HELP.

cAN YOU PROVIDE GUIDQNCE.

Thanx Loads
MottHaven
User IP Logged

Mott Haven
JohnDavidson
Administrator
ImageImageImageImageImage


member is offline

Avatar




Homepage PM


Posts: 4142
xx Re: Creating Your First Executable Program
« Reply #2 on: Jan 31st, 2007, 08:42am »

Hi MottHaven
Welcome to the community!

Janet was talking about the buttons in Just BASIC.
Once you have the file open it will identify itself as JB's helpfile at the top of the window.

The newsletter article Janet referred to, http://www.jbasicnews.com/1/createEXE.html, is a much more thorough explanation.


John
User IP Logged

John Davidson
e-me: johnshomeport@yahoo.com
My JB Page: http://john.jbusers.com/
Did ya Libby yet? http://lblibby.com/
Welopez
Moderator
ImageImageImageImageImage


member is offline

Avatar

Never let your beliefs get in the way of learning.


PM

Gender: Male
Posts: 4407
xx Re: Creating Your First Executable Program
« Reply #3 on: Jan 31st, 2007, 08:49am »

Hi, Mott! It wasn't clear whether you wanted to get keyboard input to get number 1 and number 2, then print the sum, or get number 1 and number 2 from a DATA file and print the sum. The two snippets below will do what you ask:

KEYBOARD
Code:
INPUT "Enter number 1: "; num1
INPUT "Enter number 2: "; num2
PRINT "The sum of number 1 + number 2 is: "; num1+num2

END
 

FROM FILE
Code:
OPEN "numbers.dat" FOR INPUT AS #file
WHILE EOF(#file)=0
INPUT #file, num1, num2
PRINT "The sum of number 1 + number 2 is: "; num1+num2
WEND
CLOSE #file

END
 

See File Operations for creating and saving sequential files or random files for your DATA.

User IP Logged

JB 1.01
Win7 64bit, 4 GB RAM, Pentium 6200@2.13 GHz (laptop)
WinXP, 1 GB RAM, Intel N270@1.6 GHz (netbook)
Janet Terra
Global Moderator
ImageImageImageImageImage


member is offline

Avatar




Homepage PM

Gender: Female
Posts: 3061
xx Re: Creating Your First Executable Program
« Reply #4 on: Mar 24th, 2007, 2:28pm »

If you prefer an autmated method of creating a folder for your files, try John Davidson's JB Installer.
JB Installer will place all your needed files in one folder and you can then distribute using just one file. You can even change the JB icon if you like, provided you include reshacker.
Check it out. It's awesome!

Janet
User IP Logged

Janet Visit me at BASIC Samplings
jeremyhowell
Senior Member
ImageImageImageImageImage


member is offline

Avatar

A Life? Cool! Where can I download one of those from?


Homepage PM

Gender: Male
Posts: 874
xx Re: Creating Your First Executable Program (.EXE)
« Reply #5 on: Jul 30th, 2008, 03:11am »

I just found out recently I have to include, what was it, six SLL/DLL files with the runtime engine and .tkn file to actually make a compiled JB program work. Is this correct, and if so, is this also true with LB?

~Jeremy~
User IP Logged

The mods and admins are not paid to help you and run this forum, so give them the respect they deserve. wink

Free Games

AMD Athlon XP 2200+ 1.81Ghz, 512mb RAM, GeForce 7600 GS, Windows XP Home Edition SP3, Just BASIC 1.01
Stefan Pendl
Administrator
ImageImageImageImageImage


member is offline

Avatar

Let's talk JB ...


Homepage PM

Gender: Male
Posts: 3712
xx Re: Creating Your First Executable Program (.EXE)
« Reply #6 on: Jul 30th, 2008, 05:19am »

on Jul 30th, 2008, 03:11am, jeremyhowell wrote:
Is this correct, and if so, is this also true with LB?

Yes, this is correct for the current version.
There should be changes made to the way a distribution is created in the next major release, so the result would be a single file.
User IP Logged

Stefan - Homepage

Remember to read the forum rules board wink

Just BASIC 1.01, Windows 10 Professional x64, Intel Core i7-4710MQ 2.5GHz, 16GB RAM
can4tek
Full Member
ImageImageImageImage


member is offline

Avatar

The Angel of Software

YIM YIM
Homepage PM

Gender: Male
Posts: 185
xx Re: Creating Your First Executable Program (.EXE)
« Reply #7 on: Jul 30th, 2008, 08:12am »

on Jul 30th, 2008, 05:19am, Stefan Pendl wrote:
Yes, this is correct for the current version.
There should be changes made to the way a distribution is created in the next major release, so the result would be a single file.


I can't wait till it will be a single file, neaten up the directories
User IP Logged

Can4tek.co.uk | Creator Of Crystal & SpeedKit

3.33Ghz I3 560 Overclocked, 4GB Corsair Vengeance Ram, HD 5850 HIS Icooler 1GB GDDR5, Win7 Ultimate, 60GB Solid State + 2x500GB HDD's, Fatility Champion Sound Card.

Liberty Basic v4.04 & Justbasic v1.01
Welopez
Moderator
ImageImageImageImageImage


member is offline

Avatar

Never let your beliefs get in the way of learning.


PM

Gender: Male
Posts: 4407
xx Re: Creating Your First Executable Program (.EXE)
« Reply #8 on: Jul 30th, 2008, 08:44am »

Quote:
I can't wait till it will be a single file, neaten up the directories.

Like many commercial software applications, your EXE will be a single file for distribution. When the user unpacks the EXE file, some contained files will be placed into one directory, some files into another directory, as needed by Windows. In actuality, most EXE files are collections of sub-directories and files. Some files do not need to be sent with the EXE file, because they can be called from existing Windows directories. Allowances must be made if you are writing cross-platform programs which may be installed on another OS if you want the program to run properly.

User IP Logged

JB 1.01
Win7 64bit, 4 GB RAM, Pentium 6200@2.13 GHz (laptop)
WinXP, 1 GB RAM, Intel N270@1.6 GHz (netbook)
Stefan Pendl
Administrator
ImageImageImageImageImage


member is offline

Avatar

Let's talk JB ...


Homepage PM

Gender: Male
Posts: 3712
xx Re: Creating Your First Executable Program (.EXE)
« Reply #9 on: Jul 30th, 2008, 10:19am »

on Jul 30th, 2008, 08:12am, can4tek wrote:
I can't wait till it will be a single file, neaten up the directories

An installer is all to get the files into one installable package.
You may consider using IExpress too.
User IP Logged

Stefan - Homepage

Remember to read the forum rules board wink

Just BASIC 1.01, Windows 10 Professional x64, Intel Core i7-4710MQ 2.5GHz, 16GB RAM
tooanalytical
Senior Member
ImageImageImageImageImage


member is offline

Avatar




PM


Posts: 1739
xx Re: Creating Your First Executable Program (.EXE)
« Reply #10 on: Jul 30th, 2008, 4:56pm »

on Jul 30th, 2008, 10:19am, Stefan Pendl wrote:
An installer is all to get the files into one installable package.
You may consider using IExpress too.


Is IExpress really any better than other install makers such as CreateInstall, or Install Creator (by ClickTeam), or Setup2Go, or some people's favorite Inno, or other people's favorite Tarma; or other commercial install makers (including those of low cost)?

Does IExpress have some functionality limitations?
User IP Logged

Welopez
Moderator
ImageImageImageImageImage


member is offline

Avatar

Never let your beliefs get in the way of learning.


PM

Gender: Male
Posts: 4407
xx Re: Creating Your First Executable Program (.EXE)
« Reply #11 on: Jul 30th, 2008, 6:59pm »

Quote:
Is IExpress really any better than other install makers such as CreateInstall, or Install Creator (by ClickTeam), or Setup2Go, or some people's favorite Inno, or other people's favorite Tarma; or other commercial install makers (including those of low cost)?

Not to be facetious, but that's like asking "Is a Dodge any better than a Ford, or Chrysler, or Honda, or Hummer, (including some of those low cost?)"

It's a matter of personal preference. It depends upon which you find to be the easiest to learn and use. My own preference is WinRAR. It's low cost, $29 will get you updates for life, and it can also be used to zip or unzip files. Cool! wink
User IP Logged

JB 1.01
Win7 64bit, 4 GB RAM, Pentium 6200@2.13 GHz (laptop)
WinXP, 1 GB RAM, Intel N270@1.6 GHz (netbook)
carl123
Member in Training
ImageImage


member is offline

Avatar




PM


Posts: 46
xx Re: Creating Your First Executable Program (.EXE)
« Reply #12 on: Sep 12th, 2008, 05:03am »

Is there an installer for JB programs that I can download for free in the internet?
User IP Logged

Welopez
Moderator
ImageImageImageImageImage


member is offline

Avatar

Never let your beliefs get in the way of learning.


PM

Gender: Male
Posts: 4407
xx Re: Creating Your First Executable Program (.EXE)
« Reply #13 on: Sep 12th, 2008, 07:55am »

Unless you're running MAC or Win95/98, you probably already have an installer program on your computer: IExpress.

Of course, if you want to buy an installer, there are many available programs on the Internet. Myself, I prefer WinRAR, but then I'm very set in my ways.

Good luck to you!
User IP Logged

JB 1.01
Win7 64bit, 4 GB RAM, Pentium 6200@2.13 GHz (laptop)
WinXP, 1 GB RAM, Intel N270@1.6 GHz (netbook)
carl123
Member in Training
ImageImage


member is offline

Avatar




PM


Posts: 46
xx Re: Creating Your First Executable Program (.EXE)
« Reply #14 on: Sep 14th, 2008, 03:32am »

I used the IExpress but it wont start and prompts me to add the appropriate CLOSE commands. In addition to this, it says Runtime Error: File C:\DOCUME~1\...\LOCALS~1\Temp\IXP001\bmp\h=xy.bmp not found.

My program uses bitmaps and a wav file. They are all in separate folders inside the main folder. I checked the SED files--each bitmap and wav files are listed there. I restarted the PC too but the result is still the same.

By the way the h=xy.bmp is the first bitmap that is loaded when the program starts. All bitmaps and wav files are unloaded before the program closes.

Do you have an idea what is causing this?
User IP Logged

Pages: 1 2 3  ...  5 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