openscad/openscad_win32.rc
Tim Deagan ce5b38d96e Add on-launch code to set Document Icon in windows registry
Since OpenSCAD doesn't distribute with additional image files, this means a new icon needs to be built into the .exe. This is accomplished by adding a line to the end of openscad_win32.rc file consisting of something like the following:
IDI_ICON2 ICON DISCARDABLE "icons/openscad_doc.ico"
which will get built into the exe as icon index 1 (icon index 0 is the current app icon.)

In the cmdline and gui functions in openscad.cc I added code to set the HKEY_CURRENT_USER/Software/Classes/OpenSCAD_File/DefaultIcon/Default value to the icon index 1 of openscad.exe

	modified:   openscad_win32.rc
	modified:   src/openscad.cc
2015-01-11 18:21:08 -06:00

38 lines
866 B
Text

# if defined(UNDER_CE)
# include <winbase.h>
# else
# include <winver.h>
# endif
VS_VERSION_INFO VERSIONINFO
FILEVERSION 0,0,0,0
PRODUCTVERSION 0,0,0,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS VS_FF_DEBUG
#else
FILEFLAGS 0x0L
#endif
FILEOS VOS__WINDOWS32
FILETYPE VFT_DLL
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "0409"
BEGIN
VALUE "CompanyName", "\0"
VALUE "FileDescription", "OpenSCAD Executable\0"
VALUE "FileVersion", "development build\0"
VALUE "LegalCopyright", "Copyright (C) 2009-2011 Clifford Wolf and Marius Kintel\0"
VALUE "OriginalFilename", "openscad.exe\0"
VALUE "ProductName", "OpenSCAD\0"
END
END
END
/* End of Version info */
IDI_ICON1 ICON DISCARDABLE "icons/openscad.ico"
IDI_ICON2 ICON DISCARDABLE "icons/openscad_doc.ico"