Andreasus
2008-Dec-16 14:49 UTC
[Wine] perl-web-script should start a application with wine
I need some help. I have a windows application which load a file, do something and put the output in the same file. This tool is called ct.exe. Now I use wine to start this application, everything works fine. My problem starts if a try to write a perlscript which start this wine application. my perl script: 1 #!/usr/bin/perl 2 3 use strict; 4 use CGI; 5 use CGI::Carp qw(fatalsToBrowser warningsToBrowser); 6 7 my $cgi = new CGI; 8 my $html = q(); 9 10 print $cgi->header(q(text/html)); 11 print $cgi->start_html(-title => q(lustiger wine test)), 12 $cgi->h1(q( is not an Emulator)), 13 my $output = exec("wine /usr/share/weblicgen/bin/ct.exe 14 -open /usr/share/weblicgen/bin/coreTechLeer.lic "); 15 print "$output"; 16 $cgi->end_html(); 17 print $html; Error_log: 191 [error] [client 10.113.201.215] fixme:actctx:parse_depend_manifests Could not find dependent assembly L"Microsoft.VC80.CRT" 192 [error] [client 10.113.201.215] Application tried to create a window, but no driver could be loaded. 193 [error] [client 10.113.201.215] Make sure that your X server is running and that $DISPLAY is set correctly. 194 [error] [client 10.113.201.215] Application tried to create a window, but no driver could be loaded. 195[error] [client 10.113.201.215] Make sure that your X server is running and that $DISPLAY is set correctly. 196 [error] [client 10.113.201.215] err:module:attach_process_dlls "MSVCR80.dll" failed to initialize, aborting 197 [error] [client 10.113.201.215] err:module:LdrInitializeThunk Main exe initialization for L"Z: >\\\\usr\\\\share\\\\weblicgen\\\\bin\\\\ct-licensegenerator.exe" failed, status c0000142 Note: If I type: perl webscript.pl, then It works. If I write this script as a normal perlscript without using it from a browser, then it works too. Can someone help me?
Thunderbird
2008-Dec-16 15:04 UTC
[Wine] Re: perl-web-script should start a application with wine
Most likely there are two things. First of all msvcrt80.dll could be missing. Second as the error says no display driver can be found (wine's x11 driver). A lot of apps even if they appear commandline only require a display driver because they require functionality from it while they aren't showing a window themselves. Likely when you were executing the script by hand you had a display variable set, so that winex11.drv could be loaded.
Andreasus
2008-Dec-16 15:12 UTC
[Wine] Re: perl-web-script should start a application with wine
Thank you for the answer. Unfortunately the msvcrt80.dll is in /var/www/ (which should be the home directory for apache) and a web application is not able to start a x server ? Am I right?
vitamin
2008-Dec-17 14:39 UTC
[Wine] Re: perl-web-script should start a application with wine
Andreasus wrote:> How can I install vc2005 ?Code: wget http://www.kegel.com/wine/winetricks sh winetricks vcrun2005 See this for more details: http://wiki.winehq.org/winetricks