|
Post by johnnyb on Jan 27, 2023 23:11:49 GMT
Anyone familiar on making an exe file?..
|
|
|
Post by plus on Jan 28, 2023 1:09:06 GMT
You can't make an exe with JB.
|
|
|
Post by tsh73 on Jan 28, 2023 8:14:14 GMT
There is a two help topics in a Help hile * Creating a tokenized file * Using the Runtime Engine If you do it, you will end up with dosen of files (single runtime EXE, your tokenised (~compiled) program and some auxiliary DLL-type files) which will be able to run on another computer without Just BASIC installed and without others seeing your BASIC code.
You really could pack it in single EXE with Iexpress (it is still in Win 10 as I just tested) or some other SFX creator, but this is optional step.
|
|
|
Post by Rod on Jan 28, 2023 12:39:53 GMT
Yes it is very easy to do. My advice would be to create a project folder named as your program "myprogram" and put your resource files .bmp .wav etc into it. COPY in the required .dlls and JBRUN2.exe. Rename the copy of JBRUN2.exe in the folder to "myprogram".exe and ensure you have "myprogram".tkn in the folder. Now Zip the whole folder, so navigate out of the folder right click on the folder and select compress to zip file. Now distribute the .zip. The user simply unpacks the folder anywhere on their PC they like. They need to navigate into the folder and click on the "myprogram".exe
|
|
|
Post by plus on Jan 28, 2023 14:09:47 GMT
Basically tsh73 and Rod are talking about gluing a program to a RunTime exe that interprets your program with tokens already processed and renaming that contraption the program name.exe, a little faster than straight from Interpreter but not a truly compiled program. So you see you aren't making by way of compiling an exe, you are copying an exe adding stuff to it at the end and renaming the exe.
|
|
|
Post by tsh73 on Jan 28, 2023 14:28:49 GMT
There is an old cartoon Man asked for a transport (taxi cab) and pony (Not that kind of pony. Very very old cartoon) came to him offering a ride. He refused. Pony asked "so do you want to go or a taxi badge?"
What kind of taxi badge you need from an EXE? If it works without installed IDE that's pretty fair ride for me.
|
|
|
Post by Rod on Jan 28, 2023 17:29:59 GMT
We are in danger of confusing the original poster. The answer to his question is YES it’s easy. B+ is splitting hairs. All BASIC code needs support files to run in Windows. So there are ALWAYS support .dlls. It is possible to compile BASIC directly to code that will run on Windows.dlls but they are few and far between. However B+ has other useful talents
|
|
|
Post by plus on Jan 28, 2023 21:20:26 GMT
Well b+ can tell another story. Does Arby's use real Roast Beef in their sandwiches? Well yeah, it's beef and it eventually gets roasted but it's not one cut from one animal. It's hundreds maybe thousands of pieces glued together with "binder" so that it is lean (firm for evenness, no fat holes) and fits well on slicer for nice deli cutting.
|
|
atomose
Member in Training
Posts: 37
|
Post by atomose on Jan 29, 2023 0:04:51 GMT
if you want to creat a single .exe without dll and tkn its really easy - make a folder, put .exe, dll, tkn and all you need into this folder - download and use Enigma virtual box JUST HERE- You have a single .exe with all the folder into this
|
|
|
Post by xxgeek on Jan 29, 2023 23:15:43 GMT
I guess it boils down to what an EXE file is, or how you like to define it. en.wikipedia.org/wiki/.exeI would define an EXE file as a file that executes a program in Windows OS Whether it be a container, or a program written in C, assembly or some other low level language, it is still an EXE file, and it can be created by Just Basic v2.0 as you will see in the code provided in the link below. Of course it uses other languages to help JB with what it cannot do, but it is ALL JB code in a single bas file, and it creates a single EXE, or executable file. If it isn't an EXE file being created, then what is it? It has an EXE extension, and it does execute a program created from a Just Basic v2.0.bas file. justbasiccom.proboards.com/thread/958/new-bas-command-line-support?page=1&scrollTo=6719
|
|
|
Post by plus on Jan 30, 2023 2:31:00 GMT
Well you better not make a book by copying another, adding a chapter to it and then giving it a new title.
|
|
|
Post by marshawn on Jan 30, 2023 4:05:45 GMT
what about LB B+?
|
|
|
Post by Rod on Jan 30, 2023 10:06:39 GMT
Both Liberty BASIC and Just BASIC can easily create .exe files that will run on any PC. The .exe needs support .dlls, these are the dlls that provide the Smalltalk "engine" that power Liberty and Just BASIC.
Why do we have this facility? Well it allows us to create programs and distribute working programs without compromising Carl's intellectual property. Because the thing that is NOT distributed is the IDE. So folks receiving the distributed software can run it but not amend or create further software.
Now an .exe is an .exe. It fires up and runs instructions. What B+ is getting at is that our .exe is not compiled to machine code or c# code that can run on native windows .dlls/api. Not many BASICs can do this, most have their own "engines" particularly the simulators.
Then we get to the bit about compiled verses interpreted. Old school BASIC coders will believe that the fastest BASICs are compiled to machine code or c# and run on native or system dlls. That used to be true but there are so many layers to Windows these days I am not sure it still holds true. However compiled code will always run faster than interpreted code. Running interpreted is the whole point about most BASICs. You code and you test, you tweak it and run it again. When you know the code holds together then you compiled it to make it run faster. Compiled code cant be tweaked you need to recode and recompile. To be honest thats really old thinking.
Today Just BASIC offers the benefit of interpreted coding in a nice IDE with automatic compiling, when you press run it then actually compiles the code and sends it to the engine to be displayed. Best of both worlds and it is pretty fast a LOT faster than any old 8Bit machine I used to own.
So what is B+ complaining about? Well he needs to tell us more clearly. But we can create an .exe it fires up like any other .exe and it has support files like any other .exe .dlls .bmp .wav .dat etc etc. It is robust, it runs just as fast as a Just BASIC. Whats not to like?
|
|
|
Post by Rod on Jan 30, 2023 11:37:55 GMT
Just to make it even simpler. Use this helper exe.bas file to create your project. Firstly create a new folder anywhere you like to hold your project files. Lets assume its called MyProject. When you are happy with your own .bas program create your .tkn and save it into MyProject folder. Use the Menu option RUN, MAKE *.TKN then navigate to inside MyProject folder, name the tkn and click save. So now you have MyProject folder with the .tkn file listed. Put any other files that your program needs into the folder, .bmp .wav .dat etc.
When you are ready load the helper exe.bas program into the Just BASIC IDE and save it into the MyProject folder as exe.bas. By doing that you have set the DefaultDir$ to MyProject folder. Now run the helper exe.bas, it will copy the system files and rename the runtime to whatever you have named the .tkn. It will also remove the exe.bas file.
Thats it, you are ready to go. Navigate back out of the MyProjects folder then right click on it and choose compress to zip. A new file will appear called MyProject.zip. Distribute that. Tell the user to unpack it and click on the .exe
Step 1) Create project folder Step 2) Save programs .tkn into project folder Step 3) Save resources like .bmps into project folder Step 4) Load the helper exe.bas to the IDE Step 5) Save the helper exe.bas to the project folder Step 6) Run exe.bas Step 7) Using Windows File Explorer navigate to the project folder, right click on the folder and choose compress to zip
dim info$(10,10) files DefaultDir$,"*.tkn", info$() if info$(0,0)="1" then tkn$=left$(info$(1,0),len(info$(1,0))-4)+".exe" f$="VBAS31W.SLL VGUI31W.SLL VOFLR31W.SLL VTHK31W.DLL VTK1631W.DLL VTK3231W.DLL VVM31W.DLL VVMT31W.DLL JBRun2.exe" for i= 1 to 9 fi$=word$(f$,i) open StartupDir$;fi$ for input as #f d$=input$(#f,lof(#f)) close #f open fi$ for output as #o #o d$; close #o next name "JBRun2.exe" as tkn$ kill "exe.bas" print "Files copied successfully, now zip this folder."
else print "Token file not found or more than one token file." end if end
|
|
|
Post by plus on Jan 30, 2023 17:13:50 GMT
B+ is not complaining, b+ likes testing code through interpreter because he doesn't have to wait for it to be compiled. The point is JB code you write is not compiled into an exe, it can be "tokenized" and added to a copy of the Runtime.exe and renamed and run independent of the JB interpreter but it is not truly compiled code which would run allot faster than a JB produced .exe.
Allot of Basic's are compiled by converting the code to C++ or C and then compiled under that language, runs much faster than a JB produced exe.
|
|