|
Post by bonbon on Dec 10, 2023 11:17:03 GMT -5
Hi, I'm running LB4.5.1 on Linux Mint / Wine. Some years ago I wrote a label printing program for my elderly neighbours (they use Windows), and if I load this program into the LB editor on Linux and run it from there, it works perfectly.
I can't figure out how to run a stand-alone version on Linux. In Windows it's just a question of renaming the runtime to myProgram.exe, and saving it alongside the tokenised version of myProgram.bas (together with a DLL or two). Double-click the .exe, and off it goes.
If I try "wine yourProgram.exe" in Linux, it produces a Smalltalk/V message: "unable to allocate virtual address space".
Any ideas from you Linux / Wine experts ? Many thanks.
|
|
|
Post by xxgeek on Dec 10, 2023 12:22:58 GMT -5
If you could provide the code I could try to see what's up.
|
|
|
Post by bonbon on Dec 11, 2023 6:09:20 GMT -5
Thanks for replying. The code can be anything which works, e.g. hello.bas:
' hello.bas - dummy program
NOMAINWIN
WindowWidth = 300 WindowHeight = 150 UpperLeftX = 400 UpperLeftY = 200
font$ = "font ms_sans_serif 10" STATICTEXT #main.txt1, "Hello world", 118, 50, 80, 20 OPEN "Hello" FOR dialog AS #main
#main font$ #main "trapclose [ExitClick]
WAIT
[ExitClick] CLOSE #main END
This runs from the LB Editor.
Within the LB editor, choose the option "Make *.TKN File" to produce hello.tkn, and run the .tkn file from within the editor - no problem.
Next step: copy run451.exe to the directory which contains hello.tkn, together with .sll and .dll files as specified in the documentation. Then rename this copy of run451.exe to hello.exe.
At this point, within Windows, you can double-click hello.exe, and it will run hello.tkn.
The question is: in Linux, how do I launch hello.exe ? I tried opening a terminal window, navigating to the correct directory, and entering the following command:
wine hello.exe but this did not work, presumably because wine is looking for a setup file.
|
|
|
Post by Rod on Dec 11, 2023 7:07:52 GMT -5
I am afraid I know little about Wine. But I do know that the problem will be that the working directory is not set. We can have the same problem on Windows. When the .exe fires up it expects to find the .tkn file in the current working directory. When you double click the .exe or issue the wine hello.exe it may not necessarily set the desired directory it may simply look in root wine. It may be that you state the path to your .exe when you run wine or you may need to change to the .exe's directory before you run wine. We do have some Wine users, they will likely give more detail.
|
|
|
Post by xxgeek on Dec 11, 2023 9:01:09 GMT -5
Have you tried clicking the EXE file the same as you would do in windows? That works for me.
Are you running on hardware, or a Virtual Machine?
I have no trouble with running any of my files on Linux Mint/WINE by clicking the exe file, or using a RUN command in code. I can also RUN the TKN file using code.
My first guess would have been a missing dll or exe in WINE that was being called in your program, but if the above code has the same issue that can't be the issue.
1. Try clicking the exe file.
2. Try this: Use the code below to create another .bas file to RUN the tkn or exe file. Make sure to save it to the same folder as the rest of the dependencies.
run "hello.tkn" end
and this
run "hello.exe" end
Do they work for you? Both?
|
|
|
Post by bonbon on Dec 11, 2023 10:46:34 GMT -5
Hi both, Running the wine command with the full path to the .exe brings up the "unable to allocate virtual address space" message. Double-clicking hello.exe brings up a screen with main options of Archive, Edit, View and Help, and Location: / Down the left hand side, there is a list of folder .rsrc, and files .bss, .data, .idata, .rdata, .reloc, .text and .image.
(I would like to include a screenshot, but I can't see how to insert the image here - the screenshot is in my Downloads file. Insert Image seems to want a URL.)
Making .bas files to RUN the .tkn and the .exe: both work perfectly.
Thank you both for your time. It is encouraging that you can run your .exe files with a double click.
|
|
|
Post by xxgeek on Dec 11, 2023 11:27:02 GMT -5
ok, I tried running from the command line. First navigated to the folder with all the files, then wine hello.exe
Works here. Opened the window with "Hello world" printed.
I can only suggest updating WINE to the latest(stable) version. Might be a good idea to remove it completely first.
|
|
|
Post by xxgeek on Dec 11, 2023 11:31:14 GMT -5
I have always gone to This Pageand followed the instructions for my version of Linux Mint. Good Luck
|
|
gaslouk
Full Member
Hi from beautiful Greece.
Posts: 130
|
Post by gaslouk on Dec 11, 2023 12:02:24 GMT -5
Thanks for replying. The code can be anything which works, e.g. hello.bas: ' hello.bas - dummy program
NOMAINWIN
WindowWidth = 300 WindowHeight = 150 UpperLeftX = 400 UpperLeftY = 200
font$ = "font ms_sans_serif 10" STATICTEXT #main.txt1, "Hello world", 118, 50, 80, 20 OPEN "Hello" FOR dialog AS #main
#main font$ #main "trapclose [ExitClick]
WAIT
[ExitClick] CLOSE #main END This runs from the LB Editor. Within the LB editor, choose the option "Make *.TKN File" to produce hello.tkn, and run the .tkn file from within the editor - no problem. Next step: copy run451.exe to the directory which contains hello.tkn, together with .sll and .dll files as specified in the documentation. Then rename this copy of run451.exe to hello.exe. At this point, within Windows, you can double-click hello.exe, and it will run hello.tkn. The question is: in Linux, how do I launch hello.exe ? I tried opening a terminal window, navigating to the correct directory, and entering the following command: wine hello.exe but this did not work, presumably because wine is looking for a setup file. In the line (#main "trapclose [ExitClick]) there isn't the end of line (")
Gaslouk.
|
|
|
Post by xxgeek on Dec 11, 2023 12:29:25 GMT -5
Found and fixed prior to any testing on my part.
|
|
|
Post by bonbon on Dec 11, 2023 16:20:43 GMT -5
Thanks everyone. Over the next few days I will have a go at removing, then re-installing wine, using the link provided by xxgeek.
|
|
|
Post by xxgeek on Dec 11, 2023 17:20:08 GMT -5
There is a page - Here - that will show how to remove it completely. I recommend reading the entire page before proceeding. Keep in mind, that when you remove wine you will be removing everything you installed to WINE as well, so you will need to re-install Liberty and any other programs WINE was handling.(You'll need your license Username/Password for Liberty again. If your knowledge of Linux is limited, I would recommend caution as you go through this. Although I did answer the call for "Linux / Wine experts", I am far from an expert, I am just another user with a bit more experience than a Windows user, and I use Linux Mint as well (Latest version). Since you CAN execute the exe/tkn file in code, the problem may be a minor one that a more accomplished Linux user could fix. Might be a good idea to wait for another opinion here.
|
|
|
Post by Carl Gundel on Dec 11, 2023 17:23:58 GMT -5
Hi, I'm running LB4.5.1 on Linux Mint / Wine. Some years ago I wrote a label printing program for my elderly neighbours (they use Windows), and if I load this program into the LB editor on Linux and run it from there, it works perfectly.
I can't figure out how to run a stand-alone version on Linux. In Windows it's just a question of renaming the runtime to myProgram.exe, and saving it alongside the tokenised version of myProgram.bas (together with a DLL or two). Double-click the .exe, and off it goes.
If I try "wine yourProgram.exe" in Linux, it produces a Smalltalk/V message: "unable to allocate virtual address space".
Any ideas from you Linux / Wine experts ? Many thanks.
Is there a way to specify a block of RAM when starting wine from the command line like that? Liberty BASIC expects a certain number of megabytes to start up.
|
|
|
Post by tenochtitlanuk on Dec 12, 2023 17:56:05 GMT -5
I just created a tkn file from a LB program ( I use Mint 21 & Wine latest updates..) At first if I clicked the renamed exe file I got the same error message as you. But once I specified virtual desktop size it worked just like on native LB machines. It also worked when I turned a one liner to call this exe into another exe. The Wine ?console? popped up to allow the virtual screen assignment. Alternatively set it in Wine Configuration. Haven't tried calling from the command line.
Is this example relevant to what you want to do and are experiencing?
|
|
|
Post by bonbon on Dec 19, 2023 12:53:09 GMT -5
Success ! Full removal of wine:
apt purge wine then:
apt autoremove then installed wine as per link from xxgeek,
then installed LB4.5.1.
Result: I can now run an .exe with a double-click, and as a bonus it all loads about twice as fast as previously !
Thanks to everyone for your help.
|
|