|
Post by daveylibra on May 29, 2019 12:39:03 GMT
Hi, sorry for this really naive question but I am 49 and can manage to code a bit of BASIC but I am rusty when it comes to new technology.
I have managed to write a simple program in JustBASIC that does just what I want (even though the code is probably not very efficient.) Now, what I want to do is send this program to other people, but I don't mean I want to send the code, for them to copy and paste into JustBASIC, but rather I want to send it as software, ie a file they can just open and it will run. I would rather they not see the code I have written myself, I just want them to be able to use the program. How do I do this? Or do I need another kind of BASIC to do it? Any help is appreciated....
Dave.
|
|
|
Post by Rod on May 29, 2019 14:01:08 GMT
There are a few steps to complete. Essentially you make a .tkn file from your .bas file. The .tkn file gets put in a new folder with copies of the Just BASIC runtime files. The runtime.exe gets the name of your .tkn. SO myprogram.tkn and rename the runtime to myprogram.exe. Now you can distribute the folder as a .zip (right click the folder and select send to .zip) This .zip or even the folder unzipped can be downloaded if you have a file host or sent on cd or usb chip. The user copies the folder or unzips the .zip. When they click on the myprogram.exe your program will run.
There are a few gotchas on the way. The main one is directories. Don't code hard paths like c:\program\myprogram because you don't know where the user will copy the file to. So use relative paths or no paths at all and just have everything in the one folder. The second one is that the user will need some PC savvy to copy the folder or unzip the .zip.
A full blown, automated, installer is possible but much more complicated.
Start by reading the help file "Using the runtime engine" Make your new folder, zip it, copy it and then "install" it yourself to a new folder on your PC. That way you will see what the user has to do. A few simple instructions will have most folks up and running in a few minutes.
|
|
|
Post by jarych on May 30, 2019 4:59:38 GMT
daveylibra
What Rod omitted was the requirement to also include the necessary DLL and SLL files which come with Just BASIC. Other than that, review carefully what he said, and also study the same information about distributing a program as discussed in the JB help file.
|
|
|
Post by daveylibra on Jun 1, 2019 21:48:33 GMT
OK guys thanks for the advice. So far I have saved it to C:/myprog.tkn How do I include the DLL and SLL files, and will the users have to install JustBasic to run the program?
|
|
|
Post by jarych on Jun 2, 2019 2:08:20 GMT
OK guys thanks for the advice. So far I have saved it to C:/myprog.tkn How do I include the DLL and SLL files, and will the users have to install JustBasic to run the program? You might want better to make a directory or folder dedicated to your whole program package first, like C:\myprog in which you can put all your required files including your myprog.tkn. For the DLL and SLL files, you may simply use COPY and PASTE, which may be the safest way. You may also make a zip file containing all the necessary DLL and SLL files and from this, extract the package into C:\myprog folder. The users WILL NOT need to install JustBASIC in order to run your program.
|
|
|
Post by Rod on Jun 2, 2019 7:39:12 GMT
Yep, you need to be a little bit more familiar with Windows. But you just need to read, read the help file again where it discusses the runtime engine.
Your folder name should be meaningful, I hope it is not called myprogram. If your program has a name, for example ConvertCurrency.bas then the project folder you create should be called ConvertCurrency and the .tkn and renamed runtime.exe should both be named ConvertCurrency.
All of the support files the .dll and .sll should simply be copied into your new folder. You can use Windows Explorer to do that The folder icon at the foot of your computer.
Once everything is in the folder and you have checked the .exe runs then right click the folder and select send to .zip. You will then have a file called ConvertCurrency.zip That's the file you distribute.
But your users will need to be shown how to click on and unpack a .zip file.
|
|
|
Post by jarych on Jun 3, 2019 1:13:06 GMT
Rod: He and I were using "myprog" as just an example. A more descriptive name for the directory and program name is always better.
One refinement that should be stated, is that programmer needs to create the TKN file through the JustBASIC menu with the item (if it is still called this), "Create TKN File".
|
|
ntech
Junior Member
Posts: 99
|
Post by ntech on Jun 3, 2019 17:15:42 GMT
Here's a step-by-step guide on how to do this:
1. First, create a new folder for your program. Name it anything you like ("This Program", for example).
2. Open the .bas file you want to distribute. Make a tkn and place it in that folder.
3. Navigate to the folder where JustBasic is installed (on my computer it's "C:\Program Files (x86)\Just BASIC v2.0"). Copy "jbrun2.exe," as well as all of the files that end in ".dll" or ".sll" and paste them to that folder. A full list of files to copy:
jbrun2.exe VBAS31W.SLL VGUI31W.SLL VOFLR31W.SLL VTHK31W.DLL VTK1631W.DLL VTK3231W.DLL VVM31W.DLL VVMT31W.DLL
4. Name "jbrun2.exe" to match the name of your TKN file. For example, if your TKN file is "My Program.tkn" then name "jbrun2.exe" as "My Program.exe".
5. Run your new program, to make sure it works correctly. If you're missing a runtime file, it shall notify you of this.
6. To distribute your application, create a new zip file. You may copy and paste the contents of your folder ("This Program") into the zip file.
7. To run your program, all people shall have to do is unzip the zip file and run "My Program.exe". Voilà!
|
|
|
Post by daveylibra on Jun 4, 2019 23:32:06 GMT
Thanks for the step-by step explanation. You have all been a great help and I have managed to do it. To be honest, I was using the 1.01 version of JustBasic and couldn't see the help menu. Now I have installed version 2 and can access the help menu, and I realise there is an explanation there, but I might not have figured out where to look, ie the runtime engine.
Just one problem. When users 'unpack' the zip file, they get a message to say "Publisher cannot be verified. Only run software from publishers you can trust. There is not a valid digital signature." Is there any way around this?
|
|
|
Post by jarych on Jun 5, 2019 2:55:04 GMT
You should be able to click-through regardless of the warning. Or there should be some choice for you to make so you can unpack the application package.
( I would need to see an example of this to know exactly what to tell you/say.)
|
|
|
Post by Rod on Jun 5, 2019 6:57:53 GMT
On Win 10 the nag screen has a “more” option which allows you to continue. This is the kind of stuff you need to explain blow by blow to novice users. Folks familiar with Windows will know all of this stuff and won’t have a problem.
The ultimate solution is to pay a large amount of money to a signing authority to get your digital certificate. A step too far.
|
|
|
Post by daveylibra on Jun 5, 2019 9:04:27 GMT
Yes the user can click through and run the program, it's just an annoyance that they get this 'nag' screen. I will write a simple explanation to anyone I send to. Anyway you guys really have been a great help. Thanks so much!
|
|