( REPOST, again: I was told that my massages need long time to appear because I'm not subscribed as frank.schruefer@t-online.de, ok, but my postings as wine@man-made.de (which I'm subscribed as) never come through. Maybe that is because mozilla only allows configuration for one outgoing mailserver which is the t-online one? Anything I could do about the situation? )
I'll soon come up with a win98 winnt comparison for the functions in question. I just have some trouble setting up *real* windows, believe it or not, asrock with SIS is nothing (old) windows' like! Setting up wine is much easier LOL!
Hy,
Ok, I made a simple test programm reading argv, GetCommandLineA and GetModuleFileNameA. I failed with NtCurrentTeb, even after installing microsoft sdk ... it didn't get linked. Well, I actually have very little experience if it comes to the C language but the test results I already have answer most of our questions already I think.
I'd say the bottom line of the test results below is that wine almost perfectly simulates win32s behaviour but has no support for win9x be- haviour (regarding GetCommandLine* and argv). Changing the 'Windows' config parameter of wine in the [Version] sec- tion didn't make any difference to the test results from wine. That's what needs to be changed.
Some of you suggested to always deliver full path but as some others said I also think that might break more programs than it'll make work so I'd oppose that idea. I think the solution is something like: if(GetVersion() & 0x80000000) /* not win32s */ { behave_as_win9x_and_modify_actual_command_line(); } else { behave_as_now(); } Basically: make the 'Windows' param in [Version] affect whether the command line is altered or not.
So in my eyes it should come down to this: if(keeper_started_with_full_path() || wine_behaves_as_win9x_set_in_config()) { keeper_working = TRUE; } // woohoo! That I call programming ;-)
To introduce a totally new config param to set wines behaviour here is neither necessary nor desireable.
I see only one question remaining: at which place in wine should the commandline be modified if_win9x is 'set'? In GetCommandLineA? Guess no. Somewhere before CreateProces I think. But as I already menitioned c is not my mother tongue so I hope somebody else here might come up with the final solution ...
Appendet here you'll find the source of a little test prog, a batch and the output the prog produced on: Windows 98, Windows NT 4.0 and Wine (on SuSE Linux 9.0).
As I read it simulation of win9x behaviour needs to replace slashs by backslashs (which win32s has no probles with but 9x does) and relative paths by full paths and also the return of GetModuleFileNameA should be made to all uppercase - just to be on the safe side.
===================== TEST PROGRAM ==================== #include <windows.h> #include <stdio.h> #include <stdlib.h>
int main(int argc, char** argv) { int i; char buffer[1024]; printf("+++ GetCommandLineA +++\n"); printf("%s\n", GetCommandLineA()); printf("+++ GetModuleFileNameA +++\n"); GetModuleFileNameA(0, buffer, sizeof(buffer)); printf("mfna: %s\n", buffer); printf("+++ argc & argv +++\n"); printf("argc: %i\n", argc); for(i = 0; i<argc; i++) printf("argv #%i: %s\n", i, argv[i]); getch(); } =======================================================
===================== TEST BATCH ====================== echo %0 cmdline =======================================================
================= WIN98: FROM EXPLORER ================ +++ GetCommandLineA +++ "C:\Eigene Dateien\WineCommandLine\CMDLINE.exe" +++ GetModuleFileNameA +++ mfna: C:\EIGENE DATEIEN\WINECOMMANDLINE\CMDLINE.EXE +++ argc & argv +++ argc: 1 argv #0: C:\Eigene Dateien\WineCommandLine\CMDLINE.exe =======================================================
================= WINE: FROM EXPLORER ================= (not applicable) =======================================================
=============== WINNT4.0: FROM EXPLORER =============== +++ GetCommandLineA +++ "C:\Eigene Dateien\WineCommandLine\CMDLINE.exe" +++ GetModuleFileNameA +++ mfna: C:\Eigene Dateien\WineCommandLine\CMDLINE.exe +++ argc & argv +++ argc: 1 argv #0: C:\Eigene Dateien\WineCommandLine\CMDLINE.exe =======================================================
============ WIN98: FROM SHELL, IN .exe DIR =========== C:\Eigene Dateien\WineCommandLine>cmdline +++ GetCommandLineA +++ C:\EIGENE~1\WINECO~1\CMDLINE.EXE +++ GetModuleFileNameA +++ mfna: C:\EIGENE DATEIEN\WINECOMMANDLINE\CMDLINE.EXE +++ argc & argv +++ argc: 1 argv #0: C:\EIGENE~1\WINECO~1\CMDLINE.EXE =======================================================
============ WINE: FROM SHELL, IN .exe DIR ============ merlin@Merlin:~/.wine/fake_windows/Eigene Dateien/WineCommandLine> wine cmdline +++ GetCommandLineA +++ cmdline +++ GetModuleFileNameA +++ mfna: C:\Eigene Dateien\WineCommandLine\CMDLINE.exe +++ argc & argv +++ argc: 1 argv #0: cmdline =======================================================
========== WINNT4.0: FROM SHELL, IN .exe DIR ========== C:\Eigene Dateien\WineCommandLine>cmdline +++ GetCommandLineA +++ cmdline +++ GetModuleFileNameA +++ mfna: C:\Eigene Dateien\WineCommandLine\CMDLINE.exe +++ argc & argv +++ argc: 1 argv #0: cmdline =======================================================
========== WIN98: FROM SHELL, NOT IN .exe DIR ========= C:\Eigene Dateien>winecommandline\cmdline +++ GetCommandLineA +++ C:\EIGENE~1\WINECO~1\CMDLINE.EXE +++ GetModuleFileNameA +++ mfna: C:\EIGENE DATEIEN\WINECOMMANDLINE\CMDLINE.EXE +++ argc & argv +++ argc: 1 argv #0: C:\EIGENE~1\WINECO~1\CMDLINE.EXE =======================================================
=========== WINE: FROM SHELL, NOT IN .exe DIR ========= merlin@Merlin:~/.wine/fake_windows/Eigene Dateien> wine winecommandline/cmdline +++ GetCommandLineA +++ winecommandline/cmdline +++ GetModuleFileNameA +++ mfna: C:\Eigene Dateien\WineCommandLine\CMDLINE.exe +++ argc & argv +++ argc: 1 argv #0: winecommandline/cmdline =======================================================
========= WINNT4.0: FROM SHELL, NOT IN .exe DIR ======= C:\Eigene Dateien>winecommandline\cmdline +++ GetCommandLineA +++ winecommandline\cmdline +++ GetModuleFileNameA +++ mfna: C:\Eigene Dateien\winecommandline\CMDLINE.exe +++ argc & argv +++ argc: 1 argv #0: winecommandline\cmdline =======================================================
============= WIN98: FROM SHELL, FULL PATH ============ C:\Eigene Dateien>"c:\eigene dateien\winecommandline\cmdline" +++ GetCommandLineA +++ C:\EIGENE~1\WINECO~1\CMDLINE.EXE +++ GetModuleFileNameA +++ mfna: C:\EIGENE DATEIEN\WINECOMMANDLINE\CMDLINE.EXE +++ argc & argv +++ argc: 1 argv #0: C:\EIGENE~1\WINECO~1\CMDLINE.EXE
C:\Eigene Dateien>"c:/eigene dateien/winecommandline/cmdline" Befehl oder Dateiname nicht gefunden
C:\Eigene Dateien> =======================================================
============== WINE: FROM SHELL, FULL PATH ============ merlin@Merlin:~/.wine/fake_windows/Eigene Dateien> wine "c:\eigene dateien\winecommandline\cmdline" +++ GetCommandLineA +++ "c:\eigene dateien\winecommandline\cmdline" +++ GetModuleFileNameA +++ mfna: C:\Eigene Dateien\WineCommandLine\CMDLINE.exe +++ argc & argv +++ argc: 1 argv #0: c:\eigene dateien\winecommandline\cmdline
merlin@Merlin:~/.wine/fake_windows/Eigene Dateien/WineCommandLine> wine "c:/eigene dateien/winecommandline/cmdline" +++ GetCommandLineA +++ "c:/eigene dateien/winecommandline/cmdline" +++ GetModuleFileNameA +++ mfna: C:\Eigene Dateien\WineCommandLine\CMDLINE.exe +++ argc & argv +++ argc: 1 argv #0: c:/eigene dateien/winecommandline/cmdline =======================================================
============ WINNT4.0: FROM SHELL, FULL PATH ========== C:\Eigene Dateien>"c:\eigene dateien\winecommandline\cmdline" +++ GetCommandLineA +++ "c:\eigene dateien\winecommandline\cmdline" +++ GetModuleFileNameA +++ mfna: c:\eigene dateien\winecommandline\CMDLINE.exe +++ argc & argv +++ argc: 1 argv #0: c:\eigene dateien\winecommandline\cmdline
C:\Eigene Dateien>"c:/eigene dateien/winecommandline/cmdline" +++ GetCommandLineA +++ "c:/eigene dateien/winecommandline/cmdline" +++ GetModuleFileNameA +++ mfna: c:\eigene dateien\winecommandline\CMDLINE.exe +++ argc & argv +++ argc: 1 argv #0: c:/eigene dateien/winecommandline/cmdline =======================================================
============ WIN98: FROM BATCH, IN .exe DIR =========== C:\Eigene Dateien\WineCommandLine>batch
C:\Eigene Dateien\WineCommandLine>echo batch batch
C:\Eigene Dateien\WineCommandLine>cmdline +++ GetCommandLineA +++ C:\EIGENE~1\WINECO~1\CMDLINE.EXE +++ GetModuleFileNameA +++ mfna: C:\EIGENE DATEIEN\WINECOMMANDLINE\CMDLINE.EXE +++ argc & argv +++ argc: 1 argv #0: C:\EIGENE~1\WINECO~1\CMDLINE.EXE =======================================================
============= WINE: FROM BATCH, IN .exe DIR =========== merlin@Merlin:~/.wine/fake_windows/Eigene Dateien/WineCommandLine> wine batch wine: cannot find 'batch'
merlin@Merlin:~/.wine/fake_windows/Eigene Dateien/WineCommandLine> wine batch.bat wine: cannot determine executable type for L"C:\Eigene Dateien\WineCommandLine\batch.bat" =======================================================
=========== WINNT4.0: FROM BATCH, IN .exe DIR ========= C:\Eigene Dateien\WineCommandLine>batch
C:\Eigene Dateien\WineCommandLine>echo batch batch
C:\Eigene Dateien\WineCommandLine>cmdline +++ GetCommandLineA +++ cmdline +++ GetModuleFileNameA +++ mfna: C:\Eigene Dateien\WineCommandLine\CMDLINE.exe +++ argc & argv +++ argc: 1 argv #0: cmdline =======================================================
========== WIN98: FROM BATCH, NOT IN .exe DIR ========= C:\Eigene Dateien>winecommandline\batch
C:\Eigene Dateien>echo winecommandline\batch winecommandline\batch
C:\Eigene Dateien>cmdline Befehl oder Dateiname nicht gefunden. =======================================================
=========== WINE: FROM BATCH, NOT IN .exe DIR ========= merlin@Merlin:~/.wine/fake_windows/Eigene Dateien> wine WineCommandLine/batch wine: cannot find 'WineCommandLine/batch'
merlin@Merlin:~/.wine/fake_windows/Eigene Dateien> wine winecommandline/batch.bat wine: cannot determine executable type for L"C:\Eigene Dateien\WineCommandLine\batch.bat" =======================================================
========= WINNT4.0: FROM BATCH, NOT IN .exe DIR ======= C:\Eigene Dateien>winecommandline\batch
C:\Eigene Dateien>echo winecommandline\batch winecommandline\batch
C:\Eigene Dateien>cmdline Der Befehl ist entweder falsch geschrieben oder konnte nicht gefunden werden. Bitte überprüfen Sie die Schreibweise und die Umgebungsvariable 'PATH'. =======================================================
============ WIN98: FROM BATCH, BY EXPLORER =========== C:\Eigene Dateien\WineCommandLine>echo C:\EIGENE~1\WINECO~1\BATCH.BAT C:\EIGENE~1\WINECO~1\BATCH.BAT
C:\Eigene Dateien\WineCommandLine>cmdline +++ GetCommandLineA +++ C:\EIGENE~1\WINECO~1\CMDLINE.EXE +++ GetModuleFileNameA +++ mfna: C:\EIGENE DATEIEN\WINECOMMANDLINE\CMDLINE.EXE +++ argc & argv +++ argc: 1 argv #0: C:\EIGENE~1\WINECO~1\CMDLINE.EXE =======================================================
============= WINE: FROM BATCH, BY EXPLORER =========== (not applicable) =======================================================
=========== WINNT4.0: FROM BATCH, BY EXPLORER ========= C:\Eigene Dateien\WineCommandLine>echo "C:\Eigene Dateien\WineCommandLine\batch. bat" "C:\Eigene Dateien\WineCommandLine\batch.bat"
C:\Eigene Dateien\WineCommandLine>cmdline +++ GetCommandLineA +++ cmdline +++ GetModuleFileNameA +++ mfna: C:\Eigene Dateien\WineCommandLine\CMDLINE.exe +++ argc & argv +++ argc: 1 argv #0: cmdline =======================================================
Frank Schruefer wrote:
( REPOST, again: I was told that my massages need long time to appear because I'm not subscribed as frank.schruefer@t-online.de, ok, but my postings as wine@man-made.de (which I'm subscribed as) never come through. Maybe that is because mozilla only allows configuration for one outgoing mailserver which is the t-online one? Anything I could do about the situation? )
I never saw any postings as wine@man-made.de in the moderation queue. So something else must be wrong. The outgoing smtp server should make no difference. Maybe Jeremy can check his logs to see if anything is there (I don't have access to those). The lists have recently implemented spam blocking (yea!), so hopefully you were not classified as a spammer ;)
A bit off topic... with any reasonably current Mozilla you can have different outgoing servers for different accounts. In the outgoing server settings, click the "Advanced" button to configure them. In the individual accounts, in server settings, click the Advanced button to select the desired outgoing server for that account.
Frank Schruefer wrote:
( REPOST, again: I was told that my massages need long time to appear because I'm not subscribed as frank.schruefer@t-online.de, ok, but my postings as wine@man-made.de (which I'm subscribed as) never come through. Maybe that is because mozilla only allows configuration for one outgoing mailserver which is the t-online one? Anything I could do about the situation? )
Oops, I should have answered the last question. A simple fix would be to also subscribe the address frank.schruefer@.... Since I assume you just don't want postings sent there, once you subscribe, go to your subscription settings web page: http://www.winehq.org/mailman/options/wine-devel/frank.schruefer ... (it should be listed in the welcome email you receive) and turn on "Disable mail delivery". There is no problem subscribing multiple email addresses.