| @@ -149,7 +149,6 @@ private: | |||
| }; | |||
| //============================================================================== | |||
| //============================================================================== | |||
| public: | |||
| LicenseWebviewContent (LicenseWebview& parentWindowToUse, ModalComponentManager::Callback* callbackToUse) | |||
| : parentWindow (parentWindowToUse), modalCallback (callbackToUse), webview (*this) | |||
| @@ -196,6 +195,7 @@ private: | |||
| HashMap<String, String> params; | |||
| auto n = url.getParameterNames().size(); | |||
| for (int i = 0; i < n; ++i) | |||
| params.set (url.getParameterNames()[i], url.getParameterValues()[i]); | |||
| @@ -137,8 +137,15 @@ public: | |||
| return false; | |||
| } | |||
| void createExporterProperties (PropertyListBuilder&) override | |||
| void createExporterProperties (PropertyListBuilder& props) override | |||
| { | |||
| if (isWindows()) | |||
| { | |||
| StringArray toolsetNames = { "(default)", "Windows NT 4.0", "Windows 2000", "Windows XP", "Windows Server 2003", "Windows Vista", "Windows Server 2008", "Windows 7", "Windows 8", "Windows 8.1", "Windows 10" }; | |||
| Array<var> toolsets = { var(), "0x0400", "0x0500", "0x0501", "0x0502", "0x0600", "0x0600", "0x0601", "0x0602", "0x0603", "0x0A00" }; | |||
| props.add (new ChoicePropertyComponent (getTargetPlatformValue(), "Target platform", toolsetNames, toolsets), | |||
| "This sets the preprocessor macro WINVER to an appropriate value for the corresponding platform."); | |||
| } | |||
| } | |||
| //============================================================================== | |||
| @@ -196,6 +203,9 @@ public: | |||
| } | |||
| private: | |||
| Value getTargetPlatformValue() { return getSetting (Ids::codeBlocksWindowsTarget); } | |||
| String getTargetPlatform() const { return settings [Ids::codeBlocksWindowsTarget].toString(); } | |||
| //============================================================================== | |||
| class CodeBlocksBuildConfiguration : public BuildConfiguration | |||
| { | |||
| @@ -366,7 +376,12 @@ private: | |||
| if (isWindows()) | |||
| { | |||
| defines.set ("__MINGW__", "1"); | |||
| defines.set ("__MINGW_EXTENSION", String()); | |||
| defines.set ("__MINGW_EXTENSION", {}); | |||
| auto targetPlatform = getTargetPlatform(); | |||
| if (targetPlatform.isNotEmpty()) | |||
| defines.set ("WINVER", targetPlatform); | |||
| } | |||
| else | |||
| { | |||
| @@ -386,8 +401,18 @@ private: | |||
| defines = mergePreprocessorDefs (defines, getAllPreprocessorDefs (config, target.type)); | |||
| StringArray defs; | |||
| const auto keys = defines.getAllKeys(); | |||
| const auto values = defines.getAllValues(); | |||
| for (int i = 0; i < defines.size(); ++i) | |||
| defs.add (defines.getAllKeys()[i] + "=" + defines.getAllValues()[i]); | |||
| { | |||
| auto result = keys[i]; | |||
| if (values[i].isNotEmpty()) | |||
| result += "=" + values[i]; | |||
| defs.add (result); | |||
| } | |||
| return getCleanedStringArray (defs); | |||
| } | |||
| @@ -728,12 +728,12 @@ public: | |||
| if (otherFilesGroup->getFirstChildElement() != nullptr) | |||
| projectXml.addChildElement (otherFilesGroup.release()); | |||
| if (getOwner().hasResourceFile()) | |||
| { | |||
| XmlElement* rcGroup = projectXml.createNewChildElement ("ItemGroup"); | |||
| XmlElement* e = rcGroup->createNewChildElement ("ResourceCompile"); | |||
| e->setAttribute ("Include", prependDot (getOwner().rcFile.getFileName())); | |||
| } | |||
| if (getOwner().hasResourceFile()) | |||
| { | |||
| XmlElement* rcGroup = projectXml.createNewChildElement ("ItemGroup"); | |||
| XmlElement* e = rcGroup->createNewChildElement ("ResourceCompile"); | |||
| e->setAttribute ("Include", prependDot (getOwner().rcFile.getFileName())); | |||
| } | |||
| { | |||
| XmlElement* e = projectXml.createNewChildElement ("Import"); | |||
| @@ -919,13 +919,13 @@ public: | |||
| if (otherFilesGroup->getFirstChildElement() != nullptr) | |||
| filterXml.addChildElement (otherFilesGroup.release()); | |||
| if (getOwner().hasResourceFile()) | |||
| { | |||
| XmlElement* rcGroup = filterXml.createNewChildElement ("ItemGroup"); | |||
| XmlElement* e = rcGroup->createNewChildElement ("ResourceCompile"); | |||
| e->setAttribute ("Include", prependDot (getOwner().rcFile.getFileName())); | |||
| e->createNewChildElement ("Filter")->addTextElement (ProjectSaver::getJuceCodeGroupName()); | |||
| } | |||
| if (getOwner().hasResourceFile()) | |||
| { | |||
| XmlElement* rcGroup = filterXml.createNewChildElement ("ItemGroup"); | |||
| XmlElement* e = rcGroup->createNewChildElement ("ResourceCompile"); | |||
| e->setAttribute ("Include", prependDot (getOwner().rcFile.getFileName())); | |||
| e->createNewChildElement ("Filter")->addTextElement (ProjectSaver::getJuceCodeGroupName()); | |||
| } | |||
| } | |||
| const MSVCProjectExporterBase& getOwner() const { return owner; } | |||
| @@ -123,6 +123,7 @@ namespace Ids | |||
| DECLARE_ID (linuxArchitecture); | |||
| DECLARE_ID (linuxCodeBlocksArchitecture); | |||
| DECLARE_ID (windowsCodeBlocksArchitecture); | |||
| DECLARE_ID (codeBlocksWindowsTarget); | |||
| DECLARE_ID (toolset); | |||
| DECLARE_ID (windowsTargetPlatformVersion); | |||
| DECLARE_ID (debugInformationFormat); | |||
| @@ -32,7 +32,6 @@ JUCE_DECLARE_UUID_GETTER (IConnectionPointContainer, "B196B284-BAB4-101A-B69C-00 | |||
| JUCE_DECLARE_UUID_GETTER (IWebBrowser2, "D30C1661-CDAF-11D0-8A3E-00C04FC9E26E") | |||
| #if JUCE_MINGW | |||
| #define DISPID_NAVIGATEERROR 271 | |||
| class WebBrowser; | |||
| #endif | |||
| @@ -178,7 +177,7 @@ private: | |||
| return S_OK; | |||
| } | |||
| if (dispIdMember == DISPID_NAVIGATEERROR) | |||
| if (dispIdMember == 271 /*DISPID_NAVIGATEERROR*/) | |||
| { | |||
| int statusCode = pDispParams->rgvarg[1].pvarVal->intVal; | |||
| *pDispParams->rgvarg[0].pboolVal = VARIANT_FALSE; | |||