Wine vs program arguments

Questions about Wine on Linux
Locked
User avatar
Nwaps
Newbie
Newbie
Posts: 4
Joined: Sat Apr 16, 2022 7:43 am

Wine vs program arguments

Post by Nwaps »

Hello,

I have been stuggling with a wine issue for a few days now and have googled for answers and tried most things I can think of.
I am trying to run a dedicated server for No One Lives Forever 2 that will be able to restart after crash from a script that will check if the process exists or not, and I am almost there.
Right now I have a couple servers running within a lutris install on a another computer, I can only start it with the program arguments if I open a wine console and type it in manually. This doesn't allow a automated script to restart them if they crash though.

My linux version is Linux Mint 20, Wine is installed from WineHq's repository.

I have created a folder for my wine bottle named 'Wine' in my home folder, my prefix is located at '~/Wine/nolf/'. I configured winetricks to use directx9, vcrun6, mfc40, mfc42, vcrun2015 and my start string in the terminal looks like this:
WINEARCH=win32 WINEPREFIX=~/Wine/nolf2 wine ~/Wine/nolf/drive_c/nolf2/nolf2srv.exe -profile player
The server app starts, but it fails to load the program arguments -profile player.

From the wine --help it says that nolf2srv.exe [-profile player] should work, but I get the same result.

I also tried with quotes "~/Wine/nolf/drive_c/nolf2/nolf2srv.exe" "-profile player", this doesn't even start the app.

The game server is also verified to work with my file setup.

Could this be something that I missed in winetricks? are other other ways to pass arguments? I am running out of ideas..
Any help with this issue would be greatly appreciated!

Cheers
User avatar
Nwaps
Newbie
Newbie
Posts: 4
Joined: Sat Apr 16, 2022 7:43 am

Re: Wine vs program arguments

Post by Nwaps »

I may have over complicated my question earlier...

When I do this:
WINEARCH=win32 WINEPREFIX=~/Wine/nolf2 wine cmd
This launches a command prompt, and typing in the following works just fine
cd Wine\nolf2\drive_c\nolf2\nolf2srv.exe -profile player
This starts the server with arguments, so it does actually work.


However this is what I need it to do is to run this as one single command.
I have tried a bunch of variations to pass the arguments like:
WINEARCH=win32 WINEPREFIX=~/Wine/nolf2 wine ~/Wine/nolf/drive_c/nolf2/nolf2srv.exe -profile player
or
WINEARCH=win32 WINEPREFIX=~/Wine/nolf2 exec wine "~/Wine/nolf/drive_c/nolf2/nolf2srv.exe" -"profile player"
or
WINEARCH=win32 WINEPREFIX=~/Wine/nolf2 wine ~/Wine/nolf/drive_c/nolf2/nolf2srv.exe '-profile player'
The server actually starts, but it will totally ignore the arguments.

I have been searching high and low for a answer to this problem without getting any wiser. I hope there is someone out there who can tell me where I messed up.
User avatar
Bob Wya
Level 12
Level 12
Posts: 3068
Joined: Sat Oct 16, 2010 7:40 pm

Re: Wine vs program arguments

Post by Bob Wya »

@Nwaps

Does:

Code: Select all

WINEPREFIX=~/Wine/nolf2 wine start 'C:\nolf2\nolf2srv.exe' -profile player
work OK?

The architecture for a WINEPREFIX is only set once, when it is first created... So the:

Code: Select all

WINEARCH=win??
statements are redundant - when launching your application.

Bob
User avatar
Nwaps
Newbie
Newbie
Posts: 4
Joined: Sat Apr 16, 2022 7:43 am

Re: Wine vs program arguments

Post by Nwaps »

Hi, Thanks for answering :)

I figured it out eventually, but yes I needed 'wine start' and also '/unix' to make it load arguments. Like this:

Code: Select all

WINEPREFIX=~/Wine/nolf2 wine start /unix ~/Wine/nolf2/drive_c/nolf2/nolf2srv.exe -profile player
User avatar
Bob Wya
Level 12
Level 12
Posts: 3068
Joined: Sat Oct 16, 2010 7:40 pm

Re: Wine vs program arguments

Post by Bob Wya »

Glad you got it sorted... 8)
User avatar
Nwaps
Newbie
Newbie
Posts: 4
Joined: Sat Apr 16, 2022 7:43 am

Re: Wine vs program arguments

Post by Nwaps »

Just a little follow up question, I have noticed that the app above that has around 0.2% cpu usage in my windows computer runs at 20-25% cpu usage in Wine. I also get a few fixme messages when I launch which I have no clue how to figure out the meaning of.

Code: Select all

03ec:fixme:ntdll:EtwEventSetInformation (deadbeef, 2, 003E2560, 43) stub
03ec:fixme:nls:RtlGetThreadPreferredUILanguages 00000038, 0021F40C, 0021F41C 0021F410
03ec:fixme:nls:get_dummy_preferred_ui_language (0x38 0021F40C 0021F41C 0021F410) returning a dummy value (current locale)
03ec:fixme:imm:ImeSetActiveContext (0x267d48, 1): stub
03ec:fixme:imm:ImmReleaseContext (0007014C, 00267D48): stub
03f4:fixme:ver:GetCurrentPackageId (0410FEF0 00000000): stub
0400:fixme:console:default_ctrl_handler Terminating process 3dc on event 0
03d8:fixme:ver:GetCurrentPackageId (0031FEA4 00000000): stub
As far as I know, stubs can be found in ashtrays, I figured that part out :roll:

I'm just wondering why would it use so much more CPU in Wine?
Locked