COCKOS
CONFEDERATED FORUMS
Cockos : REAPER : NINJAM : Forums
Forum Home : Register : FAQ : Members List : Search :
Old 04-06-2016, 02:06 AM   #1
nofish
Human being with feelings
 
nofish's Avatar
 
Join Date: Oct 2007
Location: home is where the heart is
Posts: 12,107
Default add .dll Properties ? (solved)

How can I add the info here to the compiled dll ?



Searching around, I found this:

http://stackoverflow.com/questions/2...on-information

So for testing, I added a similar section to the myPlugin.rc file (with a text editor), it builds fine but still doesn't contain any entries (all fields blank).

I assume there's probably an app to edit it manually after building (haven't searched yet), but any way to do it 'automatically' (when building with VS) ?

Last edited by nofish; 04-08-2016 at 03:06 AM.
nofish is offline   Reply With Quote
Old 04-06-2016, 04:17 AM   #2
olilarkin
Human being with feelings
 
Join Date: Apr 2009
Location: Berlin, Germany
Posts: 1,248
Default

normally you could do it with the MSVC resource editor, but because it doesn't play well with #ifdefs in .rc files (IIRC) you need to edit manually. Here is my VirtualCZ .rc version section

Code:
/////////////////////////////////////////////////////////////////////////////
// Version
/////////////////////////////////////////////////////////////////////////////
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,0,3,0
PRODUCTVERSION 1,0,3,0
 FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
 FILEFLAGS 0x1L
#else
 FILEFLAGS 0x0L
#endif
 FILEOS 0x40004L
 FILETYPE 0x1L
 FILESUBTYPE 0x0L
BEGIN
    BLOCK "StringFileInfo"
    BEGIN
        BLOCK "040004e4"
        BEGIN
            VALUE "FileVersion", "1.0.3"
            VALUE "ProductVersion", "1.0.3"0
#ifdef VST2_API
            VALUE "OriginalFilename", "VirtualCZ.dll"
#elif defined VST3_API
            VALUE "OriginalFilename", "VirtualCZ.vst3"
#elif defined AAX_API
            VALUE "OriginalFilename", "VirtualCZ.aaxplugin"
#elif defined SA_API
            VALUE "OriginalFilename", "VirtualCZ.exe"
#endif
            VALUE "FileDescription", "VirtualCZ"
            VALUE "InternalName", "VirtualCZ"
            VALUE "ProductName", "VirtualCZ"
            VALUE "CompanyName", "Plugin Boutique"
            VALUE "LegalCopyright", "Copyright 2014 Oliver Larkin"
            VALUE "LegalTrademarks", "VST is a trademark of Steinberg Media Technologies GmbH, Audio Unit is a trademark of Apple, Inc."
        END
    END
    BLOCK "VarFileInfo"
    BEGIN
        VALUE "Translation", 0x400, 1252
    END
END
__________________
VirtualCZ | Endless Series | iPlug2 | Linkedin | Facebook
olilarkin is offline   Reply With Quote
Old 04-06-2016, 04:52 AM   #3
nofish
Human being with feelings
 
nofish's Avatar
 
Join Date: Oct 2007
Location: home is where the heart is
Posts: 12,107
Default

Thanks Oli.

I've tried that already (and now tried again pasting your version at the end of my .rc file) and I can see the version info in e.g. Resource Hacker, but the .dll Properties entries still show up blank nonetheless.

Any idea why that could be ?

Anyway, I've found this meanwhile which seems to work.

http://www.carifred.com/fvie/

It's just that I have to do it manually after each build.

edit:
Using VS2015 CE, Win 8.1

Last edited by nofish; 04-06-2016 at 04:59 AM.
nofish is offline   Reply With Quote
Old 04-07-2016, 04:07 AM   #4
nofish
Human being with feelings
 
nofish's Avatar
 
Join Date: Oct 2007
Location: home is where the heart is
Posts: 12,107
Default

So here's an example, if someone has an idea how to investigate.

Build dll (32 bit) from the IPlugEffect example:

https://dl.dropboxusercontent.com/u/...llPropTest.dll

.rc file (basically just copied Oli's version in):

Code:
#include "resource.h"

KNOB_ID       PNG KNOB_FN

#ifdef SA_API
//Standalone stuff
#include <windows.h>

IDI_ICON1                ICON    DISCARDABLE     "resources\dllPropTest.ico"

IDD_DIALOG_MAIN DIALOG DISCARDABLE  0, 0, GUI_WIDTH, GUI_HEIGHT
STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX
CAPTION "dllPropTest"
MENU IDR_MENU1
FONT 8, "MS Sans Serif"
BEGIN
//   EDITTEXT        IDC_EDIT1,59,50,145,14,ES_AUTOHSCROLL
//   LTEXT           "Enter some text here:",IDC_STATIC,59,39,73,8
END

LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
IDD_DIALOG_PREF DIALOG DISCARDABLE 0, 0, 223, 309
STYLE DS_3DLOOK | DS_CENTER | DS_MODALFRAME | DS_SHELLFONT | WS_CAPTION | WS_VISIBLE | WS_POPUP | WS_SYSMENU
CAPTION "Preferences"
FONT 8, "MS Sans Serif"
{
    DEFPUSHBUTTON   "OK", IDOK, 110, 285, 50, 14
    PUSHBUTTON      "Apply", IDAPPLY, 54, 285, 50, 14
    PUSHBUTTON      "Cancel", IDCANCEL, 166, 285, 50, 14
    COMBOBOX        IDC_COMBO_AUDIO_DRIVER, 20, 35, 100, 100, CBS_DROPDOWNLIST | CBS_HASSTRINGS
    LTEXT           "Driver Type", IDC_STATIC, 22, 25, 38, 8, SS_LEFT
    COMBOBOX        IDC_COMBO_AUDIO_IN_DEV, 20, 65, 100, 200, CBS_DROPDOWNLIST | CBS_HASSTRINGS
    LTEXT           "Input Device", IDC_STATIC, 20, 55, 42, 8, SS_LEFT
    COMBOBOX        IDC_COMBO_AUDIO_OUT_DEV, 20, 95, 100, 200, CBS_DROPDOWNLIST | CBS_HASSTRINGS
    LTEXT           "Output Device", IDC_STATIC, 20, 85, 47, 8, SS_LEFT
    COMBOBOX        IDC_COMBO_AUDIO_IOVS, 135, 35, 65, 100, CBS_DROPDOWNLIST | CBS_HASSTRINGS
    LTEXT           "IO Vector Size", IDC_STATIC, 137, 25, 46, 8, SS_LEFT
    COMBOBOX        IDC_COMBO_AUDIO_SIGVS, 135, 65, 65, 100, CBS_DROPDOWNLIST | CBS_HASSTRINGS
    LTEXT           "Signal Vector Size", IDC_STATIC, 135, 55, 58, 8, SS_LEFT
    COMBOBOX        IDC_COMBO_AUDIO_SR, 135, 95, 65, 200, CBS_DROPDOWNLIST | CBS_HASSTRINGS
    LTEXT           "Sampling Rate", IDC_STATIC, 135, 85, 47, 8, SS_LEFT
    GROUPBOX        "Audio Device Settings", IDC_STATIC, 5, 10, 210, 170
    PUSHBUTTON      "ASIO Config...", IDC_BUTTON_ASIO, 135, 155, 65, 14
    COMBOBOX        IDC_COMBO_AUDIO_IN_L, 20, 125, 40, 200, CBS_DROPDOWNLIST | CBS_HASSTRINGS
    LTEXT           "Input 1 (L)", IDC_STATIC, 20, 115, 33, 8, SS_LEFT
    COMBOBOX        IDC_COMBO_AUDIO_IN_R, 65, 126, 40, 200, CBS_DROPDOWNLIST | CBS_HASSTRINGS
    LTEXT           "Input 2 (R)", IDC_STATIC, 65, 115, 34, 8, SS_LEFT
    COMBOBOX        IDC_COMBO_AUDIO_OUT_L, 20, 155, 40, 200, CBS_DROPDOWNLIST | CBS_HASSTRINGS
    LTEXT           "Output 1 (L)", IDC_STATIC, 20, 145, 38, 8, SS_LEFT
    COMBOBOX        IDC_COMBO_AUDIO_OUT_R, 65, 155, 40, 200, CBS_DROPDOWNLIST | CBS_HASSTRINGS
    LTEXT           "Output 2 (R)", IDC_STATIC, 65, 145, 40, 8, SS_LEFT
    GROUPBOX        "MIDI Device Settings", IDC_STATIC, 5, 190, 210, 85
    COMBOBOX        IDC_COMBO_MIDI_OUT_DEV, 15, 250, 100, 200, CBS_DROPDOWNLIST | CBS_HASSTRINGS
    LTEXT           "Output Device", IDC_STATIC, 15, 240, 47, 8, SS_LEFT
    COMBOBOX        IDC_COMBO_MIDI_IN_DEV, 15, 220, 100, 200, CBS_DROPDOWNLIST | CBS_HASSTRINGS
    LTEXT           "Input Device", IDC_STATIC, 15, 210, 42, 8, SS_LEFT
    LTEXT           "Input Channel", IDC_STATIC, 125, 210, 45, 8, SS_LEFT
    COMBOBOX        IDC_COMBO_MIDI_IN_CHAN, 125, 220, 50, 200, CBS_DROPDOWNLIST | CBS_HASSTRINGS
    LTEXT           "Output Channel", IDC_STATIC, 125, 240, 50, 8, SS_LEFT
    COMBOBOX        IDC_COMBO_MIDI_OUT_CHAN, 125, 250, 50, 200, CBS_DROPDOWNLIST | CBS_HASSTRINGS
    AUTOCHECKBOX    "Mono Input", IDC_CB_MONO_INPUT, 135, 127, 56, 8
}

IDR_MENU1 MENU DISCARDABLE 
BEGIN
    POPUP "&File"
    BEGIN
//      MENUITEM SEPARATOR
        MENUITEM "Preferences...",              ID_PREFERENCES
        MENUITEM "&Quit",                       ID_QUIT
    END
    POPUP "&Help"
    BEGIN
        MENUITEM "&About",                      ID_ABOUT
    END
END

#endif // SA_API

/////////////////////////////////////////////////////////////////////////////
// Version
/////////////////////////////////////////////////////////////////////////////
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,0,3,0
PRODUCTVERSION 1,0,3,0
 FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
 FILEFLAGS 0x1L
#else
 FILEFLAGS 0x0L
#endif
 FILEOS 0x40004L
 FILETYPE 0x1L
 FILESUBTYPE 0x0L
BEGIN
    BLOCK "StringFileInfo"
    BEGIN
        BLOCK "040004e4"
        BEGIN
            VALUE "FileVersion", "1.0.0"
            VALUE "ProductVersion", "1.0.0"0
#ifdef VST2_API
            VALUE "OriginalFilename", "dllPropTest.dll"
#elif defined VST3_API
            VALUE "OriginalFilename", "dllPropTest.vst3"
#elif defined AAX_API
            VALUE "OriginalFilename", "dllPropTest.aaxplugin"
#elif defined SA_API
            VALUE "OriginalFilename", "dllPropTest.exe"
#endif
            VALUE "FileDescription", "dllPropTest"
            VALUE "InternalName", "dllPropTest"
            VALUE "ProductName", "dllPropTest"
            VALUE "CompanyName", "dllPropTest Company"
            VALUE "LegalCopyright", "Copyright blah"
            VALUE "LegalTrademarks", "VST is a trademark of Steinberg Media Technologies GmbH, Audio Unit is a trademark of Apple, Inc."
        END
    END
    BLOCK "VarFileInfo"
    BEGIN
        VALUE "Translation", 0x400, 1252
    END
END
I can see the added version info in Resource Hacker



but the Properties fileds are still empty




Any ideas ?
(As said not such a big issue as I've found a way to do it manually after building. Would still be nice if this worked somehow.)
nofish is offline   Reply With Quote
Old 04-08-2016, 12:43 AM   #5
Tale
Human being with feelings
 
Tale's Avatar
 
Join Date: Jul 2008
Location: The Netherlands
Posts: 3,652
Default

I use something very similar to what Oli uses, and it seems to work just fine here. However, AFAICT 0x0400 is not a valid language code, although if works just fine.

https://msdn.microsoft.com/en-us/lib...(v=vs.85).aspx

Quote:
Originally Posted by nofish View Post
Any ideas ?
(As said not such a big issue as I've found a way to do it manually after building. Would still be nice if this worked somehow.)
What toolset are you using i.e. your are not using Code::Blocks by any chance?
Tale is offline   Reply With Quote
Old 04-08-2016, 03:03 AM   #6
nofish
Human being with feelings
 
nofish's Avatar
 
Join Date: Oct 2007
Location: home is where the heart is
Posts: 12,107
Default

Thanks Tale.

Not sure why yet, but this simplified version now works for me:

Code:
/////////////////////////////////////////////////////////////////////////////
// Version
/////////////////////////////////////////////////////////////////////////////
1 VERSIONINFO
FILEVERSION 1,0,0,0
PRODUCTVERSION 1,0,0,0
FILEOS 0x40004
FILETYPE 0x3
{
BLOCK "StringFileInfo"
{
	BLOCK "000004b0"
	{
		VALUE "FileVersion", "1.0.0.0"
		VALUE "ProductVersion", "1.0.0.0"
		VALUE "OriginalFilename", ""
		VALUE "InternalName", ""
		VALUE "FileDescription", ""
		VALUE "CompanyName", "nofish Prod."
		VALUE "LegalCopyright", "copyright blah"
		VALUE "ProductName", "myPlugin"
		VALUE "Comments", ""
		VALUE "LegalTrademarks", ""
		VALUE "SpecialBuild", ""
		VALUE "PrivateBuild", ""
	}
}

BLOCK "VarFileInfo"
{
	VALUE "Translation", 0x0000 0x04B0
}
}


That's good enough for now.

Quote:
What toolset are you using i.e. your are not using Code::Blocks by any chance?
No, using VS 2015.
nofish is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 08:28 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.