|
回复:(wenbinnuaa)关于生成exe后的黑框问题询问,急...
有关去掉matlab编译黑屏的方法<BR><BR>至于黑屏,这里有个解决的办法,借助于三方 <BR><BR>http://newsreader.mathworks.com/WebX?50@55.5BdEa0Xui5I.0@.eeba9ab <BR><BR> <BR>MATLAB Central > comp.soft-sys.matlab > archive > A Windows version-independent way to suppress command window for standalones <BR><BR><BR><BR>Subject: A Windows version-independent way to suppress command window for standalones <BR><BR><BR>E-mail me when replies are made to this thread <BR>Message 1 in thread <BR>From: Nathan Childress <BR>(sauroneru@hotmail.com) <BR>E-mail me when this author posts <BR>Date: 2003-03-11 11:57:11 <BR><BR>1. Compile your GUI into an exe. We'll call it "foo.exe". <BR>2. Download and install NSIS - the installation program created and <BR>used by the fine folks at Nullsoft (think Winamp): <BR><BR>http://www.nullsoft.com/free/nsis/ <BR><BR>3. Make an NSIS script text file in the same directory as your exe, <BR>let's call it "file.nsi". Put the following text in there: <BR><BR>SilentInstall silent <BR><BR>; The name of the NSIS install program you're creating <BR>Name "NotSeen" <BR><BR>; The file that NSIS writes <BR>OutFile "nocmdwindow.exe" <BR><BR>Section "Ignore" <BR> ; Change this exe file to the name of the exe you created <BR> nsExec::Exec "cmd /C foo.exe" <BR>SectionEnd <BR><BR>4. Save the file and compile it into the new exe ("nocmdwindow.exe") <BR>by right clicking on it and selecting Compile. Or you can open the <BR>"Make NSIS GUI" window and select "Load Script..." from the File menu. <BR><BR>5. Now run "nocmdwindow.exe". As promised, no command window. And <BR>so simple to implement. Plus, if you ever want to see the command <BR>window for diagnostic purposes, you can always run the original exe <BR>file ("foo.exe"), and it will run normally with its glorious DOS <BR>window. <BR><BR>You also have a really easy to use and powerful Windows installer <BR>program that's free. The no command window trick works with NSIS by <BR>calling a dll (nsExec.dll) and running the program through it, <BR>suppressing all text output, but leaving popup windows alone. |
|