From: Peter Rudolph on 10 May 2010 10:19 Hi, does anybody know how to add an own icon to stand alone application produced with mcc (at least the matlab icon)? thanks
From: Eric on 17 May 2010 14:43 I've done this in the past. The following are from some notes I wrote when doing this using versions R14SP3 and R2006a of the Matlab Compiler and Microsoft Visual Studio .NET 2003. I'm no software developer so this may be overkill compared to what is needed. Also note that this will change the icon of the EXE file created but will not change the icon in any GUIs you create. These will still have the Matlab icon. I do not believe you can change that. 1. Create a Resource Script in VS Studio .NET A. Create a new, empty console application. B. In the Solution Explorer, right-click the project name and select Add|Add Resource. Create a new icon or import an existing one. The icon should be 32x32. MSVC cannot edit icons with more than 256 colors. C. Edit the icon as you wish. D. Right-click the filename.rc and select Resource Includes. Clear the box labeled "Read-only symbol derivatives:". It likely has "#include afxres.h" in it. E. On the Resource View window, right-click on filename.rc and select Save filename.rc. F. Using a text editor, open filename.rc. Comment-out or delete the line that reads LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US”. To comment it out place // in front of it. G. In the Icon section of filename.rc, you may want to add the full path to the *.ico line. H. Test that your resource script compiles. At the command prompt in the folder containing filename.rc, type "c:\program files\microsoft visual studio .net 2003\Vc7\bin\rc.exe /fo filename.res filename.rc”. rc.exe is the Visual Studio Resource Compiler. It converts the text document filename.rc into the binary resource file filename.res. If filename.rc does not compile, look at the error messages generated and fix what needs to be changed. I. Most of the files MS Visual Studio creates are not necessary. The required files are filename.rs, resource.h, and the icon file you created. 2. Update the Matlab Compiler settings batch file A. Settings for the compiler are stored in $MATLAB$\bin\win32\mbuildopts\*.bat files. Open msvc71compp.bat with a standard text editor. Save a copy of the original file with a different filename in case you need it later. B. In the Linker parameters section, change the first “set LINKFLAGS=” line to read something like (all on one line, of course): set LINKFLAGS=kernel32.lib user32.lib gdi32.lib advapi32.lib oleaut32.lib ole32.lib "c:\full_path_here\filename.res" /LIBPATH:"%LIBLOC%" /nologo Notice that we have added the RES file to the list of files passed to the Linker. C. In the Resource compiler parameters section, set the “set RC_COMPILER=” line to read something like (all on one line, of course): set RC_COMPILER=rc /fo "c:\ full_path_here\filename.res" c:\full_path_here\filename.rc" Thus a new RES file will be created each time. D. Save msvc71compp.bat. E. At the Matlab command prompt, type “mbuild –setup”. Select MSVC 7.1 as the compiler. Step 3. Compile your M-file
From: ImageAnalyst on 17 May 2010 15:07 On May 10, 10:19 am, "Peter Rudolph" <p.rudo...(a)alice-dsl.net> wrote: > Hi, > does anybody know how to add an own icon to stand alone application produced with mcc (at least the matlab icon)? > thanks ----------------------------------------------------------------------------------------------------------- Technical Solutions How do I associate a custom icon with an EXE compiled with the MATLAB Compiler? http://www.mathworks.com/support/solutions/en/data/1-324E1D/?solution=1-324E1D
From: Peter Rudolph on 19 May 2010 05:34 "Eric " <not(a)givingemail.com> wrote in message <hss2nm$bhh$1(a)fred.mathworks.com>... > I've done this in the past. The following are from some notes I wrote when doing this using versions R14SP3 and R2006a of the Matlab Compiler and Microsoft Visual Studio .NET 2003. I'm no software developer so this may be overkill compared to what is needed. > Thanks a lot it works. P.Rudolph
|
Pages: 1 Prev: Breaking from loop on UI Next: finding zero crossing of plot/function |