Output header to the same directory as the .cpp file in wxrc.
If "-o" option is given, generate the output header file in the same directory as the .cpp file and not in the current directory. Closes #4054. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65892 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -707,16 +707,17 @@ void XmlResApp::MakePackageCPP(const wxArrayString& flist)
|
|||||||
|
|
||||||
void XmlResApp::GenCPPHeader()
|
void XmlResApp::GenCPPHeader()
|
||||||
{
|
{
|
||||||
wxString fileSpec = ((parOutput.BeforeLast('.')).AfterLast('/')).AfterLast('\\');
|
// Generate the output header in the same directory as the source file.
|
||||||
wxString heaFileName = fileSpec + wxT(".h");
|
wxFileName headerName(parOutput);
|
||||||
|
headerName.SetExt("h");
|
||||||
|
|
||||||
wxFFile file(heaFileName, wxT("wt"));
|
wxFFile file(headerName.GetFullPath(), wxT("wt"));
|
||||||
file.Write(
|
file.Write(
|
||||||
"//\n"
|
"//\n"
|
||||||
"// This file was automatically generated by wxrc, do not edit by hand.\n"
|
"// This file was automatically generated by wxrc, do not edit by hand.\n"
|
||||||
"//\n\n"
|
"//\n\n"
|
||||||
"#ifndef __" + fileSpec + "_h__\n"
|
"#ifndef __" + headerName.GetName() + "_h__\n"
|
||||||
"#define __" + fileSpec + "_h__\n"
|
"#define __" + headerName.GetName() + "_h__\n"
|
||||||
);
|
);
|
||||||
for(size_t i=0;i<aXRCWndClassData.GetCount();++i){
|
for(size_t i=0;i<aXRCWndClassData.GetCount();++i){
|
||||||
aXRCWndClassData.Item(i).GenerateHeaderCode(file);
|
aXRCWndClassData.Item(i).GenerateHeaderCode(file);
|
||||||
|
Reference in New Issue
Block a user