Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WineVDM and batch files #1242

Closed
sidrey opened this issue Jan 4, 2023 · 22 comments
Closed

WineVDM and batch files #1242

sidrey opened this issue Jan 4, 2023 · 22 comments

Comments

@sidrey
Copy link

sidrey commented Jan 4, 2023

WineVDM is great for standalone EXE's. What about a batch file that calls EXE with arguments?

@cracyc
Copy link
Contributor

cracyc commented Jan 4, 2023

This should be fine as long as you used install.inf to add the ntvdm64 reg entries. Otherwise you'd need to put "otvdm" before every win16 program in your batch file.

@sidrey
Copy link
Author

sidrey commented Jan 4, 2023

Hi, thanks for your post. I am very new here, so I am looking at your simpler second suggestion as it avoids registry changes (risky for me).
I have 2 questions

  1. When I click on otvdmw, it only allows EXE's to be selected, ie to right of "file name" is says "EXE(*.EXE)" with no BAT option.
    How get I get BAT to be an option?
  2. I have two 16-bit EXE's that run fine with WineVDM (they flash up briefly with no error message), but they need arguments, hence using BAT file.
    So assuming we can sort out question 1, are you saying I add otvdm by changing my batch file contents from say:
    \clip53\bin\clipper.exe clients.prg /dDEBUG
    \clip53\bin\exospace.exe @clientsd.lnk
    to
    otvdm \clip53\bin\clipper.exe clients.prg /dDEBUG
    otvdm \clip53\bin\exospace.exe @clientsd.lnk
    Thanks for any help.

@cracyc
Copy link
Contributor

cracyc commented Jan 5, 2023

The second is what you need as winevdm can't load bat files (use otvdmw to suppress the console window if you need to).

@sidrey
Copy link
Author

sidrey commented Jan 5, 2023

Thanks.
If I can't use Bat files that's ok, I need arguments for my 2 EXE's. How do I add arguments to manually enter the 2 below lines?
otvdmw \clip53\bin\clipper.exe c:\users\sidr\sids\clients\clients.prg /dDEBUG
otvdmw \clip53\bin\exospace.exe @clientsd.lnk

@cracyc
Copy link
Contributor

cracyc commented Jan 5, 2023

You can use batch files. You just need to run otvdmw from within the batch file not the other way around. Arguments should work just like that.

@sidrey
Copy link
Author

sidrey commented Jan 5, 2023

If batch file can work properly that would be brilliant.
I have mixed progress to report:
-I copied otvdmw.exe to my work folder
-I ran a DOS command, and went to my work folder.
-I set my DOS environment variables. That worked.
-I then ran my batch file, with contents:
otvdmw clipper.exe clients.prg /m /n /b /dDEBUG
otvdmw clipper.exe brow.prg /m /n /b /dDEBUG
otvdmw clipper.exe comm.prg /m /n /b /dDEBUG
otvdmw exospace.exe @clientsd.lnk
-Good news is there were no crashes - this is first time ever with 64-bit PC that clipper.exe didn't come up with error/crash!
-Bad news is that each of the first 3 lines should create OBJ files (clients.obj, brow.obj, comm.obj) but nothing.
The 4th line should create an EXE by linking 3 OBJ's files, but no obj's there to link... so no EXE.
-In my very old PC (which is 32-bit Win 10 but fading), this would always create an EXE, with critical debugging facility.
Any suggestions?

@sidrey
Copy link
Author

sidrey commented Jan 5, 2023

To summarise:
-I have an old 32-bit program called clipper.exe which generates OBJ files from compiled source code.
-on old PC with Win 10 Pro 32-bit, at DOS Prompt, when I type "clipper.exe clients.prg /m /n /b /dDEBUG", an OBJ is created.
-on new PC with Win 11 64-bit, at DOS Prompt, when I type "otvdmw clipper.exe clients.prg /m /n /b /dDEBUG", no error but no OBJ file created.
Any suggestions appreciated.

@cracyc
Copy link
Contributor

cracyc commented Jan 5, 2023

I copied otvdmw.exe to my work folder

Did you copy the rest of the dlls too? They are needed for winevdm to work.

@sidrey
Copy link
Author

sidrey commented Jan 5, 2023

Thanks. I didn't copy them. Which ones do I need?
I just copied libwine.dll, re-ran BAT, but still no OBJ files created, although the BAT did run much faster.
I saw also noticed a DLL and dummyDLL folder with a whole lot of DLL's in them. Do I copy all from both folders too?

@cracyc
Copy link
Contributor

cracyc commented Jan 5, 2023

Which ones do I need?

The ones in the dll dir. You don't necessarily need all of them but you'll have a hard time figuring out which ones so just copy the whole dir. The dummydll dir contents are in the windows directory which you probably don't need but a few programs do look for them there so you might.

@sidrey
Copy link
Author

sidrey commented Jan 5, 2023

Thanks. I copied every file from DLL folder, and DummyDLL folder... but still didn't work... no crash, but no OBJ's created.

@sidrey
Copy link
Author

sidrey commented Jan 5, 2023

In my limited experience if a DLL is missing, a program normally crashes with a message... here no crash or message... it just finishes with no OBJ created.

@cracyc
Copy link
Contributor

cracyc commented Jan 6, 2023

Just to be clear, these are win16 programs right? Because if they are dos programs you'd be better off looking at dosbox-x or msdos player.

@sidrey
Copy link
Author

sidrey commented Jan 6, 2023

Sorry, I thought DOS and 16-bit were the same or compatible. A shame!
I tried original DOSBox but it had its own C: and limited folders which did not match mine - I will try dosbox-x and hope that it will allow me to access my own folders.

@emendelson
Copy link

For Clipper, you should try vDos: www.vdos.info

@sidrey
Copy link
Author

sidrey commented Jan 6, 2023

Thanks. I tried vdos, but like dosbox it uses its own folders, not mine... so I can't run clipper.exe.
After installing vdos, it created icon "vdos - initial test" which leads to it its own c: and 2 folders dptest and extra, not mine.

@emendelson
Copy link

vDos uses any folder arrangement you choose, including your machine's folders. Please read the instructions.

@sidrey
Copy link
Author

sidrey commented Jan 6, 2023

Ok, I will uninstall and reinstall, and see where I can select my own folders. Thanks

@emendelson
Copy link

emendelson commented Jan 6, 2023

You don't need to uninstall. Just edit autoexec.txt:

use c: c:\
use d: d:\
use e: e:\

etc.

@sidrey
Copy link
Author

sidrey commented Jan 6, 2023

Thanks. Combining your help and a youtube video, I have managed to create the OBJ files - great.
But when I went to link them with
exospace.exe @clientsd.lnk
there was an error
Illegal opcode 63
when I tried exopaces.exe by itself, there was no error, so exospace works, but doesn't recognise the LNK file or its contents:
OUTPUT CLIENTS
file CLIENTS
file BROW
file COMM
file CLD.LIB
LIB EXOSPACE
LIB LLIBG
I tried all combinations and same error.
So I gave up on exospace linker, and tried another linker called blinker.exe... and it worked!
I can't believe I can use clipper on 64-bit... after being told by many it can't be done.
Thanks, so much.

@cracyc
Copy link
Contributor

cracyc commented Jan 6, 2023

Since you've got it working you should close this issue.

@sidrey
Copy link
Author

sidrey commented Jan 6, 2023

Thanks

@sidrey sidrey closed this as completed Jan 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants