ztzstan
October 24, 2015, 11:26am
1
I am a Chinese user. Here is the "resources.rc" file created by Introjucer:
#ifdef JUCE_USER_DEFINED_RC_FILE
#include JUCE_USER_DEFINED_RC_FILE
#else
#undef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
VS_VERSION_INFO VERSIONINFO
FILEVERSION 0,1,0,0000
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904E4"
BEGIN
VALUE "CompanyName", "TW\0"
VALUE "FileDescription", "TwDfuPrj02\0"
VALUE "FileVersion", "0.1.0.0000\0"
VALUE "ProductName", "TwDfuPrj02\0"
VALUE "ProductVersion", "0.1.0.0041\0"
VALUE "LegalCopyright", "Copyright(C) 2016, TW HK Ltd."
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 65001
END
END
#endif
IDI_ICON1 ICON DISCARDABLE "icon.ico"
IDI_ICON2 ICON DISCARDABLE "icon.ico"
Please pay attention the above 2 bold lines:
BLOCK "0409FDE9"
VALUE "Translation", 0x409, 65001 (65001 is 0xfde9)
I think the value 040904E4 in the 1st bold line, should be 0409FDE9 , whose lower 16 bit should be the same as the value 65001 in the second bold line. When these 2 values (actually the code ID) doesn't match, my code (at starting up) to read program(App)'s own version infomation doesn't give the right strings, (can only get empty strings). After I manually changed BLOCK "040904E4" to BLOCK "0409FDE9 ", my code reading the version info works!
Anybody to check if it is Introjucer's bug, or my mistake. Thanks!
ztzstan
October 24, 2015, 11:44am
2
I think it might be necessary to clarify these:
platform: win7 64 bit, chinese version
VisualStudio 2013 express version
And attached is my .jucer file.
ztzstan
October 24, 2015, 11:49am
3
I am not sure if my file is attached or not. Anyway, here is the paste-copy of my jucer file:
<?xml version="1.0" encoding="UTF-8"?>
<JUCERPROJECT id="j5enyI" name="TwDfuPrj02" projectType="guiapp" version="0.1.0.0000"
bundleIdentifier="com.yourcompany.TwDfuPrj02" includeBinaryInAppConfig="1"
jucerVersion="3.2.0" companyName="TW" companyWebsite="www.tw.com"
companyEmail="123@tw.com" userNotes="a.b.c.d">
<MAINGROUP id="mLwi0Z" name="TwDfuPrj02">
<FILE id="WrmrVU" name="BURN.png" compile="0" resource="1" file="../Pic/BURN.png"/>
<GROUP id="{64A5D4F5-8A6A-44A5-FC0D-F0E79B50DAEC}" name="Source">
<FILE id="jNo3de" name="CsrUsbDriver.cpp" compile="1" resource="0"
file="Source/CsrUsbDriver.cpp"/>
<FILE id="A064P0" name="CsrUsbDriver.h" compile="0" resource="0" file="Source/CsrUsbDriver.h"/>
<FILE id="KBk7xx" name="GlobalDef.h" compile="0" resource="0" file="Source/GlobalDef.h"/>
<FILE id="N3UpKh" name="HelpComponent.cpp" compile="1" resource="0"
file="Source/HelpComponent.cpp"/>
<FILE id="BKYPDI" name="HelpComponent.h" compile="0" resource="0" file="Source/HelpComponent.h"/>
<FILE id="AZHNlM" name="DfuComponent.cpp" compile="1" resource="0"
file="Source/DfuComponent.cpp"/>
<FILE id="n0ltxq" name="DfuComponent.h" compile="0" resource="0" file="Source/DfuComponent.h"/>
<FILE id="OXxSzq" name="Main.cpp" compile="1" resource="0" file="Source/Main.cpp"/>
</GROUP>
<GROUP id="{6A4ADEC4-305B-7424-D15D-D057240D1D3F}" name="LibHeader">
<FILE id="BPxAiD" name="bluetoothclasses.h" compile="0" resource="0"
file="Source/LibHeader/bluetoothclasses.h"/>
<FILE id="losoHY" name="LibFunc.h" compile="0" resource="0" file="Source/LibHeader/LibFunc.h"/>
<FILE id="AHGkI8" name="VersionInfo.h" compile="0" resource="0" file="Source/LibHeader/VersionInfo.h"/>
</GROUP>
<GROUP id="{E80B412A-A129-BE0C-2F44-5C5B9A9E7313}" name="LrnCpp">
<FILE id="HtwSFC" name="CLrn01.cpp" compile="1" resource="0" file="Source/LrnCpp/CLrn01.cpp"/>
<FILE id="rlPRd9" name="CLrn01.h" compile="0" resource="0" file="Source/LrnCpp/CLrn01.h"/>
<FILE id="vt5krI" name="CLrn01_a.cpp" compile="1" resource="0" file="Source/LrnCpp/CLrn01_a.cpp"/>
<FILE id="TnwszG" name="CLrn01_a.h" compile="0" resource="0" file="Source/LrnCpp/CLrn01_a.h"/>
</GROUP>
<GROUP id="{9138E49D-AC3F-E28C-121A-606879B32D43}" name="DFU_Files">
<FILE id="MrgWDH" name="Rescue.dfu" compile="0" resource="1" file="DFU_Files/Rescue/Rescue.dfu"/>
<FILE id="BhPSg5" name="AeroTwist.dfu" compile="0" resource="1" file="DFU_Files/AeroTwist/AeroTwist.dfu"/>
<FILE id="uq7hfK" name="AeroFrame.dfu" compile="0" resource="1" file="DFU_Files/AeroFrame/AeroFrame.dfu"/>
<FILE id="sAjOIt" name="AeroSkullXS.dfu" compile="0" resource="1" file="DFU_Files/AeroSkullXS/AeroSkullXS.dfu"/>
<FILE id="fUPNXJ" name="AeroSkullHD.dfu" compile="0" resource="1" file="DFU_Files/AeroSkullHD/AeroSkullHD.dfu"/>
<FILE id="mpI3Ec" name="AeroBullXS.dfu" compile="0" resource="1" file="DFU_Files/AeroBullXS/AeroBullXS.dfu"/>
<FILE id="oE6CI8" name="AeroBullHD.dfu" compile="0" resource="1" file="DFU_Files/AeroBullHD/AeroBullHD.dfu"/>
</GROUP>
</MAINGROUP>
<EXPORTFORMATS>
<VS2013 targetFolder="Builds/VisualStudio2013" smallIcon="WrmrVU" bigIcon="WrmrVU">
<CONFIGURATIONS>
<CONFIGURATION name="Debug" winWarningLevel="4" generateManifest="1" winArchitecture="32-bit"
isDebug="1" optimisation="1" targetName="TwDfuPrj02" libraryPath="C:\TW_DfuPrj\Build\Lib_Debug"
intermediatesPath="C:\TW_DfuPrj\__MainJuceApp_CsrDfu\TwDfuPrj02\TempFilesForBuilding\Debug"
headerPath="C:\TW_DfuPrj" prebuildCommand="" postbuildCommand="BuildCntRecorder_ForDbgBuild"
characterSet=""/>
<CONFIGURATION name="Release" winWarningLevel="4" generateManifest="1" winArchitecture="32-bit"
isDebug="0" optimisation="2" targetName="TwDfuPrj02" libraryPath="C:\TW_DfuPrj\Build\Lib_Release"
intermediatesPath="C:\TW_DfuPrj\__MainJuceApp_CsrDfu\TwDfuPrj02\TempFilesForBuilding\Release"
headerPath="C:\TW_DfuPrj" prebuildCommand="" postbuildCommand="BuildCntRecorder_ForRlsBuild"
characterSet=""/>
</CONFIGURATIONS>
<MODULEPATHS>
<MODULEPATH id="juce_core" path="D:/Juce_3.20/modules"/>
<MODULEPATH id="juce_events" path="D:/Juce_3.20/modules"/>
<MODULEPATH id="juce_graphics" path="D:/Juce_3.20/modules"/>
<MODULEPATH id="juce_data_structures" path="D:/Juce_3.20/modules"/>
<MODULEPATH id="juce_gui_basics" path="D:/Juce_3.20/modules"/>
</MODULEPATHS>
</VS2013>
</EXPORTFORMATS>
<MODULES>
<MODULES id="juce_core" showAllCode="1" useLocalCopy="1"/>
<MODULES id="juce_data_structures" showAllCode="1" useLocalCopy="1"/>
<MODULES id="juce_events" showAllCode="1" useLocalCopy="1"/>
<MODULES id="juce_graphics" showAllCode="1" useLocalCopy="1"/>
<MODULES id="juce_gui_basics" showAllCode="1" useLocalCopy="1"/>
</MODULES>
<JUCEOPTIONS/>
</JUCERPROJECT>
fr810
October 26, 2015, 4:00pm
4
I think Introjucer builds the .rc file correcly for the lang-charset
field of the StringFileInfo BLOCK
BLOCK "040904E4"
however the Translation
field in the VarFileInfo BLOCK
is indeed incorrect and should read:
VALUE "Translation", 0x409, 1252
instead of 65001
. Would this work for you?
yes, instead 65001, I use 1252 (04e4), it works! I just want to point out: this is might a bug of introjucer.
fr810
October 27, 2015, 10:24pm
6
OK! A fix for this is on the latest tip.