From bd5c03ebf0b66c16b3a0b40f284018e2f885c19b Mon Sep 17 00:00:00 2001 From: Nimetu Date: Tue, 7 May 2019 19:40:04 +0300 Subject: [PATCH 01/77] Changed: extract form submit button to own method --HG-- branch : develop --- code/nel/include/nel/gui/group_html.h | 19 ++- code/nel/src/gui/group_html.cpp | 177 +++++++++++++------------- 2 files changed, 105 insertions(+), 91 deletions(-) diff --git a/code/nel/include/nel/gui/group_html.h b/code/nel/include/nel/gui/group_html.h index fc29c840d..55e3a5182 100644 --- a/code/nel/include/nel/gui/group_html.h +++ b/code/nel/include/nel/gui/group_html.h @@ -325,7 +325,7 @@ namespace NLGUI // Add a button in the current paragraph. actionHandler, actionHandlerParams and tooltip can be NULL. CCtrlButton *addButton(CCtrlButton::EType type, const std::string &name, const std::string &normalBitmap, const std::string &pushedBitmap, - const std::string &overBitmap, const char *actionHandler, const char *actionHandlerParams, const char *tooltip, + const std::string &overBitmap, const char *actionHandler, const char *actionHandlerParams, const std::string &tooltip, const CStyleParams &style = CStyleParams()); // Set the background color @@ -819,6 +819,23 @@ namespace NLGUI // apply background from current style (for html, body) void applyBackground(const CHtmlElement &elm); + void insertFormImageButton(const std::string &name, + const std::string &tooltip, + const std::string &src, + const std::string &over, + uint32 formId, + const std::string &formAction = "", + uint32 minWidth = 0, + const std::string &templateName = ""); + + void insertFormTextButton(const std::string &name, + const std::string &tooltip, + const std::string &value, + uint32 formId, + const std::string &formAction = "", + uint32 minWidth = 0, + const std::string &templateName = ""); + // HTML elements void htmlA(const CHtmlElement &elm); void htmlAend(const CHtmlElement &elm); diff --git a/code/nel/src/gui/group_html.cpp b/code/nel/src/gui/group_html.cpp index 5e0da0488..d45dc799f 100644 --- a/code/nel/src/gui/group_html.cpp +++ b/code/nel/src/gui/group_html.cpp @@ -2997,7 +2997,7 @@ namespace NLGUI CCtrlButton *CGroupHTML::addButton(CCtrlButton::EType type, const std::string &name, const std::string &normalBitmap, const std::string &pushedBitmap, const std::string &overBitmap, const char *actionHandler, const char *actionHandlerParams, - const char *tooltip, const CStyleParams &style) + const std::string &tooltip, const CStyleParams &style) { // In a paragraph ? if (!_Paragraph) @@ -3067,7 +3067,7 @@ namespace NLGUI ctrlButton->setParamsOnLeftClick (actionHandlerParams); // Translate the tooltip or display raw text (tooltip from webig) - if (tooltip) + if (!tooltip.empty()) { if (CI18N::hasTranslation(tooltip)) { @@ -5062,6 +5062,80 @@ namespace NLGUI } + // *************************************************************************** + void CGroupHTML::insertFormImageButton(const std::string &name, const std::string &tooltip, const std::string &src, const std::string &over, uint32 formId, const std::string &action, uint32 minWidth, const std::string &templateName) + { + // Action handler parameters : "name=group_html_id|form=id_of_the_form|submit_button=button_name" + std::string param = "name=" + getId() + "|form=" + toString(formId) + "|submit_button=" + name + "|submit_button_type=image"; + + // Add the ctrl button + addButton (CCtrlButton::PushButton, name, src, src, over, "html_submit_form", param.c_str(), tooltip.c_str(), _Style.Current); + } + + // *************************************************************************** + void CGroupHTML::insertFormTextButton(const std::string &name, const std::string &tooltip, const std::string &value, uint32 formId, const std::string &formAction, uint32 minWidth, const std::string &templateName) + { + // The submit button + string buttonTemplate(!templateName.empty() ? templateName : DefaultButtonGroup); + + // Action handler parameters : "name=group_html_id|form=id_of_the_form|submit_button=button_name" + string param = "name=" + getId() + "|form=" + toString(formId) + "|submit_button=" + name + "|submit_button_type=submit"; + if (!value.empty()) + { + // escape AH param separator + string tmp = value; + while(NLMISC::strFindReplace(tmp, "|", "|")) + ; + param = param + "|submit_button_value=" + tmp; + } + + // Add the ctrl button + if (!_Paragraph) + { + newParagraph (0); + paragraphChange (); + } + + typedef pair TTmplParam; + vector tmplParams; + tmplParams.push_back(TTmplParam("id", name)); + tmplParams.push_back(TTmplParam("onclick", "html_submit_form")); + tmplParams.push_back(TTmplParam("onclick_param", param)); + //tmplParams.push_back(TTmplParam("text", text)); + tmplParams.push_back(TTmplParam("active", "true")); + if (minWidth > 0) tmplParams.push_back(TTmplParam("wmin", toString(minWidth))); + CInterfaceGroup *buttonGroup = CWidgetManager::getInstance()->getParser()->createGroupInstance(buttonTemplate, _Paragraph->getId(), tmplParams); + if (buttonGroup) + { + // Add the ctrl button + CCtrlTextButton *ctrlButton = dynamic_cast(buttonGroup->getCtrl("button")); + if (!ctrlButton) ctrlButton = dynamic_cast(buttonGroup->getCtrl("b")); + if (ctrlButton) + { + ctrlButton->setModulateGlobalColorAll (_Style.Current.GlobalColor); + + // Translate the tooltip + if (!tooltip.empty()) + { + if (CI18N::hasTranslation(tooltip)) + { + ctrlButton->setDefaultContextHelp(CI18N::get(tooltip)); + } + else + { + ctrlButton->setDefaultContextHelp(ucstring(tooltip)); + } + } + + ctrlButton->setText(ucstring::makeFromUtf8(value)); + + setTextButtonStyle(ctrlButton, _Style.Current); + } + getParagraph()->addChild (buttonGroup); + paragraphChange (); + } + } + // *************************************************************************** void CGroupHTML::htmlA(const CHtmlElement &elm) { @@ -5523,15 +5597,10 @@ namespace NLGUI // Tooltip // keep "alt" attribute for backward compatibility - std::string strtooltip = elm.getAttribute("alt"); + std::string tooltip = elm.getAttribute("alt"); // tooltip if (elm.hasNonEmptyAttribute("title")) - strtooltip = elm.getAttribute("title"); - - const char *tooltip = NULL; - // note: uses pointer to string data - if (!strtooltip.empty()) - tooltip = strtooltip.c_str(); + tooltip = elm.getAttribute("title"); // Mouse over image string overSrc = elm.getAttribute("data-over-src"); @@ -5542,7 +5611,7 @@ namespace NLGUI addButton(CCtrlButton::PushButton, id, src, src, overSrc, "browse", params.c_str(), tooltip, _Style.Current); } else - if (tooltip || !overSrc.empty()) + if (!tooltip.empty() || !overSrc.empty()) { addButton(CCtrlButton::PushButton, id, src, src, overSrc, "", "", tooltip, _Style.Current); } @@ -5582,7 +5651,8 @@ namespace NLGUI templateName = elm.getAttribute("z_input_tmpl"); // Widget minimal width - string minWidth = elm.getAttribute("z_input_width"); + uint32 minWidth = 0; + fromString(elm.getAttribute("z_input_width"), minWidth); // std::string type = trim(elm.getAttribute("type")); @@ -5597,96 +5667,23 @@ namespace NLGUI _Style.Current.GlobalColor = true; // Tooltip - std::string strtooltip = elm.getAttribute("alt"); - const char *tooltip = NULL; - // note: uses pointer to strtooltip data - if (!strtooltip.empty()) - tooltip = strtooltip.c_str(); + std::string tooltip = elm.getAttribute("alt"); if (type == "image") { - // The submit button string name = elm.getAttribute("name"); - string normal = elm.getAttribute("src"); - string pushed; - string over; + string src = elm.getAttribute("src"); + string over = elm.getAttribute("data-over-src"); - // Action handler parameters : "name=group_html_id|form=id_of_the_form|submit_button=button_name" - string param = "name=" + getId() + "|form=" + toString (_Forms.size()-1) + "|submit_button=" + name + "|submit_button_type=image"; - - // Add the ctrl button - addButton (CCtrlButton::PushButton, name, normal, pushed.empty()?normal:pushed, over, - "html_submit_form", param.c_str(), tooltip, _Style.Current); + insertFormImageButton(name, tooltip, src, over, _Forms.size()-1, "", minWidth, templateName); } else if (type == "button" || type == "submit") { // The submit button string name = elm.getAttribute("name"); - string normal = elm.getAttribute("src"); - string text = elm.getAttribute("value"); - string pushed; - string over; + string value = elm.getAttribute("value"); - string buttonTemplate(!templateName.empty() ? templateName : DefaultButtonGroup ); - - // Action handler parameters : "name=group_html_id|form=id_of_the_form|submit_button=button_name" - string param = "name=" + getId() + "|form=" + toString (_Forms.size()-1) + "|submit_button=" + name + "|submit_button_type=submit"; - if (!text.empty()) - { - // escape AH param separator - string tmp = text; - while(NLMISC::strFindReplace(tmp, "|", "|")) - ; - param = param + "|submit_button_value=" + tmp; - } - - // Add the ctrl button - if (!_Paragraph) - { - newParagraph (0); - paragraphChange (); - } - - typedef pair TTmplParam; - vector tmplParams; - tmplParams.push_back(TTmplParam("id", name)); - tmplParams.push_back(TTmplParam("onclick", "html_submit_form")); - tmplParams.push_back(TTmplParam("onclick_param", param)); - //tmplParams.push_back(TTmplParam("text", text)); - tmplParams.push_back(TTmplParam("active", "true")); - if (!minWidth.empty()) - tmplParams.push_back(TTmplParam("wmin", minWidth)); - CInterfaceGroup *buttonGroup = CWidgetManager::getInstance()->getParser()->createGroupInstance(buttonTemplate, _Paragraph->getId(), tmplParams); - if (buttonGroup) - { - - // Add the ctrl button - CCtrlTextButton *ctrlButton = dynamic_cast(buttonGroup->getCtrl("button")); - if (!ctrlButton) ctrlButton = dynamic_cast(buttonGroup->getCtrl("b")); - if (ctrlButton) - { - ctrlButton->setModulateGlobalColorAll (_Style.Current.GlobalColor); - - // Translate the tooltip - if (tooltip) - { - if (CI18N::hasTranslation(tooltip)) - { - ctrlButton->setDefaultContextHelp(CI18N::get(tooltip)); - } - else - { - ctrlButton->setDefaultContextHelp(ucstring(tooltip)); - } - } - - ctrlButton->setText(ucstring::makeFromUtf8(text)); - - setTextButtonStyle(ctrlButton, _Style.Current); - } - getParagraph()->addChild (buttonGroup); - paragraphChange (); - } + insertFormTextButton(name, tooltip, value, _Forms.size()-1, "", minWidth, templateName); } else if (type == "text") { From 742092fd6b7bc611b83bbae92ff8f4bfdbac20d3 Mon Sep 17 00:00:00 2001 From: Nimetu Date: Tue, 7 May 2019 19:40:06 +0300 Subject: [PATCH 02/77] Changed: Use button lookup index in html_submit_form instead button name/value --HG-- branch : develop --- code/nel/include/nel/gui/group_html.h | 26 ++++++- code/nel/src/gui/group_html.cpp | 68 +++++++++++-------- .../src/interface_v3/action_handler_help.cpp | 37 +++++----- 3 files changed, 78 insertions(+), 53 deletions(-) diff --git a/code/nel/include/nel/gui/group_html.h b/code/nel/include/nel/gui/group_html.h index 55e3a5182..ce06c11cb 100644 --- a/code/nel/include/nel/gui/group_html.h +++ b/code/nel/include/nel/gui/group_html.h @@ -107,7 +107,7 @@ namespace NLGUI void refresh(); // submit form - void submitForm (uint formId, const char *submitButtonType, const char *submitButtonName, const char *submitButtonValue, sint32 x, sint32 y); + void submitForm(uint button, sint32 x, sint32 y); // Browse error void browseError (const char *msg); @@ -600,6 +600,9 @@ namespace NLGUI sint InitialSelection; // initial selection for the combo box }; + //
element "id" attribute + std::string id; + // The action the form has to perform std::string Action; @@ -607,6 +610,23 @@ namespace NLGUI std::vector Entries; }; std::vector _Forms; + + // submit buttons added to from + struct SFormSubmitButton + { + SFormSubmitButton(const std::string &form, const std::string &name, const std::string &value, const std::string &type) + : form(form), name(name), value(value), type(type) + { } + + std::string form; // form 'id' + std::string name; // submit button name + std::string value; // submit button value + std::string type; // button type, ie 'image' + }; + + // submit buttons added to form + std::vector _FormSubmit; + std::vector _Groups; // Cells parameters @@ -823,7 +843,7 @@ namespace NLGUI const std::string &tooltip, const std::string &src, const std::string &over, - uint32 formId, + const std::string &formId, const std::string &formAction = "", uint32 minWidth = 0, const std::string &templateName = ""); @@ -831,7 +851,7 @@ namespace NLGUI void insertFormTextButton(const std::string &name, const std::string &tooltip, const std::string &value, - uint32 formId, + const std::string &formId, const std::string &formAction = "", uint32 minWidth = 0, const std::string &templateName = ""); diff --git a/code/nel/src/gui/group_html.cpp b/code/nel/src/gui/group_html.cpp index d45dc799f..e65550c26 100644 --- a/code/nel/src/gui/group_html.cpp +++ b/code/nel/src/gui/group_html.cpp @@ -3118,6 +3118,7 @@ namespace NLGUI _Cells.clear(); _TR.clear(); _Forms.clear(); + _FormSubmit.clear(); _Groups.clear(); _Divs.clear(); _Anchors.clear(); @@ -3328,19 +3329,29 @@ namespace NLGUI // *************************************************************************** - void CGroupHTML::submitForm (uint formId, const char *submitButtonType, const char *submitButtonName, const char *submitButtonValue, sint32 x, sint32 y) + void CGroupHTML::submitForm(uint button, sint32 x, sint32 y) { - // Form id valid ? - if (formId < _Forms.size()) + if (button >= _FormSubmit.size()) + return; + + for(uint formId = 0; formId < _Forms.size(); formId++) { - _PostNextTime = true; - _PostFormId = formId; - _PostFormSubmitType = submitButtonType; - _PostFormSubmitButton = submitButtonName; - _PostFormSubmitValue = submitButtonValue; - _PostFormSubmitX = x; - _PostFormSubmitY = y; + // case sensitive search (user id is lowecase, auto id is uppercase) + if (_Forms[formId].id == _FormSubmit[button].form) + { + _PostNextTime = true; + _PostFormId = formId; + _PostFormSubmitType = _FormSubmit[button].type; + _PostFormSubmitButton = _FormSubmit[button].name; + _PostFormSubmitValue = _FormSubmit[button].value; + _PostFormSubmitX = x; + _PostFormSubmitY = y; + + return; + } } + + nlwarning("Unable to find form '%s' to submit (button '%s')", _FormSubmit[button].form.c_str(), _FormSubmit[button].name.c_str()); } // *************************************************************************** @@ -5063,31 +5074,22 @@ namespace NLGUI } // *************************************************************************** - void CGroupHTML::insertFormImageButton(const std::string &name, const std::string &tooltip, const std::string &src, const std::string &over, uint32 formId, const std::string &action, uint32 minWidth, const std::string &templateName) + void CGroupHTML::insertFormImageButton(const std::string &name, const std::string &tooltip, const std::string &src, const std::string &over, const std::string &formId, const std::string &action, uint32 minWidth, const std::string &templateName) { - // Action handler parameters : "name=group_html_id|form=id_of_the_form|submit_button=button_name" - std::string param = "name=" + getId() + "|form=" + toString(formId) + "|submit_button=" + name + "|submit_button_type=image"; + _FormSubmit.push_back(SFormSubmitButton(formId, name, "", "image")); + // Action handler parameters + std::string param = "name=" + getId() + "|button=" + toString(_FormSubmit.size()-1); // Add the ctrl button addButton (CCtrlButton::PushButton, name, src, src, over, "html_submit_form", param.c_str(), tooltip.c_str(), _Style.Current); } // *************************************************************************** - void CGroupHTML::insertFormTextButton(const std::string &name, const std::string &tooltip, const std::string &value, uint32 formId, const std::string &formAction, uint32 minWidth, const std::string &templateName) + void CGroupHTML::insertFormTextButton(const std::string &name, const std::string &tooltip, const std::string &value, const std::string &formId, const std::string &formAction, uint32 minWidth, const std::string &templateName) { - // The submit button - string buttonTemplate(!templateName.empty() ? templateName : DefaultButtonGroup); - - // Action handler parameters : "name=group_html_id|form=id_of_the_form|submit_button=button_name" - string param = "name=" + getId() + "|form=" + toString(formId) + "|submit_button=" + name + "|submit_button_type=submit"; - if (!value.empty()) - { - // escape AH param separator - string tmp = value; - while(NLMISC::strFindReplace(tmp, "|", "|")) - ; - param = param + "|submit_button_value=" + tmp; - } + _FormSubmit.push_back(SFormSubmitButton(formId, name, value, "submit")); + // Action handler parameters + string param = "name=" + getId() + "|button=" + toString(_FormSubmit.size()-1); // Add the ctrl button if (!_Paragraph) @@ -5096,12 +5098,12 @@ namespace NLGUI paragraphChange (); } + string buttonTemplate(!templateName.empty() ? templateName : DefaultButtonGroup); typedef pair TTmplParam; vector tmplParams; tmplParams.push_back(TTmplParam("id", name)); tmplParams.push_back(TTmplParam("onclick", "html_submit_form")); tmplParams.push_back(TTmplParam("onclick_param", param)); - //tmplParams.push_back(TTmplParam("text", text)); tmplParams.push_back(TTmplParam("active", "true")); if (minWidth > 0) tmplParams.push_back(TTmplParam("wmin", toString(minWidth))); CInterfaceGroup *buttonGroup = CWidgetManager::getInstance()->getParser()->createGroupInstance(buttonTemplate, _Paragraph->getId(), tmplParams); @@ -5474,6 +5476,12 @@ namespace NLGUI { // Build the form CGroupHTML::CForm form; + // id check is case sensitive and auto id's are uppercase + form.id = toLower(trim(elm.getAttribute("id"))); + if (form.id.empty()) + { + form.id = toString("FORM%d", _Forms.size()); + } // Get the action name if (elm.hasNonEmptyAttribute("action")) @@ -5675,7 +5683,7 @@ namespace NLGUI string src = elm.getAttribute("src"); string over = elm.getAttribute("data-over-src"); - insertFormImageButton(name, tooltip, src, over, _Forms.size()-1, "", minWidth, templateName); + insertFormImageButton(name, tooltip, src, over, _Forms.back().id, "", minWidth, templateName); } else if (type == "button" || type == "submit") { @@ -5683,7 +5691,7 @@ namespace NLGUI string name = elm.getAttribute("name"); string value = elm.getAttribute("value"); - insertFormTextButton(name, tooltip, value, _Forms.size()-1, "", minWidth, templateName); + insertFormTextButton(name, tooltip, value, _Forms.back().id, "", minWidth, templateName); } else if (type == "text") { diff --git a/code/ryzom/client/src/interface_v3/action_handler_help.cpp b/code/ryzom/client/src/interface_v3/action_handler_help.cpp index be11191e0..43797b960 100644 --- a/code/ryzom/client/src/interface_v3/action_handler_help.cpp +++ b/code/ryzom/client/src/interface_v3/action_handler_help.cpp @@ -1103,20 +1103,18 @@ REGISTER_ACTION_HANDLER( CHandlerBrowseRefresh, "browse_refresh"); // *************************************************************************** -/** Build the help window for a pact/item/brick and open it. - */ class CHandlerHTMLSubmitForm : public IActionHandler { void execute (CCtrlBase *pCaller, const std::string &sParams) { string container = getParam (sParams, "name"); - uint form; - fromString(getParam (sParams, "form"), form); - - string submit_button = getParam (sParams, "submit_button"); - string type = getParam (sParams, "submit_button_type"); - string value = getParam (sParams, "submit_button_value"); + uint button; + if (!fromString(getParam(sParams, "button"), button)) + { + nlwarning("Invalid button index: '%s', expected integer", getParam(sParams, "button").c_str()); + return; + } sint32 x = pCaller->getEventX(); sint32 y = pCaller->getEventY(); @@ -1127,8 +1125,7 @@ class CHandlerHTMLSubmitForm : public IActionHandler CGroupHTML *groupHtml = dynamic_cast(element); if (groupHtml) { - // Submit the form the url - groupHtml->submitForm (form, type.c_str(), submit_button.c_str(), value.c_str(), x, y); + groupHtml->submitForm(button, x, y); } } } @@ -2339,11 +2336,11 @@ void setupCosmetic(CSheetHelpSetup &setup, CItemSheet *pIS) void setupItemPreview(CSheetHelpSetup &setup, CItemSheet *pIS) { nlassert(pIS); - + CInterfaceManager *pIM = CInterfaceManager::getInstance(); CCDBNodeBranch *dbBranch = NLGUI::CDBManager::getInstance()->getDbBranch( setup.SrcSheet->getSheet() ); - - + + CInterfaceElement *elt = setup.HelpWindow->getElement(setup.HelpWindow->getId()+setup.PrefixForExtra+INFO_ITEM_PREVIEW); if (elt == NULL) return; @@ -2357,12 +2354,12 @@ void setupItemPreview(CSheetHelpSetup &setup, CItemSheet *pIS) static sint32 helpWidth = setup.HelpWindow->getW(); bool scene_inactive = ! NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:SHOW_3D_ITEM_PREVIEW")->getValueBool(); - if (scene_inactive || - (pIS->Family != ITEMFAMILY::ARMOR && - pIS->Family != ITEMFAMILY::MELEE_WEAPON && - pIS->Family != ITEMFAMILY::RANGE_WEAPON && + if (scene_inactive || + (pIS->Family != ITEMFAMILY::ARMOR && + pIS->Family != ITEMFAMILY::MELEE_WEAPON && + pIS->Family != ITEMFAMILY::RANGE_WEAPON && pIS->Family != ITEMFAMILY::SHIELD)) - { + { setup.HelpWindow->setW(helpWidth); ig->setActive(false); return; @@ -2372,7 +2369,7 @@ void setupItemPreview(CSheetHelpSetup &setup, CItemSheet *pIS) setup.HelpWindow->setW(helpWidth + ITEM_PREVIEW_WIDTH); ig->setActive(true); } - + CInterface3DScene *sceneI = dynamic_cast(ig->getGroup("scene_item_preview")); if (!sceneI) { @@ -2458,7 +2455,7 @@ void setupItemPreview(CSheetHelpSetup &setup, CItemSheet *pIS) cs.VisualPropA.PropertySubData.HatColor = color->getValue32(); SCharacter3DSetup::setupDBFromCharacterSummary("UI:TEMP:CHAR3D", cs); camHeight = -0.35f; - } + } } else if (pIS->Family == ITEMFAMILY::SHIELD) { From 2f5de64d960384ffa13da83cf010ddad97bec4d7 Mon Sep 17 00:00:00 2001 From: Nimetu Date: Tue, 7 May 2019 19:40:07 +0300 Subject: [PATCH 03/77] Added: html button element --HG-- branch : develop --- code/nel/include/nel/gui/group_html.h | 9 +++- code/nel/src/gui/group_html.cpp | 64 +++++++++++++++++++++++++-- 2 files changed, 68 insertions(+), 5 deletions(-) diff --git a/code/nel/include/nel/gui/group_html.h b/code/nel/include/nel/gui/group_html.h index ce06c11cb..576c54ca7 100644 --- a/code/nel/include/nel/gui/group_html.h +++ b/code/nel/include/nel/gui/group_html.h @@ -385,6 +385,7 @@ namespace NLGUI bool _BrowseNextTime; bool _PostNextTime; uint _PostFormId; + std::string _PostFormAction; std::string _PostFormSubmitType; std::string _PostFormSubmitButton; std::string _PostFormSubmitValue; @@ -614,14 +615,16 @@ namespace NLGUI // submit buttons added to from struct SFormSubmitButton { - SFormSubmitButton(const std::string &form, const std::string &name, const std::string &value, const std::string &type) - : form(form), name(name), value(value), type(type) + SFormSubmitButton(const std::string &form, const std::string &name, const std::string &value, const std::string &type, const std::string &formAction="") + : form(form), name(name), value(value), type(type), formAction(formAction) { } std::string form; // form 'id' std::string name; // submit button name std::string value; // submit button value std::string type; // button type, ie 'image' + + std::string formAction; // override form action attribute (url) }; // submit buttons added to form @@ -862,6 +865,8 @@ namespace NLGUI void htmlBASE(const CHtmlElement &elm); void htmlBODY(const CHtmlElement &elm); void htmlBR(const CHtmlElement &elm); + void htmlBUTTON(const CHtmlElement &elm); + void htmlBUTTONend(const CHtmlElement &elm); void htmlDD(const CHtmlElement &elm); void htmlDDend(const CHtmlElement &elm); //void htmlDEL(const CHtmlElement &elm); diff --git a/code/nel/src/gui/group_html.cpp b/code/nel/src/gui/group_html.cpp index e65550c26..7f8d29a79 100644 --- a/code/nel/src/gui/group_html.cpp +++ b/code/nel/src/gui/group_html.cpp @@ -1078,6 +1078,7 @@ namespace NLGUI case HTML_BASE: htmlBASE(elm); break; case HTML_BODY: htmlBODY(elm); break; case HTML_BR: htmlBR(elm); break; + case HTML_BUTTON: htmlBUTTON(elm); break; case HTML_DD: htmlDD(elm); break; case HTML_DEL: renderPseudoElement(":before", elm); break; case HTML_DIV: htmlDIV(elm); break; @@ -1137,6 +1138,7 @@ namespace NLGUI case HTML_BASE: break; case HTML_BODY: renderPseudoElement(":after", elm); break; case HTML_BR: break; + case HTML_BUTTON: htmlBUTTONend(elm); break; case HTML_DD: htmlDDend(elm); break; case HTML_DEL: renderPseudoElement(":after", elm); break; case HTML_DIV: htmlDIVend(elm); break; @@ -2757,6 +2759,9 @@ namespace NLGUI // Translate the tooltip ctrlButton->setDefaultContextHelp(ucstring::makeFromUtf8(getLinkTitle())); ctrlButton->setText(tmpStr); + // empty url / button disabled + bool disabled = string(getLink()).empty(); + ctrlButton->setFrozen(disabled); setTextButtonStyle(ctrlButton, style); } @@ -3341,6 +3346,7 @@ namespace NLGUI { _PostNextTime = true; _PostFormId = formId; + _PostFormAction = _FormSubmit[button].formAction; _PostFormSubmitType = _FormSubmit[button].type; _PostFormSubmitButton = _FormSubmit[button].name; _PostFormSubmitValue = _FormSubmit[button].value; @@ -3525,7 +3531,8 @@ namespace NLGUI // Ref the form CForm &form = _Forms[_PostFormId]; - _URL = form.Action; + // button can override form action url (and methor, but we only do POST) + _URL = _PostFormAction.empty() ? form.Action : _PostFormAction; CUrlParser uri(_URL); _TrustedDomain = isTrustedDomain(uri.host); @@ -5223,6 +5230,55 @@ namespace NLGUI addString(tmp); } + // *************************************************************************** + void CGroupHTML::htmlBUTTON(const CHtmlElement &elm) + { + std::string name = elm.getAttribute("name"); + std::string value = elm.getAttribute("value"); + std::string formId = elm.getAttribute("form"); + std::string formAction = elm.getAttribute("formaction"); + std::string tooltip = elm.getAttribute("tooltip"); + bool disabled = elm.hasAttribute("disabled"); + + if (!formAction.empty()) + { + formAction = getAbsoluteUrl(formAction); + } + + _FormSubmit.push_back(SFormSubmitButton(formId, name, value, "text", formAction)); + // Action handler parameters + std::string param; + if (!disabled) + { + if (elm.getAttribute("type") == "submit") + { + param = "ah:html_submit_form&name=" + getId() + "&button=" + toString(_FormSubmit.size()-1); + } + else + { + param = "ah:"; + } + } + + _A.push_back(true); + _Link.push_back(param); + _LinkTitle.push_back(tooltip); + _LinkClass.push_back("ryzom-ui-button"); + + // TODO: this creates separate button element + //renderPseudoElement(":before", elm); + } + void CGroupHTML::htmlBUTTONend(const CHtmlElement &elm) + { + // TODO: this creates separate button element + //renderPseudoElement(":after", elm); + + popIfNotEmpty(_A); + popIfNotEmpty(_Link); + popIfNotEmpty(_LinkTitle); + popIfNotEmpty(_LinkClass); + } + // *************************************************************************** void CGroupHTML::htmlDD(const CHtmlElement &elm) { @@ -5613,9 +5669,11 @@ namespace NLGUI // Mouse over image string overSrc = elm.getAttribute("data-over-src"); - if (getA() && getParent () && getParent ()->getParent()) + // inside a/button with valid url (ie, button is not disabled) + string url = getLink(); + if (getA() && !url.empty() && getParent() && getParent()->getParent()) { - string params = "name=" + getId() + "|url=" + getLink (); + string params = "name=" + getId() + "|url=" + url; addButton(CCtrlButton::PushButton, id, src, src, overSrc, "browse", params.c_str(), tooltip, _Style.Current); } else From 077f57c4b994f48634c82914cdf67b569f64d50e Mon Sep 17 00:00:00 2001 From: Nimetu Date: Tue, 7 May 2019 19:40:10 +0300 Subject: [PATCH 04/77] Changed: Keep track of all pseudo elements matching html element --HG-- branch : develop --- code/nel/include/nel/gui/html_element.h | 12 ++++++-- code/nel/src/gui/css_style.cpp | 11 ++----- code/nel/src/gui/group_html.cpp | 22 +++++--------- code/nel/src/gui/html_element.cpp | 40 +++++++++++++++++++++++++ 4 files changed, 61 insertions(+), 24 deletions(-) diff --git a/code/nel/include/nel/gui/html_element.h b/code/nel/include/nel/gui/html_element.h index bac681c1c..b7bceb4ab 100644 --- a/code/nel/include/nel/gui/html_element.h +++ b/code/nel/include/nel/gui/html_element.h @@ -47,8 +47,6 @@ namespace NLGUI // defined style and :before/:after pseudo elements TStyle Style; - TStyle StyleBefore; - TStyle StyleAfter; // hierarchy CHtmlElement *parent; @@ -79,6 +77,16 @@ namespace NLGUI // debug std::string toString(bool tree = false, uint depth = 0) const; + + // query, get, set pseudo element style rules + void clearPseudo(); + bool hasPseudo(const std::string &key) const; + TStyle getPseudo(const std::string &key) const; + void setPseudo(const std::string &key, const TStyle &style); + + private: + // pseudo elements like ":before" and ":after" + std::map _Pseudo; }; } diff --git a/code/nel/src/gui/css_style.cpp b/code/nel/src/gui/css_style.cpp index 0147b06f5..95503e77c 100644 --- a/code/nel/src/gui/css_style.cpp +++ b/code/nel/src/gui/css_style.cpp @@ -89,8 +89,7 @@ namespace NLGUI } elm.Style.clear(); - elm.StyleBefore.clear(); - elm.StyleAfter.clear(); + elm.clearPseudo(); if (!mRules.empty()) { @@ -101,13 +100,9 @@ namespace NLGUI { merge(elm.Style, i->Properties); } - else if (i->PseudoElement == ":before") + else { - merge(elm.StyleBefore, i->Properties); - } - else if (i->PseudoElement == ":after") - { - merge(elm.StyleAfter, i->Properties); + elm.setPseudo(i->PseudoElement, i->Properties); } } } diff --git a/code/nel/src/gui/group_html.cpp b/code/nel/src/gui/group_html.cpp index 7f8d29a79..76a7d3c25 100644 --- a/code/nel/src/gui/group_html.cpp +++ b/code/nel/src/gui/group_html.cpp @@ -1193,26 +1193,20 @@ namespace NLGUI // *************************************************************************** void CGroupHTML::renderPseudoElement(const std::string &pseudo, const CHtmlElement &elm) { - if (pseudo == ":before" && !elm.StyleBefore.empty()) - { - _Style.pushStyle(); - _Style.applyStyle(elm.StyleBefore); - } - else if (pseudo == ":after" && !elm.StyleAfter.empty()) - { - _Style.pushStyle(); - _Style.applyStyle(elm.StyleAfter); - } - else - { - // unknown pseudo element + if (pseudo != ":before" && pseudo != ":after") return; - } + + if (!elm.hasPseudo(pseudo)) + return; + + _Style.pushStyle(); + _Style.applyStyle(elm.getPseudo(pseudo)); // TODO: 'content' should already be tokenized in css parser as it has all the functions for that std::string content = trim(_Style.getStyle("content")); if (toLower(content) == "none" || toLower(content) == "normal") { + _Style.popStyle(); return; } diff --git a/code/nel/src/gui/html_element.cpp b/code/nel/src/gui/html_element.cpp index 215c1c9f5..141fa87af 100644 --- a/code/nel/src/gui/html_element.cpp +++ b/code/nel/src/gui/html_element.cpp @@ -82,6 +82,46 @@ namespace NLGUI } } + // *************************************************************************** + void CHtmlElement::clearPseudo() + { + _Pseudo.clear(); + } + + // *************************************************************************** + bool CHtmlElement::hasPseudo(const std::string &key) const + { + return _Pseudo.find(key) != _Pseudo.end(); + } + + // *************************************************************************** + TStyle CHtmlElement::getPseudo(const std::string &key) const + { + std::map::const_iterator it = _Pseudo.find(key); + if (it != _Pseudo.end()) + return it->second; + + return TStyle(); + } + + // *************************************************************************** + void CHtmlElement::setPseudo(const std::string &key, const TStyle &style) + { + std::map::iterator it = _Pseudo.find(key); + if (it != _Pseudo.end()) + { + // insert into previous, override previous values if they exist + for(TStyle::const_iterator itStyle = style.begin(); itStyle != style.end(); ++itStyle) + { + it->second[itStyle->first] = itStyle->second; + } + } + else + { + _Pseudo[key] = style; + } + } + // *************************************************************************** std::string CHtmlElement::toString(bool tree, uint depth) const { From 5ac0279754d6390c09162845644ff4e77371dead Mon Sep 17 00:00:00 2001 From: Nimetu Date: Tue, 7 May 2019 19:40:14 +0300 Subject: [PATCH 05/77] Fixed: Invalid pseudo element selector match --HG-- branch : develop --- code/nel/include/nel/gui/css_selector.h | 5 +++- code/nel/src/gui/css_parser.cpp | 13 ++------- code/nel/src/gui/css_selector.cpp | 38 +++++++++++++++++++++++++ 3 files changed, 44 insertions(+), 12 deletions(-) diff --git a/code/nel/include/nel/gui/css_selector.h b/code/nel/include/nel/gui/css_selector.h index 84b039089..b2b5372e9 100644 --- a/code/nel/include/nel/gui/css_selector.h +++ b/code/nel/include/nel/gui/css_selector.h @@ -84,6 +84,9 @@ namespace NLGUI // NOTE: Does not check combinator bool match(const CHtmlElement &elm) const; + // debug + std::string toString() const; + private: bool matchClass(const CHtmlElement &elm) const; bool matchAttributes(const CHtmlElement &elm) const; @@ -91,7 +94,7 @@ namespace NLGUI // match An+B rule to child index (1 based) bool matchNth(sint childNr, sint a, sint b) const; - + // parse nth-child string to 'a' and 'b' components // :nth-child(odd) // :nth-child(even) diff --git a/code/nel/src/gui/css_parser.cpp b/code/nel/src/gui/css_parser.cpp index 0a4288d12..d34dc8f7a 100644 --- a/code/nel/src/gui/css_parser.cpp +++ b/code/nel/src/gui/css_parser.cpp @@ -631,18 +631,9 @@ namespace NLGUI { result.clear(); } - else if (result.empty() || !current.empty()) + else if (!current.empty()) { - // pseudo element like ':before' can only be set on the last selector - if (!result.empty() && !pseudoElement.empty()) - { - // failed - result.clear(); - } - else - { - result.push_back(current); - } + result.push_back(current); } return result; diff --git a/code/nel/src/gui/css_selector.cpp b/code/nel/src/gui/css_selector.cpp index 0384f561a..46806a2db 100644 --- a/code/nel/src/gui/css_selector.cpp +++ b/code/nel/src/gui/css_selector.cpp @@ -310,5 +310,43 @@ namespace NLGUI } } + std::string CCssSelector::toString() const + { + std::string ret; + ret += Element; + ret += Id; + if (!Class.empty()) + { + for(uint i = 0; i Date: Tue, 7 May 2019 19:40:16 +0300 Subject: [PATCH 06/77] Fixed: Invalid border width initial value --HG-- branch : develop --- code/nel/include/nel/gui/css_style.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/nel/include/nel/gui/css_style.h b/code/nel/include/nel/gui/css_style.h index 74fcf240d..d4f9cd320 100644 --- a/code/nel/include/nel/gui/css_style.h +++ b/code/nel/include/nel/gui/css_style.h @@ -61,7 +61,7 @@ namespace NLGUI Height=-1; MaxWidth=-1; MaxHeight=-1; - BorderWidth=1; + BorderWidth=-1; BackgroundColor=NLMISC::CRGBA::Black; BackgroundColorOver=NLMISC::CRGBA::Black; } @@ -176,7 +176,7 @@ namespace NLGUI Current.Height=-1; Current.MaxWidth=-1; Current.MaxHeight=-1; - Current.BorderWidth=1; + Current.BorderWidth=-1; Current.StyleRules.clear(); } From cb0d6c74f3d019a213b2cd07be79ba44caa28ce7 Mon Sep 17 00:00:00 2001 From: Nimetu Date: Tue, 7 May 2019 20:12:10 +0300 Subject: [PATCH 07/77] Added: html meter element --HG-- branch : develop --- code/nel/include/nel/gui/group_html.h | 37 ++++ code/nel/src/gui/group_html.cpp | 187 +++++++++++++++++- .../gamedev/interfaces_v3/login_widgets.xml | 13 ++ .../data/gamedev/interfaces_v3/widgets.xml | 13 ++ 4 files changed, 246 insertions(+), 4 deletions(-) diff --git a/code/nel/include/nel/gui/group_html.h b/code/nel/include/nel/gui/group_html.h index 576c54ca7..c4c6d6dbd 100644 --- a/code/nel/include/nel/gui/group_html.h +++ b/code/nel/include/nel/gui/group_html.h @@ -408,6 +408,7 @@ namespace NLGUI // True when the element has been encountered bool _ParsingLua; bool _IgnoreText; + bool _IgnoreChildElements; // the script to execute std::string _LuaScript; bool _LuaHrefHack; @@ -466,6 +467,41 @@ namespace NLGUI }; std::vector _UL; + class HTMLMeterElement { + public: + enum EValueRegion { + VALUE_OPTIMUM = 0, + VALUE_SUB_OPTIMAL, + VALUE_EVEN_LESS_GOOD + }; + public: + HTMLMeterElement() + : value(0.f), min(0.f), max(1.f), low(0.f), high(1.f), optimum(0.5f) + {} + + // read attributes from html element + void readValues(const CHtmlElement &elm); + + // return value ratio to min-max + float getValueRatio() const; + + // return optimum region based current value + EValueRegion getValueRegion() const; + + // return meter bar color + NLMISC::CRGBA getBarColor(const CHtmlElement &elm, CCssStyle &style) const; + + // return meter value bar color based value and optimum range + NLMISC::CRGBA getValueColor(const CHtmlElement &elm, CCssStyle &style) const; + + float value; + float min; + float max; + float low; + float high; + float optimum; + }; + // A mode std::vector _A; inline bool getA() const @@ -894,6 +930,7 @@ namespace NLGUI void htmlLUA(const CHtmlElement &elm); void htmlLUAend(const CHtmlElement &elm); void htmlMETA(const CHtmlElement &elm); + void htmlMETER(const CHtmlElement &elm); void htmlOBJECT(const CHtmlElement &elm); void htmlOBJECTend(const CHtmlElement &elm); void htmlOL(const CHtmlElement &elm); diff --git a/code/nel/src/gui/group_html.cpp b/code/nel/src/gui/group_html.cpp index 76a7d3c25..19162eeed 100644 --- a/code/nel/src/gui/group_html.cpp +++ b/code/nel/src/gui/group_html.cpp @@ -1102,6 +1102,7 @@ namespace NLGUI case HTML_LI: htmlLI(elm); break; case HTML_LUA: htmlLUA(elm); break; case HTML_META: htmlMETA(elm); break; + case HTML_METER: htmlMETER(elm); break; case HTML_OBJECT: htmlOBJECT(elm); break; case HTML_OL: htmlOL(elm); break; case HTML_OPTION: htmlOPTION(elm); break; @@ -1162,6 +1163,7 @@ namespace NLGUI case HTML_LI: htmlLIend(elm); break; case HTML_LUA: htmlLUAend(elm); break; case HTML_META: break; + case HTML_METER: break; case HTML_OBJECT: htmlOBJECTend(elm); break; case HTML_OL: htmlOLend(elm); break; case HTML_OPTION: htmlOPTIONend(elm); break; @@ -1337,12 +1339,16 @@ namespace NLGUI beginElement(elm); std::list::iterator it = elm.Children.begin(); - while(it != elm.Children.end()) + if (!_IgnoreChildElements) { - renderDOM(*it); + while(it != elm.Children.end()) + { + renderDOM(*it); - ++it; + ++it; + } } + _IgnoreChildElements = false; endElement(elm); } @@ -1373,6 +1379,7 @@ namespace NLGUI _ParsingLua = false; _LuaHrefHack = false; _IgnoreText = false; + _IgnoreChildElements = false; _BrowseNextTime = false; _PostNextTime = false; _Browsing = false; @@ -4876,7 +4883,12 @@ namespace NLGUI // td { padding: 1px;} - overwrites cellpadding attribute // table { border-spacing: 2px;} - overwrites cellspacing attribute css += "table { border-collapse: separate;}"; - + // webkit pseudo elements + css += "meter::-webkit-meter-bar, meter::-webkit-optimum-value, meter::-webkit-suboptimum-value, meter::-webkit-even-less-good-value { background: none; }"; + css += "meter::-webkit-meter-bar { background-color: rgb(100, 100, 100); width: 5em; height: 1em;}"; + css += "meter::-webkit-meter-optimum-value { background-color: rgb(80, 220, 80); }"; + css += "meter::-webkit-meter-suboptimum-value { background-color: rgb(220, 220, 80); }"; + css += "meter::-webkit-meter-even-less-good-value { background-color: rgb(220, 80, 80); }"; _Style.parseStylesheet(css); } @@ -4981,6 +4993,129 @@ namespace NLGUI return ret; } + void CGroupHTML::HTMLMeterElement::readValues(const CHtmlElement &elm) + { + if (!elm.hasAttribute("value") || !fromString(elm.getAttribute("value"), value)) + value = 0.f; + if (!elm.hasAttribute("min") || !fromString(elm.getAttribute("min"), min)) + min = 0.f; + if (!elm.hasAttribute("max") || !fromString(elm.getAttribute("max"), max)) + max = 1.f; + + // ensure min < max + if (max < min) + std::swap(min, max); + + if (!elm.hasAttribute("low") || !fromString(elm.getAttribute("low"), low)) + low = min; + if (!elm.hasAttribute("high") || !fromString(elm.getAttribute("high"), high)) + high = max; + + if (!elm.hasAttribute("optimum") || !fromString(elm.getAttribute("optimum"), optimum)) + optimum = (max - min) / 2.f; + + // ensure low < high + if (high < low) + std::swap(low, high); + if (low < min) + low = min; + if (high > max) + max = max; + } + + float CGroupHTML::HTMLMeterElement::getValueRatio() const + { + if (max <= min) + return 0.f; + + return (value - min) / (max - min); + } + + CGroupHTML::HTMLMeterElement::EValueRegion CGroupHTML::HTMLMeterElement::getValueRegion() const + { + if (optimum <= low) + { + // low region is optimum + if (value <= low) + return VALUE_OPTIMUM; + else if (value <= high) + return VALUE_SUB_OPTIMAL; + + return VALUE_EVEN_LESS_GOOD; + } + else if (optimum >= high) + { + // high region is optimum + if (value >= high) + return VALUE_OPTIMUM; + else if (value >= low) + return VALUE_SUB_OPTIMAL; + + return VALUE_EVEN_LESS_GOOD; + } + + // middle region is optimum + if (value >= low && value <= high) + return VALUE_OPTIMUM; + + return VALUE_SUB_OPTIMAL; + } + + NLMISC::CRGBA CGroupHTML::HTMLMeterElement::getBarColor(const CHtmlElement &elm, CCssStyle &style) const + { + // color meter (inactive) bar segment + // firefox:: meter { background:none; background-color: #555; }, + // webkit:: meter::-webkit-meter-bar { background:none; background-color: #555; } + // webkit makes background color visible when padding is added + CRGBA color(150, 150, 150, 255); + + // use webkit pseudo elements as thats easier than firefox pseudo classes + // background-color is expected to be set from browser.css + style.pushStyle(); + style.applyStyle(elm.getPseudo(":-webkit-meter-bar")); + if(style.hasStyle("background-color")) + color = style.Current.BackgroundColor; + style.popStyle(); + + return color; + } + + NLMISC::CRGBA CGroupHTML::HTMLMeterElement::getValueColor(const CHtmlElement &elm, CCssStyle &style) const + { + // background-color is expected to be set from browser.css + CRGBA color; + style.pushStyle(); + switch(getValueRegion()) + { + case VALUE_OPTIMUM: + { + style.applyStyle(elm.getPseudo(":-webkit-meter-optimum-value")); + if (style.hasStyle("background-color")) + color = style.Current.BackgroundColor; + break; + } + case VALUE_SUB_OPTIMAL: + { + style.applyStyle(elm.getPseudo(":-webkit-meter-suboptimum-value")); + if (style.hasStyle("background-color")) + color = style.Current.BackgroundColor; + break; + } + case VALUE_EVEN_LESS_GOOD: // fall through + default: + { + style.applyStyle(elm.getPseudo(":-webkit-meter-even-less-good-value")); + if (style.hasStyle("background-color")) + color = style.Current.BackgroundColor; + break; + } + }//switch + style.popStyle(); + + return color; + } + + // **************************************************************************** void CGroupHTML::getCellsParameters(const CHtmlElement &elm, bool inherit) { CGroupHTML::CCellParams cellParams; @@ -5963,6 +6098,50 @@ namespace NLGUI } } + // *************************************************************************** + void CGroupHTML::htmlMETER(const CHtmlElement &elm) + { + HTMLMeterElement meter; + meter.readValues(elm); + + std::string id = "meter"; + if (elm.hasAttribute("id")) + id = elm.getAttribute("id"); + + // width: 5em, height: 1em + uint32 width = _Style.Current.Width > -1 ? _Style.Current.Width : _Style.Current.FontSize * 5; + uint32 height = _Style.Current.Height > -1 ? _Style.Current.Height : _Style.Current.FontSize; + uint32 border = _Style.Current.BorderWidth > -1 ? _Style.Current.BorderWidth : 0; + + uint barw = (uint) (width * meter.getValueRatio()); + CRGBA bgColor = meter.getBarColor(elm, _Style); + CRGBA valueColor = meter.getValueColor(elm, _Style); + + typedef pair TTmplParam; + vector tmplParams; + tmplParams.push_back(TTmplParam("id", id)); + tmplParams.push_back(TTmplParam("active", "true")); + tmplParams.push_back(TTmplParam("w", toString(width))); + tmplParams.push_back(TTmplParam("h", toString(height))); + tmplParams.push_back(TTmplParam("border_x2", toString(border*2))); + tmplParams.push_back(TTmplParam("bgtexture", "blank.tga")); + tmplParams.push_back(TTmplParam("bgcolor", bgColor.toString())); + tmplParams.push_back(TTmplParam("value_w", toString(barw))); + tmplParams.push_back(TTmplParam("value_texture", "blank.tga")); + tmplParams.push_back(TTmplParam("value_color", valueColor.toString())); + + CInterfaceGroup *gr = CWidgetManager::getInstance()->getParser()->createGroupInstance("html_meter", getParagraph()->getId(), &tmplParams[0], (uint)tmplParams.size()); + if (gr) + { + renderPseudoElement(":before", elm); + getParagraph()->addChild(gr); + renderPseudoElement(":after", elm); + + // ignore any inner elements + _IgnoreChildElements = true; + } + } + // *************************************************************************** void CGroupHTML::htmlOBJECT(const CHtmlElement &elm) { diff --git a/code/ryzom/client/data/gamedev/interfaces_v3/login_widgets.xml b/code/ryzom/client/data/gamedev/interfaces_v3/login_widgets.xml index 6d7ac1fa7..c2182fd50 100644 --- a/code/ryzom/client/data/gamedev/interfaces_v3/login_widgets.xml +++ b/code/ryzom/client/data/gamedev/interfaces_v3/login_widgets.xml @@ -1025,4 +1025,17 @@ force_inside_screen="false"> + + diff --git a/code/ryzom/client/data/gamedev/interfaces_v3/widgets.xml b/code/ryzom/client/data/gamedev/interfaces_v3/widgets.xml index 10c36d6a4..16150c418 100644 --- a/code/ryzom/client/data/gamedev/interfaces_v3/widgets.xml +++ b/code/ryzom/client/data/gamedev/interfaces_v3/widgets.xml @@ -7252,4 +7252,17 @@ force_inside_screen="false"> + + From f5424aac3ea5def86633e41179c9a614195eb391 Mon Sep 17 00:00:00 2001 From: Nimetu Date: Tue, 7 May 2019 20:13:05 +0300 Subject: [PATCH 08/77] Added: html progress element --HG-- branch : develop --- code/nel/include/nel/gui/group_html.h | 24 +++++ code/nel/src/gui/group_html.cpp | 97 +++++++++++++++++++ .../gamedev/interfaces_v3/login_widgets.xml | 13 +++ .../data/gamedev/interfaces_v3/widgets.xml | 13 +++ 4 files changed, 147 insertions(+) diff --git a/code/nel/include/nel/gui/group_html.h b/code/nel/include/nel/gui/group_html.h index c4c6d6dbd..7d02fe3d4 100644 --- a/code/nel/include/nel/gui/group_html.h +++ b/code/nel/include/nel/gui/group_html.h @@ -502,6 +502,29 @@ namespace NLGUI float optimum; }; + class HTMLProgressElement + { + public: + HTMLProgressElement() + : value(0.f), max(1.f) + {} + + // read attributes from html element + void readValues(const CHtmlElement &elm); + + // return value ratio to min-max + float getValueRatio() const; + + // return meter bar color + NLMISC::CRGBA getBarColor(const CHtmlElement &elm, CCssStyle &style) const; + + // return meter value bar color based value and optimum range + NLMISC::CRGBA getValueColor(const CHtmlElement &elm, CCssStyle &style) const; + + float value; + float max; + }; + // A mode std::vector _A; inline bool getA() const @@ -941,6 +964,7 @@ namespace NLGUI void htmlPend(const CHtmlElement &elm); void htmlPRE(const CHtmlElement &elm); void htmlPREend(const CHtmlElement &elm); + void htmlPROGRESS(const CHtmlElement &elm); void htmlSCRIPT(const CHtmlElement &elm); void htmlSCRIPTend(const CHtmlElement &elm); void htmlSELECT(const CHtmlElement &elm); diff --git a/code/nel/src/gui/group_html.cpp b/code/nel/src/gui/group_html.cpp index 19162eeed..a4290efd1 100644 --- a/code/nel/src/gui/group_html.cpp +++ b/code/nel/src/gui/group_html.cpp @@ -1108,6 +1108,7 @@ namespace NLGUI case HTML_OPTION: htmlOPTION(elm); break; case HTML_P: htmlP(elm); break; case HTML_PRE: htmlPRE(elm); break; + case HTML_PROGRESS: htmlPROGRESS(elm); break; case HTML_SCRIPT: htmlSCRIPT(elm); break; case HTML_SELECT: htmlSELECT(elm); break; case HTML_SMALL: renderPseudoElement(":before", elm); break; @@ -4889,6 +4890,10 @@ namespace NLGUI css += "meter::-webkit-meter-optimum-value { background-color: rgb(80, 220, 80); }"; css += "meter::-webkit-meter-suboptimum-value { background-color: rgb(220, 220, 80); }"; css += "meter::-webkit-meter-even-less-good-value { background-color: rgb(220, 80, 80); }"; + // webkit pseudo elements + css += "progress::-webkit-progress-bar, progress::-webkit-progress-value { background: none; }"; + css += "progress::-webkit-progress-bar { background-color: rgb(230, 230, 230); width: 10em; height: 1em; }"; + css += "progress::-webkit-progress-value { background-color: rgb(0, 100, 180);}"; _Style.parseStylesheet(css); } @@ -5115,6 +5120,54 @@ namespace NLGUI return color; } + // **************************************************************************** + void CGroupHTML::HTMLProgressElement::readValues(const CHtmlElement &elm) + { + if (!elm.hasAttribute("value") || !fromString(elm.getAttribute("value"), value)) + value = 0.f; + if (!elm.hasAttribute("max") || !fromString(elm.getAttribute("max"), max)) + max = 1.f; + + if (value > max) + value = max; + } + + // **************************************************************************** + float CGroupHTML::HTMLProgressElement::getValueRatio() const + { + if (max > 0.f) + return value / max; + return 0.f; + } + + // **************************************************************************** + NLMISC::CRGBA CGroupHTML::HTMLProgressElement::getBarColor(const CHtmlElement &elm, CCssStyle &style) const + { + CRGBA color; + + style.pushStyle(); + style.applyStyle(elm.getPseudo(":-webkit-progress-bar")); + if (style.hasStyle("background-color")) + color = style.Current.BackgroundColor; + style.popStyle(); + + return color; + } + + // **************************************************************************** + NLMISC::CRGBA CGroupHTML::HTMLProgressElement::getValueColor(const CHtmlElement &elm, CCssStyle &style) const + { + CRGBA color; + + style.pushStyle(); + style.applyStyle(elm.getPseudo(":-webkit-progress-value")); + if (style.hasStyle("background-color")) + color = style.Current.BackgroundColor; + style.popStyle(); + + return color; + } + // **************************************************************************** void CGroupHTML::getCellsParameters(const CHtmlElement &elm, bool inherit) { @@ -6316,6 +6369,50 @@ namespace NLGUI popIfNotEmpty(_PRE); } + // *************************************************************************** + void CGroupHTML::htmlPROGRESS(const CHtmlElement &elm) + { + HTMLProgressElement progress; + progress.readValues(elm); + + std::string id = "progress"; + if (elm.hasAttribute("id")) + id = elm.getAttribute("id"); + + // width: 10em, height: 1em + uint32 width = _Style.Current.Width > -1 ? _Style.Current.Width : _Style.Current.FontSize * 10; + uint32 height = _Style.Current.Height > -1 ? _Style.Current.Height : _Style.Current.FontSize; + uint32 border = _Style.Current.BorderWidth > -1 ? _Style.Current.BorderWidth : 0; + + uint barw = (uint) (width * progress.getValueRatio()); + CRGBA bgColor = progress.getBarColor(elm, _Style); + CRGBA valueColor = progress.getValueColor(elm, _Style); + + typedef pair TTmplParam; + vector tmplParams; + tmplParams.push_back(TTmplParam("id", id)); + tmplParams.push_back(TTmplParam("active", "true")); + tmplParams.push_back(TTmplParam("w", toString(width))); + tmplParams.push_back(TTmplParam("h", toString(height))); + tmplParams.push_back(TTmplParam("border_x2", toString(border*2))); + tmplParams.push_back(TTmplParam("bgtexture", "blank.tga")); + tmplParams.push_back(TTmplParam("bgcolor", bgColor.toString())); + tmplParams.push_back(TTmplParam("value_w", toString(barw))); + tmplParams.push_back(TTmplParam("value_texture", "blank.tga")); + tmplParams.push_back(TTmplParam("value_color", valueColor.toString())); + + CInterfaceGroup *gr = CWidgetManager::getInstance()->getParser()->createGroupInstance("html_progress", getParagraph()->getId(), &tmplParams[0], (uint)tmplParams.size()); + if (gr) + { + renderPseudoElement(":before", elm); + getParagraph()->addChild(gr); + renderPseudoElement(":after", elm); + + // ignore any inner elements + _IgnoreChildElements = true; + } + } + // *************************************************************************** void CGroupHTML::htmlSCRIPT(const CHtmlElement &elm) { diff --git a/code/ryzom/client/data/gamedev/interfaces_v3/login_widgets.xml b/code/ryzom/client/data/gamedev/interfaces_v3/login_widgets.xml index c2182fd50..eecc764ae 100644 --- a/code/ryzom/client/data/gamedev/interfaces_v3/login_widgets.xml +++ b/code/ryzom/client/data/gamedev/interfaces_v3/login_widgets.xml @@ -1038,4 +1038,17 @@ + + diff --git a/code/ryzom/client/data/gamedev/interfaces_v3/widgets.xml b/code/ryzom/client/data/gamedev/interfaces_v3/widgets.xml index 16150c418..c9157ffe9 100644 --- a/code/ryzom/client/data/gamedev/interfaces_v3/widgets.xml +++ b/code/ryzom/client/data/gamedev/interfaces_v3/widgets.xml @@ -7265,4 +7265,17 @@ + + From 4baccf2802cc45325221ddc268f42e7c4e1f9ea9 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Thu, 9 May 2019 04:38:48 +0800 Subject: [PATCH 09/77] Don't use MB_PRECOMPOSED --- code/nel/src/misc/string_common.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/nel/src/misc/string_common.cpp b/code/nel/src/misc/string_common.cpp index ba911c1bc..6833ababd 100644 --- a/code/nel/src/misc/string_common.cpp +++ b/code/nel/src/misc/string_common.cpp @@ -144,7 +144,7 @@ std::string winCpToCp(const char *str, size_t len, UINT srcCp, UINT dstCp) wchar_t *tmp = (wchar_t *)_malloca((len + 1) * 4); if (!tmp) return std::string(); - int tmpLen = MultiByteToWideChar(srcCp, MB_PRECOMPOSED, + int tmpLen = MultiByteToWideChar(srcCp, 0, str, (int)(len + 1), /* include null-termination */ tmp, (int)((len + 1) * 4)); if (tmpLen <= 1) From b7aa2a6999e5169146bda32815f0a8e4449b7a3a Mon Sep 17 00:00:00 2001 From: kaetemi Date: Thu, 9 May 2019 04:45:48 +0800 Subject: [PATCH 10/77] Don't use MB_PRECOMPOSED --- code/nel/src/misc/string_common.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/nel/src/misc/string_common.cpp b/code/nel/src/misc/string_common.cpp index 6833ababd..ee89fa981 100644 --- a/code/nel/src/misc/string_common.cpp +++ b/code/nel/src/misc/string_common.cpp @@ -170,7 +170,7 @@ std::wstring winCpToWide(const char *str, size_t len, UINT cp) wchar_t *tmp = (wchar_t *)_malloca((len + 1) * 4); if (!tmp) return std::wstring(); - int tmpLen = MultiByteToWideChar(cp, MB_PRECOMPOSED, + int tmpLen = MultiByteToWideChar(cp, 0, str, (int)(len + 1), /* include null-termination */ tmp, (int)((len + 1) * 4)); if (tmpLen <= 1) From d7ebc49d19ce20a22c7566cc52b324b68fb71d0e Mon Sep 17 00:00:00 2001 From: kaetemi Date: Thu, 9 May 2019 05:01:40 +0800 Subject: [PATCH 11/77] Fixed: Pass correct length --- code/nel/src/misc/string_common.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/nel/src/misc/string_common.cpp b/code/nel/src/misc/string_common.cpp index ee89fa981..8f032c7c5 100644 --- a/code/nel/src/misc/string_common.cpp +++ b/code/nel/src/misc/string_common.cpp @@ -146,7 +146,7 @@ std::string winCpToCp(const char *str, size_t len, UINT srcCp, UINT dstCp) return std::string(); int tmpLen = MultiByteToWideChar(srcCp, 0, str, (int)(len + 1), /* include null-termination */ - tmp, (int)((len + 1) * 4)); + tmp, (int)((len + 1) * 2)); if (tmpLen <= 1) { _freea(tmp); @@ -172,7 +172,7 @@ std::wstring winCpToWide(const char *str, size_t len, UINT cp) return std::wstring(); int tmpLen = MultiByteToWideChar(cp, 0, str, (int)(len + 1), /* include null-termination */ - tmp, (int)((len + 1) * 4)); + tmp, (int)((len + 1) * 2)); if (tmpLen <= 1) { _freea(tmp); From a7504e657ea68742bfd20ca13de8d07730b678f0 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Thu, 9 May 2019 06:57:04 +0800 Subject: [PATCH 12/77] Removed: Deprecated bot chat news manager --- code/ryzom/client/src/net_manager.cpp | 1 - code/ryzom/common/src/game_share/news_types.h | 36 - .../server/src/ai_service/aids_interface.h | 1 - .../src/ai_service/bot_chat_interface.cpp | 1160 ----------------- .../src/ai_service/bot_chat_interface.h | 58 - .../input_output_service.cpp | 2 - .../src/input_output_service/news_manager.cpp | 83 -- .../src/input_output_service/news_manager.h | 60 - .../server/src/input_output_service/stdpch.h | 1 - 9 files changed, 1402 deletions(-) delete mode 100644 code/ryzom/common/src/game_share/news_types.h delete mode 100644 code/ryzom/server/src/ai_service/bot_chat_interface.cpp delete mode 100644 code/ryzom/server/src/ai_service/bot_chat_interface.h delete mode 100644 code/ryzom/server/src/input_output_service/news_manager.cpp delete mode 100644 code/ryzom/server/src/input_output_service/news_manager.h diff --git a/code/ryzom/client/src/net_manager.cpp b/code/ryzom/client/src/net_manager.cpp index 2d5a4e2be..d8ccbc263 100644 --- a/code/ryzom/client/src/net_manager.cpp +++ b/code/ryzom/client/src/net_manager.cpp @@ -25,7 +25,6 @@ #include "game_share/generic_xml_msg_mngr.h" #include "game_share/msg_client_server.h" #include "game_share/bot_chat_types.h" -#include "game_share/news_types.h" #include "game_share/mode_and_behaviour.h" #include "game_share/chat_group.h" #include "game_share/character_summary.h" diff --git a/code/ryzom/common/src/game_share/news_types.h b/code/ryzom/common/src/game_share/news_types.h deleted file mode 100644 index e9427766a..000000000 --- a/code/ryzom/common/src/game_share/news_types.h +++ /dev/null @@ -1,36 +0,0 @@ -// Ryzom - MMORPG Framework -// Copyright (C) 2010 Winch Gate Property Limited -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU Affero General Public License as -// published by the Free Software Foundation, either version 3 of the -// License, or (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public License -// along with this program. If not, see . - - - -#ifndef RY_NEWS_TYPES_H -#define RY_NEWS_TYPES_H - -namespace NEWSTYPE -{ - enum TNewsType - { - Unknown, - General, - FyrosWorker, - FyrosTrainer, - FyrosGeneral, - }; -}; - -#endif // RY_NEWS_TYPES_H - -/* End of news_types.h */ diff --git a/code/ryzom/server/src/ai_service/aids_interface.h b/code/ryzom/server/src/ai_service/aids_interface.h index 21b8c76bd..3e9d9898f 100644 --- a/code/ryzom/server/src/ai_service/aids_interface.h +++ b/code/ryzom/server/src/ai_service/aids_interface.h @@ -23,7 +23,6 @@ // Nel Misc #include "nel/misc/types_nl.h" #include "nel/misc/entity_id.h" -#include "game_share/news_types.h" #include "game_share/bot_chat_types.h" // the class diff --git a/code/ryzom/server/src/ai_service/bot_chat_interface.cpp b/code/ryzom/server/src/ai_service/bot_chat_interface.cpp deleted file mode 100644 index 36dc9aa42..000000000 --- a/code/ryzom/server/src/ai_service/bot_chat_interface.cpp +++ /dev/null @@ -1,1160 +0,0 @@ -// Ryzom - MMORPG Framework -// Copyright (C) 2010 Winch Gate Property Limited -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU Affero General Public License as -// published by the Free Software Foundation, either version 3 of the -// License, or (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public License -// along with this program. If not, see . - - - -#include "stdpch.h" -#if 0 -#error "Deprecated" -//#include "bot_chat_interface.h" -#include "game_share/synchronised_message.h" -#include "game_share/bot_chat_types.h" - -/* -// Nel Misc -#include "nel/net/unified_network.h" - -// Game share -#include "game_share/news_types.h" -#include "game_share/bot_chat_types.h" - -// Local includes -#include "bot_chat_interface.h" -*/ - -using namespace NLMISC; -using namespace NLNET; -using namespace std; - -////////////////////////////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////////// - -////////////////////////////////////////////////////////////////////////////// -// the parent class for bot chat page type classes - -class CBotChatPageType -{ -public: - // virtual interface ---------------------------------------------------- - virtual bool open(const CEntityId &player, const CEntityId &bot)=0; - virtual bool close(const CEntityId &player, const CEntityId &bot)=0; -}; - - -////////////////////////////////////////////////////////////////////////////// -// the structure for bot chat pages - -struct SBotChatPage -{ - // ctor ----------------------------------------------------------------- - SBotChatPage( - BOTCHATTYPE::TBotChatInterfaceId clientInterfaceId, - CBotChatPageType * chatPageType, - uint numOptions - ) - { - ClientInterfaceId= clientInterfaceId; - PageType= chatPageType; - NumOptions= numOptions; - } - - // data ----------------------------------------------------------------- - BOTCHATTYPE::TBotChatInterfaceId ClientInterfaceId; // id of interface to display on client - CBotChatPageType * PageType; // type of chat page - uint NumOptions; // number of options for player to click on -}; - - -////////////////////////////////////////////////////////////////////////////// -// the structure for a state for bot chat automatons - -struct SBotChatAutomatonState -{ - // public data ---------------------------------------------------------- - SBotChatPage *Page; - uint On[5]; // value to return on player click of slot 0..4 - - // ctor ----------------------------------------------------------------- - SBotChatAutomatonState(SBotChatPage *page,uint on0=std::numeric_limits::max(),uint on1=std::numeric_limits::max(),uint on2=std::numeric_limits::max(),uint on3=std::numeric_limits::max(),uint on4=std::numeric_limits::max()) - { - Page=page; - On[0]=on0; - On[1]=on1; - On[2]=on2; - On[3]=on3; - On[4]=on4; - - // make sure the number of arguments supplied corresponds to the - // number of options prresent on the user interfac page - nlassert(page->NumOptions>=0 && page->NumOptions<=4); - nlassert(page->NumOptions==0 || On[page->NumOptions-1]!=std::numeric_limits::max()); - nlassert(page->NumOptions==4 || On[page->NumOptions]==std::numeric_limits::max()); - } -}; - - -////////////////////////////////////////////////////////////////////////////// -// the structure for a bot chat automatons & a singleton for indexing -// automatons by name - -struct SBotChatAutomaton -{ - // public data ---------------------------------------------------------- - string Name; - SBotChatAutomatonState *States; - uint Size; - - // ctor ----------------------------------------------------------------- - SBotChatAutomaton(string name, SBotChatAutomatonState *states,uint size) - { - Name=name; - States=states; - Size=size; - - if (NameMap.find(name)!=NameMap.end()) - { - nlwarning("SBotChatAutomaton::SBotChatAutomaton(): More than one instance with name: %s",name.c_str()); - return; - } - NameMap[name]=this; - } - - // dtor ----------------------------------------------------------------- - ~SBotChatAutomaton() - { - map ::iterator it=NameMap.find(Name); - if (it!=NameMap.end() && (*it).second==this) - NameMap.erase(it); - // don't try to display a warning in a dtor as the warning system is - // probably already down - } - - - // singleton methods ---------------------------------------------------- - static SBotChatAutomaton *getAutomatonByName(string name) - { - map ::iterator it=NameMap.find(name); - if (it==NameMap.end()) - return NULL; - return (*it).second; - } - - // singleton data ------------------------------------------------------- - static map NameMap; -}; -map SBotChatAutomaton::NameMap; - - -////////////////////////////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////////// -// Implementation of different code modules for handling different bot -// chat page types - -////////////////////////////////////////////////////////////////////////////// -// this is a dummy page used to terminate chats - -class CBotChatPageTypeDone: public CBotChatPageType -{ -public: - virtual bool open(const CEntityId &player, const CEntityId &bot) - { - return false; // stop the bot chat! - } - - virtual bool close(const CEntityId &player, const CEntityId &bot) - { - return false; - } -} -BotChatPageTypeDone; - - -////////////////////////////////////////////////////////////////////////////// -// definition for a chat page that contains static text and buttons for -// player to click on/ select - -class CBotChatPageTypeTextOnly: public CBotChatPageType -{ -public: - virtual bool open(const CEntityId &player, const CEntityId &bot) - { - return true; - } - - virtual bool close(const CEntityId &player, const CEntityId &bot) - { - return true; - } -} -BotChatPageTypeTextOnly; - - -////////////////////////////////////////////////////////////////////////////// -// definition for a chat page that displays NEWS as well as other text - -class CBotChatPageTypeNews: public CBotChatPageType -{ -public: - virtual bool open(const CEntityId &player, const CEntityId &bot) - { - return true; - } - - virtual bool close(const CEntityId &player, const CEntityId &bot) - { - return true; - } -} -BotChatPageTypeNews; - - -////////////////////////////////////////////////////////////////////////////// -// definition for a chat page that displays a SHOP interface - -class CBotChatPageTypeShop: public CBotChatPageType -{ -public: - virtual bool open(const CEntityId &player, const CEntityId &bot) - { - nlinfo ("player %s entered trade page", player.toString().c_str()); - CMessage msgout( "TRADE_BEGIN" ); - msgout.serial( const_cast(player) ); - msgout.serial( const_cast(bot) ); - sendMessageViaMirror( "WOS", msgout ); - return true; - } - - virtual bool close(const CEntityId &player, const CEntityId &bot) - { - nlinfo ("end of trade with player %s", player.toString().c_str()); - CMessage msgout( "TRADE_END" ); - msgout.serial( const_cast(player) ); - msgout.serial( const_cast(bot) ); - sendMessageViaMirror( "WOS", msgout ); - sendMessageViaMirror( "EGS", msgout ); - return true; - } -} -BotChatPageTypeShop; - - -////////////////////////////////////////////////////////////////////////////// -// definition for a chat page that displays a MISSION SHOP interface - -class CBotChatPageTypeMissionShop: public CBotChatPageType -{ -public: - virtual bool open(const CEntityId &player, const CEntityId &bot) - { - nlinfo ("player %s entered mission page", player.toString().c_str()); - CMessage msgout( "MISSION_LIST_BEGIN" ); - msgout.serial( const_cast(player) ); - msgout.serial( const_cast(bot) ); - sendMessageViaMirror( "WOS", msgout ); - return true; - } - - virtual bool close(const CEntityId &player, const CEntityId &bot) - { - nlinfo ("end of mission page with player %s", player.toString().c_str()); - CMessage msgout( "MISSION_LIST_END" ); - msgout.serial( const_cast(player) ); - msgout.serial( const_cast(bot) ); - sendMessageViaMirror( "EGS", msgout ); - return true; - } -} -BotChatPageTypeMissionShop; - - - -////////////////////////////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////////// -// Definitions of bot chat pages and automatons - -// define the usable bot chat pages ------------------------------------------ -SBotChatPage BotChatPageIntro (BOTCHATTYPE::Intro, &BotChatPageTypeTextOnly, 4); -SBotChatPage BotChatPageFriendly (BOTCHATTYPE::FriendlyMainPage, &BotChatPageTypeNews, 4); -SBotChatPage BotChatPageNeutral (BOTCHATTYPE::NeutralMainPage, &BotChatPageTypeNews, 3); -SBotChatPage BotChatPageHostile (BOTCHATTYPE::NastyMainPage, &BotChatPageTypeTextOnly, 1); -SBotChatPage BotChatPageMoreNews (BOTCHATTYPE::MoreNewsPage, &BotChatPageTypeNews, 2); -SBotChatPage BotChatPageShop (BOTCHATTYPE::BuySellPage, &BotChatPageTypeShop, 2); -SBotChatPage BotChatPageMissionShop (BOTCHATTYPE::MissionsPage, &BotChatPageTypeMissionShop, 2); -SBotChatPage BotChatPageDone (BOTCHATTYPE::Done, &BotChatPageTypeDone, 0); - -// the default automaton ----------------------------------------------------- -SBotChatAutomatonState BotChatStatesDefault[]= -{ - SBotChatAutomatonState(&BotChatPageIntro,2,3,4,1), // 0 - friendly/ neutral/ hostile/ done - SBotChatAutomatonState(&BotChatPageDone), // 1 - SBotChatAutomatonState(&BotChatPageFriendly,5,6,7,1), // 2 - more news/ buy sell/ mission/ done - SBotChatAutomatonState(&BotChatPageNeutral,6,7,1), // 3 - buy sell/ mission/ done - SBotChatAutomatonState(&BotChatPageHostile,1), // 4 - done - SBotChatAutomatonState(&BotChatPageMoreNews,2,1), // 5 - friendly/ done - SBotChatAutomatonState(&BotChatPageShop,3,1), // 6 - neutral/ done - SBotChatAutomatonState(&BotChatPageMissionShop,3,1), // 7 - neutral/ done -}; -SBotChatAutomaton BotChatDefault("default",BotChatStatesDefault,sizeof(BotChatStatesDefault)/sizeof(BotChatStatesDefault[0])); - -// the automaton for merchants ----------------------------------------------- -SBotChatAutomatonState BotChatStatesMerchant[]= -{ - SBotChatAutomatonState(&BotChatPageMoreNews,2,1), // 0 - shop/ done - SBotChatAutomatonState(&BotChatPageDone), // 1 - SBotChatAutomatonState(&BotChatPageShop,0,1), // 2 - news/ done -}; -SBotChatAutomaton BotChatMerchant("merchant",BotChatStatesMerchant,sizeof(BotChatStatesMerchant)/sizeof(BotChatStatesMerchant[0])); - -// the automaton for walkers and talkers ------------------------------------- -SBotChatAutomatonState BotChatStatesWalkerTalker[]= -{ - SBotChatAutomatonState(&BotChatPageHostile,1), // 0 - SBotChatAutomatonState(&BotChatPageDone) // 1 -}; -SBotChatAutomaton BotChatWalkerTalker("walker talker",BotChatStatesWalkerTalker,sizeof(BotChatStatesMerchant)/sizeof(BotChatStatesMerchant[0])); - - -////////////////////////////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////////// -// Represetnation of a conversation between a player and a bot -// includes conversation automaton state data - -struct CBotChat -{ - CBotChat () : Player(CEntityId::Unknown), Bot(CEntityId::Unknown) { } - CBotChat (CEntityId player, CEntityId bot, SBotChatAutomaton *automaton) - { - Player=player; - Bot=bot; - setAutomaton(automaton); - } - - void setState(uint32 state) - { - if (state>=Automaton->Size && state!=std::numeric_limits::max()) - { - nlwarning("CBotChatEntry()::setState: Invalid state: %d",state); - return; - } - - // if there is already a page open close it - if (CurrentStateSize) - Automaton->States[CurrentState].Page->PageType->close(Player,Bot); - - // open the new page - CurrentState=state; - if (state==std::numeric_limits::max()) - Done=true; - else - Done=!Automaton->States[CurrentState].Page->PageType->open(Player,Bot); - - // transmit the new page id to the client - uint32 happyness=10; - BOTCHATTYPE::TBotChatInterfaceId interfaceId=Done?BOTCHATTYPE::Done:Automaton->States[CurrentState].Page->ClientInterfaceId; - NEWSTYPE::TNewsType newsType=NEWSTYPE::Unknown; - - CMessage msgout("BOT_CHAT_SELECT_INTERFACE"); - msgout.serial (Player); - msgout.serial (happyness); - msgout.serialEnum (interfaceId); - msgout.serialEnum (newsType); - sendMessageViaMirror("IOS", msgout); - } - - void setAutomaton(SBotChatAutomaton *automaton) - { - Automaton=automaton; - CurrentState=std::numeric_limits::max(); // set this to a ~0 so that setState doesn't try to clse existing page - setState(0); - } - - void selectEntry (sint8 userInput) - { - // select the new page - if ((unsigned)userInput >= Automaton->States[CurrentState].Page->NumOptions) - { - nlwarning ("CBotChatEntry::selectEntry: For player %s: input out of bounds: %d", Player.toString().c_str(), userInput); - return; - } - - // advance through the state table - setState(Automaton->States[CurrentState].On[userInput]); - } - - void endChat () - { - setState(std::numeric_limits::max()); - } - - CEntityId Player; - CEntityId Bot; - SBotChatAutomaton *Automaton; - uint32 CurrentState; - bool Done; -}; - - -////////////////////////////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////////// -// Singleton manager class central to the bot chat system - -class CBotChatManager -{ -public: - - static void newChat(CEntityId player, CEntityId bot) - { - // make sure the player isn't already chatting - map::iterator it = BotChatMap.find (player); - if (it != BotChatMap.end()) - return; - - // a bit of logging - nlinfo ("new chat between player %s and bot %s", player.toString().c_str(), bot.toString().c_str()); - - // call the CbBegin() callback to get the name of the automaton to use - string automatonName; - if (CbBegin!=NULL) - automatonName=CbBegin(player,bot); - else - automatonName="default"; - SBotChatAutomaton *automaton=SBotChatAutomaton::getAutomatonByName(automatonName); - if (automaton==NULL) - { - nlwarning("- ignoring bot chat request as automaton '%s' not found",automatonName.c_str()); - return; - } - - // setup the new chat - BotChatMap[player] = CBotChat(player, bot, automaton); - } - - static void endChat(CEntityId player) - { - CEntityId bot; // for use in callback ... at end of routine - - map::iterator it = BotChatMap.find (player); - if (it != BotChatMap.end()) - { - bot=(*it).second.Bot; - - nlinfo ("end of bot chat between player %s and bot %s", player.toString().c_str(),bot.toString().c_str()); - - // if the chat is still active then stop it - if ((*it).second.Done) - (*it).second.endChat(); - - // remove the map entry - BotChatMap.erase (it); - - // **** this code may be dodgy 'cos its in a dtor - // **** if it is dodgy then we need to migrate from an STL map - // **** to some kind of custom structure that we can guarantee OK - } - - if (CbEnd!=NULL) - CbEnd(player,bot); - } - - static void treatInput(CEntityId player, sint8 userInput) - { - // locate the bot chat for the given player - map::iterator it = BotChatMap.find (player); - if (it == BotChatMap.end()) - { - nlwarning ("No bot chat with the player %s", player.toString().c_str()); - return; - } - - // pass the player input to the bot chat handler - (*it).second.selectEntry(userInput); - - // check whether the bot chat is finished - if ((*it).second.Done) - endChat(player); - } - - - // static data for the singleton ----------------------------------------- - static CBotChatInterface::TCallbackBegin CbBegin; - static CBotChatInterface::TCallbackEnd CbEnd; - static map BotChatMap; -}; -CBotChatInterface::TCallbackBegin CBotChatManager::CbBegin; -CBotChatInterface::TCallbackEnd CBotChatManager::CbEnd; -map CBotChatManager::BotChatMap; - - -////////////////////////////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////////// -// message callbacks and callback table - -static void cbBotChatStart (CMessage& msgin, const string &serviceName, uint16 serviceId ) -{ - CEntityId player, bot; - - msgin.serial( player ); - msgin.serial( bot ); - - CBotChatManager::newChat (player, bot); -} - -static void cbBotChatSelectAnswer (CMessage& msgin, const string &serviceName, uint16 serviceId ) -{ - CEntityId player, bot; - sint8 answer; - - msgin.serial( player ); - msgin.serial( answer ); - - CBotChatManager::treatInput (player, answer); -} - - -static TUnifiedCallbackItem CbArray[]= -{ - { "BOT_CHAT_START", cbBotChatStart }, - { "BOT_CHAT_SELECT_ANSWER", cbBotChatSelectAnswer }, -}; - - -////////////////////////////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////////// -// Interface class providing API for bot chat system - -void CBotChatInterface::init(CBotChatInterface::TCallbackBegin cbBegin,CBotChatInterface::TCallbackEnd cbEnd) -{ - CBotChatManager::CbBegin=cbBegin; - CBotChatManager::CbEnd=cbEnd; - CUnifiedNetwork::getInstance()->addCallbackArray(CbArray, sizeof (CbArray) / sizeof (CbArray[0])); -} - -void CBotChatInterface::release() -{ -} - -void CBotChatInterface::getBotChatPartners(CEntityId bot,vector &result) -{ - map::iterator it; - for (it=CBotChatManager::BotChatMap.begin();it!=CBotChatManager::BotChatMap.end();++it) - if ((*it).second.Bot==bot) - result.push_back((*it).first); -} - -void CBotChatInterface::endChatForPlayer(CEntityId player) -{ - CBotChatManager::endChat(player); -} - -void CBotChatInterface::endAllChatForBot(CEntityId bot) -{ - map::iterator it=CBotChatManager::BotChatMap.begin(); - while (it!=CBotChatManager::BotChatMap.end()) - { - map::iterator next=it; - if ((*it).second.Bot==bot) - CBotChatManager::endChat((*it).first); - it=next; - } -} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -////////////////////// -/// The following is probably out of date but I'm copying it here just in case... - - - -#if 0 - - - - -////////////////////////////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////////// - -////////////////////////////////////////////////////////////////////////////// -// the parent class for bot chat page type classes - -class CBotChatPageType -{ -public: - // virtual interface ---------------------------------------------------- - virtual bool open(const CEntityId &player, const CEntityId &bot)=0; - virtual bool close(const CEntityId &player, const CEntityId &bot)=0; -}; - - -////////////////////////////////////////////////////////////////////////////// -// the structure for bot chat pages - -struct SBotChatPage -{ - // ctor ----------------------------------------------------------------- - SBotChatPage( - BOTCHATTYPE::TBotChatInterfaceId clientInterfaceId, - CBotChatPageType * chatPageType, - uint numOptions - ) - { - ClientInterfaceId= clientInterfaceId; - PageType= chatPageType; - NumOptions= numOptions; - } - - // data ----------------------------------------------------------------- - BOTCHATTYPE::TBotChatInterfaceId ClientInterfaceId; // id of interface to display on client - CBotChatPageType * PageType; // type of chat page - uint NumOptions; // number of options for player to click on -}; - - -////////////////////////////////////////////////////////////////////////////// -// the structure for a state for bot chat automatons - -struct SBotChatAutomatonState -{ - // public data ---------------------------------------------------------- - SBotChatPage *Page; - uint On[5]; // value to return on player click of slot 0..4 - - // ctor ----------------------------------------------------------------- - SBotChatAutomatonState(SBotChatPage *page,uint on0=std::numeric_limits::max(),uint on1=std::numeric_limits::max(),uint on2=std::numeric_limits::max(),uint on3=std::numeric_limits::max(),uint on4=std::numeric_limits::max()) - { - Page=page; - On[0]=on0; - On[1]=on1; - On[2]=on2; - On[3]=on3; - On[4]=on4; - - // make sure the number of arguments supplied corresponds to the - // number of options prresent on the user interfac page - nlassert(page->NumOptions>=0 && page->NumOptions<=4); - nlassert(page->NumOptions==0 || On[page->NumOptions-1]!=std::numeric_limits::max()); - nlassert(page->NumOptions==4 || On[page->NumOptions]==std::numeric_limits::max()); - } -}; - - -////////////////////////////////////////////////////////////////////////////// -// the structure for a bot chat automatons & a singleton for indexing -// automatons by name - -struct SBotChatAutomaton -{ - // public data ---------------------------------------------------------- - string Name; - SBotChatAutomatonState *States; - uint Size; - - // ctor ----------------------------------------------------------------- - SBotChatAutomaton(string name, SBotChatAutomatonState *states,uint size) - { - Name=name; - States=states; - Size=size; - - if (NameMap.find(name)!=NameMap.end()) - { - nlwarning("SBotChatAutomaton::SBotChatAutomaton(): More than one instance with name: %s",name.c_str()); - return; - } - NameMap[name]=this; - } - - // dtor ----------------------------------------------------------------- - ~SBotChatAutomaton() - { - map ::iterator it=NameMap.find(Name); - if (it!=NameMap.end() && (*it).second==this) - NameMap.erase(it); - // don't try to display a warning in a dtor as the warning system is - // probably already down - } - - - // singleton methods ---------------------------------------------------- - static SBotChatAutomaton *getAutomatonByName(string name) - { - map ::iterator it=NameMap.find(name); - if (it==NameMap.end()) - return NULL; - return (*it).second; - } - - // singleton data ------------------------------------------------------- - static map NameMap; -}; -map SBotChatAutomaton::NameMap; - - -////////////////////////////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////////// -// Implementation of different code modules for handling different bot -// chat page types - -////////////////////////////////////////////////////////////////////////////// -// this is a dummy page used to terminate chats - -class CBotChatPageTypeDone: public CBotChatPageType -{ -public: - virtual bool open(const CEntityId &player, const CEntityId &bot) - { - return false; // stop the bot chat! - } - - virtual bool close(const CEntityId &player, const CEntityId &bot) - { - return false; - } -} -BotChatPageTypeDone; - - -////////////////////////////////////////////////////////////////////////////// -// definition for a chat page that contains static text and buttons for -// player to click on/ select - -class CBotChatPageTypeTextOnly: public CBotChatPageType -{ -public: - virtual bool open(const CEntityId &player, const CEntityId &bot) - { - return true; - } - - virtual bool close(const CEntityId &player, const CEntityId &bot) - { - return true; - } -} -BotChatPageTypeTextOnly; - - -////////////////////////////////////////////////////////////////////////////// -// definition for a chat page that displays NEWS as well as other text - -class CBotChatPageTypeNews: public CBotChatPageType -{ -public: - virtual bool open(const CEntityId &player, const CEntityId &bot) - { - return true; - } - - virtual bool close(const CEntityId &player, const CEntityId &bot) - { - return true; - } -} -BotChatPageTypeNews; - - -////////////////////////////////////////////////////////////////////////////// -// definition for a chat page that displays a SHOP interface - -class CBotChatPageTypeShop: public CBotChatPageType -{ -public: - virtual bool open(const CEntityId &player, const CEntityId &bot) - { - nlinfo ("player %s entered trade page", player.toString().c_str()); - CMessage msgout( "TRADE_BEGIN" ); - msgout.serial( const_cast(player) ); - msgout.serial( const_cast(bot) ); - sendMessageViaMirror( "WOS", msgout ); - return true; - } - - virtual bool close(const CEntityId &player, const CEntityId &bot) - { - nlinfo ("end of trade with player %s", player.toString().c_str()); - CMessage msgout( "TRADE_END" ); - msgout.serial( const_cast(player) ); - msgout.serial( const_cast(bot) ); - sendMessageViaMirror( "WOS", msgout ); - sendMessageViaMirror( "EGS", msgout ); - return true; - } -} -BotChatPageTypeShop; - - -////////////////////////////////////////////////////////////////////////////// -// definition for a chat page that displays a MISSION SHOP interface - -class CBotChatPageTypeMissionShop: public CBotChatPageType -{ -public: - virtual bool open(const CEntityId &player, const CEntityId &bot) - { - nlinfo ("player %s entered mission page", player.toString().c_str()); - CMessage msgout( "MISSION_LIST_BEGIN" ); - msgout.serial( const_cast(player) ); - msgout.serial( const_cast(bot) ); - sendMessageViaMirror( "WOS", msgout ); - return true; - } - - virtual bool close(const CEntityId &player, const CEntityId &bot) - { - nlinfo ("end of mission page with player %s", player.toString().c_str()); - CMessage msgout( "MISSION_LIST_END" ); - msgout.serial( const_cast(player) ); - msgout.serial( const_cast(bot) ); - sendMessageViaMirror( "EGS", msgout ); - return true; - } -} -BotChatPageTypeMissionShop; - - - -////////////////////////////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////////// -// Definitions of bot chat pages and automatons - -// define the usable bot chat pages ------------------------------------------ -SBotChatPage BotChatPageIntro (BOTCHATTYPE::Intro, &BotChatPageTypeTextOnly, 4); -SBotChatPage BotChatPageFriendly (BOTCHATTYPE::FriendlyMainPage, &BotChatPageTypeNews, 4); -SBotChatPage BotChatPageNeutral (BOTCHATTYPE::NeutralMainPage, &BotChatPageTypeNews, 3); -SBotChatPage BotChatPageHostile (BOTCHATTYPE::NastyMainPage, &BotChatPageTypeTextOnly, 1); -SBotChatPage BotChatPageMoreNews (BOTCHATTYPE::MoreNewsPage, &BotChatPageTypeNews, 2); -SBotChatPage BotChatPageShop (BOTCHATTYPE::BuySellPage, &BotChatPageTypeShop, 2); -SBotChatPage BotChatPageMissionShop (BOTCHATTYPE::MissionsPage, &BotChatPageTypeMissionShop, 2); -SBotChatPage BotChatPageDone (BOTCHATTYPE::Done, &BotChatPageTypeDone, 0); - -// the default automaton ----------------------------------------------------- -SBotChatAutomatonState BotChatStatesDefault[]= -{ - SBotChatAutomatonState(&BotChatPageIntro,2,3,4,1), // 0 - friendly/ neutral/ hostile/ done - SBotChatAutomatonState(&BotChatPageDone), // 1 - SBotChatAutomatonState(&BotChatPageFriendly,5,6,7,1), // 2 - more news/ buy sell/ mission/ done - SBotChatAutomatonState(&BotChatPageNeutral,6,7,1), // 3 - buy sell/ mission/ done - SBotChatAutomatonState(&BotChatPageHostile,1), // 4 - done - SBotChatAutomatonState(&BotChatPageMoreNews,2,1), // 5 - friendly/ done - SBotChatAutomatonState(&BotChatPageShop,3,1), // 6 - neutral/ done - SBotChatAutomatonState(&BotChatPageMissionShop,3,1), // 7 - neutral/ done -}; -SBotChatAutomaton BotChatDefault("default",BotChatStatesDefault,sizeof(BotChatStatesDefault)/sizeof(BotChatStatesDefault[0])); - -// the automaton for merchants ----------------------------------------------- -SBotChatAutomatonState BotChatStatesMerchant[]= -{ - SBotChatAutomatonState(&BotChatPageMoreNews,2,1), // 0 - shop/ done - SBotChatAutomatonState(&BotChatPageDone), // 1 - SBotChatAutomatonState(&BotChatPageShop,0,1), // 2 - news/ done -}; -SBotChatAutomaton BotChatMerchant("merchant",BotChatStatesMerchant,sizeof(BotChatStatesMerchant)/sizeof(BotChatStatesMerchant[0])); - -// the automaton for walkers and talkers ------------------------------------- -SBotChatAutomatonState BotChatStatesWalkerTalker[]= -{ - SBotChatAutomatonState(&BotChatPageHostile,1), // 0 - SBotChatAutomatonState(&BotChatPageDone) // 1 -}; -SBotChatAutomaton BotChatWalkerTalker("walker talker",BotChatStatesWalkerTalker,sizeof(BotChatStatesMerchant)/sizeof(BotChatStatesMerchant[0])); - - -////////////////////////////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////////// -// Represetnation of a conversation between a player and a bot -// includes conversation automaton state data - -struct CBotChat -{ - CBotChat () : Player(CEntityId::Unknown), Bot(CEntityId::Unknown) { } - CBotChat (CEntityId player, CEntityId bot, SBotChatAutomaton *automaton) - { - Player=player; - Bot=bot; - setAutomaton(automaton); - } - - void setState(uint32 state) - { - if (state>=Automaton->Size && state!=std::numeric_limits::max()) - { - nlwarning("CBotChatEntry()::setState: Invalid state: %d",state); - return; - } - - // if there is already a page open close it - if (CurrentStateSize) - Automaton->States[CurrentState].Page->PageType->close(Player,Bot); - - // open the new page - CurrentState=state; - if (state==std::numeric_limits::max()) - Done=true; - else - Done=!Automaton->States[CurrentState].Page->PageType->open(Player,Bot); - - // transmit the new page id to the client - uint32 happyness=10; - BOTCHATTYPE::TBotChatInterfaceId interfaceId=Done?BOTCHATTYPE::Done:Automaton->States[CurrentState].Page->ClientInterfaceId; - NEWSTYPE::TNewsType newsType=NEWSTYPE::Unknown; - - CMessage msgout("BOT_CHAT_SELECT_INTERFACE"); - msgout.serial (Player); - msgout.serial (happyness); - msgout.serialEnum (interfaceId); - msgout.serialEnum (newsType); - sendMessageViaMirror("IOS", msgout); - } - - void setAutomaton(SBotChatAutomaton *automaton) - { - Automaton=automaton; - CurrentState=std::numeric_limits::max(); // set this to a std::numeric_limits::max() so that setState doesn't try to clse existing page - setState(0); - } - - void selectEntry (sint8 userInput) - { - // select the new page - if ((unsigned)userInput >= Automaton->States[CurrentState].Page->NumOptions) - { - nlwarning ("CBotChatEntry::selectEntry: For player %s: input out of bounds: %d", Player.toString().c_str(), userInput); - return; - } - - // advance through the state table - setState(Automaton->States[CurrentState].On[userInput]); - } - - void endChat () - { - setState(std::numeric_limits::max()); - } - - CEntityId Player; - CEntityId Bot; - SBotChatAutomaton *Automaton; - uint32 CurrentState; - bool Done; -}; - - -////////////////////////////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////////// -// Singleton manager class central to the bot chat system - -class CBotChatManager -{ -public: - - static void newChat(CEntityId player, CEntityId bot) - { - // make sure the player isn't already chatting - map::iterator it = BotChatMap.find (player); - if (it != BotChatMap.end()) - return; - - // a bit of logging - nlinfo ("new chat between player %s and bot %s", player.toString().c_str(), bot.toString().c_str()); - - // call the CbBegin() callback to get the name of the automaton to use - string automatonName; - if (CbBegin!=NULL) - automatonName=CbBegin(player,bot); - else - automatonName="default"; - SBotChatAutomaton *automaton=SBotChatAutomaton::getAutomatonByName(automatonName); - if (automaton==NULL) - { - nlwarning("- ignoring bot chat request as automaton '%s' not found",automatonName.c_str()); - return; - } - - // setup the new chat - BotChatMap[player] = CBotChat(player, bot, automaton); - } - - static void endChat(CEntityId player) - { - CEntityId bot; // for use in callback ... at end of routine - - map::iterator it = BotChatMap.find (player); - if (it != BotChatMap.end()) - { - bot=(*it).second.Bot; - - nlinfo ("end of bot chat between player %s and bot %s", player.toString().c_str(),bot.toString().c_str()); - - // if the chat is still active then stop it - if ((*it).second.Done) - (*it).second.endChat(); - - // remove the map entry - BotChatMap.erase (it); - - // **** this code may be dodgy 'cos its in a dtor - // **** if it is dodgy then we need to migrate from an STL map - // **** to some kind of custom structure that we can guarantee OK - } - - if (CbEnd!=NULL) - CbEnd(player,bot); - } - - static void treatInput(CEntityId player, sint8 userInput) - { - // locate the bot chat for the given player - map::iterator it = BotChatMap.find (player); - if (it == BotChatMap.end()) - { - nlwarning ("No bot chat with the player %s", player.toString().c_str()); - return; - } - - // pass the player input to the bot chat handler - (*it).second.selectEntry(userInput); - - // check whether the bot chat is finished - if ((*it).second.Done) - endChat(player); - } - - - // static data for the singleton ----------------------------------------- - static CBotChatInterface::TCallbackBegin CbBegin; - static CBotChatInterface::TCallbackEnd CbEnd; - static map BotChatMap; -}; -CBotChatInterface::TCallbackBegin CBotChatManager::CbBegin; -CBotChatInterface::TCallbackEnd CBotChatManager::CbEnd; -map CBotChatManager::BotChatMap; - - -////////////////////////////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////////// -// message callbacks and callback table - -static void cbBotChatStart (CMessage& msgin, const string &serviceName, uint16 serviceId ) -{ - CEntityId player, bot; - - msgin.serial( player ); - msgin.serial( bot ); - - CBotChatManager::newChat (player, bot); -} - -static void cbBotChatSelectAnswer (CMessage& msgin, const string &serviceName, uint16 serviceId ) -{ - CEntityId player, bot; - sint8 answer; - - msgin.serial( player ); - msgin.serial( answer ); - - CBotChatManager::treatInput (player, answer); -} - - -static TUnifiedCallbackItem CbArray[]= -{ - { "BOT_CHAT_START", cbBotChatStart }, - { "BOT_CHAT_SELECT_ANSWER", cbBotChatSelectAnswer }, -}; - - -////////////////////////////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////////// -// Interface class providing API for bot chat system - -void CBotChatInterface::init(CBotChatInterface::TCallbackBegin cbBegin,CBotChatInterface::TCallbackEnd cbEnd) -{ - CBotChatManager::CbBegin=cbBegin; - CBotChatManager::CbEnd=cbEnd; - CUnifiedNetwork::getInstance()->addCallbackArray(CbArray, sizeof (CbArray) / sizeof (CbArray[0])); -} - -void CBotChatInterface::release() -{ -} - -void CBotChatInterface::getBotChatPartners(CEntityId bot,vector &result) -{ - map::iterator it; - for (it=CBotChatManager::BotChatMap.begin();it!=CBotChatManager::BotChatMap.end();++it) - if ((*it).second.Bot==bot) - result.push_back((*it).first); -} - -void CBotChatInterface::endChatForPlayer(CEntityId player) -{ - CBotChatManager::endChat(player); -} - -void CBotChatInterface::endAllChatForBot(CEntityId bot) -{ - map::iterator it=CBotChatManager::BotChatMap.begin(); - while (it!=CBotChatManager::BotChatMap.end()) - { - map::iterator next=it; - if ((*it).second.Bot==bot) - CBotChatManager::endChat((*it).first); - it=next; - } -} - -#endif - -#endif diff --git a/code/ryzom/server/src/ai_service/bot_chat_interface.h b/code/ryzom/server/src/ai_service/bot_chat_interface.h deleted file mode 100644 index 3586b737f..000000000 --- a/code/ryzom/server/src/ai_service/bot_chat_interface.h +++ /dev/null @@ -1,58 +0,0 @@ -// Ryzom - MMORPG Framework -// Copyright (C) 2010 Winch Gate Property Limited -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU Affero General Public License as -// published by the Free Software Foundation, either version 3 of the -// License, or (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public License -// along with this program. If not, see . - - - -#error "Deprecated" - -#ifndef RYAI_BOT_CHAT_INTERFACE_H -#define RYAI_BOT_CHAT_INTERFACE_H - -// Nel Misc -#include "nel/misc/types_nl.h" -#include "nel/misc/entity_id.h" -#include "game_share/news_types.h" -#include "game_share/bot_chat_types.h" - -// the class -class CBotChatInterface -{ -public: - // the callback type for user callbacks for start of bot chat - // returns the name of the bot chat automaton to use - // if an empty string is returned no bot chat is launched - typedef std::string (*TCallbackBegin)(NLMISC::CEntityId player,NLMISC::CEntityId bot); - - // the callback types for user callback for end of bot chat - // called just after the chat session has been closed - typedef void (*TCallbackEnd)(NLMISC::CEntityId player,NLMISC::CEntityId bot); - -public: - // classic init() and release() - static void init(TCallbackBegin cbBegin=NULL,TCallbackEnd cbEnd=NULL); - static void release(); - - // build a vector of the players currently chatting with a given bot - // this routine may not be very fast as the entire bot chat map is - // parsed in order to build the vector - static void getBotChatPartners(NLMISC::CEntityId bot,std::vector &result); - - // routines to force the end of a bot chat - static void endChatForPlayer(NLMISC::CEntityId player); - static void endAllChatForBot(NLMISC::CEntityId bot); -}; - -#endif diff --git a/code/ryzom/server/src/input_output_service/input_output_service.cpp b/code/ryzom/server/src/input_output_service/input_output_service.cpp index de3d73458..f2cd67d22 100644 --- a/code/ryzom/server/src/input_output_service/input_output_service.cpp +++ b/code/ryzom/server/src/input_output_service/input_output_service.cpp @@ -21,7 +21,6 @@ #include "game_share/tick_event_handler.h" #include "game_share/msg_client_server.h" #include "game_share/mode_and_behaviour.h" //TEMP!!! -#include "game_share/news_types.h" #include "game_share/bot_chat_types.h" #include "game_share/brick_types.h" #include "game_share/loot_harvest_state.h" @@ -35,7 +34,6 @@ #include "nel/misc/command.h" #include "nel/net/message.h" -#include "news_manager.h" #include "string_manager.h" #include "messages.h" //#include "ios_pd.h" diff --git a/code/ryzom/server/src/input_output_service/news_manager.cpp b/code/ryzom/server/src/input_output_service/news_manager.cpp deleted file mode 100644 index b8b093c99..000000000 --- a/code/ryzom/server/src/input_output_service/news_manager.cpp +++ /dev/null @@ -1,83 +0,0 @@ -// Ryzom - MMORPG Framework -// Copyright (C) 2010 Winch Gate Property Limited -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU Affero General Public License as -// published by the Free Software Foundation, either version 3 of the -// License, or (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public License -// along with this program. If not, see . - - -#include "stdpch.h" -#include "news_manager.h" -#include "input_output_service.h" - -//#include "game_share/generic_msg_mngr.h" -#include "game_share/msg_client_server.h" -#include "game_share/news_types.h" - -using namespace std; -using namespace NLMISC; -using namespace NLNET; - -class CNewsEntry -{ -public: - CNewsEntry () : Type(NEWSTYPE::Unknown) { } - CNewsEntry (NEWSTYPE::TNewsType type, const string &stringId, const vector &args) : Type(type), StringId(StringId), Args(args) { } - - NEWSTYPE::TNewsType Type; - string StringId; - vector Args; -}; - -deque News; - -static void cbAddNews (CMessage& msgin, const std::string &serviceName, TServiceId serviceId ) -{ - NEWSTYPE::TNewsType type = NEWSTYPE::Unknown; - string stringId; - vector args; - - msgin.serialEnum (type); - msgin.serial (stringId); - msgin.serialCont (args); - - News.push_back(CNewsEntry(type, stringId, args)); - - nlinfo ("added news %s for type %d from service %s", stringId.c_str(), type, serviceName.c_str()); -} - - -static TUnifiedCallbackItem CbArray[]= -{ - { "ADD_NEWS", cbAddNews }, -}; - - -void CNewsManager::init() -{ - CUnifiedNetwork::getInstance()->addCallbackArray(CbArray, sizeof (CbArray) / sizeof (CbArray[0])); -} - - -void CNewsManager::getNews (NEWSTYPE::TNewsType type, CBitMemStream &bms) -{ - nlassert (type != NEWSTYPE::Unknown); - - sint val = (sint)frand ((float)News.size()); - - string res; - //CChatManager::getStaticDB ().getInfos (News[val].stringId, res, bms); - nlinfo ("sending news '%s' '%s' with %d args", News[val].StringId.c_str(), res.c_str(), News[val].Args.size()); - - //bms.serial (News[val].stringId); - bms.serialCont (News[val].Args); -} diff --git a/code/ryzom/server/src/input_output_service/news_manager.h b/code/ryzom/server/src/input_output_service/news_manager.h deleted file mode 100644 index dee34e5be..000000000 --- a/code/ryzom/server/src/input_output_service/news_manager.h +++ /dev/null @@ -1,60 +0,0 @@ -// Ryzom - MMORPG Framework -// Copyright (C) 2010 Winch Gate Property Limited -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU Affero General Public License as -// published by the Free Software Foundation, either version 3 of the -// License, or (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public License -// along with this program. If not, see . - - - -#ifndef NEWS_MANAGER_H -#define NEWS_MANAGER_H - - -// misc -#include "nel/misc/types_nl.h" -#include "nel/misc/bit_mem_stream.h" - -// game share -#include "game_share/ryzom_entity_id.h" -//#include "game_share/chat_static_database.h" -//#include "game_share/chat_dynamic_database.h" -#include "game_share/news_types.h" - -// std -#include -#include - - -/** - * CNewsManager - * \author Vianney Lecroart - * \author Nevrax France - * \date 2002 - */ -class CNewsManager -{ -public : - - /** - * Init the manager. - */ - static void init (); - - /// return a news of a given type - static void getNews (NEWSTYPE::TNewsType type, NLMISC::CBitMemStream &bms); -}; - - -#endif // NEWS_MANAGER_H - -/* End of news_manager.h */ diff --git a/code/ryzom/server/src/input_output_service/stdpch.h b/code/ryzom/server/src/input_output_service/stdpch.h index 17f5e6bc5..67599f732 100644 --- a/code/ryzom/server/src/input_output_service/stdpch.h +++ b/code/ryzom/server/src/input_output_service/stdpch.h @@ -74,7 +74,6 @@ #include "game_share/mirror_prop_value.h" #include "game_share/mode_and_behaviour.h" #include "game_share/msg_client_server.h" -#include "game_share/news_types.h" #include "game_share/people.h" #include "game_share/player_visual_properties.h" #include "game_share/power_types.h" From 33881e9627d015fa9f1c6652eae64f0a6ec4748b Mon Sep 17 00:00:00 2001 From: kaetemi Date: Thu, 9 May 2019 18:43:34 +0800 Subject: [PATCH 13/77] Added: Blue icons for build tools, gold icons for command utilities, yellow icons for script utilities, red for gui tools and services, turquoise for cross platform design tools --- code/nel/tools/3d/anim_builder/CMakeLists.txt | 4 +++- code/nel/tools/3d/anim_builder/blue_pill.ico | Bin 0 -> 3638 bytes code/nel/tools/3d/anim_builder/main.rc | 1 + code/nel/tools/3d/build_clod_bank/CMakeLists.txt | 4 +++- code/nel/tools/3d/build_clodtex/CMakeLists.txt | 4 +++- .../tools/3d/build_coarse_mesh/CMakeLists.txt | 4 +++- code/nel/tools/3d/build_far_bank/CMakeLists.txt | 4 +++- code/nel/tools/3d/build_interface/CMakeLists.txt | 2 +- .../tools/3d/build_shadow_skin/CMakeLists.txt | 4 +++- code/nel/tools/3d/build_smallbank/CMakeLists.txt | 4 +++- code/nel/tools/3d/get_neighbors/CMakeLists.txt | 4 +++- code/nel/tools/3d/get_neighbors/blue_pill.ico | Bin 0 -> 3638 bytes code/nel/tools/3d/get_neighbors/main.rc | 1 + code/nel/tools/3d/hls_bank_maker/CMakeLists.txt | 6 ++++-- code/nel/tools/3d/hls_bank_maker/blue_pill.ico | Bin 0 -> 3638 bytes code/nel/tools/3d/hls_bank_maker/main.rc | 1 + code/nel/tools/3d/ig_add/CMakeLists.txt | 4 +++- code/nel/tools/3d/ig_add/blue_pill.ico | Bin 0 -> 3638 bytes code/nel/tools/3d/ig_add/main.rc | 1 + code/nel/tools/3d/ig_elevation/CMakeLists.txt | 4 +++- code/nel/tools/3d/ig_elevation/blue_pill.ico | Bin 0 -> 3638 bytes code/nel/tools/3d/ig_elevation/main.rc | 1 + code/nel/tools/3d/ig_lighter/CMakeLists.txt | 4 +++- code/nel/tools/3d/ig_lighter/blue_pill.ico | Bin 0 -> 3638 bytes code/nel/tools/3d/ig_lighter/main.rc | 1 + .../tools/3d/lightmap_optimizer/CMakeLists.txt | 4 +++- .../tools/3d/lightmap_optimizer/blue_pill.ico | Bin 0 -> 3638 bytes code/nel/tools/3d/lightmap_optimizer/main.rc | 1 + code/nel/tools/3d/mesh_export/CMakeLists.txt | 5 +++-- code/nel/tools/3d/mesh_export/blue_pill.ico | Bin 0 -> 3638 bytes code/nel/tools/3d/mesh_export/main.rc | 1 + code/nel/tools/3d/panoply_maker/CMakeLists.txt | 4 +++- code/nel/tools/3d/panoply_maker/blue_pill.ico | Bin 0 -> 3638 bytes code/nel/tools/3d/panoply_maker/main.rc | 1 + code/nel/tools/3d/shapes_exporter/CMakeLists.txt | 4 +++- code/nel/tools/3d/shapes_exporter/gold_pill.ico | Bin 0 -> 3638 bytes code/nel/tools/3d/shapes_exporter/main.rc | 1 + code/nel/tools/3d/tga_2_dds/CMakeLists.txt | 4 +++- code/nel/tools/3d/tga_2_dds/blue_pill.ico | Bin 0 -> 3638 bytes code/nel/tools/3d/tga_2_dds/main.rc | 1 + code/nel/tools/3d/tga_cut/CMakeLists.txt | 4 +++- code/nel/tools/3d/tga_cut/blue_pill.ico | Bin 0 -> 3638 bytes code/nel/tools/3d/tga_cut/main.rc | 1 + .../tools/3d/unbuild_interface/CMakeLists.txt | 4 ++-- .../nel/tools/3d/unbuild_interface/gold_pill.ico | Bin 0 -> 3638 bytes code/nel/tools/3d/unbuild_interface/main.rc | 1 + .../tools/3d/zone_dependencies/CMakeLists.txt | 4 +++- .../nel/tools/3d/zone_dependencies/blue_pill.ico | Bin 0 -> 3638 bytes code/nel/tools/3d/zone_dependencies/main.rc | 1 + code/nel/tools/3d/zone_ig_lighter/CMakeLists.txt | 4 +++- code/nel/tools/3d/zone_ig_lighter/blue_pill.ico | Bin 0 -> 3638 bytes code/nel/tools/3d/zone_ig_lighter/main.rc | 1 + code/nel/tools/3d/zone_lighter/CMakeLists.txt | 4 +++- code/nel/tools/3d/zone_lighter/blue_pill.ico | Bin 0 -> 3638 bytes code/nel/tools/3d/zone_lighter/main.rc | 1 + code/nel/tools/3d/zone_welder/CMakeLists.txt | 4 +++- code/nel/tools/3d/zone_welder/blue_pill.ico | Bin 0 -> 3638 bytes code/nel/tools/3d/zone_welder/main.rc | 1 + code/nel/tools/misc/bnp_make/CMakeLists.txt | 4 +++- code/nel/tools/misc/bnp_make/blue_pill.ico | Bin 0 -> 3638 bytes code/nel/tools/misc/bnp_make/main.rc | 1 + code/nel/tools/misc/exec_timeout/CMakeLists.txt | 4 +++- code/nel/tools/misc/exec_timeout/main.rc | 1 + code/nel/tools/misc/exec_timeout/yellow_pill.ico | Bin 0 -> 3638 bytes code/nel/tools/misc/make_sheet_id/CMakeLists.txt | 4 +++- code/nel/tools/misc/make_sheet_id/blue_pill.ico | Bin 0 -> 3638 bytes code/nel/tools/misc/make_sheet_id/main.rc | 1 + code/nel/tools/misc/message_box/CMakeLists.txt | 4 +++- code/nel/tools/misc/message_box/main.rc | 1 + code/nel/tools/misc/message_box/yellow_pill.ico | Bin 0 -> 3638 bytes .../nel/tools/misc/message_box_qt/CMakeLists.txt | 4 +++- code/nel/tools/misc/message_box_qt/main.rc | 1 + .../tools/misc/message_box_qt/yellow_pill.ico | Bin 0 -> 3638 bytes .../nel/tools/pacs/build_ig_boxes/CMakeLists.txt | 4 +++- .../tools/pacs/build_indoor_rbank/CMakeLists.txt | 4 +++- code/nel/tools/pacs/build_rbank/CMakeLists.txt | 4 +++- .../client/r2_islands_textures/CMakeLists.txt | 4 +++- .../client/r2_islands_textures/blue_pill.ico | Bin 0 -> 3638 bytes .../tools/client/r2_islands_textures/main.rc | 1 + .../tools/leveldesign/prim_export/CMakeLists.txt | 4 +++- .../tools/leveldesign/prim_export/blue_pill.ico | Bin 0 -> 3638 bytes code/ryzom/tools/leveldesign/prim_export/main.rc | 1 + .../world_editor/land_export/CMakeLists.txt | 4 +++- .../world_editor/land_export/blue_pill.ico | Bin 0 -> 3638 bytes .../leveldesign/world_editor/land_export/main.rc | 1 + code/ryzom/tools/patch_gen/CMakeLists.txt | 8 ++++---- code/ryzom/tools/patch_gen/blue_pill.ico | Bin 0 -> 3638 bytes code/ryzom/tools/patch_gen/patch_gen.rc | 1 + code/ryzom/tools/patch_gen/patch_gen_service.rc | 1 + code/ryzom/tools/patch_gen/red_pill.ico | Bin 0 -> 3638 bytes .../tools/server/ai_build_wmap/CMakeLists.txt | 4 +++- .../tools/server/ai_build_wmap/blue_pill.ico | Bin 0 -> 3638 bytes code/ryzom/tools/server/ai_build_wmap/main.rc | 1 + .../server/build_world_packed_col/CMakeLists.txt | 4 +++- code/ryzom/tools/sheets_packer/CMakeLists.txt | 4 +++- code/ryzom/tools/sheets_packer/blue_pill.ico | Bin 0 -> 3638 bytes code/ryzom/tools/sheets_packer/main.rc | 1 + .../tools/sheets_packer_shard/CMakeLists.txt | 8 +++++++- .../tools/sheets_packer_shard/blue_pill.ico | Bin 0 -> 3638 bytes code/ryzom/tools/sheets_packer_shard/main.rc | 1 + .../ryzom/tools/translation_tools/CMakeLists.txt | 4 +++- code/ryzom/tools/translation_tools/blue_pill.ico | Bin 0 -> 3638 bytes code/ryzom/tools/translation_tools/main.rc | 1 + 103 files changed, 157 insertions(+), 47 deletions(-) create mode 100644 code/nel/tools/3d/anim_builder/blue_pill.ico create mode 100644 code/nel/tools/3d/anim_builder/main.rc create mode 100644 code/nel/tools/3d/get_neighbors/blue_pill.ico create mode 100644 code/nel/tools/3d/get_neighbors/main.rc create mode 100644 code/nel/tools/3d/hls_bank_maker/blue_pill.ico create mode 100644 code/nel/tools/3d/hls_bank_maker/main.rc create mode 100644 code/nel/tools/3d/ig_add/blue_pill.ico create mode 100644 code/nel/tools/3d/ig_add/main.rc create mode 100644 code/nel/tools/3d/ig_elevation/blue_pill.ico create mode 100644 code/nel/tools/3d/ig_elevation/main.rc create mode 100644 code/nel/tools/3d/ig_lighter/blue_pill.ico create mode 100644 code/nel/tools/3d/ig_lighter/main.rc create mode 100644 code/nel/tools/3d/lightmap_optimizer/blue_pill.ico create mode 100644 code/nel/tools/3d/lightmap_optimizer/main.rc create mode 100644 code/nel/tools/3d/mesh_export/blue_pill.ico create mode 100644 code/nel/tools/3d/mesh_export/main.rc create mode 100644 code/nel/tools/3d/panoply_maker/blue_pill.ico create mode 100644 code/nel/tools/3d/panoply_maker/main.rc create mode 100644 code/nel/tools/3d/shapes_exporter/gold_pill.ico create mode 100644 code/nel/tools/3d/shapes_exporter/main.rc create mode 100644 code/nel/tools/3d/tga_2_dds/blue_pill.ico create mode 100644 code/nel/tools/3d/tga_2_dds/main.rc create mode 100644 code/nel/tools/3d/tga_cut/blue_pill.ico create mode 100644 code/nel/tools/3d/tga_cut/main.rc create mode 100644 code/nel/tools/3d/unbuild_interface/gold_pill.ico create mode 100644 code/nel/tools/3d/unbuild_interface/main.rc create mode 100644 code/nel/tools/3d/zone_dependencies/blue_pill.ico create mode 100644 code/nel/tools/3d/zone_dependencies/main.rc create mode 100644 code/nel/tools/3d/zone_ig_lighter/blue_pill.ico create mode 100644 code/nel/tools/3d/zone_ig_lighter/main.rc create mode 100644 code/nel/tools/3d/zone_lighter/blue_pill.ico create mode 100644 code/nel/tools/3d/zone_lighter/main.rc create mode 100644 code/nel/tools/3d/zone_welder/blue_pill.ico create mode 100644 code/nel/tools/3d/zone_welder/main.rc create mode 100644 code/nel/tools/misc/bnp_make/blue_pill.ico create mode 100644 code/nel/tools/misc/bnp_make/main.rc create mode 100644 code/nel/tools/misc/exec_timeout/main.rc create mode 100644 code/nel/tools/misc/exec_timeout/yellow_pill.ico create mode 100644 code/nel/tools/misc/make_sheet_id/blue_pill.ico create mode 100644 code/nel/tools/misc/make_sheet_id/main.rc create mode 100644 code/nel/tools/misc/message_box/main.rc create mode 100644 code/nel/tools/misc/message_box/yellow_pill.ico create mode 100644 code/nel/tools/misc/message_box_qt/main.rc create mode 100644 code/nel/tools/misc/message_box_qt/yellow_pill.ico create mode 100644 code/ryzom/tools/client/r2_islands_textures/blue_pill.ico create mode 100644 code/ryzom/tools/client/r2_islands_textures/main.rc create mode 100644 code/ryzom/tools/leveldesign/prim_export/blue_pill.ico create mode 100644 code/ryzom/tools/leveldesign/prim_export/main.rc create mode 100644 code/ryzom/tools/leveldesign/world_editor/land_export/blue_pill.ico create mode 100644 code/ryzom/tools/leveldesign/world_editor/land_export/main.rc create mode 100644 code/ryzom/tools/patch_gen/blue_pill.ico create mode 100644 code/ryzom/tools/patch_gen/patch_gen.rc create mode 100644 code/ryzom/tools/patch_gen/patch_gen_service.rc create mode 100644 code/ryzom/tools/patch_gen/red_pill.ico create mode 100644 code/ryzom/tools/server/ai_build_wmap/blue_pill.ico create mode 100644 code/ryzom/tools/server/ai_build_wmap/main.rc create mode 100644 code/ryzom/tools/sheets_packer/blue_pill.ico create mode 100644 code/ryzom/tools/sheets_packer/main.rc create mode 100644 code/ryzom/tools/sheets_packer_shard/blue_pill.ico create mode 100644 code/ryzom/tools/sheets_packer_shard/main.rc create mode 100644 code/ryzom/tools/translation_tools/blue_pill.ico create mode 100644 code/ryzom/tools/translation_tools/main.rc diff --git a/code/nel/tools/3d/anim_builder/CMakeLists.txt b/code/nel/tools/3d/anim_builder/CMakeLists.txt index 61188b461..eec238d39 100644 --- a/code/nel/tools/3d/anim_builder/CMakeLists.txt +++ b/code/nel/tools/3d/anim_builder/CMakeLists.txt @@ -1,4 +1,6 @@ -FILE(GLOB SRC *.cpp *.h) +FILE(GLOB SRC *.cpp *.h *.rc) + +SOURCE_GROUP("" FILES ${SRC}) ADD_EXECUTABLE(anim_builder ${SRC}) diff --git a/code/nel/tools/3d/anim_builder/blue_pill.ico b/code/nel/tools/3d/anim_builder/blue_pill.ico new file mode 100644 index 0000000000000000000000000000000000000000..269907ec31f3583d18d593121b4728dae9ccc757 GIT binary patch literal 3638 zcmeH|KW`I35XIlz*|+!4@tuP&V32TSMHJ}}5<(;>N>9T#pol2k@BthN$t6vwT~I}I zY23!4jbsTaC50PYBD&BmGkbgXMJ5KNLg;?dYJEFzchegpmP6?(lMwARpH&Y;gfVLqQ@I-Nql zeuS%iU^E)x@+mMJ4ly2&ak6t`iYic5psK)sSpmu^{u^x?NEtv$4y7$7Ra9?m2-J+2 zSW)2CYIV<}*cTKzz7qstNRfQT3goyZZqH*kyPmJed&`;ajXiETCIjGzRu7XkiIuhT zTYR?5V~>aU@j8spvajm5yT(KH0eiQ2toW_~Tp8aLj}_1T_8i84 zzdp;o_xlSNAHH}3^!t5$evHbC*F8iPt13`c;NPo&wRSVD-j3+O67m*UCEYJWoy^kl zJW900%~uSXj5hzSCXa~$7!?1+$m^NE3_nu2&m>dN?MhLQt59(n4~R^ zyDISgAPBgRISeIvG#7B(3F1a$BQ|Z2WuVH6_hT z9Hg%0U+&NA!x>DgE$+W4uN-b!|2~DPntxLP?&*KzCkA>3Je&aP2ykV9-=#c?^$BZc Jtd%`~!!K}6&rARS literal 0 HcmV?d00001 diff --git a/code/nel/tools/3d/anim_builder/main.rc b/code/nel/tools/3d/anim_builder/main.rc new file mode 100644 index 000000000..958fa5089 --- /dev/null +++ b/code/nel/tools/3d/anim_builder/main.rc @@ -0,0 +1 @@ +IDI_MAIN_ICON ICON DISCARDABLE "blue_pill.ico" diff --git a/code/nel/tools/3d/build_clod_bank/CMakeLists.txt b/code/nel/tools/3d/build_clod_bank/CMakeLists.txt index 2bd4846d7..52fd0df79 100644 --- a/code/nel/tools/3d/build_clod_bank/CMakeLists.txt +++ b/code/nel/tools/3d/build_clod_bank/CMakeLists.txt @@ -1,4 +1,6 @@ -FILE(GLOB SRC *.cpp *.h) +FILE(GLOB SRC *.cpp *.h *.rc) + +SOURCE_GROUP("" FILES ${SRC}) ADD_EXECUTABLE(build_clod_bank ${SRC}) diff --git a/code/nel/tools/3d/build_clodtex/CMakeLists.txt b/code/nel/tools/3d/build_clodtex/CMakeLists.txt index 558962421..956eaf651 100644 --- a/code/nel/tools/3d/build_clodtex/CMakeLists.txt +++ b/code/nel/tools/3d/build_clodtex/CMakeLists.txt @@ -1,4 +1,6 @@ -FILE(GLOB SRC *.cpp *.h) +FILE(GLOB SRC *.cpp *.h *.rc) + +SOURCE_GROUP("" FILES ${SRC}) ADD_EXECUTABLE(build_clodtex ${SRC}) diff --git a/code/nel/tools/3d/build_coarse_mesh/CMakeLists.txt b/code/nel/tools/3d/build_coarse_mesh/CMakeLists.txt index 93eba1bfc..cc51fd4f8 100644 --- a/code/nel/tools/3d/build_coarse_mesh/CMakeLists.txt +++ b/code/nel/tools/3d/build_coarse_mesh/CMakeLists.txt @@ -1,4 +1,6 @@ -FILE(GLOB SRC *.cpp) +FILE(GLOB SRC *.cpp *.h *.rc) + +SOURCE_GROUP("" FILES ${SRC}) ADD_EXECUTABLE(build_coarse_mesh ${SRC}) diff --git a/code/nel/tools/3d/build_far_bank/CMakeLists.txt b/code/nel/tools/3d/build_far_bank/CMakeLists.txt index 7a858d560..59580ec1d 100644 --- a/code/nel/tools/3d/build_far_bank/CMakeLists.txt +++ b/code/nel/tools/3d/build_far_bank/CMakeLists.txt @@ -1,4 +1,6 @@ -FILE(GLOB SRC *.cpp) +FILE(GLOB SRC *.cpp *.h *.rc) + +SOURCE_GROUP("" FILES ${SRC}) ADD_EXECUTABLE(build_far_bank ${SRC}) diff --git a/code/nel/tools/3d/build_interface/CMakeLists.txt b/code/nel/tools/3d/build_interface/CMakeLists.txt index 113fe2b84..66c8ba9b4 100644 --- a/code/nel/tools/3d/build_interface/CMakeLists.txt +++ b/code/nel/tools/3d/build_interface/CMakeLists.txt @@ -1,4 +1,4 @@ -FILE(GLOB SRC *.cpp *.h) +FILE(GLOB SRC *.cpp *.h *.rc) SOURCE_GROUP("" FILES ${SRC}) diff --git a/code/nel/tools/3d/build_shadow_skin/CMakeLists.txt b/code/nel/tools/3d/build_shadow_skin/CMakeLists.txt index 78bbd712d..fbe504067 100644 --- a/code/nel/tools/3d/build_shadow_skin/CMakeLists.txt +++ b/code/nel/tools/3d/build_shadow_skin/CMakeLists.txt @@ -1,4 +1,6 @@ -FILE(GLOB SRC *.cpp *.h) +FILE(GLOB SRC *.cpp *.h *.rc) + +SOURCE_GROUP("" FILES ${SRC}) ADD_EXECUTABLE(build_shadow_skin ${SRC}) diff --git a/code/nel/tools/3d/build_smallbank/CMakeLists.txt b/code/nel/tools/3d/build_smallbank/CMakeLists.txt index 260f6b9aa..c284e1e2b 100644 --- a/code/nel/tools/3d/build_smallbank/CMakeLists.txt +++ b/code/nel/tools/3d/build_smallbank/CMakeLists.txt @@ -1,4 +1,6 @@ -FILE(GLOB SRC *.cpp) +FILE(GLOB SRC *.cpp *.h *.rc) + +SOURCE_GROUP("" FILES ${SRC}) ADD_EXECUTABLE(build_smallbank ${SRC}) diff --git a/code/nel/tools/3d/get_neighbors/CMakeLists.txt b/code/nel/tools/3d/get_neighbors/CMakeLists.txt index d8de69ff5..dc32cbd0b 100644 --- a/code/nel/tools/3d/get_neighbors/CMakeLists.txt +++ b/code/nel/tools/3d/get_neighbors/CMakeLists.txt @@ -1,4 +1,6 @@ -FILE(GLOB SRC *.cpp *.h) +FILE(GLOB SRC *.cpp *.h *.rc) + +SOURCE_GROUP("" FILES ${SRC}) ADD_EXECUTABLE(get_neighbors ${SRC}) diff --git a/code/nel/tools/3d/get_neighbors/blue_pill.ico b/code/nel/tools/3d/get_neighbors/blue_pill.ico new file mode 100644 index 0000000000000000000000000000000000000000..269907ec31f3583d18d593121b4728dae9ccc757 GIT binary patch literal 3638 zcmeH|KW`I35XIlz*|+!4@tuP&V32TSMHJ}}5<(;>N>9T#pol2k@BthN$t6vwT~I}I zY23!4jbsTaC50PYBD&BmGkbgXMJ5KNLg;?dYJEFzchegpmP6?(lMwARpH&Y;gfVLqQ@I-Nql zeuS%iU^E)x@+mMJ4ly2&ak6t`iYic5psK)sSpmu^{u^x?NEtv$4y7$7Ra9?m2-J+2 zSW)2CYIV<}*cTKzz7qstNRfQT3goyZZqH*kyPmJed&`;ajXiETCIjGzRu7XkiIuhT zTYR?5V~>aU@j8spvajm5yT(KH0eiQ2toW_~Tp8aLj}_1T_8i84 zzdp;o_xlSNAHH}3^!t5$evHbC*F8iPt13`c;NPo&wRSVD-j3+O67m*UCEYJWoy^kl zJW900%~uSXj5hzSCXa~$7!?1+$m^NE3_nu2&m>dN?MhLQt59(n4~R^ zyDISgAPBgRISeIvG#7B(3F1a$BQ|Z2WuVH6_hT z9Hg%0U+&NA!x>DgE$+W4uN-b!|2~DPntxLP?&*KzCkA>3Je&aP2ykV9-=#c?^$BZc Jtd%`~!!K}6&rARS literal 0 HcmV?d00001 diff --git a/code/nel/tools/3d/get_neighbors/main.rc b/code/nel/tools/3d/get_neighbors/main.rc new file mode 100644 index 000000000..958fa5089 --- /dev/null +++ b/code/nel/tools/3d/get_neighbors/main.rc @@ -0,0 +1 @@ +IDI_MAIN_ICON ICON DISCARDABLE "blue_pill.ico" diff --git a/code/nel/tools/3d/hls_bank_maker/CMakeLists.txt b/code/nel/tools/3d/hls_bank_maker/CMakeLists.txt index d2482c276..326871e5b 100644 --- a/code/nel/tools/3d/hls_bank_maker/CMakeLists.txt +++ b/code/nel/tools/3d/hls_bank_maker/CMakeLists.txt @@ -1,5 +1,7 @@ -FILE(GLOB SRC *.cpp *.h ../panoply_maker/hls_bank_texture_info.cpp ../panoply_maker/hls_bank_texture_info.h) - +FILE(GLOB SRC *.cpp *.h ../panoply_maker/hls_bank_texture_info.cpp ../panoply_maker/hls_bank_texture_info.h *.rc) + +SOURCE_GROUP("" FILES ${SRC}) + ADD_EXECUTABLE(hls_bank_maker ${SRC}) TARGET_LINK_LIBRARIES(hls_bank_maker s3tc_compressor nelmisc nel3d) diff --git a/code/nel/tools/3d/hls_bank_maker/blue_pill.ico b/code/nel/tools/3d/hls_bank_maker/blue_pill.ico new file mode 100644 index 0000000000000000000000000000000000000000..269907ec31f3583d18d593121b4728dae9ccc757 GIT binary patch literal 3638 zcmeH|KW`I35XIlz*|+!4@tuP&V32TSMHJ}}5<(;>N>9T#pol2k@BthN$t6vwT~I}I zY23!4jbsTaC50PYBD&BmGkbgXMJ5KNLg;?dYJEFzchegpmP6?(lMwARpH&Y;gfVLqQ@I-Nql zeuS%iU^E)x@+mMJ4ly2&ak6t`iYic5psK)sSpmu^{u^x?NEtv$4y7$7Ra9?m2-J+2 zSW)2CYIV<}*cTKzz7qstNRfQT3goyZZqH*kyPmJed&`;ajXiETCIjGzRu7XkiIuhT zTYR?5V~>aU@j8spvajm5yT(KH0eiQ2toW_~Tp8aLj}_1T_8i84 zzdp;o_xlSNAHH}3^!t5$evHbC*F8iPt13`c;NPo&wRSVD-j3+O67m*UCEYJWoy^kl zJW900%~uSXj5hzSCXa~$7!?1+$m^NE3_nu2&m>dN?MhLQt59(n4~R^ zyDISgAPBgRISeIvG#7B(3F1a$BQ|Z2WuVH6_hT z9Hg%0U+&NA!x>DgE$+W4uN-b!|2~DPntxLP?&*KzCkA>3Je&aP2ykV9-=#c?^$BZc Jtd%`~!!K}6&rARS literal 0 HcmV?d00001 diff --git a/code/nel/tools/3d/hls_bank_maker/main.rc b/code/nel/tools/3d/hls_bank_maker/main.rc new file mode 100644 index 000000000..958fa5089 --- /dev/null +++ b/code/nel/tools/3d/hls_bank_maker/main.rc @@ -0,0 +1 @@ +IDI_MAIN_ICON ICON DISCARDABLE "blue_pill.ico" diff --git a/code/nel/tools/3d/ig_add/CMakeLists.txt b/code/nel/tools/3d/ig_add/CMakeLists.txt index 2ae993d51..6200232c8 100644 --- a/code/nel/tools/3d/ig_add/CMakeLists.txt +++ b/code/nel/tools/3d/ig_add/CMakeLists.txt @@ -1,4 +1,6 @@ -FILE(GLOB SRC *.cpp *.h) +FILE(GLOB SRC *.cpp *.h *.rc) + +SOURCE_GROUP("" FILES ${SRC}) ADD_EXECUTABLE(ig_add ${SRC}) diff --git a/code/nel/tools/3d/ig_add/blue_pill.ico b/code/nel/tools/3d/ig_add/blue_pill.ico new file mode 100644 index 0000000000000000000000000000000000000000..269907ec31f3583d18d593121b4728dae9ccc757 GIT binary patch literal 3638 zcmeH|KW`I35XIlz*|+!4@tuP&V32TSMHJ}}5<(;>N>9T#pol2k@BthN$t6vwT~I}I zY23!4jbsTaC50PYBD&BmGkbgXMJ5KNLg;?dYJEFzchegpmP6?(lMwARpH&Y;gfVLqQ@I-Nql zeuS%iU^E)x@+mMJ4ly2&ak6t`iYic5psK)sSpmu^{u^x?NEtv$4y7$7Ra9?m2-J+2 zSW)2CYIV<}*cTKzz7qstNRfQT3goyZZqH*kyPmJed&`;ajXiETCIjGzRu7XkiIuhT zTYR?5V~>aU@j8spvajm5yT(KH0eiQ2toW_~Tp8aLj}_1T_8i84 zzdp;o_xlSNAHH}3^!t5$evHbC*F8iPt13`c;NPo&wRSVD-j3+O67m*UCEYJWoy^kl zJW900%~uSXj5hzSCXa~$7!?1+$m^NE3_nu2&m>dN?MhLQt59(n4~R^ zyDISgAPBgRISeIvG#7B(3F1a$BQ|Z2WuVH6_hT z9Hg%0U+&NA!x>DgE$+W4uN-b!|2~DPntxLP?&*KzCkA>3Je&aP2ykV9-=#c?^$BZc Jtd%`~!!K}6&rARS literal 0 HcmV?d00001 diff --git a/code/nel/tools/3d/ig_add/main.rc b/code/nel/tools/3d/ig_add/main.rc new file mode 100644 index 000000000..958fa5089 --- /dev/null +++ b/code/nel/tools/3d/ig_add/main.rc @@ -0,0 +1 @@ +IDI_MAIN_ICON ICON DISCARDABLE "blue_pill.ico" diff --git a/code/nel/tools/3d/ig_elevation/CMakeLists.txt b/code/nel/tools/3d/ig_elevation/CMakeLists.txt index fc584883c..9c3e0fe26 100644 --- a/code/nel/tools/3d/ig_elevation/CMakeLists.txt +++ b/code/nel/tools/3d/ig_elevation/CMakeLists.txt @@ -1,4 +1,6 @@ -FILE(GLOB SRC *.cpp *.h) +FILE(GLOB SRC *.cpp *.h *.rc) + +SOURCE_GROUP("" FILES ${SRC}) ADD_EXECUTABLE(ig_elevation ${SRC}) diff --git a/code/nel/tools/3d/ig_elevation/blue_pill.ico b/code/nel/tools/3d/ig_elevation/blue_pill.ico new file mode 100644 index 0000000000000000000000000000000000000000..269907ec31f3583d18d593121b4728dae9ccc757 GIT binary patch literal 3638 zcmeH|KW`I35XIlz*|+!4@tuP&V32TSMHJ}}5<(;>N>9T#pol2k@BthN$t6vwT~I}I zY23!4jbsTaC50PYBD&BmGkbgXMJ5KNLg;?dYJEFzchegpmP6?(lMwARpH&Y;gfVLqQ@I-Nql zeuS%iU^E)x@+mMJ4ly2&ak6t`iYic5psK)sSpmu^{u^x?NEtv$4y7$7Ra9?m2-J+2 zSW)2CYIV<}*cTKzz7qstNRfQT3goyZZqH*kyPmJed&`;ajXiETCIjGzRu7XkiIuhT zTYR?5V~>aU@j8spvajm5yT(KH0eiQ2toW_~Tp8aLj}_1T_8i84 zzdp;o_xlSNAHH}3^!t5$evHbC*F8iPt13`c;NPo&wRSVD-j3+O67m*UCEYJWoy^kl zJW900%~uSXj5hzSCXa~$7!?1+$m^NE3_nu2&m>dN?MhLQt59(n4~R^ zyDISgAPBgRISeIvG#7B(3F1a$BQ|Z2WuVH6_hT z9Hg%0U+&NA!x>DgE$+W4uN-b!|2~DPntxLP?&*KzCkA>3Je&aP2ykV9-=#c?^$BZc Jtd%`~!!K}6&rARS literal 0 HcmV?d00001 diff --git a/code/nel/tools/3d/ig_elevation/main.rc b/code/nel/tools/3d/ig_elevation/main.rc new file mode 100644 index 000000000..958fa5089 --- /dev/null +++ b/code/nel/tools/3d/ig_elevation/main.rc @@ -0,0 +1 @@ +IDI_MAIN_ICON ICON DISCARDABLE "blue_pill.ico" diff --git a/code/nel/tools/3d/ig_lighter/CMakeLists.txt b/code/nel/tools/3d/ig_lighter/CMakeLists.txt index 54f703566..2f9e05732 100644 --- a/code/nel/tools/3d/ig_lighter/CMakeLists.txt +++ b/code/nel/tools/3d/ig_lighter/CMakeLists.txt @@ -1,4 +1,6 @@ -FILE(GLOB SRC *.cpp *.h ../ig_lighter_lib/*.cpp ../ig_lighter_lib/*.h) +FILE(GLOB SRC *.cpp *.h ../ig_lighter_lib/*.cpp ../ig_lighter_lib/*.h *.rc) + +SOURCE_GROUP("" FILES ${SRC}) ADD_EXECUTABLE(ig_lighter ${SRC}) diff --git a/code/nel/tools/3d/ig_lighter/blue_pill.ico b/code/nel/tools/3d/ig_lighter/blue_pill.ico new file mode 100644 index 0000000000000000000000000000000000000000..269907ec31f3583d18d593121b4728dae9ccc757 GIT binary patch literal 3638 zcmeH|KW`I35XIlz*|+!4@tuP&V32TSMHJ}}5<(;>N>9T#pol2k@BthN$t6vwT~I}I zY23!4jbsTaC50PYBD&BmGkbgXMJ5KNLg;?dYJEFzchegpmP6?(lMwARpH&Y;gfVLqQ@I-Nql zeuS%iU^E)x@+mMJ4ly2&ak6t`iYic5psK)sSpmu^{u^x?NEtv$4y7$7Ra9?m2-J+2 zSW)2CYIV<}*cTKzz7qstNRfQT3goyZZqH*kyPmJed&`;ajXiETCIjGzRu7XkiIuhT zTYR?5V~>aU@j8spvajm5yT(KH0eiQ2toW_~Tp8aLj}_1T_8i84 zzdp;o_xlSNAHH}3^!t5$evHbC*F8iPt13`c;NPo&wRSVD-j3+O67m*UCEYJWoy^kl zJW900%~uSXj5hzSCXa~$7!?1+$m^NE3_nu2&m>dN?MhLQt59(n4~R^ zyDISgAPBgRISeIvG#7B(3F1a$BQ|Z2WuVH6_hT z9Hg%0U+&NA!x>DgE$+W4uN-b!|2~DPntxLP?&*KzCkA>3Je&aP2ykV9-=#c?^$BZc Jtd%`~!!K}6&rARS literal 0 HcmV?d00001 diff --git a/code/nel/tools/3d/ig_lighter/main.rc b/code/nel/tools/3d/ig_lighter/main.rc new file mode 100644 index 000000000..958fa5089 --- /dev/null +++ b/code/nel/tools/3d/ig_lighter/main.rc @@ -0,0 +1 @@ +IDI_MAIN_ICON ICON DISCARDABLE "blue_pill.ico" diff --git a/code/nel/tools/3d/lightmap_optimizer/CMakeLists.txt b/code/nel/tools/3d/lightmap_optimizer/CMakeLists.txt index 36e5b2aa4..0f2c35074 100644 --- a/code/nel/tools/3d/lightmap_optimizer/CMakeLists.txt +++ b/code/nel/tools/3d/lightmap_optimizer/CMakeLists.txt @@ -1,4 +1,6 @@ -FILE(GLOB SRC *.cpp *.h) +FILE(GLOB SRC *.cpp *.h *.rc) + +SOURCE_GROUP("" FILES ${SRC}) ADD_EXECUTABLE(lightmap_optimizer ${SRC}) diff --git a/code/nel/tools/3d/lightmap_optimizer/blue_pill.ico b/code/nel/tools/3d/lightmap_optimizer/blue_pill.ico new file mode 100644 index 0000000000000000000000000000000000000000..269907ec31f3583d18d593121b4728dae9ccc757 GIT binary patch literal 3638 zcmeH|KW`I35XIlz*|+!4@tuP&V32TSMHJ}}5<(;>N>9T#pol2k@BthN$t6vwT~I}I zY23!4jbsTaC50PYBD&BmGkbgXMJ5KNLg;?dYJEFzchegpmP6?(lMwARpH&Y;gfVLqQ@I-Nql zeuS%iU^E)x@+mMJ4ly2&ak6t`iYic5psK)sSpmu^{u^x?NEtv$4y7$7Ra9?m2-J+2 zSW)2CYIV<}*cTKzz7qstNRfQT3goyZZqH*kyPmJed&`;ajXiETCIjGzRu7XkiIuhT zTYR?5V~>aU@j8spvajm5yT(KH0eiQ2toW_~Tp8aLj}_1T_8i84 zzdp;o_xlSNAHH}3^!t5$evHbC*F8iPt13`c;NPo&wRSVD-j3+O67m*UCEYJWoy^kl zJW900%~uSXj5hzSCXa~$7!?1+$m^NE3_nu2&m>dN?MhLQt59(n4~R^ zyDISgAPBgRISeIvG#7B(3F1a$BQ|Z2WuVH6_hT z9Hg%0U+&NA!x>DgE$+W4uN-b!|2~DPntxLP?&*KzCkA>3Je&aP2ykV9-=#c?^$BZc Jtd%`~!!K}6&rARS literal 0 HcmV?d00001 diff --git a/code/nel/tools/3d/lightmap_optimizer/main.rc b/code/nel/tools/3d/lightmap_optimizer/main.rc new file mode 100644 index 000000000..958fa5089 --- /dev/null +++ b/code/nel/tools/3d/lightmap_optimizer/main.rc @@ -0,0 +1 @@ +IDI_MAIN_ICON ICON DISCARDABLE "blue_pill.ico" diff --git a/code/nel/tools/3d/mesh_export/CMakeLists.txt b/code/nel/tools/3d/mesh_export/CMakeLists.txt index 838ce49c2..3a36fa667 100644 --- a/code/nel/tools/3d/mesh_export/CMakeLists.txt +++ b/code/nel/tools/3d/mesh_export/CMakeLists.txt @@ -1,9 +1,10 @@ FILE(GLOB SRCS *.cpp) FILE(GLOB HDRS *.h) +FILE(GLOB RECS *.rc) -SOURCE_GROUP("" FILES ${SRCS} ${HDRS}) +SOURCE_GROUP("" FILES ${SRCS} ${HDRS} ${RECS}) -ADD_EXECUTABLE(mesh_export ${SRCS} ${HDRS}) +ADD_EXECUTABLE(mesh_export ${SRCS} ${HDRS} ${RECS}) TARGET_LINK_LIBRARIES(mesh_export mesh_utils nel3d nelmisc) NL_DEFAULT_PROPS(mesh_export "NeL, Tools, 3D: Mesh Export") diff --git a/code/nel/tools/3d/mesh_export/blue_pill.ico b/code/nel/tools/3d/mesh_export/blue_pill.ico new file mode 100644 index 0000000000000000000000000000000000000000..269907ec31f3583d18d593121b4728dae9ccc757 GIT binary patch literal 3638 zcmeH|KW`I35XIlz*|+!4@tuP&V32TSMHJ}}5<(;>N>9T#pol2k@BthN$t6vwT~I}I zY23!4jbsTaC50PYBD&BmGkbgXMJ5KNLg;?dYJEFzchegpmP6?(lMwARpH&Y;gfVLqQ@I-Nql zeuS%iU^E)x@+mMJ4ly2&ak6t`iYic5psK)sSpmu^{u^x?NEtv$4y7$7Ra9?m2-J+2 zSW)2CYIV<}*cTKzz7qstNRfQT3goyZZqH*kyPmJed&`;ajXiETCIjGzRu7XkiIuhT zTYR?5V~>aU@j8spvajm5yT(KH0eiQ2toW_~Tp8aLj}_1T_8i84 zzdp;o_xlSNAHH}3^!t5$evHbC*F8iPt13`c;NPo&wRSVD-j3+O67m*UCEYJWoy^kl zJW900%~uSXj5hzSCXa~$7!?1+$m^NE3_nu2&m>dN?MhLQt59(n4~R^ zyDISgAPBgRISeIvG#7B(3F1a$BQ|Z2WuVH6_hT z9Hg%0U+&NA!x>DgE$+W4uN-b!|2~DPntxLP?&*KzCkA>3Je&aP2ykV9-=#c?^$BZc Jtd%`~!!K}6&rARS literal 0 HcmV?d00001 diff --git a/code/nel/tools/3d/mesh_export/main.rc b/code/nel/tools/3d/mesh_export/main.rc new file mode 100644 index 000000000..958fa5089 --- /dev/null +++ b/code/nel/tools/3d/mesh_export/main.rc @@ -0,0 +1 @@ +IDI_MAIN_ICON ICON DISCARDABLE "blue_pill.ico" diff --git a/code/nel/tools/3d/panoply_maker/CMakeLists.txt b/code/nel/tools/3d/panoply_maker/CMakeLists.txt index 8fd25fef6..c6524a9cc 100644 --- a/code/nel/tools/3d/panoply_maker/CMakeLists.txt +++ b/code/nel/tools/3d/panoply_maker/CMakeLists.txt @@ -1,4 +1,6 @@ -FILE(GLOB SRC *.cpp *.h) +FILE(GLOB SRC *.cpp *.h *.rc) + +SOURCE_GROUP("" FILES ${SRC}) ADD_EXECUTABLE(panoply_maker ${SRC}) diff --git a/code/nel/tools/3d/panoply_maker/blue_pill.ico b/code/nel/tools/3d/panoply_maker/blue_pill.ico new file mode 100644 index 0000000000000000000000000000000000000000..269907ec31f3583d18d593121b4728dae9ccc757 GIT binary patch literal 3638 zcmeH|KW`I35XIlz*|+!4@tuP&V32TSMHJ}}5<(;>N>9T#pol2k@BthN$t6vwT~I}I zY23!4jbsTaC50PYBD&BmGkbgXMJ5KNLg;?dYJEFzchegpmP6?(lMwARpH&Y;gfVLqQ@I-Nql zeuS%iU^E)x@+mMJ4ly2&ak6t`iYic5psK)sSpmu^{u^x?NEtv$4y7$7Ra9?m2-J+2 zSW)2CYIV<}*cTKzz7qstNRfQT3goyZZqH*kyPmJed&`;ajXiETCIjGzRu7XkiIuhT zTYR?5V~>aU@j8spvajm5yT(KH0eiQ2toW_~Tp8aLj}_1T_8i84 zzdp;o_xlSNAHH}3^!t5$evHbC*F8iPt13`c;NPo&wRSVD-j3+O67m*UCEYJWoy^kl zJW900%~uSXj5hzSCXa~$7!?1+$m^NE3_nu2&m>dN?MhLQt59(n4~R^ zyDISgAPBgRISeIvG#7B(3F1a$BQ|Z2WuVH6_hT z9Hg%0U+&NA!x>DgE$+W4uN-b!|2~DPntxLP?&*KzCkA>3Je&aP2ykV9-=#c?^$BZc Jtd%`~!!K}6&rARS literal 0 HcmV?d00001 diff --git a/code/nel/tools/3d/panoply_maker/main.rc b/code/nel/tools/3d/panoply_maker/main.rc new file mode 100644 index 000000000..958fa5089 --- /dev/null +++ b/code/nel/tools/3d/panoply_maker/main.rc @@ -0,0 +1 @@ +IDI_MAIN_ICON ICON DISCARDABLE "blue_pill.ico" diff --git a/code/nel/tools/3d/shapes_exporter/CMakeLists.txt b/code/nel/tools/3d/shapes_exporter/CMakeLists.txt index 1df5eafa0..41fea6ade 100644 --- a/code/nel/tools/3d/shapes_exporter/CMakeLists.txt +++ b/code/nel/tools/3d/shapes_exporter/CMakeLists.txt @@ -1,4 +1,6 @@ -FILE(GLOB SRC *.cpp *.h) +FILE(GLOB SRC *.cpp *.h *.rc) + +SOURCE_GROUP("" FILES ${SRC}) ADD_EXECUTABLE(shapes_exporter WIN32 ${SRC}) diff --git a/code/nel/tools/3d/shapes_exporter/gold_pill.ico b/code/nel/tools/3d/shapes_exporter/gold_pill.ico new file mode 100644 index 0000000000000000000000000000000000000000..618b67a5d196bdbdc4d497a3b7ca998b79039677 GIT binary patch literal 3638 zcmeH|zityj5XQf`vv2R8lRF0=!64zvLOcRZ@(47%1EO$G7suZ;o}Ow9KWIF7uW|24qu=jCYmGObHC}wun9t{!&1Sg$ zP6MyLV>})M&yFz~jWC%^fQS2+=cprf1?md?hZP`8`Oj#}K*|8hER?sITv4;NA<$;R zq>3WH(P#z%rJ$%(X!S5zlUP+N zzr|;JJa&1AAFqXdR(y5mKwA%eZ9P`}w)9@{Sn*u(Tk&M^-mm(n@m=v)}3W?H=*(Tyb(EO1J?UWK}aqZWd!Zofe&kK&zR)e`x(xGN>9T#pol2k@BthN$t6vwT~I}I zY23!4jbsTaC50PYBD&BmGkbgXMJ5KNLg;?dYJEFzchegpmP6?(lMwARpH&Y;gfVLqQ@I-Nql zeuS%iU^E)x@+mMJ4ly2&ak6t`iYic5psK)sSpmu^{u^x?NEtv$4y7$7Ra9?m2-J+2 zSW)2CYIV<}*cTKzz7qstNRfQT3goyZZqH*kyPmJed&`;ajXiETCIjGzRu7XkiIuhT zTYR?5V~>aU@j8spvajm5yT(KH0eiQ2toW_~Tp8aLj}_1T_8i84 zzdp;o_xlSNAHH}3^!t5$evHbC*F8iPt13`c;NPo&wRSVD-j3+O67m*UCEYJWoy^kl zJW900%~uSXj5hzSCXa~$7!?1+$m^NE3_nu2&m>dN?MhLQt59(n4~R^ zyDISgAPBgRISeIvG#7B(3F1a$BQ|Z2WuVH6_hT z9Hg%0U+&NA!x>DgE$+W4uN-b!|2~DPntxLP?&*KzCkA>3Je&aP2ykV9-=#c?^$BZc Jtd%`~!!K}6&rARS literal 0 HcmV?d00001 diff --git a/code/nel/tools/3d/tga_2_dds/main.rc b/code/nel/tools/3d/tga_2_dds/main.rc new file mode 100644 index 000000000..958fa5089 --- /dev/null +++ b/code/nel/tools/3d/tga_2_dds/main.rc @@ -0,0 +1 @@ +IDI_MAIN_ICON ICON DISCARDABLE "blue_pill.ico" diff --git a/code/nel/tools/3d/tga_cut/CMakeLists.txt b/code/nel/tools/3d/tga_cut/CMakeLists.txt index 6d0147328..d7fc886c4 100644 --- a/code/nel/tools/3d/tga_cut/CMakeLists.txt +++ b/code/nel/tools/3d/tga_cut/CMakeLists.txt @@ -1,4 +1,6 @@ -FILE(GLOB SRC *.cpp *.h) +FILE(GLOB SRC *.cpp *.h *.rc) + +SOURCE_GROUP("" FILES ${SRC}) ADD_EXECUTABLE(tga_cut ${SRC}) diff --git a/code/nel/tools/3d/tga_cut/blue_pill.ico b/code/nel/tools/3d/tga_cut/blue_pill.ico new file mode 100644 index 0000000000000000000000000000000000000000..269907ec31f3583d18d593121b4728dae9ccc757 GIT binary patch literal 3638 zcmeH|KW`I35XIlz*|+!4@tuP&V32TSMHJ}}5<(;>N>9T#pol2k@BthN$t6vwT~I}I zY23!4jbsTaC50PYBD&BmGkbgXMJ5KNLg;?dYJEFzchegpmP6?(lMwARpH&Y;gfVLqQ@I-Nql zeuS%iU^E)x@+mMJ4ly2&ak6t`iYic5psK)sSpmu^{u^x?NEtv$4y7$7Ra9?m2-J+2 zSW)2CYIV<}*cTKzz7qstNRfQT3goyZZqH*kyPmJed&`;ajXiETCIjGzRu7XkiIuhT zTYR?5V~>aU@j8spvajm5yT(KH0eiQ2toW_~Tp8aLj}_1T_8i84 zzdp;o_xlSNAHH}3^!t5$evHbC*F8iPt13`c;NPo&wRSVD-j3+O67m*UCEYJWoy^kl zJW900%~uSXj5hzSCXa~$7!?1+$m^NE3_nu2&m>dN?MhLQt59(n4~R^ zyDISgAPBgRISeIvG#7B(3F1a$BQ|Z2WuVH6_hT z9Hg%0U+&NA!x>DgE$+W4uN-b!|2~DPntxLP?&*KzCkA>3Je&aP2ykV9-=#c?^$BZc Jtd%`~!!K}6&rARS literal 0 HcmV?d00001 diff --git a/code/nel/tools/3d/tga_cut/main.rc b/code/nel/tools/3d/tga_cut/main.rc new file mode 100644 index 000000000..958fa5089 --- /dev/null +++ b/code/nel/tools/3d/tga_cut/main.rc @@ -0,0 +1 @@ +IDI_MAIN_ICON ICON DISCARDABLE "blue_pill.ico" diff --git a/code/nel/tools/3d/unbuild_interface/CMakeLists.txt b/code/nel/tools/3d/unbuild_interface/CMakeLists.txt index 2a10976d3..8befed3f4 100644 --- a/code/nel/tools/3d/unbuild_interface/CMakeLists.txt +++ b/code/nel/tools/3d/unbuild_interface/CMakeLists.txt @@ -1,11 +1,11 @@ -FILE(GLOB SRC *.cpp *.h) +FILE(GLOB SRC *.cpp *.h *.rc) SOURCE_GROUP("" FILES ${SRC}) ADD_EXECUTABLE(unbuild_interface ${SRC}) TARGET_LINK_LIBRARIES(unbuild_interface nelmisc) -NL_DEFAULT_PROPS(unbuild_interface "NeL, Tools, 3D: unbuild_interface") +NL_DEFAULT_PROPS(unbuild_interface "NeL, Tools, 3D: Unbuild Interface") NL_ADD_RUNTIME_FLAGS(unbuild_interface) INSTALL(TARGETS unbuild_interface RUNTIME DESTINATION bin COMPONENT tools3d) diff --git a/code/nel/tools/3d/unbuild_interface/gold_pill.ico b/code/nel/tools/3d/unbuild_interface/gold_pill.ico new file mode 100644 index 0000000000000000000000000000000000000000..618b67a5d196bdbdc4d497a3b7ca998b79039677 GIT binary patch literal 3638 zcmeH|zityj5XQf`vv2R8lRF0=!64zvLOcRZ@(47%1EO$G7suZ;o}Ow9KWIF7uW|24qu=jCYmGObHC}wun9t{!&1Sg$ zP6MyLV>})M&yFz~jWC%^fQS2+=cprf1?md?hZP`8`Oj#}K*|8hER?sITv4;NA<$;R zq>3WH(P#z%rJ$%(X!S5zlUP+N zzr|;JJa&1AAFqXdR(y5mKwA%eZ9P`}w)9@{Sn*u(Tk&M^-mm(n@m=v)}3W?H=*(Tyb(EO1J?UWK}aqZWd!Zofe&kK&zR)e`x(xGN>9T#pol2k@BthN$t6vwT~I}I zY23!4jbsTaC50PYBD&BmGkbgXMJ5KNLg;?dYJEFzchegpmP6?(lMwARpH&Y;gfVLqQ@I-Nql zeuS%iU^E)x@+mMJ4ly2&ak6t`iYic5psK)sSpmu^{u^x?NEtv$4y7$7Ra9?m2-J+2 zSW)2CYIV<}*cTKzz7qstNRfQT3goyZZqH*kyPmJed&`;ajXiETCIjGzRu7XkiIuhT zTYR?5V~>aU@j8spvajm5yT(KH0eiQ2toW_~Tp8aLj}_1T_8i84 zzdp;o_xlSNAHH}3^!t5$evHbC*F8iPt13`c;NPo&wRSVD-j3+O67m*UCEYJWoy^kl zJW900%~uSXj5hzSCXa~$7!?1+$m^NE3_nu2&m>dN?MhLQt59(n4~R^ zyDISgAPBgRISeIvG#7B(3F1a$BQ|Z2WuVH6_hT z9Hg%0U+&NA!x>DgE$+W4uN-b!|2~DPntxLP?&*KzCkA>3Je&aP2ykV9-=#c?^$BZc Jtd%`~!!K}6&rARS literal 0 HcmV?d00001 diff --git a/code/nel/tools/3d/zone_dependencies/main.rc b/code/nel/tools/3d/zone_dependencies/main.rc new file mode 100644 index 000000000..958fa5089 --- /dev/null +++ b/code/nel/tools/3d/zone_dependencies/main.rc @@ -0,0 +1 @@ +IDI_MAIN_ICON ICON DISCARDABLE "blue_pill.ico" diff --git a/code/nel/tools/3d/zone_ig_lighter/CMakeLists.txt b/code/nel/tools/3d/zone_ig_lighter/CMakeLists.txt index 30f84cea8..21b332612 100644 --- a/code/nel/tools/3d/zone_ig_lighter/CMakeLists.txt +++ b/code/nel/tools/3d/zone_ig_lighter/CMakeLists.txt @@ -1,4 +1,6 @@ -FILE(GLOB SRC *.cpp *.h ../zone_lib/*.cpp ../zone_lib/*.h) +FILE(GLOB SRC *.cpp *.h ../zone_lib/*.cpp ../zone_lib/*.h *.rc) + +SOURCE_GROUP("" FILES ${SRC}) ADD_EXECUTABLE(zone_ig_lighter ${SRC}) diff --git a/code/nel/tools/3d/zone_ig_lighter/blue_pill.ico b/code/nel/tools/3d/zone_ig_lighter/blue_pill.ico new file mode 100644 index 0000000000000000000000000000000000000000..269907ec31f3583d18d593121b4728dae9ccc757 GIT binary patch literal 3638 zcmeH|KW`I35XIlz*|+!4@tuP&V32TSMHJ}}5<(;>N>9T#pol2k@BthN$t6vwT~I}I zY23!4jbsTaC50PYBD&BmGkbgXMJ5KNLg;?dYJEFzchegpmP6?(lMwARpH&Y;gfVLqQ@I-Nql zeuS%iU^E)x@+mMJ4ly2&ak6t`iYic5psK)sSpmu^{u^x?NEtv$4y7$7Ra9?m2-J+2 zSW)2CYIV<}*cTKzz7qstNRfQT3goyZZqH*kyPmJed&`;ajXiETCIjGzRu7XkiIuhT zTYR?5V~>aU@j8spvajm5yT(KH0eiQ2toW_~Tp8aLj}_1T_8i84 zzdp;o_xlSNAHH}3^!t5$evHbC*F8iPt13`c;NPo&wRSVD-j3+O67m*UCEYJWoy^kl zJW900%~uSXj5hzSCXa~$7!?1+$m^NE3_nu2&m>dN?MhLQt59(n4~R^ zyDISgAPBgRISeIvG#7B(3F1a$BQ|Z2WuVH6_hT z9Hg%0U+&NA!x>DgE$+W4uN-b!|2~DPntxLP?&*KzCkA>3Je&aP2ykV9-=#c?^$BZc Jtd%`~!!K}6&rARS literal 0 HcmV?d00001 diff --git a/code/nel/tools/3d/zone_ig_lighter/main.rc b/code/nel/tools/3d/zone_ig_lighter/main.rc new file mode 100644 index 000000000..958fa5089 --- /dev/null +++ b/code/nel/tools/3d/zone_ig_lighter/main.rc @@ -0,0 +1 @@ +IDI_MAIN_ICON ICON DISCARDABLE "blue_pill.ico" diff --git a/code/nel/tools/3d/zone_lighter/CMakeLists.txt b/code/nel/tools/3d/zone_lighter/CMakeLists.txt index e0c15f9e8..2fe58d3a2 100644 --- a/code/nel/tools/3d/zone_lighter/CMakeLists.txt +++ b/code/nel/tools/3d/zone_lighter/CMakeLists.txt @@ -1,4 +1,6 @@ -FILE(GLOB SRC *.cpp *.h ../zone_lib/*.cpp ../zone_lib/*.h) +FILE(GLOB SRC *.cpp *.h ../zone_lib/*.cpp ../zone_lib/*.h *.rc) + +SOURCE_GROUP("" FILES ${SRC}) ADD_EXECUTABLE(zone_lighter ${SRC}) diff --git a/code/nel/tools/3d/zone_lighter/blue_pill.ico b/code/nel/tools/3d/zone_lighter/blue_pill.ico new file mode 100644 index 0000000000000000000000000000000000000000..269907ec31f3583d18d593121b4728dae9ccc757 GIT binary patch literal 3638 zcmeH|KW`I35XIlz*|+!4@tuP&V32TSMHJ}}5<(;>N>9T#pol2k@BthN$t6vwT~I}I zY23!4jbsTaC50PYBD&BmGkbgXMJ5KNLg;?dYJEFzchegpmP6?(lMwARpH&Y;gfVLqQ@I-Nql zeuS%iU^E)x@+mMJ4ly2&ak6t`iYic5psK)sSpmu^{u^x?NEtv$4y7$7Ra9?m2-J+2 zSW)2CYIV<}*cTKzz7qstNRfQT3goyZZqH*kyPmJed&`;ajXiETCIjGzRu7XkiIuhT zTYR?5V~>aU@j8spvajm5yT(KH0eiQ2toW_~Tp8aLj}_1T_8i84 zzdp;o_xlSNAHH}3^!t5$evHbC*F8iPt13`c;NPo&wRSVD-j3+O67m*UCEYJWoy^kl zJW900%~uSXj5hzSCXa~$7!?1+$m^NE3_nu2&m>dN?MhLQt59(n4~R^ zyDISgAPBgRISeIvG#7B(3F1a$BQ|Z2WuVH6_hT z9Hg%0U+&NA!x>DgE$+W4uN-b!|2~DPntxLP?&*KzCkA>3Je&aP2ykV9-=#c?^$BZc Jtd%`~!!K}6&rARS literal 0 HcmV?d00001 diff --git a/code/nel/tools/3d/zone_lighter/main.rc b/code/nel/tools/3d/zone_lighter/main.rc new file mode 100644 index 000000000..958fa5089 --- /dev/null +++ b/code/nel/tools/3d/zone_lighter/main.rc @@ -0,0 +1 @@ +IDI_MAIN_ICON ICON DISCARDABLE "blue_pill.ico" diff --git a/code/nel/tools/3d/zone_welder/CMakeLists.txt b/code/nel/tools/3d/zone_welder/CMakeLists.txt index 396d22f58..a236627a0 100644 --- a/code/nel/tools/3d/zone_welder/CMakeLists.txt +++ b/code/nel/tools/3d/zone_welder/CMakeLists.txt @@ -1,4 +1,6 @@ -FILE(GLOB SRC *.cpp *.h ../zone_lib/*.cpp ../zone_lib/*.h) +FILE(GLOB SRC *.cpp *.h ../zone_lib/*.cpp ../zone_lib/*.h *.rc) + +SOURCE_GROUP("" FILES ${SRC}) ADD_EXECUTABLE(zone_welder ${SRC}) diff --git a/code/nel/tools/3d/zone_welder/blue_pill.ico b/code/nel/tools/3d/zone_welder/blue_pill.ico new file mode 100644 index 0000000000000000000000000000000000000000..269907ec31f3583d18d593121b4728dae9ccc757 GIT binary patch literal 3638 zcmeH|KW`I35XIlz*|+!4@tuP&V32TSMHJ}}5<(;>N>9T#pol2k@BthN$t6vwT~I}I zY23!4jbsTaC50PYBD&BmGkbgXMJ5KNLg;?dYJEFzchegpmP6?(lMwARpH&Y;gfVLqQ@I-Nql zeuS%iU^E)x@+mMJ4ly2&ak6t`iYic5psK)sSpmu^{u^x?NEtv$4y7$7Ra9?m2-J+2 zSW)2CYIV<}*cTKzz7qstNRfQT3goyZZqH*kyPmJed&`;ajXiETCIjGzRu7XkiIuhT zTYR?5V~>aU@j8spvajm5yT(KH0eiQ2toW_~Tp8aLj}_1T_8i84 zzdp;o_xlSNAHH}3^!t5$evHbC*F8iPt13`c;NPo&wRSVD-j3+O67m*UCEYJWoy^kl zJW900%~uSXj5hzSCXa~$7!?1+$m^NE3_nu2&m>dN?MhLQt59(n4~R^ zyDISgAPBgRISeIvG#7B(3F1a$BQ|Z2WuVH6_hT z9Hg%0U+&NA!x>DgE$+W4uN-b!|2~DPntxLP?&*KzCkA>3Je&aP2ykV9-=#c?^$BZc Jtd%`~!!K}6&rARS literal 0 HcmV?d00001 diff --git a/code/nel/tools/3d/zone_welder/main.rc b/code/nel/tools/3d/zone_welder/main.rc new file mode 100644 index 000000000..958fa5089 --- /dev/null +++ b/code/nel/tools/3d/zone_welder/main.rc @@ -0,0 +1 @@ +IDI_MAIN_ICON ICON DISCARDABLE "blue_pill.ico" diff --git a/code/nel/tools/misc/bnp_make/CMakeLists.txt b/code/nel/tools/misc/bnp_make/CMakeLists.txt index d27252fb6..a917d4e1d 100644 --- a/code/nel/tools/misc/bnp_make/CMakeLists.txt +++ b/code/nel/tools/misc/bnp_make/CMakeLists.txt @@ -1,4 +1,6 @@ -FILE(GLOB SRC *.cpp *.h) +FILE(GLOB SRC *.cpp *.h *.rc) + +SOURCE_GROUP("" FILES ${SRC}) ADD_EXECUTABLE(bnp_make ${SRC}) diff --git a/code/nel/tools/misc/bnp_make/blue_pill.ico b/code/nel/tools/misc/bnp_make/blue_pill.ico new file mode 100644 index 0000000000000000000000000000000000000000..269907ec31f3583d18d593121b4728dae9ccc757 GIT binary patch literal 3638 zcmeH|KW`I35XIlz*|+!4@tuP&V32TSMHJ}}5<(;>N>9T#pol2k@BthN$t6vwT~I}I zY23!4jbsTaC50PYBD&BmGkbgXMJ5KNLg;?dYJEFzchegpmP6?(lMwARpH&Y;gfVLqQ@I-Nql zeuS%iU^E)x@+mMJ4ly2&ak6t`iYic5psK)sSpmu^{u^x?NEtv$4y7$7Ra9?m2-J+2 zSW)2CYIV<}*cTKzz7qstNRfQT3goyZZqH*kyPmJed&`;ajXiETCIjGzRu7XkiIuhT zTYR?5V~>aU@j8spvajm5yT(KH0eiQ2toW_~Tp8aLj}_1T_8i84 zzdp;o_xlSNAHH}3^!t5$evHbC*F8iPt13`c;NPo&wRSVD-j3+O67m*UCEYJWoy^kl zJW900%~uSXj5hzSCXa~$7!?1+$m^NE3_nu2&m>dN?MhLQt59(n4~R^ zyDISgAPBgRISeIvG#7B(3F1a$BQ|Z2WuVH6_hT z9Hg%0U+&NA!x>DgE$+W4uN-b!|2~DPntxLP?&*KzCkA>3Je&aP2ykV9-=#c?^$BZc Jtd%`~!!K}6&rARS literal 0 HcmV?d00001 diff --git a/code/nel/tools/misc/bnp_make/main.rc b/code/nel/tools/misc/bnp_make/main.rc new file mode 100644 index 000000000..958fa5089 --- /dev/null +++ b/code/nel/tools/misc/bnp_make/main.rc @@ -0,0 +1 @@ +IDI_MAIN_ICON ICON DISCARDABLE "blue_pill.ico" diff --git a/code/nel/tools/misc/exec_timeout/CMakeLists.txt b/code/nel/tools/misc/exec_timeout/CMakeLists.txt index 18654e169..75f4329f0 100644 --- a/code/nel/tools/misc/exec_timeout/CMakeLists.txt +++ b/code/nel/tools/misc/exec_timeout/CMakeLists.txt @@ -1,4 +1,6 @@ -FILE(GLOB SRC *.cpp *.h) +FILE(GLOB SRC *.cpp *.h *.rc) + +SOURCE_GROUP("" FILES ${SRC}) ADD_EXECUTABLE(exec_timeout ${SRC}) diff --git a/code/nel/tools/misc/exec_timeout/main.rc b/code/nel/tools/misc/exec_timeout/main.rc new file mode 100644 index 000000000..608225e47 --- /dev/null +++ b/code/nel/tools/misc/exec_timeout/main.rc @@ -0,0 +1 @@ +IDI_MAIN_ICON ICON DISCARDABLE "yellow_pill.ico" diff --git a/code/nel/tools/misc/exec_timeout/yellow_pill.ico b/code/nel/tools/misc/exec_timeout/yellow_pill.ico new file mode 100644 index 0000000000000000000000000000000000000000..a8056d9d20a3d6259ae7f6bb5c71503c18cd587b GIT binary patch literal 3638 zcmeH~zlsx46vn?Zlgyoe*`3LnQKMk0Ao~*f2HN-zVv$$atx{T9r?T1(H=r-Y2<{Zf{SK{e+}OBEQq=27#oZ zV#Eu*D2iiA^lNG$o^R{!d33YO=hf%__$8BP91RTru!!)P0rdB_z&yE=P8S2M7 zq0g$X-eXt~Ex%chRllvhS3OoeSN&E!S-tm5d2W4IJ=S{e#}C$j@&29lUVQ#!eHd?E zV=|cluNJKr?|cz$vF$+Hfq$+8&f4v=eL0ca8zflclya+y3=79F2vi|An%tBkcl3*) z3S@A-!9WT(xUxJiSeJtixmGife(cCH6-dYTjE*XY)hr5 literal 0 HcmV?d00001 diff --git a/code/nel/tools/misc/make_sheet_id/CMakeLists.txt b/code/nel/tools/misc/make_sheet_id/CMakeLists.txt index 553f7fddb..9c779f08e 100644 --- a/code/nel/tools/misc/make_sheet_id/CMakeLists.txt +++ b/code/nel/tools/misc/make_sheet_id/CMakeLists.txt @@ -1,4 +1,6 @@ -FILE(GLOB SRC *.cpp *.h) +FILE(GLOB SRC *.cpp *.h *.rc) + +SOURCE_GROUP("" FILES ${SRC}) ADD_EXECUTABLE(make_sheet_id ${SRC}) diff --git a/code/nel/tools/misc/make_sheet_id/blue_pill.ico b/code/nel/tools/misc/make_sheet_id/blue_pill.ico new file mode 100644 index 0000000000000000000000000000000000000000..269907ec31f3583d18d593121b4728dae9ccc757 GIT binary patch literal 3638 zcmeH|KW`I35XIlz*|+!4@tuP&V32TSMHJ}}5<(;>N>9T#pol2k@BthN$t6vwT~I}I zY23!4jbsTaC50PYBD&BmGkbgXMJ5KNLg;?dYJEFzchegpmP6?(lMwARpH&Y;gfVLqQ@I-Nql zeuS%iU^E)x@+mMJ4ly2&ak6t`iYic5psK)sSpmu^{u^x?NEtv$4y7$7Ra9?m2-J+2 zSW)2CYIV<}*cTKzz7qstNRfQT3goyZZqH*kyPmJed&`;ajXiETCIjGzRu7XkiIuhT zTYR?5V~>aU@j8spvajm5yT(KH0eiQ2toW_~Tp8aLj}_1T_8i84 zzdp;o_xlSNAHH}3^!t5$evHbC*F8iPt13`c;NPo&wRSVD-j3+O67m*UCEYJWoy^kl zJW900%~uSXj5hzSCXa~$7!?1+$m^NE3_nu2&m>dN?MhLQt59(n4~R^ zyDISgAPBgRISeIvG#7B(3F1a$BQ|Z2WuVH6_hT z9Hg%0U+&NA!x>DgE$+W4uN-b!|2~DPntxLP?&*KzCkA>3Je&aP2ykV9-=#c?^$BZc Jtd%`~!!K}6&rARS literal 0 HcmV?d00001 diff --git a/code/nel/tools/misc/make_sheet_id/main.rc b/code/nel/tools/misc/make_sheet_id/main.rc new file mode 100644 index 000000000..958fa5089 --- /dev/null +++ b/code/nel/tools/misc/make_sheet_id/main.rc @@ -0,0 +1 @@ +IDI_MAIN_ICON ICON DISCARDABLE "blue_pill.ico" diff --git a/code/nel/tools/misc/message_box/CMakeLists.txt b/code/nel/tools/misc/message_box/CMakeLists.txt index 764071d9d..4833b9264 100644 --- a/code/nel/tools/misc/message_box/CMakeLists.txt +++ b/code/nel/tools/misc/message_box/CMakeLists.txt @@ -1,4 +1,6 @@ -FILE(GLOB SRC *.cpp *.h) +FILE(GLOB SRC *.cpp *.h *.rc) + +SOURCE_GROUP("" FILES ${SRC}) ADD_EXECUTABLE(message_box WIN32 ${SRC}) diff --git a/code/nel/tools/misc/message_box/main.rc b/code/nel/tools/misc/message_box/main.rc new file mode 100644 index 000000000..608225e47 --- /dev/null +++ b/code/nel/tools/misc/message_box/main.rc @@ -0,0 +1 @@ +IDI_MAIN_ICON ICON DISCARDABLE "yellow_pill.ico" diff --git a/code/nel/tools/misc/message_box/yellow_pill.ico b/code/nel/tools/misc/message_box/yellow_pill.ico new file mode 100644 index 0000000000000000000000000000000000000000..a8056d9d20a3d6259ae7f6bb5c71503c18cd587b GIT binary patch literal 3638 zcmeH~zlsx46vn?Zlgyoe*`3LnQKMk0Ao~*f2HN-zVv$$atx{T9r?T1(H=r-Y2<{Zf{SK{e+}OBEQq=27#oZ zV#Eu*D2iiA^lNG$o^R{!d33YO=hf%__$8BP91RTru!!)P0rdB_z&yE=P8S2M7 zq0g$X-eXt~Ex%chRllvhS3OoeSN&E!S-tm5d2W4IJ=S{e#}C$j@&29lUVQ#!eHd?E zV=|cluNJKr?|cz$vF$+Hfq$+8&f4v=eL0ca8zflclya+y3=79F2vi|An%tBkcl3*) z3S@A-!9WT(xUxJiSeJtixmGife(cCH6-dYTjE*XY)hr5 literal 0 HcmV?d00001 diff --git a/code/nel/tools/misc/message_box_qt/CMakeLists.txt b/code/nel/tools/misc/message_box_qt/CMakeLists.txt index be4dd2b63..a21ef6cf7 100644 --- a/code/nel/tools/misc/message_box_qt/CMakeLists.txt +++ b/code/nel/tools/misc/message_box_qt/CMakeLists.txt @@ -5,7 +5,9 @@ ENDIF() INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}) -FILE(GLOB MESSAGE_BOX_SRC *.cpp) +FILE(GLOB MESSAGE_BOX_SRC *.cpp *.h *.rc) + +SOURCE_GROUP("" FILES ${MESSAGE_BOX_SRC}) SET( QT_USE_QT3SUPPORT TRUE) SET( QT_USE_QTXML TRUE) diff --git a/code/nel/tools/misc/message_box_qt/main.rc b/code/nel/tools/misc/message_box_qt/main.rc new file mode 100644 index 000000000..608225e47 --- /dev/null +++ b/code/nel/tools/misc/message_box_qt/main.rc @@ -0,0 +1 @@ +IDI_MAIN_ICON ICON DISCARDABLE "yellow_pill.ico" diff --git a/code/nel/tools/misc/message_box_qt/yellow_pill.ico b/code/nel/tools/misc/message_box_qt/yellow_pill.ico new file mode 100644 index 0000000000000000000000000000000000000000..a8056d9d20a3d6259ae7f6bb5c71503c18cd587b GIT binary patch literal 3638 zcmeH~zlsx46vn?Zlgyoe*`3LnQKMk0Ao~*f2HN-zVv$$atx{T9r?T1(H=r-Y2<{Zf{SK{e+}OBEQq=27#oZ zV#Eu*D2iiA^lNG$o^R{!d33YO=hf%__$8BP91RTru!!)P0rdB_z&yE=P8S2M7 zq0g$X-eXt~Ex%chRllvhS3OoeSN&E!S-tm5d2W4IJ=S{e#}C$j@&29lUVQ#!eHd?E zV=|cluNJKr?|cz$vF$+Hfq$+8&f4v=eL0ca8zflclya+y3=79F2vi|An%tBkcl3*) z3S@A-!9WT(xUxJiSeJtixmGife(cCH6-dYTjE*XY)hr5 literal 0 HcmV?d00001 diff --git a/code/nel/tools/pacs/build_ig_boxes/CMakeLists.txt b/code/nel/tools/pacs/build_ig_boxes/CMakeLists.txt index fb2feedbe..cfeb3069e 100644 --- a/code/nel/tools/pacs/build_ig_boxes/CMakeLists.txt +++ b/code/nel/tools/pacs/build_ig_boxes/CMakeLists.txt @@ -1,4 +1,6 @@ -FILE(GLOB SRC *.cpp *.h) +FILE(GLOB SRC *.cpp *.h *.rc) + +SOURCE_GROUP("" FILES ${SRC}) ADD_EXECUTABLE(build_ig_boxes ${SRC}) diff --git a/code/nel/tools/pacs/build_indoor_rbank/CMakeLists.txt b/code/nel/tools/pacs/build_indoor_rbank/CMakeLists.txt index 85f1984bf..4d39639a2 100644 --- a/code/nel/tools/pacs/build_indoor_rbank/CMakeLists.txt +++ b/code/nel/tools/pacs/build_indoor_rbank/CMakeLists.txt @@ -1,4 +1,6 @@ -FILE(GLOB SRC *.cpp *.h) +FILE(GLOB SRC *.cpp *.h *.rc) + +SOURCE_GROUP("" FILES ${SRC}) ADD_EXECUTABLE(build_indoor_rbank ${SRC}) diff --git a/code/nel/tools/pacs/build_rbank/CMakeLists.txt b/code/nel/tools/pacs/build_rbank/CMakeLists.txt index 65e86394d..9b493b762 100644 --- a/code/nel/tools/pacs/build_rbank/CMakeLists.txt +++ b/code/nel/tools/pacs/build_rbank/CMakeLists.txt @@ -1,4 +1,6 @@ -FILE(GLOB SRC *.cpp *.h) +FILE(GLOB SRC *.cpp *.h *.rc) + +SOURCE_GROUP("" FILES ${SRC}) ADD_EXECUTABLE(build_rbank ${SRC}) diff --git a/code/ryzom/tools/client/r2_islands_textures/CMakeLists.txt b/code/ryzom/tools/client/r2_islands_textures/CMakeLists.txt index 76be43bc8..84de94439 100644 --- a/code/ryzom/tools/client/r2_islands_textures/CMakeLists.txt +++ b/code/ryzom/tools/client/r2_islands_textures/CMakeLists.txt @@ -1,4 +1,6 @@ -FILE(GLOB SRC *.cpp *.h) +FILE(GLOB SRC *.cpp *.h *.rc) + +SOURCE_GROUP("" FILES ${SRC}) ADD_EXECUTABLE(r2_islands_textures ${SRC}) diff --git a/code/ryzom/tools/client/r2_islands_textures/blue_pill.ico b/code/ryzom/tools/client/r2_islands_textures/blue_pill.ico new file mode 100644 index 0000000000000000000000000000000000000000..269907ec31f3583d18d593121b4728dae9ccc757 GIT binary patch literal 3638 zcmeH|KW`I35XIlz*|+!4@tuP&V32TSMHJ}}5<(;>N>9T#pol2k@BthN$t6vwT~I}I zY23!4jbsTaC50PYBD&BmGkbgXMJ5KNLg;?dYJEFzchegpmP6?(lMwARpH&Y;gfVLqQ@I-Nql zeuS%iU^E)x@+mMJ4ly2&ak6t`iYic5psK)sSpmu^{u^x?NEtv$4y7$7Ra9?m2-J+2 zSW)2CYIV<}*cTKzz7qstNRfQT3goyZZqH*kyPmJed&`;ajXiETCIjGzRu7XkiIuhT zTYR?5V~>aU@j8spvajm5yT(KH0eiQ2toW_~Tp8aLj}_1T_8i84 zzdp;o_xlSNAHH}3^!t5$evHbC*F8iPt13`c;NPo&wRSVD-j3+O67m*UCEYJWoy^kl zJW900%~uSXj5hzSCXa~$7!?1+$m^NE3_nu2&m>dN?MhLQt59(n4~R^ zyDISgAPBgRISeIvG#7B(3F1a$BQ|Z2WuVH6_hT z9Hg%0U+&NA!x>DgE$+W4uN-b!|2~DPntxLP?&*KzCkA>3Je&aP2ykV9-=#c?^$BZc Jtd%`~!!K}6&rARS literal 0 HcmV?d00001 diff --git a/code/ryzom/tools/client/r2_islands_textures/main.rc b/code/ryzom/tools/client/r2_islands_textures/main.rc new file mode 100644 index 000000000..958fa5089 --- /dev/null +++ b/code/ryzom/tools/client/r2_islands_textures/main.rc @@ -0,0 +1 @@ +IDI_MAIN_ICON ICON DISCARDABLE "blue_pill.ico" diff --git a/code/ryzom/tools/leveldesign/prim_export/CMakeLists.txt b/code/ryzom/tools/leveldesign/prim_export/CMakeLists.txt index 8fbd3912e..4902ee92b 100644 --- a/code/ryzom/tools/leveldesign/prim_export/CMakeLists.txt +++ b/code/ryzom/tools/leveldesign/prim_export/CMakeLists.txt @@ -1,4 +1,6 @@ -FILE(GLOB SRC *.cpp *.h) +FILE(GLOB SRC *.cpp *.h *.rc) + +SOURCE_GROUP("" FILES ${SRC}) ADD_EXECUTABLE(prim_export ${SRC}) diff --git a/code/ryzom/tools/leveldesign/prim_export/blue_pill.ico b/code/ryzom/tools/leveldesign/prim_export/blue_pill.ico new file mode 100644 index 0000000000000000000000000000000000000000..269907ec31f3583d18d593121b4728dae9ccc757 GIT binary patch literal 3638 zcmeH|KW`I35XIlz*|+!4@tuP&V32TSMHJ}}5<(;>N>9T#pol2k@BthN$t6vwT~I}I zY23!4jbsTaC50PYBD&BmGkbgXMJ5KNLg;?dYJEFzchegpmP6?(lMwARpH&Y;gfVLqQ@I-Nql zeuS%iU^E)x@+mMJ4ly2&ak6t`iYic5psK)sSpmu^{u^x?NEtv$4y7$7Ra9?m2-J+2 zSW)2CYIV<}*cTKzz7qstNRfQT3goyZZqH*kyPmJed&`;ajXiETCIjGzRu7XkiIuhT zTYR?5V~>aU@j8spvajm5yT(KH0eiQ2toW_~Tp8aLj}_1T_8i84 zzdp;o_xlSNAHH}3^!t5$evHbC*F8iPt13`c;NPo&wRSVD-j3+O67m*UCEYJWoy^kl zJW900%~uSXj5hzSCXa~$7!?1+$m^NE3_nu2&m>dN?MhLQt59(n4~R^ zyDISgAPBgRISeIvG#7B(3F1a$BQ|Z2WuVH6_hT z9Hg%0U+&NA!x>DgE$+W4uN-b!|2~DPntxLP?&*KzCkA>3Je&aP2ykV9-=#c?^$BZc Jtd%`~!!K}6&rARS literal 0 HcmV?d00001 diff --git a/code/ryzom/tools/leveldesign/prim_export/main.rc b/code/ryzom/tools/leveldesign/prim_export/main.rc new file mode 100644 index 000000000..958fa5089 --- /dev/null +++ b/code/ryzom/tools/leveldesign/prim_export/main.rc @@ -0,0 +1 @@ +IDI_MAIN_ICON ICON DISCARDABLE "blue_pill.ico" diff --git a/code/ryzom/tools/leveldesign/world_editor/land_export/CMakeLists.txt b/code/ryzom/tools/leveldesign/world_editor/land_export/CMakeLists.txt index e1f7fe88c..f51b470db 100644 --- a/code/ryzom/tools/leveldesign/world_editor/land_export/CMakeLists.txt +++ b/code/ryzom/tools/leveldesign/world_editor/land_export/CMakeLists.txt @@ -1,4 +1,6 @@ -FILE(GLOB SRC *.cpp *.h) +FILE(GLOB SRC *.cpp *.h *.rc) + +SOURCE_GROUP("" FILES ${SRC}) ADD_EXECUTABLE(land_export ${SRC}) diff --git a/code/ryzom/tools/leveldesign/world_editor/land_export/blue_pill.ico b/code/ryzom/tools/leveldesign/world_editor/land_export/blue_pill.ico new file mode 100644 index 0000000000000000000000000000000000000000..269907ec31f3583d18d593121b4728dae9ccc757 GIT binary patch literal 3638 zcmeH|KW`I35XIlz*|+!4@tuP&V32TSMHJ}}5<(;>N>9T#pol2k@BthN$t6vwT~I}I zY23!4jbsTaC50PYBD&BmGkbgXMJ5KNLg;?dYJEFzchegpmP6?(lMwARpH&Y;gfVLqQ@I-Nql zeuS%iU^E)x@+mMJ4ly2&ak6t`iYic5psK)sSpmu^{u^x?NEtv$4y7$7Ra9?m2-J+2 zSW)2CYIV<}*cTKzz7qstNRfQT3goyZZqH*kyPmJed&`;ajXiETCIjGzRu7XkiIuhT zTYR?5V~>aU@j8spvajm5yT(KH0eiQ2toW_~Tp8aLj}_1T_8i84 zzdp;o_xlSNAHH}3^!t5$evHbC*F8iPt13`c;NPo&wRSVD-j3+O67m*UCEYJWoy^kl zJW900%~uSXj5hzSCXa~$7!?1+$m^NE3_nu2&m>dN?MhLQt59(n4~R^ zyDISgAPBgRISeIvG#7B(3F1a$BQ|Z2WuVH6_hT z9Hg%0U+&NA!x>DgE$+W4uN-b!|2~DPntxLP?&*KzCkA>3Je&aP2ykV9-=#c?^$BZc Jtd%`~!!K}6&rARS literal 0 HcmV?d00001 diff --git a/code/ryzom/tools/leveldesign/world_editor/land_export/main.rc b/code/ryzom/tools/leveldesign/world_editor/land_export/main.rc new file mode 100644 index 000000000..958fa5089 --- /dev/null +++ b/code/ryzom/tools/leveldesign/world_editor/land_export/main.rc @@ -0,0 +1 @@ +IDI_MAIN_ICON ICON DISCARDABLE "blue_pill.ico" diff --git a/code/ryzom/tools/patch_gen/CMakeLists.txt b/code/ryzom/tools/patch_gen/CMakeLists.txt index 6cde9810b..330733cc2 100644 --- a/code/ryzom/tools/patch_gen/CMakeLists.txt +++ b/code/ryzom/tools/patch_gen/CMakeLists.txt @@ -1,14 +1,14 @@ INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/ryzom/client/src/seven_zip) -SET(MAIN_SRC patch_gen_common.cpp patch_gen_main.cpp patch_gen_main.h) -SET(SERVICE_SRC patch_gen_common.cpp patch_gen_service.cpp patch_gen_service.h) +SET(MAIN_SRC patch_gen_common.cpp patch_gen_main.cpp patch_gen_main.h patch_gen.rc) +SET(SERVICE_SRC patch_gen_common.cpp patch_gen_service.cpp patch_gen_service.h patch_gen_service.rc) -ADD_EXECUTABLE(patch_gen ${MAIN_SRC}) +ADD_EXECUTABLE(patch_gen ${MAIN_SRC} ${RECS}) TARGET_LINK_LIBRARIES(patch_gen ryzom_sevenzip ryzom_gameshare nelmisc nelnet nelligo nelgeorges) NL_DEFAULT_PROPS(patch_gen "Ryzom, Tools: Patch Generator") NL_ADD_RUNTIME_FLAGS(patch_gen) -ADD_EXECUTABLE(patch_gen_service WIN32 ${SERVICE_SRC}) +ADD_EXECUTABLE(patch_gen_service WIN32 ${SERVICE_SRC} ${RECS}) TARGET_LINK_LIBRARIES(patch_gen_service ryzom_sevenzip ryzom_gameshare nelmisc nelnet nelligo nelgeorges) NL_DEFAULT_PROPS(patch_gen_service "Ryzom, Tools: Patch Generator Service") NL_ADD_RUNTIME_FLAGS(patch_gen_service) diff --git a/code/ryzom/tools/patch_gen/blue_pill.ico b/code/ryzom/tools/patch_gen/blue_pill.ico new file mode 100644 index 0000000000000000000000000000000000000000..269907ec31f3583d18d593121b4728dae9ccc757 GIT binary patch literal 3638 zcmeH|KW`I35XIlz*|+!4@tuP&V32TSMHJ}}5<(;>N>9T#pol2k@BthN$t6vwT~I}I zY23!4jbsTaC50PYBD&BmGkbgXMJ5KNLg;?dYJEFzchegpmP6?(lMwARpH&Y;gfVLqQ@I-Nql zeuS%iU^E)x@+mMJ4ly2&ak6t`iYic5psK)sSpmu^{u^x?NEtv$4y7$7Ra9?m2-J+2 zSW)2CYIV<}*cTKzz7qstNRfQT3goyZZqH*kyPmJed&`;ajXiETCIjGzRu7XkiIuhT zTYR?5V~>aU@j8spvajm5yT(KH0eiQ2toW_~Tp8aLj}_1T_8i84 zzdp;o_xlSNAHH}3^!t5$evHbC*F8iPt13`c;NPo&wRSVD-j3+O67m*UCEYJWoy^kl zJW900%~uSXj5hzSCXa~$7!?1+$m^NE3_nu2&m>dN?MhLQt59(n4~R^ zyDISgAPBgRISeIvG#7B(3F1a$BQ|Z2WuVH6_hT z9Hg%0U+&NA!x>DgE$+W4uN-b!|2~DPntxLP?&*KzCkA>3Je&aP2ykV9-=#c?^$BZc Jtd%`~!!K}6&rARS literal 0 HcmV?d00001 diff --git a/code/ryzom/tools/patch_gen/patch_gen.rc b/code/ryzom/tools/patch_gen/patch_gen.rc new file mode 100644 index 000000000..958fa5089 --- /dev/null +++ b/code/ryzom/tools/patch_gen/patch_gen.rc @@ -0,0 +1 @@ +IDI_MAIN_ICON ICON DISCARDABLE "blue_pill.ico" diff --git a/code/ryzom/tools/patch_gen/patch_gen_service.rc b/code/ryzom/tools/patch_gen/patch_gen_service.rc new file mode 100644 index 000000000..60ad969f2 --- /dev/null +++ b/code/ryzom/tools/patch_gen/patch_gen_service.rc @@ -0,0 +1 @@ +IDI_MAIN_ICON ICON DISCARDABLE "red_pill.ico" diff --git a/code/ryzom/tools/patch_gen/red_pill.ico b/code/ryzom/tools/patch_gen/red_pill.ico new file mode 100644 index 0000000000000000000000000000000000000000..c5f25058384f0aba7d5193400e74efdc8a65ccc1 GIT binary patch literal 3638 zcmeH}y>1gh5Xb-b{cRiAJMh>Nt}K+7NFISE?|@SH73|6-RchB!9>8rZS|nF4DbnB) z(Sby<%H4cK7u6-OK?FTnq*W-}h&Vmg&O5@DCM`cfa~;R86ywdTvmqp;Chyl|)QZ zs;uYi?C7Qbc_y*fanJ8UMsY(vA;G8~O0gX#uiuN9@SB}s>pK(=w&_C=|0iQ|;x z^rFu^YfzN97T=cy>i3Gg==E*88&Lhp&Cj6g#|g)Kc@{-k#;qN>9T#pol2k@BthN$t6vwT~I}I zY23!4jbsTaC50PYBD&BmGkbgXMJ5KNLg;?dYJEFzchegpmP6?(lMwARpH&Y;gfVLqQ@I-Nql zeuS%iU^E)x@+mMJ4ly2&ak6t`iYic5psK)sSpmu^{u^x?NEtv$4y7$7Ra9?m2-J+2 zSW)2CYIV<}*cTKzz7qstNRfQT3goyZZqH*kyPmJed&`;ajXiETCIjGzRu7XkiIuhT zTYR?5V~>aU@j8spvajm5yT(KH0eiQ2toW_~Tp8aLj}_1T_8i84 zzdp;o_xlSNAHH}3^!t5$evHbC*F8iPt13`c;NPo&wRSVD-j3+O67m*UCEYJWoy^kl zJW900%~uSXj5hzSCXa~$7!?1+$m^NE3_nu2&m>dN?MhLQt59(n4~R^ zyDISgAPBgRISeIvG#7B(3F1a$BQ|Z2WuVH6_hT z9Hg%0U+&NA!x>DgE$+W4uN-b!|2~DPntxLP?&*KzCkA>3Je&aP2ykV9-=#c?^$BZc Jtd%`~!!K}6&rARS literal 0 HcmV?d00001 diff --git a/code/ryzom/tools/server/ai_build_wmap/main.rc b/code/ryzom/tools/server/ai_build_wmap/main.rc new file mode 100644 index 000000000..958fa5089 --- /dev/null +++ b/code/ryzom/tools/server/ai_build_wmap/main.rc @@ -0,0 +1 @@ +IDI_MAIN_ICON ICON DISCARDABLE "blue_pill.ico" diff --git a/code/ryzom/tools/server/build_world_packed_col/CMakeLists.txt b/code/ryzom/tools/server/build_world_packed_col/CMakeLists.txt index 672500092..e1d57f821 100644 --- a/code/ryzom/tools/server/build_world_packed_col/CMakeLists.txt +++ b/code/ryzom/tools/server/build_world_packed_col/CMakeLists.txt @@ -1,4 +1,6 @@ -FILE(GLOB SRC *.cpp *.h ${RZ_SERVER_SRC_DIR}/ai_data_service/pacs_scan.h ${RZ_SERVER_SRC_DIR}/ai_data_service/pacs_scan.cpp) +FILE(GLOB SRC *.cpp *.h ${RZ_SERVER_SRC_DIR}/ai_data_service/pacs_scan.h ${RZ_SERVER_SRC_DIR}/ai_data_service/pacs_scan.cpp *.rc) + +SOURCE_GROUP("" FILES ${SRC}) ADD_EXECUTABLE(build_world_packed_col ${SRC}) diff --git a/code/ryzom/tools/sheets_packer/CMakeLists.txt b/code/ryzom/tools/sheets_packer/CMakeLists.txt index 7e7d27c1d..45a344153 100644 --- a/code/ryzom/tools/sheets_packer/CMakeLists.txt +++ b/code/ryzom/tools/sheets_packer/CMakeLists.txt @@ -1,4 +1,6 @@ -FILE(GLOB SRC *.cpp *.h) +FILE(GLOB SRC *.cpp *.h *.rc) + +SOURCE_GROUP("" FILES ${SRC}) ADD_EXECUTABLE(sheets_packer ${SRC} ${CMAKE_SOURCE_DIR}/ryzom/client/src/continent_manager_build.cpp diff --git a/code/ryzom/tools/sheets_packer/blue_pill.ico b/code/ryzom/tools/sheets_packer/blue_pill.ico new file mode 100644 index 0000000000000000000000000000000000000000..269907ec31f3583d18d593121b4728dae9ccc757 GIT binary patch literal 3638 zcmeH|KW`I35XIlz*|+!4@tuP&V32TSMHJ}}5<(;>N>9T#pol2k@BthN$t6vwT~I}I zY23!4jbsTaC50PYBD&BmGkbgXMJ5KNLg;?dYJEFzchegpmP6?(lMwARpH&Y;gfVLqQ@I-Nql zeuS%iU^E)x@+mMJ4ly2&ak6t`iYic5psK)sSpmu^{u^x?NEtv$4y7$7Ra9?m2-J+2 zSW)2CYIV<}*cTKzz7qstNRfQT3goyZZqH*kyPmJed&`;ajXiETCIjGzRu7XkiIuhT zTYR?5V~>aU@j8spvajm5yT(KH0eiQ2toW_~Tp8aLj}_1T_8i84 zzdp;o_xlSNAHH}3^!t5$evHbC*F8iPt13`c;NPo&wRSVD-j3+O67m*UCEYJWoy^kl zJW900%~uSXj5hzSCXa~$7!?1+$m^NE3_nu2&m>dN?MhLQt59(n4~R^ zyDISgAPBgRISeIvG#7B(3F1a$BQ|Z2WuVH6_hT z9Hg%0U+&NA!x>DgE$+W4uN-b!|2~DPntxLP?&*KzCkA>3Je&aP2ykV9-=#c?^$BZc Jtd%`~!!K}6&rARS literal 0 HcmV?d00001 diff --git a/code/ryzom/tools/sheets_packer/main.rc b/code/ryzom/tools/sheets_packer/main.rc new file mode 100644 index 000000000..958fa5089 --- /dev/null +++ b/code/ryzom/tools/sheets_packer/main.rc @@ -0,0 +1 @@ +IDI_MAIN_ICON ICON DISCARDABLE "blue_pill.ico" diff --git a/code/ryzom/tools/sheets_packer_shard/CMakeLists.txt b/code/ryzom/tools/sheets_packer_shard/CMakeLists.txt index 554eafe3f..383bd8871 100644 --- a/code/ryzom/tools/sheets_packer_shard/CMakeLists.txt +++ b/code/ryzom/tools/sheets_packer_shard/CMakeLists.txt @@ -1,6 +1,12 @@ -FILE(GLOB SRC *.cpp *.h) +FILE(GLOB SRC *.cpp *.h *.rc) + +SOURCE_GROUP("" FILES ${SRC}) + FILE(GLOB EGSSHEETS ${CMAKE_SOURCE_DIR}/ryzom/server/src/entities_game_service/egs_sheets/*.cpp ${CMAKE_SOURCE_DIR}/ryzom/server/src/entities_game_service/egs_sheets/*.h) +SOURCE_GROUP("" FILES ${SRC}) +SOURCE_GROUP("EGS Sheets" FILES ${EGSSHEETS}) + ADD_EXECUTABLE(sheets_packer_shard ${SRC} ${EGSSHEETS} ${CMAKE_SOURCE_DIR}/ryzom/server/src/input_output_service/string_manager_sheet.cpp ${CMAKE_SOURCE_DIR}/ryzom/server/src/input_output_service/string_manager.h diff --git a/code/ryzom/tools/sheets_packer_shard/blue_pill.ico b/code/ryzom/tools/sheets_packer_shard/blue_pill.ico new file mode 100644 index 0000000000000000000000000000000000000000..269907ec31f3583d18d593121b4728dae9ccc757 GIT binary patch literal 3638 zcmeH|KW`I35XIlz*|+!4@tuP&V32TSMHJ}}5<(;>N>9T#pol2k@BthN$t6vwT~I}I zY23!4jbsTaC50PYBD&BmGkbgXMJ5KNLg;?dYJEFzchegpmP6?(lMwARpH&Y;gfVLqQ@I-Nql zeuS%iU^E)x@+mMJ4ly2&ak6t`iYic5psK)sSpmu^{u^x?NEtv$4y7$7Ra9?m2-J+2 zSW)2CYIV<}*cTKzz7qstNRfQT3goyZZqH*kyPmJed&`;ajXiETCIjGzRu7XkiIuhT zTYR?5V~>aU@j8spvajm5yT(KH0eiQ2toW_~Tp8aLj}_1T_8i84 zzdp;o_xlSNAHH}3^!t5$evHbC*F8iPt13`c;NPo&wRSVD-j3+O67m*UCEYJWoy^kl zJW900%~uSXj5hzSCXa~$7!?1+$m^NE3_nu2&m>dN?MhLQt59(n4~R^ zyDISgAPBgRISeIvG#7B(3F1a$BQ|Z2WuVH6_hT z9Hg%0U+&NA!x>DgE$+W4uN-b!|2~DPntxLP?&*KzCkA>3Je&aP2ykV9-=#c?^$BZc Jtd%`~!!K}6&rARS literal 0 HcmV?d00001 diff --git a/code/ryzom/tools/sheets_packer_shard/main.rc b/code/ryzom/tools/sheets_packer_shard/main.rc new file mode 100644 index 000000000..958fa5089 --- /dev/null +++ b/code/ryzom/tools/sheets_packer_shard/main.rc @@ -0,0 +1 @@ +IDI_MAIN_ICON ICON DISCARDABLE "blue_pill.ico" diff --git a/code/ryzom/tools/translation_tools/CMakeLists.txt b/code/ryzom/tools/translation_tools/CMakeLists.txt index 1db05b3ec..199cb4311 100644 --- a/code/ryzom/tools/translation_tools/CMakeLists.txt +++ b/code/ryzom/tools/translation_tools/CMakeLists.txt @@ -1,4 +1,6 @@ -FILE(GLOB SRC *.cpp *.h) +FILE(GLOB SRC *.cpp *.h *.rc) + +SOURCE_GROUP("" FILES ${SRC}) ADD_EXECUTABLE(translation_tools ${SRC}) diff --git a/code/ryzom/tools/translation_tools/blue_pill.ico b/code/ryzom/tools/translation_tools/blue_pill.ico new file mode 100644 index 0000000000000000000000000000000000000000..269907ec31f3583d18d593121b4728dae9ccc757 GIT binary patch literal 3638 zcmeH|KW`I35XIlz*|+!4@tuP&V32TSMHJ}}5<(;>N>9T#pol2k@BthN$t6vwT~I}I zY23!4jbsTaC50PYBD&BmGkbgXMJ5KNLg;?dYJEFzchegpmP6?(lMwARpH&Y;gfVLqQ@I-Nql zeuS%iU^E)x@+mMJ4ly2&ak6t`iYic5psK)sSpmu^{u^x?NEtv$4y7$7Ra9?m2-J+2 zSW)2CYIV<}*cTKzz7qstNRfQT3goyZZqH*kyPmJed&`;ajXiETCIjGzRu7XkiIuhT zTYR?5V~>aU@j8spvajm5yT(KH0eiQ2toW_~Tp8aLj}_1T_8i84 zzdp;o_xlSNAHH}3^!t5$evHbC*F8iPt13`c;NPo&wRSVD-j3+O67m*UCEYJWoy^kl zJW900%~uSXj5hzSCXa~$7!?1+$m^NE3_nu2&m>dN?MhLQt59(n4~R^ zyDISgAPBgRISeIvG#7B(3F1a$BQ|Z2WuVH6_hT z9Hg%0U+&NA!x>DgE$+W4uN-b!|2~DPntxLP?&*KzCkA>3Je&aP2ykV9-=#c?^$BZc Jtd%`~!!K}6&rARS literal 0 HcmV?d00001 diff --git a/code/ryzom/tools/translation_tools/main.rc b/code/ryzom/tools/translation_tools/main.rc new file mode 100644 index 000000000..958fa5089 --- /dev/null +++ b/code/ryzom/tools/translation_tools/main.rc @@ -0,0 +1 @@ +IDI_MAIN_ICON ICON DISCARDABLE "blue_pill.ico" From 8d406e33960647728ec53ba673c0f2849da91a51 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Fri, 10 May 2019 04:13:22 +0800 Subject: [PATCH 14/77] Adjust CI build --- azure-pipelines.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index cfb8b4696..1d8b871da 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -26,12 +26,13 @@ jobs: sudo apt-get install libsquish-dev -y sudo apt-get install liblzma-dev -y sudo apt-get install libgsf-1-dev -y + sudo apt-get install qtbase5-dev qttools5-dev displayName: 'Dependencies' - script: | mkdir build cmake --version cd build - cmake -DWITH_STATIC=ON -DWITH_NEL_TESTS=OFF -DWITH_NEL_SAMPLES=ON -DWITH_LUA51=ON -DWITH_RYZOM_SERVER=ON -DWITH_RYZOM_TOOLS=OFF -DWITH_NEL_TOOLS=ON -DWITH_LIBGSF=ON ../code + cmake -DWITH_STATIC=ON -DWITH_NEL_TESTS=OFF -DWITH_NEL_SAMPLES=ON -DWITH_LUA51=ON -DWITH_RYZOM=ON -DWITH_RYZOM_SERVER=ON -DWITH_RYZOM_CLIENT=ON -DWITH_RYZOM_TOOLS=ON -DWITH_NEL_TOOLS=ON -DWITH_NELNS=ON -DWITH_NELNS_LOGIN_SYSTEM=ON -DWITH_NELNS_SERVER=ON -DWITH_QT5=ON -DWITH_LIBGSF=ON ../code cat CMakeCache.txt displayName: 'CMake' - script: | From b5692d1cf1eed9c67ad3a3076003985dbf0d3b53 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Fri, 10 May 2019 06:11:33 +0800 Subject: [PATCH 15/77] Adjust CI build --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 1d8b871da..1df6e1242 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -26,7 +26,7 @@ jobs: sudo apt-get install libsquish-dev -y sudo apt-get install liblzma-dev -y sudo apt-get install libgsf-1-dev -y - sudo apt-get install qtbase5-dev qttools5-dev + sudo apt-get install qtbase5-dev qttools5-dev qttools5-dev-tools displayName: 'Dependencies' - script: | mkdir build From 00bbdaba9ef4149585b50f479d820dcc6d34e496 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Fri, 10 May 2019 06:49:30 +0800 Subject: [PATCH 16/77] Added: Revision number from git --- code/CMakeModules/GetRevision.cmake | 31 +++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/code/CMakeModules/GetRevision.cmake b/code/CMakeModules/GetRevision.cmake index dba90c765..94b877438 100644 --- a/code/CMakeModules/GetRevision.cmake +++ b/code/CMakeModules/GetRevision.cmake @@ -72,6 +72,37 @@ IF(EXISTS "${ROOT_DIR}/.hg/") ENDIF() ENDIF() +IF(EXISTS "${ROOT_DIR}/.git/") + FIND_PACKAGE(Git) + + IF(GIT_FOUND) + EXECUTE_PROCESS(COMMAND ${GIT_EXECUTABLE} rev-list HEAD --count + WORKING_DIRECTORY ${ROOT_DIR} + RESULT_VARIABLE git_exit_code + OUTPUT_VARIABLE REVISION) + IF(NOT ${git_exit_code} EQUAL 0) + message(WARNING "git rev-list failed, unable to include version.") + ENDIF() + EXECUTE_PROCESS(COMMAND ${GIT_EXECUTABLE} rev-parse --short=8 HEAD + WORKING_DIRECTORY ${ROOT_DIR} + RESULT_VARIABLE git_exit_code + OUTPUT_VARIABLE CHANGESET) + IF(NOT ${git_exit_code} EQUAL 0) + message(WARNING "git rev-parse failed, unable to include version.") + ENDIF() + EXECUTE_PROCESS(COMMAND ${GIT_EXECUTABLE} rev-parse --abbrev-ref HEAD + WORKING_DIRECTORY ${ROOT_DIR} + RESULT_VARIABLE git_exit_code + OUTPUT_VARIABLE BRANCH) + IF(NOT ${git_exit_code} EQUAL 0) + message(WARNING "git rev-parse failed, unable to include git branch.") + ENDIF() + STRING(STRIP ${REVISION} REVISION) + STRING(STRIP ${CHANGESET} CHANGESET) + STRING(STRIP ${BRANCH} BRANCH) + ENDIF() +ENDIF() + # if processing exported sources, use "revision" file if exists IF(SOURCE_DIR AND NOT DEFINED REVISION) SET(REVISION_FILE ${SOURCE_DIR}/revision) From c0950a3a790ae85990353d530ee6179d69e6c85d Mon Sep 17 00:00:00 2001 From: kaetemi Date: Fri, 10 May 2019 07:19:53 +0800 Subject: [PATCH 17/77] Fix CI build timeout --- azure-pipelines.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 1df6e1242..0e8396061 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -1,5 +1,6 @@ jobs: - job: ubuntu16 + timeoutInMinutes: 120 pool: vmImage: 'Ubuntu-16.04' steps: From 215d7bda99ef75f3f1f2ba7306e8f10824854b32 Mon Sep 17 00:00:00 2001 From: Nimetu Date: Fri, 10 May 2019 08:27:25 +0300 Subject: [PATCH 18/77] Changed: Do not nest hr element inside group paragraph (hr already is a group) --HG-- branch : develop --- code/nel/src/gui/group_html.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/nel/src/gui/group_html.cpp b/code/nel/src/gui/group_html.cpp index a4290efd1..5d8e8014e 100644 --- a/code/nel/src/gui/group_html.cpp +++ b/code/nel/src/gui/group_html.cpp @@ -5764,7 +5764,7 @@ namespace NLGUI // *************************************************************************** void CGroupHTML::htmlHR(const CHtmlElement &elm) { - newParagraph(0); + endParagraph(); CInterfaceGroup *sep = CWidgetManager::getInstance()->getParser()->createGroupInstance("html_hr", "", NULL, 0); if (sep) @@ -5787,7 +5787,7 @@ namespace NLGUI } renderPseudoElement(":before", elm); - getParagraph()->addChild(sep); + addHtmlGroup(sep, 0); renderPseudoElement(":after", elm); endParagraph(); From 85a806ec446b23de17db7515fa60ec07a522715d Mon Sep 17 00:00:00 2001 From: Nimetu Date: Fri, 10 May 2019 08:27:25 +0300 Subject: [PATCH 19/77] Added: Lua functions for group child debugging --HG-- branch : develop --- code/nel/include/nel/gui/interface_group.h | 12 ++++- code/nel/src/gui/interface_group.cpp | 62 +++++++++++++++------- 2 files changed, 53 insertions(+), 21 deletions(-) diff --git a/code/nel/include/nel/gui/interface_group.h b/code/nel/include/nel/gui/interface_group.h index 01f2b9701..fea928cb3 100644 --- a/code/nel/include/nel/gui/interface_group.h +++ b/code/nel/include/nel/gui/interface_group.h @@ -211,6 +211,11 @@ namespace NLGUI int luaGetNumGroups(CLuaState &ls); int luaGetGroup(CLuaState &ls); + // debug functions + int luaDumpSize(CLuaState &ls); + int luaDumpEltsOrder(CLuaState &ls); + int luaDumpGroups(CLuaState &ls); + void setMaxSizeRef(const std::string &maxSizeRef); std::string getMaxSizeRefAsString() const; @@ -223,6 +228,9 @@ namespace NLGUI REFLECT_LUA_METHOD("delGroup", luaDelGroup); REFLECT_LUA_METHOD("getNumGroups", luaGetNumGroups); REFLECT_LUA_METHOD("getGroup", luaGetGroup); + REFLECT_LUA_METHOD("dumpSize", luaDumpSize); + REFLECT_LUA_METHOD("dumpEltsOrder", luaDumpEltsOrder); + REFLECT_LUA_METHOD("dumpGroups", luaDumpGroups); REFLECT_STRING ("left_click", getLeftClickHandler, setLeftClickHandler); REFLECT_STRING ("right_click", getRightClickHandler, setRightClickHandler); REFLECT_STRING ("left_click_params", getLeftClickHandlerParams, setLeftClickHandlerParams); @@ -274,8 +282,8 @@ namespace NLGUI sint getInsertionOrder(CViewBase *vb) const; // for debug only - void dumpGroups(); - void dumpEltsOrder(); + void dumpGroups() const; + void dumpEltsOrder() const; virtual void renderWiredQuads(CInterfaceElement::TRenderWired type, const std::string &uiFilter); diff --git a/code/nel/src/gui/interface_group.cpp b/code/nel/src/gui/interface_group.cpp index 789030a4a..3996d827f 100644 --- a/code/nel/src/gui/interface_group.cpp +++ b/code/nel/src/gui/interface_group.cpp @@ -829,7 +829,7 @@ namespace NLGUI const std::map< uint32, SLinkData > &linkMap = CWidgetManager::getInstance()->getParser()->getLinkMap(); - + xmlNodePtr node = NULL; std::map< uint32, SLinkData >::const_iterator itr; @@ -847,17 +847,17 @@ namespace NLGUI xmlAddChild( parentNode, node ); xmlSetProp( node, BAD_CAST "expr", BAD_CAST data.expr.c_str() ); - + if( !data.target.empty() ) xmlSetProp( node, BAD_CAST "target", BAD_CAST data.target.c_str() ); - + if( !data.action.empty() ) { xmlSetProp( node, BAD_CAST "action", BAD_CAST data.action.c_str() ); - + if( !data.params.empty() ) xmlSetProp( node, BAD_CAST "params", BAD_CAST data.params.c_str() ); - + if( !data.cond.empty() ) xmlSetProp( node, BAD_CAST "cond", BAD_CAST data.cond.c_str() ); } @@ -1792,7 +1792,7 @@ namespace NLGUI CInterfaceGroup *pChild = *itg; if (pChild->getActive()) { - // bool bUnder = + // bool bUnder = pChild->getViewsUnder (x, y, clipX, clipY, clipW, clipH, vVB); // if (bUnder && !vICL.empty()) // return true; @@ -1847,7 +1847,7 @@ namespace NLGUI CInterfaceGroup *pChild = *itg; if (pChild->getActive()) { - // bool bUnder = + // bool bUnder = pChild->getCtrlsUnder (x, y, clipX, clipY, clipW, clipH, vICL); // if (bUnder && !vICL.empty()) // return true; @@ -1903,7 +1903,7 @@ namespace NLGUI CInterfaceGroup *pChild = *itg; if (pChild->getActive()) { - // bool bUnder = + // bool bUnder = pChild->getGroupsUnder (x, y, clipX, clipY, clipW, clipH, vIGL); // if (bUnder && !vICL.empty()) // return true; @@ -2149,7 +2149,34 @@ namespace NLGUI } // ------------------------------------------------------------------------------------------------ - void CInterfaceGroup::dumpGroups() + int CInterfaceGroup::luaDumpSize(CLuaState &ls) + { + const char *funcName = "dumpSize"; + CLuaIHM::checkArgCount(ls, funcName, 0); + dumpSize(); + return 0; + } + + // ------------------------------------------------------------------------------------------------ + int CInterfaceGroup::luaDumpEltsOrder(CLuaState &ls) + { + const char *funcName = "dumpEltsOrder"; + CLuaIHM::checkArgCount(ls, funcName, 0); + dumpEltsOrder(); + return 0; + } + + // ------------------------------------------------------------------------------------------------ + int CInterfaceGroup::luaDumpGroups(CLuaState &ls) + { + const char *funcName = "dumpGroups"; + CLuaIHM::checkArgCount(ls, funcName, 0); + dumpGroups(); + return 0; + } + + // ------------------------------------------------------------------------------------------------ + void CInterfaceGroup::dumpGroups() const { nlinfo("Num groups = %d", (int) _ChildrenGroups.size()); for(uint k = 0; k < _ChildrenGroups.size(); ++k) @@ -2166,21 +2193,18 @@ namespace NLGUI } // ------------------------------------------------------------------------------------------------ - void CInterfaceGroup::dumpEltsOrder() + void CInterfaceGroup::dumpEltsOrder() const { - nlinfo("Num elements = %d", (int) _EltOrder.size()); + nlinfo("Num elements = %d, num groups = %d", (int) _EltOrder.size(), _ChildrenGroups.size()); for(uint k = 0; k < _EltOrder.size(); ++k) { - std::string typeName = "???"; - if (_ChildrenGroups[k]) - { - NLGUI::CViewBase *view = _EltOrder[k]; - const type_info &ti = typeid(*view); - typeName = ti.name(); - } CInterfaceElement *el = _EltOrder[k]; if (el) { + std::string typeName; + NLGUI::CViewBase *view = _EltOrder[k]; + const type_info &ti = typeid(*view); + typeName = ti.name(); nlinfo("Element %d, name = %s, type=%s, x=%d, y=%d, parent_name=%s parentposname=%s xreal=%d, yreal=%d, wreal=%d, hreal=%d", k, el->getId().c_str(), typeName.c_str(), el->getX(), el->getY(), el->getParent() ? el->getParent()->getId().c_str() : "no parent", el->getParentPos() ? el->getParentPos()->getId().c_str() : "parent", @@ -2595,7 +2619,7 @@ namespace NLGUI e->setSizeRef(""); e->setParent(p); - + e->setParentPos(p); e->setParentSize(p); e->alignTo(p); From 0676cd0d2ba1a38bbb1596c45ce12049adba2384 Mon Sep 17 00:00:00 2001 From: Nimetu Date: Fri, 10 May 2019 08:27:26 +0300 Subject: [PATCH 20/77] Fixed: Invalid root html style --HG-- branch : develop --- code/nel/src/gui/group_html.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/code/nel/src/gui/group_html.cpp b/code/nel/src/gui/group_html.cpp index 5d8e8014e..2a898fa41 100644 --- a/code/nel/src/gui/group_html.cpp +++ b/code/nel/src/gui/group_html.cpp @@ -5799,10 +5799,9 @@ namespace NLGUI { if (elm.hasNonEmptyAttribute("style")) { - _Style.Root = _Style.Current; - _Style.applyRootStyle(elm.getAttribute("style")); - _Style.Current = _Style.Root; + _Style.applyStyle(elm.getAttribute("style")); } + _Style.Root = _Style.Current; applyBackground(elm); } From d0616ac57914ec0ccda82136efc380eddbf73dc8 Mon Sep 17 00:00:00 2001 From: Nimetu Date: Fri, 10 May 2019 23:50:14 +0300 Subject: [PATCH 21/77] Changed: use css display: block instead hardcoded endParagraph() --HG-- branch : develop --- code/nel/include/nel/gui/css_style.h | 3 ++ code/nel/include/nel/gui/group_html.h | 8 ----- code/nel/src/gui/css_style.cpp | 8 +++++ code/nel/src/gui/group_html.cpp | 45 +++++++++------------------ 4 files changed, 25 insertions(+), 39 deletions(-) diff --git a/code/nel/include/nel/gui/css_style.h b/code/nel/include/nel/gui/css_style.h index d4f9cd320..0937ebe0b 100644 --- a/code/nel/include/nel/gui/css_style.h +++ b/code/nel/include/nel/gui/css_style.h @@ -57,6 +57,7 @@ namespace NLGUI Underlined=false; StrikeThrough=false; GlobalColor=false; + DisplayBlock=false; Width=-1; Height=-1; MaxWidth=-1; @@ -87,6 +88,7 @@ namespace NLGUI bool GlobalColor; bool Underlined; bool StrikeThrough; + bool DisplayBlock; sint32 Width; sint32 Height; sint32 MaxWidth; @@ -172,6 +174,7 @@ namespace NLGUI styleStackIndex++; _StyleStack.push_back(Current); + Current.DisplayBlock = false; Current.Width=-1; Current.Height=-1; Current.MaxWidth=-1; diff --git a/code/nel/include/nel/gui/group_html.h b/code/nel/include/nel/gui/group_html.h index 7d02fe3d4..c10858933 100644 --- a/code/nel/include/nel/gui/group_html.h +++ b/code/nel/include/nel/gui/group_html.h @@ -569,14 +569,6 @@ namespace NLGUI return _LinkClass.back().c_str(); } - std::vector _BlockLevelElement; - inline bool isBlockLevelElement() const - { - if (_BlockLevelElement.empty()) - return false; - return _BlockLevelElement.back(); - } - // Divs (i.e. interface group) std::vector _Divs; inline CInterfaceGroup *getDiv() const diff --git a/code/nel/src/gui/css_style.cpp b/code/nel/src/gui/css_style.cpp index 95503e77c..b0b536d0d 100644 --- a/code/nel/src/gui/css_style.cpp +++ b/code/nel/src/gui/css_style.cpp @@ -456,6 +456,14 @@ namespace NLGUI if (pos != style.StyleRules.end()) style.StyleRules.erase(pos); } + else + if (it->first == "display") + { + if (it->second == "inherit") + style.DisplayBlock = current.DisplayBlock; + else + style.DisplayBlock = (it->second == "block" || it->second == "table"); + } } } diff --git a/code/nel/src/gui/group_html.cpp b/code/nel/src/gui/group_html.cpp index 2a898fa41..69a48961a 100644 --- a/code/nel/src/gui/group_html.cpp +++ b/code/nel/src/gui/group_html.cpp @@ -1072,6 +1072,11 @@ namespace NLGUI _AnchorName.push_back(elm.getAttribute("id")); } + if (_Style.Current.DisplayBlock) + { + endParagraph(); + } + switch(elm.ID) { case HTML_A: htmlA(elm); break; @@ -1189,6 +1194,10 @@ namespace NLGUI break; } + if (_Style.Current.DisplayBlock) + { + endParagraph(); + } _Style.popStyle(); } @@ -4881,6 +4890,11 @@ namespace NLGUI css += "small { font-size: smaller;}"; css += "dt { font-weight: bold; }"; css += "hr { color: rgb(120, 120, 120);}"; + // block level elements + css += "address, article, aside, blockquote, details, dialog, dd, div, dl, dt, fieldset, figcaption, figure,"; + css += "footer, form, h1, h2, h3, h4, h5, h6, header, hgroup, hr, li, main, nav, ol, p, pre, section, table,"; + css += "ul { display: block; }"; + css += "table { display: table; }"; // td { padding: 1px;} - overwrites cellpadding attribute // table { border-spacing: 2px;} - overwrites cellspacing attribute css += "table { border-collapse: separate;}"; @@ -5515,8 +5529,6 @@ namespace NLGUI // *************************************************************************** void CGroupHTML::htmlDIV(const CHtmlElement &elm) { - _BlockLevelElement.push_back(true); - _DivName = elm.getAttribute("name"); string instClass = elm.getAttribute("class"); @@ -5539,8 +5551,6 @@ namespace NLGUI { if ((*it).first == "template") templateName = (*it).second; - else if ((*it).first == "display" && (*it).second == "inline-block") - _BlockLevelElement.back() = false; else tmplParams.push_back(TTmplParam((*it).first, (*it).second)); } @@ -5573,8 +5583,6 @@ namespace NLGUI inst->setPosRef(Hotspot_TL); inst->setParentPosRef(Hotspot_TL); getDiv()->addGroup(inst); - - _BlockLevelElement.back() = false; } else { @@ -5586,25 +5594,14 @@ namespace NLGUI } } - if (isBlockLevelElement()) - { - newParagraph(0); - } - renderPseudoElement(":before", elm); } void CGroupHTML::htmlDIVend(const CHtmlElement &elm) { renderPseudoElement(":after", elm); - - if (isBlockLevelElement()) - { - endParagraph(); - } _DivName.clear(); popIfNotEmpty(_Divs); - popIfNotEmpty(_BlockLevelElement); } // *************************************************************************** @@ -5612,7 +5609,6 @@ namespace NLGUI { _DL.push_back(HTMLDListElement()); _LI = _DL.size() > 1 || !_UL.empty(); - endParagraph(); renderPseudoElement(":before", elm); } @@ -5624,8 +5620,6 @@ namespace NLGUI renderPseudoElement(":after", elm); - endParagraph(); - // unclosed DT if (_DL.back().DT) { @@ -5746,7 +5740,6 @@ namespace NLGUI void CGroupHTML::htmlHend(const CHtmlElement &elm) { renderPseudoElement(":after", elm); - endParagraph(); } // *************************************************************************** @@ -5764,8 +5757,6 @@ namespace NLGUI // *************************************************************************** void CGroupHTML::htmlHR(const CHtmlElement &elm) { - endParagraph(); - CInterfaceGroup *sep = CWidgetManager::getInstance()->getParser()->createGroupInstance("html_hr", "", NULL, 0); if (sep) { @@ -5789,8 +5780,6 @@ namespace NLGUI renderPseudoElement(":before", elm); addHtmlGroup(sep, 0); renderPseudoElement(":after", elm); - - endParagraph(); } } @@ -6238,7 +6227,6 @@ namespace NLGUI // if LI is already present _LI = _UL.size() > 1 || _DL.size() > 1; _Indent.push_back(getIndent() + ULIndent); - endParagraph(); renderPseudoElement(":before", elm); } @@ -6348,7 +6336,6 @@ namespace NLGUI void CGroupHTML::htmlPend(const CHtmlElement &elm) { renderPseudoElement(":after", elm); - endParagraph(); } // *************************************************************************** @@ -6364,7 +6351,6 @@ namespace NLGUI { renderPseudoElement(":after", elm); - endParagraph(); popIfNotEmpty(_PRE); } @@ -6581,7 +6567,6 @@ namespace NLGUI popIfNotEmpty(_Indent); renderPseudoElement(":after", elm); - endParagraph(); } // *************************************************************************** @@ -6799,7 +6784,6 @@ namespace NLGUI // if LI is already present _LI = _UL.size() > 1 || _DL.size() > 1; _Indent.push_back(getIndent() + ULIndent); - endParagraph(); renderPseudoElement(":before", elm); } @@ -6811,7 +6795,6 @@ namespace NLGUI renderPseudoElement(":after", elm); - endParagraph(); popIfNotEmpty(_UL); popIfNotEmpty(_Indent); } From c06253a7464981da65398b5c923fbd14342e8c7b Mon Sep 17 00:00:00 2001 From: Nimetu Date: Fri, 10 May 2019 23:50:14 +0300 Subject: [PATCH 22/77] Fixed: BR element --HG-- branch : develop --- code/nel/src/gui/group_html.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/code/nel/src/gui/group_html.cpp b/code/nel/src/gui/group_html.cpp index 69a48961a..1d0468e3f 100644 --- a/code/nel/src/gui/group_html.cpp +++ b/code/nel/src/gui/group_html.cpp @@ -5418,11 +5418,7 @@ namespace NLGUI // *************************************************************************** void CGroupHTML::htmlBR(const CHtmlElement &elm) { - endParagraph(); - - // insert zero-width-space (0x200B) to prevent removal of empty lines - ucstring tmp; - tmp.fromUtf8("\xe2\x80\x8b"); + ucstring tmp("\n"); addString(tmp); } From 5baa32790f32947bcb878222cd6e2ea4c2c374c6 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Sat, 11 May 2019 05:56:18 +0800 Subject: [PATCH 23/77] Changed: Improve versioning info for resources --- code/CMakeModules/ConfigureChecks.cmake | 16 ++++- code/CMakeModules/GetRevision.cmake | 14 +++- code/config.h.cmake | 3 + code/nel/include/nel/misc/version_nl.cmake | 1 + .../tools/3d/ligo/plugin_max/CMakeLists.txt | 6 +- .../3d/ligo/plugin_max/ligoscape_utility.rc | 68 +++---------------- code/nel/tools/3d/ligo/plugin_max/version.rc2 | 49 +++++++++++++ 7 files changed, 92 insertions(+), 65 deletions(-) create mode 100644 code/nel/tools/3d/ligo/plugin_max/version.rc2 diff --git a/code/CMakeModules/ConfigureChecks.cmake b/code/CMakeModules/ConfigureChecks.cmake index 1eade142c..9de2e8214 100644 --- a/code/CMakeModules/ConfigureChecks.cmake +++ b/code/CMakeModules/ConfigureChecks.cmake @@ -37,15 +37,25 @@ MACRO(NL_CONFIGURE_CHECKS) SET(RYZOM_VERSION_PATCH ${NL_VERSION_PATCH}) ENDIF() - SET(NL_VERSION "${NL_VERSION_MAJOR}.${NL_VERSION_MINOR}.${NL_VERSION_PATCH}.${REVISION}") + IF(DESCRIBE) + SET(NL_VERSION "${DESCRIBE}") + ELSE() + SET(NL_VERSION "${NL_VERSION_MAJOR}.${NL_VERSION_MINOR}.${NL_VERSION_PATCH}.${REVISION}") + ENDIF() SET(NL_VERSION_RC "${NL_VERSION_MAJOR},${NL_VERSION_MINOR},${NL_VERSION_PATCH},${REVISION}") + SET(NL_PRODUCT_VERSION "${NL_VERSION_MAJOR}.${NL_VERSION_MINOR}.${NL_VERSION_PATCH}") SET(RYZOM_VERSION_SHORT "${RYZOM_VERSION_MAJOR}.${RYZOM_VERSION_MINOR}.${RYZOM_VERSION_PATCH}") - SET(RYZOM_VERSION "${RYZOM_VERSION_SHORT}.${REVISION}") + IF(DESCRIBE) + SET(RYZOM_VERSION "${DESCRIBE}") + ELSE() + SET(RYZOM_VERSION "${RYZOM_VERSION_SHORT}.${REVISION}") + ENDIF() SET(RYZOM_VERSION_RC "${RYZOM_VERSION_MAJOR},${RYZOM_VERSION_MINOR},${RYZOM_VERSION_PATCH},${REVISION}") + SET(RYZOM_PRODUCT_VERSION "${RYZOM_VERSION_MAJOR}.${RYZOM_VERSION_MINOR}.${RYZOM_VERSION_PATCH}") NOW(BUILD_DATE) - SET(COPYRIGHT "${YEAR} ${AUTHOR}") + SET(COPYRIGHT "Copyright (C) ${YEAR} ${AUTHOR}") IF(NOT RYZOM_CLIENT_ICON) SET(RYZOM_CLIENT_ICON "ryzom_client") diff --git a/code/CMakeModules/GetRevision.cmake b/code/CMakeModules/GetRevision.cmake index 94b877438..469f7375a 100644 --- a/code/CMakeModules/GetRevision.cmake +++ b/code/CMakeModules/GetRevision.cmake @@ -81,25 +81,33 @@ IF(EXISTS "${ROOT_DIR}/.git/") RESULT_VARIABLE git_exit_code OUTPUT_VARIABLE REVISION) IF(NOT ${git_exit_code} EQUAL 0) - message(WARNING "git rev-list failed, unable to include version.") + MESSAGE(WARNING "git rev-list failed, unable to include version.") ENDIF() EXECUTE_PROCESS(COMMAND ${GIT_EXECUTABLE} rev-parse --short=8 HEAD WORKING_DIRECTORY ${ROOT_DIR} RESULT_VARIABLE git_exit_code OUTPUT_VARIABLE CHANGESET) IF(NOT ${git_exit_code} EQUAL 0) - message(WARNING "git rev-parse failed, unable to include version.") + MESSAGE(WARNING "git rev-parse failed, unable to include version.") ENDIF() EXECUTE_PROCESS(COMMAND ${GIT_EXECUTABLE} rev-parse --abbrev-ref HEAD WORKING_DIRECTORY ${ROOT_DIR} RESULT_VARIABLE git_exit_code OUTPUT_VARIABLE BRANCH) IF(NOT ${git_exit_code} EQUAL 0) - message(WARNING "git rev-parse failed, unable to include git branch.") + MESSAGE(WARNING "git rev-parse failed, unable to include git branch.") + ENDIF() + EXECUTE_PROCESS(COMMAND ${GIT_EXECUTABLE} describe + WORKING_DIRECTORY ${ROOT_DIR} + RESULT_VARIABLE git_exit_code + OUTPUT_VARIABLE DESCRIBE) + IF(NOT ${git_exit_code} EQUAL 0) + MESSAGE(WARNING "git rev-parse failed, unable to include git branch.") ENDIF() STRING(STRIP ${REVISION} REVISION) STRING(STRIP ${CHANGESET} CHANGESET) STRING(STRIP ${BRANCH} BRANCH) + STRING(STRIP ${DESCRIBE} DESCRIBE) ENDIF() ENDIF() diff --git a/code/config.h.cmake b/code/config.h.cmake index 69171cf68..9d698ac08 100644 --- a/code/config.h.cmake +++ b/code/config.h.cmake @@ -27,9 +27,12 @@ #cmakedefine NL_VERSION "${NL_VERSION}" #cmakedefine NL_VERSION_RC ${NL_VERSION_RC} +#cmakedefine NL_PRODUCT_VERSION "${NL_PRODUCT_VERSION}" #cmakedefine RYZOM_VERSION "${RYZOM_VERSION}" #cmakedefine RYZOM_VERSION_RC ${RYZOM_VERSION_RC} +#cmakedefine RYZOM_PRODUCT_VERSION "${RYZOM_PRODUCT_VERSION}" + #cmakedefine AUTHOR "${AUTHOR}" #cmakedefine YEAR "${YEAR}" #cmakedefine COPYRIGHT "${COPYRIGHT}" diff --git a/code/nel/include/nel/misc/version_nl.cmake b/code/nel/include/nel/misc/version_nl.cmake index 2e650486e..ee224f723 100644 --- a/code/nel/include/nel/misc/version_nl.cmake +++ b/code/nel/include/nel/misc/version_nl.cmake @@ -2,6 +2,7 @@ #define NL_VERSION_H #define NL_VERSION "${NL_VERSION}" +#define NL_PRODUCT_VERSION "${NL_PRODUCT_VERSION}" #define NL_VERSION_MAJOR ${NL_VERSION_MAJOR} #define NL_VERSION_MINOR ${NL_VERSION_MINOR} #define NL_VERSION_PATCH ${NL_VERSION_PATCH} diff --git a/code/nel/tools/3d/ligo/plugin_max/CMakeLists.txt b/code/nel/tools/3d/ligo/plugin_max/CMakeLists.txt index cd2539ee4..13cf77952 100644 --- a/code/nel/tools/3d/ligo/plugin_max/CMakeLists.txt +++ b/code/nel/tools/3d/ligo/plugin_max/CMakeLists.txt @@ -1,6 +1,8 @@ -FILE(GLOB SRC *.cpp *.h ../../ig_lighter_lib/*.cpp ../../ig_lighter_lib/*.h) +FILE(GLOB SRC *.cpp *.h ../../ig_lighter_lib/*.cpp ../../ig_lighter_lib/*.h *.rc *.rc2) -ADD_LIBRARY(ligoscape_utility SHARED ligoscape_utility.rc ${SRC} ligoscape_utility.def) +SOURCE_GROUP("" FILES ${SRC}) + +ADD_LIBRARY(ligoscape_utility SHARED ${SRC} ligoscape_utility.def) INCLUDE_DIRECTORIES(${MAXSDK_INCLUDE_DIR}) diff --git a/code/nel/tools/3d/ligo/plugin_max/ligoscape_utility.rc b/code/nel/tools/3d/ligo/plugin_max/ligoscape_utility.rc index edd4cbb6b..da59ec719 100644 --- a/code/nel/tools/3d/ligo/plugin_max/ligoscape_utility.rc +++ b/code/nel/tools/3d/ligo/plugin_max/ligoscape_utility.rc @@ -1,4 +1,4 @@ -//Microsoft Developer Studio generated resource script. +// Microsoft Visual C++ generated resource script. // #include "resource.h" @@ -7,19 +7,17 @@ // // Generated from the TEXTINCLUDE 2 resource. // -#include "windows.h" +#include "afxres.h" ///////////////////////////////////////////////////////////////////////////// #undef APSTUDIO_READONLY_SYMBOLS ///////////////////////////////////////////////////////////////////////////// -// English (U.S.) resources +// English resources #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) -#ifdef _WIN32 -LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US +LANGUAGE LANG_ENGLISH, SUBLANG_NEUTRAL #pragma code_page(1252) -#endif //_WIN32 #ifdef APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// @@ -27,76 +25,32 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US // TEXTINCLUDE // -1 TEXTINCLUDE DISCARDABLE +1 TEXTINCLUDE BEGIN "resource.h\0" END -2 TEXTINCLUDE DISCARDABLE +2 TEXTINCLUDE BEGIN "#include ""afxres.h""\r\n" "\0" END -3 TEXTINCLUDE DISCARDABLE +3 TEXTINCLUDE BEGIN - "\r\n" + "#include ""version.rc2""\r\n" "\0" END #endif // APSTUDIO_INVOKED -#ifndef _MAC -///////////////////////////////////////////////////////////////////////////// -// -// Version -// - -VS_VERSION_INFO VERSIONINFO - FILEVERSION 3,0,0,0 - PRODUCTVERSION 3,0,0,0 - FILEFLAGSMASK 0x3fL -#ifdef _DEBUG - FILEFLAGS 0x1L -#else - FILEFLAGS 0x0L -#endif - FILEOS 0x40004L - FILETYPE 0x2L - FILESUBTYPE 0x0L -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904b0" - BEGIN - VALUE "CompanyName", "\0" - VALUE "FileVersion", "3.0.0.0\0" - VALUE "InternalName", "Ligoscape\0" - VALUE "LegalCopyright", "\0" - VALUE "OriginalFilename", "Ligoscape.dlu\0" - VALUE "ProductName", "3D Studio MAX\0" - VALUE "ProductVersion", "3.0.0.0\0" - VALUE "FileDescription", "NeL Ligoscape utility\0" - VALUE "Comments", "TECH: \0" - VALUE "LegalTrademarks", "\0" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x409, 1200 - END -END - -#endif // !_MAC - - ///////////////////////////////////////////////////////////////////////////// // // String Table // -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LIBDESCRIPTION "NeL Ligoscape utility" IDS_CATEGORY "NeL Tools" @@ -105,7 +59,7 @@ BEGIN IDS_SPIN "Spin" END -#endif // English (U.S.) resources +#endif // English resources ///////////////////////////////////////////////////////////////////////////// @@ -115,7 +69,7 @@ END // // Generated from the TEXTINCLUDE 3 resource. // - +#include "version.rc2" ///////////////////////////////////////////////////////////////////////////// #endif // not APSTUDIO_INVOKED diff --git a/code/nel/tools/3d/ligo/plugin_max/version.rc2 b/code/nel/tools/3d/ligo/plugin_max/version.rc2 new file mode 100644 index 000000000..e6db62362 --- /dev/null +++ b/code/nel/tools/3d/ligo/plugin_max/version.rc2 @@ -0,0 +1,49 @@ + +#ifndef NL_VERSION_RC2 +#define NL_VERSION_RC2 + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +LANGUAGE LANG_ENGLISH, SUBLANG_NEUTRAL +#pragma code_page(65001) + +#include +#include "config.h" +#include "maxversion.h" +#define STRINGIFY_(x) #x +#define STRINGIFY(x) STRINGIFY_(x) + +VS_VERSION_INFO VERSIONINFO + FILEVERSION NL_VERSION_RC + PRODUCTVERSION NL_VERSION_RC + FILEFLAGSMASK VS_FFI_FILEFLAGSMASK +#ifdef _DEBUG + FILEFLAGS VS_FF_DEBUG +#else + FILEFLAGS 0x0L +#endif + FILEOS VOS_NT_WINDOWS32 + FILETYPE VFT_DLL + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "Comments", "NeL is provided under the AGPLv3 with a linking exception for the 3ds Max SDK" + VALUE "CompanyName", AUTHOR + VALUE "FileDescription", "NeL Ligoscape utility" + VALUE "FileVersion", NL_VERSION + VALUE "LegalCopyright", COPYRIGHT + VALUE "OriginalFilename", "ligoscape.dlu" + VALUE "ProductName", "NeL Plugins for 3ds Max " STRINGIFY(MAX_PRODUCT_YEAR_NUMBER) + VALUE "ProductVersion", NL_PRODUCT_VERSION + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x9, 1200 + END +END + +#endif /* #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) */ +#endif /* #ifndef NL_VERSION_RC2 */ From 97e45d3944c30b23cf82a91b8baf78575c9dbcdf Mon Sep 17 00:00:00 2001 From: kaetemi Date: Sat, 11 May 2019 06:54:06 +0800 Subject: [PATCH 24/77] Changed: Improved versioning info on 3ds Max plugins --- .../tools/3d/ligo/plugin_max/CMakeLists.txt | 4 +- code/nel/tools/3d/ligo/plugin_max/version.rc2 | 10 +- .../nel/tools/3d/object_viewer/CMakeLists.txt | 6 +- .../tools/3d/object_viewer/object_viewer.rc | 98 ++---------------- code/nel/tools/3d/object_viewer/version.rc2 | 51 +++++++++ .../nel_3dsmax_shared/CMakeLists.txt | 6 +- .../nel_3dsmax_shared/nel_3dsmax_shared.rc | Bin 0 -> 2776 bytes .../plugin_max/nel_3dsmax_shared/version.rc2 | 55 ++++++++++ .../3d/plugin_max/nel_export/nel_export.rc | 61 +---------- .../3d/plugin_max/nel_export/version.rc2 | 55 ++++++++++ .../nel_patch_converter/CMakeLists.txt | 6 +- .../nel_patch_converter.rc | 49 +-------- .../nel_patch_converter/version.rc2 | 55 ++++++++++ .../plugin_max/nel_patch_edit/CMakeLists.txt | 6 +- .../3d/plugin_max/nel_patch_edit/mods.rc | 64 +----------- .../3d/plugin_max/nel_patch_edit/version.rc2 | 55 ++++++++++ .../plugin_max/nel_patch_paint/CMakeLists.txt | 8 +- .../nel_patch_paint/nel_patch_paint.rc | 67 +----------- .../3d/plugin_max/nel_patch_paint/version.rc2 | 55 ++++++++++ .../nel_vertex_tree_paint/CMakeLists.txt | 6 +- .../nel_vertex_tree_paint/version.rc2 | 55 ++++++++++ .../vertex_tree_paint.rc | 54 +--------- .../3d/plugin_max/tile_utility/CMakeLists.txt | 6 +- .../plugin_max/tile_utility/tile_utility.rc | 55 +--------- .../3d/plugin_max/tile_utility/version.rc2 | 55 ++++++++++ 25 files changed, 511 insertions(+), 431 deletions(-) create mode 100644 code/nel/tools/3d/object_viewer/version.rc2 create mode 100644 code/nel/tools/3d/plugin_max/nel_3dsmax_shared/nel_3dsmax_shared.rc create mode 100644 code/nel/tools/3d/plugin_max/nel_3dsmax_shared/version.rc2 create mode 100644 code/nel/tools/3d/plugin_max/nel_export/version.rc2 create mode 100644 code/nel/tools/3d/plugin_max/nel_patch_converter/version.rc2 create mode 100644 code/nel/tools/3d/plugin_max/nel_patch_edit/version.rc2 create mode 100644 code/nel/tools/3d/plugin_max/nel_patch_paint/version.rc2 create mode 100644 code/nel/tools/3d/plugin_max/nel_vertex_tree_paint/version.rc2 create mode 100644 code/nel/tools/3d/plugin_max/tile_utility/version.rc2 diff --git a/code/nel/tools/3d/ligo/plugin_max/CMakeLists.txt b/code/nel/tools/3d/ligo/plugin_max/CMakeLists.txt index 13cf77952..a6601f1b0 100644 --- a/code/nel/tools/3d/ligo/plugin_max/CMakeLists.txt +++ b/code/nel/tools/3d/ligo/plugin_max/CMakeLists.txt @@ -1,8 +1,8 @@ -FILE(GLOB SRC *.cpp *.h ../../ig_lighter_lib/*.cpp ../../ig_lighter_lib/*.h *.rc *.rc2) +FILE(GLOB SRC *.cpp *.h ../../ig_lighter_lib/*.cpp ../../ig_lighter_lib/*.h *.rc *.rc2 *.def) SOURCE_GROUP("" FILES ${SRC}) -ADD_LIBRARY(ligoscape_utility SHARED ${SRC} ligoscape_utility.def) +ADD_LIBRARY(ligoscape_utility SHARED ${SRC}) INCLUDE_DIRECTORIES(${MAXSDK_INCLUDE_DIR}) diff --git a/code/nel/tools/3d/ligo/plugin_max/version.rc2 b/code/nel/tools/3d/ligo/plugin_max/version.rc2 index e6db62362..56dbaa448 100644 --- a/code/nel/tools/3d/ligo/plugin_max/version.rc2 +++ b/code/nel/tools/3d/ligo/plugin_max/version.rc2 @@ -12,6 +12,12 @@ LANGUAGE LANG_ENGLISH, SUBLANG_NEUTRAL #define STRINGIFY_(x) #x #define STRINGIFY(x) STRINGIFY_(x) +#ifdef _DEBUG +#define NL_FILEEXT "_d" +#else +#define NL_FILEEXT "_r" +#endif + VS_VERSION_INFO VERSIONINFO FILEVERSION NL_VERSION_RC PRODUCTVERSION NL_VERSION_RC @@ -33,8 +39,8 @@ BEGIN VALUE "CompanyName", AUTHOR VALUE "FileDescription", "NeL Ligoscape utility" VALUE "FileVersion", NL_VERSION - VALUE "LegalCopyright", COPYRIGHT - VALUE "OriginalFilename", "ligoscape.dlu" + VALUE "LegalCopyright", COPYRIGHT ". Copyright (C) 2000 Nevrax Ltd." + VALUE "OriginalFilename", "nelligoscapeutility" NL_FILEEXT ".dlx" VALUE "ProductName", "NeL Plugins for 3ds Max " STRINGIFY(MAX_PRODUCT_YEAR_NUMBER) VALUE "ProductVersion", NL_PRODUCT_VERSION END diff --git a/code/nel/tools/3d/object_viewer/CMakeLists.txt b/code/nel/tools/3d/object_viewer/CMakeLists.txt index 962f0b5bb..4d626f6c9 100644 --- a/code/nel/tools/3d/object_viewer/CMakeLists.txt +++ b/code/nel/tools/3d/object_viewer/CMakeLists.txt @@ -1,6 +1,8 @@ -FILE(GLOB SRC *.cpp *.h) +FILE(GLOB SRC *.cpp *.h *.rc *.rc2) -ADD_LIBRARY(object_viewer_dll SHARED ${SRC} object_viewer.rc) +SOURCE_GROUP("" FILES ${SRC}) + +ADD_LIBRARY(object_viewer_dll SHARED ${SRC}) TARGET_LINK_LIBRARIES(object_viewer_dll nelmisc diff --git a/code/nel/tools/3d/object_viewer/object_viewer.rc b/code/nel/tools/3d/object_viewer/object_viewer.rc index 3f2b6c65e..3e6353bfd 100644 --- a/code/nel/tools/3d/object_viewer/object_viewer.rc +++ b/code/nel/tools/3d/object_viewer/object_viewer.rc @@ -13,11 +13,11 @@ #undef APSTUDIO_READONLY_SYMBOLS ///////////////////////////////////////////////////////////////////////////// -// English (U.S.) resources +// English resources #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) #ifdef _WIN32 -LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US +LANGUAGE LANG_ENGLISH, SUBLANG_NEUTRAL #pragma code_page(1252) #endif //_WIN32 @@ -259,19 +259,6 @@ BEGIN "No views were selected ! No snapshot will be taken." END -#endif // English (U.S.) resources -///////////////////////////////////////////////////////////////////////////// - - -///////////////////////////////////////////////////////////////////////////// -// French (France) resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_FRA) -#ifdef _WIN32 -LANGUAGE LANG_FRENCH, SUBLANG_FRENCH -#pragma code_page(1252) -#endif //_WIN32 - ///////////////////////////////////////////////////////////////////////////// // // Bitmap @@ -2567,58 +2554,14 @@ BEGIN "#include ""res\\object_viewer.rc2"" // non-Microsoft Visual C++ edited resources\r\n" "#include ""l.fra\\afxres.rc"" // Standard components\r\n" "#endif\r\n" + "\r\n" + "#include ""version.rc2""\r\n" "\0" END #endif // APSTUDIO_INVOKED -#ifndef _MAC -///////////////////////////////////////////////////////////////////////////// -// -// Version -// - -VS_VERSION_INFO VERSIONINFO - FILEVERSION 1,0,0,103 - PRODUCTVERSION 1,0,0,1 - FILEFLAGSMASK 0x3fL -#ifdef _DEBUG - FILEFLAGS 0x1L -#else - FILEFLAGS 0x0L -#endif - FILEOS 0x4L - FILETYPE 0x2L - FILESUBTYPE 0x0L -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040c04b0" - BEGIN - VALUE "Comments", "\0" - VALUE "CompanyName", "\0" - VALUE "FileDescription", "object_viewer DLL\0" - VALUE "FileVersion", "1, 0, 0, 103\0" - VALUE "InternalName", "object_viewer\0" - VALUE "LegalCopyright", "Copyright (C) 2001\0" - VALUE "LegalTrademarks", "\0" - VALUE "OriginalFilename", "object_viewer.DLL\0" - VALUE "PrivateBuild", "\0" - VALUE "ProductName", "Bibliothèque de liaison dynamique object_viewer\0" - VALUE "ProductVersion", "1, 0, 0, 1\0" - VALUE "SpecialBuild", "\0" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x40c, 1200 - END -END - -#endif // !_MAC - - ///////////////////////////////////////////////////////////////////////////// // // Menu @@ -3248,35 +3191,6 @@ BEGIN 0 END - -///////////////////////////////////////////////////////////////////////////// -// -// String Table -// - -STRINGTABLE DISCARDABLE -BEGIN - IDR_MAINFRAME "Toto" -END - -STRINGTABLE DISCARDABLE -BEGIN - ID_SHOOT_SCENE "Shoot the scene in a movie" -END - -#endif // French (France) resources -///////////////////////////////////////////////////////////////////////////// - - -///////////////////////////////////////////////////////////////////////////// -// French (Belgium) resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_FRB) -#ifdef _WIN32 -LANGUAGE LANG_FRENCH, SUBLANG_FRENCH_BELGIAN -#pragma code_page(1252) -#endif //_WIN32 - ///////////////////////////////////////////////////////////////////////////// // // Dialog @@ -3323,7 +3237,7 @@ BEGIN END #endif // APSTUDIO_INVOKED -#endif // French (Belgium) resources +#endif // English resources ///////////////////////////////////////////////////////////////////////////// @@ -3347,6 +3261,8 @@ LANGUAGE 12, 1 #include "l.fra\afxres.rc" // Standard components #endif +#include "version.rc2" + ///////////////////////////////////////////////////////////////////////////// #endif // not APSTUDIO_INVOKED diff --git a/code/nel/tools/3d/object_viewer/version.rc2 b/code/nel/tools/3d/object_viewer/version.rc2 new file mode 100644 index 000000000..a4f32756c --- /dev/null +++ b/code/nel/tools/3d/object_viewer/version.rc2 @@ -0,0 +1,51 @@ + +#ifndef NL_VERSION_RC2 +#define NL_VERSION_RC2 + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +LANGUAGE LANG_ENGLISH, SUBLANG_NEUTRAL +#pragma code_page(65001) + +#include +#include "config.h" + +#ifdef _DEBUG +#define NL_FILEEXT "_d" +#else +#define NL_FILEEXT "_r" +#endif + +VS_VERSION_INFO VERSIONINFO + FILEVERSION NL_VERSION_RC + PRODUCTVERSION NL_VERSION_RC + FILEFLAGSMASK VS_FFI_FILEFLAGSMASK +#ifdef _DEBUG + FILEFLAGS VS_FF_DEBUG +#else + FILEFLAGS 0x0L +#endif + FILEOS VOS_NT_WINDOWS32 + FILETYPE VFT_DLL + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "CompanyName", AUTHOR + VALUE "FileDescription", "NeL Object Viewer dynamic library" + VALUE "FileVersion", NL_VERSION + VALUE "LegalCopyright", COPYRIGHT + VALUE "OriginalFilename", "object_viewer" NL_FILEEXT ".dll" + VALUE "ProductName", "NeL Tools" + VALUE "ProductVersion", NL_PRODUCT_VERSION + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x9, 1200 + END +END + +#endif /* #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) */ +#endif /* #ifndef NL_VERSION_RC2 */ diff --git a/code/nel/tools/3d/plugin_max/nel_3dsmax_shared/CMakeLists.txt b/code/nel/tools/3d/plugin_max/nel_3dsmax_shared/CMakeLists.txt index 9a14d59a6..c903d3a80 100644 --- a/code/nel/tools/3d/plugin_max/nel_3dsmax_shared/CMakeLists.txt +++ b/code/nel/tools/3d/plugin_max/nel_3dsmax_shared/CMakeLists.txt @@ -1,4 +1,6 @@ -FILE(GLOB SRC *.cpp *.h *.def) +FILE(GLOB SRC *.cpp *.h *.def *.rc *.rc2) + +SOURCE_GROUP("" FILES ${SRC}) ADD_LIBRARY(nel_3dsmax_shared SHARED ${SRC}) @@ -11,7 +13,7 @@ TARGET_LINK_LIBRARIES(nel_3dsmax_shared ${MAXSDK_LIBRARIES} Version.lib) -NL_DEFAULT_PROPS(nel_3dsmax_shared "MAX Plugin: NeL 3DSMAX Shared") +NL_DEFAULT_PROPS(nel_3dsmax_shared "MAX Plugin: NeL 3ds Max Shared") NL_ADD_RUNTIME_FLAGS(nel_3dsmax_shared) NL_ADD_LIB_SUFFIX(nel_3dsmax_shared) #SET_TARGET_PROPERTIES(nel_export PROPERTIES SUFFIX ".dlx") diff --git a/code/nel/tools/3d/plugin_max/nel_3dsmax_shared/nel_3dsmax_shared.rc b/code/nel/tools/3d/plugin_max/nel_3dsmax_shared/nel_3dsmax_shared.rc new file mode 100644 index 0000000000000000000000000000000000000000..c02faed7c1c055163fb8388993d927945b331086 GIT binary patch literal 2776 zcmds(+iuf95QhJ2B;LU!H?3MVP@W*ChNx*kby5{6QdBjVMoL{2C*_7`2fo?u3fHlz zC|p=*wVB=V&g{%Ths}@gEwvQsOiNvBtvhARL>qV)@G@<6r4_rb4j7R>>yuLE8vX{l zfVYO4+?Lff>xi9cTj~pEj`UJ5xTWQ26K=}a6{i>OY-30MNH=P@(J&4&7oU|pb*2H;Y}I02fR7MU&+9T#EyHJNQD_@nF_DixL%hlA<;q~fKZ7tB))(KhVYbvIGrc_s#o9ATL zh+%raF``Pz2|CWn;W<)cx$L|CFDt7odizf;x~F@rsi`F$Hs!st zSL_&D{@kvn>)Z=8SvT^-qFmOQcC*v4uGUbj{$h{!)t%3&dacd7{Iu*y!25r#-@kjs jEyIfue)<)!%H)81y)q(i&F^zRr84b5>F)bpUPV6vxDrX` literal 0 HcmV?d00001 diff --git a/code/nel/tools/3d/plugin_max/nel_3dsmax_shared/version.rc2 b/code/nel/tools/3d/plugin_max/nel_3dsmax_shared/version.rc2 new file mode 100644 index 000000000..d584d0982 --- /dev/null +++ b/code/nel/tools/3d/plugin_max/nel_3dsmax_shared/version.rc2 @@ -0,0 +1,55 @@ + +#ifndef NL_VERSION_RC2 +#define NL_VERSION_RC2 + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +LANGUAGE LANG_ENGLISH, SUBLANG_NEUTRAL +#pragma code_page(65001) + +#include +#include "config.h" +#include "maxversion.h" +#define STRINGIFY_(x) #x +#define STRINGIFY(x) STRINGIFY_(x) + +#ifdef _DEBUG +#define NL_FILEEXT "_d" +#else +#define NL_FILEEXT "_r" +#endif + +VS_VERSION_INFO VERSIONINFO + FILEVERSION NL_VERSION_RC + PRODUCTVERSION NL_VERSION_RC + FILEFLAGSMASK VS_FFI_FILEFLAGSMASK +#ifdef _DEBUG + FILEFLAGS VS_FF_DEBUG +#else + FILEFLAGS 0x0L +#endif + FILEOS VOS_NT_WINDOWS32 + FILETYPE VFT_DLL + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "Comments", "NeL is provided under the AGPLv3 with a linking exception for the 3ds Max SDK" + VALUE "CompanyName", AUTHOR + VALUE "FileDescription", "NeL shared library for 3ds Max" + VALUE "FileVersion", NL_VERSION + VALUE "LegalCopyright", COPYRIGHT ". Copyright (C) 2000 Nevrax Ltd." + VALUE "OriginalFilename", "nel_3dsmax_shared" NL_FILEEXT ".dll" + VALUE "ProductName", "NeL Plugins for 3ds Max " STRINGIFY(MAX_PRODUCT_YEAR_NUMBER) + VALUE "ProductVersion", NL_PRODUCT_VERSION + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x9, 1200 + END +END + +#endif /* #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) */ +#endif /* #ifndef NL_VERSION_RC2 */ diff --git a/code/nel/tools/3d/plugin_max/nel_export/nel_export.rc b/code/nel/tools/3d/plugin_max/nel_export/nel_export.rc index 6118893ec..57c213c2a 100644 --- a/code/nel/tools/3d/plugin_max/nel_export/nel_export.rc +++ b/code/nel/tools/3d/plugin_max/nel_export/nel_export.rc @@ -13,11 +13,11 @@ #undef APSTUDIO_READONLY_SYMBOLS ///////////////////////////////////////////////////////////////////////////// -// English (U.S.) resources +// English resources #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) #ifdef _WIN32 -LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US +LANGUAGE LANG_ENGLISH, SUBLANG_NEUTRAL #pragma code_page(1252) #endif //_WIN32 @@ -452,51 +452,13 @@ END 3 TEXTINCLUDE BEGIN - "\r\n" + "#include ""version.rc2""\r\n" "\0" END #endif // APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// Version -// - -VS_VERSION_INFO VERSIONINFO - FILEVERSION 0, 12, 0, 0 - PRODUCTVERSION 0, 12, 0, 0 - FILEFLAGSMASK 0x3fL -#ifdef _DEBUG - FILEFLAGS 0x1L -#else - FILEFLAGS 0x0L -#endif - FILEOS 0x40004L - FILETYPE 0x2L - FILESUBTYPE 0x0L -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904b0" - BEGIN - VALUE "Comments", "Based on Kinetix 3D Studio Max 3.0 plugin sample" - VALUE "CompanyName", "Ryzom Core" - VALUE "FileVersion", "0.12.0\0" - VALUE "InternalName", "CNelExport" - VALUE "OriginalFilename", "CNelExport.dlu" - VALUE "ProductName", "Ryzom Core" - VALUE "ProductVersion", "0.12.0\0" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x409, 1200 - END -END - - ///////////////////////////////////////////////////////////////////////////// // // String Table @@ -511,19 +473,6 @@ BEGIN IDS_SPIN "Spin" END -#endif // English (U.S.) resources -///////////////////////////////////////////////////////////////////////////// - - -///////////////////////////////////////////////////////////////////////////// -// French (France) resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_FRA) -#ifdef _WIN32 -LANGUAGE LANG_FRENCH, SUBLANG_FRENCH -#pragma code_page(1252) -#endif //_WIN32 - ///////////////////////////////////////////////////////////////////////////// // // Dialog @@ -716,7 +665,7 @@ BEGIN END #endif // APSTUDIO_INVOKED -#endif // French (France) resources +#endif // English resources ///////////////////////////////////////////////////////////////////////////// @@ -726,7 +675,7 @@ END // // Generated from the TEXTINCLUDE 3 resource. // - +#include "version.rc2" ///////////////////////////////////////////////////////////////////////////// #endif // not APSTUDIO_INVOKED diff --git a/code/nel/tools/3d/plugin_max/nel_export/version.rc2 b/code/nel/tools/3d/plugin_max/nel_export/version.rc2 new file mode 100644 index 000000000..4941b417b --- /dev/null +++ b/code/nel/tools/3d/plugin_max/nel_export/version.rc2 @@ -0,0 +1,55 @@ + +#ifndef NL_VERSION_RC2 +#define NL_VERSION_RC2 + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +LANGUAGE LANG_ENGLISH, SUBLANG_NEUTRAL +#pragma code_page(65001) + +#include +#include "config.h" +#include "maxversion.h" +#define STRINGIFY_(x) #x +#define STRINGIFY(x) STRINGIFY_(x) + +#ifdef _DEBUG +#define NL_FILEEXT "_d" +#else +#define NL_FILEEXT "_r" +#endif + +VS_VERSION_INFO VERSIONINFO + FILEVERSION NL_VERSION_RC + PRODUCTVERSION NL_VERSION_RC + FILEFLAGSMASK VS_FFI_FILEFLAGSMASK +#ifdef _DEBUG + FILEFLAGS VS_FF_DEBUG +#else + FILEFLAGS 0x0L +#endif + FILEOS VOS_NT_WINDOWS32 + FILETYPE VFT_DLL + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "Comments", "NeL is provided under the AGPLv3 with a linking exception for the 3ds Max SDK. Based on Kinetix 3D Studio Max 3.0 plugin sample" + VALUE "CompanyName", AUTHOR + VALUE "FileDescription", "NeL Export" + VALUE "FileVersion", NL_VERSION + VALUE "LegalCopyright", COPYRIGHT ". Copyright (C) 2000 Nevrax Ltd." + VALUE "OriginalFilename", "nelexport" NL_FILEEXT ".dlm" + VALUE "ProductName", "NeL Plugins for 3ds Max " STRINGIFY(MAX_PRODUCT_YEAR_NUMBER) + VALUE "ProductVersion", NL_PRODUCT_VERSION + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x9, 1200 + END +END + +#endif /* #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) */ +#endif /* #ifndef NL_VERSION_RC2 */ diff --git a/code/nel/tools/3d/plugin_max/nel_patch_converter/CMakeLists.txt b/code/nel/tools/3d/plugin_max/nel_patch_converter/CMakeLists.txt index 178e70f5d..af0652bfc 100644 --- a/code/nel/tools/3d/plugin_max/nel_patch_converter/CMakeLists.txt +++ b/code/nel/tools/3d/plugin_max/nel_patch_converter/CMakeLists.txt @@ -1,6 +1,8 @@ -FILE(GLOB SRC *.cpp *.h *.def) +FILE(GLOB SRC *.cpp *.h *.def *.rc *.rc2) -ADD_LIBRARY(nel_patch_converter SHARED ${SRC} nel_patch_converter.rc) +SOURCE_GROUP("" FILES ${SRC}) + +ADD_LIBRARY(nel_patch_converter SHARED ${SRC}) INCLUDE_DIRECTORIES(${MAXSDK_INCLUDE_DIR}) TARGET_LINK_LIBRARIES(nel_patch_converter diff --git a/code/nel/tools/3d/plugin_max/nel_patch_converter/nel_patch_converter.rc b/code/nel/tools/3d/plugin_max/nel_patch_converter/nel_patch_converter.rc index 50fc5a48d..70084bfdc 100644 --- a/code/nel/tools/3d/plugin_max/nel_patch_converter/nel_patch_converter.rc +++ b/code/nel/tools/3d/plugin_max/nel_patch_converter/nel_patch_converter.rc @@ -13,11 +13,11 @@ #undef APSTUDIO_READONLY_SYMBOLS ///////////////////////////////////////////////////////////////////////////// -// English (U.S.) resources +// English resources #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) #ifdef _WIN32 -LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US +LANGUAGE LANG_ENGLISH, SUBLANG_NEUTRAL #pragma code_page(1252) #endif //_WIN32 @@ -72,52 +72,13 @@ END 3 TEXTINCLUDE BEGIN - "\r\n" + "#include ""version.rc2""\r\n" "\0" END #endif // APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// Version -// - -VS_VERSION_INFO VERSIONINFO - FILEVERSION 0, 12, 0, 0 - PRODUCTVERSION 0, 12, 0, 0 - FILEFLAGSMASK 0x3fL -#ifdef _DEBUG - FILEFLAGS 0x1L -#else - FILEFLAGS 0x0L -#endif - FILEOS 0x40004L - FILETYPE 0x2L - FILESUBTYPE 0x0L -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904b0" - BEGIN - VALUE "Comments", "http://www.ryzomcore.org/" - VALUE "FileDescription", "PatchMesh to RykolPatchMesh" - VALUE "FileVersion", "0.12.0" - VALUE "InternalName", "PatchMesh to RykolPatchMesh" - VALUE "LegalCopyright", "Copyright, 2000 Nevrax Ltd." - VALUE "OriginalFilename", "nel_convert_patch.dlm" - VALUE "ProductName", "NeL Patch Converter" - VALUE "ProductVersion", "0.12.0" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x409, 1200 - END -END - - ///////////////////////////////////////////////////////////////////////////// // // String Table @@ -132,7 +93,7 @@ BEGIN IDS_SPIN "Spin" END -#endif // English (U.S.) resources +#endif // English resources ///////////////////////////////////////////////////////////////////////////// @@ -142,7 +103,7 @@ END // // Generated from the TEXTINCLUDE 3 resource. // - +#include "version.rc2" ///////////////////////////////////////////////////////////////////////////// #endif // not APSTUDIO_INVOKED diff --git a/code/nel/tools/3d/plugin_max/nel_patch_converter/version.rc2 b/code/nel/tools/3d/plugin_max/nel_patch_converter/version.rc2 new file mode 100644 index 000000000..57004f301 --- /dev/null +++ b/code/nel/tools/3d/plugin_max/nel_patch_converter/version.rc2 @@ -0,0 +1,55 @@ + +#ifndef NL_VERSION_RC2 +#define NL_VERSION_RC2 + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +LANGUAGE LANG_ENGLISH, SUBLANG_NEUTRAL +#pragma code_page(65001) + +#include +#include "config.h" +#include "maxversion.h" +#define STRINGIFY_(x) #x +#define STRINGIFY(x) STRINGIFY_(x) + +#ifdef _DEBUG +#define NL_FILEEXT "_d" +#else +#define NL_FILEEXT "_r" +#endif + +VS_VERSION_INFO VERSIONINFO + FILEVERSION NL_VERSION_RC + PRODUCTVERSION NL_VERSION_RC + FILEFLAGSMASK VS_FFI_FILEFLAGSMASK +#ifdef _DEBUG + FILEFLAGS VS_FF_DEBUG +#else + FILEFLAGS 0x0L +#endif + FILEOS VOS_NT_WINDOWS32 + FILETYPE VFT_DLL + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "Comments", "NeL is provided under the AGPLv3 with a linking exception for the 3ds Max SDK" + VALUE "CompanyName", AUTHOR + VALUE "FileDescription", "NeL Patch Converter: PatchMesh to RykolPatchMesh" + VALUE "FileVersion", NL_VERSION + VALUE "LegalCopyright", COPYRIGHT ". Copyright (C) 2000 Nevrax Ltd." + VALUE "OriginalFilename", "nelconvertpatch" NL_FILEEXT ".dlm" + VALUE "ProductName", "NeL Plugins for 3ds Max " STRINGIFY(MAX_PRODUCT_YEAR_NUMBER) + VALUE "ProductVersion", NL_PRODUCT_VERSION + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x9, 1200 + END +END + +#endif /* #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) */ +#endif /* #ifndef NL_VERSION_RC2 */ diff --git a/code/nel/tools/3d/plugin_max/nel_patch_edit/CMakeLists.txt b/code/nel/tools/3d/plugin_max/nel_patch_edit/CMakeLists.txt index bc2f81f33..a1b3e8b65 100644 --- a/code/nel/tools/3d/plugin_max/nel_patch_edit/CMakeLists.txt +++ b/code/nel/tools/3d/plugin_max/nel_patch_edit/CMakeLists.txt @@ -1,6 +1,8 @@ -FILE(GLOB SRC *.cpp *.h *.def) +FILE(GLOB SRC *.cpp *.h *.def *.rc *.rc2) -ADD_LIBRARY(nel_patch_edit SHARED ${SRC} mods.rc) +SOURCE_GROUP("" FILES ${SRC}) + +ADD_LIBRARY(nel_patch_edit SHARED ${SRC}) INCLUDE_DIRECTORIES(${MAXSDK_INCLUDE_DIR}) TARGET_LINK_LIBRARIES(nel_patch_edit diff --git a/code/nel/tools/3d/plugin_max/nel_patch_edit/mods.rc b/code/nel/tools/3d/plugin_max/nel_patch_edit/mods.rc index c687fdd49..41906d3d4 100644 --- a/code/nel/tools/3d/plugin_max/nel_patch_edit/mods.rc +++ b/code/nel/tools/3d/plugin_max/nel_patch_edit/mods.rc @@ -16,11 +16,11 @@ #undef APSTUDIO_READONLY_SYMBOLS ///////////////////////////////////////////////////////////////////////////// -// English (U.S.) resources +// English resources #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) #ifdef _WIN32 -LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US +LANGUAGE LANG_ENGLISH, SUBLANG_NEUTRAL #pragma code_page(1252) #endif //_WIN32 @@ -361,7 +361,7 @@ END 3 TEXTINCLUDE BEGIN - "\r\n" + "#include ""version.rc2""\r\n" "\0" END @@ -508,47 +508,6 @@ END #endif // APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// Version -// - -VS_VERSION_INFO VERSIONINFO - FILEVERSION 0, 12, 0, 0 - PRODUCTVERSION 0, 12, 0, 0 - FILEFLAGSMASK 0x3fL -#ifdef _DEBUG - FILEFLAGS 0x1L -#else - FILEFLAGS 0x0L -#endif - FILEOS 0x40004L - FILETYPE 0x2L - FILESUBTYPE 0x0L -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904b0" - BEGIN - VALUE "Comments", "Based on Kinetix 3D Studio Max 3.0 plugin sample\0" - VALUE "CompanyName", "Ryzom Core" - VALUE "FileDescription", "NeL Patch Edit" - VALUE "FileVersion", "0.12.0" - VALUE "InternalName", "neleditpatch" - VALUE "LegalCopyright", "Copyright © 2000 Nevrax Ltd. Copyright © 1998 Autodesk Inc." - VALUE "LegalTrademarks", "The following are registered trademarks of Autodesk, Inc.: 3D Studio MAX. The following are trademarks of Autodesk, Inc.: Kinetix, Kinetix(logo), BIPED, Physique, Character Studio, MAX DWG, DWG Unplugged, Heidi, FLI, FLC, DXF." - VALUE "OriginalFilename", "neleditpatch.dlm" - VALUE "ProductName", "Ryzom Core" - VALUE "ProductVersion", "0.12.0" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x409, 1200 - END -END - - ///////////////////////////////////////////////////////////////////////////// // // Icon @@ -1277,19 +1236,6 @@ BEGIN IDS_PW_INSTANCEERROR "Error UVW Unwrap cannot be instanced please make it unique" END -#endif // English (U.S.) resources -///////////////////////////////////////////////////////////////////////////// - - -///////////////////////////////////////////////////////////////////////////// -// French (France) resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_FRA) -#ifdef _WIN32 -LANGUAGE LANG_FRENCH, SUBLANG_FRENCH -#pragma code_page(1252) -#endif //_WIN32 - ///////////////////////////////////////////////////////////////////////////// // // Cursor @@ -1298,7 +1244,7 @@ LANGUAGE LANG_FRENCH, SUBLANG_FRENCH IDC_PICK_COLOR CURSOR "pick_color.cur" IDC_FILL CURSOR "cursor1.cur" IDC_TRICK CURSOR "cur00001.cur" -#endif // French (France) resources +#endif // English resources ///////////////////////////////////////////////////////////////////////////// @@ -1308,7 +1254,7 @@ IDC_TRICK CURSOR "cur00001.cur" // // Generated from the TEXTINCLUDE 3 resource. // - +#include "version.rc2" ///////////////////////////////////////////////////////////////////////////// #endif // not APSTUDIO_INVOKED diff --git a/code/nel/tools/3d/plugin_max/nel_patch_edit/version.rc2 b/code/nel/tools/3d/plugin_max/nel_patch_edit/version.rc2 new file mode 100644 index 000000000..92d5dada7 --- /dev/null +++ b/code/nel/tools/3d/plugin_max/nel_patch_edit/version.rc2 @@ -0,0 +1,55 @@ + +#ifndef NL_VERSION_RC2 +#define NL_VERSION_RC2 + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +LANGUAGE LANG_ENGLISH, SUBLANG_NEUTRAL +#pragma code_page(65001) + +#include +#include "config.h" +#include "maxversion.h" +#define STRINGIFY_(x) #x +#define STRINGIFY(x) STRINGIFY_(x) + +#ifdef _DEBUG +#define NL_FILEEXT "_d" +#else +#define NL_FILEEXT "_r" +#endif + +VS_VERSION_INFO VERSIONINFO + FILEVERSION NL_VERSION_RC + PRODUCTVERSION NL_VERSION_RC + FILEFLAGSMASK VS_FFI_FILEFLAGSMASK +#ifdef _DEBUG + FILEFLAGS VS_FF_DEBUG +#else + FILEFLAGS 0x0L +#endif + FILEOS VOS_NT_WINDOWS32 + FILETYPE VFT_DLL + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "Comments", "NeL is provided under the AGPLv3 with a linking exception for the 3ds Max SDK. Based on Kinetix 3D Studio Max 3.0 plugin sample" + VALUE "CompanyName", AUTHOR + VALUE "FileDescription", "NeL Patch Edit" + VALUE "FileVersion", NL_VERSION + VALUE "LegalCopyright", COPYRIGHT ". Copyright (C) 2000 Nevrax Ltd. Copyright (C) 1998 Autodesk Inc." + VALUE "OriginalFilename", "neleditpatch" NL_FILEEXT ".dlm" + VALUE "ProductName", "NeL Plugins for 3ds Max " STRINGIFY(MAX_PRODUCT_YEAR_NUMBER) + VALUE "ProductVersion", NL_PRODUCT_VERSION + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x9, 1200 + END +END + +#endif /* #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) */ +#endif /* #ifndef NL_VERSION_RC2 */ diff --git a/code/nel/tools/3d/plugin_max/nel_patch_paint/CMakeLists.txt b/code/nel/tools/3d/plugin_max/nel_patch_paint/CMakeLists.txt index 388e8b8ef..f7eb99b59 100644 --- a/code/nel/tools/3d/plugin_max/nel_patch_paint/CMakeLists.txt +++ b/code/nel/tools/3d/plugin_max/nel_patch_paint/CMakeLists.txt @@ -1,8 +1,10 @@ -FILE(GLOB SRC *.cpp *.h *.def) +FILE(GLOB SRC *.cpp *.h *.def *.rc *.rc2) -LIST(REMOVE_ITEM SRC ${CMAKE_CURRENT_SOURCE_DIR}/nel_paint.cpp) +LIST(REMOVE_ITEM SRC ${CMAKE_CURRENT_SOURCE_DIR}/nel_paint.cpp) -ADD_LIBRARY(nel_patch_paint SHARED ${SRC} nel_patch_paint.rc) +SOURCE_GROUP("" FILES ${SRC}) + +ADD_LIBRARY(nel_patch_paint SHARED ${SRC}) INCLUDE_DIRECTORIES(${MAXSDK_INCLUDE_DIR}) diff --git a/code/nel/tools/3d/plugin_max/nel_patch_paint/nel_patch_paint.rc b/code/nel/tools/3d/plugin_max/nel_patch_paint/nel_patch_paint.rc index 0093248c4..3552f59bf 100644 --- a/code/nel/tools/3d/plugin_max/nel_patch_paint/nel_patch_paint.rc +++ b/code/nel/tools/3d/plugin_max/nel_patch_paint/nel_patch_paint.rc @@ -20,7 +20,7 @@ #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) #ifdef _WIN32 -LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US +LANGUAGE LANG_ENGLISH, SUBLANG_NEUTRAL #pragma code_page(1252) #endif //_WIN32 @@ -63,7 +63,7 @@ END 3 TEXTINCLUDE DISCARDABLE BEGIN - "\r\n" + "#include ""version.rc2""\r\n" "\0" END @@ -89,65 +89,6 @@ END #endif // APSTUDIO_INVOKED -#ifndef _MAC -///////////////////////////////////////////////////////////////////////////// -// -// Version -// - -VS_VERSION_INFO VERSIONINFO - FILEVERSION 0, 12, 0, 0 - PRODUCTVERSION 0, 12, 0, 0 - FILEFLAGSMASK 0x3fL -#ifdef _DEBUG - FILEFLAGS 0x1L -#else - FILEFLAGS 0x0L -#endif - FILEOS 0x40004L - FILETYPE 0x2L - FILESUBTYPE 0x0L -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904b0" - BEGIN - VALUE "Comments", "Based on Kinetix 3D Studio Max 3.0 plugin sample\0" - VALUE "Comments", "TECH: cyril.corvazier\0" - VALUE "CompanyName", "Ryzom Core\0" - VALUE "FileDescription", "NeL Patch Paint\0" - VALUE "FileVersion", "0.12.0\0" - VALUE "InternalName", "mods\0" - VALUE "LegalCopyright", "Copyright © 2000 Nevrax Ltd\0" - VALUE "LegalTrademarks", "\0" - VALUE "OriginalFilename", "nelpatchpaint.dlm\0" - VALUE "PrivateBuild", "\0" - VALUE "ProductName", "Ryzom Core\0" - VALUE "ProductVersion", "0.12.0\0" - VALUE "SpecialBuild", "\0" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x409, 1200 - END -END - -#endif // !_MAC - -#endif // English (U.S.) resources -///////////////////////////////////////////////////////////////////////////// - - -///////////////////////////////////////////////////////////////////////////// -// French (France) resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_FRA) -#ifdef _WIN32 -LANGUAGE LANG_FRENCH, SUBLANG_FRENCH -#pragma code_page(1252) -#endif //_WIN32 - ///////////////////////////////////////////////////////////////////////////// // // Cursor @@ -157,7 +98,7 @@ IDC_PICK_COLOR CURSOR DISCARDABLE "pick_color.cur" IDC_FILL CURSOR DISCARDABLE "cursor1.cur" IDC_TRICK CURSOR DISCARDABLE "cur00001.cur" IDC_INSPECT CURSOR DISCARDABLE "pick_col.cur" -#endif // French (France) resources +#endif // English resources ///////////////////////////////////////////////////////////////////////////// @@ -167,7 +108,7 @@ IDC_INSPECT CURSOR DISCARDABLE "pick_col.cur" // // Generated from the TEXTINCLUDE 3 resource. // - +#include "version.rc2" ///////////////////////////////////////////////////////////////////////////// #endif // not APSTUDIO_INVOKED diff --git a/code/nel/tools/3d/plugin_max/nel_patch_paint/version.rc2 b/code/nel/tools/3d/plugin_max/nel_patch_paint/version.rc2 new file mode 100644 index 000000000..080d0e24c --- /dev/null +++ b/code/nel/tools/3d/plugin_max/nel_patch_paint/version.rc2 @@ -0,0 +1,55 @@ + +#ifndef NL_VERSION_RC2 +#define NL_VERSION_RC2 + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +LANGUAGE LANG_ENGLISH, SUBLANG_NEUTRAL +#pragma code_page(65001) + +#include +#include "config.h" +#include "maxversion.h" +#define STRINGIFY_(x) #x +#define STRINGIFY(x) STRINGIFY_(x) + +#ifdef _DEBUG +#define NL_FILEEXT "_d" +#else +#define NL_FILEEXT "_r" +#endif + +VS_VERSION_INFO VERSIONINFO + FILEVERSION NL_VERSION_RC + PRODUCTVERSION NL_VERSION_RC + FILEFLAGSMASK VS_FFI_FILEFLAGSMASK +#ifdef _DEBUG + FILEFLAGS VS_FF_DEBUG +#else + FILEFLAGS 0x0L +#endif + FILEOS VOS_NT_WINDOWS32 + FILETYPE VFT_DLL + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "Comments", "NeL is provided under the AGPLv3 with a linking exception for the 3ds Max SDK. Based on Kinetix 3D Studio Max 3.0 plugin sample" + VALUE "CompanyName", AUTHOR + VALUE "FileDescription", "NeL Patch Paint" + VALUE "FileVersion", NL_VERSION + VALUE "LegalCopyright", COPYRIGHT ". Copyright (C) 2000 Nevrax Ltd." + VALUE "OriginalFilename", "nelpaintpatch" NL_FILEEXT ".dlm" + VALUE "ProductName", "NeL Plugins for 3ds Max " STRINGIFY(MAX_PRODUCT_YEAR_NUMBER) + VALUE "ProductVersion", NL_PRODUCT_VERSION + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x9, 1200 + END +END + +#endif /* #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) */ +#endif /* #ifndef NL_VERSION_RC2 */ diff --git a/code/nel/tools/3d/plugin_max/nel_vertex_tree_paint/CMakeLists.txt b/code/nel/tools/3d/plugin_max/nel_vertex_tree_paint/CMakeLists.txt index dc5b6a284..6c7182f2b 100644 --- a/code/nel/tools/3d/plugin_max/nel_vertex_tree_paint/CMakeLists.txt +++ b/code/nel/tools/3d/plugin_max/nel_vertex_tree_paint/CMakeLists.txt @@ -1,6 +1,8 @@ -FILE(GLOB SRC *.cpp *.h *.def) +FILE(GLOB SRC *.cpp *.h *.def *.rc *.rc2) -ADD_LIBRARY(nel_vertex_tree_paint SHARED ${SRC} vertex_tree_paint.def vertex_tree_paint.rc) +SOURCE_GROUP("" FILES ${SRC}) + +ADD_LIBRARY(nel_vertex_tree_paint SHARED ${SRC}) INCLUDE_DIRECTORIES(${MAXSDK_INCLUDE_DIR}) diff --git a/code/nel/tools/3d/plugin_max/nel_vertex_tree_paint/version.rc2 b/code/nel/tools/3d/plugin_max/nel_vertex_tree_paint/version.rc2 new file mode 100644 index 000000000..669cb1c15 --- /dev/null +++ b/code/nel/tools/3d/plugin_max/nel_vertex_tree_paint/version.rc2 @@ -0,0 +1,55 @@ + +#ifndef NL_VERSION_RC2 +#define NL_VERSION_RC2 + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +LANGUAGE LANG_ENGLISH, SUBLANG_NEUTRAL +#pragma code_page(65001) + +#include +#include "config.h" +#include "maxversion.h" +#define STRINGIFY_(x) #x +#define STRINGIFY(x) STRINGIFY_(x) + +#ifdef _DEBUG +#define NL_FILEEXT "_d" +#else +#define NL_FILEEXT "_r" +#endif + +VS_VERSION_INFO VERSIONINFO + FILEVERSION NL_VERSION_RC + PRODUCTVERSION NL_VERSION_RC + FILEFLAGSMASK VS_FFI_FILEFLAGSMASK +#ifdef _DEBUG + FILEFLAGS VS_FF_DEBUG +#else + FILEFLAGS 0x0L +#endif + FILEOS VOS_NT_WINDOWS32 + FILETYPE VFT_DLL + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "Comments", "NeL is provided under the AGPLv3 with a linking exception for the 3ds Max SDK. Based on Kinetix 3D Studio Max 3.1 plugin sample" + VALUE "CompanyName", AUTHOR + VALUE "FileDescription", "NeL Vertex Tree Paint" + VALUE "FileVersion", NL_VERSION + VALUE "LegalCopyright", COPYRIGHT ". Copyright (C) 2000 Nevrax Ltd. Copyright (C) 1998 Autodesk Inc." + VALUE "OriginalFilename", "nel_vertex_tree_paint" NL_FILEEXT ".dlm" + VALUE "ProductName", "NeL Plugins for 3ds Max " STRINGIFY(MAX_PRODUCT_YEAR_NUMBER) + VALUE "ProductVersion", NL_PRODUCT_VERSION + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x9, 1200 + END +END + +#endif /* #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) */ +#endif /* #ifndef NL_VERSION_RC2 */ diff --git a/code/nel/tools/3d/plugin_max/nel_vertex_tree_paint/vertex_tree_paint.rc b/code/nel/tools/3d/plugin_max/nel_vertex_tree_paint/vertex_tree_paint.rc index fdf00449c..7d4652acc 100644 --- a/code/nel/tools/3d/plugin_max/nel_vertex_tree_paint/vertex_tree_paint.rc +++ b/code/nel/tools/3d/plugin_max/nel_vertex_tree_paint/vertex_tree_paint.rc @@ -13,11 +13,11 @@ #undef APSTUDIO_READONLY_SYMBOLS ///////////////////////////////////////////////////////////////////////////// -// English (U.S.) resources +// English resources #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) #ifdef _WIN32 -LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US +LANGUAGE LANG_ENGLISH, SUBLANG_NEUTRAL #pragma code_page(1252) #endif //_WIN32 @@ -103,7 +103,7 @@ END 3 TEXTINCLUDE DISCARDABLE BEGIN - "\r\n" + "#include ""version.rc2""\r\n" "\0" END @@ -118,50 +118,6 @@ END IDC_PAINTCURSOR CURSOR DISCARDABLE "paintcur.cur" IDC_DROPPER_CURSOR CURSOR DISCARDABLE "dropcurs.cur" -#ifndef _MAC -///////////////////////////////////////////////////////////////////////////// -// -// Version -// - -VS_VERSION_INFO VERSIONINFO - FILEVERSION 0, 12, 0, 0 - PRODUCTVERSION 0, 12, 0, 0 - FILEFLAGSMASK 0x3fL -#ifdef _DEBUG - FILEFLAGS 0x1L -#else - FILEFLAGS 0x0L -#endif - FILEOS 0x40004L - FILETYPE 0x2L - FILESUBTYPE 0x0L -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904b0" - BEGIN - VALUE "Comments", "Based on Kinetix 3D Studio Max 3.1 plugin sample\0" - VALUE "Comments", "TECH: \0" - VALUE "CompanyName", "Ryzom Core\0" - VALUE "FileDescription", "Vertex Tree Paint\0" - VALUE "FileVersion", "0.12.0\0" - VALUE "InternalName", "VertexTreePaint\0" - VALUE "LegalCopyright", "Copyright © 2000 Nevrax Ltd. Copyright © 1998 Autodesk Inc.\0" - VALUE "LegalTrademarks", "The following are registered trademarks of Autodesk, Inc.: 3D Studio MAX. The following are trademarks of Autodesk, Inc.: Kinetix, Kinetix(logo), BIPED, Physique, Character Studio, MAX DWG, DWG Unplugged, Heidi, FLI, FLC, DXF.\0" - VALUE "OriginalFilename", "nel_vertex_tree_paint.dlm\0" - VALUE "ProductName", "Ryzom Core\0" - VALUE "ProductVersion", "0.12.0\0" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x409, 1200 - END -END - -#endif // !_MAC - ///////////////////////////////////////////////////////////////////////////// // @@ -207,7 +163,7 @@ BEGIN IDS_RESTORE_GRADIENT "Vertex Tree Gradient" END -#endif // English (U.S.) resources +#endif // English resources ///////////////////////////////////////////////////////////////////////////// @@ -217,7 +173,7 @@ END // // Generated from the TEXTINCLUDE 3 resource. // - +#include "version.rc2" ///////////////////////////////////////////////////////////////////////////// #endif // not APSTUDIO_INVOKED diff --git a/code/nel/tools/3d/plugin_max/tile_utility/CMakeLists.txt b/code/nel/tools/3d/plugin_max/tile_utility/CMakeLists.txt index 1ea546e38..d18a89f50 100644 --- a/code/nel/tools/3d/plugin_max/tile_utility/CMakeLists.txt +++ b/code/nel/tools/3d/plugin_max/tile_utility/CMakeLists.txt @@ -1,6 +1,8 @@ -FILE(GLOB SRC *.cpp *.h *.def) +FILE(GLOB SRC *.cpp *.h *.def *.rc *.rc2) -ADD_LIBRARY(tile_utility SHARED ${SRC} tile_utility.rc) +SOURCE_GROUP("" FILES ${SRC}) + +ADD_LIBRARY(tile_utility SHARED ${SRC}) INCLUDE_DIRECTORIES(${MAXSDK_INCLUDE_DIR}) TARGET_LINK_LIBRARIES(tile_utility diff --git a/code/nel/tools/3d/plugin_max/tile_utility/tile_utility.rc b/code/nel/tools/3d/plugin_max/tile_utility/tile_utility.rc index cec8df28b..2b30b3c3e 100644 --- a/code/nel/tools/3d/plugin_max/tile_utility/tile_utility.rc +++ b/code/nel/tools/3d/plugin_max/tile_utility/tile_utility.rc @@ -13,11 +13,11 @@ #undef APSTUDIO_READONLY_SYMBOLS ///////////////////////////////////////////////////////////////////////////// -// English (U.S.) resources +// English resources #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) #ifdef _WIN32 -LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US +LANGUAGE LANG_ENGLISH, SUBLANG_NEUTRAL #pragma code_page(1252) #endif //_WIN32 @@ -110,58 +110,13 @@ END 3 TEXTINCLUDE DISCARDABLE BEGIN - "\r\n" + "#include ""version.rc2""\r\n" "\0" END #endif // APSTUDIO_INVOKED -#ifndef _MAC -///////////////////////////////////////////////////////////////////////////// -// -// Version -// - -VS_VERSION_INFO VERSIONINFO - FILEVERSION 0, 12, 0, 0 - PRODUCTVERSION 0, 12, 0, 0 - FILEFLAGSMASK 0x3fL -#ifdef _DEBUG - FILEFLAGS 0x1L -#else - FILEFLAGS 0x0L -#endif - FILEOS 0x40004L - FILETYPE 0x2L - FILESUBTYPE 0x0L -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904b0" - BEGIN - VALUE "Comments", "Based on Kinetix 3D Studio Max 3.0 plugin sample\0" - VALUE "CompanyName", "Ryzom Core\0" - VALUE "FileVersion", "0.12.0\0" - VALUE "InternalName", "Tile_utility\0" - VALUE "LegalCopyright", "\0" - VALUE "OriginalFilename", "Tile_utility.dlu\0" - VALUE "ProductName", "Ryzom Core\0" - VALUE "ProductVersion", "0.12.0\0" - VALUE "FileDescription", "Create material for tiles\0" - VALUE "Comments", "TECH: \0" - VALUE "LegalTrademarks", "\0" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x409, 1200 - END -END - -#endif // !_MAC - - ///////////////////////////////////////////////////////////////////////////// // // String Table @@ -704,7 +659,7 @@ BEGIN 65509 "Amount" END -#endif // English (U.S.) resources +#endif // English resources ///////////////////////////////////////////////////////////////////////////// @@ -714,7 +669,7 @@ END // // Generated from the TEXTINCLUDE 3 resource. // - +#include "version.rc2" ///////////////////////////////////////////////////////////////////////////// #endif // not APSTUDIO_INVOKED diff --git a/code/nel/tools/3d/plugin_max/tile_utility/version.rc2 b/code/nel/tools/3d/plugin_max/tile_utility/version.rc2 new file mode 100644 index 000000000..2c4d7869a --- /dev/null +++ b/code/nel/tools/3d/plugin_max/tile_utility/version.rc2 @@ -0,0 +1,55 @@ + +#ifndef NL_VERSION_RC2 +#define NL_VERSION_RC2 + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +LANGUAGE LANG_ENGLISH, SUBLANG_NEUTRAL +#pragma code_page(65001) + +#include +#include "config.h" +#include "maxversion.h" +#define STRINGIFY_(x) #x +#define STRINGIFY(x) STRINGIFY_(x) + +#ifdef _DEBUG +#define NL_FILEEXT "_d" +#else +#define NL_FILEEXT "_r" +#endif + +VS_VERSION_INFO VERSIONINFO + FILEVERSION NL_VERSION_RC + PRODUCTVERSION NL_VERSION_RC + FILEFLAGSMASK VS_FFI_FILEFLAGSMASK +#ifdef _DEBUG + FILEFLAGS VS_FF_DEBUG +#else + FILEFLAGS 0x0L +#endif + FILEOS VOS_NT_WINDOWS32 + FILETYPE VFT_DLL + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "Comments", "NeL is provided under the AGPLv3 with a linking exception for the 3ds Max SDK. Based on Kinetix 3D Studio Max 3.0 plugin sample" + VALUE "CompanyName", AUTHOR + VALUE "FileDescription", "NeL Tile Utility: Create material for tiles" + VALUE "FileVersion", NL_VERSION + VALUE "LegalCopyright", COPYRIGHT ". Copyright (C) 2000 Nevrax Ltd." + VALUE "OriginalFilename", "neltileutility" NL_FILEEXT ".dlu" + VALUE "ProductName", "NeL Plugins for 3ds Max " STRINGIFY(MAX_PRODUCT_YEAR_NUMBER) + VALUE "ProductVersion", NL_PRODUCT_VERSION + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x9, 1200 + END +END + +#endif /* #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) */ +#endif /* #ifndef NL_VERSION_RC2 */ From cb258269684465a0cba35bd6ec8c36784c1087dc Mon Sep 17 00:00:00 2001 From: kaetemi Date: Sat, 11 May 2019 07:14:17 +0800 Subject: [PATCH 25/77] Changed: Cleanup driver versioning --- code/nel/src/3d/driver/direct3d/resources.rc | 4 ++-- code/nel/src/3d/driver/opengl/resources.rc | 4 ++-- code/nel/src/3d/driver/opengles/resources.rc | 4 ++-- code/nel/src/sound/driver/dsound/resources.rc | 4 ++-- code/nel/src/sound/driver/fmod/resources.rc | 4 ++-- code/nel/src/sound/driver/openal/resources.rc | 4 ++-- code/nel/src/sound/driver/xaudio2/resources.rc | 4 ++-- 7 files changed, 14 insertions(+), 14 deletions(-) diff --git a/code/nel/src/3d/driver/direct3d/resources.rc b/code/nel/src/3d/driver/direct3d/resources.rc index d5cdf5f7d..8ce9c0082 100644 --- a/code/nel/src/3d/driver/direct3d/resources.rc +++ b/code/nel/src/3d/driver/direct3d/resources.rc @@ -27,11 +27,11 @@ BEGIN VALUE "OriginalFilename", "nel_drv_direct3d_win_r.dll" #endif VALUE "ProductName", "Ryzom Core" - VALUE "ProductVersion", NL_VERSION + VALUE "ProductVersion", NL_PRODUCT_VERSION END END BLOCK "VarFileInfo" BEGIN - VALUE "Translation", 0x409, 1252 + VALUE "Translation", 0x9, 1200 END END diff --git a/code/nel/src/3d/driver/opengl/resources.rc b/code/nel/src/3d/driver/opengl/resources.rc index ed7e5963c..78a701ba2 100644 --- a/code/nel/src/3d/driver/opengl/resources.rc +++ b/code/nel/src/3d/driver/opengl/resources.rc @@ -27,11 +27,11 @@ BEGIN VALUE "OriginalFilename", "nel_drv_opengl_win_r.dll" #endif VALUE "ProductName", "Ryzom Core" - VALUE "ProductVersion", NL_VERSION + VALUE "ProductVersion", NL_PRODUCT_VERSION END END BLOCK "VarFileInfo" BEGIN - VALUE "Translation", 0x409, 1252 + VALUE "Translation", 0x9, 1200 END END diff --git a/code/nel/src/3d/driver/opengles/resources.rc b/code/nel/src/3d/driver/opengles/resources.rc index 5a6102ea5..0275f89d2 100644 --- a/code/nel/src/3d/driver/opengles/resources.rc +++ b/code/nel/src/3d/driver/opengles/resources.rc @@ -27,11 +27,11 @@ BEGIN VALUE "OriginalFilename", "nel_drv_opengles_win_r.dll" #endif VALUE "ProductName", "Ryzom Core" - VALUE "ProductVersion", NL_VERSION + VALUE "ProductVersion", NL_PRODUCT_VERSION END END BLOCK "VarFileInfo" BEGIN - VALUE "Translation", 0x409, 1252 + VALUE "Translation", 0x9, 1200 END END diff --git a/code/nel/src/sound/driver/dsound/resources.rc b/code/nel/src/sound/driver/dsound/resources.rc index ef6d5ae40..c8bec3584 100644 --- a/code/nel/src/sound/driver/dsound/resources.rc +++ b/code/nel/src/sound/driver/dsound/resources.rc @@ -27,11 +27,11 @@ BEGIN VALUE "OriginalFilename", "nel_drv_dsound_win_r.dll" #endif VALUE "ProductName", "Ryzom Core" - VALUE "ProductVersion", NL_VERSION + VALUE "ProductVersion", NL_PRODUCT_VERSION END END BLOCK "VarFileInfo" BEGIN - VALUE "Translation", 0x409, 1252 + VALUE "Translation", 0x9, 1200 END END diff --git a/code/nel/src/sound/driver/fmod/resources.rc b/code/nel/src/sound/driver/fmod/resources.rc index 6d024e07d..011de9579 100644 --- a/code/nel/src/sound/driver/fmod/resources.rc +++ b/code/nel/src/sound/driver/fmod/resources.rc @@ -27,11 +27,11 @@ BEGIN VALUE "OriginalFilename", "nel_drv_fmod_win_r.dll" #endif VALUE "ProductName", "Ryzom Core" - VALUE "ProductVersion", NL_VERSION + VALUE "ProductVersion", NL_PRODUCT_VERSION END END BLOCK "VarFileInfo" BEGIN - VALUE "Translation", 0x409, 1252 + VALUE "Translation", 0x9, 1200 END END diff --git a/code/nel/src/sound/driver/openal/resources.rc b/code/nel/src/sound/driver/openal/resources.rc index 0d907f198..adb04627c 100644 --- a/code/nel/src/sound/driver/openal/resources.rc +++ b/code/nel/src/sound/driver/openal/resources.rc @@ -27,11 +27,11 @@ BEGIN VALUE "OriginalFilename", "nel_drv_openal_win_r.dll" #endif VALUE "ProductName", "Ryzom Core" - VALUE "ProductVersion", NL_VERSION + VALUE "ProductVersion", NL_PRODUCT_VERSION END END BLOCK "VarFileInfo" BEGIN - VALUE "Translation", 0x409, 1252 + VALUE "Translation", 0x9, 1200 END END diff --git a/code/nel/src/sound/driver/xaudio2/resources.rc b/code/nel/src/sound/driver/xaudio2/resources.rc index f2af9954b..bd9e4132e 100644 --- a/code/nel/src/sound/driver/xaudio2/resources.rc +++ b/code/nel/src/sound/driver/xaudio2/resources.rc @@ -27,11 +27,11 @@ BEGIN VALUE "OriginalFilename", "nel_drv_xaudio2_win_r.dll" #endif VALUE "ProductName", "Ryzom Core" - VALUE "ProductVersion", NL_VERSION + VALUE "ProductVersion", NL_PRODUCT_VERSION END END BLOCK "VarFileInfo" BEGIN - VALUE "Translation", 0x409, 1252 + VALUE "Translation", 0x9, 1200 END END From 77bceea45dd96094359e5d765864a5c1a0cac665 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Sat, 11 May 2019 07:18:23 +0800 Subject: [PATCH 26/77] Cleanup tool resources --- .../tools/3d/object_viewer_exe/CMakeLists.txt | 4 +- .../3d/object_viewer_exe/object_viewer_exe.rc | 35 ++++-------- .../nel/tools/3d/object_viewer_exe/resource.h | 18 +------ .../tools/3d/object_viewer_exe/version.rc2 | 51 ++++++++++++++++++ .../{greenpill.ico => green_pill.ico} | Bin code/nel/tools/3d/panoply_preview/icon.rc | 1 - code/nel/tools/3d/panoply_preview/main.rc | 43 +++++++++++++++ code/nel/tools/3d/tile_edit/tile_edit_exe.rc | 19 ++----- .../misc/branch_patcher/branch_patcher.rc | 20 ++----- .../tools/misc/crash_report/crash_report.rc | 8 +-- .../nel/tools/misc/data_mirror/data_mirror.rc | 18 ++----- .../tools/misc/log_analyser/log_analyser.rc | 18 ++----- .../multi_cd_setup_fix/multi_cd_setup_fix.rc | 6 +-- code/nel/tools/misc/words_dic/words_dic.rc | 21 ++------ .../leveldesign/georges_dll/georges_edit.rc | 18 ++----- .../leveldesign/georges_exe/georges_exe.rc | 6 +-- .../mission_compiler_fe.rc | 22 ++------ .../world_editor/world_editor/world_editor.rc | 27 +++------- 18 files changed, 147 insertions(+), 188 deletions(-) create mode 100644 code/nel/tools/3d/object_viewer_exe/version.rc2 rename code/nel/tools/3d/panoply_preview/{greenpill.ico => green_pill.ico} (100%) delete mode 100644 code/nel/tools/3d/panoply_preview/icon.rc create mode 100644 code/nel/tools/3d/panoply_preview/main.rc diff --git a/code/nel/tools/3d/object_viewer_exe/CMakeLists.txt b/code/nel/tools/3d/object_viewer_exe/CMakeLists.txt index a57a3788a..404c7e313 100644 --- a/code/nel/tools/3d/object_viewer_exe/CMakeLists.txt +++ b/code/nel/tools/3d/object_viewer_exe/CMakeLists.txt @@ -1,9 +1,9 @@ -FILE(GLOB SRC *.cpp *.h) +FILE(GLOB SRC *.cpp *.h *.rc *.rc2) ENABLE_LANGUAGE(RC) ADD_DEFINITIONS(${MFC_DEFINITIONS}) SET(CMAKE_MFC_FLAG 2) -ADD_EXECUTABLE(object_viewer WIN32 ${SRC} object_viewer_exe.rc) +ADD_EXECUTABLE(object_viewer WIN32 ${SRC}) TARGET_LINK_LIBRARIES( object_viewer nelmisc diff --git a/code/nel/tools/3d/object_viewer_exe/object_viewer_exe.rc b/code/nel/tools/3d/object_viewer_exe/object_viewer_exe.rc index 54045351c..57bf1d452 100644 --- a/code/nel/tools/3d/object_viewer_exe/object_viewer_exe.rc +++ b/code/nel/tools/3d/object_viewer_exe/object_viewer_exe.rc @@ -1,4 +1,4 @@ -//Microsoft Developer Studio generated resource script. +// Microsoft Visual C++ generated resource script. // #include "resource.h" @@ -7,19 +7,17 @@ // // Generated from the TEXTINCLUDE 2 resource. // -#include +#include "afxres.h" ///////////////////////////////////////////////////////////////////////////// #undef APSTUDIO_READONLY_SYMBOLS ///////////////////////////////////////////////////////////////////////////// -// English (U.S.) resources +// English resources #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) -#ifdef _WIN32 -LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US +LANGUAGE LANG_ENGLISH, SUBLANG_NEUTRAL #pragma code_page(1252) -#endif //_WIN32 ///////////////////////////////////////////////////////////////////////////// // @@ -28,46 +26,35 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US // Icon with lowest ID value placed first to ensure application icon // remains consistent on all systems. -IDI_MAIN_ICON ICON DISCARDABLE "nevraxpill.ico" -#endif // English (U.S.) resources -///////////////////////////////////////////////////////////////////////////// +IDI_MAIN_ICON ICON "nevraxpill.ico" -///////////////////////////////////////////////////////////////////////////// -// French (France) resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_FRA) -#ifdef _WIN32 -LANGUAGE LANG_FRENCH, SUBLANG_FRENCH -#pragma code_page(1252) -#endif //_WIN32 - #ifdef APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// // // TEXTINCLUDE // -1 TEXTINCLUDE DISCARDABLE +1 TEXTINCLUDE BEGIN "resource.h\0" END -2 TEXTINCLUDE DISCARDABLE +2 TEXTINCLUDE BEGIN "#include ""afxres.h""\r\n" "\0" END -3 TEXTINCLUDE DISCARDABLE +3 TEXTINCLUDE BEGIN - "\r\n" + "#include ""version.rc2""\r\n" "\0" END #endif // APSTUDIO_INVOKED -#endif // French (France) resources +#endif // English resources ///////////////////////////////////////////////////////////////////////////// @@ -77,7 +64,7 @@ END // // Generated from the TEXTINCLUDE 3 resource. // - +#include "version.rc2" ///////////////////////////////////////////////////////////////////////////// #endif // not APSTUDIO_INVOKED diff --git a/code/nel/tools/3d/object_viewer_exe/resource.h b/code/nel/tools/3d/object_viewer_exe/resource.h index 6cce82541..e82fc81c4 100644 --- a/code/nel/tools/3d/object_viewer_exe/resource.h +++ b/code/nel/tools/3d/object_viewer_exe/resource.h @@ -1,21 +1,5 @@ -// NeL - MMORPG Framework -// Copyright (C) 2010 Winch Gate Property Limited -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU Affero General Public License as -// published by the Free Software Foundation, either version 3 of the -// License, or (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public License -// along with this program. If not, see . - //{{NO_DEPENDENCIES}} -// Microsoft Developer Studio generated include file. +// Microsoft Visual C++ generated include file. // Used by object_viewer_exe.rc // #define IDI_ICON1 101 diff --git a/code/nel/tools/3d/object_viewer_exe/version.rc2 b/code/nel/tools/3d/object_viewer_exe/version.rc2 new file mode 100644 index 000000000..ef8efefa5 --- /dev/null +++ b/code/nel/tools/3d/object_viewer_exe/version.rc2 @@ -0,0 +1,51 @@ + +#ifndef NL_VERSION_RC2 +#define NL_VERSION_RC2 + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +LANGUAGE LANG_ENGLISH, SUBLANG_NEUTRAL +#pragma code_page(65001) + +#include +#include "config.h" + +#ifdef _DEBUG +#define NL_FILEEXT "_d" +#else +#define NL_FILEEXT "" +#endif + +VS_VERSION_INFO VERSIONINFO + FILEVERSION NL_VERSION_RC + PRODUCTVERSION NL_VERSION_RC + FILEFLAGSMASK VS_FFI_FILEFLAGSMASK +#ifdef _DEBUG + FILEFLAGS VS_FF_DEBUG +#else + FILEFLAGS 0x0L +#endif + FILEOS VOS_NT_WINDOWS32 + FILETYPE VFT_APP + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "CompanyName", AUTHOR + VALUE "FileDescription", "NeL Object Viewer" + VALUE "FileVersion", NL_VERSION + VALUE "LegalCopyright", COPYRIGHT + VALUE "OriginalFilename", "object_viewer" NL_FILEEXT ".exe" + VALUE "ProductName", "NeL Tools" + VALUE "ProductVersion", NL_PRODUCT_VERSION + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x9, 1200 + END +END + +#endif /* #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) */ +#endif /* #ifndef NL_VERSION_RC2 */ diff --git a/code/nel/tools/3d/panoply_preview/greenpill.ico b/code/nel/tools/3d/panoply_preview/green_pill.ico similarity index 100% rename from code/nel/tools/3d/panoply_preview/greenpill.ico rename to code/nel/tools/3d/panoply_preview/green_pill.ico diff --git a/code/nel/tools/3d/panoply_preview/icon.rc b/code/nel/tools/3d/panoply_preview/icon.rc deleted file mode 100644 index 64e741cac..000000000 --- a/code/nel/tools/3d/panoply_preview/icon.rc +++ /dev/null @@ -1 +0,0 @@ -IDI_ICON1 ICON DISCARDABLE "greenpill.ico" \ No newline at end of file diff --git a/code/nel/tools/3d/panoply_preview/main.rc b/code/nel/tools/3d/panoply_preview/main.rc new file mode 100644 index 000000000..82afb33ce --- /dev/null +++ b/code/nel/tools/3d/panoply_preview/main.rc @@ -0,0 +1,43 @@ + +#include +#include "config.h" + +IDI_ICON1 ICON DISCARDABLE "green_pill.ico" + +#ifdef _DEBUG +#define NL_FILEEXT "_d" +#else +#define NL_FILEEXT "" +#endif + +VS_VERSION_INFO VERSIONINFO + FILEVERSION NL_VERSION_RC + PRODUCTVERSION NL_VERSION_RC + FILEFLAGSMASK VS_FFI_FILEFLAGSMASK +#ifdef _DEBUG + FILEFLAGS VS_FF_DEBUG +#else + FILEFLAGS 0x0L +#endif + FILEOS VOS_NT_WINDOWS32 + FILETYPE VFT_APP + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "CompanyName", AUTHOR + VALUE "FileDescription", "NeL Panoply Preview" + VALUE "FileVersion", NL_VERSION + VALUE "LegalCopyright", COPYRIGHT + VALUE "OriginalFilename", "nl_panoply_preview" NL_FILEEXT ".exe" + VALUE "ProductName", "NeL Tools" + VALUE "ProductVersion", NL_PRODUCT_VERSION + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x9, 1200 + END +END diff --git a/code/nel/tools/3d/tile_edit/tile_edit_exe.rc b/code/nel/tools/3d/tile_edit/tile_edit_exe.rc index 22752b814..fc68920d1 100644 --- a/code/nel/tools/3d/tile_edit/tile_edit_exe.rc +++ b/code/nel/tools/3d/tile_edit/tile_edit_exe.rc @@ -13,11 +13,11 @@ #undef APSTUDIO_READONLY_SYMBOLS ///////////////////////////////////////////////////////////////////////////// -// English (U.S.) resources +// English resources #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) #ifdef _WIN32 -LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US +LANGUAGE LANG_ENGLISH, SUBLANG_NEUTRAL #pragma code_page(1252) #endif //_WIN32 @@ -156,19 +156,6 @@ BEGIN IDS_SPIN "Spin" END -#endif // English (U.S.) resources -///////////////////////////////////////////////////////////////////////////// - - -///////////////////////////////////////////////////////////////////////////// -// French (France) resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_FRA) -#ifdef _WIN32 -LANGUAGE LANG_FRENCH, SUBLANG_FRENCH -#pragma code_page(1252) -#endif //_WIN32 - ///////////////////////////////////////////////////////////////////////////// // // Dialog @@ -412,7 +399,7 @@ IDB_BITMAP2 BITMAP "rot0.bmp" IDB_BITMAP3 BITMAP "rot1.bmp" IDB_BITMAP4 BITMAP "rot2.bmp" IDB_BITMAP5 BITMAP "rot3.bmp" -#endif // French (France) resources +#endif // English resources ///////////////////////////////////////////////////////////////////////////// diff --git a/code/nel/tools/misc/branch_patcher/branch_patcher.rc b/code/nel/tools/misc/branch_patcher/branch_patcher.rc index 9e9abef1c..97aad9482 100644 --- a/code/nel/tools/misc/branch_patcher/branch_patcher.rc +++ b/code/nel/tools/misc/branch_patcher/branch_patcher.rc @@ -13,11 +13,11 @@ #undef APSTUDIO_READONLY_SYMBOLS ///////////////////////////////////////////////////////////////////////////// -// English (U.S.) resources +// English resources #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) #ifdef _WIN32 -LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US +LANGUAGE LANG_ENGLISH, SUBLANG_NEUTRAL #pragma code_page(1252) #endif //_WIN32 @@ -115,22 +115,8 @@ BEGIN BOTTOMMARGIN, 274 END END -#endif // APSTUDIO_INVOKED - -#endif // English (U.S.) resources -///////////////////////////////////////////////////////////////////////////// -///////////////////////////////////////////////////////////////////////////// -// French (France) resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_FRA) -#ifdef _WIN32 -LANGUAGE LANG_FRENCH, SUBLANG_FRENCH -#pragma code_page(1252) -#endif //_WIN32 - -#ifdef APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// // // TEXTINCLUDE @@ -176,7 +162,7 @@ END // Icon with lowest ID value placed first to ensure application icon // remains consistent on all systems. IDR_MAINFRAME ICON DISCARDABLE "res\\nevrax_pill_3d_rgba.ico" -#endif // French (France) resources +#endif // English resources ///////////////////////////////////////////////////////////////////////////// diff --git a/code/nel/tools/misc/crash_report/crash_report.rc b/code/nel/tools/misc/crash_report/crash_report.rc index e4949fd8f..357dc20c7 100644 --- a/code/nel/tools/misc/crash_report/crash_report.rc +++ b/code/nel/tools/misc/crash_report/crash_report.rc @@ -20,16 +20,16 @@ BEGIN BEGIN BLOCK "040904b0" BEGIN - VALUE "FileDescription", "Crash Report" + VALUE "FileDescription", "NeL Crash Report" VALUE "FileVersion", NL_VERSION VALUE "LegalCopyright", COPYRIGHT VALUE "OriginalFilename", "crash_report.exe" - VALUE "ProductName", "Ryzom Core" - VALUE "ProductVersion", NL_VERSION + VALUE "ProductName", "NeL Tools" + VALUE "ProductVersion", NL_PRODUCT_VERSION END END BLOCK "VarFileInfo" BEGIN - VALUE "Translation", 0x409, 1252 + VALUE "Translation", 0x9, 1200 END END diff --git a/code/nel/tools/misc/data_mirror/data_mirror.rc b/code/nel/tools/misc/data_mirror/data_mirror.rc index 7846fc021..ecd226a9f 100644 --- a/code/nel/tools/misc/data_mirror/data_mirror.rc +++ b/code/nel/tools/misc/data_mirror/data_mirror.rc @@ -13,11 +13,11 @@ #undef APSTUDIO_READONLY_SYMBOLS ///////////////////////////////////////////////////////////////////////////// -// English (U.S.) resources +// English resources #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) #ifdef _WIN32 -LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US +LANGUAGE LANG_ENGLISH, SUBLANG_NEUTRAL #pragma code_page(1252) #endif //_WIN32 @@ -174,18 +174,6 @@ BEGIN IDS_NEW_DATE "New Date" END -#endif // English (U.S.) resources -///////////////////////////////////////////////////////////////////////////// - - -///////////////////////////////////////////////////////////////////////////// -// French (France) resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_FRA) -#ifdef _WIN32 -LANGUAGE LANG_FRENCH, SUBLANG_FRENCH -#pragma code_page(1252) -#endif //_WIN32 #ifdef APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// @@ -224,7 +212,7 @@ END #endif // APSTUDIO_INVOKED -#endif // French (France) resources +#endif // English resources ///////////////////////////////////////////////////////////////////////////// diff --git a/code/nel/tools/misc/log_analyser/log_analyser.rc b/code/nel/tools/misc/log_analyser/log_analyser.rc index 1f6242bf2..fe39605d0 100644 --- a/code/nel/tools/misc/log_analyser/log_analyser.rc +++ b/code/nel/tools/misc/log_analyser/log_analyser.rc @@ -13,11 +13,11 @@ #undef APSTUDIO_READONLY_SYMBOLS ///////////////////////////////////////////////////////////////////////////// -// English (U.S.) resources +// English resources #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) #ifdef _WIN32 -LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US +LANGUAGE LANG_ENGLISH, SUBLANG_NEUTRAL #pragma code_page(1252) #endif //_WIN32 @@ -205,18 +205,6 @@ BEGIN END #endif // APSTUDIO_INVOKED -#endif // English (U.S.) resources -///////////////////////////////////////////////////////////////////////////// - - -///////////////////////////////////////////////////////////////////////////// -// French (France) resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_FRA) -#ifdef _WIN32 -LANGUAGE LANG_FRENCH, SUBLANG_FRENCH -#pragma code_page(1252) -#endif //_WIN32 #ifdef APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// @@ -264,7 +252,7 @@ END // Icon with lowest ID value placed first to ensure application icon // remains consistent on all systems. IDR_MAINFRAME ICON DISCARDABLE "res\\log_analyser.ico" -#endif // French (France) resources +#endif // English resources ///////////////////////////////////////////////////////////////////////////// diff --git a/code/nel/tools/misc/multi_cd_setup_fix/multi_cd_setup_fix.rc b/code/nel/tools/misc/multi_cd_setup_fix/multi_cd_setup_fix.rc index 2249f5130..384df40cc 100644 --- a/code/nel/tools/misc/multi_cd_setup_fix/multi_cd_setup_fix.rc +++ b/code/nel/tools/misc/multi_cd_setup_fix/multi_cd_setup_fix.rc @@ -13,11 +13,11 @@ #undef APSTUDIO_READONLY_SYMBOLS ///////////////////////////////////////////////////////////////////////////// -// French (France) resources +// English resources #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_FRA) #ifdef _WIN32 -LANGUAGE LANG_FRENCH, SUBLANG_FRENCH +LANGUAGE LANG_ENGLISH, SUBLANG_NEUTRAL #pragma code_page(1252) #endif //_WIN32 @@ -89,7 +89,7 @@ BEGIN END #endif // APSTUDIO_INVOKED -#endif // French (France) resources +#endif // English resources ///////////////////////////////////////////////////////////////////////////// diff --git a/code/nel/tools/misc/words_dic/words_dic.rc b/code/nel/tools/misc/words_dic/words_dic.rc index 978991d33..7a067ee50 100644 --- a/code/nel/tools/misc/words_dic/words_dic.rc +++ b/code/nel/tools/misc/words_dic/words_dic.rc @@ -13,11 +13,11 @@ #undef APSTUDIO_READONLY_SYMBOLS ///////////////////////////////////////////////////////////////////////////// -// English (U.S.) resources +// English resources #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) #ifdef _WIN32 -LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US +LANGUAGE LANG_ENGLISH, SUBLANG_NEUTRAL #pragma code_page(1252) #endif //_WIN32 @@ -110,22 +110,7 @@ BEGIN BOTTOMMARGIN, 242 END END -#endif // APSTUDIO_INVOKED -#endif // English (U.S.) resources -///////////////////////////////////////////////////////////////////////////// - - -///////////////////////////////////////////////////////////////////////////// -// French (France) resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_FRA) -#ifdef _WIN32 -LANGUAGE LANG_FRENCH, SUBLANG_FRENCH -#pragma code_page(1252) -#endif //_WIN32 - -#ifdef APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// // // TEXTINCLUDE @@ -203,7 +188,7 @@ BEGIN END #endif // APSTUDIO_INVOKED -#endif // French (France) resources +#endif // English resources ///////////////////////////////////////////////////////////////////////////// diff --git a/code/ryzom/tools/leveldesign/georges_dll/georges_edit.rc b/code/ryzom/tools/leveldesign/georges_dll/georges_edit.rc index d8ef47a49..e4e40fb73 100644 --- a/code/ryzom/tools/leveldesign/georges_dll/georges_edit.rc +++ b/code/ryzom/tools/leveldesign/georges_dll/georges_edit.rc @@ -13,11 +13,11 @@ #undef APSTUDIO_READONLY_SYMBOLS ///////////////////////////////////////////////////////////////////////////// -// English (U.S.) resources +// English resources #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) #ifdef _WIN32 -LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US +LANGUAGE LANG_ENGLISH, SUBLANG_NEUTRAL #pragma code_page(1252) #endif //_WIN32 @@ -788,18 +788,6 @@ BEGIN ID_BUTTON32803 "Hold content in buffer 4\nHold 4" END -#endif // English (U.S.) resources -///////////////////////////////////////////////////////////////////////////// - - -///////////////////////////////////////////////////////////////////////////// -// French (France) resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_FRA) -#ifdef _WIN32 -LANGUAGE LANG_FRENCH, SUBLANG_FRENCH -#pragma code_page(1252) -#endif //_WIN32 ///////////////////////////////////////////////////////////////////////////// // @@ -833,7 +821,7 @@ BEGIN END #endif // APSTUDIO_INVOKED -#endif // French (France) resources +#endif // English resources ///////////////////////////////////////////////////////////////////////////// diff --git a/code/ryzom/tools/leveldesign/georges_exe/georges_exe.rc b/code/ryzom/tools/leveldesign/georges_exe/georges_exe.rc index b2d0d350a..b6f15fe15 100644 --- a/code/ryzom/tools/leveldesign/georges_exe/georges_exe.rc +++ b/code/ryzom/tools/leveldesign/georges_exe/georges_exe.rc @@ -13,11 +13,11 @@ #undef APSTUDIO_READONLY_SYMBOLS ///////////////////////////////////////////////////////////////////////////// -// English (U.S.) resources +// English resources #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) #ifdef _WIN32 -LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US +LANGUAGE LANG_ENGLISH, SUBLANG_NEUTRAL #pragma code_page(1252) #endif //_WIN32 @@ -58,7 +58,7 @@ END #endif // APSTUDIO_INVOKED -#endif // English (U.S.) resources +#endif // English resources ///////////////////////////////////////////////////////////////////////////// diff --git a/code/ryzom/tools/leveldesign/mission_compiler_fe/mission_compiler_fe.rc b/code/ryzom/tools/leveldesign/mission_compiler_fe/mission_compiler_fe.rc index 64ac8c1d2..2feacfe1e 100644 --- a/code/ryzom/tools/leveldesign/mission_compiler_fe/mission_compiler_fe.rc +++ b/code/ryzom/tools/leveldesign/mission_compiler_fe/mission_compiler_fe.rc @@ -13,11 +13,11 @@ #undef APSTUDIO_READONLY_SYMBOLS ///////////////////////////////////////////////////////////////////////////// -// English (U.S.) resources +// English resources #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) #ifdef _WIN32 -LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US +LANGUAGE LANG_ENGLISH, SUBLANG_NEUTRAL #pragma code_page(1252) #endif //_WIN32 @@ -28,7 +28,6 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US // Icon with lowest ID value placed first to ensure application icon // remains consistent on all systems. -IDI_ICON_FILTER ICON DISCARDABLE "res\\icon_fil.ico" ///////////////////////////////////////////////////////////////////////////// // @@ -78,19 +77,6 @@ BEGIN END #endif // APSTUDIO_INVOKED -#endif // English (U.S.) resources -///////////////////////////////////////////////////////////////////////////// - - -///////////////////////////////////////////////////////////////////////////// -// French (France) resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_FRA) -#ifdef _WIN32 -LANGUAGE LANG_FRENCH, SUBLANG_FRENCH -#pragma code_page(1252) -#endif //_WIN32 - ///////////////////////////////////////////////////////////////////////////// // // Icon @@ -108,7 +94,7 @@ IDI_ICON_FILTER ICON DISCARDABLE "res\\icon_fil.ico" IDD_ABOUTBOX DIALOG DISCARDABLE 0, 0, 235, 55 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "A propos de mission_compiler_fe" +CAPTION "About mission_compiler_fe" FONT 8, "MS Sans Serif" BEGIN ICON IDR_MAINFRAME,IDC_STATIC,11,17,20,20 @@ -321,7 +307,7 @@ BEGIN IDS_ABOUTBOX "&A propos de mission_compiler_fe..." END -#endif // French (France) resources +#endif // English resources ///////////////////////////////////////////////////////////////////////////// diff --git a/code/ryzom/tools/leveldesign/world_editor/world_editor/world_editor.rc b/code/ryzom/tools/leveldesign/world_editor/world_editor/world_editor.rc index ce46045e4..b02de44e0 100644 --- a/code/ryzom/tools/leveldesign/world_editor/world_editor/world_editor.rc +++ b/code/ryzom/tools/leveldesign/world_editor/world_editor/world_editor.rc @@ -13,11 +13,11 @@ #undef APSTUDIO_READONLY_SYMBOLS ///////////////////////////////////////////////////////////////////////////// -// English (U.S.) resources +// English resources #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) #ifdef _WIN32 -LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US +LANGUAGE LANG_ENGLISH, SUBLANG_NEUTRAL #pragma code_page(1252) #endif //_WIN32 @@ -427,12 +427,12 @@ BEGIN GROUPBOX "",IDC_STATIC,180,22,59,18,WS_GROUP GROUPBOX "",IDC_STATIC,180,41,59,18,WS_GROUP GROUPBOX "",IDC_STATIC,180,60,59,18,WS_GROUP - CONTROL "0°",IDC_ROT0,"Button",BS_AUTORADIOBUTTON | WS_GROUP,7, + CONTROL "0°",IDC_ROT0,"Button",BS_AUTORADIOBUTTON | WS_GROUP,7, 83,23,10 - CONTROL "90°",IDC_ROT90,"Button",BS_AUTORADIOBUTTON,31,83,27,10 - CONTROL "180°",IDC_ROT180,"Button",BS_AUTORADIOBUTTON,59,83,31, + CONTROL "90°",IDC_ROT90,"Button",BS_AUTORADIOBUTTON,31,83,27,10 + CONTROL "180°",IDC_ROT180,"Button",BS_AUTORADIOBUTTON,59,83,31, 10 - CONTROL "270°",IDC_ROT270,"Button",BS_AUTORADIOBUTTON,91,83,31, + CONTROL "270°",IDC_ROT270,"Button",BS_AUTORADIOBUTTON,91,83,31, 10 CONTROL "Ran",IDC_ROTRANDOM,"Button",BS_AUTORADIOBUTTON,123,83, 29,10 @@ -1139,19 +1139,6 @@ BEGIN ID_REPAIR_SELECTED "Repair selected elements by adding missing fields" END -#endif // English (U.S.) resources -///////////////////////////////////////////////////////////////////////////// - - -///////////////////////////////////////////////////////////////////////////// -// French (France) resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_FRA) -#ifdef _WIN32 -LANGUAGE LANG_FRENCH, SUBLANG_FRENCH -#pragma code_page(1252) -#endif //_WIN32 - ///////////////////////////////////////////////////////////////////////////// // // Menu @@ -1239,7 +1226,7 @@ BEGIN END #endif // APSTUDIO_INVOKED -#endif // French (France) resources +#endif // English resources ///////////////////////////////////////////////////////////////////////////// From 88ca58329099da15d54a33c2c671e12a551fad96 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Sat, 11 May 2019 07:38:02 +0800 Subject: [PATCH 27/77] Set version and icon in mission compiler frontend --- .../tools/3d/object_viewer_exe/CMakeLists.txt | 2 + .../mission_compiler_fe/CMakeLists.txt | 6 +- .../mission_compiler_fe/Resource.h | 19 +- .../mission_compiler_fe.rc | 264 +++++------------- .../res/mission_compiler_fe.ico | Bin 1078 -> 0 bytes .../mission_compiler_fe/res/red_pill.ico | Bin 0 -> 3638 bytes .../mission_compiler_fe/version.rc2 | 67 +++++ 7 files changed, 145 insertions(+), 213 deletions(-) delete mode 100644 code/ryzom/tools/leveldesign/mission_compiler_fe/res/mission_compiler_fe.ico create mode 100644 code/ryzom/tools/leveldesign/mission_compiler_fe/res/red_pill.ico create mode 100644 code/ryzom/tools/leveldesign/mission_compiler_fe/version.rc2 diff --git a/code/nel/tools/3d/object_viewer_exe/CMakeLists.txt b/code/nel/tools/3d/object_viewer_exe/CMakeLists.txt index 404c7e313..dd219a319 100644 --- a/code/nel/tools/3d/object_viewer_exe/CMakeLists.txt +++ b/code/nel/tools/3d/object_viewer_exe/CMakeLists.txt @@ -1,5 +1,7 @@ FILE(GLOB SRC *.cpp *.h *.rc *.rc2) +SOURCE_GROUP("" FILES ${SRC}) + ENABLE_LANGUAGE(RC) ADD_DEFINITIONS(${MFC_DEFINITIONS}) SET(CMAKE_MFC_FLAG 2) diff --git a/code/ryzom/tools/leveldesign/mission_compiler_fe/CMakeLists.txt b/code/ryzom/tools/leveldesign/mission_compiler_fe/CMakeLists.txt index f9321152c..be86f6a50 100644 --- a/code/ryzom/tools/leveldesign/mission_compiler_fe/CMakeLists.txt +++ b/code/ryzom/tools/leveldesign/mission_compiler_fe/CMakeLists.txt @@ -1,8 +1,10 @@ -FILE(GLOB SRC *.cpp *.h) +FILE(GLOB SRC *.cpp *.h *.rc *.rc2 res/*.rc2 res/*.ico) + +SOURCE_GROUP("" FILES ${SRC}) ADD_DEFINITIONS(${MFC_DEFINITIONS}) SET(CMAKE_MFC_FLAG 2) -ADD_EXECUTABLE(ryzom_mission_compiler_fe WIN32 ${SRC} mission_compiler_fe.rc) +ADD_EXECUTABLE(ryzom_mission_compiler_fe WIN32 ${SRC}) TARGET_LINK_LIBRARIES(ryzom_mission_compiler_fe nelmisc nelligo ryzom_mission_compiler_lib) diff --git a/code/ryzom/tools/leveldesign/mission_compiler_fe/Resource.h b/code/ryzom/tools/leveldesign/mission_compiler_fe/Resource.h index 28608ab10..aace22fe7 100644 --- a/code/ryzom/tools/leveldesign/mission_compiler_fe/Resource.h +++ b/code/ryzom/tools/leveldesign/mission_compiler_fe/Resource.h @@ -1,21 +1,5 @@ -// Ryzom - MMORPG Framework -// Copyright (C) 2010 Winch Gate Property Limited -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU Affero General Public License as -// published by the Free Software Foundation, either version 3 of the -// License, or (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public License -// along with this program. If not, see . - //{{NO_DEPENDENCIES}} -// Microsoft Developer Studio generated include file. +// Microsoft Visual C++ generated include file. // Used by mission_compiler_fe.rc // #define IDM_ABOUTBOX 0x0010 @@ -28,6 +12,7 @@ #define IDR_MENU1 131 #define IDD_DIALOG_ADD_PATH 132 #define IDD_DIALOG_MODE 133 +#define IDS_VERSIONTEXT 140 #define IDC_LIST_SRC 1000 #define IDC_LIST_DST 1001 #define IDC_ADD 1002 diff --git a/code/ryzom/tools/leveldesign/mission_compiler_fe/mission_compiler_fe.rc b/code/ryzom/tools/leveldesign/mission_compiler_fe/mission_compiler_fe.rc index 2feacfe1e..812261b50 100644 --- a/code/ryzom/tools/leveldesign/mission_compiler_fe/mission_compiler_fe.rc +++ b/code/ryzom/tools/leveldesign/mission_compiler_fe/mission_compiler_fe.rc @@ -1,4 +1,4 @@ -//Microsoft Developer Studio generated resource script. +// Microsoft Visual C++ generated resource script. // #include "resource.h" @@ -16,25 +16,15 @@ // English resources #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) -#ifdef _WIN32 LANGUAGE LANG_ENGLISH, SUBLANG_NEUTRAL #pragma code_page(1252) -#endif //_WIN32 - -///////////////////////////////////////////////////////////////////////////// -// -// Icon -// - -// Icon with lowest ID value placed first to ensure application icon -// remains consistent on all systems. ///////////////////////////////////////////////////////////////////////////// // // Menu // -IDR_MENU1 MENU DISCARDABLE +IDR_MENU1 MENU BEGIN POPUP "Special" BEGIN @@ -49,13 +39,64 @@ END // Dialog // -IDD_DIALOG_ADD_PATH DIALOG DISCARDABLE 0, 0, 283, 46 -STYLE WS_POPUP | WS_CAPTION +IDD_DIALOG_ADD_PATH DIALOG 0, 0, 283, 46 +STYLE DS_SETFONT | WS_POPUP | WS_CAPTION CAPTION "Init compiler..." FONT 8, "MS Sans Serif" BEGIN - EDITTEXT IDC_ADD_PATH,7,7,269,32,ES_MULTILINE | ES_AUTOVSCROLL | - ES_AUTOHSCROLL | ES_READONLY + EDITTEXT IDC_ADD_PATH,7,7,269,32,ES_MULTILINE | ES_AUTOVSCROLL | ES_AUTOHSCROLL | ES_READONLY +END + +IDD_MISSION_COMPILER_FE_DIALOG DIALOGEX 0, 0, 361, 322 +STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +EXSTYLE WS_EX_APPWINDOW +CAPTION "Primitive tool" +MENU IDR_MENU1 +FONT 8, "MS Sans Serif", 0, 0, 0x1 +BEGIN + DEFPUSHBUTTON "&COMPILE",IDC_COMPILE,155,242,50,14,WS_DISABLED + PUSHBUTTON "&QUIT",IDCANCEL,156,301,50,14 + LISTBOX IDC_LIST_SRC,7,125,136,190,LBS_SORT | LBS_NOINTEGRALHEIGHT | LBS_EXTENDEDSEL | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP + LISTBOX IDC_LIST_DST,218,113,136,202,LBS_SORT | LBS_NOINTEGRALHEIGHT | LBS_EXTENDEDSEL | WS_VSCROLL | WS_TABSTOP + CTEXT "Available Primitive files",IDC_STATIC,7,90,136,11 + CTEXT "Selected primitive",IDC_STATIC,218,90,136,15 + PUSHBUTTON ">>",IDC_ADD,156,128,50,16 + PUSHBUTTON "<<",IDC_REMOVE,156,175,50,16 + PUSHBUTTON "Change directory ...",IDC_CHANGE_DIR,7,7,72,16 + PUSHBUTTON "ALL >>",IDC_ADD_ALL,156,146,50,16 + EDITTEXT IDC_FILTER,32,104,112,14,ES_AUTOHSCROLL + ICON IDI_ICON_FILTER,IDC_STATIC,8,104,21,20,SS_REALSIZEIMAGE + DEFPUSHBUTTON "COMPILE &PUBLISH",IDC_PUBLISH,155,259,50,26,BS_MULTILINE | WS_DISABLED + PUSHBUTTON "&VALIDATE",IDC_VALIDATE,155,225,50,14,WS_DISABLED + EDITTEXT IDC_DATA_DIRECTORY,89,7,265,15,ES_AUTOHSCROLL + LTEXT "",IDC_PATH_WARNING,105,28,235,8 + GROUPBOX "Publish to the following servers",IDC_STATIC,62,38,254,45 + CONTROL "Server 1",IDC_CHECK_SRV1,"Button",BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,74,50,41,10 + CONTROL "Server 2",IDC_CHECK_SRV2,"Button",BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,74,66,41,10 + CONTROL "Server 3",IDC_CHECK_SRV3,"Button",BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,126,50,41,10 + CONTROL "Server4",IDC_CHECK_SRV4,"Button",BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,126,66,41,10 + CONTROL "Server 5",IDC_CHECK_SRV5,"Button",BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,188,50,41,10 + CONTROL "Server 6",IDC_CHECK_SRV6,"Button",BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,188,66,41,10 + CONTROL "Server 7",IDC_CHECK_SRV7,"Button",BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,252,50,39,11 + CONTROL "Server 8",IDC_CHECK_SRV8,"Button",BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,252,64,42,13 +END + +IDD_COMPIL DIALOG 0, 0, 294, 178 +STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION +CAPTION "Compilation status" +FONT 8, "MS Sans Serif" +BEGIN + EDITTEXT IDC_COMPIL_LOG,7,7,280,148,ES_MULTILINE | ES_READONLY | WS_VSCROLL | WS_HSCROLL + PUSHBUTTON "Ok",IDOK,228,158,59,16,WS_DISABLED +END + +IDD_DIALOG_MODE DIALOG 0, 0, 155, 76 +STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Choose Tool Mode" +FONT 8, "MS Sans Serif" +BEGIN + DEFPUSHBUTTON "Compile mission",ID_MODE_COMPILE,7,14,141,23 + PUSHBUTTON "Publish primitive",ID_MODE_PUBLISH,7,46,141,23,WS_DISABLED END @@ -65,7 +106,7 @@ END // #ifdef APSTUDIO_INVOKED -GUIDELINES DESIGNINFO DISCARDABLE +GUIDELINES DESIGNINFO BEGIN IDD_DIALOG_ADD_PATH, DIALOG BEGIN @@ -77,6 +118,7 @@ BEGIN END #endif // APSTUDIO_INVOKED + ///////////////////////////////////////////////////////////////////////////// // // Icon @@ -84,136 +126,9 @@ END // Icon with lowest ID value placed first to ensure application icon // remains consistent on all systems. -IDR_MAINFRAME ICON DISCARDABLE "res\\mission_compiler_fe.ico" -IDI_ICON_FILTER ICON DISCARDABLE "res\\icon_fil.ico" +IDR_MAINFRAME ICON "res\\red_pill.ico" -///////////////////////////////////////////////////////////////////////////// -// -// Dialog -// - -IDD_ABOUTBOX DIALOG DISCARDABLE 0, 0, 235, 55 -STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "About mission_compiler_fe" -FONT 8, "MS Sans Serif" -BEGIN - ICON IDR_MAINFRAME,IDC_STATIC,11,17,20,20 - LTEXT "mission_compiler_fe version 1.0",IDC_STATIC,40,10,119,8, - SS_NOPREFIX - LTEXT "Copyright (C) 2004",IDC_STATIC,40,25,119,8 - DEFPUSHBUTTON "OK",IDOK,178,7,50,14,WS_GROUP -END - -IDD_MISSION_COMPILER_FE_DIALOG DIALOGEX 0, 0, 361, 322 -STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -EXSTYLE WS_EX_APPWINDOW -CAPTION "Primitive tool" -MENU IDR_MENU1 -FONT 8, "MS Sans Serif" -BEGIN - DEFPUSHBUTTON "&COMPILE",IDC_COMPILE,155,242,50,14,WS_DISABLED - PUSHBUTTON "&QUIT",IDCANCEL,156,301,50,14 - LISTBOX IDC_LIST_SRC,7,125,136,190,LBS_SORT | - LBS_NOINTEGRALHEIGHT | LBS_EXTENDEDSEL | WS_VSCROLL | - WS_HSCROLL | WS_TABSTOP - LISTBOX IDC_LIST_DST,218,113,136,202,LBS_SORT | - LBS_NOINTEGRALHEIGHT | LBS_EXTENDEDSEL | WS_VSCROLL | - WS_TABSTOP - CTEXT "Available Primitive files",IDC_STATIC,7,90,136,11 - CTEXT "Selected primitive",IDC_STATIC,218,90,136,15 - PUSHBUTTON ">>",IDC_ADD,156,128,50,16 - PUSHBUTTON "<<",IDC_REMOVE,156,175,50,16 - PUSHBUTTON "Change directory ...",IDC_CHANGE_DIR,7,7,72,16 - PUSHBUTTON "ALL >>",IDC_ADD_ALL,156,146,50,16 - EDITTEXT IDC_FILTER,32,104,112,14,ES_AUTOHSCROLL - ICON IDI_ICON_FILTER,IDC_STATIC,8,104,21,20,SS_REALSIZEIMAGE - DEFPUSHBUTTON "COMPILE &PUBLISH",IDC_PUBLISH,155,259,50,26, - BS_MULTILINE | WS_DISABLED - PUSHBUTTON "&VALIDATE",IDC_VALIDATE,155,225,50,14,WS_DISABLED - EDITTEXT IDC_DATA_DIRECTORY,89,7,265,15,ES_AUTOHSCROLL - LTEXT "",IDC_PATH_WARNING,105,28,235,8 - GROUPBOX "Publish to the following servers",IDC_STATIC,62,38,254, - 45 - CONTROL "Server 1",IDC_CHECK_SRV1,"Button",BS_AUTOCHECKBOX | - WS_DISABLED | WS_TABSTOP,74,50,41,10 - CONTROL "Server 2",IDC_CHECK_SRV2,"Button",BS_AUTOCHECKBOX | - WS_DISABLED | WS_TABSTOP,74,66,41,10 - CONTROL "Server 3",IDC_CHECK_SRV3,"Button",BS_AUTOCHECKBOX | - WS_DISABLED | WS_TABSTOP,126,50,41,10 - CONTROL "Server4",IDC_CHECK_SRV4,"Button",BS_AUTOCHECKBOX | - WS_DISABLED | WS_TABSTOP,126,66,41,10 - CONTROL "Server 5",IDC_CHECK_SRV5,"Button",BS_AUTOCHECKBOX | - WS_DISABLED | WS_TABSTOP,188,50,41,10 - CONTROL "Server 6",IDC_CHECK_SRV6,"Button",BS_AUTOCHECKBOX | - WS_DISABLED | WS_TABSTOP,188,66,41,10 - CONTROL "Server 7",IDC_CHECK_SRV7,"Button",BS_AUTOCHECKBOX | - WS_DISABLED | WS_TABSTOP,252,50,39,11 - CONTROL "Server 8",IDC_CHECK_SRV8,"Button",BS_AUTOCHECKBOX | - WS_DISABLED | WS_TABSTOP,252,64,42,13 -END - -IDD_COMPIL DIALOG DISCARDABLE 0, 0, 294, 178 -STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION -CAPTION "Compilation status" -FONT 8, "MS Sans Serif" -BEGIN - EDITTEXT IDC_COMPIL_LOG,7,7,280,148,ES_MULTILINE | ES_READONLY | - WS_VSCROLL | WS_HSCROLL - PUSHBUTTON "Ok",IDOK,228,158,59,16,WS_DISABLED -END - -IDD_DIALOG_MODE DIALOG DISCARDABLE 0, 0, 155, 76 -STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Choose Tool Mode" -FONT 8, "MS Sans Serif" -BEGIN - DEFPUSHBUTTON "Compile mission",ID_MODE_COMPILE,7,14,141,23 - PUSHBUTTON "Publish primitive",ID_MODE_PUBLISH,7,46,141,23, - WS_DISABLED -END - - -///////////////////////////////////////////////////////////////////////////// -// -// DESIGNINFO -// - -#ifdef APSTUDIO_INVOKED -GUIDELINES DESIGNINFO DISCARDABLE -BEGIN - IDD_ABOUTBOX, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 228 - TOPMARGIN, 7 - BOTTOMMARGIN, 48 - END - - IDD_MISSION_COMPILER_FE_DIALOG, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 354 - TOPMARGIN, 7 - BOTTOMMARGIN, 315 - END - - IDD_COMPIL, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 287 - TOPMARGIN, 7 - BOTTOMMARGIN, 174 - END - - IDD_DIALOG_MODE, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 148 - TOPMARGIN, 7 - BOTTOMMARGIN, 69 - END -END -#endif // APSTUDIO_INVOKED +IDI_ICON_FILTER ICON "res\\icon_fil.ico" #ifdef APSTUDIO_INVOKED @@ -222,18 +137,18 @@ END // TEXTINCLUDE // -1 TEXTINCLUDE DISCARDABLE +1 TEXTINCLUDE BEGIN "resource.h\0" END -2 TEXTINCLUDE DISCARDABLE +2 TEXTINCLUDE BEGIN "#include ""afxres.h""\r\n" "\0" END -3 TEXTINCLUDE DISCARDABLE +3 TEXTINCLUDE BEGIN "#define _AFX_NO_SPLITTER_RESOURCES\r\n" "#define _AFX_NO_OLE_RESOURCES\r\n" @@ -248,63 +163,22 @@ BEGIN "#include ""res\\mission_compiler_fe.rc2"" // non-Microsoft Visual C++ edited resources\r\n" "#include ""l.fra\\afxres.rc"" // Standard components\r\n" "#endif\r\n" + "\r\n" + "#include ""version.rc2""\r\n" "\0" END #endif // APSTUDIO_INVOKED -#ifndef _MAC -///////////////////////////////////////////////////////////////////////////// -// -// Version -// - -VS_VERSION_INFO VERSIONINFO - FILEVERSION 1,0,0,1 - PRODUCTVERSION 1,0,0,1 - FILEFLAGSMASK 0x3fL -#ifdef _DEBUG - FILEFLAGS 0x1L -#else - FILEFLAGS 0x0L -#endif - FILEOS 0x4L - FILETYPE 0x1L - FILESUBTYPE 0x0L -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040C04B0" - BEGIN - VALUE "CompanyName", "\0" - VALUE "FileDescription", "Application MFC mission_compiler_fe\0" - VALUE "FileVersion", "1, 0, 0, 1\0" - VALUE "InternalName", "mission_compiler_fe\0" - VALUE "LegalCopyright", "Copyright (C) 2004\0" - VALUE "LegalTrademarks", "\0" - VALUE "OriginalFilename", "mission_compiler_fe.EXE\0" - VALUE "ProductName", "Application mission_compiler_fe\0" - VALUE "ProductVersion", "1, 0, 0, 1\0" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x40c, 1200 - END -END - -#endif // !_MAC - - ///////////////////////////////////////////////////////////////////////////// // // String Table // -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN - IDS_ABOUTBOX "&A propos de mission_compiler_fe..." + IDS_ABOUTBOX "&About Ryzom Mission Compiler..." END #endif // English resources @@ -331,6 +205,8 @@ LANGUAGE 12, 1 #include "l.fra\afxres.rc" // Standard components #endif +#include "version.rc2" + ///////////////////////////////////////////////////////////////////////////// #endif // not APSTUDIO_INVOKED diff --git a/code/ryzom/tools/leveldesign/mission_compiler_fe/res/mission_compiler_fe.ico b/code/ryzom/tools/leveldesign/mission_compiler_fe/res/mission_compiler_fe.ico deleted file mode 100644 index 7eef0bcbe6580a6f464d688906172c2d9de44262..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1078 zcmc&zF>b>!3}jLb9s)T}@Kod(893@u8ajANzT`op9^o+)S?=nU(FD@%0s)Sg^oyC8{H z9myetc;MEP)59v(LMa~xK8Yu^jIR*H22uCFiq5%C{s7(PJi>o15i^bmX4(vPxWAio z9ryY#AU_jfnd047-@`)XzL?%iS$gQyFP{44kS9X)fN{{QoL~hO-&=q&20Zr*cxFAt PkaNE{wR~2C$NfnjhSXWT diff --git a/code/ryzom/tools/leveldesign/mission_compiler_fe/res/red_pill.ico b/code/ryzom/tools/leveldesign/mission_compiler_fe/res/red_pill.ico new file mode 100644 index 0000000000000000000000000000000000000000..c5f25058384f0aba7d5193400e74efdc8a65ccc1 GIT binary patch literal 3638 zcmeH}y>1gh5Xb-b{cRiAJMh>Nt}K+7NFISE?|@SH73|6-RchB!9>8rZS|nF4DbnB) z(Sby<%H4cK7u6-OK?FTnq*W-}h&Vmg&O5@DCM`cfa~;R86ywdTvmqp;Chyl|)QZ zs;uYi?C7Qbc_y*fanJ8UMsY(vA;G8~O0gX#uiuN9@SB}s>pK(=w&_C=|0iQ|;x z^rFu^YfzN97T=cy>i3Gg==E*88&Lhp&Cj6g#|g)Kc@{-k#;q +#include "config.h" + +#ifdef _DEBUG +#define NL_FILEEXT "_d" +#else +#define NL_FILEEXT "" +#endif + +VS_VERSION_INFO VERSIONINFO + FILEVERSION NL_VERSION_RC + PRODUCTVERSION NL_VERSION_RC + FILEFLAGSMASK VS_FFI_FILEFLAGSMASK +#ifdef _DEBUG + FILEFLAGS VS_FF_DEBUG +#else + FILEFLAGS 0x0L +#endif + FILEOS VOS_NT_WINDOWS32 + FILETYPE VFT_APP + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "CompanyName", AUTHOR + VALUE "FileDescription", "Ryzom Mission Compiler Frontend" + VALUE "FileVersion", NL_VERSION + VALUE "LegalCopyright", COPYRIGHT + VALUE "OriginalFilename", "ryzom_mission_compiler_fe" NL_FILEEXT ".exe" + VALUE "ProductName", "Ryzom Tools" + VALUE "ProductVersion", NL_PRODUCT_VERSION + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x9, 1200 + END +END + +STRINGTABLE +BEGIN + IDS_VERSIONTEXT "Ryzom Mission Compiler Frontend " NL_VERSION +END + +IDD_ABOUTBOX DIALOG DISCARDABLE 0, 0, 235, 55 +STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "About Ryzom Mission Compiler Frontend" +FONT 8, "MS Sans Serif" +BEGIN + ICON IDR_MAINFRAME,IDC_STATIC,11,17,20,20 + LTEXT IDS_VERSIONTEXT,IDC_STATIC,40,10,119,8,SS_NOPREFIX + LTEXT COPYRIGHT,IDC_STATIC,40,25,119,8 + DEFPUSHBUTTON "OK",IDOK,178,7,50,14,WS_GROUP +END + +#endif /* #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) */ +#endif /* #ifndef NL_VERSION_RC2 */ From 1d0bce3f8bd1d14a8a4685af7f6d24d119848c73 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Sat, 11 May 2019 07:44:10 +0800 Subject: [PATCH 28/77] Fix georges exe name --- .../tools/leveldesign/georges_exe/CMakeLists.txt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/code/ryzom/tools/leveldesign/georges_exe/CMakeLists.txt b/code/ryzom/tools/leveldesign/georges_exe/CMakeLists.txt index 07ac799c9..e0592cb4e 100644 --- a/code/ryzom/tools/leveldesign/georges_exe/CMakeLists.txt +++ b/code/ryzom/tools/leveldesign/georges_exe/CMakeLists.txt @@ -1,12 +1,12 @@ -FILE(GLOB SRC *.cpp *.h) +FILE(GLOB SRC *.cpp *.h *.rc *.rc2) ADD_DEFINITIONS(${MFC_DEFINITIONS}) SET(CMAKE_MFC_FLAG 2) -ADD_EXECUTABLE(georges_exe WIN32 ${SRC} georges_exe.rc) +ADD_EXECUTABLE(georges WIN32 ${SRC}) -TARGET_LINK_LIBRARIES(georges_exe nelmisc nelgeorges georges_dll) +TARGET_LINK_LIBRARIES(georges nelmisc nelgeorges georges_dll) -NL_DEFAULT_PROPS(georges_exe "Ryzom, Tools, Georges: Georges Exe") -NL_ADD_RUNTIME_FLAGS(georges_exe) +NL_DEFAULT_PROPS(georges "Ryzom, Tools, Georges: Georges Exe") +NL_ADD_RUNTIME_FLAGS(georges) -INSTALL(TARGETS georges_exe RUNTIME DESTINATION ${RYZOM_BIN_PREFIX} COMPONENT tools) +INSTALL(TARGETS georges RUNTIME DESTINATION ${RYZOM_BIN_PREFIX} COMPONENT tools) From b85dbdd7df801237889d9dbc321f6462c9c805dd Mon Sep 17 00:00:00 2001 From: kaetemi Date: Sat, 11 May 2019 08:01:10 +0800 Subject: [PATCH 29/77] Add versioning info to tools --- code/nel/tools/3d/anim_builder/main.rc | 43 ++++++++++++++++++- code/nel/tools/3d/get_neighbors/main.rc | 43 ++++++++++++++++++- code/nel/tools/3d/hls_bank_maker/main.rc | 43 ++++++++++++++++++- code/nel/tools/3d/ig_add/main.rc | 43 ++++++++++++++++++- code/nel/tools/3d/ig_elevation/main.rc | 43 ++++++++++++++++++- code/nel/tools/3d/ig_lighter/main.rc | 43 ++++++++++++++++++- code/nel/tools/3d/lightmap_optimizer/main.rc | 43 ++++++++++++++++++- code/nel/tools/3d/mesh_export/main.rc | 43 ++++++++++++++++++- code/nel/tools/3d/panoply_maker/main.rc | 43 ++++++++++++++++++- code/nel/tools/3d/shapes_exporter/main.rc | 43 ++++++++++++++++++- code/nel/tools/3d/tga_2_dds/main.rc | 43 ++++++++++++++++++- code/nel/tools/3d/tga_cut/main.rc | 43 ++++++++++++++++++- code/nel/tools/3d/unbuild_interface/main.rc | 43 ++++++++++++++++++- code/nel/tools/3d/zone_dependencies/main.rc | 43 ++++++++++++++++++- code/nel/tools/3d/zone_ig_lighter/main.rc | 43 ++++++++++++++++++- code/nel/tools/3d/zone_lighter/main.rc | 43 ++++++++++++++++++- code/nel/tools/3d/zone_welder/main.rc | 43 ++++++++++++++++++- code/nel/tools/misc/bnp_make/main.rc | 43 ++++++++++++++++++- .../tools/misc/crash_report/crash_report.rc | 27 +++++++----- code/nel/tools/misc/exec_timeout/main.rc | 43 ++++++++++++++++++- code/nel/tools/misc/make_sheet_id/main.rc | 43 ++++++++++++++++++- code/nel/tools/misc/message_box/main.rc | 43 ++++++++++++++++++- code/nel/tools/misc/message_box_qt/main.rc | 43 ++++++++++++++++++- .../tools/client/r2_islands_textures/main.rc | 43 ++++++++++++++++++- .../tools/leveldesign/prim_export/main.rc | 43 ++++++++++++++++++- .../world_editor/land_export/main.rc | 43 ++++++++++++++++++- code/ryzom/tools/patch_gen/patch_gen.rc | 43 ++++++++++++++++++- .../tools/patch_gen/patch_gen_service.rc | 43 ++++++++++++++++++- code/ryzom/tools/server/ai_build_wmap/main.rc | 43 ++++++++++++++++++- code/ryzom/tools/sheets_packer/main.rc | 43 ++++++++++++++++++- code/ryzom/tools/sheets_packer_shard/main.rc | 43 ++++++++++++++++++- code/ryzom/tools/translation_tools/main.rc | 43 ++++++++++++++++++- 32 files changed, 1319 insertions(+), 41 deletions(-) diff --git a/code/nel/tools/3d/anim_builder/main.rc b/code/nel/tools/3d/anim_builder/main.rc index 958fa5089..fe31d676d 100644 --- a/code/nel/tools/3d/anim_builder/main.rc +++ b/code/nel/tools/3d/anim_builder/main.rc @@ -1 +1,42 @@ -IDI_MAIN_ICON ICON DISCARDABLE "blue_pill.ico" +#include +#include "config.h" + +IDI_MAIN_ICON ICON DISCARDABLE "blue_pill.ico" + +#ifdef _DEBUG +#define NL_FILEEXT "_d" +#else +#define NL_FILEEXT "" +#endif + +VS_VERSION_INFO VERSIONINFO + FILEVERSION NL_VERSION_RC + PRODUCTVERSION NL_VERSION_RC + FILEFLAGSMASK VS_FFI_FILEFLAGSMASK +#ifdef _DEBUG + FILEFLAGS VS_FF_DEBUG +#else + FILEFLAGS 0x0L +#endif + FILEOS VOS_NT_WINDOWS32 + FILETYPE VFT_APP + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "CompanyName", AUTHOR + VALUE "FileDescription", "NeL Anim Builder" + VALUE "FileVersion", NL_VERSION + VALUE "LegalCopyright", COPYRIGHT + VALUE "OriginalFilename", "anim_builder" NL_FILEEXT ".exe" + VALUE "ProductName", "NeL Tools" + VALUE "ProductVersion", NL_PRODUCT_VERSION + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x9, 1200 + END +END diff --git a/code/nel/tools/3d/get_neighbors/main.rc b/code/nel/tools/3d/get_neighbors/main.rc index 958fa5089..309d23deb 100644 --- a/code/nel/tools/3d/get_neighbors/main.rc +++ b/code/nel/tools/3d/get_neighbors/main.rc @@ -1 +1,42 @@ -IDI_MAIN_ICON ICON DISCARDABLE "blue_pill.ico" +#include +#include "config.h" + +IDI_MAIN_ICON ICON DISCARDABLE "blue_pill.ico" + +#ifdef _DEBUG +#define NL_FILEEXT "_d" +#else +#define NL_FILEEXT "" +#endif + +VS_VERSION_INFO VERSIONINFO + FILEVERSION NL_VERSION_RC + PRODUCTVERSION NL_VERSION_RC + FILEFLAGSMASK VS_FFI_FILEFLAGSMASK +#ifdef _DEBUG + FILEFLAGS VS_FF_DEBUG +#else + FILEFLAGS 0x0L +#endif + FILEOS VOS_NT_WINDOWS32 + FILETYPE VFT_APP + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "CompanyName", AUTHOR + VALUE "FileDescription", "NeL Get Neighbors" + VALUE "FileVersion", NL_VERSION + VALUE "LegalCopyright", COPYRIGHT + VALUE "OriginalFilename", "get_neighbors" NL_FILEEXT ".exe" + VALUE "ProductName", "NeL Tools" + VALUE "ProductVersion", NL_PRODUCT_VERSION + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x9, 1200 + END +END diff --git a/code/nel/tools/3d/hls_bank_maker/main.rc b/code/nel/tools/3d/hls_bank_maker/main.rc index 958fa5089..418288316 100644 --- a/code/nel/tools/3d/hls_bank_maker/main.rc +++ b/code/nel/tools/3d/hls_bank_maker/main.rc @@ -1 +1,42 @@ -IDI_MAIN_ICON ICON DISCARDABLE "blue_pill.ico" +#include +#include "config.h" + +IDI_MAIN_ICON ICON DISCARDABLE "blue_pill.ico" + +#ifdef _DEBUG +#define NL_FILEEXT "_d" +#else +#define NL_FILEEXT "" +#endif + +VS_VERSION_INFO VERSIONINFO + FILEVERSION NL_VERSION_RC + PRODUCTVERSION NL_VERSION_RC + FILEFLAGSMASK VS_FFI_FILEFLAGSMASK +#ifdef _DEBUG + FILEFLAGS VS_FF_DEBUG +#else + FILEFLAGS 0x0L +#endif + FILEOS VOS_NT_WINDOWS32 + FILETYPE VFT_APP + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "CompanyName", AUTHOR + VALUE "FileDescription", "NeL HLS Bank Maker" + VALUE "FileVersion", NL_VERSION + VALUE "LegalCopyright", COPYRIGHT + VALUE "OriginalFilename", "hls_bank_maker" NL_FILEEXT ".exe" + VALUE "ProductName", "NeL Tools" + VALUE "ProductVersion", NL_PRODUCT_VERSION + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x9, 1200 + END +END diff --git a/code/nel/tools/3d/ig_add/main.rc b/code/nel/tools/3d/ig_add/main.rc index 958fa5089..de0c24308 100644 --- a/code/nel/tools/3d/ig_add/main.rc +++ b/code/nel/tools/3d/ig_add/main.rc @@ -1 +1,42 @@ -IDI_MAIN_ICON ICON DISCARDABLE "blue_pill.ico" +#include +#include "config.h" + +IDI_MAIN_ICON ICON DISCARDABLE "blue_pill.ico" + +#ifdef _DEBUG +#define NL_FILEEXT "_d" +#else +#define NL_FILEEXT "" +#endif + +VS_VERSION_INFO VERSIONINFO + FILEVERSION NL_VERSION_RC + PRODUCTVERSION NL_VERSION_RC + FILEFLAGSMASK VS_FFI_FILEFLAGSMASK +#ifdef _DEBUG + FILEFLAGS VS_FF_DEBUG +#else + FILEFLAGS 0x0L +#endif + FILEOS VOS_NT_WINDOWS32 + FILETYPE VFT_APP + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "CompanyName", AUTHOR + VALUE "FileDescription", "NeL IG Add" + VALUE "FileVersion", NL_VERSION + VALUE "LegalCopyright", COPYRIGHT + VALUE "OriginalFilename", "ig_add" NL_FILEEXT ".exe" + VALUE "ProductName", "NeL Tools" + VALUE "ProductVersion", NL_PRODUCT_VERSION + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x9, 1200 + END +END diff --git a/code/nel/tools/3d/ig_elevation/main.rc b/code/nel/tools/3d/ig_elevation/main.rc index 958fa5089..fb8391ad1 100644 --- a/code/nel/tools/3d/ig_elevation/main.rc +++ b/code/nel/tools/3d/ig_elevation/main.rc @@ -1 +1,42 @@ -IDI_MAIN_ICON ICON DISCARDABLE "blue_pill.ico" +#include +#include "config.h" + +IDI_MAIN_ICON ICON DISCARDABLE "blue_pill.ico" + +#ifdef _DEBUG +#define NL_FILEEXT "_d" +#else +#define NL_FILEEXT "" +#endif + +VS_VERSION_INFO VERSIONINFO + FILEVERSION NL_VERSION_RC + PRODUCTVERSION NL_VERSION_RC + FILEFLAGSMASK VS_FFI_FILEFLAGSMASK +#ifdef _DEBUG + FILEFLAGS VS_FF_DEBUG +#else + FILEFLAGS 0x0L +#endif + FILEOS VOS_NT_WINDOWS32 + FILETYPE VFT_APP + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "CompanyName", AUTHOR + VALUE "FileDescription", "NeL IG Elevation" + VALUE "FileVersion", NL_VERSION + VALUE "LegalCopyright", COPYRIGHT + VALUE "OriginalFilename", "ig_elevation" NL_FILEEXT ".exe" + VALUE "ProductName", "NeL Tools" + VALUE "ProductVersion", NL_PRODUCT_VERSION + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x9, 1200 + END +END diff --git a/code/nel/tools/3d/ig_lighter/main.rc b/code/nel/tools/3d/ig_lighter/main.rc index 958fa5089..89dcbff5a 100644 --- a/code/nel/tools/3d/ig_lighter/main.rc +++ b/code/nel/tools/3d/ig_lighter/main.rc @@ -1 +1,42 @@ -IDI_MAIN_ICON ICON DISCARDABLE "blue_pill.ico" +#include +#include "config.h" + +IDI_MAIN_ICON ICON DISCARDABLE "blue_pill.ico" + +#ifdef _DEBUG +#define NL_FILEEXT "_d" +#else +#define NL_FILEEXT "" +#endif + +VS_VERSION_INFO VERSIONINFO + FILEVERSION NL_VERSION_RC + PRODUCTVERSION NL_VERSION_RC + FILEFLAGSMASK VS_FFI_FILEFLAGSMASK +#ifdef _DEBUG + FILEFLAGS VS_FF_DEBUG +#else + FILEFLAGS 0x0L +#endif + FILEOS VOS_NT_WINDOWS32 + FILETYPE VFT_APP + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "CompanyName", AUTHOR + VALUE "FileDescription", "NeL IG Lighter" + VALUE "FileVersion", NL_VERSION + VALUE "LegalCopyright", COPYRIGHT + VALUE "OriginalFilename", "ig_lighter" NL_FILEEXT ".exe" + VALUE "ProductName", "NeL Tools" + VALUE "ProductVersion", NL_PRODUCT_VERSION + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x9, 1200 + END +END diff --git a/code/nel/tools/3d/lightmap_optimizer/main.rc b/code/nel/tools/3d/lightmap_optimizer/main.rc index 958fa5089..eaaaf2b46 100644 --- a/code/nel/tools/3d/lightmap_optimizer/main.rc +++ b/code/nel/tools/3d/lightmap_optimizer/main.rc @@ -1 +1,42 @@ -IDI_MAIN_ICON ICON DISCARDABLE "blue_pill.ico" +#include +#include "config.h" + +IDI_MAIN_ICON ICON DISCARDABLE "blue_pill.ico" + +#ifdef _DEBUG +#define NL_FILEEXT "_d" +#else +#define NL_FILEEXT "" +#endif + +VS_VERSION_INFO VERSIONINFO + FILEVERSION NL_VERSION_RC + PRODUCTVERSION NL_VERSION_RC + FILEFLAGSMASK VS_FFI_FILEFLAGSMASK +#ifdef _DEBUG + FILEFLAGS VS_FF_DEBUG +#else + FILEFLAGS 0x0L +#endif + FILEOS VOS_NT_WINDOWS32 + FILETYPE VFT_APP + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "CompanyName", AUTHOR + VALUE "FileDescription", "NeL Lightmap Optimizer" + VALUE "FileVersion", NL_VERSION + VALUE "LegalCopyright", COPYRIGHT + VALUE "OriginalFilename", "lightmap_optimizer" NL_FILEEXT ".exe" + VALUE "ProductName", "NeL Tools" + VALUE "ProductVersion", NL_PRODUCT_VERSION + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x9, 1200 + END +END diff --git a/code/nel/tools/3d/mesh_export/main.rc b/code/nel/tools/3d/mesh_export/main.rc index 958fa5089..b3c77bb67 100644 --- a/code/nel/tools/3d/mesh_export/main.rc +++ b/code/nel/tools/3d/mesh_export/main.rc @@ -1 +1,42 @@ -IDI_MAIN_ICON ICON DISCARDABLE "blue_pill.ico" +#include +#include "config.h" + +IDI_MAIN_ICON ICON DISCARDABLE "blue_pill.ico" + +#ifdef _DEBUG +#define NL_FILEEXT "_d" +#else +#define NL_FILEEXT "" +#endif + +VS_VERSION_INFO VERSIONINFO + FILEVERSION NL_VERSION_RC + PRODUCTVERSION NL_VERSION_RC + FILEFLAGSMASK VS_FFI_FILEFLAGSMASK +#ifdef _DEBUG + FILEFLAGS VS_FF_DEBUG +#else + FILEFLAGS 0x0L +#endif + FILEOS VOS_NT_WINDOWS32 + FILETYPE VFT_APP + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "CompanyName", AUTHOR + VALUE "FileDescription", "NeL Mesh Export" + VALUE "FileVersion", NL_VERSION + VALUE "LegalCopyright", COPYRIGHT + VALUE "OriginalFilename", "mesh_export" NL_FILEEXT ".exe" + VALUE "ProductName", "NeL Tools" + VALUE "ProductVersion", NL_PRODUCT_VERSION + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x9, 1200 + END +END diff --git a/code/nel/tools/3d/panoply_maker/main.rc b/code/nel/tools/3d/panoply_maker/main.rc index 958fa5089..17ec67347 100644 --- a/code/nel/tools/3d/panoply_maker/main.rc +++ b/code/nel/tools/3d/panoply_maker/main.rc @@ -1 +1,42 @@ -IDI_MAIN_ICON ICON DISCARDABLE "blue_pill.ico" +#include +#include "config.h" + +IDI_MAIN_ICON ICON DISCARDABLE "blue_pill.ico" + +#ifdef _DEBUG +#define NL_FILEEXT "_d" +#else +#define NL_FILEEXT "" +#endif + +VS_VERSION_INFO VERSIONINFO + FILEVERSION NL_VERSION_RC + PRODUCTVERSION NL_VERSION_RC + FILEFLAGSMASK VS_FFI_FILEFLAGSMASK +#ifdef _DEBUG + FILEFLAGS VS_FF_DEBUG +#else + FILEFLAGS 0x0L +#endif + FILEOS VOS_NT_WINDOWS32 + FILETYPE VFT_APP + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "CompanyName", AUTHOR + VALUE "FileDescription", "NeL Panoply Maker" + VALUE "FileVersion", NL_VERSION + VALUE "LegalCopyright", COPYRIGHT + VALUE "OriginalFilename", "panoply_maker" NL_FILEEXT ".exe" + VALUE "ProductName", "NeL Tools" + VALUE "ProductVersion", NL_PRODUCT_VERSION + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x9, 1200 + END +END diff --git a/code/nel/tools/3d/shapes_exporter/main.rc b/code/nel/tools/3d/shapes_exporter/main.rc index 604dd140d..5105532ff 100644 --- a/code/nel/tools/3d/shapes_exporter/main.rc +++ b/code/nel/tools/3d/shapes_exporter/main.rc @@ -1 +1,42 @@ -IDI_MAIN_ICON ICON DISCARDABLE "gold_pill.ico" +#include +#include "config.h" + +IDI_MAIN_ICON ICON DISCARDABLE "gold_pill.ico" + +#ifdef _DEBUG +#define NL_FILEEXT "_d" +#else +#define NL_FILEEXT "" +#endif + +VS_VERSION_INFO VERSIONINFO + FILEVERSION NL_VERSION_RC + PRODUCTVERSION NL_VERSION_RC + FILEFLAGSMASK VS_FFI_FILEFLAGSMASK +#ifdef _DEBUG + FILEFLAGS VS_FF_DEBUG +#else + FILEFLAGS 0x0L +#endif + FILEOS VOS_NT_WINDOWS32 + FILETYPE VFT_APP + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "CompanyName", AUTHOR + VALUE "FileDescription", "NeL Shapes Exporter" + VALUE "FileVersion", NL_VERSION + VALUE "LegalCopyright", COPYRIGHT + VALUE "OriginalFilename", "shapes_exporter" NL_FILEEXT ".exe" + VALUE "ProductName", "NeL Tools" + VALUE "ProductVersion", NL_PRODUCT_VERSION + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x9, 1200 + END +END diff --git a/code/nel/tools/3d/tga_2_dds/main.rc b/code/nel/tools/3d/tga_2_dds/main.rc index 958fa5089..09b6f9b06 100644 --- a/code/nel/tools/3d/tga_2_dds/main.rc +++ b/code/nel/tools/3d/tga_2_dds/main.rc @@ -1 +1,42 @@ -IDI_MAIN_ICON ICON DISCARDABLE "blue_pill.ico" +#include +#include "config.h" + +IDI_MAIN_ICON ICON DISCARDABLE "blue_pill.ico" + +#ifdef _DEBUG +#define NL_FILEEXT "_d" +#else +#define NL_FILEEXT "" +#endif + +VS_VERSION_INFO VERSIONINFO + FILEVERSION NL_VERSION_RC + PRODUCTVERSION NL_VERSION_RC + FILEFLAGSMASK VS_FFI_FILEFLAGSMASK +#ifdef _DEBUG + FILEFLAGS VS_FF_DEBUG +#else + FILEFLAGS 0x0L +#endif + FILEOS VOS_NT_WINDOWS32 + FILETYPE VFT_APP + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "CompanyName", AUTHOR + VALUE "FileDescription", "NeL TGA to DDS" + VALUE "FileVersion", NL_VERSION + VALUE "LegalCopyright", COPYRIGHT + VALUE "OriginalFilename", "tga2dds" NL_FILEEXT ".exe" + VALUE "ProductName", "NeL Tools" + VALUE "ProductVersion", NL_PRODUCT_VERSION + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x9, 1200 + END +END diff --git a/code/nel/tools/3d/tga_cut/main.rc b/code/nel/tools/3d/tga_cut/main.rc index 958fa5089..706d0c58d 100644 --- a/code/nel/tools/3d/tga_cut/main.rc +++ b/code/nel/tools/3d/tga_cut/main.rc @@ -1 +1,42 @@ -IDI_MAIN_ICON ICON DISCARDABLE "blue_pill.ico" +#include +#include "config.h" + +IDI_MAIN_ICON ICON DISCARDABLE "blue_pill.ico" + +#ifdef _DEBUG +#define NL_FILEEXT "_d" +#else +#define NL_FILEEXT "" +#endif + +VS_VERSION_INFO VERSIONINFO + FILEVERSION NL_VERSION_RC + PRODUCTVERSION NL_VERSION_RC + FILEFLAGSMASK VS_FFI_FILEFLAGSMASK +#ifdef _DEBUG + FILEFLAGS VS_FF_DEBUG +#else + FILEFLAGS 0x0L +#endif + FILEOS VOS_NT_WINDOWS32 + FILETYPE VFT_APP + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "CompanyName", AUTHOR + VALUE "FileDescription", "NeL TGA Cut" + VALUE "FileVersion", NL_VERSION + VALUE "LegalCopyright", COPYRIGHT + VALUE "OriginalFilename", "tga_cut" NL_FILEEXT ".exe" + VALUE "ProductName", "NeL Tools" + VALUE "ProductVersion", NL_PRODUCT_VERSION + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x9, 1200 + END +END diff --git a/code/nel/tools/3d/unbuild_interface/main.rc b/code/nel/tools/3d/unbuild_interface/main.rc index 604dd140d..bd99b4305 100644 --- a/code/nel/tools/3d/unbuild_interface/main.rc +++ b/code/nel/tools/3d/unbuild_interface/main.rc @@ -1 +1,42 @@ -IDI_MAIN_ICON ICON DISCARDABLE "gold_pill.ico" +#include +#include "config.h" + +IDI_MAIN_ICON ICON DISCARDABLE "gold_pill.ico" + +#ifdef _DEBUG +#define NL_FILEEXT "_d" +#else +#define NL_FILEEXT "" +#endif + +VS_VERSION_INFO VERSIONINFO + FILEVERSION NL_VERSION_RC + PRODUCTVERSION NL_VERSION_RC + FILEFLAGSMASK VS_FFI_FILEFLAGSMASK +#ifdef _DEBUG + FILEFLAGS VS_FF_DEBUG +#else + FILEFLAGS 0x0L +#endif + FILEOS VOS_NT_WINDOWS32 + FILETYPE VFT_APP + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "CompanyName", AUTHOR + VALUE "FileDescription", "NeL Unbuild Interface" + VALUE "FileVersion", NL_VERSION + VALUE "LegalCopyright", COPYRIGHT + VALUE "OriginalFilename", "unbuild_interface" NL_FILEEXT ".exe" + VALUE "ProductName", "NeL Tools" + VALUE "ProductVersion", NL_PRODUCT_VERSION + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x9, 1200 + END +END diff --git a/code/nel/tools/3d/zone_dependencies/main.rc b/code/nel/tools/3d/zone_dependencies/main.rc index 958fa5089..ef1fef676 100644 --- a/code/nel/tools/3d/zone_dependencies/main.rc +++ b/code/nel/tools/3d/zone_dependencies/main.rc @@ -1 +1,42 @@ -IDI_MAIN_ICON ICON DISCARDABLE "blue_pill.ico" +#include +#include "config.h" + +IDI_MAIN_ICON ICON DISCARDABLE "blue_pill.ico" + +#ifdef _DEBUG +#define NL_FILEEXT "_d" +#else +#define NL_FILEEXT "" +#endif + +VS_VERSION_INFO VERSIONINFO + FILEVERSION NL_VERSION_RC + PRODUCTVERSION NL_VERSION_RC + FILEFLAGSMASK VS_FFI_FILEFLAGSMASK +#ifdef _DEBUG + FILEFLAGS VS_FF_DEBUG +#else + FILEFLAGS 0x0L +#endif + FILEOS VOS_NT_WINDOWS32 + FILETYPE VFT_APP + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "CompanyName", AUTHOR + VALUE "FileDescription", "NeL Zone Dependencies" + VALUE "FileVersion", NL_VERSION + VALUE "LegalCopyright", COPYRIGHT + VALUE "OriginalFilename", "zone_dependencies" NL_FILEEXT ".exe" + VALUE "ProductName", "NeL Tools" + VALUE "ProductVersion", NL_PRODUCT_VERSION + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x9, 1200 + END +END diff --git a/code/nel/tools/3d/zone_ig_lighter/main.rc b/code/nel/tools/3d/zone_ig_lighter/main.rc index 958fa5089..1362a93c4 100644 --- a/code/nel/tools/3d/zone_ig_lighter/main.rc +++ b/code/nel/tools/3d/zone_ig_lighter/main.rc @@ -1 +1,42 @@ -IDI_MAIN_ICON ICON DISCARDABLE "blue_pill.ico" +#include +#include "config.h" + +IDI_MAIN_ICON ICON DISCARDABLE "blue_pill.ico" + +#ifdef _DEBUG +#define NL_FILEEXT "_d" +#else +#define NL_FILEEXT "" +#endif + +VS_VERSION_INFO VERSIONINFO + FILEVERSION NL_VERSION_RC + PRODUCTVERSION NL_VERSION_RC + FILEFLAGSMASK VS_FFI_FILEFLAGSMASK +#ifdef _DEBUG + FILEFLAGS VS_FF_DEBUG +#else + FILEFLAGS 0x0L +#endif + FILEOS VOS_NT_WINDOWS32 + FILETYPE VFT_APP + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "CompanyName", AUTHOR + VALUE "FileDescription", "NeL Zone IG Lighter" + VALUE "FileVersion", NL_VERSION + VALUE "LegalCopyright", COPYRIGHT + VALUE "OriginalFilename", "zone_ig_lighter" NL_FILEEXT ".exe" + VALUE "ProductName", "NeL Tools" + VALUE "ProductVersion", NL_PRODUCT_VERSION + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x9, 1200 + END +END diff --git a/code/nel/tools/3d/zone_lighter/main.rc b/code/nel/tools/3d/zone_lighter/main.rc index 958fa5089..6aa90827d 100644 --- a/code/nel/tools/3d/zone_lighter/main.rc +++ b/code/nel/tools/3d/zone_lighter/main.rc @@ -1 +1,42 @@ -IDI_MAIN_ICON ICON DISCARDABLE "blue_pill.ico" +#include +#include "config.h" + +IDI_MAIN_ICON ICON DISCARDABLE "blue_pill.ico" + +#ifdef _DEBUG +#define NL_FILEEXT "_d" +#else +#define NL_FILEEXT "" +#endif + +VS_VERSION_INFO VERSIONINFO + FILEVERSION NL_VERSION_RC + PRODUCTVERSION NL_VERSION_RC + FILEFLAGSMASK VS_FFI_FILEFLAGSMASK +#ifdef _DEBUG + FILEFLAGS VS_FF_DEBUG +#else + FILEFLAGS 0x0L +#endif + FILEOS VOS_NT_WINDOWS32 + FILETYPE VFT_APP + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "CompanyName", AUTHOR + VALUE "FileDescription", "NeL Zone Lighter" + VALUE "FileVersion", NL_VERSION + VALUE "LegalCopyright", COPYRIGHT + VALUE "OriginalFilename", "zone_lighter" NL_FILEEXT ".exe" + VALUE "ProductName", "NeL Tools" + VALUE "ProductVersion", NL_PRODUCT_VERSION + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x9, 1200 + END +END diff --git a/code/nel/tools/3d/zone_welder/main.rc b/code/nel/tools/3d/zone_welder/main.rc index 958fa5089..04e93ac2c 100644 --- a/code/nel/tools/3d/zone_welder/main.rc +++ b/code/nel/tools/3d/zone_welder/main.rc @@ -1 +1,42 @@ -IDI_MAIN_ICON ICON DISCARDABLE "blue_pill.ico" +#include +#include "config.h" + +IDI_MAIN_ICON ICON DISCARDABLE "blue_pill.ico" + +#ifdef _DEBUG +#define NL_FILEEXT "_d" +#else +#define NL_FILEEXT "" +#endif + +VS_VERSION_INFO VERSIONINFO + FILEVERSION NL_VERSION_RC + PRODUCTVERSION NL_VERSION_RC + FILEFLAGSMASK VS_FFI_FILEFLAGSMASK +#ifdef _DEBUG + FILEFLAGS VS_FF_DEBUG +#else + FILEFLAGS 0x0L +#endif + FILEOS VOS_NT_WINDOWS32 + FILETYPE VFT_APP + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "CompanyName", AUTHOR + VALUE "FileDescription", "NeL Zone Welder" + VALUE "FileVersion", NL_VERSION + VALUE "LegalCopyright", COPYRIGHT + VALUE "OriginalFilename", "zone_welder" NL_FILEEXT ".exe" + VALUE "ProductName", "NeL Tools" + VALUE "ProductVersion", NL_PRODUCT_VERSION + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x9, 1200 + END +END diff --git a/code/nel/tools/misc/bnp_make/main.rc b/code/nel/tools/misc/bnp_make/main.rc index 958fa5089..f4b2740d1 100644 --- a/code/nel/tools/misc/bnp_make/main.rc +++ b/code/nel/tools/misc/bnp_make/main.rc @@ -1 +1,42 @@ -IDI_MAIN_ICON ICON DISCARDABLE "blue_pill.ico" +#include +#include "config.h" + +IDI_MAIN_ICON ICON DISCARDABLE "blue_pill.ico" + +#ifdef _DEBUG +#define NL_FILEEXT "_d" +#else +#define NL_FILEEXT "" +#endif + +VS_VERSION_INFO VERSIONINFO + FILEVERSION NL_VERSION_RC + PRODUCTVERSION NL_VERSION_RC + FILEFLAGSMASK VS_FFI_FILEFLAGSMASK +#ifdef _DEBUG + FILEFLAGS VS_FF_DEBUG +#else + FILEFLAGS 0x0L +#endif + FILEOS VOS_NT_WINDOWS32 + FILETYPE VFT_APP + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "CompanyName", AUTHOR + VALUE "FileDescription", "NeL BNP Make" + VALUE "FileVersion", NL_VERSION + VALUE "LegalCopyright", COPYRIGHT + VALUE "OriginalFilename", "bnp_make" NL_FILEEXT ".exe" + VALUE "ProductName", "NeL Tools" + VALUE "ProductVersion", NL_PRODUCT_VERSION + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x9, 1200 + END +END diff --git a/code/nel/tools/misc/crash_report/crash_report.rc b/code/nel/tools/misc/crash_report/crash_report.rc index 357dc20c7..74f260bc6 100644 --- a/code/nel/tools/misc/crash_report/crash_report.rc +++ b/code/nel/tools/misc/crash_report/crash_report.rc @@ -3,27 +3,34 @@ IDI_MAIN_ICON ICON DISCARDABLE "nevraxpill.ico" -VS_VERSION_INFO VERSIONINFO -FILEVERSION NL_VERSION_RC -PRODUCTVERSION NL_VERSION_RC -FILEFLAGSMASK VS_FFI_FILEFLAGSMASK #ifdef _DEBUG -FILEFLAGS VS_FF_DEBUG +#define NL_FILEEXT "_d" #else -FILEFLAGS 0x0L +#define NL_FILEEXT "" #endif -FILEOS VOS__WINDOWS32 -FILETYPE VFT_APP -FILESUBTYPE 0x0L + +VS_VERSION_INFO VERSIONINFO + FILEVERSION NL_VERSION_RC + PRODUCTVERSION NL_VERSION_RC + FILEFLAGSMASK VS_FFI_FILEFLAGSMASK +#ifdef _DEBUG + FILEFLAGS VS_FF_DEBUG +#else + FILEFLAGS 0x0L +#endif + FILEOS VOS_NT_WINDOWS32 + FILETYPE VFT_APP + FILESUBTYPE 0x0L BEGIN BLOCK "StringFileInfo" BEGIN BLOCK "040904b0" BEGIN + VALUE "CompanyName", AUTHOR VALUE "FileDescription", "NeL Crash Report" VALUE "FileVersion", NL_VERSION VALUE "LegalCopyright", COPYRIGHT - VALUE "OriginalFilename", "crash_report.exe" + VALUE "OriginalFilename", "crash_report" NL_FILEEXT ".exe" VALUE "ProductName", "NeL Tools" VALUE "ProductVersion", NL_PRODUCT_VERSION END diff --git a/code/nel/tools/misc/exec_timeout/main.rc b/code/nel/tools/misc/exec_timeout/main.rc index 608225e47..fffb991c9 100644 --- a/code/nel/tools/misc/exec_timeout/main.rc +++ b/code/nel/tools/misc/exec_timeout/main.rc @@ -1 +1,42 @@ -IDI_MAIN_ICON ICON DISCARDABLE "yellow_pill.ico" +#include +#include "config.h" + +IDI_MAIN_ICON ICON DISCARDABLE "yellow_pill.ico" + +#ifdef _DEBUG +#define NL_FILEEXT "_d" +#else +#define NL_FILEEXT "" +#endif + +VS_VERSION_INFO VERSIONINFO + FILEVERSION NL_VERSION_RC + PRODUCTVERSION NL_VERSION_RC + FILEFLAGSMASK VS_FFI_FILEFLAGSMASK +#ifdef _DEBUG + FILEFLAGS VS_FF_DEBUG +#else + FILEFLAGS 0x0L +#endif + FILEOS VOS_NT_WINDOWS32 + FILETYPE VFT_APP + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "CompanyName", AUTHOR + VALUE "FileDescription", "NeL Exec Timeout" + VALUE "FileVersion", NL_VERSION + VALUE "LegalCopyright", COPYRIGHT + VALUE "OriginalFilename", "exec_timeout" NL_FILEEXT ".exe" + VALUE "ProductName", "NeL Tools" + VALUE "ProductVersion", NL_PRODUCT_VERSION + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x9, 1200 + END +END diff --git a/code/nel/tools/misc/make_sheet_id/main.rc b/code/nel/tools/misc/make_sheet_id/main.rc index 958fa5089..771a866cc 100644 --- a/code/nel/tools/misc/make_sheet_id/main.rc +++ b/code/nel/tools/misc/make_sheet_id/main.rc @@ -1 +1,42 @@ -IDI_MAIN_ICON ICON DISCARDABLE "blue_pill.ico" +#include +#include "config.h" + +IDI_MAIN_ICON ICON DISCARDABLE "blue_pill.ico" + +#ifdef _DEBUG +#define NL_FILEEXT "_d" +#else +#define NL_FILEEXT "" +#endif + +VS_VERSION_INFO VERSIONINFO + FILEVERSION NL_VERSION_RC + PRODUCTVERSION NL_VERSION_RC + FILEFLAGSMASK VS_FFI_FILEFLAGSMASK +#ifdef _DEBUG + FILEFLAGS VS_FF_DEBUG +#else + FILEFLAGS 0x0L +#endif + FILEOS VOS_NT_WINDOWS32 + FILETYPE VFT_APP + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "CompanyName", AUTHOR + VALUE "FileDescription", "NeL Make Sheet ID" + VALUE "FileVersion", NL_VERSION + VALUE "LegalCopyright", COPYRIGHT + VALUE "OriginalFilename", "make_sheet_id" NL_FILEEXT ".exe" + VALUE "ProductName", "NeL Tools" + VALUE "ProductVersion", NL_PRODUCT_VERSION + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x9, 1200 + END +END diff --git a/code/nel/tools/misc/message_box/main.rc b/code/nel/tools/misc/message_box/main.rc index 608225e47..94c0ac4e6 100644 --- a/code/nel/tools/misc/message_box/main.rc +++ b/code/nel/tools/misc/message_box/main.rc @@ -1 +1,42 @@ -IDI_MAIN_ICON ICON DISCARDABLE "yellow_pill.ico" +#include +#include "config.h" + +IDI_MAIN_ICON ICON DISCARDABLE "yellow_pill.ico" + +#ifdef _DEBUG +#define NL_FILEEXT "_d" +#else +#define NL_FILEEXT "" +#endif + +VS_VERSION_INFO VERSIONINFO + FILEVERSION NL_VERSION_RC + PRODUCTVERSION NL_VERSION_RC + FILEFLAGSMASK VS_FFI_FILEFLAGSMASK +#ifdef _DEBUG + FILEFLAGS VS_FF_DEBUG +#else + FILEFLAGS 0x0L +#endif + FILEOS VOS_NT_WINDOWS32 + FILETYPE VFT_APP + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "CompanyName", AUTHOR + VALUE "FileDescription", "NeL Message Box" + VALUE "FileVersion", NL_VERSION + VALUE "LegalCopyright", COPYRIGHT + VALUE "OriginalFilename", "message_box" NL_FILEEXT ".exe" + VALUE "ProductName", "NeL Tools" + VALUE "ProductVersion", NL_PRODUCT_VERSION + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x9, 1200 + END +END diff --git a/code/nel/tools/misc/message_box_qt/main.rc b/code/nel/tools/misc/message_box_qt/main.rc index 608225e47..ed934c572 100644 --- a/code/nel/tools/misc/message_box_qt/main.rc +++ b/code/nel/tools/misc/message_box_qt/main.rc @@ -1 +1,42 @@ -IDI_MAIN_ICON ICON DISCARDABLE "yellow_pill.ico" +#include +#include "config.h" + +IDI_MAIN_ICON ICON DISCARDABLE "yellow_pill.ico" + +#ifdef _DEBUG +#define NL_FILEEXT "_d" +#else +#define NL_FILEEXT "" +#endif + +VS_VERSION_INFO VERSIONINFO + FILEVERSION NL_VERSION_RC + PRODUCTVERSION NL_VERSION_RC + FILEFLAGSMASK VS_FFI_FILEFLAGSMASK +#ifdef _DEBUG + FILEFLAGS VS_FF_DEBUG +#else + FILEFLAGS 0x0L +#endif + FILEOS VOS_NT_WINDOWS32 + FILETYPE VFT_APP + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "CompanyName", AUTHOR + VALUE "FileDescription", "NeL Message Box" + VALUE "FileVersion", NL_VERSION + VALUE "LegalCopyright", COPYRIGHT + VALUE "OriginalFilename", "message_box_qt" NL_FILEEXT ".exe" + VALUE "ProductName", "NeL Tools" + VALUE "ProductVersion", NL_PRODUCT_VERSION + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x9, 1200 + END +END diff --git a/code/ryzom/tools/client/r2_islands_textures/main.rc b/code/ryzom/tools/client/r2_islands_textures/main.rc index 958fa5089..f0e59bdf1 100644 --- a/code/ryzom/tools/client/r2_islands_textures/main.rc +++ b/code/ryzom/tools/client/r2_islands_textures/main.rc @@ -1 +1,42 @@ -IDI_MAIN_ICON ICON DISCARDABLE "blue_pill.ico" +#include +#include "config.h" + +IDI_MAIN_ICON ICON DISCARDABLE "blue_pill.ico" + +#ifdef _DEBUG +#define NL_FILEEXT "_d" +#else +#define NL_FILEEXT "" +#endif + +VS_VERSION_INFO VERSIONINFO + FILEVERSION NL_VERSION_RC + PRODUCTVERSION NL_VERSION_RC + FILEFLAGSMASK VS_FFI_FILEFLAGSMASK +#ifdef _DEBUG + FILEFLAGS VS_FF_DEBUG +#else + FILEFLAGS 0x0L +#endif + FILEOS VOS_NT_WINDOWS32 + FILETYPE VFT_APP + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "CompanyName", AUTHOR + VALUE "FileDescription", "Ryzom Ring Islands Textures" + VALUE "FileVersion", NL_VERSION + VALUE "LegalCopyright", COPYRIGHT + VALUE "OriginalFilename", "r2_islands_textures" NL_FILEEXT ".exe" + VALUE "ProductName", "Ryzom Tools" + VALUE "ProductVersion", NL_PRODUCT_VERSION + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x9, 1200 + END +END diff --git a/code/ryzom/tools/leveldesign/prim_export/main.rc b/code/ryzom/tools/leveldesign/prim_export/main.rc index 958fa5089..a7683d96a 100644 --- a/code/ryzom/tools/leveldesign/prim_export/main.rc +++ b/code/ryzom/tools/leveldesign/prim_export/main.rc @@ -1 +1,42 @@ -IDI_MAIN_ICON ICON DISCARDABLE "blue_pill.ico" +#include +#include "config.h" + +IDI_MAIN_ICON ICON DISCARDABLE "blue_pill.ico" + +#ifdef _DEBUG +#define NL_FILEEXT "_d" +#else +#define NL_FILEEXT "" +#endif + +VS_VERSION_INFO VERSIONINFO + FILEVERSION NL_VERSION_RC + PRODUCTVERSION NL_VERSION_RC + FILEFLAGSMASK VS_FFI_FILEFLAGSMASK +#ifdef _DEBUG + FILEFLAGS VS_FF_DEBUG +#else + FILEFLAGS 0x0L +#endif + FILEOS VOS_NT_WINDOWS32 + FILETYPE VFT_APP + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "CompanyName", AUTHOR + VALUE "FileDescription", "Ryzom Prim Export" + VALUE "FileVersion", NL_VERSION + VALUE "LegalCopyright", COPYRIGHT + VALUE "OriginalFilename", "prim_export" NL_FILEEXT ".exe" + VALUE "ProductName", "Ryzom Tools" + VALUE "ProductVersion", NL_PRODUCT_VERSION + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x9, 1200 + END +END diff --git a/code/ryzom/tools/leveldesign/world_editor/land_export/main.rc b/code/ryzom/tools/leveldesign/world_editor/land_export/main.rc index 958fa5089..879fa8040 100644 --- a/code/ryzom/tools/leveldesign/world_editor/land_export/main.rc +++ b/code/ryzom/tools/leveldesign/world_editor/land_export/main.rc @@ -1 +1,42 @@ -IDI_MAIN_ICON ICON DISCARDABLE "blue_pill.ico" +#include +#include "config.h" + +IDI_MAIN_ICON ICON DISCARDABLE "blue_pill.ico" + +#ifdef _DEBUG +#define NL_FILEEXT "_d" +#else +#define NL_FILEEXT "" +#endif + +VS_VERSION_INFO VERSIONINFO + FILEVERSION NL_VERSION_RC + PRODUCTVERSION NL_VERSION_RC + FILEFLAGSMASK VS_FFI_FILEFLAGSMASK +#ifdef _DEBUG + FILEFLAGS VS_FF_DEBUG +#else + FILEFLAGS 0x0L +#endif + FILEOS VOS_NT_WINDOWS32 + FILETYPE VFT_APP + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "CompanyName", AUTHOR + VALUE "FileDescription", "Ryzom Land Export" + VALUE "FileVersion", NL_VERSION + VALUE "LegalCopyright", COPYRIGHT + VALUE "OriginalFilename", "land_export" NL_FILEEXT ".exe" + VALUE "ProductName", "Ryzom Tools" + VALUE "ProductVersion", NL_PRODUCT_VERSION + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x9, 1200 + END +END diff --git a/code/ryzom/tools/patch_gen/patch_gen.rc b/code/ryzom/tools/patch_gen/patch_gen.rc index 958fa5089..c950b655b 100644 --- a/code/ryzom/tools/patch_gen/patch_gen.rc +++ b/code/ryzom/tools/patch_gen/patch_gen.rc @@ -1 +1,42 @@ -IDI_MAIN_ICON ICON DISCARDABLE "blue_pill.ico" +#include +#include "config.h" + +IDI_MAIN_ICON ICON DISCARDABLE "blue_pill.ico" + +#ifdef _DEBUG +#define NL_FILEEXT "_d" +#else +#define NL_FILEEXT "" +#endif + +VS_VERSION_INFO VERSIONINFO + FILEVERSION NL_VERSION_RC + PRODUCTVERSION NL_VERSION_RC + FILEFLAGSMASK VS_FFI_FILEFLAGSMASK +#ifdef _DEBUG + FILEFLAGS VS_FF_DEBUG +#else + FILEFLAGS 0x0L +#endif + FILEOS VOS_NT_WINDOWS32 + FILETYPE VFT_APP + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "CompanyName", AUTHOR + VALUE "FileDescription", "Ryzom Patch Gen" + VALUE "FileVersion", NL_VERSION + VALUE "LegalCopyright", COPYRIGHT + VALUE "OriginalFilename", "patch_gen" NL_FILEEXT ".exe" + VALUE "ProductName", "Ryzom Tools" + VALUE "ProductVersion", NL_PRODUCT_VERSION + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x9, 1200 + END +END diff --git a/code/ryzom/tools/patch_gen/patch_gen_service.rc b/code/ryzom/tools/patch_gen/patch_gen_service.rc index 60ad969f2..20145f1a6 100644 --- a/code/ryzom/tools/patch_gen/patch_gen_service.rc +++ b/code/ryzom/tools/patch_gen/patch_gen_service.rc @@ -1 +1,42 @@ -IDI_MAIN_ICON ICON DISCARDABLE "red_pill.ico" +#include +#include "config.h" + +IDI_MAIN_ICON ICON DISCARDABLE "red_pill.ico" + +#ifdef _DEBUG +#define NL_FILEEXT "_d" +#else +#define NL_FILEEXT "" +#endif + +VS_VERSION_INFO VERSIONINFO + FILEVERSION NL_VERSION_RC + PRODUCTVERSION NL_VERSION_RC + FILEFLAGSMASK VS_FFI_FILEFLAGSMASK +#ifdef _DEBUG + FILEFLAGS VS_FF_DEBUG +#else + FILEFLAGS 0x0L +#endif + FILEOS VOS_NT_WINDOWS32 + FILETYPE VFT_APP + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "CompanyName", AUTHOR + VALUE "FileDescription", "Ryzom Patch Gen Service" + VALUE "FileVersion", NL_VERSION + VALUE "LegalCopyright", COPYRIGHT + VALUE "OriginalFilename", "patch_gen_service" NL_FILEEXT ".exe" + VALUE "ProductName", "Ryzom Tools" + VALUE "ProductVersion", NL_PRODUCT_VERSION + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x9, 1200 + END +END diff --git a/code/ryzom/tools/server/ai_build_wmap/main.rc b/code/ryzom/tools/server/ai_build_wmap/main.rc index 958fa5089..1ef42e0dc 100644 --- a/code/ryzom/tools/server/ai_build_wmap/main.rc +++ b/code/ryzom/tools/server/ai_build_wmap/main.rc @@ -1 +1,42 @@ -IDI_MAIN_ICON ICON DISCARDABLE "blue_pill.ico" +#include +#include "config.h" + +IDI_MAIN_ICON ICON DISCARDABLE "blue_pill.ico" + +#ifdef _DEBUG +#define NL_FILEEXT "_d" +#else +#define NL_FILEEXT "" +#endif + +VS_VERSION_INFO VERSIONINFO + FILEVERSION NL_VERSION_RC + PRODUCTVERSION NL_VERSION_RC + FILEFLAGSMASK VS_FFI_FILEFLAGSMASK +#ifdef _DEBUG + FILEFLAGS VS_FF_DEBUG +#else + FILEFLAGS 0x0L +#endif + FILEOS VOS_NT_WINDOWS32 + FILETYPE VFT_APP + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "CompanyName", AUTHOR + VALUE "FileDescription", "Ryzom AI Build WMap" + VALUE "FileVersion", NL_VERSION + VALUE "LegalCopyright", COPYRIGHT + VALUE "OriginalFilename", "ai_build_wmap" NL_FILEEXT ".exe" + VALUE "ProductName", "Ryzom Tools" + VALUE "ProductVersion", NL_PRODUCT_VERSION + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x9, 1200 + END +END diff --git a/code/ryzom/tools/sheets_packer/main.rc b/code/ryzom/tools/sheets_packer/main.rc index 958fa5089..0c8a7cf87 100644 --- a/code/ryzom/tools/sheets_packer/main.rc +++ b/code/ryzom/tools/sheets_packer/main.rc @@ -1 +1,42 @@ -IDI_MAIN_ICON ICON DISCARDABLE "blue_pill.ico" +#include +#include "config.h" + +IDI_MAIN_ICON ICON DISCARDABLE "blue_pill.ico" + +#ifdef _DEBUG +#define NL_FILEEXT "_d" +#else +#define NL_FILEEXT "" +#endif + +VS_VERSION_INFO VERSIONINFO + FILEVERSION NL_VERSION_RC + PRODUCTVERSION NL_VERSION_RC + FILEFLAGSMASK VS_FFI_FILEFLAGSMASK +#ifdef _DEBUG + FILEFLAGS VS_FF_DEBUG +#else + FILEFLAGS 0x0L +#endif + FILEOS VOS_NT_WINDOWS32 + FILETYPE VFT_APP + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "CompanyName", AUTHOR + VALUE "FileDescription", "Ryzom Sheets Packer" + VALUE "FileVersion", NL_VERSION + VALUE "LegalCopyright", COPYRIGHT + VALUE "OriginalFilename", "sheets_packer" NL_FILEEXT ".exe" + VALUE "ProductName", "Ryzom Tools" + VALUE "ProductVersion", NL_PRODUCT_VERSION + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x9, 1200 + END +END diff --git a/code/ryzom/tools/sheets_packer_shard/main.rc b/code/ryzom/tools/sheets_packer_shard/main.rc index 958fa5089..9d2f27ba4 100644 --- a/code/ryzom/tools/sheets_packer_shard/main.rc +++ b/code/ryzom/tools/sheets_packer_shard/main.rc @@ -1 +1,42 @@ -IDI_MAIN_ICON ICON DISCARDABLE "blue_pill.ico" +#include +#include "config.h" + +IDI_MAIN_ICON ICON DISCARDABLE "blue_pill.ico" + +#ifdef _DEBUG +#define NL_FILEEXT "_d" +#else +#define NL_FILEEXT "" +#endif + +VS_VERSION_INFO VERSIONINFO + FILEVERSION NL_VERSION_RC + PRODUCTVERSION NL_VERSION_RC + FILEFLAGSMASK VS_FFI_FILEFLAGSMASK +#ifdef _DEBUG + FILEFLAGS VS_FF_DEBUG +#else + FILEFLAGS 0x0L +#endif + FILEOS VOS_NT_WINDOWS32 + FILETYPE VFT_APP + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "CompanyName", AUTHOR + VALUE "FileDescription", "Ryzom Sheets Packer Shard" + VALUE "FileVersion", NL_VERSION + VALUE "LegalCopyright", COPYRIGHT + VALUE "OriginalFilename", "sheets_packer_shard" NL_FILEEXT ".exe" + VALUE "ProductName", "Ryzom Tools" + VALUE "ProductVersion", NL_PRODUCT_VERSION + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x9, 1200 + END +END diff --git a/code/ryzom/tools/translation_tools/main.rc b/code/ryzom/tools/translation_tools/main.rc index 958fa5089..19285e298 100644 --- a/code/ryzom/tools/translation_tools/main.rc +++ b/code/ryzom/tools/translation_tools/main.rc @@ -1 +1,42 @@ -IDI_MAIN_ICON ICON DISCARDABLE "blue_pill.ico" +#include +#include "config.h" + +IDI_MAIN_ICON ICON DISCARDABLE "blue_pill.ico" + +#ifdef _DEBUG +#define NL_FILEEXT "_d" +#else +#define NL_FILEEXT "" +#endif + +VS_VERSION_INFO VERSIONINFO + FILEVERSION NL_VERSION_RC + PRODUCTVERSION NL_VERSION_RC + FILEFLAGSMASK VS_FFI_FILEFLAGSMASK +#ifdef _DEBUG + FILEFLAGS VS_FF_DEBUG +#else + FILEFLAGS 0x0L +#endif + FILEOS VOS_NT_WINDOWS32 + FILETYPE VFT_APP + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "CompanyName", AUTHOR + VALUE "FileDescription", "Ryzom Translation Tools" + VALUE "FileVersion", NL_VERSION + VALUE "LegalCopyright", COPYRIGHT + VALUE "OriginalFilename", "translation_tools" NL_FILEEXT ".exe" + VALUE "ProductName", "Ryzom Tools" + VALUE "ProductVersion", NL_PRODUCT_VERSION + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x9, 1200 + END +END From e09cac7116dbc68ab94706a520d632ce250ec369 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Sat, 11 May 2019 08:03:28 +0800 Subject: [PATCH 30/77] Add missing resource header --- .../3d/plugin_max/nel_3dsmax_shared/resource.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 code/nel/tools/3d/plugin_max/nel_3dsmax_shared/resource.h diff --git a/code/nel/tools/3d/plugin_max/nel_3dsmax_shared/resource.h b/code/nel/tools/3d/plugin_max/nel_3dsmax_shared/resource.h new file mode 100644 index 000000000..e36c8f8f2 --- /dev/null +++ b/code/nel/tools/3d/plugin_max/nel_3dsmax_shared/resource.h @@ -0,0 +1,14 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Visual C++ generated include file. +// Used by nel_3dsmax_shared.rc + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 101 +#define _APS_NEXT_COMMAND_VALUE 40001 +#define _APS_NEXT_CONTROL_VALUE 1001 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif From 84bb09c130d4dc4440fc9d2430d6d97bb5b585b0 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Sat, 11 May 2019 08:33:04 +0800 Subject: [PATCH 31/77] Fix version info in tools --- code/nel/tools/3d/tile_edit/CMakeLists.txt | 4 +- code/nel/tools/3d/tile_edit/tile_edit_exe.rc | 41 +----------- code/nel/tools/3d/tile_edit/version.rc2 | 51 +++++++++++++++ .../tools/misc/branch_patcher/CMakeLists.txt | 6 +- .../misc/branch_patcher/branch_patcher.rc | 50 ++------------- .../nel/tools/misc/branch_patcher/version.rc2 | 51 +++++++++++++++ .../nel/tools/misc/data_mirror/CMakeLists.txt | 6 +- .../nel/tools/misc/data_mirror/data_mirror.rc | 47 ++------------ code/nel/tools/misc/data_mirror/version.rc2 | 51 +++++++++++++++ .../tools/misc/log_analyser/CMakeLists.txt | 6 +- .../tools/misc/log_analyser/log_analyser.rc | 50 ++------------- code/nel/tools/misc/log_analyser/version.rc2 | 51 +++++++++++++++ .../misc/multi_cd_setup_fix/CMakeLists.txt | 6 +- .../multi_cd_setup_fix/multi_cd_setup_fix.rc | 4 +- .../tools/misc/multi_cd_setup_fix/version.rc2 | 51 +++++++++++++++ code/nel/tools/misc/words_dic/CMakeLists.txt | 4 +- code/nel/tools/misc/words_dic/version.rc2 | 51 +++++++++++++++ code/nel/tools/misc/words_dic/words_dic.rc | 50 ++------------- .../tools/misc/words_dic_qt/CMakeLists.txt | 11 ++-- code/nel/tools/misc/words_dic_qt/words_dic.rc | 42 ++++++------ .../leveldesign/georges_dll/CMakeLists.txt | 6 +- .../leveldesign/georges_dll/georges_edit.rc | 62 ++---------------- .../tools/leveldesign/georges_dll/version.rc2 | 62 ++++++++++++++++++ .../leveldesign/georges_exe/CMakeLists.txt | 2 + .../leveldesign/georges_exe/georges_exe.rc | 4 +- .../tools/leveldesign/georges_exe/version.rc2 | 51 +++++++++++++++ .../mission_compiler_fe/Resource.h | 1 - .../mission_compiler_fe/version.rc2 | 7 +- .../world_editor/world_editor/CMakeLists.txt | 8 +-- .../world_editor/world_editor/version.rc2 | 64 +++++++++++++++++++ .../world_editor/world_editor/world_editor.rc | 64 ++----------------- 31 files changed, 573 insertions(+), 391 deletions(-) create mode 100644 code/nel/tools/3d/tile_edit/version.rc2 create mode 100644 code/nel/tools/misc/branch_patcher/version.rc2 create mode 100644 code/nel/tools/misc/data_mirror/version.rc2 create mode 100644 code/nel/tools/misc/log_analyser/version.rc2 create mode 100644 code/nel/tools/misc/multi_cd_setup_fix/version.rc2 create mode 100644 code/nel/tools/misc/words_dic/version.rc2 create mode 100644 code/ryzom/tools/leveldesign/georges_dll/version.rc2 create mode 100644 code/ryzom/tools/leveldesign/georges_exe/version.rc2 create mode 100644 code/ryzom/tools/leveldesign/world_editor/world_editor/version.rc2 diff --git a/code/nel/tools/3d/tile_edit/CMakeLists.txt b/code/nel/tools/3d/tile_edit/CMakeLists.txt index bd29fea37..abbd53b68 100644 --- a/code/nel/tools/3d/tile_edit/CMakeLists.txt +++ b/code/nel/tools/3d/tile_edit/CMakeLists.txt @@ -1,4 +1,6 @@ -FILE(GLOB SRC *.cpp *.h) +FILE(GLOB SRC *.cpp *.h *.rc *.rc2) + +SOURCE_GROUP("" FILES ${SRC}) FILE(GLOB SRC2 cpu.cpp DllEntry.cpp Popup.* thread_win32.* TileCtrl.* TileList.* TileView.*) LIST(REMOVE_ITEM SRC ${SRC2}) diff --git a/code/nel/tools/3d/tile_edit/tile_edit_exe.rc b/code/nel/tools/3d/tile_edit/tile_edit_exe.rc index fc68920d1..e88096ff5 100644 --- a/code/nel/tools/3d/tile_edit/tile_edit_exe.rc +++ b/code/nel/tools/3d/tile_edit/tile_edit_exe.rc @@ -91,50 +91,13 @@ END 3 TEXTINCLUDE BEGIN - "\r\n" + "#include ""version.rc2""\r\n" "\0" END #endif // APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// Version -// - -VS_VERSION_INFO VERSIONINFO - FILEVERSION 0,6,0,0 - PRODUCTVERSION 0,6,0,0 - FILEFLAGSMASK 0x3fL -#ifdef _DEBUG - FILEFLAGS 0x1L -#else - FILEFLAGS 0x0L -#endif - FILEOS 0x40004L - FILETYPE 0x2L - FILESUBTYPE 0x0L -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904b0" - BEGIN - VALUE "FileVersion", "0.6.0.0" - VALUE "InternalName", "tile_edit_exe" - VALUE "OriginalFilename", "tile_edit.exe" - VALUE "ProductName", "NeL Tilebank Editor" - VALUE "ProductVersion", "0.6.0.0" - VALUE "Comments", "http://www.opennel.org/" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x409, 1200 - END -END - - ///////////////////////////////////////////////////////////////////////////// // // Icon @@ -409,7 +372,7 @@ IDB_BITMAP5 BITMAP "rot3.bmp" // // Generated from the TEXTINCLUDE 3 resource. // - +#include "version.rc2" ///////////////////////////////////////////////////////////////////////////// #endif // not APSTUDIO_INVOKED diff --git a/code/nel/tools/3d/tile_edit/version.rc2 b/code/nel/tools/3d/tile_edit/version.rc2 new file mode 100644 index 000000000..07f790b1b --- /dev/null +++ b/code/nel/tools/3d/tile_edit/version.rc2 @@ -0,0 +1,51 @@ + +#ifndef NL_VERSION_RC2 +#define NL_VERSION_RC2 + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +LANGUAGE LANG_ENGLISH, SUBLANG_NEUTRAL +#pragma code_page(65001) + +#include +#include "config.h" + +#ifdef _DEBUG +#define NL_FILEEXT "_d" +#else +#define NL_FILEEXT "" +#endif + +VS_VERSION_INFO VERSIONINFO + FILEVERSION NL_VERSION_RC + PRODUCTVERSION NL_VERSION_RC + FILEFLAGSMASK VS_FFI_FILEFLAGSMASK +#ifdef _DEBUG + FILEFLAGS VS_FF_DEBUG +#else + FILEFLAGS 0x0L +#endif + FILEOS VOS_NT_WINDOWS32 + FILETYPE VFT_APP + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "CompanyName", AUTHOR + VALUE "FileDescription", "NeL Tilebank Editor" + VALUE "FileVersion", NL_VERSION + VALUE "LegalCopyright", COPYRIGHT + VALUE "OriginalFilename", "tile_edit" NL_FILEEXT ".exe" + VALUE "ProductName", "NeL Tools" + VALUE "ProductVersion", NL_PRODUCT_VERSION + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x9, 1200 + END +END + +#endif /* #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) */ +#endif /* #ifndef NL_VERSION_RC2 */ diff --git a/code/nel/tools/misc/branch_patcher/CMakeLists.txt b/code/nel/tools/misc/branch_patcher/CMakeLists.txt index 010e7defd..29b432990 100644 --- a/code/nel/tools/misc/branch_patcher/CMakeLists.txt +++ b/code/nel/tools/misc/branch_patcher/CMakeLists.txt @@ -1,6 +1,8 @@ -FILE(GLOB SRC *.cpp *.h) +FILE(GLOB SRC *.cpp *.h *.rc *.rc2) -ADD_EXECUTABLE(branch_patcher WIN32 ${SRC} branch_patcher.rc) +SOURCE_GROUP("" FILES ${SRC}) + +ADD_EXECUTABLE(branch_patcher WIN32 ${SRC}) #TARGET_LINK_LIBRARIES(branch_patcher ${PLATFORM_LINKFLAGS}) NL_DEFAULT_PROPS(branch_patcher "NeL, Tools, Misc: branch_patcher") diff --git a/code/nel/tools/misc/branch_patcher/branch_patcher.rc b/code/nel/tools/misc/branch_patcher/branch_patcher.rc index 97aad9482..c2d1a1693 100644 --- a/code/nel/tools/misc/branch_patcher/branch_patcher.rc +++ b/code/nel/tools/misc/branch_patcher/branch_patcher.rc @@ -53,52 +53,6 @@ BEGIN END -#ifndef _MAC -///////////////////////////////////////////////////////////////////////////// -// -// Version -// - -VS_VERSION_INFO VERSIONINFO - FILEVERSION 1,0,0,1 - PRODUCTVERSION 1,0,0,1 - FILEFLAGSMASK 0x3fL -#ifdef _DEBUG - FILEFLAGS 0x1L -#else - FILEFLAGS 0x0L -#endif - FILEOS 0x4L - FILETYPE 0x1L - FILESUBTYPE 0x0L -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904b0" - BEGIN - VALUE "Comments", "\0" - VALUE "CompanyName", "Nevrax\0" - VALUE "FileDescription", "branch_patcher MFC Application\0" - VALUE "FileVersion", "1, 0, 0, 1\0" - VALUE "InternalName", "branch_patcher\0" - VALUE "LegalCopyright", "Copyright (C) 2003\0" - VALUE "LegalTrademarks", "\0" - VALUE "OriginalFilename", "branch_patcher.EXE\0" - VALUE "PrivateBuild", "\0" - VALUE "ProductName", "Nevrax Branch Patcher\0" - VALUE "ProductVersion", "1, 0, 0, 1\0" - VALUE "SpecialBuild", "\0" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x409, 1200 - END -END - -#endif // !_MAC - - ///////////////////////////////////////////////////////////////////////////// // // DESIGNINFO @@ -148,6 +102,8 @@ BEGIN "#include ""res\\branch_patcher.rc2"" // non-Microsoft Visual C++ edited resources\r\n" "#include ""afxres.rc"" // Standard components\r\n" "#endif\r\n" + "\r\n" + "#include ""version.rc2""\r\n" "\0" END @@ -186,6 +142,8 @@ LANGUAGE 9, 1 #include "afxres.rc" // Standard components #endif +#include "version.rc2" + ///////////////////////////////////////////////////////////////////////////// #endif // not APSTUDIO_INVOKED diff --git a/code/nel/tools/misc/branch_patcher/version.rc2 b/code/nel/tools/misc/branch_patcher/version.rc2 new file mode 100644 index 000000000..1159ec99c --- /dev/null +++ b/code/nel/tools/misc/branch_patcher/version.rc2 @@ -0,0 +1,51 @@ + +#ifndef NL_VERSION_RC2 +#define NL_VERSION_RC2 + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +LANGUAGE LANG_ENGLISH, SUBLANG_NEUTRAL +#pragma code_page(65001) + +#include +#include "config.h" + +#ifdef _DEBUG +#define NL_FILEEXT "_d" +#else +#define NL_FILEEXT "" +#endif + +VS_VERSION_INFO VERSIONINFO + FILEVERSION NL_VERSION_RC + PRODUCTVERSION NL_VERSION_RC + FILEFLAGSMASK VS_FFI_FILEFLAGSMASK +#ifdef _DEBUG + FILEFLAGS VS_FF_DEBUG +#else + FILEFLAGS 0x0L +#endif + FILEOS VOS_NT_WINDOWS32 + FILETYPE VFT_APP + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "CompanyName", AUTHOR + VALUE "FileDescription", "NeL Branch Patcher" + VALUE "FileVersion", NL_VERSION + VALUE "LegalCopyright", COPYRIGHT + VALUE "OriginalFilename", "branch_patcher" NL_FILEEXT ".exe" + VALUE "ProductName", "NeL Tools" + VALUE "ProductVersion", NL_PRODUCT_VERSION + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x9, 1200 + END +END + +#endif /* #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) */ +#endif /* #ifndef NL_VERSION_RC2 */ diff --git a/code/nel/tools/misc/data_mirror/CMakeLists.txt b/code/nel/tools/misc/data_mirror/CMakeLists.txt index 9727576ba..7d13892a2 100644 --- a/code/nel/tools/misc/data_mirror/CMakeLists.txt +++ b/code/nel/tools/misc/data_mirror/CMakeLists.txt @@ -1,6 +1,8 @@ -FILE(GLOB SRC *.cpp *.h) +FILE(GLOB SRC *.cpp *.h *.rc *.rc2) -ADD_EXECUTABLE(data_mirror WIN32 ${SRC} data_mirror.rc) +SOURCE_GROUP("" FILES ${SRC}) + +ADD_EXECUTABLE(data_mirror WIN32 ${SRC}) TARGET_LINK_LIBRARIES(data_mirror nelmisc) NL_DEFAULT_PROPS(data_mirror "NeL, Tools, Misc: data_mirror") diff --git a/code/nel/tools/misc/data_mirror/data_mirror.rc b/code/nel/tools/misc/data_mirror/data_mirror.rc index ecd226a9f..70ad5a542 100644 --- a/code/nel/tools/misc/data_mirror/data_mirror.rc +++ b/code/nel/tools/misc/data_mirror/data_mirror.rc @@ -71,49 +71,6 @@ BEGIN END -#ifndef _MAC -///////////////////////////////////////////////////////////////////////////// -// -// Version -// - -VS_VERSION_INFO VERSIONINFO - FILEVERSION 1,0,0,1 - PRODUCTVERSION 1,0,0,1 - FILEFLAGSMASK 0x3fL -#ifdef _DEBUG - FILEFLAGS 0x1L -#else - FILEFLAGS 0x0L -#endif - FILEOS 0x4L - FILETYPE 0x1L - FILESUBTYPE 0x0L -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904B0" - BEGIN - VALUE "CompanyName", "\0" - VALUE "FileDescription", "data_mirror MFC Application\0" - VALUE "FileVersion", "1, 0, 0, 1\0" - VALUE "InternalName", "data_mirror\0" - VALUE "LegalCopyright", "Copyright (C) 2003\0" - VALUE "LegalTrademarks", "\0" - VALUE "OriginalFilename", "data_mirror.EXE\0" - VALUE "ProductName", "data_mirror Application\0" - VALUE "ProductVersion", "1, 0, 0, 1\0" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x409, 1200 - END -END - -#endif // !_MAC - - ///////////////////////////////////////////////////////////////////////////// // // DESIGNINFO @@ -207,6 +164,8 @@ BEGIN "#include ""res\\data_mirror.rc2"" // non-Microsoft Visual C++ edited resources\r\n" "#include ""afxres.rc"" // Standard components\r\n" "#endif\r\n" + "\r\n" + "#include ""version.rc2""\r\n" "\0" END @@ -236,6 +195,8 @@ LANGUAGE 9, 1 #include "afxres.rc" // Standard components #endif +#include "version.rc2" + ///////////////////////////////////////////////////////////////////////////// #endif // not APSTUDIO_INVOKED diff --git a/code/nel/tools/misc/data_mirror/version.rc2 b/code/nel/tools/misc/data_mirror/version.rc2 new file mode 100644 index 000000000..801c6c575 --- /dev/null +++ b/code/nel/tools/misc/data_mirror/version.rc2 @@ -0,0 +1,51 @@ + +#ifndef NL_VERSION_RC2 +#define NL_VERSION_RC2 + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +LANGUAGE LANG_ENGLISH, SUBLANG_NEUTRAL +#pragma code_page(65001) + +#include +#include "config.h" + +#ifdef _DEBUG +#define NL_FILEEXT "_d" +#else +#define NL_FILEEXT "" +#endif + +VS_VERSION_INFO VERSIONINFO + FILEVERSION NL_VERSION_RC + PRODUCTVERSION NL_VERSION_RC + FILEFLAGSMASK VS_FFI_FILEFLAGSMASK +#ifdef _DEBUG + FILEFLAGS VS_FF_DEBUG +#else + FILEFLAGS 0x0L +#endif + FILEOS VOS_NT_WINDOWS32 + FILETYPE VFT_APP + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "CompanyName", AUTHOR + VALUE "FileDescription", "NeL Data Mirror" + VALUE "FileVersion", NL_VERSION + VALUE "LegalCopyright", COPYRIGHT + VALUE "OriginalFilename", "data_mirror" NL_FILEEXT ".exe" + VALUE "ProductName", "NeL Tools" + VALUE "ProductVersion", NL_PRODUCT_VERSION + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x9, 1200 + END +END + +#endif /* #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) */ +#endif /* #ifndef NL_VERSION_RC2 */ diff --git a/code/nel/tools/misc/log_analyser/CMakeLists.txt b/code/nel/tools/misc/log_analyser/CMakeLists.txt index e852de2bc..55824bc26 100644 --- a/code/nel/tools/misc/log_analyser/CMakeLists.txt +++ b/code/nel/tools/misc/log_analyser/CMakeLists.txt @@ -1,6 +1,8 @@ -FILE(GLOB SRC *.cpp *.h) +FILE(GLOB SRC *.cpp *.h *.rc *.rc2) -ADD_EXECUTABLE(log_analyser WIN32 ${SRC} log_analyser.rc) +SOURCE_GROUP("" FILES ${SRC}) + +ADD_EXECUTABLE(log_analyser WIN32 ${SRC}) TARGET_LINK_LIBRARIES(log_analyser nelmisc) NL_DEFAULT_PROPS(log_analyser "NeL, Tools, Misc: log_analyser") diff --git a/code/nel/tools/misc/log_analyser/log_analyser.rc b/code/nel/tools/misc/log_analyser/log_analyser.rc index fe39605d0..e05ee685b 100644 --- a/code/nel/tools/misc/log_analyser/log_analyser.rc +++ b/code/nel/tools/misc/log_analyser/log_analyser.rc @@ -109,52 +109,6 @@ BEGIN END -#ifndef _MAC -///////////////////////////////////////////////////////////////////////////// -// -// Version -// - -VS_VERSION_INFO VERSIONINFO - FILEVERSION 1,5,0,1 - PRODUCTVERSION 1,5,0,1 - FILEFLAGSMASK 0x3fL -#ifdef _DEBUG - FILEFLAGS 0x1L -#else - FILEFLAGS 0x0L -#endif - FILEOS 0x4L - FILETYPE 0x1L - FILESUBTYPE 0x0L -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904b0" - BEGIN - VALUE "Comments", "\0" - VALUE "CompanyName", "Nevrax\0" - VALUE "FileDescription", "NeL Log Analyser\0" - VALUE "FileVersion", "1, 5, 0, 1\0" - VALUE "InternalName", "log_analyser\0" - VALUE "LegalCopyright", "Copyright (C) 2002-2003 Nevrax\0" - VALUE "LegalTrademarks", "\0" - VALUE "OriginalFilename", "\0" - VALUE "PrivateBuild", "\0" - VALUE "ProductName", "NeL Log Analyser\0" - VALUE "ProductVersion", "1, 5, 0, 1\0" - VALUE "SpecialBuild", "\0" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x409, 1200 - END -END - -#endif // !_MAC - - ///////////////////////////////////////////////////////////////////////////// // // DESIGNINFO @@ -238,6 +192,8 @@ BEGIN "#include ""res\\log_analyser.rc2"" // non-Microsoft Visual C++ edited resources\r\n" "#include ""afxres.rc"" // Standard components\r\n" "#endif\r\n" + "\r\n" + "#include ""version.rc2""\r\n" "\0" END @@ -276,6 +232,8 @@ LANGUAGE 9, 1 #include "afxres.rc" // Standard components #endif +#include "version.rc2" + ///////////////////////////////////////////////////////////////////////////// #endif // not APSTUDIO_INVOKED diff --git a/code/nel/tools/misc/log_analyser/version.rc2 b/code/nel/tools/misc/log_analyser/version.rc2 new file mode 100644 index 000000000..b7600f5da --- /dev/null +++ b/code/nel/tools/misc/log_analyser/version.rc2 @@ -0,0 +1,51 @@ + +#ifndef NL_VERSION_RC2 +#define NL_VERSION_RC2 + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +LANGUAGE LANG_ENGLISH, SUBLANG_NEUTRAL +#pragma code_page(65001) + +#include +#include "config.h" + +#ifdef _DEBUG +#define NL_FILEEXT "_d" +#else +#define NL_FILEEXT "" +#endif + +VS_VERSION_INFO VERSIONINFO + FILEVERSION NL_VERSION_RC + PRODUCTVERSION NL_VERSION_RC + FILEFLAGSMASK VS_FFI_FILEFLAGSMASK +#ifdef _DEBUG + FILEFLAGS VS_FF_DEBUG +#else + FILEFLAGS 0x0L +#endif + FILEOS VOS_NT_WINDOWS32 + FILETYPE VFT_APP + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "CompanyName", AUTHOR + VALUE "FileDescription", "NeL Log Analyser" + VALUE "FileVersion", NL_VERSION + VALUE "LegalCopyright", COPYRIGHT + VALUE "OriginalFilename", "log_analyser" NL_FILEEXT ".exe" + VALUE "ProductName", "NeL Tools" + VALUE "ProductVersion", NL_PRODUCT_VERSION + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x9, 1200 + END +END + +#endif /* #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) */ +#endif /* #ifndef NL_VERSION_RC2 */ diff --git a/code/nel/tools/misc/multi_cd_setup_fix/CMakeLists.txt b/code/nel/tools/misc/multi_cd_setup_fix/CMakeLists.txt index 3a5f7da4e..3b79aaf4c 100644 --- a/code/nel/tools/misc/multi_cd_setup_fix/CMakeLists.txt +++ b/code/nel/tools/misc/multi_cd_setup_fix/CMakeLists.txt @@ -1,6 +1,8 @@ -FILE(GLOB SRC *.cpp *.h) +FILE(GLOB SRC *.cpp *.h *.rc *.rc2) -ADD_EXECUTABLE(multi_cd_setup_fix WIN32 ${SRC} multi_cd_setup_fix.rc) +SOURCE_GROUP("" FILES ${SRC}) + +ADD_EXECUTABLE(multi_cd_setup_fix WIN32 ${SRC}) #TARGET_LINK_LIBRARIES(multi_cd_setup_fix ${PLATFORM_LINKFLAGS}) NL_DEFAULT_PROPS(multi_cd_setup_fix "NeL, Tools, Misc: multi_cd_setup_fix") diff --git a/code/nel/tools/misc/multi_cd_setup_fix/multi_cd_setup_fix.rc b/code/nel/tools/misc/multi_cd_setup_fix/multi_cd_setup_fix.rc index 384df40cc..9e8475879 100644 --- a/code/nel/tools/misc/multi_cd_setup_fix/multi_cd_setup_fix.rc +++ b/code/nel/tools/misc/multi_cd_setup_fix/multi_cd_setup_fix.rc @@ -49,7 +49,7 @@ END 3 TEXTINCLUDE DISCARDABLE BEGIN - "\r\n" + "#include ""version.rc2""\r\n" "\0" END @@ -99,7 +99,7 @@ END // // Generated from the TEXTINCLUDE 3 resource. // - +#include "version.rc2" ///////////////////////////////////////////////////////////////////////////// #endif // not APSTUDIO_INVOKED diff --git a/code/nel/tools/misc/multi_cd_setup_fix/version.rc2 b/code/nel/tools/misc/multi_cd_setup_fix/version.rc2 new file mode 100644 index 000000000..1983b77ab --- /dev/null +++ b/code/nel/tools/misc/multi_cd_setup_fix/version.rc2 @@ -0,0 +1,51 @@ + +#ifndef NL_VERSION_RC2 +#define NL_VERSION_RC2 + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +LANGUAGE LANG_ENGLISH, SUBLANG_NEUTRAL +#pragma code_page(65001) + +#include +#include "config.h" + +#ifdef _DEBUG +#define NL_FILEEXT "_d" +#else +#define NL_FILEEXT "" +#endif + +VS_VERSION_INFO VERSIONINFO + FILEVERSION NL_VERSION_RC + PRODUCTVERSION NL_VERSION_RC + FILEFLAGSMASK VS_FFI_FILEFLAGSMASK +#ifdef _DEBUG + FILEFLAGS VS_FF_DEBUG +#else + FILEFLAGS 0x0L +#endif + FILEOS VOS_NT_WINDOWS32 + FILETYPE VFT_APP + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "CompanyName", AUTHOR + VALUE "FileDescription", "NeL Multi CD Setup Fix" + VALUE "FileVersion", NL_VERSION + VALUE "LegalCopyright", COPYRIGHT + VALUE "OriginalFilename", "multi_cd_setup_fix" NL_FILEEXT ".exe" + VALUE "ProductName", "NeL Tools" + VALUE "ProductVersion", NL_PRODUCT_VERSION + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x9, 1200 + END +END + +#endif /* #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) */ +#endif /* #ifndef NL_VERSION_RC2 */ diff --git a/code/nel/tools/misc/words_dic/CMakeLists.txt b/code/nel/tools/misc/words_dic/CMakeLists.txt index a2d0293ad..d9acfd66a 100644 --- a/code/nel/tools/misc/words_dic/CMakeLists.txt +++ b/code/nel/tools/misc/words_dic/CMakeLists.txt @@ -1,4 +1,6 @@ -FILE(GLOB SRC *.cpp *.h) +FILE(GLOB SRC *.cpp *.h *.rc *.rc2) + +SOURCE_GROUP("" FILES ${SRC}) ADD_EXECUTABLE(words_dic WIN32 ${SRC} words_dic.rc) diff --git a/code/nel/tools/misc/words_dic/version.rc2 b/code/nel/tools/misc/words_dic/version.rc2 new file mode 100644 index 000000000..d63e8a608 --- /dev/null +++ b/code/nel/tools/misc/words_dic/version.rc2 @@ -0,0 +1,51 @@ + +#ifndef NL_VERSION_RC2 +#define NL_VERSION_RC2 + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +LANGUAGE LANG_ENGLISH, SUBLANG_NEUTRAL +#pragma code_page(65001) + +#include +#include "config.h" + +#ifdef _DEBUG +#define NL_FILEEXT "_d" +#else +#define NL_FILEEXT "" +#endif + +VS_VERSION_INFO VERSIONINFO + FILEVERSION NL_VERSION_RC + PRODUCTVERSION NL_VERSION_RC + FILEFLAGSMASK VS_FFI_FILEFLAGSMASK +#ifdef _DEBUG + FILEFLAGS VS_FF_DEBUG +#else + FILEFLAGS 0x0L +#endif + FILEOS VOS_NT_WINDOWS32 + FILETYPE VFT_APP + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "CompanyName", AUTHOR + VALUE "FileDescription", "NeL Words Dictionary" + VALUE "FileVersion", NL_VERSION + VALUE "LegalCopyright", COPYRIGHT + VALUE "OriginalFilename", "words_dic" NL_FILEEXT ".exe" + VALUE "ProductName", "NeL Tools" + VALUE "ProductVersion", NL_PRODUCT_VERSION + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x9, 1200 + END +END + +#endif /* #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) */ +#endif /* #ifndef NL_VERSION_RC2 */ diff --git a/code/nel/tools/misc/words_dic/words_dic.rc b/code/nel/tools/misc/words_dic/words_dic.rc index 7a067ee50..35813c5a5 100644 --- a/code/nel/tools/misc/words_dic/words_dic.rc +++ b/code/nel/tools/misc/words_dic/words_dic.rc @@ -48,52 +48,6 @@ BEGIN END -#ifndef _MAC -///////////////////////////////////////////////////////////////////////////// -// -// Version -// - -VS_VERSION_INFO VERSIONINFO - FILEVERSION 1,0,0,1 - PRODUCTVERSION 1,0,0,1 - FILEFLAGSMASK 0x3fL -#ifdef _DEBUG - FILEFLAGS 0x1L -#else - FILEFLAGS 0x0L -#endif - FILEOS 0x4L - FILETYPE 0x1L - FILESUBTYPE 0x0L -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904b0" - BEGIN - VALUE "Comments", "\0" - VALUE "CompanyName", "Nevrax\0" - VALUE "FileDescription", "\0" - VALUE "FileVersion", "1, 0, 0, 1\0" - VALUE "InternalName", "words_dic\0" - VALUE "LegalCopyright", "Copyright (C) 2003\0" - VALUE "LegalTrademarks", "\0" - VALUE "OriginalFilename", "\0" - VALUE "PrivateBuild", "\0" - VALUE "ProductName", "Nevrax Words Dictionary\0" - VALUE "ProductVersion", "1, 0, 0, 1\0" - VALUE "SpecialBuild", "\0" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x409, 1200 - END -END - -#endif // !_MAC - - ///////////////////////////////////////////////////////////////////////////// // // DESIGNINFO @@ -142,6 +96,8 @@ BEGIN "#include ""res\\words_dic.rc2"" // non-Microsoft Visual C++ edited resources\r\n" "#include ""afxres.rc"" // Standard components\r\n" "#endif\r\n" + "\r\n" + "#include ""version.rc2""\r\n" "\0" END @@ -212,6 +168,8 @@ LANGUAGE 9, 1 #include "afxres.rc" // Standard components #endif +#include "version.rc2" + ///////////////////////////////////////////////////////////////////////////// #endif // not APSTUDIO_INVOKED diff --git a/code/nel/tools/misc/words_dic_qt/CMakeLists.txt b/code/nel/tools/misc/words_dic_qt/CMakeLists.txt index fc2ced95e..c31de9100 100644 --- a/code/nel/tools/misc/words_dic_qt/CMakeLists.txt +++ b/code/nel/tools/misc/words_dic_qt/CMakeLists.txt @@ -1,14 +1,13 @@ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}) -FILE(GLOB WORDS_DIC_SRC *.cpp *.h) +FILE(GLOB WORDS_DIC_SRC *.cpp *.h *.rc *.rc2) + +SOURCE_GROUP("" FILES ${WORDS_DIC_SRC}) + SET(WORDS_DIC_HDR words_dicDlg.h) SET(WORDS_DIC_UIS words_dic_Qt.ui) SET(WORDS_DIC_RCS words_dic_Qt.qrc) -IF(WIN32) - SET(WORDS_DIC_RC words_dic.rc) -ENDIF() - ADD_DEFINITIONS(-DNL_WORDS_DIC_CFG="\\"${NL_ETC_PREFIX}/\\"") IF(WITH_QT) @@ -29,7 +28,7 @@ ELSE() QT5_WRAP_CPP(WORDS_DIC_MOC_SRCS ${WORDS_DIC_HDR}) ENDIF() -ADD_EXECUTABLE(words_dic_qt WIN32 ${WORDS_DIC_SRC} ${WORDS_DIC_MOC_SRCS} ${WORDS_DIC_RC_SRCS} ${WORDS_DIC_UI_HDRS} ${WORDS_DIC_RC}) +ADD_EXECUTABLE(words_dic_qt WIN32 ${WORDS_DIC_SRC} ${WORDS_DIC_MOC_SRCS} ${WORDS_DIC_RC_SRCS} ${WORDS_DIC_UI_HDRS}) TARGET_LINK_LIBRARIES(words_dic_qt ${QT_LIBRARIES} nelmisc) NL_DEFAULT_PROPS(words_dic_qt "NeL, Tools, Misc: Qt Words Dic") diff --git a/code/nel/tools/misc/words_dic_qt/words_dic.rc b/code/nel/tools/misc/words_dic_qt/words_dic.rc index 0211a6c22..a6fee59c2 100644 --- a/code/nel/tools/misc/words_dic_qt/words_dic.rc +++ b/code/nel/tools/misc/words_dic_qt/words_dic.rc @@ -1,46 +1,48 @@ #include "resource.h" #include +#include "config.h" ///////////////////////////////////////////////////////////////////////////// // // Version // -VS_VERSION_INFO VERSIONINFO - FILEVERSION 1,0,0,1 - PRODUCTVERSION 1,0,0,1 - FILEFLAGSMASK 0x3fL #ifdef _DEBUG - FILEFLAGS 0x1L +#define NL_FILEEXT "_d" +#else +#define NL_FILEEXT "" +#endif + +VS_VERSION_INFO VERSIONINFO + FILEVERSION NL_VERSION_RC + PRODUCTVERSION NL_VERSION_RC + FILEFLAGSMASK VS_FFI_FILEFLAGSMASK +#ifdef _DEBUG + FILEFLAGS VS_FF_DEBUG #else FILEFLAGS 0x0L #endif - FILEOS 0x4L - FILETYPE 0x1L + FILEOS VOS_NT_WINDOWS32 + FILETYPE VFT_APP FILESUBTYPE 0x0L BEGIN BLOCK "StringFileInfo" BEGIN BLOCK "040904b0" BEGIN - VALUE "Comments", "\0" - VALUE "CompanyName", "Nevrax\0" - VALUE "FileDescription", "\0" - VALUE "FileVersion", "1, 0, 0, 1\0" - VALUE "InternalName", "words_dic\0" - VALUE "LegalCopyright", "Copyright (C) 2003\0" - VALUE "LegalTrademarks", "\0" - VALUE "OriginalFilename", "\0" - VALUE "PrivateBuild", "\0" - VALUE "ProductName", "Nevrax Words Dictionary\0" - VALUE "ProductVersion", "1, 0, 0, 1\0" - VALUE "SpecialBuild", "\0" + VALUE "CompanyName", AUTHOR + VALUE "FileDescription", "NeL Words Dictionary" + VALUE "FileVersion", NL_VERSION + VALUE "LegalCopyright", COPYRIGHT + VALUE "OriginalFilename", "words_dic_qt" NL_FILEEXT ".exe" + VALUE "ProductName", "NeL Tools" + VALUE "ProductVersion", NL_PRODUCT_VERSION END END BLOCK "VarFileInfo" BEGIN - VALUE "Translation", 0x409, 1200 + VALUE "Translation", 0x9, 1200 END END diff --git a/code/ryzom/tools/leveldesign/georges_dll/CMakeLists.txt b/code/ryzom/tools/leveldesign/georges_dll/CMakeLists.txt index 731e9e161..4144228d4 100644 --- a/code/ryzom/tools/leveldesign/georges_dll/CMakeLists.txt +++ b/code/ryzom/tools/leveldesign/georges_dll/CMakeLists.txt @@ -1,7 +1,9 @@ -FILE(GLOB SRC *.cpp *.h) +FILE(GLOB SRC *.cpp *.h *.rc *.rc2) -ADD_LIBRARY(georges_dll SHARED ${SRC} georges_edit.rc) +SOURCE_GROUP("" FILES ${SRC}) + +ADD_LIBRARY(georges_dll SHARED ${SRC}) INCLUDE_DIRECTORIES(${NEL_INCLUDE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}) INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR}) diff --git a/code/ryzom/tools/leveldesign/georges_dll/georges_edit.rc b/code/ryzom/tools/leveldesign/georges_dll/georges_edit.rc index e4e40fb73..24a4a259a 100644 --- a/code/ryzom/tools/leveldesign/georges_dll/georges_edit.rc +++ b/code/ryzom/tools/leveldesign/georges_dll/georges_edit.rc @@ -52,6 +52,8 @@ BEGIN "#include ""res\\georges_edit.rc2"" // non-Microsoft Visual C++ edited resources\r\n" "#include ""afxres.rc"" // Standard components\r\n" "#endif\r\n" + "\r\n" + "#include ""version.rc2""\r\n" "\0" END @@ -452,18 +454,6 @@ END // Dialog // -IDD_ABOUTBOX DIALOG DISCARDABLE 0, 0, 235, 55 -STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "About Georges Edit" -FONT 8, "MS Sans Serif" -BEGIN - ICON IDR_MAINFRAME,IDC_STATIC,11,17,20,20 - LTEXT "Georges Edit Version 1.24",IDC_STATIC,40,10,119,8, - SS_NOPREFIX - LTEXT "Nevrax Copyright (C) 2002",IDC_STATIC,40,25,119,8 - DEFPUSHBUTTON "OK",IDOK,178,7,50,14,WS_GROUP -END - IDR_MAINFRAME DIALOG DISCARDABLE 0, 0, 330, 16 STYLE WS_CHILD FONT 8, "MS Sans Serif" @@ -522,52 +512,6 @@ BEGIN END -#ifndef _MAC -///////////////////////////////////////////////////////////////////////////// -// -// Version -// - -VS_VERSION_INFO VERSIONINFO - FILEVERSION 1,0,0,1 - PRODUCTVERSION 1,0,0,1 - FILEFLAGSMASK 0x3fL -#ifdef _DEBUG - FILEFLAGS 0x1L -#else - FILEFLAGS 0x0L -#endif - FILEOS 0x4L - FILETYPE 0x1L - FILESUBTYPE 0x0L -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904b0" - BEGIN - VALUE "Comments", "\0" - VALUE "CompanyName", "\0" - VALUE "FileDescription", "Georges Edit MFC Application\0" - VALUE "FileVersion", "1, 0, 0, 1\0" - VALUE "InternalName", "Georges Edit\0" - VALUE "LegalCopyright", "Copyright (C) 2002\0" - VALUE "LegalTrademarks", "\0" - VALUE "OriginalFilename", "georges_edit.EXE\0" - VALUE "PrivateBuild", "\0" - VALUE "ProductName", "Georges Edit Application\0" - VALUE "ProductVersion", "1, 0, 0, 1\0" - VALUE "SpecialBuild", "\0" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x409, 1200 - END -END - -#endif // !_MAC - - ///////////////////////////////////////////////////////////////////////////// // // DESIGNINFO @@ -844,6 +788,8 @@ LANGUAGE 9, 1 #include "afxres.rc" // Standard components #endif +#include "version.rc2" + ///////////////////////////////////////////////////////////////////////////// #endif // not APSTUDIO_INVOKED diff --git a/code/ryzom/tools/leveldesign/georges_dll/version.rc2 b/code/ryzom/tools/leveldesign/georges_dll/version.rc2 new file mode 100644 index 000000000..450a9414d --- /dev/null +++ b/code/ryzom/tools/leveldesign/georges_dll/version.rc2 @@ -0,0 +1,62 @@ + +#ifndef NL_VERSION_RC2 +#define NL_VERSION_RC2 + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +LANGUAGE LANG_ENGLISH, SUBLANG_NEUTRAL +#pragma code_page(65001) + +#include +#include "config.h" + +#ifdef _DEBUG +#define NL_FILEEXT "_d" +#else +#define NL_FILEEXT "_r" +#endif + +VS_VERSION_INFO VERSIONINFO + FILEVERSION NL_VERSION_RC + PRODUCTVERSION NL_VERSION_RC + FILEFLAGSMASK VS_FFI_FILEFLAGSMASK +#ifdef _DEBUG + FILEFLAGS VS_FF_DEBUG +#else + FILEFLAGS 0x0L +#endif + FILEOS VOS_NT_WINDOWS32 + FILETYPE VFT_DLL + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "CompanyName", AUTHOR + VALUE "FileDescription", "Ryzom Georges Edit dynamic library" + VALUE "FileVersion", NL_VERSION + VALUE "LegalCopyright", COPYRIGHT + VALUE "OriginalFilename", "georges" NL_FILEEXT ".dll" + VALUE "ProductName", "Ryzom Tools" + VALUE "ProductVersion", NL_PRODUCT_VERSION + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x9, 1200 + END +END + +IDD_ABOUTBOX DIALOG DISCARDABLE 0, 0, 235, 55 +STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "About Georges Edit" +FONT 8, "MS Sans Serif" +BEGIN + ICON IDR_MAINFRAME,IDC_STATIC,11,17,20,20 + LTEXT NL_VERSION,IDC_STATIC,40,10,119,8,SS_NOPREFIX + LTEXT COPYRIGHT,IDC_STATIC,40,25,119,8 + DEFPUSHBUTTON "OK",IDOK,178,7,50,14,WS_GROUP +END + +#endif /* #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) */ +#endif /* #ifndef NL_VERSION_RC2 */ diff --git a/code/ryzom/tools/leveldesign/georges_exe/CMakeLists.txt b/code/ryzom/tools/leveldesign/georges_exe/CMakeLists.txt index e0592cb4e..96b0a99f5 100644 --- a/code/ryzom/tools/leveldesign/georges_exe/CMakeLists.txt +++ b/code/ryzom/tools/leveldesign/georges_exe/CMakeLists.txt @@ -1,5 +1,7 @@ FILE(GLOB SRC *.cpp *.h *.rc *.rc2) +SOURCE_GROUP("" FILES ${SRC}) + ADD_DEFINITIONS(${MFC_DEFINITIONS}) SET(CMAKE_MFC_FLAG 2) ADD_EXECUTABLE(georges WIN32 ${SRC}) diff --git a/code/ryzom/tools/leveldesign/georges_exe/georges_exe.rc b/code/ryzom/tools/leveldesign/georges_exe/georges_exe.rc index b6f15fe15..17323ea94 100644 --- a/code/ryzom/tools/leveldesign/georges_exe/georges_exe.rc +++ b/code/ryzom/tools/leveldesign/georges_exe/georges_exe.rc @@ -52,7 +52,7 @@ END 3 TEXTINCLUDE DISCARDABLE BEGIN - "\r\n" + "#include ""version.rc2""\r\n" "\0" END @@ -68,7 +68,7 @@ END // // Generated from the TEXTINCLUDE 3 resource. // - +#include "version.rc2" ///////////////////////////////////////////////////////////////////////////// #endif // not APSTUDIO_INVOKED diff --git a/code/ryzom/tools/leveldesign/georges_exe/version.rc2 b/code/ryzom/tools/leveldesign/georges_exe/version.rc2 new file mode 100644 index 000000000..2fd036bc9 --- /dev/null +++ b/code/ryzom/tools/leveldesign/georges_exe/version.rc2 @@ -0,0 +1,51 @@ + +#ifndef NL_VERSION_RC2 +#define NL_VERSION_RC2 + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +LANGUAGE LANG_ENGLISH, SUBLANG_NEUTRAL +#pragma code_page(65001) + +#include +#include "config.h" + +#ifdef _DEBUG +#define NL_FILEEXT "_d" +#else +#define NL_FILEEXT "" +#endif + +VS_VERSION_INFO VERSIONINFO + FILEVERSION NL_VERSION_RC + PRODUCTVERSION NL_VERSION_RC + FILEFLAGSMASK VS_FFI_FILEFLAGSMASK +#ifdef _DEBUG + FILEFLAGS VS_FF_DEBUG +#else + FILEFLAGS 0x0L +#endif + FILEOS VOS_NT_WINDOWS32 + FILETYPE VFT_APP + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "CompanyName", AUTHOR + VALUE "FileDescription", "Ryzom Georges Edit" + VALUE "FileVersion", NL_VERSION + VALUE "LegalCopyright", COPYRIGHT + VALUE "OriginalFilename", "georges" NL_FILEEXT ".exe" + VALUE "ProductName", "Ryzom Tools" + VALUE "ProductVersion", NL_PRODUCT_VERSION + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x9, 1200 + END +END + +#endif /* #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) */ +#endif /* #ifndef NL_VERSION_RC2 */ diff --git a/code/ryzom/tools/leveldesign/mission_compiler_fe/Resource.h b/code/ryzom/tools/leveldesign/mission_compiler_fe/Resource.h index aace22fe7..9f7b75159 100644 --- a/code/ryzom/tools/leveldesign/mission_compiler_fe/Resource.h +++ b/code/ryzom/tools/leveldesign/mission_compiler_fe/Resource.h @@ -12,7 +12,6 @@ #define IDR_MENU1 131 #define IDD_DIALOG_ADD_PATH 132 #define IDD_DIALOG_MODE 133 -#define IDS_VERSIONTEXT 140 #define IDC_LIST_SRC 1000 #define IDC_LIST_DST 1001 #define IDC_ADD 1002 diff --git a/code/ryzom/tools/leveldesign/mission_compiler_fe/version.rc2 b/code/ryzom/tools/leveldesign/mission_compiler_fe/version.rc2 index 5b79bd52a..46d1c9fae 100644 --- a/code/ryzom/tools/leveldesign/mission_compiler_fe/version.rc2 +++ b/code/ryzom/tools/leveldesign/mission_compiler_fe/version.rc2 @@ -47,18 +47,13 @@ BEGIN END END -STRINGTABLE -BEGIN - IDS_VERSIONTEXT "Ryzom Mission Compiler Frontend " NL_VERSION -END - IDD_ABOUTBOX DIALOG DISCARDABLE 0, 0, 235, 55 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "About Ryzom Mission Compiler Frontend" FONT 8, "MS Sans Serif" BEGIN ICON IDR_MAINFRAME,IDC_STATIC,11,17,20,20 - LTEXT IDS_VERSIONTEXT,IDC_STATIC,40,10,119,8,SS_NOPREFIX + LTEXT NL_VERSION,IDC_STATIC,40,10,119,8,SS_NOPREFIX LTEXT COPYRIGHT,IDC_STATIC,40,25,119,8 DEFPUSHBUTTON "OK",IDOK,178,7,50,14,WS_GROUP END diff --git a/code/ryzom/tools/leveldesign/world_editor/world_editor/CMakeLists.txt b/code/ryzom/tools/leveldesign/world_editor/world_editor/CMakeLists.txt index c7258d869..d6eb6c304 100644 --- a/code/ryzom/tools/leveldesign/world_editor/world_editor/CMakeLists.txt +++ b/code/ryzom/tools/leveldesign/world_editor/world_editor/CMakeLists.txt @@ -1,4 +1,6 @@ -FILE(GLOB SRC *.cpp *.h) +FILE(GLOB SRC *.cpp *.h *.rc *.rc2) + +SOURCE_GROUP("" FILES ${SRC}) LIST(REMOVE_ITEM SRC ${CMAKE_CURRENT_SOURCE_DIR}/export_cb_dlg.cpp ${CMAKE_CURRENT_SOURCE_DIR}/builder_logic.cpp) @@ -6,12 +8,10 @@ ENABLE_LANGUAGE(RC) ADD_DEFINITIONS(${MFC_DEFINITIONS}) SET(CMAKE_MFC_FLAG 2) -ADD_EXECUTABLE(world_editor WIN32 ${SRC} world_editor.rc) +ADD_EXECUTABLE(world_editor WIN32 ${SRC}) INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR}) -SOURCE_GROUP(Resources FILES world_editor.rc) - TARGET_LINK_LIBRARIES(world_editor nelmisc nelligo diff --git a/code/ryzom/tools/leveldesign/world_editor/world_editor/version.rc2 b/code/ryzom/tools/leveldesign/world_editor/world_editor/version.rc2 new file mode 100644 index 000000000..a11050b22 --- /dev/null +++ b/code/ryzom/tools/leveldesign/world_editor/world_editor/version.rc2 @@ -0,0 +1,64 @@ + +#ifndef NL_VERSION_RC2 +#define NL_VERSION_RC2 + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +LANGUAGE LANG_ENGLISH, SUBLANG_NEUTRAL +#pragma code_page(65001) + +#include +#include "config.h" + +#ifdef _DEBUG +#define NL_FILEEXT "_d" +#else +#define NL_FILEEXT "" +#endif + +VS_VERSION_INFO VERSIONINFO + FILEVERSION NL_VERSION_RC + PRODUCTVERSION NL_VERSION_RC + FILEFLAGSMASK VS_FFI_FILEFLAGSMASK +#ifdef _DEBUG + FILEFLAGS VS_FF_DEBUG +#else + FILEFLAGS 0x0L +#endif + FILEOS VOS_NT_WINDOWS32 + FILETYPE VFT_APP + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "CompanyName", AUTHOR + VALUE "FileDescription", "Ryzom World Editor" + VALUE "FileVersion", NL_VERSION + VALUE "LegalCopyright", COPYRIGHT + VALUE "OriginalFilename", "world_editor" NL_FILEEXT ".exe" + VALUE "ProductName", "Ryzom Tools" + VALUE "ProductVersion", NL_PRODUCT_VERSION + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x9, 1200 + END +END + +IDD_ABOUTBOX DIALOG DISCARDABLE 0, 0, 235, 73 +STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "About World Editor" +FONT 8, "MS Sans Serif" +BEGIN + ICON IDR_MAINFRAME,IDC_STATIC,11,17,20,20 + LTEXT NL_VERSION,IDC_TITLE_VERSION,40,10,96,8,SS_NOPREFIX + LTEXT COPYRIGHT,IDC_STATIC,40,25,119,8 + DEFPUSHBUTTON "OK",IDOK,178,8,50,14,WS_GROUP + LTEXT "Allocated Video Mem :",IDC_STATIC,15,43,73,16 + LTEXT "Static",IDC_STATIC_VIDEO_MEM,97,43,87,16 +END + +#endif /* #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) */ +#endif /* #ifndef NL_VERSION_RC2 */ diff --git a/code/ryzom/tools/leveldesign/world_editor/world_editor/world_editor.rc b/code/ryzom/tools/leveldesign/world_editor/world_editor/world_editor.rc index b02de44e0..4a790bf23 100644 --- a/code/ryzom/tools/leveldesign/world_editor/world_editor/world_editor.rc +++ b/code/ryzom/tools/leveldesign/world_editor/world_editor/world_editor.rc @@ -54,6 +54,8 @@ BEGIN "#include ""afxprint.rc"" // printing/print preview resources\r\n" "#include ""afxdb.rc"" // Database resources\r\n" "#endif\r\n" + "\r\n" + "#include ""version.rc2""\r\n" "\0" END @@ -367,20 +369,6 @@ END // Dialog // -IDD_ABOUTBOX DIALOG DISCARDABLE 0, 0, 235, 73 -STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "About NeL World Editor" -FONT 8, "MS Sans Serif" -BEGIN - ICON IDR_MAINFRAME,IDC_STATIC,11,17,20,20 - LTEXT "NeL World Editor Version 0.47",IDC_TITLE_VERSION,40,10, - 96,8,SS_NOPREFIX - LTEXT "Copyright Nevrax (C) 2005",IDC_STATIC,40,25,119,8 - DEFPUSHBUTTON "OK",IDOK,178,8,50,14,WS_GROUP - LTEXT "Allocated Video Mem :",IDC_STATIC,15,43,73,16 - LTEXT "Static",IDC_STATIC_VIDEO_MEM,97,43,87,16 -END - IDD_CREATE_ELEMENT DIALOG DISCARDABLE 0, 0, 247, 47 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Create Element" @@ -801,52 +789,6 @@ BEGIN END -#ifndef _MAC -///////////////////////////////////////////////////////////////////////////// -// -// Version -// - -VS_VERSION_INFO VERSIONINFO - FILEVERSION 1,0,0,1 - PRODUCTVERSION 1,0,0,1 - FILEFLAGSMASK 0x3fL -#ifdef _DEBUG - FILEFLAGS 0x1L -#else - FILEFLAGS 0x0L -#endif - FILEOS 0x4L - FILETYPE 0x1L - FILESUBTYPE 0x0L -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904b0" - BEGIN - VALUE "Comments", "\0" - VALUE "CompanyName", "Nevrax\0" - VALUE "FileDescription", "NeL World Editor\0" - VALUE "FileVersion", "0, 0, 0, 1\0" - VALUE "InternalName", "world_editor\0" - VALUE "LegalCopyright", "Nevrax Copyright (C) 2002\0" - VALUE "LegalTrademarks", "\0" - VALUE "OriginalFilename", "world_editor.exe\0" - VALUE "PrivateBuild", "\0" - VALUE "ProductName", "NeL World Editor\0" - VALUE "ProductVersion", "0, 0, 0, 1\0" - VALUE "SpecialBuild", "\0" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x409, 1200 - END -END - -#endif // !_MAC - - ///////////////////////////////////////////////////////////////////////////// // // DESIGNINFO @@ -1251,6 +1193,8 @@ LANGUAGE 9, 1 #include "afxdb.rc" // Database resources #endif +#include "version.rc2" + ///////////////////////////////////////////////////////////////////////////// #endif // not APSTUDIO_INVOKED From 7657d3e17753ab38adba5e37209122f10029205f Mon Sep 17 00:00:00 2001 From: kaetemi Date: Sat, 11 May 2019 08:39:12 +0800 Subject: [PATCH 32/77] Fixed: Strip version strings only when successful --- code/CMakeModules/GetRevision.cmake | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/code/CMakeModules/GetRevision.cmake b/code/CMakeModules/GetRevision.cmake index 469f7375a..f18b662e1 100644 --- a/code/CMakeModules/GetRevision.cmake +++ b/code/CMakeModules/GetRevision.cmake @@ -82,6 +82,8 @@ IF(EXISTS "${ROOT_DIR}/.git/") OUTPUT_VARIABLE REVISION) IF(NOT ${git_exit_code} EQUAL 0) MESSAGE(WARNING "git rev-list failed, unable to include version.") + ELSE() + STRING(STRIP ${REVISION} REVISION) ENDIF() EXECUTE_PROCESS(COMMAND ${GIT_EXECUTABLE} rev-parse --short=8 HEAD WORKING_DIRECTORY ${ROOT_DIR} @@ -89,6 +91,8 @@ IF(EXISTS "${ROOT_DIR}/.git/") OUTPUT_VARIABLE CHANGESET) IF(NOT ${git_exit_code} EQUAL 0) MESSAGE(WARNING "git rev-parse failed, unable to include version.") + ELSE() + STRING(STRIP ${CHANGESET} CHANGESET) ENDIF() EXECUTE_PROCESS(COMMAND ${GIT_EXECUTABLE} rev-parse --abbrev-ref HEAD WORKING_DIRECTORY ${ROOT_DIR} @@ -96,6 +100,8 @@ IF(EXISTS "${ROOT_DIR}/.git/") OUTPUT_VARIABLE BRANCH) IF(NOT ${git_exit_code} EQUAL 0) MESSAGE(WARNING "git rev-parse failed, unable to include git branch.") + ELSE() + STRING(STRIP ${BRANCH} BRANCH) ENDIF() EXECUTE_PROCESS(COMMAND ${GIT_EXECUTABLE} describe WORKING_DIRECTORY ${ROOT_DIR} @@ -103,11 +109,9 @@ IF(EXISTS "${ROOT_DIR}/.git/") OUTPUT_VARIABLE DESCRIBE) IF(NOT ${git_exit_code} EQUAL 0) MESSAGE(WARNING "git rev-parse failed, unable to include git branch.") + ELSE() + STRING(STRIP ${DESCRIBE} DESCRIBE) ENDIF() - STRING(STRIP ${REVISION} REVISION) - STRING(STRIP ${CHANGESET} CHANGESET) - STRING(STRIP ${BRANCH} BRANCH) - STRING(STRIP ${DESCRIBE} DESCRIBE) ENDIF() ENDIF() From 4b9ad0f11482ee61c032178c62c1e50afbc56371 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Sat, 11 May 2019 09:21:34 +0800 Subject: [PATCH 33/77] Added: More version info on tools --- .../3d/animation_set_builder/CMakeLists.txt | 6 ++- .../3d/animation_set_builder/gold_pill.ico | Bin 0 -> 3638 bytes .../tools/3d/animation_set_builder/main.rc | 42 ++++++++++++++++++ .../tools/3d/build_clod_bank/CMakeLists.txt | 2 +- .../tools/3d/cluster_viewer/CMakeLists.txt | 4 +- code/nel/tools/3d/cluster_viewer/main.rc | 42 ++++++++++++++++++ code/nel/tools/3d/cluster_viewer/red_pill.ico | Bin 0 -> 3638 bytes .../logic/logic_editor_exe/CMakeLists.txt | 4 +- code/nel/tools/logic/logic_editor_exe/main.rc | 42 ++++++++++++++++++ .../tools/logic/logic_editor_exe/red_pill.ico | Bin 0 -> 3638 bytes .../tools/misc/probe_timers/CMakeLists.txt | 4 +- .../nel/tools/misc/probe_timers/gold_pill.ico | Bin 0 -> 3638 bytes code/nel/tools/misc/probe_timers/main.rc | 42 ++++++++++++++++++ .../sound/build_samplebank/CMakeLists.txt | 4 +- .../tools/sound/build_sound/CMakeLists.txt | 4 +- .../sound/build_soundbank/CMakeLists.txt | 4 +- 16 files changed, 191 insertions(+), 9 deletions(-) create mode 100644 code/nel/tools/3d/animation_set_builder/gold_pill.ico create mode 100644 code/nel/tools/3d/animation_set_builder/main.rc create mode 100644 code/nel/tools/3d/cluster_viewer/main.rc create mode 100644 code/nel/tools/3d/cluster_viewer/red_pill.ico create mode 100644 code/nel/tools/logic/logic_editor_exe/main.rc create mode 100644 code/nel/tools/logic/logic_editor_exe/red_pill.ico create mode 100644 code/nel/tools/misc/probe_timers/gold_pill.ico create mode 100644 code/nel/tools/misc/probe_timers/main.rc diff --git a/code/nel/tools/3d/animation_set_builder/CMakeLists.txt b/code/nel/tools/3d/animation_set_builder/CMakeLists.txt index da81b1de3..014b36294 100644 --- a/code/nel/tools/3d/animation_set_builder/CMakeLists.txt +++ b/code/nel/tools/3d/animation_set_builder/CMakeLists.txt @@ -1,9 +1,11 @@ -FILE(GLOB SRC *.cpp *.h) +FILE(GLOB SRC *.cpp *.h *.rc *.rc2) + +SOURCE_GROUP("" FILES ${SRC}) ADD_EXECUTABLE(animation_set_builder ${SRC}) TARGET_LINK_LIBRARIES(animation_set_builder nel3d nelmisc) -NL_DEFAULT_PROPS(animation_set_builder "NeL, Tools, 3D: anim_set_builder") +NL_DEFAULT_PROPS(animation_set_builder "NeL, Tools, 3D: Animation Set Builder") NL_ADD_RUNTIME_FLAGS(animation_set_builder) INSTALL(TARGETS animation_set_builder RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT tools3d) diff --git a/code/nel/tools/3d/animation_set_builder/gold_pill.ico b/code/nel/tools/3d/animation_set_builder/gold_pill.ico new file mode 100644 index 0000000000000000000000000000000000000000..618b67a5d196bdbdc4d497a3b7ca998b79039677 GIT binary patch literal 3638 zcmeH|zityj5XQf`vv2R8lRF0=!64zvLOcRZ@(47%1EO$G7suZ;o}Ow9KWIF7uW|24qu=jCYmGObHC}wun9t{!&1Sg$ zP6MyLV>})M&yFz~jWC%^fQS2+=cprf1?md?hZP`8`Oj#}K*|8hER?sITv4;NA<$;R zq>3WH(P#z%rJ$%(X!S5zlUP+N zzr|;JJa&1AAFqXdR(y5mKwA%eZ9P`}w)9@{Sn*u(Tk&M^-mm(n@m=v)}3W?H=*(Tyb(EO1J?UWK}aqZWd!Zofe&kK&zR)e`x(xG +#include "config.h" + +IDI_MAIN_ICON ICON DISCARDABLE "gold_pill.ico" + +#ifdef _DEBUG +#define NL_FILEEXT "_d" +#else +#define NL_FILEEXT "" +#endif + +VS_VERSION_INFO VERSIONINFO + FILEVERSION NL_VERSION_RC + PRODUCTVERSION NL_VERSION_RC + FILEFLAGSMASK VS_FFI_FILEFLAGSMASK +#ifdef _DEBUG + FILEFLAGS VS_FF_DEBUG +#else + FILEFLAGS 0x0L +#endif + FILEOS VOS_NT_WINDOWS32 + FILETYPE VFT_APP + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "CompanyName", AUTHOR + VALUE "FileDescription", "NeL Animation Set Builder" + VALUE "FileVersion", NL_VERSION + VALUE "LegalCopyright", COPYRIGHT + VALUE "OriginalFilename", "animation_set_builder" NL_FILEEXT ".exe" + VALUE "ProductName", "NeL Tools" + VALUE "ProductVersion", NL_PRODUCT_VERSION + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x9, 1200 + END +END diff --git a/code/nel/tools/3d/build_clod_bank/CMakeLists.txt b/code/nel/tools/3d/build_clod_bank/CMakeLists.txt index 52fd0df79..05c730922 100644 --- a/code/nel/tools/3d/build_clod_bank/CMakeLists.txt +++ b/code/nel/tools/3d/build_clod_bank/CMakeLists.txt @@ -1,4 +1,4 @@ -FILE(GLOB SRC *.cpp *.h *.rc) +FILE(GLOB SRC *.cpp *.h *.rc *.rc2) SOURCE_GROUP("" FILES ${SRC}) diff --git a/code/nel/tools/3d/cluster_viewer/CMakeLists.txt b/code/nel/tools/3d/cluster_viewer/CMakeLists.txt index a0db8cd68..a1da2d39b 100644 --- a/code/nel/tools/3d/cluster_viewer/CMakeLists.txt +++ b/code/nel/tools/3d/cluster_viewer/CMakeLists.txt @@ -1,4 +1,6 @@ -FILE(GLOB SRC *.cpp *.h) +FILE(GLOB SRC *.cpp *.h *.rc *.rc2) + +SOURCE_GROUP("" FILES ${SRC}) ADD_EXECUTABLE(cluster_viewer WIN32 ${SRC}) diff --git a/code/nel/tools/3d/cluster_viewer/main.rc b/code/nel/tools/3d/cluster_viewer/main.rc new file mode 100644 index 000000000..df6b903d0 --- /dev/null +++ b/code/nel/tools/3d/cluster_viewer/main.rc @@ -0,0 +1,42 @@ +#include +#include "config.h" + +IDI_MAIN_ICON ICON DISCARDABLE "red_pill.ico" + +#ifdef _DEBUG +#define NL_FILEEXT "_d" +#else +#define NL_FILEEXT "" +#endif + +VS_VERSION_INFO VERSIONINFO + FILEVERSION NL_VERSION_RC + PRODUCTVERSION NL_VERSION_RC + FILEFLAGSMASK VS_FFI_FILEFLAGSMASK +#ifdef _DEBUG + FILEFLAGS VS_FF_DEBUG +#else + FILEFLAGS 0x0L +#endif + FILEOS VOS_NT_WINDOWS32 + FILETYPE VFT_APP + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "CompanyName", AUTHOR + VALUE "FileDescription", "NeL Cluster Viewer" + VALUE "FileVersion", NL_VERSION + VALUE "LegalCopyright", COPYRIGHT + VALUE "OriginalFilename", "cluster_viewer" NL_FILEEXT ".exe" + VALUE "ProductName", "NeL Tools" + VALUE "ProductVersion", NL_PRODUCT_VERSION + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x9, 1200 + END +END diff --git a/code/nel/tools/3d/cluster_viewer/red_pill.ico b/code/nel/tools/3d/cluster_viewer/red_pill.ico new file mode 100644 index 0000000000000000000000000000000000000000..c5f25058384f0aba7d5193400e74efdc8a65ccc1 GIT binary patch literal 3638 zcmeH}y>1gh5Xb-b{cRiAJMh>Nt}K+7NFISE?|@SH73|6-RchB!9>8rZS|nF4DbnB) z(Sby<%H4cK7u6-OK?FTnq*W-}h&Vmg&O5@DCM`cfa~;R86ywdTvmqp;Chyl|)QZ zs;uYi?C7Qbc_y*fanJ8UMsY(vA;G8~O0gX#uiuN9@SB}s>pK(=w&_C=|0iQ|;x z^rFu^YfzN97T=cy>i3Gg==E*88&Lhp&Cj6g#|g)Kc@{-k#;q +#include "config.h" + +IDI_MAIN_ICON ICON DISCARDABLE "red_pill.ico" + +#ifdef _DEBUG +#define NL_FILEEXT "_d" +#else +#define NL_FILEEXT "" +#endif + +VS_VERSION_INFO VERSIONINFO + FILEVERSION NL_VERSION_RC + PRODUCTVERSION NL_VERSION_RC + FILEFLAGSMASK VS_FFI_FILEFLAGSMASK +#ifdef _DEBUG + FILEFLAGS VS_FF_DEBUG +#else + FILEFLAGS 0x0L +#endif + FILEOS VOS_NT_WINDOWS32 + FILETYPE VFT_APP + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "CompanyName", AUTHOR + VALUE "FileDescription", "NeL Logic Editor" + VALUE "FileVersion", NL_VERSION + VALUE "LegalCopyright", COPYRIGHT + VALUE "OriginalFilename", "logic_editor" NL_FILEEXT ".exe" + VALUE "ProductName", "NeL Tools" + VALUE "ProductVersion", NL_PRODUCT_VERSION + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x9, 1200 + END +END diff --git a/code/nel/tools/logic/logic_editor_exe/red_pill.ico b/code/nel/tools/logic/logic_editor_exe/red_pill.ico new file mode 100644 index 0000000000000000000000000000000000000000..c5f25058384f0aba7d5193400e74efdc8a65ccc1 GIT binary patch literal 3638 zcmeH}y>1gh5Xb-b{cRiAJMh>Nt}K+7NFISE?|@SH73|6-RchB!9>8rZS|nF4DbnB) z(Sby<%H4cK7u6-OK?FTnq*W-}h&Vmg&O5@DCM`cfa~;R86ywdTvmqp;Chyl|)QZ zs;uYi?C7Qbc_y*fanJ8UMsY(vA;G8~O0gX#uiuN9@SB}s>pK(=w&_C=|0iQ|;x z^rFu^YfzN97T=cy>i3Gg==E*88&Lhp&Cj6g#|g)Kc@{-k#;q7suZ;o}Ow9KWIF7uW|24qu=jCYmGObHC}wun9t{!&1Sg$ zP6MyLV>})M&yFz~jWC%^fQS2+=cprf1?md?hZP`8`Oj#}K*|8hER?sITv4;NA<$;R zq>3WH(P#z%rJ$%(X!S5zlUP+N zzr|;JJa&1AAFqXdR(y5mKwA%eZ9P`}w)9@{Sn*u(Tk&M^-mm(n@m=v)}3W?H=*(Tyb(EO1J?UWK}aqZWd!Zofe&kK&zR)e`x(xG +#include "config.h" + +IDI_MAIN_ICON ICON DISCARDABLE "gold_pill.ico" + +#ifdef _DEBUG +#define NL_FILEEXT "_d" +#else +#define NL_FILEEXT "" +#endif + +VS_VERSION_INFO VERSIONINFO + FILEVERSION NL_VERSION_RC + PRODUCTVERSION NL_VERSION_RC + FILEFLAGSMASK VS_FFI_FILEFLAGSMASK +#ifdef _DEBUG + FILEFLAGS VS_FF_DEBUG +#else + FILEFLAGS 0x0L +#endif + FILEOS VOS_NT_WINDOWS32 + FILETYPE VFT_APP + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "CompanyName", AUTHOR + VALUE "FileDescription", "NeL Probe Timers" + VALUE "FileVersion", NL_VERSION + VALUE "LegalCopyright", COPYRIGHT + VALUE "OriginalFilename", "nl_probe_timers" NL_FILEEXT ".exe" + VALUE "ProductName", "NeL Tools" + VALUE "ProductVersion", NL_PRODUCT_VERSION + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x9, 1200 + END +END diff --git a/code/nel/tools/sound/build_samplebank/CMakeLists.txt b/code/nel/tools/sound/build_samplebank/CMakeLists.txt index b86e1e3e7..dfe20b9d6 100644 --- a/code/nel/tools/sound/build_samplebank/CMakeLists.txt +++ b/code/nel/tools/sound/build_samplebank/CMakeLists.txt @@ -1,4 +1,6 @@ -FILE(GLOB SRC *.cpp *.h) +FILE(GLOB SRC *.cpp *.h *.rc *.rc2) + +SOURCE_GROUP("" FILES ${SRC}) ADD_EXECUTABLE(build_samplebank ${SRC}) diff --git a/code/nel/tools/sound/build_sound/CMakeLists.txt b/code/nel/tools/sound/build_sound/CMakeLists.txt index 5a5d81e81..15b6d76bd 100644 --- a/code/nel/tools/sound/build_sound/CMakeLists.txt +++ b/code/nel/tools/sound/build_sound/CMakeLists.txt @@ -1,4 +1,6 @@ -FILE(GLOB SRC *.cpp *.h) +FILE(GLOB SRC *.cpp *.h *.rc *.rc2) + +SOURCE_GROUP("" FILES ${SRC}) ADD_EXECUTABLE(build_sound ${SRC}) diff --git a/code/nel/tools/sound/build_soundbank/CMakeLists.txt b/code/nel/tools/sound/build_soundbank/CMakeLists.txt index 310e6a2c5..c1988aa81 100644 --- a/code/nel/tools/sound/build_soundbank/CMakeLists.txt +++ b/code/nel/tools/sound/build_soundbank/CMakeLists.txt @@ -1,4 +1,6 @@ -FILE(GLOB SRC *.cpp *.h) +FILE(GLOB SRC *.cpp *.h *.rc *.rc2) + +SOURCE_GROUP("" FILES ${SRC}) ADD_EXECUTABLE(build_soundbank ${SRC}) From 2b73ed7def0262ce26b403ad0a01c01baea06925 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Sat, 11 May 2019 14:55:23 +0800 Subject: [PATCH 34/77] Use proper utf8mb4 for new installations --- code/web/private_php/setup/sql/nel_00001.sql | 10 ++--- code/web/private_php/setup/sql/nel_00002.sql | 2 +- .../private_php/setup/sql/nel_ams_00001.sql | 4 +- .../setup/sql/nel_ams_lib_00001.sql | 44 +++++++++---------- .../setup/sql/nel_ams_lib_00002.sql | 6 +-- .../setup/sql/nel_ams_lib_00005.sql | 2 +- .../setup/sql/nel_ams_lib_00006.sql | 6 +-- .../private_php/setup/sql/nel_tool_00001.sql | 42 +++++++++--------- .../setup/sql/ring_domain_00001.sql | 42 +++++++++--------- .../web/private_php/setup/sql/webig_00001.sql | 12 ++--- 10 files changed, 85 insertions(+), 85 deletions(-) diff --git a/code/web/private_php/setup/sql/nel_00001.sql b/code/web/private_php/setup/sql/nel_00001.sql index 70e14419b..51140342b 100644 --- a/code/web/private_php/setup/sql/nel_00001.sql +++ b/code/web/private_php/setup/sql/nel_00001.sql @@ -14,7 +14,7 @@ SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; -/*!40101 SET NAMES utf8 */; +/*!40101 SET NAMES utf8mb4 */; -- -- Database: `nel` @@ -39,7 +39,7 @@ CREATE TABLE IF NOT EXISTS `domain` ( `web_host` varchar(255) NOT NULL DEFAULT '', `web_host_php` varchar(255) NOT NULL DEFAULT '', `description` varchar(200) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4; -- -------------------------------------------------------- @@ -53,7 +53,7 @@ CREATE TABLE IF NOT EXISTS `permission` ( `ShardId` int(10) NOT NULL DEFAULT '-1', `AccessPrivilege` set('OPEN','DEV','RESTRICTED') NOT NULL DEFAULT 'OPEN', `prim` int(10) unsigned NOT NULL -) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8mb4; -- -------------------------------------------------------- @@ -76,7 +76,7 @@ CREATE TABLE IF NOT EXISTS `shard` ( `State` enum('ds_close','ds_dev','ds_restricted','ds_open') NOT NULL DEFAULT 'ds_dev', `MOTD` text NOT NULL, `prim` int(10) unsigned NOT NULL -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='contains all shards information for login system'; +) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COMMENT='contains all shards information for login system'; -- -------------------------------------------------------- @@ -127,7 +127,7 @@ CREATE TABLE IF NOT EXISTS `user` ( `ValidMerchantCode` varchar(13) NOT NULL DEFAULT '', `PBC` tinyint(1) NOT NULL DEFAULT '0', `ApiKeySeed` varchar(8) DEFAULT NULL -) ENGINE=MyISAM AUTO_INCREMENT=13 DEFAULT CHARSET=utf8 COMMENT='contains all users information for login system'; +) ENGINE=MyISAM AUTO_INCREMENT=13 DEFAULT CHARSET=utf8mb4 COMMENT='contains all users information for login system'; -- -- Indexes for dumped tables diff --git a/code/web/private_php/setup/sql/nel_00002.sql b/code/web/private_php/setup/sql/nel_00002.sql index 74a59d980..851abc196 100644 --- a/code/web/private_php/setup/sql/nel_00002.sql +++ b/code/web/private_php/setup/sql/nel_00002.sql @@ -1,4 +1,4 @@ -ALTER TABLE `permission` CHANGE `ClientApplication` `ClientApplication` CHAR( 64 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ; +ALTER TABLE `permission` CHANGE `ClientApplication` `ClientApplication` CHAR( 64 ) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL ; ALTER TABLE `permission` DROP `prim` ; ALTER TABLE `permission` ADD `PermissionId` INT NOT NULL AUTO_INCREMENT PRIMARY KEY FIRST ; ALTER TABLE `permission` ADD `DomainId` INT NOT NULL DEFAULT '-1' AFTER `UId` ; diff --git a/code/web/private_php/setup/sql/nel_ams_00001.sql b/code/web/private_php/setup/sql/nel_ams_00001.sql index c2b0a8895..79da7e999 100644 --- a/code/web/private_php/setup/sql/nel_ams_00001.sql +++ b/code/web/private_php/setup/sql/nel_ams_00001.sql @@ -14,7 +14,7 @@ SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; -/*!40101 SET NAMES utf8 */; +/*!40101 SET NAMES utf8mb4 */; -- -- Database: `ams_web` @@ -38,7 +38,7 @@ CREATE TABLE IF NOT EXISTS `ams_user` ( `Country` char(2) NOT NULL DEFAULT '', `ReceiveMail` int(1) NOT NULL DEFAULT '1', `Language` varchar(3) DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -- Indexes for dumped tables diff --git a/code/web/private_php/setup/sql/nel_ams_lib_00001.sql b/code/web/private_php/setup/sql/nel_ams_lib_00001.sql index 3c9b259b3..07826cf24 100644 --- a/code/web/private_php/setup/sql/nel_ams_lib_00001.sql +++ b/code/web/private_php/setup/sql/nel_ams_lib_00001.sql @@ -14,7 +14,7 @@ SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; -/*!40101 SET NAMES utf8 */; +/*!40101 SET NAMES utf8mb4 */; -- -- Database: `nel_ams_lib` @@ -31,7 +31,7 @@ CREATE TABLE IF NOT EXISTS `ams_querycache` ( `type` varchar(64) NOT NULL, `query` varchar(512) NOT NULL, `db` varchar(80) NOT NULL -) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4; -- -------------------------------------------------------- @@ -42,7 +42,7 @@ CREATE TABLE IF NOT EXISTS `ams_querycache` ( CREATE TABLE IF NOT EXISTS `assigned` ( `Ticket` int(10) unsigned NOT NULL, `User` int(10) unsigned NOT NULL -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -------------------------------------------------------- @@ -61,7 +61,7 @@ CREATE TABLE IF NOT EXISTS `email` ( `MessageId` varchar(45) DEFAULT NULL, `TicketId` int(10) unsigned DEFAULT NULL, `Sender` int(10) unsigned DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -------------------------------------------------------- @@ -72,7 +72,7 @@ CREATE TABLE IF NOT EXISTS `email` ( CREATE TABLE IF NOT EXISTS `forwarded` ( `Group` int(10) unsigned NOT NULL, `Ticket` int(10) unsigned NOT NULL -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -------------------------------------------------------- @@ -83,7 +83,7 @@ CREATE TABLE IF NOT EXISTS `forwarded` ( CREATE TABLE IF NOT EXISTS `in_group` ( `Ticket_Group` int(10) unsigned NOT NULL, `Ticket` int(10) unsigned NOT NULL -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -------------------------------------------------------- @@ -94,7 +94,7 @@ CREATE TABLE IF NOT EXISTS `in_group` ( CREATE TABLE IF NOT EXISTS `in_support_group` ( `User` int(10) unsigned NOT NULL, `Group` int(10) unsigned NOT NULL -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -------------------------------------------------------- @@ -112,7 +112,7 @@ CREATE TABLE IF NOT EXISTS `plugins` ( `Status` int(11) NOT NULL DEFAULT '0', `Weight` int(11) NOT NULL DEFAULT '0', `Info` text -) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4; -- -- Dumping data for table `plugins` @@ -136,7 +136,7 @@ CREATE TABLE IF NOT EXISTS `support_group` ( `IMAP_MailServer` varchar(60) DEFAULT NULL, `IMAP_Username` varchar(45) DEFAULT NULL, `IMAP_Password` varchar(90) DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -------------------------------------------------------- @@ -147,7 +147,7 @@ CREATE TABLE IF NOT EXISTS `support_group` ( CREATE TABLE IF NOT EXISTS `tag` ( `TagId` int(10) unsigned NOT NULL, `Value` varchar(60) NOT NULL -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -------------------------------------------------------- @@ -158,7 +158,7 @@ CREATE TABLE IF NOT EXISTS `tag` ( CREATE TABLE IF NOT EXISTS `tagged` ( `Ticket` int(10) unsigned NOT NULL, `Tag` int(10) unsigned NOT NULL -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -------------------------------------------------------- @@ -175,7 +175,7 @@ CREATE TABLE IF NOT EXISTS `ticket` ( `Ticket_Category` int(10) unsigned NOT NULL, `Author` int(10) unsigned NOT NULL, `Priority` int(3) DEFAULT '0' -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -------------------------------------------------------- @@ -186,7 +186,7 @@ CREATE TABLE IF NOT EXISTS `ticket` ( CREATE TABLE IF NOT EXISTS `ticket_category` ( `TCategoryId` int(10) unsigned NOT NULL, `Name` varchar(45) NOT NULL -) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4; -- -- Dumping data for table `ticket_category` @@ -208,7 +208,7 @@ INSERT INTO `ticket_category` (`TCategoryId`, `Name`) VALUES CREATE TABLE IF NOT EXISTS `ticket_content` ( `TContentId` int(10) unsigned NOT NULL, `Content` text -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -------------------------------------------------------- @@ -219,7 +219,7 @@ CREATE TABLE IF NOT EXISTS `ticket_content` ( CREATE TABLE IF NOT EXISTS `ticket_group` ( `TGroupId` int(10) unsigned NOT NULL, `Title` varchar(80) NOT NULL -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -------------------------------------------------------- @@ -248,7 +248,7 @@ CREATE TABLE IF NOT EXISTS `ticket_info` ( `PlayerName` varchar(45) DEFAULT NULL, `UserId` int(11) DEFAULT NULL, `TimeInGame` varchar(50) DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -------------------------------------------------------- @@ -262,7 +262,7 @@ CREATE TABLE IF NOT EXISTS `ticket_log` ( `Query` varchar(255) NOT NULL, `Ticket` int(10) unsigned NOT NULL, `Author` int(10) unsigned DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -------------------------------------------------------- @@ -277,7 +277,7 @@ CREATE TABLE IF NOT EXISTS `ticket_reply` ( `Content` int(10) unsigned NOT NULL, `Timestamp` timestamp NULL DEFAULT NULL, `Hidden` tinyint(1) DEFAULT '0' -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -------------------------------------------------------- @@ -289,7 +289,7 @@ CREATE TABLE IF NOT EXISTS `ticket_user` ( `TUserId` int(10) unsigned NOT NULL, `Permission` int(3) NOT NULL DEFAULT '1', `ExternId` int(10) unsigned NOT NULL -) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4; -- -------------------------------------------------------- @@ -300,9 +300,9 @@ CREATE TABLE IF NOT EXISTS `ticket_user` ( CREATE TABLE IF NOT EXISTS `updates` ( `s.no` int(10) NOT NULL, `PluginId` int(10) DEFAULT NULL, - `UpdatePath` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL, - `UpdateInfo` text CHARACTER SET utf8 COLLATE utf8_unicode_ci -) ENGINE=InnoDB DEFAULT CHARSET=utf8; + `UpdatePath` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, + `UpdateInfo` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -- Indexes for dumped tables diff --git a/code/web/private_php/setup/sql/nel_ams_lib_00002.sql b/code/web/private_php/setup/sql/nel_ams_lib_00002.sql index 99700c532..4831288d2 100644 --- a/code/web/private_php/setup/sql/nel_ams_lib_00002.sql +++ b/code/web/private_php/setup/sql/nel_ams_lib_00002.sql @@ -14,7 +14,7 @@ SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; -/*!40101 SET NAMES utf8 */; +/*!40101 SET NAMES utf8mb4 */; -- -- Database: `nel_ams_lib` @@ -29,12 +29,12 @@ SET time_zone = "+00:00"; CREATE TABLE IF NOT EXISTS `ticket_attachments` ( `idticket_attachments` int(10) unsigned NOT NULL, `ticket_TId` int(10) unsigned NOT NULL, - `Filename` varchar(45) COLLATE utf8_unicode_ci NOT NULL, + `Filename` varchar(45) COLLATE utf8mb4_unicode_ci NOT NULL, `Timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `Filesize` int(10) NOT NULL, `Uploader` int(10) unsigned NOT NULL, `Path` VARCHAR(128) NOT NULL -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- -- Indexes for dumped tables diff --git a/code/web/private_php/setup/sql/nel_ams_lib_00005.sql b/code/web/private_php/setup/sql/nel_ams_lib_00005.sql index 2a2f8bcca..11870cacb 100644 --- a/code/web/private_php/setup/sql/nel_ams_lib_00005.sql +++ b/code/web/private_php/setup/sql/nel_ams_lib_00005.sql @@ -1 +1 @@ -ALTER TABLE `ticket_attachments` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci; +ALTER TABLE `ticket_attachments` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; diff --git a/code/web/private_php/setup/sql/nel_ams_lib_00006.sql b/code/web/private_php/setup/sql/nel_ams_lib_00006.sql index f4c632bad..424bde970 100644 --- a/code/web/private_php/setup/sql/nel_ams_lib_00006.sql +++ b/code/web/private_php/setup/sql/nel_ams_lib_00006.sql @@ -1,8 +1,8 @@ CREATE TABLE IF NOT EXISTS `settings` ( `idSettings` int(11) NOT NULL, - `Setting` varchar(32) COLLATE utf8_unicode_ci NOT NULL, - `Value` varchar(256) COLLATE utf8_unicode_ci NOT NULL -) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; + `Setting` varchar(32) COLLATE utf8mb4_unicode_ci NOT NULL, + `Value` varchar(256) COLLATE utf8mb4_unicode_ci NOT NULL +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; INSERT INTO `settings` (`idSettings`, `Setting`, `Value`) VALUES (1, 'userRegistration', '0'); diff --git a/code/web/private_php/setup/sql/nel_tool_00001.sql b/code/web/private_php/setup/sql/nel_tool_00001.sql index a01a1c4a5..1ea044a9d 100644 --- a/code/web/private_php/setup/sql/nel_tool_00001.sql +++ b/code/web/private_php/setup/sql/nel_tool_00001.sql @@ -14,7 +14,7 @@ SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; -/*!40101 SET NAMES utf8 */; +/*!40101 SET NAMES utf8mb4 */; -- -- Database: `nel_tool` @@ -36,7 +36,7 @@ CREATE TABLE IF NOT EXISTS `neltool_annotations` ( PRIMARY KEY (`annotation_id`), UNIQUE KEY `annotation_shard_id` (`annotation_shard_id`), UNIQUE KEY `annotation_domain_id` (`annotation_domain_id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ; +) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=2 ; -- -- Dumping data for table `neltool_annotations` @@ -60,7 +60,7 @@ CREATE TABLE IF NOT EXISTS `neltool_applications` ( `application_visible` int(11) NOT NULL DEFAULT '0', `application_icon` varchar(128) NOT NULL DEFAULT '', PRIMARY KEY (`application_id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=40 ; +) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=40 ; -- -- Dumping data for table `neltool_applications` @@ -126,7 +126,7 @@ CREATE TABLE IF NOT EXISTS `neltool_domains` ( `domain_mfs_web` text, `domain_cs_sql_string` varchar(255) DEFAULT NULL, PRIMARY KEY (`domain_id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4; -- -------------------------------------------------------- @@ -143,7 +143,7 @@ CREATE TABLE IF NOT EXISTS `neltool_groups` ( `group_default_domain_id` tinyint(3) unsigned DEFAULT NULL, `group_default_shard_id` smallint(3) unsigned DEFAULT NULL, PRIMARY KEY (`group_id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=10 ; +) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=10 ; -- -- Dumping data for table `neltool_groups` @@ -172,7 +172,7 @@ CREATE TABLE IF NOT EXISTS `neltool_group_applications` ( PRIMARY KEY (`group_application_id`), KEY `group_application_group_id` (`group_application_group_id`), KEY `group_application_application_id` (`group_application_application_id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=966 ; +) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=966 ; -- -- Dumping data for table `neltool_group_applications` @@ -370,7 +370,7 @@ CREATE TABLE IF NOT EXISTS `neltool_group_domains` ( `group_domain_domain_id` int(11) NOT NULL DEFAULT '0', PRIMARY KEY (`group_domain_id`), KEY `group_domain_group_id` (`group_domain_group_id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4; -- -------------------------------------------------------- @@ -386,7 +386,7 @@ CREATE TABLE IF NOT EXISTS `neltool_group_shards` ( PRIMARY KEY (`group_shard_id`), KEY `group_shard_group_id` (`group_shard_group_id`), KEY `group_shard_domain_id` (`group_shard_domain_id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4; -- -- Dumping data for table `neltool_group_shards` @@ -408,7 +408,7 @@ CREATE TABLE IF NOT EXISTS `neltool_locks` ( PRIMARY KEY (`lock_id`), UNIQUE KEY `lock_shard_id` (`lock_shard_id`), UNIQUE KEY `lock_domain_id` (`lock_domain_id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4; -- -------------------------------------------------------- @@ -422,7 +422,7 @@ CREATE TABLE IF NOT EXISTS `neltool_logs` ( `logs_date` int(11) NOT NULL DEFAULT '0', `logs_data` varchar(255) NOT NULL DEFAULT '', PRIMARY KEY (`logs_id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4; -- -------------------------------------------------------- @@ -439,7 +439,7 @@ CREATE TABLE IF NOT EXISTS `neltool_notes` ( `note_active` int(11) NOT NULL DEFAULT '0', `note_global` int(11) NOT NULL DEFAULT '0', PRIMARY KEY (`note_id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=11 ; +) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=11 ; -- -- Dumping data for table `neltool_notes` @@ -469,7 +469,7 @@ CREATE TABLE IF NOT EXISTS `neltool_restart_groups` ( PRIMARY KEY (`restart_group_id`), UNIQUE KEY `restart_group_id` (`restart_group_id`), KEY `restart_group_id_2` (`restart_group_id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=6 ; +) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=6 ; -- -- Dumping data for table `neltool_restart_groups` @@ -495,7 +495,7 @@ CREATE TABLE IF NOT EXISTS `neltool_restart_messages` ( PRIMARY KEY (`restart_message_id`), UNIQUE KEY `restart_message_id` (`restart_message_id`), KEY `restart_message_id_2` (`restart_message_id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=11 ; +) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=11 ; -- -- Dumping data for table `neltool_restart_messages` @@ -523,7 +523,7 @@ CREATE TABLE IF NOT EXISTS `neltool_restart_sequences` ( `restart_sequence_date_end` int(11) DEFAULT NULL, `restart_sequence_timer` int(11) unsigned DEFAULT '0', PRIMARY KEY (`restart_sequence_id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4; -- -------------------------------------------------------- @@ -540,7 +540,7 @@ CREATE TABLE IF NOT EXISTS `neltool_shards` ( `shard_restart` int(10) unsigned NOT NULL DEFAULT '0', PRIMARY KEY (`shard_id`), KEY `shard_domain_id` (`shard_domain_id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4; -- -------------------------------------------------------- @@ -561,7 +561,7 @@ CREATE TABLE IF NOT EXISTS `neltool_stats_hd_datas` ( PRIMARY KEY (`hd_id`), KEY `hd_domain_id` (`hd_domain_id`), KEY `hd_server` (`hd_server`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4; -- -------------------------------------------------------- @@ -573,7 +573,7 @@ CREATE TABLE IF NOT EXISTS `neltool_stats_hd_times` ( `hd_domain_id` int(11) NOT NULL DEFAULT '0', `hd_last_time` int(11) NOT NULL DEFAULT '0', PRIMARY KEY (`hd_domain_id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4; -- -------------------------------------------------------- @@ -595,7 +595,7 @@ CREATE TABLE IF NOT EXISTS `neltool_users` ( UNIQUE KEY `user_login` (`user_name`), KEY `user_group_id` (`user_group_id`), KEY `user_active` (`user_active`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4; -- -------------------------------------------------------- @@ -610,7 +610,7 @@ CREATE TABLE IF NOT EXISTS `neltool_user_applications` ( PRIMARY KEY (`user_application_id`), KEY `user_application_user_id` (`user_application_user_id`), KEY `user_application_application_id` (`user_application_application_id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4; -- -------------------------------------------------------- @@ -624,7 +624,7 @@ CREATE TABLE IF NOT EXISTS `neltool_user_domains` ( `user_domain_domain_id` int(11) NOT NULL DEFAULT '0', PRIMARY KEY (`user_domain_id`), KEY `user_domain_user_id` (`user_domain_user_id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4; -- -------------------------------------------------------- @@ -640,7 +640,7 @@ CREATE TABLE IF NOT EXISTS `neltool_user_shards` ( PRIMARY KEY (`user_shard_id`), KEY `user_shard_user_id` (`user_shard_user_id`), KEY `user_shard_domain_id` (`user_shard_domain_id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; diff --git a/code/web/private_php/setup/sql/ring_domain_00001.sql b/code/web/private_php/setup/sql/ring_domain_00001.sql index fdda4fc77..f0a6abd8f 100644 --- a/code/web/private_php/setup/sql/ring_domain_00001.sql +++ b/code/web/private_php/setup/sql/ring_domain_00001.sql @@ -14,7 +14,7 @@ SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; -/*!40101 SET NAMES utf8 */; +/*!40101 SET NAMES utf8mb4 */; -- -- Database: `ring_mini01` @@ -49,7 +49,7 @@ CREATE TABLE IF NOT EXISTS `characters` ( KEY `user_id_idx` (`user_id`), KEY `guild_idx` (`guild_id`), KEY `guild_id_idx` (`guild_id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4; -- -------------------------------------------------------- @@ -65,7 +65,7 @@ CREATE TABLE IF NOT EXISTS `folder` ( PRIMARY KEY (`Id`), KEY `owner_idx` (`owner`), KEY `title_idx` (`title`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC AUTO_INCREMENT=1 ; +) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC AUTO_INCREMENT=1 ; -- -------------------------------------------------------- @@ -80,7 +80,7 @@ CREATE TABLE IF NOT EXISTS `folder_access` ( PRIMARY KEY (`Id`), KEY `folder_id_idx` (`folder_id`), KEY `user_idx` (`user_id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED AUTO_INCREMENT=1 ; +) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 ROW_FORMAT=FIXED AUTO_INCREMENT=1 ; -- -------------------------------------------------------- @@ -95,7 +95,7 @@ CREATE TABLE IF NOT EXISTS `guilds` ( PRIMARY KEY (`guild_id`), KEY `shard_id_idx` (`shard_id`), KEY `guild_name_idx` (`guild_name`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC; +) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC; -- -------------------------------------------------------- @@ -110,7 +110,7 @@ CREATE TABLE IF NOT EXISTS `guild_invites` ( PRIMARY KEY (`Id`), KEY `guild_id_idx` (`guild_id`), KEY `session_id_idx` (`session_id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED AUTO_INCREMENT=1 ; +) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 ROW_FORMAT=FIXED AUTO_INCREMENT=1 ; -- -------------------------------------------------------- @@ -127,7 +127,7 @@ CREATE TABLE IF NOT EXISTS `journal_entry` ( `time_stamp` datetime NOT NULL DEFAULT '2005-09-07 12:41:33', PRIMARY KEY (`Id`), KEY `session_id_idx` (`session_id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC AUTO_INCREMENT=1 ; +) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC AUTO_INCREMENT=1 ; -- -------------------------------------------------------- @@ -144,7 +144,7 @@ CREATE TABLE IF NOT EXISTS `known_users` ( `comments` varchar(255) NOT NULL DEFAULT '', PRIMARY KEY (`Id`), KEY `user_index` (`owner`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC AUTO_INCREMENT=1 ; +) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC AUTO_INCREMENT=1 ; -- -------------------------------------------------------- @@ -158,7 +158,7 @@ CREATE TABLE IF NOT EXISTS `mfs_erased_mail_series` ( `erased_series` int(11) unsigned NOT NULL AUTO_INCREMENT, `erase_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', PRIMARY KEY (`erased_series`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC AUTO_INCREMENT=1 ; +) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC AUTO_INCREMENT=1 ; -- -------------------------------------------------------- @@ -175,7 +175,7 @@ CREATE TABLE IF NOT EXISTS `mfs_guild_thread` ( `post_count` int(11) unsigned NOT NULL DEFAULT '0', PRIMARY KEY (`thread_id`), KEY `guild_index` (`guild_id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC AUTO_INCREMENT=1 ; +) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC AUTO_INCREMENT=1 ; -- -------------------------------------------------------- @@ -190,7 +190,7 @@ CREATE TABLE IF NOT EXISTS `mfs_guild_thread_message` ( `date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `content` text NOT NULL, PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC AUTO_INCREMENT=1 ; +) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC AUTO_INCREMENT=1 ; -- -------------------------------------------------------- @@ -209,7 +209,7 @@ CREATE TABLE IF NOT EXISTS `mfs_mail` ( `content` text NOT NULL, PRIMARY KEY (`id`), KEY `dest_index` (`dest_char_id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC AUTO_INCREMENT=1 ; +) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC AUTO_INCREMENT=1 ; -- -------------------------------------------------------- @@ -223,7 +223,7 @@ CREATE TABLE IF NOT EXISTS `outlands` ( `billing_instance_id` int(11) unsigned NOT NULL DEFAULT '0', `anim_session_id` int(11) unsigned NOT NULL DEFAULT '0', PRIMARY KEY (`session_id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; +) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=1 ; -- -------------------------------------------------------- @@ -247,7 +247,7 @@ CREATE TABLE IF NOT EXISTS `player_rating` ( PRIMARY KEY (`Id`), KEY `session_id_idx` (`scenario_id`), KEY `author_idx` (`author`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC AUTO_INCREMENT=1 ; +) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC AUTO_INCREMENT=1 ; -- -------------------------------------------------------- @@ -276,7 +276,7 @@ CREATE TABLE IF NOT EXISTS `ring_users` ( UNIQUE KEY `user_name_idx` (`user_name`), KEY `cookie_idx` (`cookie`), KEY `current_session_idx` (`current_session`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC; +) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC; -- -------------------------------------------------------- @@ -297,7 +297,7 @@ CREATE TABLE IF NOT EXISTS `scenario` ( `level` enum('sl_a','sl_b','sl_c','sl_d','sl_e','sl_f') NOT NULL DEFAULT 'sl_a', `allow_free_trial` tinyint(1) NOT NULL DEFAULT '0', PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC AUTO_INCREMENT=1 ; +) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC AUTO_INCREMENT=1 ; -- -------------------------------------------------------- @@ -316,7 +316,7 @@ CREATE TABLE IF NOT EXISTS `scenario_desc` ( PRIMARY KEY (`session_id`), UNIQUE KEY `title_idx` (`title`), KEY `parent_idx` (`parent_scenario`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC; +) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC; -- -------------------------------------------------------- @@ -358,7 +358,7 @@ CREATE TABLE IF NOT EXISTS `sessions` ( KEY `owner_idx` (`owner`), KEY `folder_idx` (`folder_id`), KEY `state_type_idx` (`state`,`session_type`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC AUTO_INCREMENT=1001 ; +) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC AUTO_INCREMENT=1001 ; -- -------------------------------------------------------- @@ -377,7 +377,7 @@ CREATE TABLE IF NOT EXISTS `session_log` ( `owner` varchar(32) NOT NULL DEFAULT '0', `guild_name` varchar(50) DEFAULT NULL, PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC; +) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC; -- -------------------------------------------------------- @@ -395,7 +395,7 @@ CREATE TABLE IF NOT EXISTS `session_participant` ( PRIMARY KEY (`Id`), KEY `session_idx` (`session_id`), KEY `user_idx` (`char_id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED AUTO_INCREMENT=1 ; +) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 ROW_FORMAT=FIXED AUTO_INCREMENT=1 ; -- -------------------------------------------------------- @@ -410,7 +410,7 @@ CREATE TABLE IF NOT EXISTS `shard` ( `OldState` enum('ds_close','ds_dev','ds_restricted','ds_open') NOT NULL DEFAULT 'ds_restricted', `RequiredState` enum('ds_close','ds_dev','ds_restricted','ds_open') NOT NULL DEFAULT 'ds_dev', PRIMARY KEY (`shard_id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED; +) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 ROW_FORMAT=FIXED; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; diff --git a/code/web/private_php/setup/sql/webig_00001.sql b/code/web/private_php/setup/sql/webig_00001.sql index 9682d454a..707d68017 100644 --- a/code/web/private_php/setup/sql/webig_00001.sql +++ b/code/web/private_php/setup/sql/webig_00001.sql @@ -7,11 +7,11 @@ -- -------------------------------------------------------- /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; -/*!40101 SET NAMES utf8 */; +/*!40101 SET NAMES utf8mb4 */; /*!40014 SET FOREIGN_KEY_CHECKS=0 */; -- Dumping database structure for webig --- CREATE DATABASE IF NOT EXISTS `webig` /*!40100 DEFAULT CHARACTER SET utf8 COLLATE utf8_bin */; +-- CREATE DATABASE IF NOT EXISTS `webig` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_bin */; -- USE `webig`; @@ -19,20 +19,20 @@ CREATE TABLE IF NOT EXISTS `players` ( `id` INT(32) NOT NULL AUTO_INCREMENT, `cid` INT(32) NOT NULL DEFAULT '0', - `name` VARCHAR(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '0', + `name` VARCHAR(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '0', `gender` INT(1) NOT NULL DEFAULT '0', `creation_date` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00', `deleted` tinyint(1) NOT NULL DEFAULT '0', `last_login` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00', `dev_shard` tinyint(4) NOT NULL, PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin; +) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin; -- Dumping structure for table webig.accounts CREATE TABLE IF NOT EXISTS `accounts` ( `uid` INT(10) DEFAULT NULL, - `web_privs` VARCHAR(255) COLLATE utf8_bin DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin; + `web_privs` VARCHAR(255) COLLATE utf8mb4_bin DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin; -- Data exporting was unselected. /*!40014 SET FOREIGN_KEY_CHECKS=1 */; From e9dadb188adf640d4ccdd32dca996ec413d7abbf Mon Sep 17 00:00:00 2001 From: kaetemi Date: Sat, 11 May 2019 15:03:42 +0800 Subject: [PATCH 35/77] Use utf8mb4 --- .../API_key_management/API_key_management.php | 14 ++++---- .../ams/plugins/resource.mysql.php | 2 +- .../ams/plugins/resource.mysqls.php | 2 +- code/web/public_php/api/common/db_lib.php | 4 +-- code/web/public_php/setup/header.php | 2 +- .../public_php/webtt/app/config/database.php | 2 +- .../cases/libs/model/cake_schema.test.php | 16 ++++----- .../model/datasources/dbo/dbo_mysql.test.php | 36 +++++++++---------- .../model/datasources/dbo/dbo_mysqli.test.php | 6 ++-- 9 files changed, 42 insertions(+), 42 deletions(-) diff --git a/code/web/private_php/ams/plugins/API_key_management/API_key_management.php b/code/web/private_php/ams/plugins/API_key_management/API_key_management.php index b8dc965fc..f7caef90e 100644 --- a/code/web/private_php/ams/plugins/API_key_management/API_key_management.php +++ b/code/web/private_php/ams/plugins/API_key_management/API_key_management.php @@ -92,17 +92,17 @@ function api_key_management_hook_activate() CREATE TABLE IF NOT EXISTS `ams_api_keys` ( `SNo` int(10) NOT NULL AUTO_INCREMENT, - `User` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, - `FrName` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, - `UserType` varchar(10) COLLATE utf8_unicode_ci DEFAULT NULL, - `UserCharacter` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, + `User` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL, + `FrName` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL, + `UserType` varchar(10) COLLATE utf8mb4_unicode_ci DEFAULT NULL, + `UserCharacter` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `ExpiryDate` date DEFAULT NULL, - `AccessToken` text COLLATE utf8_unicode_ci DEFAULT NULL, + `AccessToken` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, `AddedOn` datetime DEFAULT NULL, - `Items` text COLLATE utf8_unicode_ci, + `Items` text COLLATE utf8mb4_unicode_ci, PRIMARY KEY (`SNo`), KEY `User` (`User`) - ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ; + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci AUTO_INCREMENT=1 ; -- -- Constraints for table `ams_api_keys` diff --git a/code/web/private_php/ams/plugins/resource.mysql.php b/code/web/private_php/ams/plugins/resource.mysql.php index 312f3fc73..4af19756d 100644 --- a/code/web/private_php/ams/plugins/resource.mysql.php +++ b/code/web/private_php/ams/plugins/resource.mysql.php @@ -12,7 +12,7 @@ * `modified` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, * `source` text, * PRIMARY KEY (`name`) - * ) ENGINE=InnoDB DEFAULT CHARSET=utf8; + * ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; * * Demo data: *
INSERT INTO `templates` (`name`, `modified`, `source`) VALUES ('test.tpl', "2010-12-25 22:00:00", '{$x="hello world"}{$x}');
diff --git a/code/web/private_php/ams/plugins/resource.mysqls.php b/code/web/private_php/ams/plugins/resource.mysqls.php index f9fe1c2f2..f7c4a663d 100644 --- a/code/web/private_php/ams/plugins/resource.mysqls.php +++ b/code/web/private_php/ams/plugins/resource.mysqls.php @@ -15,7 +15,7 @@ * `modified` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, * `source` text, * PRIMARY KEY (`name`) - * ) ENGINE=InnoDB DEFAULT CHARSET=utf8; + * ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; * * Demo data: *
INSERT INTO `templates` (`name`, `modified`, `source`) VALUES ('test.tpl', "2010-12-25 22:00:00", '{$x="hello world"}{$x}');
diff --git a/code/web/public_php/api/common/db_lib.php b/code/web/public_php/api/common/db_lib.php index 5d054b1bb..cedd6431b 100644 --- a/code/web/public_php/api/common/db_lib.php +++ b/code/web/public_php/api/common/db_lib.php @@ -134,7 +134,7 @@ class ryDB { global $_RYZOM_API_CONFIG; $this->db_name = $db_name; $this->db = new ServerDatabase(RYAPI_WEBDB_HOST, RYAPI_WEBDB_LOGIN, RYAPI_WEBDB_PASS, $db_name); - $this->db->query("SET NAMES utf8"); + $this->db->query("SET NAMES utf8mb4"); } public static function getInstance($db_name) { @@ -480,7 +480,7 @@ class ryDB { $c = "Updating DB Structure...\n"; foreach ($defs as $dbname => $tables) { $db = new ServerDatabase(RYAPI_WEBDB_HOST, RYAPI_WEBDB_LOGIN, RYAPI_WEBDB_PASS, $dbname); - $db->query("SET NAMES utf8"); + $db->query("SET NAMES utf8mb4"); $c .= "\n Selected DB '$dbname'\n"; foreach ($tables as $table => $sql) { diff --git a/code/web/public_php/setup/header.php b/code/web/public_php/setup/header.php index bc3924f4a..cefc30a01 100644 --- a/code/web/public_php/setup/header.php +++ b/code/web/public_php/setup/header.php @@ -62,7 +62,7 @@ function validate_writable($continue, $path) { function create_use_database($continue_r, $con, $database) { $continue = $continue_r; if ($continue) { - $sql = "CREATE DATABASE `" . mysqli_real_escape_string($con, $database) . "` DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;"; + $sql = "CREATE DATABASE `" . mysqli_real_escape_string($con, $database) . "` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;"; if (mysqli_query($con, $sql)) { printalert("success", "Database " . $database . " created"); } else { diff --git a/code/web/public_php/webtt/app/config/database.php b/code/web/public_php/webtt/app/config/database.php index 3119752d2..702ece282 100644 --- a/code/web/public_php/webtt/app/config/database.php +++ b/code/web/public_php/webtt/app/config/database.php @@ -8,7 +8,7 @@ class DATABASE_CONFIG { 'login' => 'webtt', 'password' => 'webtt77', 'database' => 'webtt2', - 'encoding' => 'utf8' + 'encoding' => 'utf8mb4' ); var $raw_files = array( 'datasource' => 'RawFilesSource', diff --git a/code/web/public_php/webtt/cake/tests/cases/libs/model/cake_schema.test.php b/code/web/public_php/webtt/cake/tests/cases/libs/model/cake_schema.test.php index 2b3abcc8b..5ae80c83e 100644 --- a/code/web/public_php/webtt/cake/tests/cases/libs/model/cake_schema.test.php +++ b/code/web/public_php/webtt/cake/tests/cases/libs/model/cake_schema.test.php @@ -872,8 +872,8 @@ class CakeSchemaTest extends CakeTestCase { 'author_id' => array('column' => 'author_id'), ), 'tableParameters' => array( - 'charset' => 'utf8', - 'collate' => 'utf8_general_ci', + 'charset' => 'utf8mb4', + 'collate' => 'utf8mb4_general_ci', 'engine' => 'MyISAM' ) ), @@ -885,8 +885,8 @@ class CakeSchemaTest extends CakeTestCase { 'PRIMARY' => array('column' => 'id', 'unique' => true), ), 'tableParameters' => array( - 'charset' => 'utf8', - 'collate' => 'utf8_general_ci' + 'charset' => 'utf8mb4', + 'collate' => 'utf8mb4_general_ci' ) ) ); @@ -898,8 +898,8 @@ class CakeSchemaTest extends CakeTestCase { ), 'change' => array( 'tableParameters' => array( - 'charset' => 'utf8', - 'collate' => 'utf8_general_ci', + 'charset' => 'utf8mb4', + 'collate' => 'utf8mb4_general_ci', 'engine' => 'MyISAM' ) ) @@ -910,8 +910,8 @@ class CakeSchemaTest extends CakeTestCase { ), 'change' => array( 'tableParameters' => array( - 'charset' => 'utf8', - 'collate' => 'utf8_general_ci', + 'charset' => 'utf8mb4', + 'collate' => 'utf8mb4_general_ci', ) ) ) diff --git a/code/web/public_php/webtt/cake/tests/cases/libs/model/datasources/dbo/dbo_mysql.test.php b/code/web/public_php/webtt/cake/tests/cases/libs/model/datasources/dbo/dbo_mysql.test.php index c90d585ca..30bf9555c 100644 --- a/code/web/public_php/webtt/cake/tests/cases/libs/model/datasources/dbo/dbo_mysql.test.php +++ b/code/web/public_php/webtt/cake/tests/cases/libs/model/datasources/dbo/dbo_mysql.test.php @@ -376,11 +376,11 @@ class DboMysqlTest extends CakeTestCase { 'default', 'null' => true, 'key', - 'charset' => 'utf8', - 'collate' => 'utf8_unicode_ci' + 'charset' => 'utf8mb4', + 'collate' => 'utf8mb4_unicode_ci' ); $result = $this->db->buildColumn($data); - $expected = '`testName` CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL'; + $expected = '`testName` CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL'; $this->assertEqual($result, $expected); $this->db->columns = $restore; } @@ -648,22 +648,22 @@ class DboMysqlTest extends CakeTestCase { 'id' => array('type' => 'integer', 'null' => false, 'default' => 0), 'name' => array('type' => 'string', 'null' => false, 'length' => 50), 'tableParameters' => array( - 'charset' => 'utf8', - 'collate' => 'utf8_general_ci', + 'charset' => 'utf8mb4', + 'collate' => 'utf8mb4_general_ci', 'engine' => 'InnoDB' ) ) )); $result = $this->db->alterSchema($schema2->compare($schema1)); - $this->assertPattern('/DEFAULT CHARSET=utf8/', $result); + $this->assertPattern('/DEFAULT CHARSET=utf8mb4/', $result); $this->assertPattern('/ENGINE=InnoDB/', $result); - $this->assertPattern('/COLLATE=utf8_general_ci/', $result); + $this->assertPattern('/COLLATE=utf8mb4_general_ci/', $result); $this->db->query($result); $result = $this->db->listDetailedSources('altertest'); - $this->assertEqual($result['Collation'], 'utf8_general_ci'); + $this->assertEqual($result['Collation'], 'utf8mb4_general_ci'); $this->assertEqual($result['Engine'], 'InnoDB'); - $this->assertEqual($result['charset'], 'utf8'); + $this->assertEqual($result['charset'], 'utf8mb4'); $this->db->query($this->db->dropSchema($schema1)); } @@ -710,11 +710,11 @@ class DboMysqlTest extends CakeTestCase { */ function testReadTableParameters() { $this->db->cacheSources = false; - $this->db->query('CREATE TABLE ' . $this->db->fullTableName('tinyint') . ' (id int(11) AUTO_INCREMENT, bool tinyint(1), small_int tinyint(2), primary key(id)) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;'); + $this->db->query('CREATE TABLE ' . $this->db->fullTableName('tinyint') . ' (id int(11) AUTO_INCREMENT, bool tinyint(1), small_int tinyint(2), primary key(id)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;'); $result = $this->db->readTableParameters('tinyint'); $expected = array( - 'charset' => 'utf8', - 'collate' => 'utf8_unicode_ci', + 'charset' => 'utf8mb4', + 'collate' => 'utf8mb4_unicode_ci', 'engine' => 'InnoDB'); $this->assertEqual($result, $expected); @@ -738,13 +738,13 @@ class DboMysqlTest extends CakeTestCase { function testBuildTableParameters() { $this->db->cacheSources = false; $data = array( - 'charset' => 'utf8', - 'collate' => 'utf8_unicode_ci', + 'charset' => 'utf8mb4', + 'collate' => 'utf8mb4_unicode_ci', 'engine' => 'InnoDB'); $result = $this->db->buildTableParameters($data); $expected = array( - 'DEFAULT CHARSET=utf8', - 'COLLATE=utf8_unicode_ci', + 'DEFAULT CHARSET=utf8mb4', + 'COLLATE=utf8mb4_unicode_ci', 'ENGINE=InnoDB'); $this->assertEqual($result, $expected); } @@ -757,8 +757,8 @@ class DboMysqlTest extends CakeTestCase { */ function testGetCharsetName() { $this->db->cacheSources = false; - $result = $this->db->getCharsetName('utf8_unicode_ci'); - $this->assertEqual($result, 'utf8'); + $result = $this->db->getCharsetName('utf8mb4_unicode_ci'); + $this->assertEqual($result, 'utf8mb4'); $result = $this->db->getCharsetName('cp1250_general_ci'); $this->assertEqual($result, 'cp1250'); } diff --git a/code/web/public_php/webtt/cake/tests/cases/libs/model/datasources/dbo/dbo_mysqli.test.php b/code/web/public_php/webtt/cake/tests/cases/libs/model/datasources/dbo/dbo_mysqli.test.php index e3a94512b..812e33216 100644 --- a/code/web/public_php/webtt/cake/tests/cases/libs/model/datasources/dbo/dbo_mysqli.test.php +++ b/code/web/public_php/webtt/cake/tests/cases/libs/model/datasources/dbo/dbo_mysqli.test.php @@ -318,11 +318,11 @@ class DboMysqliTest extends CakeTestCase { */ function testReadTableParameters() { $this->db->cacheSources = $this->db->testing = false; - $this->db->query('CREATE TABLE ' . $this->db->fullTableName('tinyint') . ' (id int(11) AUTO_INCREMENT, bool tinyint(1), small_int tinyint(2), primary key(id)) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;'); + $this->db->query('CREATE TABLE ' . $this->db->fullTableName('tinyint') . ' (id int(11) AUTO_INCREMENT, bool tinyint(1), small_int tinyint(2), primary key(id)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;'); $result = $this->db->readTableParameters('tinyint'); $expected = array( - 'charset' => 'utf8', - 'collate' => 'utf8_unicode_ci', + 'charset' => 'utf8mb4', + 'collate' => 'utf8mb4_unicode_ci', 'engine' => 'InnoDB'); $this->assertEqual($result, $expected); From c916df692226385dcfb03113919e668ebea98d5b Mon Sep 17 00:00:00 2001 From: kaetemi Date: Sat, 11 May 2019 15:13:24 +0800 Subject: [PATCH 36/77] Use utf8mb4 --- code/nelns/login_service/mysql_helper.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/nelns/login_service/mysql_helper.cpp b/code/nelns/login_service/mysql_helper.cpp index 208faf41e..5ae04e8b5 100644 --- a/code/nelns/login_service/mysql_helper.cpp +++ b/code/nelns/login_service/mysql_helper.cpp @@ -157,7 +157,7 @@ static void cbDatabaseVar(CConfigFile::CVar &var) #endif - sqlQuery("set names utf8"); + sqlQuery("set names utf8mb4"); } void sqlInit() From cf9ee9113d32a2f8b2d8a6344fd8b6486a037892 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Sat, 11 May 2019 17:37:16 +0800 Subject: [PATCH 37/77] PHP library mcrypt is no longer a thing --- code/web/public_php/setup/install.php | 11 ++--------- code/web/public_php/setup/upgrade.php | 7 ------- 2 files changed, 2 insertions(+), 16 deletions(-) diff --git a/code/web/public_php/setup/install.php b/code/web/public_php/setup/install.php index 438a5c332..67f27f5c0 100644 --- a/code/web/public_php/setup/install.php +++ b/code/web/public_php/setup/install.php @@ -35,13 +35,6 @@ require_once('setup/version.php'); printalert("danger", "No server roles selected"); $continue = false; } - - if ($continue) { - if (!extension_loaded('mcrypt')) { - printalert("danger", "The mcrypt extension is missing. Please check your PHP configuration"); - $continue = false; - } - } if ($continue) { try { @@ -161,8 +154,8 @@ require_once('setup/version.php'); $config = str_replace("%nelDomainName%", addslashes($_POST["nelDomainName"]), $config); $config = str_replace("%nelSetupVersion%", addslashes($NEL_SETUP_VERSION), $config); $cryptKeyLength = 16; - $cryptKey = str_replace("=", "", base64_encode(mcrypt_create_iv(ceil(0.75 * $cryptKeyLength), MCRYPT_DEV_URANDOM))); - $cryptKeyIMAP = str_replace("=", "", base64_encode(mcrypt_create_iv(ceil(0.75 * $cryptKeyLength), MCRYPT_DEV_URANDOM))); + $cryptKey = substr(str_replace(['+', '/', '='], '', base64_encode(random_bytes($cryptKeyLength * 2))), 0, $cryptKeyLength); + $cryptKeyIMAP = substr(str_replace(['+', '/', '='], '', base64_encode(random_bytes($cryptKeyLength * 2))), 0, $cryptKeyLength); $config = str_replace("%cryptKey%", addslashes($cryptKey), $config); $config = str_replace("%cryptKeyIMAP%", addslashes($cryptKeyIMAP), $config); if (file_put_contents("config.php", $config)) { diff --git a/code/web/public_php/setup/upgrade.php b/code/web/public_php/setup/upgrade.php index cc157a997..b29c04e2c 100644 --- a/code/web/public_php/setup/upgrade.php +++ b/code/web/public_php/setup/upgrade.php @@ -28,13 +28,6 @@ if (!isset($NEL_SETUP_VERSION_CONFIGURED)) { require_once('database.php'); - if ($continue) { - if (!extension_loaded('mcrypt')) { - printalert("danger", "The mcrypt extension is missing. Please check your PHP configuration"); - $continue = false; - } - } - if (file_exists("role_support")) { $continue = upgrade_support_databases($continue); } From 41455d6d9898ac1499553ce2496ded0af7b9fc3f Mon Sep 17 00:00:00 2001 From: kaetemi Date: Sat, 11 May 2019 17:52:32 +0800 Subject: [PATCH 38/77] Fix bad SQL query in AMS --- .../ams/plugins/Domain_Management/Domain_Management.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/web/private_php/ams/plugins/Domain_Management/Domain_Management.php b/code/web/private_php/ams/plugins/Domain_Management/Domain_Management.php index 5362eef6b..5b98fc152 100644 --- a/code/web/private_php/ams/plugins/Domain_Management/Domain_Management.php +++ b/code/web/private_php/ams/plugins/Domain_Management/Domain_Management.php @@ -159,8 +159,8 @@ function domain_management_hook_return_global() function domain_management_hook_activate() { $dbl = new DBLayer( "lib" ); - $sql = "INSERT INTO `settings` (Setting) - SELECT 'Domain_Auto_Add' FROM DUAL + $sql = "INSERT INTO `settings` (Setting, Value) + SELECT 'Domain_Auto_Add', 0 FROM DUAL WHERE NOT EXISTS (SELECT Setting FROM settings WHERE Setting='Domain_Auto_Add');"; From e6aa13258b39d7b7eeb080ca371d75b5ecb1dae7 Mon Sep 17 00:00:00 2001 From: Nimetu Date: Sun, 12 May 2019 12:54:41 +0300 Subject: [PATCH 39/77] Fixed: trimQuotes --HG-- branch : develop --- code/nel/include/nel/misc/common.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/code/nel/include/nel/misc/common.h b/code/nel/include/nel/misc/common.h index 350abc7f3..6d261ff8d 100644 --- a/code/nel/include/nel/misc/common.h +++ b/code/nel/include/nel/misc/common.h @@ -282,9 +282,11 @@ template T trimQuotes (const T &str) typename T::size_type size = str.size(); if (size == 0) return str; - if (str[0] != str[size-1] && (str[0] != '"' || str[0] != '\'')) + if (str[0] != str[size-1]) return str; - return str.substr(1, size - 1); + if (str[0] != '"' && str[0] != '\'') + return str; + return str.substr(1, size - 2); } ////////////////////////////////////////////////////////////////////////// From 12fb7af8b7bbb206496a7e0a0fbfe1f08778405b Mon Sep 17 00:00:00 2001 From: Nimetu Date: Sun, 12 May 2019 12:55:00 +0300 Subject: [PATCH 40/77] Added: Case compare flag to attribute selector --HG-- branch : develop --- code/nel/include/nel/gui/css_selector.h | 8 +++++--- code/nel/src/gui/css_parser.cpp | 27 ++++++++++++------------- code/nel/src/gui/css_selector.cpp | 18 +++++++++++++++-- 3 files changed, 34 insertions(+), 19 deletions(-) diff --git a/code/nel/include/nel/gui/css_selector.h b/code/nel/include/nel/gui/css_selector.h index b2b5372e9..ed04ba86d 100644 --- a/code/nel/include/nel/gui/css_selector.h +++ b/code/nel/include/nel/gui/css_selector.h @@ -43,8 +43,9 @@ namespace NLGUI std::string key; std::string value; char op; // =, ~, |, ^, $, * - SAttribute(const std::string &k, const std::string &v, char o) - :key(k),value(v),op(o) + bool caseSensitive; + SAttribute(const std::string &k, const std::string &v, char o, bool cs) + :key(k),value(v),op(o), caseSensitive(cs) {} }; @@ -69,7 +70,8 @@ namespace NLGUI // add attribute to selector // ' ' op means 'key exists, ignore value' - void addAttribute(const std::string &key, const std::string &val = "", char op = ' '); + // cs case-sensitive true|false + void addAttribute(const std::string &key, const std::string &val = "", char op = ' ', bool cs = true); // add pseudo class to selector, eg 'first-child' void addPseudoClass(const std::string &key); diff --git a/code/nel/src/gui/css_parser.cpp b/code/nel/src/gui/css_parser.cpp index d34dc8f7a..39a4496bc 100644 --- a/code/nel/src/gui/css_parser.cpp +++ b/code/nel/src/gui/css_parser.cpp @@ -463,7 +463,7 @@ namespace NLGUI { if (sel[pos] == '\'' || sel[pos] == '"') { - // value is quoted + // skip over quoted value start = pos; pos++; while(pos < sel.size() && sel[pos] != sel[start]) @@ -476,9 +476,6 @@ namespace NLGUI } if (pos == sel.size()) break; - - value = sel.substr(start + 1, pos - start - 1); - break; } else if (sel[pos] == '\\') { @@ -486,7 +483,6 @@ namespace NLGUI } else if (!quote && sel[pos] == ']') { - // unquoted value value = sel.substr(start, pos - start); break; } @@ -494,17 +490,20 @@ namespace NLGUI pos++; } // while 'value' - // TODO: scan for sel[pos] == ']' - if (pos == sel.size()) break; - // whitespace between quote and ], ie '[ attr $= "val" ]' - if (sel[pos] != ']') - { - while(pos < sel.size() && sel[pos] != ']') - pos++; - } if (pos == sel.size()) break; - current.addAttribute(key.toUtf8(), value.toUtf8(), (char)op); + bool cs = true; + // [value="attr" i] + if (value.size() > 2 && value[value.size()-2] == ' ') + { + ucchar lastChar = value[value.size()-1]; + if (lastChar == 'i' || lastChar == 'I' || lastChar == 's' || lastChar == 'S') + { + value = value.substr(0, value.size()-2); + cs = !((lastChar == 'i' || lastChar == 'I')); + } + } + current.addAttribute(key.toUtf8(), trimQuotes(value).toUtf8(), (char)op, cs); } // op error } // no value diff --git a/code/nel/src/gui/css_selector.cpp b/code/nel/src/gui/css_selector.cpp index 46806a2db..2c9d94559 100644 --- a/code/nel/src/gui/css_selector.cpp +++ b/code/nel/src/gui/css_selector.cpp @@ -71,9 +71,17 @@ namespace NLGUI } } - void CCssSelector::addAttribute(const std::string &key, const std::string &val, char op) + void CCssSelector::addAttribute(const std::string &key, const std::string &val, char op, bool cs) { - Attr.push_back(SAttribute(key, val, op)); + if (cs) + { + // case sensitive match + Attr.push_back(SAttribute(key, val, op, cs)); + } + else + { + Attr.push_back(SAttribute(key, toLower(val), op, cs)); + } } void CCssSelector::addPseudoClass(const std::string &key) @@ -135,6 +143,12 @@ namespace NLGUI if (!elm.hasAttribute(Attr[i].key)) return false; std::string value = elm.getAttribute(Attr[i].key); + // case-insensitive compare, Attr.value is already lowercased + if (!Attr[i].caseSensitive) + { + value = toLower(value); + } + switch(Attr[i].op) { case '=': From d10e7157efa864124b259845ea9fbda37e2ed60c Mon Sep 17 00:00:00 2001 From: Nimetu Date: Sun, 12 May 2019 17:13:39 +0300 Subject: [PATCH 41/77] Added: Music player directory/autoplay options to client.cfg --HG-- branch : develop --- code/ryzom/client/client_default.cfg | 4 ++++ code/ryzom/client/src/client_cfg.cpp | 8 ++++++++ code/ryzom/client/src/client_cfg.h | 4 ++++ .../client/src/interface_v3/music_player.cpp | 5 ++--- code/ryzom/client/src/main_loop.cpp | 20 +++++++++++++++++-- 5 files changed, 36 insertions(+), 5 deletions(-) diff --git a/code/ryzom/client/client_default.cfg b/code/ryzom/client/client_default.cfg index 3516e2a2c..7aabb2e4c 100644 --- a/code/ryzom/client/client_default.cfg +++ b/code/ryzom/client/client_default.cfg @@ -359,6 +359,10 @@ SoundGameMusicVolume_min = 0.0; SoundGameMusicVolume_max = 1.0; SoundGameMusicVolume_step = 0.001; +// MP3 player +MediaPlayerDirectory = "music"; +MediaPlayerAutoPlay = false; + // MISC PreDataPath = { "user", "patch", "data", "examples" }; NeedComputeVS = 0; diff --git a/code/ryzom/client/src/client_cfg.cpp b/code/ryzom/client/src/client_cfg.cpp index 52e08463d..67e09aaf4 100644 --- a/code/ryzom/client/src/client_cfg.cpp +++ b/code/ryzom/client/src/client_cfg.cpp @@ -472,6 +472,10 @@ CClientConfig::CClientConfig() ColorShout = CRGBA(150,0,0,255); // Default Shout color. ColorTalk = CRGBA(255,255,255,255); // Default Talk color. + // MP3 player + MediaPlayerDirectory = "music"; + MediaPlayerAutoPlay = false; + // PreDataPath.push_back("data/gamedev/language/"); // Default Path for the language data // DataPath.push_back("data/"); // Default Path for the Data. @@ -1247,6 +1251,10 @@ void CClientConfig::setValues() // Max track READ_INT_FV(MaxTrack) + // MP3 Player + READ_STRING_FV(MediaPlayerDirectory); + READ_BOOL_FV(MediaPlayerAutoPlay); + ///////////////// // USER COLORS // // Shout Color diff --git a/code/ryzom/client/src/client_cfg.h b/code/ryzom/client/src/client_cfg.h index c9c75a152..af2e97bd3 100644 --- a/code/ryzom/client/src/client_cfg.h +++ b/code/ryzom/client/src/client_cfg.h @@ -366,6 +366,10 @@ struct CClientConfig /// The max number of track we want to use. uint MaxTrack; + // MP3 Player + string MediaPlayerDirectory; + bool MediaPlayerAutoPlay; + /// Pre Data Path. std::vector PreDataPath; /// Data Path. diff --git a/code/ryzom/client/src/interface_v3/music_player.cpp b/code/ryzom/client/src/interface_v3/music_player.cpp index 3243cdb5b..fe97dd937 100644 --- a/code/ryzom/client/src/interface_v3/music_player.cpp +++ b/code/ryzom/client/src/interface_v3/music_player.cpp @@ -23,6 +23,7 @@ #include "../input.h" #include "../sound_manager.h" #include "interface_manager.h" +#include "../client_cfg.h" using namespace std; using namespace NLMISC; @@ -43,8 +44,6 @@ extern UDriver *Driver; #define MP3_SAVE_SHUFFLE "UI:SAVE:MP3_SHUFFLE" #define MP3_SAVE_REPEAT "UI:SAVE:MP3_REPEAT" -static const std::string MediaPlayerDirectory("music/"); - CMusicPlayer MusicPlayer; // *************************************************************************** @@ -396,7 +395,7 @@ public: // Recursive scan for files from media directory vector filesToProcess; - string newPath = CPath::standardizePath(MediaPlayerDirectory); + string newPath = CPath::standardizePath(ClientCfg.MediaPlayerDirectory); CPath::getPathContent (newPath, true, false, true, filesToProcess); uint i; diff --git a/code/ryzom/client/src/main_loop.cpp b/code/ryzom/client/src/main_loop.cpp index 32b76391b..981bc7c72 100644 --- a/code/ryzom/client/src/main_loop.cpp +++ b/code/ryzom/client/src/main_loop.cpp @@ -1081,6 +1081,8 @@ bool mainLoop() ProgressBar.finish(); + bool musicTriggerAutoPlay = true; + // Main loop. If the window is no more Active -> Exit. while( !UserEntity->permanentDeath() && !game_exit ) @@ -1733,7 +1735,7 @@ bool mainLoop() bool wantTraversals = !StereoDisplay || StereoDisplay->isSceneFirst(); bool keepTraversals = StereoDisplay && !StereoDisplay->isSceneLast(); doRenderScene(wantTraversals, keepTraversals); - + if (!StereoDisplay || StereoDisplay->isSceneLast()) { if (fullDetail) @@ -1803,7 +1805,7 @@ bool mainLoop() { displayPACSPrimitive(); } - + // display Sound box if (SoundBox) { @@ -2418,6 +2420,17 @@ bool mainLoop() // Update ingame duration and stat report sending updateStatReport (); + // Auto play once on character login + if (musicTriggerAutoPlay) + { + musicTriggerAutoPlay = false; + if (ClientCfg.SoundOn && ClientCfg.MediaPlayerAutoPlay) + { + MusicPlayer.stop(); + CAHManager::getInstance()->runActionHandler("music_player", NULL, "play_songs"); + MusicPlayer.play(); + } + } // Update the music player MusicPlayer.update (); @@ -2453,6 +2466,9 @@ bool mainLoop() // we have just completed init main loop, after reselecting character // repeat the steps before the main loop itself + // new char, retrigger music autoplay + musicTriggerAutoPlay = true; + // pre main loop in mainLoop resetIngameTime (); From 14a74cf4932e6d69722a728712e84ff24436a8bf Mon Sep 17 00:00:00 2001 From: Nimetu Date: Sun, 12 May 2019 17:14:21 +0300 Subject: [PATCH 42/77] Changed: update dr_mp3.h from upstream --HG-- branch : develop --- code/nel/include/nel/sound/decoder/dr_mp3.h | 1603 ++++++++++++------- 1 file changed, 987 insertions(+), 616 deletions(-) diff --git a/code/nel/include/nel/sound/decoder/dr_mp3.h b/code/nel/include/nel/sound/decoder/dr_mp3.h index 465438bf5..26aeec56f 100644 --- a/code/nel/include/nel/sound/decoder/dr_mp3.h +++ b/code/nel/include/nel/sound/decoder/dr_mp3.h @@ -1,57 +1,61 @@ -// MP3 audio decoder. Public domain. See "unlicense" statement at the end of this file. -// dr_mp3 - v0.4.1 - 2018-12-30 -// -// David Reid - mackron@gmail.com -// -// Based off minimp3 (https://github.com/lieff/minimp3) which is where the real work was done. See the bottom of this file for -// differences between minimp3 and dr_mp3. +/* +MP3 audio decoder. Choice of public domain or MIT-0. See license statements at the end of this file. +dr_mp3 - v0.4.4 - 2019-05-06 -// USAGE -// ===== -// dr_mp3 is a single-file library. To use it, do something like the following in one .c file. -// #define DR_MP3_IMPLEMENTATION -// #include "dr_mp3.h" -// -// You can then #include this file in other parts of the program as you would with any other header file. To decode audio data, -// do something like the following: -// -// drmp3 mp3; -// if (!drmp3_init_file(&mp3, "MySong.mp3", NULL)) { -// // Failed to open file -// } -// -// ... -// -// drmp3_uint64 framesRead = drmp3_read_pcm_frames_f32(pMP3, framesToRead, pFrames); -// -// The drmp3 object is transparent so you can get access to the channel count and sample rate like so: -// -// drmp3_uint32 channels = mp3.channels; -// drmp3_uint32 sampleRate = mp3.sampleRate; -// -// The third parameter of drmp3_init_file() in the example above allows you to control the output channel count and sample rate. It -// is a pointer to a drmp3_config object. Setting any of the variables of this object to 0 will cause dr_mp3 to use defaults. -// -// The example above initializes a decoder from a file, but you can also initialize it from a block of memory and read and seek -// callbacks with drmp3_init_memory() and drmp3_init() respectively. -// -// You do not need to do any annoying memory management when reading PCM frames - this is all managed internally. You can request -// any number of PCM frames in each call to drmp3_read_pcm_frames_f32() and it will return as many PCM frames as it can, up to the -// requested amount. -// -// You can also decode an entire file in one go with drmp3_open_and_read_f32(), drmp3_open_memory_and_read_f32() and -// drmp3_open_file_and_read_f32(). -// -// -// OPTIONS -// ======= -// #define these options before including this file. -// -// #define DR_MP3_NO_STDIO -// Disable drmp3_init_file(), etc. -// -// #define DR_MP3_NO_SIMD -// Disable SIMD optimizations. +David Reid - mackron@gmail.com + +Based off minimp3 (https://github.com/lieff/minimp3) which is where the real work was done. See the bottom of this file for +differences between minimp3 and dr_mp3. +*/ + +/* +USAGE +===== +dr_mp3 is a single-file library. To use it, do something like the following in one .c file. + #define DR_MP3_IMPLEMENTATION + #include "dr_mp3.h" + +You can then #include this file in other parts of the program as you would with any other header file. To decode audio data, +do something like the following: + + drmp3 mp3; + if (!drmp3_init_file(&mp3, "MySong.mp3", NULL)) { + // Failed to open file + } + + ... + + drmp3_uint64 framesRead = drmp3_read_pcm_frames_f32(pMP3, framesToRead, pFrames); + +The drmp3 object is transparent so you can get access to the channel count and sample rate like so: + + drmp3_uint32 channels = mp3.channels; + drmp3_uint32 sampleRate = mp3.sampleRate; + +The third parameter of drmp3_init_file() in the example above allows you to control the output channel count and sample rate. It +is a pointer to a drmp3_config object. Setting any of the variables of this object to 0 will cause dr_mp3 to use defaults. + +The example above initializes a decoder from a file, but you can also initialize it from a block of memory and read and seek +callbacks with drmp3_init_memory() and drmp3_init() respectively. + +You do not need to do any annoying memory management when reading PCM frames - this is all managed internally. You can request +any number of PCM frames in each call to drmp3_read_pcm_frames_f32() and it will return as many PCM frames as it can, up to the +requested amount. + +You can also decode an entire file in one go with drmp3_open_and_read_f32(), drmp3_open_memory_and_read_f32() and +drmp3_open_file_and_read_f32(). + + +OPTIONS +======= +#define these options before including this file. + +#define DR_MP3_NO_STDIO + Disable drmp3_init_file(), etc. + +#define DR_MP3_NO_SIMD + Disable SIMD optimizations. +*/ #ifndef dr_mp3_h #define dr_mp3_h @@ -90,9 +94,20 @@ typedef drmp3_uint32 drmp3_bool32; #define DRMP3_MAX_PCM_FRAMES_PER_MP3_FRAME 1152 #define DRMP3_MAX_SAMPLES_PER_FRAME (DRMP3_MAX_PCM_FRAMES_PER_MP3_FRAME*2) +#ifdef _MSC_VER +#define DRMP3_INLINE __forceinline +#else +#ifdef __GNUC__ +#define DRMP3_INLINE __inline__ __attribute__((always_inline)) +#else +#define DRMP3_INLINE +#endif +#endif -// Low Level Push API -// ================== +/* +Low Level Push API +================== +*/ typedef struct { int frame_bytes, channels, hz, layer, bitrate_kbps; @@ -105,23 +120,30 @@ typedef struct unsigned char header[4], reserv_buf[511]; } drmp3dec; -// Initializes a low level decoder. +/* Initializes a low level decoder. */ void drmp3dec_init(drmp3dec *dec); -// Reads a frame from a low level decoder. +/* Reads a frame from a low level decoder. */ int drmp3dec_decode_frame(drmp3dec *dec, const unsigned char *mp3, int mp3_bytes, void *pcm, drmp3dec_frame_info *info); -// Helper for converting between f32 and s16. +/* Helper for converting between f32 and s16. */ void drmp3dec_f32_to_s16(const float *in, drmp3_int16 *out, int num_samples); - -// Main API (Pull API) -// =================== +/* +Main API (Pull API) +=================== +*/ +#ifndef DR_MP3_DEFAULT_CHANNELS +#define DR_MP3_DEFAULT_CHANNELS 2 +#endif +#ifndef DR_MP3_DEFAULT_SAMPLE_RATE +#define DR_MP3_DEFAULT_SAMPLE_RATE 44100 +#endif typedef struct drmp3_src drmp3_src; -typedef drmp3_uint64 (* drmp3_src_read_proc)(drmp3_src* pSRC, drmp3_uint64 frameCount, void* pFramesOut, void* pUserData); // Returns the number of frames that were read. +typedef drmp3_uint64 (* drmp3_src_read_proc)(drmp3_src* pSRC, drmp3_uint64 frameCount, void* pFramesOut, void* pUserData); /* Returns the number of frames that were read. */ typedef enum { @@ -144,7 +166,7 @@ typedef struct drmp3_uint32 sampleRateOut; drmp3_uint32 channels; drmp3_src_algorithm algorithm; - drmp3_uint32 cacheSizeInFrames; // The number of frames to read from the client at a time. + drmp3_uint32 cacheSizeInFrames; /* The number of frames to read from the client at a time. */ } drmp3_src_config; struct drmp3_src @@ -153,7 +175,7 @@ struct drmp3_src drmp3_src_read_proc onRead; void* pUserData; float bin[256]; - drmp3_src_cache cache; // <-- For simplifying and optimizing client -> memory reading. + drmp3_src_cache cache; /* <-- For simplifying and optimizing client -> memory reading. */ union { struct @@ -173,34 +195,38 @@ typedef enum typedef struct { - drmp3_uint64 seekPosInBytes; // Points to the first byte of an MP3 frame. - drmp3_uint64 pcmFrameIndex; // The index of the PCM frame this seek point targets. - drmp3_uint16 mp3FramesToDiscard; // The number of whole MP3 frames to be discarded before pcmFramesToDiscard. - drmp3_uint16 pcmFramesToDiscard; // The number of leading samples to read and discard. These are discarded after mp3FramesToDiscard. + drmp3_uint64 seekPosInBytes; /* Points to the first byte of an MP3 frame. */ + drmp3_uint64 pcmFrameIndex; /* The index of the PCM frame this seek point targets. */ + drmp3_uint16 mp3FramesToDiscard; /* The number of whole MP3 frames to be discarded before pcmFramesToDiscard. */ + drmp3_uint16 pcmFramesToDiscard; /* The number of leading samples to read and discard. These are discarded after mp3FramesToDiscard. */ } drmp3_seek_point; -// Callback for when data is read. Return value is the number of bytes actually read. -// -// pUserData [in] The user data that was passed to drmp3_init(), drmp3_open() and family. -// pBufferOut [out] The output buffer. -// bytesToRead [in] The number of bytes to read. -// -// Returns the number of bytes actually read. -// -// A return value of less than bytesToRead indicates the end of the stream. Do _not_ return from this callback until -// either the entire bytesToRead is filled or you have reached the end of the stream. +/* +Callback for when data is read. Return value is the number of bytes actually read. + +pUserData [in] The user data that was passed to drmp3_init(), drmp3_open() and family. +pBufferOut [out] The output buffer. +bytesToRead [in] The number of bytes to read. + +Returns the number of bytes actually read. + +A return value of less than bytesToRead indicates the end of the stream. Do _not_ return from this callback until +either the entire bytesToRead is filled or you have reached the end of the stream. +*/ typedef size_t (* drmp3_read_proc)(void* pUserData, void* pBufferOut, size_t bytesToRead); -// Callback for when data needs to be seeked. -// -// pUserData [in] The user data that was passed to drmp3_init(), drmp3_open() and family. -// offset [in] The number of bytes to move, relative to the origin. Will never be negative. -// origin [in] The origin of the seek - the current position or the start of the stream. -// -// Returns whether or not the seek was successful. -// -// Whether or not it is relative to the beginning or current position is determined by the "origin" parameter which -// will be either drmp3_seek_origin_start or drmp3_seek_origin_current. +/* +Callback for when data needs to be seeked. + +pUserData [in] The user data that was passed to drmp3_init(), drmp3_open() and family. +offset [in] The number of bytes to move, relative to the origin. Will never be negative. +origin [in] The origin of the seek - the current position or the start of the stream. + +Returns whether or not the seek was successful. + +Whether or not it is relative to the beginning or current position is determined by the "origin" parameter which +will be either drmp3_seek_origin_start or drmp3_seek_origin_current. +*/ typedef drmp3_bool32 (* drmp3_seek_proc)(void* pUserData, int offset, drmp3_seek_origin origin); typedef struct @@ -218,16 +244,16 @@ typedef struct drmp3_read_proc onRead; drmp3_seek_proc onSeek; void* pUserData; - drmp3_uint32 mp3FrameChannels; // The number of channels in the currently loaded MP3 frame. Internal use only. - drmp3_uint32 mp3FrameSampleRate; // The sample rate of the currently loaded MP3 frame. Internal use only. + drmp3_uint32 mp3FrameChannels; /* The number of channels in the currently loaded MP3 frame. Internal use only. */ + drmp3_uint32 mp3FrameSampleRate; /* The sample rate of the currently loaded MP3 frame. Internal use only. */ drmp3_uint32 pcmFramesConsumedInMP3Frame; drmp3_uint32 pcmFramesRemainingInMP3Frame; - drmp3_uint8 pcmFrames[sizeof(float)*DRMP3_MAX_SAMPLES_PER_FRAME]; // <-- Multipled by sizeof(float) to ensure there's enough room for DR_MP3_FLOAT_OUTPUT. - drmp3_uint64 currentPCMFrame; // The current PCM frame, globally, based on the output sample rate. Mainly used for seeking. - drmp3_uint64 streamCursor; // The current byte the decoder is sitting on in the raw stream. + drmp3_uint8 pcmFrames[sizeof(float)*DRMP3_MAX_SAMPLES_PER_FRAME]; /* <-- Multipled by sizeof(float) to ensure there's enough room for DR_MP3_FLOAT_OUTPUT. */ + drmp3_uint64 currentPCMFrame; /* The current PCM frame, globally, based on the output sample rate. Mainly used for seeking. */ + drmp3_uint64 streamCursor; /* The current byte the decoder is sitting on in the raw stream. */ drmp3_src src; - drmp3_seek_point* pSeekPoints; // NULL by default. Set with drmp3_bind_seek_table(). Memory is owned by the client. dr_mp3 will never attempt to free this pointer. - drmp3_uint32 seekPointCount; // The number of items in pSeekPoints. When set to 0 assumes to no seek table. Defaults to zero. + drmp3_seek_point* pSeekPoints; /* NULL by default. Set with drmp3_bind_seek_table(). Memory is owned by the client. dr_mp3 will never attempt to free this pointer. */ + drmp3_uint32 seekPointCount; /* The number of items in pSeekPoints. When set to 0 assumes to no seek table. Defaults to zero. */ size_t dataSize; size_t dataCapacity; drmp3_uint8* pData; @@ -237,111 +263,155 @@ typedef struct const drmp3_uint8* pData; size_t dataSize; size_t currentReadPos; - } memory; // Only used for decoders that were opened against a block of memory. + } memory; /* Only used for decoders that were opened against a block of memory. */ } drmp3; -// Initializes an MP3 decoder. -// -// onRead [in] The function to call when data needs to be read from the client. -// onSeek [in] The function to call when the read position of the client data needs to move. -// pUserData [in, optional] A pointer to application defined data that will be passed to onRead and onSeek. -// -// Returns true if successful; false otherwise. -// -// Close the loader with drmp3_uninit(). -// -// See also: drmp3_init_file(), drmp3_init_memory(), drmp3_uninit() +/* +Initializes an MP3 decoder. + +onRead [in] The function to call when data needs to be read from the client. +onSeek [in] The function to call when the read position of the client data needs to move. +pUserData [in, optional] A pointer to application defined data that will be passed to onRead and onSeek. + +Returns true if successful; false otherwise. + +Close the loader with drmp3_uninit(). + +See also: drmp3_init_file(), drmp3_init_memory(), drmp3_uninit() +*/ drmp3_bool32 drmp3_init(drmp3* pMP3, drmp3_read_proc onRead, drmp3_seek_proc onSeek, void* pUserData, const drmp3_config* pConfig); -// Initializes an MP3 decoder from a block of memory. -// -// This does not create a copy of the data. It is up to the application to ensure the buffer remains valid for -// the lifetime of the drmp3 object. -// -// The buffer should contain the contents of the entire MP3 file. +/* +Initializes an MP3 decoder from a block of memory. + +This does not create a copy of the data. It is up to the application to ensure the buffer remains valid for +the lifetime of the drmp3 object. + +The buffer should contain the contents of the entire MP3 file. +*/ drmp3_bool32 drmp3_init_memory(drmp3* pMP3, const void* pData, size_t dataSize, const drmp3_config* pConfig); #ifndef DR_MP3_NO_STDIO -// Initializes an MP3 decoder from a file. -// -// This holds the internal FILE object until drmp3_uninit() is called. Keep this in mind if you're caching drmp3 -// objects because the operating system may restrict the number of file handles an application can have open at -// any given time. +/* +Initializes an MP3 decoder from a file. + +This holds the internal FILE object until drmp3_uninit() is called. Keep this in mind if you're caching drmp3 +objects because the operating system may restrict the number of file handles an application can have open at +any given time. +*/ drmp3_bool32 drmp3_init_file(drmp3* pMP3, const char* filePath, const drmp3_config* pConfig); #endif -// Uninitializes an MP3 decoder. +/* +Uninitializes an MP3 decoder. +*/ void drmp3_uninit(drmp3* pMP3); -// Reads PCM frames as interleaved 32-bit IEEE floating point PCM. -// -// Note that framesToRead specifies the number of PCM frames to read, _not_ the number of MP3 frames. +/* +Reads PCM frames as interleaved 32-bit IEEE floating point PCM. + +Note that framesToRead specifies the number of PCM frames to read, _not_ the number of MP3 frames. +*/ drmp3_uint64 drmp3_read_pcm_frames_f32(drmp3* pMP3, drmp3_uint64 framesToRead, float* pBufferOut); -// Seeks to a specific frame. -// -// Note that this is _not_ an MP3 frame, but rather a PCM frame. +/* +Reads PCM frames as interleaved signed 16-bit integer PCM. + +Note that framesToRead specifies the number of PCM frames to read, _not_ the number of MP3 frames. +*/ +drmp3_uint64 drmp3_read_pcm_frames_s16(drmp3* pMP3, drmp3_uint64 framesToRead, drmp3_int16* pBufferOut); + +/* +Seeks to a specific frame. + +Note that this is _not_ an MP3 frame, but rather a PCM frame. +*/ drmp3_bool32 drmp3_seek_to_pcm_frame(drmp3* pMP3, drmp3_uint64 frameIndex); -// Calculates the total number of PCM frames in the MP3 stream. Cannot be used for infinite streams such as internet -// radio. Runs in linear time. Returns 0 on error. +/* +Calculates the total number of PCM frames in the MP3 stream. Cannot be used for infinite streams such as internet +radio. Runs in linear time. Returns 0 on error. +*/ drmp3_uint64 drmp3_get_pcm_frame_count(drmp3* pMP3); -// Calculates the total number of MP3 frames in the MP3 stream. Cannot be used for infinite streams such as internet -// radio. Runs in linear time. Returns 0 on error. +/* +Calculates the total number of MP3 frames in the MP3 stream. Cannot be used for infinite streams such as internet +radio. Runs in linear time. Returns 0 on error. +*/ drmp3_uint64 drmp3_get_mp3_frame_count(drmp3* pMP3); -// Calculates the seekpoints based on PCM frames. This is slow. -// -// pSeekpoint count is a pointer to a uint32 containing the seekpoint count. On input it contains the desired count. -// On output it contains the actual count. The reason for this design is that the client may request too many -// seekpoints, in which case dr_mp3 will return a corrected count. -// -// Note that seektable seeking is not quite sample exact when the MP3 stream contains inconsistent sample rates. +/* +Calculates the total number of MP3 and PCM frames in the MP3 stream. Cannot be used for infinite streams such as internet +radio. Runs in linear time. Returns 0 on error. + +This is equivalent to calling drmp3_get_mp3_frame_count() and drmp3_get_pcm_frame_count() except that it's more efficient. +*/ +drmp3_bool32 drmp3_get_mp3_and_pcm_frame_count(drmp3* pMP3, drmp3_uint64* pMP3FrameCount, drmp3_uint64* pPCMFrameCount); + +/* +Calculates the seekpoints based on PCM frames. This is slow. + +pSeekpoint count is a pointer to a uint32 containing the seekpoint count. On input it contains the desired count. +On output it contains the actual count. The reason for this design is that the client may request too many +seekpoints, in which case dr_mp3 will return a corrected count. + +Note that seektable seeking is not quite sample exact when the MP3 stream contains inconsistent sample rates. +*/ drmp3_bool32 drmp3_calculate_seek_points(drmp3* pMP3, drmp3_uint32* pSeekPointCount, drmp3_seek_point* pSeekPoints); -// Binds a seek table to the decoder. -// -// This does _not_ make a copy of pSeekPoints - it only references it. It is up to the application to ensure this -// remains valid while it is bound to the decoder. -// -// Use drmp3_calculate_seek_points() to calculate the seek points. +/* +Binds a seek table to the decoder. + +This does _not_ make a copy of pSeekPoints - it only references it. It is up to the application to ensure this +remains valid while it is bound to the decoder. + +Use drmp3_calculate_seek_points() to calculate the seek points. +*/ drmp3_bool32 drmp3_bind_seek_table(drmp3* pMP3, drmp3_uint32 seekPointCount, drmp3_seek_point* pSeekPoints); +/* +Opens an decodes an entire MP3 stream as a single operation. -// Opens an decodes an entire MP3 stream as a single operation. -// -// pConfig is both an input and output. On input it contains what you want. On output it contains what you got. -// -// Free the returned pointer with drmp3_free(). +pConfig is both an input and output. On input it contains what you want. On output it contains what you got. + +Free the returned pointer with drmp3_free(). +*/ float* drmp3_open_and_read_f32(drmp3_read_proc onRead, drmp3_seek_proc onSeek, void* pUserData, drmp3_config* pConfig, drmp3_uint64* pTotalFrameCount); +drmp3_int16* drmp3_open_and_read_s16(drmp3_read_proc onRead, drmp3_seek_proc onSeek, void* pUserData, drmp3_config* pConfig, drmp3_uint64* pTotalFrameCount); + float* drmp3_open_memory_and_read_f32(const void* pData, size_t dataSize, drmp3_config* pConfig, drmp3_uint64* pTotalFrameCount); +drmp3_int16* drmp3_open_memory_and_read_s16(const void* pData, size_t dataSize, drmp3_config* pConfig, drmp3_uint64* pTotalFrameCount); + #ifndef DR_MP3_NO_STDIO float* drmp3_open_file_and_read_f32(const char* filePath, drmp3_config* pConfig, drmp3_uint64* pTotalFrameCount); +drmp3_int16* drmp3_open_file_and_read_s16(const char* filePath, drmp3_config* pConfig, drmp3_uint64* pTotalFrameCount); #endif -// Frees any memory that was allocated by a public drmp3 API. +/* +Frees any memory that was allocated by a public drmp3 API. +*/ void drmp3_free(void* p); #ifdef __cplusplus } #endif -#endif // dr_mp3_h +#endif /* dr_mp3_h */ -///////////////////////////////////////////////////// -// -// IMPLEMENTATION -// -///////////////////////////////////////////////////// +/************************************************************************************************************************************************************ + ************************************************************************************************************************************************************ + + IMPLEMENTATION + + ************************************************************************************************************************************************************ + ************************************************************************************************************************************************************/ #ifdef DR_MP3_IMPLEMENTATION #include #include -#include -#include // For INT_MAX +#include /* For INT_MAX */ -// Disable SIMD when compiling with TCC for now. +/* Disable SIMD when compiling with TCC for now. */ #if defined(__TINYC__) #define DR_MP3_NO_SIMD #endif @@ -393,7 +463,7 @@ void drmp3_free(void* p); #define DR_MP3_ONLY_SIMD #endif -#if (defined(_MSC_VER) && (defined(_M_IX86) || defined(_M_X64))) || ((defined(__i386__) || defined(__x86_64__)) && defined(__SSE2__)) +#if ((defined(_MSC_VER) && _MSC_VER >= 1400) && (defined(_M_IX86) || defined(_M_X64))) || ((defined(__i386__) || defined(__x86_64__)) && defined(__SSE2__)) #if defined(_MSC_VER) #include #endif @@ -808,8 +878,8 @@ static int drmp3_L3_read_side_info(drmp3_bs *bs, drmp3_L3_gr_info *gr, const drm unsigned tables, scfsi = 0; int main_data_begin, part_23_sum = 0; - int sr_idx = DRMP3_HDR_GET_MY_SAMPLE_RATE(hdr); sr_idx -= (sr_idx != 0); int gr_count = DRMP3_HDR_IS_MONO(hdr) ? 1 : 2; + int sr_idx = DRMP3_HDR_GET_MY_SAMPLE_RATE(hdr); sr_idx -= (sr_idx != 0); if (DRMP3_HDR_TEST_MPEG1(hdr)) { @@ -1098,7 +1168,7 @@ static void drmp3_L3_huffman(float *dst, drmp3_bs *bs, const drmp3_L3_gr_info *g lsb += DRMP3_PEEK_BITS(linbits); DRMP3_FLUSH_BITS(linbits); DRMP3_CHECK_BITS; - *dst = one*drmp3_L3_pow_43(lsb)*((int32_t)bs_cache < 0 ? -1: 1); + *dst = one*drmp3_L3_pow_43(lsb)*((drmp3_int32)bs_cache < 0 ? -1: 1); } else { *dst = g_drmp3_pow43[16 + lsb - 16*(bs_cache >> 31)]*one; @@ -1682,9 +1752,10 @@ typedef drmp3_int16 drmp3d_sample_t; static drmp3_int16 drmp3d_scale_pcm(float sample) { + drmp3_int16 s; if (sample >= 32766.5) return (drmp3_int16) 32767; if (sample <= -32767.5) return (drmp3_int16)-32768; - drmp3_int16 s = (drmp3_int16)(sample + .5f); + s = (drmp3_int16)(sample + .5f); s -= (s < 0); /* away from zero, to be compliant */ return (drmp3_int16)s; } @@ -2022,11 +2093,12 @@ int drmp3dec_decode_frame(drmp3dec *dec, const unsigned char *mp3, int mp3_bytes #ifdef DR_MP3_ONLY_MP3 return 0; #else + drmp3_L12_scale_info sci[1]; + if (pcm == NULL) { return drmp3_hdr_frame_samples(hdr); } - drmp3_L12_scale_info sci[1]; drmp3_L12_read_scale_info(hdr, bs_frame, sci); memset(scratch.grbuf[0], 0, 576*2*sizeof(float)); @@ -2113,11 +2185,11 @@ void drmp3dec_f32_to_s16(const float *in, drmp3_int16 *out, int num_samples) -/////////////////////////////////////////////////////////////////////////////// -// -// Main Public API -// -/////////////////////////////////////////////////////////////////////////////// +/************************************************************************************************************************************************************ + + Main Public API + + ************************************************************************************************************************************************************/ #if defined(SIZE_MAX) #define DRMP3_SIZE_MAX SIZE_MAX @@ -2129,19 +2201,13 @@ void drmp3dec_f32_to_s16(const float *in, drmp3_int16 *out, int num_samples) #endif #endif -// Options. -#ifndef DR_MP3_DEFAULT_CHANNELS -#define DR_MP3_DEFAULT_CHANNELS 2 -#endif -#ifndef DR_MP3_DEFAULT_SAMPLE_RATE -#define DR_MP3_DEFAULT_SAMPLE_RATE 44100 -#endif +/* Options. */ #ifndef DRMP3_SEEK_LEADING_MP3_FRAMES #define DRMP3_SEEK_LEADING_MP3_FRAMES 2 #endif -// Standard library stuff. +/* Standard library stuff. */ #ifndef DRMP3_ASSERT #include #define DRMP3_ASSERT(expression) assert(expression) @@ -2174,16 +2240,17 @@ void drmp3dec_f32_to_s16(const float *in, drmp3_int16 *out, int num_samples) #define drmp3_max(x, y) (((x) > (y)) ? (x) : (y)) #define drmp3_min(x, y) (((x) < (y)) ? (x) : (y)) -#define DRMP3_DATA_CHUNK_SIZE 16384 // The size in bytes of each chunk of data to read from the MP3 stream. minimp3 recommends 16K. +#define DRMP3_DATA_CHUNK_SIZE 16384 /* The size in bytes of each chunk of data to read from the MP3 stream. minimp3 recommends 16K. */ -static inline float drmp3_mix_f32(float x, float y, float a) +static DRMP3_INLINE float drmp3_mix_f32(float x, float y, float a) { return x*(1-a) + y*a; } static void drmp3_blend_f32(float* pOut, float* pInA, float* pInB, float factor, drmp3_uint32 channels) { - for (drmp3_uint32 i = 0; i < channels; ++i) { + drmp3_uint32 i; + for (i = 0; i < channels; ++i) { pOut[i] = drmp3_mix_f32(pInA[i], pInB[i], factor); } } @@ -2200,17 +2267,20 @@ void drmp3_src_cache_init(drmp3_src* pSRC, drmp3_src_cache* pCache) drmp3_uint64 drmp3_src_cache_read_frames(drmp3_src_cache* pCache, drmp3_uint64 frameCount, float* pFramesOut) { + drmp3_uint32 channels; + drmp3_uint64 totalFramesRead = 0; + drmp3_assert(pCache != NULL); drmp3_assert(pCache->pSRC != NULL); drmp3_assert(pCache->pSRC->onRead != NULL); drmp3_assert(frameCount > 0); drmp3_assert(pFramesOut != NULL); - drmp3_uint32 channels = pCache->pSRC->config.channels; + channels = pCache->pSRC->config.channels; - drmp3_uint64 totalFramesRead = 0; while (frameCount > 0) { - // If there's anything in memory go ahead and copy that over first. + /* If there's anything in memory go ahead and copy that over first. */ + drmp3_uint32 framesToReadFromClient; drmp3_uint64 framesRemainingInMemory = pCache->cachedFrameCount - pCache->iNextFrame; drmp3_uint64 framesToReadFromMemory = frameCount; if (framesToReadFromMemory > framesRemainingInMemory) { @@ -2227,14 +2297,14 @@ drmp3_uint64 drmp3_src_cache_read_frames(drmp3_src_cache* pCache, drmp3_uint64 f } - // At this point there are still more frames to read from the client, so we'll need to reload the cache with fresh data. + /* At this point there are still more frames to read from the client, so we'll need to reload the cache with fresh data. */ drmp3_assert(frameCount > 0); pFramesOut += framesToReadFromMemory * channels; pCache->iNextFrame = 0; pCache->cachedFrameCount = 0; - drmp3_uint32 framesToReadFromClient = drmp3_countof(pCache->pCachedFrames) / pCache->pSRC->config.channels; + framesToReadFromClient = drmp3_countof(pCache->pCachedFrames) / pCache->pSRC->config.channels; if (framesToReadFromClient > pCache->pSRC->config.cacheSizeInFrames) { framesToReadFromClient = pCache->pSRC->config.cacheSizeInFrames; } @@ -2242,7 +2312,7 @@ drmp3_uint64 drmp3_src_cache_read_frames(drmp3_src_cache* pCache, drmp3_uint64 f pCache->cachedFrameCount = (drmp3_uint32)pCache->pSRC->onRead(pCache->pSRC, framesToReadFromClient, pCache->pCachedFrames, pCache->pSRC->pUserData); - // Get out of this loop if nothing was able to be retrieved. + /* Get out of this loop if nothing was able to be retrieved. */ if (pCache->cachedFrameCount == 0) { break; } @@ -2257,11 +2327,19 @@ drmp3_uint64 drmp3_src_read_frames_linear(drmp3_src* pSRC, drmp3_uint64 frameCou drmp3_bool32 drmp3_src_init(const drmp3_src_config* pConfig, drmp3_src_read_proc onRead, void* pUserData, drmp3_src* pSRC) { - if (pSRC == NULL) return DRMP3_FALSE; + if (pSRC == NULL) { + return DRMP3_FALSE; + } + drmp3_zero_object(pSRC); - if (pConfig == NULL || onRead == NULL) return DRMP3_FALSE; - if (pConfig->channels == 0 || pConfig->channels > 2) return DRMP3_FALSE; + if (pConfig == NULL || onRead == NULL) { + return DRMP3_FALSE; + } + + if (pConfig->channels == 0 || pConfig->channels > 2) { + return DRMP3_FALSE; + } pSRC->config = *pConfig; pSRC->onRead = onRead; @@ -2277,9 +2355,11 @@ drmp3_bool32 drmp3_src_init(const drmp3_src_config* pConfig, drmp3_src_read_proc drmp3_bool32 drmp3_src_set_input_sample_rate(drmp3_src* pSRC, drmp3_uint32 sampleRateIn) { - if (pSRC == NULL) return DRMP3_FALSE; + if (pSRC == NULL) { + return DRMP3_FALSE; + } - // Must have a sample rate of > 0. + /* Must have a sample rate of > 0. */ if (sampleRateIn == 0) { return DRMP3_FALSE; } @@ -2290,9 +2370,11 @@ drmp3_bool32 drmp3_src_set_input_sample_rate(drmp3_src* pSRC, drmp3_uint32 sampl drmp3_bool32 drmp3_src_set_output_sample_rate(drmp3_src* pSRC, drmp3_uint32 sampleRateOut) { - if (pSRC == NULL) return DRMP3_FALSE; + if (pSRC == NULL) { + return DRMP3_FALSE; + } - // Must have a sample rate of > 0. + /* Must have a sample rate of > 0. */ if (sampleRateOut == 0) { return DRMP3_FALSE; } @@ -2303,16 +2385,20 @@ drmp3_bool32 drmp3_src_set_output_sample_rate(drmp3_src* pSRC, drmp3_uint32 samp drmp3_uint64 drmp3_src_read_frames_ex(drmp3_src* pSRC, drmp3_uint64 frameCount, void* pFramesOut, drmp3_bool32 flush) { - if (pSRC == NULL || frameCount == 0 || pFramesOut == NULL) return 0; + drmp3_src_algorithm algorithm; - drmp3_src_algorithm algorithm = pSRC->config.algorithm; + if (pSRC == NULL || frameCount == 0 || pFramesOut == NULL) { + return 0; + } - // Always use passthrough if the sample rates are the same. + algorithm = pSRC->config.algorithm; + + /* Always use passthrough if the sample rates are the same. */ if (pSRC->config.sampleRateIn == pSRC->config.sampleRateOut) { algorithm = drmp3_src_algorithm_none; } - // Could just use a function pointer instead of a switch for this... + /* Could just use a function pointer instead of a switch for this... */ switch (algorithm) { case drmp3_src_algorithm_none: return drmp3_src_read_frames_passthrough(pSRC, frameCount, pFramesOut, flush); @@ -2332,19 +2418,22 @@ drmp3_uint64 drmp3_src_read_frames_passthrough(drmp3_src* pSRC, drmp3_uint64 fra drmp3_assert(frameCount > 0); drmp3_assert(pFramesOut != NULL); - (void)flush; // Passthrough need not care about flushing. + (void)flush; /* Passthrough need not care about flushing. */ return pSRC->onRead(pSRC, frameCount, pFramesOut, pSRC->pUserData); } drmp3_uint64 drmp3_src_read_frames_linear(drmp3_src* pSRC, drmp3_uint64 frameCount, void* pFramesOut, drmp3_bool32 flush) { + double factor; + drmp3_uint64 totalFramesRead; + drmp3_assert(pSRC != NULL); drmp3_assert(frameCount > 0); drmp3_assert(pFramesOut != NULL); - // For linear SRC, the bin is only 2 frames: 1 prior, 1 future. + /* For linear SRC, the bin is only 2 frames: 1 prior, 1 future. */ - // Load the bin if necessary. + /* Load the bin if necessary. */ if (!pSRC->algo.linear.isPrevFramesLoaded) { drmp3_uint64 framesRead = drmp3_src_cache_read_frames(&pSRC->cache, 1, pSRC->bin); if (framesRead == 0) { @@ -2360,11 +2449,14 @@ drmp3_uint64 drmp3_src_read_frames_linear(drmp3_src* pSRC, drmp3_uint64 frameCou pSRC->algo.linear.isNextFramesLoaded = DRMP3_TRUE; } - double factor = (double)pSRC->config.sampleRateIn / pSRC->config.sampleRateOut; + factor = (double)pSRC->config.sampleRateIn / pSRC->config.sampleRateOut; - drmp3_uint64 totalFramesRead = 0; + totalFramesRead = 0; while (frameCount > 0) { - // The bin is where the previous and next frames are located. + drmp3_uint32 i; + drmp3_uint32 framesToReadFromClient; + + /* The bin is where the previous and next frames are located. */ float* pPrevFrame = pSRC->bin; float* pNextFrame = pSRC->bin + pSRC->config.channels; @@ -2372,19 +2464,23 @@ drmp3_uint64 drmp3_src_read_frames_linear(drmp3_src* pSRC, drmp3_uint64 frameCou pSRC->algo.linear.alpha += factor; - // The new alpha value is how we determine whether or not we need to read fresh frames. - drmp3_uint32 framesToReadFromClient = (drmp3_uint32)pSRC->algo.linear.alpha; + /* The new alpha value is how we determine whether or not we need to read fresh frames. */ + framesToReadFromClient = (drmp3_uint32)pSRC->algo.linear.alpha; pSRC->algo.linear.alpha = pSRC->algo.linear.alpha - framesToReadFromClient; - for (drmp3_uint32 i = 0; i < framesToReadFromClient; ++i) { - for (drmp3_uint32 j = 0; j < pSRC->config.channels; ++j) { + for (i = 0; i < framesToReadFromClient; ++i) { + drmp3_uint64 framesRead; + drmp3_uint32 j; + + for (j = 0; j < pSRC->config.channels; ++j) { pPrevFrame[j] = pNextFrame[j]; } - drmp3_uint64 framesRead = drmp3_src_cache_read_frames(&pSRC->cache, 1, pNextFrame); + framesRead = drmp3_src_cache_read_frames(&pSRC->cache, 1, pNextFrame); if (framesRead == 0) { - for (drmp3_uint32 j = 0; j < pSRC->config.channels; ++j) { - pNextFrame[j] = 0; + drmp3_uint32 k; + for (k = 0; k < pSRC->config.channels; ++k) { + pNextFrame[k] = 0; } if (pSRC->algo.linear.isNextFramesLoaded) { @@ -2403,7 +2499,7 @@ drmp3_uint64 drmp3_src_read_frames_linear(drmp3_src* pSRC, drmp3_uint64 frameCou frameCount -= 1; totalFramesRead += 1; - // If there's no frames available we need to get out of this loop. + /* If there's no frames available we need to get out of this loop. */ if (!pSRC->algo.linear.isNextFramesLoaded && (!flush || !pSRC->algo.linear.isPrevFramesLoaded)) { break; } @@ -2444,7 +2540,7 @@ static drmp3_bool32 drmp3__on_seek_64(drmp3* pMP3, drmp3_uint64 offset, drmp3_se } - // Getting here "offset" is too large for a 32-bit integer. We just keep seeking forward until we hit the offset. + /* Getting here "offset" is too large for a 32-bit integer. We just keep seeking forward until we hit the offset. */ if (!drmp3__on_seek(pMP3, 0x7FFFFFFF, drmp3_seek_origin_start)) { return DRMP3_FALSE; } @@ -2467,152 +2563,41 @@ static drmp3_bool32 drmp3__on_seek_64(drmp3* pMP3, drmp3_uint64 offset, drmp3_se return DRMP3_TRUE; } - - - -static drmp3_uint32 drmp3_decode_next_frame_ex(drmp3* pMP3, drmp3d_sample_t* pPCMFrames, drmp3_bool32 discard) -{ - drmp3_assert(pMP3 != NULL); - drmp3_assert(pMP3->onRead != NULL); - - if (pMP3->atEnd) { - return 0; - } - - drmp3_uint32 pcmFramesRead = 0; - do { - // minimp3 recommends doing data submission in 16K chunks. If we don't have at least 16K bytes available, get more. - if (pMP3->dataSize < DRMP3_DATA_CHUNK_SIZE) { - if (pMP3->dataCapacity < DRMP3_DATA_CHUNK_SIZE) { - pMP3->dataCapacity = DRMP3_DATA_CHUNK_SIZE; - drmp3_uint8* pNewData = (drmp3_uint8*)drmp3_realloc(pMP3->pData, pMP3->dataCapacity); - if (pNewData == NULL) { - return 0; // Out of memory. - } - - pMP3->pData = pNewData; - } - - size_t bytesRead = drmp3__on_read(pMP3, pMP3->pData + pMP3->dataSize, (pMP3->dataCapacity - pMP3->dataSize)); - if (bytesRead == 0) { - if (pMP3->dataSize == 0) { - pMP3->atEnd = DRMP3_TRUE; - return 0; // No data. - } - } - - pMP3->dataSize += bytesRead; - } - - if (pMP3->dataSize > INT_MAX) { - pMP3->atEnd = DRMP3_TRUE; - return 0; // File too big. - } - - drmp3dec_frame_info info; - pcmFramesRead = drmp3dec_decode_frame(&pMP3->decoder, pMP3->pData, (int)pMP3->dataSize, pPCMFrames, &info); // <-- Safe size_t -> int conversion thanks to the check above. - - // Consume the data. - size_t leftoverDataSize = (pMP3->dataSize - (size_t)info.frame_bytes); - if (info.frame_bytes > 0) { - memmove(pMP3->pData, pMP3->pData + info.frame_bytes, leftoverDataSize); - pMP3->dataSize = leftoverDataSize; - } - - // pcmFramesRead will be equal to 0 if decoding failed. If it is zero and info.frame_bytes > 0 then we have successfully - // decoded the frame. A special case is if we are wanting to discard the frame, in which case we return successfully. - if (pcmFramesRead > 0 || (info.frame_bytes > 0 && discard)) { - pcmFramesRead = drmp3_hdr_frame_samples(pMP3->decoder.header); - pMP3->pcmFramesConsumedInMP3Frame = 0; - pMP3->pcmFramesRemainingInMP3Frame = pcmFramesRead; - pMP3->mp3FrameChannels = info.channels; - pMP3->mp3FrameSampleRate = info.hz; - drmp3_src_set_input_sample_rate(&pMP3->src, pMP3->mp3FrameSampleRate); - break; - } else if (info.frame_bytes == 0) { - // Need more data. minimp3 recommends doing data submission in 16K chunks. - if (pMP3->dataCapacity == pMP3->dataSize) { - // No room. Expand. - pMP3->dataCapacity += DRMP3_DATA_CHUNK_SIZE; - drmp3_uint8* pNewData = (drmp3_uint8*)drmp3_realloc(pMP3->pData, pMP3->dataCapacity); - if (pNewData == NULL) { - return 0; // Out of memory. - } - - pMP3->pData = pNewData; - } - - // Fill in a chunk. - size_t bytesRead = drmp3__on_read(pMP3, pMP3->pData + pMP3->dataSize, (pMP3->dataCapacity - pMP3->dataSize)); - if (bytesRead == 0) { - pMP3->atEnd = DRMP3_TRUE; - return 0; // Error reading more data. - } - - pMP3->dataSize += bytesRead; - } - } while (DRMP3_TRUE); - - return pcmFramesRead; -} - -static drmp3_uint32 drmp3_decode_next_frame(drmp3* pMP3) -{ - drmp3_assert(pMP3 != NULL); - return drmp3_decode_next_frame_ex(pMP3, (drmp3d_sample_t*)pMP3->pcmFrames, DRMP3_FALSE); -} - -#if 0 -static drmp3_uint32 drmp3_seek_next_frame(drmp3* pMP3) -{ - drmp3_assert(pMP3 != NULL); - - drmp3_uint32 pcmFrameCount = drmp3_decode_next_frame_ex(pMP3, NULL); - if (pcmFrameCount == 0) { - return 0; - } - - // We have essentially just skipped past the frame, so just set the remaining samples to 0. - pMP3->currentPCMFrame += pcmFrameCount; - pMP3->pcmFramesConsumedInMP3Frame = pcmFrameCount; - pMP3->pcmFramesRemainingInMP3Frame = 0; - - return pcmFrameCount; -} -#endif +static drmp3_uint32 drmp3_decode_next_frame_ex(drmp3* pMP3, drmp3d_sample_t* pPCMFrames, drmp3_bool32 discard); +static drmp3_uint32 drmp3_decode_next_frame(drmp3* pMP3); static drmp3_uint64 drmp3_read_src(drmp3_src* pSRC, drmp3_uint64 frameCount, void* pFramesOut, void* pUserData) { drmp3* pMP3 = (drmp3*)pUserData; - drmp3_assert(pMP3 != NULL); - drmp3_assert(pMP3->onRead != NULL); - float* pFramesOutF = (float*)pFramesOut; drmp3_uint64 totalFramesRead = 0; + drmp3_assert(pMP3 != NULL); + drmp3_assert(pMP3->onRead != NULL); + while (frameCount > 0) { - // Read from the in-memory buffer first. + /* Read from the in-memory buffer first. */ while (pMP3->pcmFramesRemainingInMP3Frame > 0 && frameCount > 0) { drmp3d_sample_t* frames = (drmp3d_sample_t*)pMP3->pcmFrames; #ifndef DR_MP3_FLOAT_OUTPUT if (pMP3->mp3FrameChannels == 1) { if (pMP3->channels == 1) { - // Mono -> Mono. + /* Mono -> Mono. */ pFramesOutF[0] = frames[pMP3->pcmFramesConsumedInMP3Frame] / 32768.0f; } else { - // Mono -> Stereo. + /* Mono -> Stereo. */ pFramesOutF[0] = frames[pMP3->pcmFramesConsumedInMP3Frame] / 32768.0f; pFramesOutF[1] = frames[pMP3->pcmFramesConsumedInMP3Frame] / 32768.0f; } } else { if (pMP3->channels == 1) { - // Stereo -> Mono + /* Stereo -> Mono */ float sample = 0; sample += frames[(pMP3->pcmFramesConsumedInMP3Frame*pMP3->mp3FrameChannels)+0] / 32768.0f; sample += frames[(pMP3->pcmFramesConsumedInMP3Frame*pMP3->mp3FrameChannels)+1] / 32768.0f; pFramesOutF[0] = sample * 0.5f; } else { - // Stereo -> Stereo + /* Stereo -> Stereo */ pFramesOutF[0] = frames[(pMP3->pcmFramesConsumedInMP3Frame*pMP3->mp3FrameChannels)+0] / 32768.0f; pFramesOutF[1] = frames[(pMP3->pcmFramesConsumedInMP3Frame*pMP3->mp3FrameChannels)+1] / 32768.0f; } @@ -2620,22 +2605,22 @@ static drmp3_uint64 drmp3_read_src(drmp3_src* pSRC, drmp3_uint64 frameCount, voi #else if (pMP3->mp3FrameChannels == 1) { if (pMP3->channels == 1) { - // Mono -> Mono. + /* Mono -> Mono. */ pFramesOutF[0] = frames[pMP3->pcmFramesConsumedInMP3Frame]; } else { - // Mono -> Stereo. + /* Mono -> Stereo. */ pFramesOutF[0] = frames[pMP3->pcmFramesConsumedInMP3Frame]; pFramesOutF[1] = frames[pMP3->pcmFramesConsumedInMP3Frame]; } } else { if (pMP3->channels == 1) { - // Stereo -> Mono + /* Stereo -> Mono */ float sample = 0; sample += frames[(pMP3->pcmFramesConsumedInMP3Frame*pMP3->mp3FrameChannels)+0]; sample += frames[(pMP3->pcmFramesConsumedInMP3Frame*pMP3->mp3FrameChannels)+1]; pFramesOutF[0] = sample * 0.5f; } else { - // Stereo -> Stereo + /* Stereo -> Stereo */ pFramesOutF[0] = frames[(pMP3->pcmFramesConsumedInMP3Frame*pMP3->mp3FrameChannels)+0]; pFramesOutF[1] = frames[(pMP3->pcmFramesConsumedInMP3Frame*pMP3->mp3FrameChannels)+1]; } @@ -2655,8 +2640,10 @@ static drmp3_uint64 drmp3_read_src(drmp3_src* pSRC, drmp3_uint64 frameCount, voi drmp3_assert(pMP3->pcmFramesRemainingInMP3Frame == 0); - // At this point we have exhausted our in-memory buffer so we need to re-fill. Note that the sample rate may have changed - // at this point which means we'll also need to update our sample rate conversion pipeline. + /* + At this point we have exhausted our in-memory buffer so we need to re-fill. Note that the sample rate may have changed + at this point which means we'll also need to update our sample rate conversion pipeline. + */ if (drmp3_decode_next_frame(pMP3) == 0) { break; } @@ -2665,42 +2652,8 @@ static drmp3_uint64 drmp3_read_src(drmp3_src* pSRC, drmp3_uint64 frameCount, voi return totalFramesRead; } -drmp3_bool32 drmp3_init_internal(drmp3* pMP3, drmp3_read_proc onRead, drmp3_seek_proc onSeek, void* pUserData, const drmp3_config* pConfig) +static drmp3_bool32 drmp3_init_src(drmp3* pMP3) { - drmp3_assert(pMP3 != NULL); - drmp3_assert(onRead != NULL); - - // This function assumes the output object has already been reset to 0. Do not do that here, otherwise things will break. - drmp3dec_init(&pMP3->decoder); - - // The config can be null in which case we use defaults. - drmp3_config config; - if (pConfig != NULL) { - config = *pConfig; - } else { - drmp3_zero_object(&config); - } - - pMP3->channels = config.outputChannels; - if (pMP3->channels == 0) { - pMP3->channels = DR_MP3_DEFAULT_CHANNELS; - } - - // Cannot have more than 2 channels. - if (pMP3->channels > 2) { - pMP3->channels = 2; - } - - pMP3->sampleRate = config.outputSampleRate; - if (pMP3->sampleRate == 0) { - pMP3->sampleRate = DR_MP3_DEFAULT_SAMPLE_RATE; - } - - pMP3->onRead = onRead; - pMP3->onSeek = onSeek; - pMP3->pUserData = pUserData; - - // We need a sample rate converter for converting the sample rate from the MP3 frames to the requested output sample rate. drmp3_src_config srcConfig; drmp3_zero_object(&srcConfig); srcConfig.sampleRateIn = DR_MP3_DEFAULT_SAMPLE_RATE; @@ -2711,11 +2664,190 @@ drmp3_bool32 drmp3_init_internal(drmp3* pMP3, drmp3_read_proc onRead, drmp3_seek drmp3_uninit(pMP3); return DRMP3_FALSE; } + + return DRMP3_TRUE; +} + +static drmp3_uint32 drmp3_decode_next_frame_ex(drmp3* pMP3, drmp3d_sample_t* pPCMFrames, drmp3_bool32 discard) +{ + drmp3_uint32 pcmFramesRead = 0; + + drmp3_assert(pMP3 != NULL); + drmp3_assert(pMP3->onRead != NULL); + + if (pMP3->atEnd) { + return 0; + } + + do { + drmp3dec_frame_info info; + size_t leftoverDataSize; + + /* minimp3 recommends doing data submission in 16K chunks. If we don't have at least 16K bytes available, get more. */ + if (pMP3->dataSize < DRMP3_DATA_CHUNK_SIZE) { + size_t bytesRead; + + if (pMP3->dataCapacity < DRMP3_DATA_CHUNK_SIZE) { + drmp3_uint8* pNewData; + + pMP3->dataCapacity = DRMP3_DATA_CHUNK_SIZE; + pNewData = (drmp3_uint8*)drmp3_realloc(pMP3->pData, pMP3->dataCapacity); + if (pNewData == NULL) { + return 0; /* Out of memory. */ + } + + pMP3->pData = pNewData; + } + + bytesRead = drmp3__on_read(pMP3, pMP3->pData + pMP3->dataSize, (pMP3->dataCapacity - pMP3->dataSize)); + if (bytesRead == 0) { + if (pMP3->dataSize == 0) { + pMP3->atEnd = DRMP3_TRUE; + return 0; /* No data. */ + } + } + + pMP3->dataSize += bytesRead; + } + + if (pMP3->dataSize > INT_MAX) { + pMP3->atEnd = DRMP3_TRUE; + return 0; /* File too big. */ + } + + pcmFramesRead = drmp3dec_decode_frame(&pMP3->decoder, pMP3->pData, (int)pMP3->dataSize, pPCMFrames, &info); /* <-- Safe size_t -> int conversion thanks to the check above. */ + + /* Consume the data. */ + leftoverDataSize = (pMP3->dataSize - (size_t)info.frame_bytes); + if (info.frame_bytes > 0) { + memmove(pMP3->pData, pMP3->pData + info.frame_bytes, leftoverDataSize); + pMP3->dataSize = leftoverDataSize; + } + + /* + pcmFramesRead will be equal to 0 if decoding failed. If it is zero and info.frame_bytes > 0 then we have successfully + decoded the frame. A special case is if we are wanting to discard the frame, in which case we return successfully. + */ + if (pcmFramesRead > 0 || (info.frame_bytes > 0 && discard)) { + pcmFramesRead = drmp3_hdr_frame_samples(pMP3->decoder.header); + pMP3->pcmFramesConsumedInMP3Frame = 0; + pMP3->pcmFramesRemainingInMP3Frame = pcmFramesRead; + pMP3->mp3FrameChannels = info.channels; + pMP3->mp3FrameSampleRate = info.hz; + + /* We need to initialize the resampler if we don't yet have the channel count or sample rate. */ + if (pMP3->channels == 0 || pMP3->sampleRate == 0) { + if (pMP3->channels == 0) { + pMP3->channels = info.channels; + } + if (pMP3->sampleRate == 0) { + pMP3->sampleRate = info.hz; + } + drmp3_init_src(pMP3); + } + + drmp3_src_set_input_sample_rate(&pMP3->src, pMP3->mp3FrameSampleRate); + break; + } else if (info.frame_bytes == 0) { + size_t bytesRead; + + /* Need more data. minimp3 recommends doing data submission in 16K chunks. */ + if (pMP3->dataCapacity == pMP3->dataSize) { + drmp3_uint8* pNewData; + + /* No room. Expand. */ + pMP3->dataCapacity += DRMP3_DATA_CHUNK_SIZE; + pNewData = (drmp3_uint8*)drmp3_realloc(pMP3->pData, pMP3->dataCapacity); + if (pNewData == NULL) { + return 0; /* Out of memory. */ + } + + pMP3->pData = pNewData; + } + + /* Fill in a chunk. */ + bytesRead = drmp3__on_read(pMP3, pMP3->pData + pMP3->dataSize, (pMP3->dataCapacity - pMP3->dataSize)); + if (bytesRead == 0) { + pMP3->atEnd = DRMP3_TRUE; + return 0; /* Error reading more data. */ + } + + pMP3->dataSize += bytesRead; + } + } while (DRMP3_TRUE); + + return pcmFramesRead; +} + +static drmp3_uint32 drmp3_decode_next_frame(drmp3* pMP3) +{ + drmp3_assert(pMP3 != NULL); + return drmp3_decode_next_frame_ex(pMP3, (drmp3d_sample_t*)pMP3->pcmFrames, DRMP3_FALSE); +} + +#if 0 +static drmp3_uint32 drmp3_seek_next_frame(drmp3* pMP3) +{ + drmp3_uint32 pcmFrameCount; + + drmp3_assert(pMP3 != NULL); + + pcmFrameCount = drmp3_decode_next_frame_ex(pMP3, NULL); + if (pcmFrameCount == 0) { + return 0; + } + + /* We have essentially just skipped past the frame, so just set the remaining samples to 0. */ + pMP3->currentPCMFrame += pcmFrameCount; + pMP3->pcmFramesConsumedInMP3Frame = pcmFrameCount; + pMP3->pcmFramesRemainingInMP3Frame = 0; + + return pcmFrameCount; +} +#endif + +drmp3_bool32 drmp3_init_internal(drmp3* pMP3, drmp3_read_proc onRead, drmp3_seek_proc onSeek, void* pUserData, const drmp3_config* pConfig) +{ + drmp3_config config; + + drmp3_assert(pMP3 != NULL); + drmp3_assert(onRead != NULL); + + /* This function assumes the output object has already been reset to 0. Do not do that here, otherwise things will break. */ + drmp3dec_init(&pMP3->decoder); + + /* The config can be null in which case we use defaults. */ + if (pConfig != NULL) { + config = *pConfig; + } else { + drmp3_zero_object(&config); + } + + pMP3->channels = config.outputChannels; + + /* Cannot have more than 2 channels. */ + if (pMP3->channels > 2) { + pMP3->channels = 2; + } + + pMP3->sampleRate = config.outputSampleRate; + + pMP3->onRead = onRead; + pMP3->onSeek = onSeek; + pMP3->pUserData = pUserData; + + /* + We need a sample rate converter for converting the sample rate from the MP3 frames to the requested output sample rate. Note that if + we don't yet know the channel count or sample rate we defer this until the first frame is read. + */ + if (pMP3->channels != 0 && pMP3->sampleRate != 0) { + drmp3_init_src(pMP3); + } - // Decode the first frame to confirm that it is indeed a valid MP3 stream. + /* Decode the first frame to confirm that it is indeed a valid MP3 stream. */ if (!drmp3_decode_next_frame(pMP3)) { drmp3_uninit(pMP3); - return DRMP3_FALSE; // Not a valid MP3 stream. + return DRMP3_FALSE; /* Not a valid MP3 stream. */ } return DRMP3_TRUE; @@ -2735,10 +2867,12 @@ drmp3_bool32 drmp3_init(drmp3* pMP3, drmp3_read_proc onRead, drmp3_seek_proc onS static size_t drmp3__on_read_memory(void* pUserData, void* pBufferOut, size_t bytesToRead) { drmp3* pMP3 = (drmp3*)pUserData; + size_t bytesRemaining; + drmp3_assert(pMP3 != NULL); drmp3_assert(pMP3->memory.dataSize >= pMP3->memory.currentReadPos); - size_t bytesRemaining = pMP3->memory.dataSize - pMP3->memory.currentReadPos; + bytesRemaining = pMP3->memory.dataSize - pMP3->memory.currentReadPos; if (bytesToRead > bytesRemaining) { bytesToRead = bytesRemaining; } @@ -2754,26 +2888,27 @@ static size_t drmp3__on_read_memory(void* pUserData, void* pBufferOut, size_t by static drmp3_bool32 drmp3__on_seek_memory(void* pUserData, int byteOffset, drmp3_seek_origin origin) { drmp3* pMP3 = (drmp3*)pUserData; + drmp3_assert(pMP3 != NULL); if (origin == drmp3_seek_origin_current) { if (byteOffset > 0) { if (pMP3->memory.currentReadPos + byteOffset > pMP3->memory.dataSize) { - byteOffset = (int)(pMP3->memory.dataSize - pMP3->memory.currentReadPos); // Trying to seek too far forward. + byteOffset = (int)(pMP3->memory.dataSize - pMP3->memory.currentReadPos); /* Trying to seek too far forward. */ } } else { if (pMP3->memory.currentReadPos < (size_t)-byteOffset) { - byteOffset = -(int)pMP3->memory.currentReadPos; // Trying to seek too far backwards. + byteOffset = -(int)pMP3->memory.currentReadPos; /* Trying to seek too far backwards. */ } } - // This will never underflow thanks to the clamps above. + /* This will never underflow thanks to the clamps above. */ pMP3->memory.currentReadPos += byteOffset; } else { if ((drmp3_uint32)byteOffset <= pMP3->memory.dataSize) { pMP3->memory.currentReadPos = byteOffset; } else { - pMP3->memory.currentReadPos = pMP3->memory.dataSize; // Trying to seek too far forward. + pMP3->memory.currentReadPos = pMP3->memory.dataSize; /* Trying to seek too far forward. */ } } @@ -2848,21 +2983,22 @@ void drmp3_uninit(drmp3* pMP3) drmp3_uint64 drmp3_read_pcm_frames_f32(drmp3* pMP3, drmp3_uint64 framesToRead, float* pBufferOut) { + drmp3_uint64 totalFramesRead = 0; + if (pMP3 == NULL || pMP3->onRead == NULL) { return 0; } - drmp3_uint64 totalFramesRead = 0; - if (pBufferOut == NULL) { float temp[4096]; while (framesToRead > 0) { + drmp3_uint64 framesJustRead; drmp3_uint64 framesToReadRightNow = sizeof(temp)/sizeof(temp[0]) / pMP3->channels; if (framesToReadRightNow > framesToRead) { framesToReadRightNow = framesToRead; } - drmp3_uint64 framesJustRead = drmp3_read_pcm_frames_f32(pMP3, framesToReadRightNow, temp); + framesJustRead = drmp3_read_pcm_frames_f32(pMP3, framesToReadRightNow, temp); if (framesJustRead == 0) { break; } @@ -2878,6 +3014,41 @@ drmp3_uint64 drmp3_read_pcm_frames_f32(drmp3* pMP3, drmp3_uint64 framesToRead, f return totalFramesRead; } +drmp3_uint64 drmp3_read_pcm_frames_s16(drmp3* pMP3, drmp3_uint64 framesToRead, drmp3_int16* pBufferOut) +{ + float tempF32[4096]; + drmp3_uint64 pcmFramesJustRead; + drmp3_uint64 totalPCMFramesRead = 0; + + if (pMP3 == NULL || pMP3->onRead == NULL) { + return 0; + } + + /* Naive implementation: read into a temp f32 buffer, then convert. */ + for (;;) { + drmp3_uint64 pcmFramesToReadThisIteration = (framesToRead - totalPCMFramesRead); + if (pcmFramesToReadThisIteration > drmp3_countof(tempF32)/pMP3->channels) { + pcmFramesToReadThisIteration = drmp3_countof(tempF32)/pMP3->channels; + } + + pcmFramesJustRead = drmp3_read_pcm_frames_f32(pMP3, pcmFramesToReadThisIteration, tempF32); + if (pcmFramesJustRead == 0) { + break; + } + + drmp3dec_f32_to_s16(tempF32, pBufferOut, (int)(pcmFramesJustRead * pMP3->channels)); /* <-- Safe cast since pcmFramesJustRead will be clamped based on the size of tempF32 which is always small. */ + pBufferOut += pcmFramesJustRead * pMP3->channels; + + totalPCMFramesRead += pcmFramesJustRead; + + if (pcmFramesJustRead < pcmFramesToReadThisIteration) { + break; + } + } + + return totalPCMFramesRead; +} + void drmp3_reset(drmp3* pMP3) { drmp3_assert(pMP3 != NULL); @@ -2896,7 +3067,6 @@ void drmp3_reset(drmp3* pMP3) pMP3->src.algo.linear.alpha = 0; pMP3->src.algo.linear.isNextFramesLoaded = 0; pMP3->src.algo.linear.isPrevFramesLoaded = 0; - //drmp3_zero_object(&pMP3->decoder); drmp3dec_init(&pMP3->decoder); } @@ -2905,12 +3075,12 @@ drmp3_bool32 drmp3_seek_to_start_of_stream(drmp3* pMP3) drmp3_assert(pMP3 != NULL); drmp3_assert(pMP3->onSeek != NULL); - // Seek to the start of the stream to begin with. + /* Seek to the start of the stream to begin with. */ if (!drmp3__on_seek(pMP3, 0, drmp3_seek_origin_start)) { return DRMP3_FALSE; } - // Clear any cached data. + /* Clear any cached data. */ drmp3_reset(pMP3); return DRMP3_TRUE; } @@ -2927,26 +3097,31 @@ float drmp3_get_pcm_frames_remaining_in_mp3_frame(drmp3* pMP3) return frameCountPreSRC * factor; } -// NOTE ON SEEKING -// =============== -// The seeking code below is a complete mess and is broken for cases when the sample rate changes. The problem -// is with the resampling and the crappy resampler used by dr_mp3. What needs to happen is the following: -// -// 1) The resampler needs to be replaced. -// 2) The resampler has state which needs to be updated whenever an MP3 frame is decoded outside of -// drmp3_read_pcm_frames_f32(). The resampler needs an API to "flush" some imaginary input so that it's -// state is updated accordingly. +/* +NOTE ON SEEKING +=============== +The seeking code below is a complete mess and is broken for cases when the sample rate changes. The problem +is with the resampling and the crappy resampler used by dr_mp3. What needs to happen is the following: +1) The resampler needs to be replaced. +2) The resampler has state which needs to be updated whenever an MP3 frame is decoded outside of + drmp3_read_pcm_frames_f32(). The resampler needs an API to "flush" some imaginary input so that it's + state is updated accordingly. +*/ drmp3_bool32 drmp3_seek_forward_by_pcm_frames__brute_force(drmp3* pMP3, drmp3_uint64 frameOffset) { + drmp3_uint64 framesRead; + #if 0 - // MP3 is a bit annoying when it comes to seeking because of the bit reservoir. It basically means that an MP3 frame can possibly - // depend on some of the data of prior frames. This means it's not as simple as seeking to the first byte of the MP3 frame that - // contains the sample because that MP3 frame will need the data from the previous MP3 frame (which we just seeked past!). To - // resolve this we seek past a number of MP3 frames up to a point, and then read-and-discard the remainder. + /* + MP3 is a bit annoying when it comes to seeking because of the bit reservoir. It basically means that an MP3 frame can possibly + depend on some of the data of prior frames. This means it's not as simple as seeking to the first byte of the MP3 frame that + contains the sample because that MP3 frame will need the data from the previous MP3 frame (which we just seeked past!). To + resolve this we seek past a number of MP3 frames up to a point, and then read-and-discard the remainder. + */ drmp3_uint64 maxFramesToReadAndDiscard = (drmp3_uint64)(DRMP3_MAX_PCM_FRAMES_PER_MP3_FRAME * 3 * ((float)pMP3->src.config.sampleRateOut / (float)pMP3->src.config.sampleRateIn)); - // Now get rid of leading whole frames. + /* Now get rid of leading whole frames. */ while (frameOffset > maxFramesToReadAndDiscard) { float pcmFramesRemainingInCurrentMP3FrameF = drmp3_get_pcm_frames_remaining_in_mp3_frame(pMP3); drmp3_uint32 pcmFramesRemainingInCurrentMP3Frame = (drmp3_uint32)pcmFramesRemainingInCurrentMP3FrameF; @@ -2965,14 +3140,14 @@ drmp3_bool32 drmp3_seek_forward_by_pcm_frames__brute_force(drmp3* pMP3, drmp3_ui } } - // The last step is to read-and-discard any remaining PCM frames to make it sample-exact. - drmp3_uint64 framesRead = drmp3_read_pcm_frames_f32(pMP3, frameOffset, NULL); + /* The last step is to read-and-discard any remaining PCM frames to make it sample-exact. */ + framesRead = drmp3_read_pcm_frames_f32(pMP3, frameOffset, NULL); if (framesRead != frameOffset) { return DRMP3_FALSE; } #else - // Just using a dumb read-and-discard for now pending updates to the resampler. - drmp3_uint64 framesRead = drmp3_read_pcm_frames_f32(pMP3, frameOffset, NULL); + /* Just using a dumb read-and-discard for now pending updates to the resampler. */ + framesRead = drmp3_read_pcm_frames_f32(pMP3, frameOffset, NULL); if (framesRead != frameOffset) { return DRMP3_FALSE; } @@ -2989,11 +3164,12 @@ drmp3_bool32 drmp3_seek_to_pcm_frame__brute_force(drmp3* pMP3, drmp3_uint64 fram return DRMP3_TRUE; } - // If we're moving foward we just read from where we're at. Otherwise we need to move back to the start of - // the stream and read from the beginning. - //drmp3_uint64 framesToReadAndDiscard; + /* + If we're moving foward we just read from where we're at. Otherwise we need to move back to the start of + the stream and read from the beginning. + */ if (frameIndex < pMP3->currentPCMFrame) { - // Moving backward. Move to the start of the stream and then move forward. + /* Moving backward. Move to the start of the stream and then move forward. */ if (!drmp3_seek_to_start_of_stream(pMP3)) { return DRMP3_FALSE; } @@ -3005,16 +3181,20 @@ drmp3_bool32 drmp3_seek_to_pcm_frame__brute_force(drmp3* pMP3, drmp3_uint64 fram drmp3_bool32 drmp3_find_closest_seek_point(drmp3* pMP3, drmp3_uint64 frameIndex, drmp3_uint32* pSeekPointIndex) { + drmp3_uint32 iSeekPoint; + drmp3_assert(pSeekPointIndex != NULL); + *pSeekPointIndex = 0; + if (frameIndex < pMP3->pSeekPoints[0].pcmFrameIndex) { return DRMP3_FALSE; } - // Linear search for simplicity to begin with while I'm getting this thing working. Once it's all working change this to a binary search. - for (drmp3_uint32 iSeekPoint = 0; iSeekPoint < pMP3->seekPointCount; ++iSeekPoint) { + /* Linear search for simplicity to begin with while I'm getting this thing working. Once it's all working change this to a binary search. */ + for (iSeekPoint = 0; iSeekPoint < pMP3->seekPointCount; ++iSeekPoint) { if (pMP3->pSeekPoints[iSeekPoint].pcmFrameIndex > frameIndex) { - break; // Found it. + break; /* Found it. */ } *pSeekPointIndex = iSeekPoint; @@ -3025,14 +3205,16 @@ drmp3_bool32 drmp3_find_closest_seek_point(drmp3* pMP3, drmp3_uint64 frameIndex, drmp3_bool32 drmp3_seek_to_pcm_frame__seek_table(drmp3* pMP3, drmp3_uint64 frameIndex) { + drmp3_seek_point seekPoint; + drmp3_uint32 priorSeekPointIndex; + drmp3_uint16 iMP3Frame; + drmp3_uint64 leftoverFrames; + drmp3_assert(pMP3 != NULL); drmp3_assert(pMP3->pSeekPoints != NULL); drmp3_assert(pMP3->seekPointCount > 0); - drmp3_seek_point seekPoint; - - // If there is no prior seekpoint it means the target PCM frame comes before the first seek point. Just assume a seekpoint at the start of the file in this case. - drmp3_uint32 priorSeekPointIndex; + /* If there is no prior seekpoint it means the target PCM frame comes before the first seek point. Just assume a seekpoint at the start of the file in this case. */ if (drmp3_find_closest_seek_point(pMP3, frameIndex, &priorSeekPointIndex)) { seekPoint = pMP3->pSeekPoints[priorSeekPointIndex]; } else { @@ -3042,44 +3224,51 @@ drmp3_bool32 drmp3_seek_to_pcm_frame__seek_table(drmp3* pMP3, drmp3_uint64 frame seekPoint.pcmFramesToDiscard = 0; } - // First thing to do is seek to the first byte of the relevant MP3 frame. + /* First thing to do is seek to the first byte of the relevant MP3 frame. */ if (!drmp3__on_seek_64(pMP3, seekPoint.seekPosInBytes, drmp3_seek_origin_start)) { - return DRMP3_FALSE; // Failed to seek. + return DRMP3_FALSE; /* Failed to seek. */ } - // Clear any cached data. + /* Clear any cached data. */ drmp3_reset(pMP3); - // Whole MP3 frames need to be discarded first. - for (drmp3_uint16 iMP3Frame = 0; iMP3Frame < seekPoint.mp3FramesToDiscard; ++iMP3Frame) { - // Pass in non-null for the last frame because we want to ensure the sample rate converter is preloaded correctly. - drmp3d_sample_t* pPCMFrames = NULL; + /* Whole MP3 frames need to be discarded first. */ + for (iMP3Frame = 0; iMP3Frame < seekPoint.mp3FramesToDiscard; ++iMP3Frame) { + drmp3_uint32 pcmFramesReadPreSRC; + drmp3d_sample_t* pPCMFrames; + + /* Pass in non-null for the last frame because we want to ensure the sample rate converter is preloaded correctly. */ + pPCMFrames = NULL; if (iMP3Frame == seekPoint.mp3FramesToDiscard-1) { pPCMFrames = (drmp3d_sample_t*)pMP3->pcmFrames; } - // We first need to decode the next frame, and then we need to flush the resampler. - drmp3_uint32 pcmFramesReadPreSRC = drmp3_decode_next_frame_ex(pMP3, pPCMFrames, DRMP3_TRUE); + /* We first need to decode the next frame, and then we need to flush the resampler. */ + pcmFramesReadPreSRC = drmp3_decode_next_frame_ex(pMP3, pPCMFrames, DRMP3_TRUE); if (pcmFramesReadPreSRC == 0) { return DRMP3_FALSE; } } - // We seeked to an MP3 frame in the raw stream so we need to make sure the current PCM frame is set correctly. + /* We seeked to an MP3 frame in the raw stream so we need to make sure the current PCM frame is set correctly. */ pMP3->currentPCMFrame = seekPoint.pcmFrameIndex - seekPoint.pcmFramesToDiscard; - // Update resampler. This is wrong. Need to instead update it on a per MP3 frame basis. Also broken for cases when - // the sample rate is being reduced in my testing. Should work fine when the input and output sample rate is the same - // or a clean multiple. - pMP3->src.algo.linear.alpha = pMP3->currentPCMFrame * ((double)pMP3->src.config.sampleRateIn / pMP3->src.config.sampleRateOut); + /* + Update resampler. This is wrong. Need to instead update it on a per MP3 frame basis. Also broken for cases when + the sample rate is being reduced in my testing. Should work fine when the input and output sample rate is the same + or a clean multiple. + */ + pMP3->src.algo.linear.alpha = (drmp3_int64)pMP3->currentPCMFrame * ((double)pMP3->src.config.sampleRateIn / pMP3->src.config.sampleRateOut); /* <-- Cast to int64 is required for VC6. */ pMP3->src.algo.linear.alpha = pMP3->src.algo.linear.alpha - (drmp3_uint32)(pMP3->src.algo.linear.alpha); if (pMP3->src.algo.linear.alpha > 0) { pMP3->src.algo.linear.isPrevFramesLoaded = 1; } - // Now at this point we can follow the same process as the brute force technique where we just skip over unnecessary MP3 frames and then - // read-and-discard at least 2 whole MP3 frames. - drmp3_uint64 leftoverFrames = frameIndex - pMP3->currentPCMFrame; + /* + Now at this point we can follow the same process as the brute force technique where we just skip over unnecessary MP3 frames and then + read-and-discard at least 2 whole MP3 frames. + */ + leftoverFrames = frameIndex - pMP3->currentPCMFrame; return drmp3_seek_forward_by_pcm_frames__brute_force(pMP3, leftoverFrames); } @@ -3093,7 +3282,7 @@ drmp3_bool32 drmp3_seek_to_pcm_frame(drmp3* pMP3, drmp3_uint64 frameIndex) return drmp3_seek_to_start_of_stream(pMP3); } - // Use the seek table if we have one. + /* Use the seek table if we have one. */ if (pMP3->pSeekPoints != NULL && pMP3->seekPointCount > 0) { return drmp3_seek_to_pcm_frame__seek_table(pMP3, frameIndex); } else { @@ -3103,46 +3292,58 @@ drmp3_bool32 drmp3_seek_to_pcm_frame(drmp3* pMP3, drmp3_uint64 frameIndex) drmp3_bool32 drmp3_get_mp3_and_pcm_frame_count(drmp3* pMP3, drmp3_uint64* pMP3FrameCount, drmp3_uint64* pPCMFrameCount) { + drmp3_uint64 currentPCMFrame; + drmp3_uint64 totalPCMFrameCount; + drmp3_uint64 totalMP3FrameCount; + float totalPCMFrameCountFractionalPart; + if (pMP3 == NULL) { return DRMP3_FALSE; } - // The way this works is we move back to the start of the stream, iterate over each MP3 frame and calculate the frame count based - // on our output sample rate, the seek back to the PCM frame we were sitting on before calling this function. + /* + The way this works is we move back to the start of the stream, iterate over each MP3 frame and calculate the frame count based + on our output sample rate, the seek back to the PCM frame we were sitting on before calling this function. + */ - // The stream must support seeking for this to work. + /* The stream must support seeking for this to work. */ if (pMP3->onSeek == NULL) { return DRMP3_FALSE; } - // We'll need to seek back to where we were, so grab the PCM frame we're currently sitting on so we can restore later. - drmp3_uint64 currentPCMFrame = pMP3->currentPCMFrame; + /* We'll need to seek back to where we were, so grab the PCM frame we're currently sitting on so we can restore later. */ + currentPCMFrame = pMP3->currentPCMFrame; if (!drmp3_seek_to_start_of_stream(pMP3)) { return DRMP3_FALSE; } - drmp3_uint64 totalPCMFrameCount = 0; - drmp3_uint64 totalMP3FrameCount = 0; + totalPCMFrameCount = 0; + totalMP3FrameCount = 0; - float totalPCMFrameCountFractionalPart = 0; // <-- With resampling there will be a fractional part to each MP3 frame that we need to accumulate. + totalPCMFrameCountFractionalPart = 0; /* <-- With resampling there will be a fractional part to each MP3 frame that we need to accumulate. */ for (;;) { - drmp3_uint32 pcmFramesInCurrentMP3FrameIn = drmp3_decode_next_frame_ex(pMP3, NULL, DRMP3_FALSE); + drmp3_uint32 pcmFramesInCurrentMP3FrameIn; + float srcRatio; + float pcmFramesInCurrentMP3FrameOutF; + drmp3_uint32 pcmFramesInCurrentMP3FrameOut; + + pcmFramesInCurrentMP3FrameIn = drmp3_decode_next_frame_ex(pMP3, NULL, DRMP3_FALSE); if (pcmFramesInCurrentMP3FrameIn == 0) { break; } - float srcRatio = (float)pMP3->mp3FrameSampleRate / (float)pMP3->sampleRate; + srcRatio = (float)pMP3->mp3FrameSampleRate / (float)pMP3->sampleRate; drmp3_assert(srcRatio > 0); - float pcmFramesInCurrentMP3FrameOutF = totalPCMFrameCountFractionalPart + (pcmFramesInCurrentMP3FrameIn / srcRatio); - drmp3_uint32 pcmFramesInCurrentMP3FrameOut = (drmp3_uint32)pcmFramesInCurrentMP3FrameOutF; + pcmFramesInCurrentMP3FrameOutF = totalPCMFrameCountFractionalPart + (pcmFramesInCurrentMP3FrameIn / srcRatio); + pcmFramesInCurrentMP3FrameOut = (drmp3_uint32)pcmFramesInCurrentMP3FrameOutF; totalPCMFrameCountFractionalPart = pcmFramesInCurrentMP3FrameOutF - pcmFramesInCurrentMP3FrameOut; totalPCMFrameCount += pcmFramesInCurrentMP3FrameOut; totalMP3FrameCount += 1; } - // Finally, we need to seek back to where we were. + /* Finally, we need to seek back to where we were. */ if (!drmp3_seek_to_start_of_stream(pMP3)) { return DRMP3_FALSE; } @@ -3183,11 +3384,15 @@ drmp3_uint64 drmp3_get_mp3_frame_count(drmp3* pMP3) void drmp3__accumulate_running_pcm_frame_count(drmp3* pMP3, drmp3_uint32 pcmFrameCountIn, drmp3_uint64* pRunningPCMFrameCount, float* pRunningPCMFrameCountFractionalPart) { - float srcRatio = (float)pMP3->mp3FrameSampleRate / (float)pMP3->sampleRate; + float srcRatio; + float pcmFrameCountOutF; + drmp3_uint32 pcmFrameCountOut; + + srcRatio = (float)pMP3->mp3FrameSampleRate / (float)pMP3->sampleRate; drmp3_assert(srcRatio > 0); - float pcmFrameCountOutF = *pRunningPCMFrameCountFractionalPart + (pcmFrameCountIn / srcRatio); - drmp3_uint32 pcmFrameCountOut = (drmp3_uint32)pcmFrameCountOutF; + pcmFrameCountOutF = *pRunningPCMFrameCountFractionalPart + (pcmFrameCountIn / srcRatio); + pcmFrameCountOut = (drmp3_uint32)pcmFrameCountOutF; *pRunningPCMFrameCountFractionalPart = pcmFrameCountOutF - pcmFrameCountOut; *pRunningPCMFrameCount += pcmFrameCountOut; } @@ -3195,31 +3400,34 @@ void drmp3__accumulate_running_pcm_frame_count(drmp3* pMP3, drmp3_uint32 pcmFram typedef struct { drmp3_uint64 bytePos; - drmp3_uint64 pcmFrameIndex; // <-- After sample rate conversion. + drmp3_uint64 pcmFrameIndex; /* <-- After sample rate conversion. */ } drmp3__seeking_mp3_frame_info; drmp3_bool32 drmp3_calculate_seek_points(drmp3* pMP3, drmp3_uint32* pSeekPointCount, drmp3_seek_point* pSeekPoints) { - if (pMP3 == NULL || pSeekPointCount == NULL || pSeekPoints == NULL) { - return DRMP3_FALSE; // Invalid args. - } - - drmp3_uint32 seekPointCount = *pSeekPointCount; - if (seekPointCount == 0) { - return DRMP3_FALSE; // The client has requested no seek points. Consider this to be invalid arguments since the client has probably not intended this. - } - - // We'll need to seek back to the current sample after calculating the seekpoints so we need to go ahead and grab the current location at the top. - drmp3_uint64 currentPCMFrame = pMP3->currentPCMFrame; - - // We never do more than the total number of MP3 frames and we limit it to 32-bits. + drmp3_uint32 seekPointCount; + drmp3_uint64 currentPCMFrame; drmp3_uint64 totalMP3FrameCount; drmp3_uint64 totalPCMFrameCount; + + if (pMP3 == NULL || pSeekPointCount == NULL || pSeekPoints == NULL) { + return DRMP3_FALSE; /* Invalid args. */ + } + + seekPointCount = *pSeekPointCount; + if (seekPointCount == 0) { + return DRMP3_FALSE; /* The client has requested no seek points. Consider this to be invalid arguments since the client has probably not intended this. */ + } + + /* We'll need to seek back to the current sample after calculating the seekpoints so we need to go ahead and grab the current location at the top. */ + currentPCMFrame = pMP3->currentPCMFrame; + + /* We never do more than the total number of MP3 frames and we limit it to 32-bits. */ if (!drmp3_get_mp3_and_pcm_frame_count(pMP3, &totalMP3FrameCount, &totalPCMFrameCount)) { return DRMP3_FALSE; } - // If there's less than DRMP3_SEEK_LEADING_MP3_FRAMES+1 frames we just report 1 seek point which will be the very start of the stream. + /* If there's less than DRMP3_SEEK_LEADING_MP3_FRAMES+1 frames we just report 1 seek point which will be the very start of the stream. */ if (totalMP3FrameCount < DRMP3_SEEK_LEADING_MP3_FRAMES+1) { seekPointCount = 1; pSeekPoints[0].seekPosInBytes = 0; @@ -3227,69 +3435,88 @@ drmp3_bool32 drmp3_calculate_seek_points(drmp3* pMP3, drmp3_uint32* pSeekPointCo pSeekPoints[0].mp3FramesToDiscard = 0; pSeekPoints[0].pcmFramesToDiscard = 0; } else { + drmp3_uint64 pcmFramesBetweenSeekPoints; + drmp3__seeking_mp3_frame_info mp3FrameInfo[DRMP3_SEEK_LEADING_MP3_FRAMES+1]; + drmp3_uint64 runningPCMFrameCount = 0; + float runningPCMFrameCountFractionalPart = 0; + drmp3_uint64 nextTargetPCMFrame; + drmp3_uint32 iMP3Frame; + drmp3_uint32 iSeekPoint; + if (seekPointCount > totalMP3FrameCount-1) { seekPointCount = (drmp3_uint32)totalMP3FrameCount-1; } - drmp3_uint64 pcmFramesBetweenSeekPoints = totalPCMFrameCount / (seekPointCount+1); + pcmFramesBetweenSeekPoints = totalPCMFrameCount / (seekPointCount+1); - // Here is where we actually calculate the seek points. We need to start by moving the start of the stream. We then enumerate over each - // MP3 frame. + /* + Here is where we actually calculate the seek points. We need to start by moving the start of the stream. We then enumerate over each + MP3 frame. + */ if (!drmp3_seek_to_start_of_stream(pMP3)) { return DRMP3_FALSE; } - // We need to cache the byte positions of the previous MP3 frames. As a new MP3 frame is iterated, we cycle the byte positions in this - // array. The value in the first item in this array is the byte position that will be reported in the next seek point. - drmp3__seeking_mp3_frame_info mp3FrameInfo[DRMP3_SEEK_LEADING_MP3_FRAMES+1]; + /* + We need to cache the byte positions of the previous MP3 frames. As a new MP3 frame is iterated, we cycle the byte positions in this + array. The value in the first item in this array is the byte position that will be reported in the next seek point. + */ - drmp3_uint64 runningPCMFrameCount = 0; - float runningPCMFrameCountFractionalPart = 0; + /* We need to initialize the array of MP3 byte positions for the leading MP3 frames. */ + for (iMP3Frame = 0; iMP3Frame < DRMP3_SEEK_LEADING_MP3_FRAMES+1; ++iMP3Frame) { + drmp3_uint32 pcmFramesInCurrentMP3FrameIn; - // We need to initialize the array of MP3 byte positions for the leading MP3 frames. - for (int iMP3Frame = 0; iMP3Frame < DRMP3_SEEK_LEADING_MP3_FRAMES+1; ++iMP3Frame) { - // The byte position of the next frame will be the stream's cursor position, minus whatever is sitting in the buffer. + /* The byte position of the next frame will be the stream's cursor position, minus whatever is sitting in the buffer. */ drmp3_assert(pMP3->streamCursor >= pMP3->dataSize); mp3FrameInfo[iMP3Frame].bytePos = pMP3->streamCursor - pMP3->dataSize; mp3FrameInfo[iMP3Frame].pcmFrameIndex = runningPCMFrameCount; - // We need to get information about this frame so we can know how many samples it contained. - drmp3_uint32 pcmFramesInCurrentMP3FrameIn = drmp3_decode_next_frame_ex(pMP3, NULL, DRMP3_FALSE); + /* We need to get information about this frame so we can know how many samples it contained. */ + pcmFramesInCurrentMP3FrameIn = drmp3_decode_next_frame_ex(pMP3, NULL, DRMP3_FALSE); if (pcmFramesInCurrentMP3FrameIn == 0) { - return DRMP3_FALSE; // This should never happen. + return DRMP3_FALSE; /* This should never happen. */ } drmp3__accumulate_running_pcm_frame_count(pMP3, pcmFramesInCurrentMP3FrameIn, &runningPCMFrameCount, &runningPCMFrameCountFractionalPart); } - // At this point we will have extracted the byte positions of the leading MP3 frames. We can now start iterating over each seek point and - // calculate them. - drmp3_uint64 nextTargetPCMFrame = 0; - for (drmp3_uint32 iSeekPoint = 0; iSeekPoint < seekPointCount; ++iSeekPoint) { + /* + At this point we will have extracted the byte positions of the leading MP3 frames. We can now start iterating over each seek point and + calculate them. + */ + nextTargetPCMFrame = 0; + for (iSeekPoint = 0; iSeekPoint < seekPointCount; ++iSeekPoint) { nextTargetPCMFrame += pcmFramesBetweenSeekPoints; for (;;) { if (nextTargetPCMFrame < runningPCMFrameCount) { - // The next seek point is in the current MP3 frame. + /* The next seek point is in the current MP3 frame. */ pSeekPoints[iSeekPoint].seekPosInBytes = mp3FrameInfo[0].bytePos; pSeekPoints[iSeekPoint].pcmFrameIndex = nextTargetPCMFrame; pSeekPoints[iSeekPoint].mp3FramesToDiscard = DRMP3_SEEK_LEADING_MP3_FRAMES; pSeekPoints[iSeekPoint].pcmFramesToDiscard = (drmp3_uint16)(nextTargetPCMFrame - mp3FrameInfo[DRMP3_SEEK_LEADING_MP3_FRAMES-1].pcmFrameIndex); break; } else { - // The next seek point is not in the current MP3 frame, so continue on to the next one. The first thing to do is cycle the cached - // MP3 frame info. - for (size_t i = 0; i < drmp3_countof(mp3FrameInfo)-1; ++i) { + size_t i; + drmp3_uint32 pcmFramesInCurrentMP3FrameIn; + + /* + The next seek point is not in the current MP3 frame, so continue on to the next one. The first thing to do is cycle the cached + MP3 frame info. + */ + for (i = 0; i < drmp3_countof(mp3FrameInfo)-1; ++i) { mp3FrameInfo[i] = mp3FrameInfo[i+1]; } - // Cache previous MP3 frame info. + /* Cache previous MP3 frame info. */ mp3FrameInfo[drmp3_countof(mp3FrameInfo)-1].bytePos = pMP3->streamCursor - pMP3->dataSize; mp3FrameInfo[drmp3_countof(mp3FrameInfo)-1].pcmFrameIndex = runningPCMFrameCount; - // Go to the next MP3 frame. This shouldn't ever fail, but just in case it does we just set the seek point and break. If it happens, it - // should only ever do it for the last seek point. - drmp3_uint32 pcmFramesInCurrentMP3FrameIn = drmp3_decode_next_frame_ex(pMP3, NULL, DRMP3_TRUE); + /* + Go to the next MP3 frame. This shouldn't ever fail, but just in case it does we just set the seek point and break. If it happens, it + should only ever do it for the last seek point. + */ + pcmFramesInCurrentMP3FrameIn = drmp3_decode_next_frame_ex(pMP3, NULL, DRMP3_TRUE); if (pcmFramesInCurrentMP3FrameIn == 0) { pSeekPoints[iSeekPoint].seekPosInBytes = mp3FrameInfo[0].bytePos; pSeekPoints[iSeekPoint].pcmFrameIndex = nextTargetPCMFrame; @@ -3303,7 +3530,7 @@ drmp3_bool32 drmp3_calculate_seek_points(drmp3* pMP3, drmp3_uint32* pSeekPointCo } } - // Finally, we need to seek back to where we were. + /* Finally, we need to seek back to where we were. */ if (!drmp3_seek_to_start_of_stream(pMP3)) { return DRMP3_FALSE; } @@ -3323,11 +3550,11 @@ drmp3_bool32 drmp3_bind_seek_table(drmp3* pMP3, drmp3_uint32 seekPointCount, drm } if (seekPointCount == 0 || pSeekPoints == NULL) { - // Unbinding. + /* Unbinding. */ pMP3->seekPointCount = 0; pMP3->pSeekPoints = NULL; } else { - // Binding. + /* Binding. */ pMP3->seekPointCount = seekPointCount; pMP3->pSeekPoints = pSeekPoints; } @@ -3338,13 +3565,13 @@ drmp3_bool32 drmp3_bind_seek_table(drmp3* pMP3, drmp3_uint32 seekPointCount, drm float* drmp3__full_read_and_close_f32(drmp3* pMP3, drmp3_config* pConfig, drmp3_uint64* pTotalFrameCount) { - drmp3_assert(pMP3 != NULL); - drmp3_uint64 totalFramesRead = 0; drmp3_uint64 framesCapacity = 0; float* pFrames = NULL; - float temp[4096]; + + drmp3_assert(pMP3 != NULL); + for (;;) { drmp3_uint64 framesToReadRightNow = drmp3_countof(temp) / pMP3->channels; drmp3_uint64 framesJustRead = drmp3_read_pcm_frames_f32(pMP3, framesToReadRightNow, temp); @@ -3352,19 +3579,22 @@ float* drmp3__full_read_and_close_f32(drmp3* pMP3, drmp3_config* pConfig, drmp3_ break; } - // Reallocate the output buffer if there's not enough room. + /* Reallocate the output buffer if there's not enough room. */ if (framesCapacity < totalFramesRead + framesJustRead) { + drmp3_uint64 newFramesBufferSize; + float* pNewFrames; + framesCapacity *= 2; if (framesCapacity < totalFramesRead + framesJustRead) { framesCapacity = totalFramesRead + framesJustRead; } - drmp3_uint64 newFramesBufferSize = framesCapacity*pMP3->channels*sizeof(float); + newFramesBufferSize = framesCapacity*pMP3->channels*sizeof(float); if (newFramesBufferSize > DRMP3_SIZE_MAX) { break; } - float* pNewFrames = (float*)drmp3_realloc(pFrames, (size_t)newFramesBufferSize); + pNewFrames = (float*)drmp3_realloc(pFrames, (size_t)newFramesBufferSize); if (pNewFrames == NULL) { drmp3_free(pFrames); break; @@ -3376,7 +3606,7 @@ float* drmp3__full_read_and_close_f32(drmp3* pMP3, drmp3_config* pConfig, drmp3_ drmp3_copy_memory(pFrames + totalFramesRead*pMP3->channels, temp, (size_t)(framesJustRead*pMP3->channels*sizeof(float))); totalFramesRead += framesJustRead; - // If the number of frames we asked for is less that what we actually read it means we've reached the end. + /* If the number of frames we asked for is less that what we actually read it means we've reached the end. */ if (framesJustRead != framesToReadRightNow) { break; } @@ -3389,10 +3619,77 @@ float* drmp3__full_read_and_close_f32(drmp3* pMP3, drmp3_config* pConfig, drmp3_ drmp3_uninit(pMP3); - if (pTotalFrameCount) *pTotalFrameCount = totalFramesRead; + if (pTotalFrameCount) { + *pTotalFrameCount = totalFramesRead; + } + return pFrames; } +drmp3_int16* drmp3__full_read_and_close_s16(drmp3* pMP3, drmp3_config* pConfig, drmp3_uint64* pTotalFrameCount) +{ + drmp3_uint64 totalFramesRead = 0; + drmp3_uint64 framesCapacity = 0; + drmp3_int16* pFrames = NULL; + drmp3_int16 temp[4096]; + + drmp3_assert(pMP3 != NULL); + + for (;;) { + drmp3_uint64 framesToReadRightNow = drmp3_countof(temp) / pMP3->channels; + drmp3_uint64 framesJustRead = drmp3_read_pcm_frames_s16(pMP3, framesToReadRightNow, temp); + if (framesJustRead == 0) { + break; + } + + /* Reallocate the output buffer if there's not enough room. */ + if (framesCapacity < totalFramesRead + framesJustRead) { + drmp3_uint64 newFramesBufferSize; + drmp3_int16* pNewFrames; + + framesCapacity *= 2; + if (framesCapacity < totalFramesRead + framesJustRead) { + framesCapacity = totalFramesRead + framesJustRead; + } + + newFramesBufferSize = framesCapacity*pMP3->channels*sizeof(drmp3_int16); + if (newFramesBufferSize > DRMP3_SIZE_MAX) { + break; + } + + pNewFrames = (drmp3_int16*)drmp3_realloc(pFrames, (size_t)newFramesBufferSize); + if (pNewFrames == NULL) { + drmp3_free(pFrames); + break; + } + + pFrames = pNewFrames; + } + + drmp3_copy_memory(pFrames + totalFramesRead*pMP3->channels, temp, (size_t)(framesJustRead*pMP3->channels*sizeof(drmp3_int16))); + totalFramesRead += framesJustRead; + + /* If the number of frames we asked for is less that what we actually read it means we've reached the end. */ + if (framesJustRead != framesToReadRightNow) { + break; + } + } + + if (pConfig != NULL) { + pConfig->outputChannels = pMP3->channels; + pConfig->outputSampleRate = pMP3->sampleRate; + } + + drmp3_uninit(pMP3); + + if (pTotalFrameCount) { + *pTotalFrameCount = totalFramesRead; + } + + return pFrames; +} + + float* drmp3_open_and_read_f32(drmp3_read_proc onRead, drmp3_seek_proc onSeek, void* pUserData, drmp3_config* pConfig, drmp3_uint64* pTotalFrameCount) { drmp3 mp3; @@ -3403,6 +3700,17 @@ float* drmp3_open_and_read_f32(drmp3_read_proc onRead, drmp3_seek_proc onSeek, v return drmp3__full_read_and_close_f32(&mp3, pConfig, pTotalFrameCount); } +drmp3_int16* drmp3_open_and_read_s16(drmp3_read_proc onRead, drmp3_seek_proc onSeek, void* pUserData, drmp3_config* pConfig, drmp3_uint64* pTotalFrameCount) +{ + drmp3 mp3; + if (!drmp3_init(&mp3, onRead, onSeek, pUserData, pConfig)) { + return NULL; + } + + return drmp3__full_read_and_close_s16(&mp3, pConfig, pTotalFrameCount); +} + + float* drmp3_open_memory_and_read_f32(const void* pData, size_t dataSize, drmp3_config* pConfig, drmp3_uint64* pTotalFrameCount) { drmp3 mp3; @@ -3413,6 +3721,17 @@ float* drmp3_open_memory_and_read_f32(const void* pData, size_t dataSize, drmp3_ return drmp3__full_read_and_close_f32(&mp3, pConfig, pTotalFrameCount); } +drmp3_int16* drmp3_open_memory_and_read_s16(const void* pData, size_t dataSize, drmp3_config* pConfig, drmp3_uint64* pTotalFrameCount) +{ + drmp3 mp3; + if (!drmp3_init_memory(&mp3, pData, dataSize, pConfig)) { + return NULL; + } + + return drmp3__full_read_and_close_s16(&mp3, pConfig, pTotalFrameCount); +} + + #ifndef DR_MP3_NO_STDIO float* drmp3_open_file_and_read_f32(const char* filePath, drmp3_config* pConfig, drmp3_uint64* pTotalFrameCount) { @@ -3423,6 +3742,16 @@ float* drmp3_open_file_and_read_f32(const char* filePath, drmp3_config* pConfig, return drmp3__full_read_and_close_f32(&mp3, pConfig, pTotalFrameCount); } + +drmp3_int16* drmp3_open_file_and_read_s16(const char* filePath, drmp3_config* pConfig, drmp3_uint64* pTotalFrameCount) +{ + drmp3 mp3; + if (!drmp3_init_file(&mp3, filePath, pConfig)) { + return NULL; + } + + return drmp3__full_read_and_close_s16(&mp3, pConfig, pTotalFrameCount); +} #endif void drmp3_free(void* p) @@ -3432,130 +3761,172 @@ void drmp3_free(void* p) #endif /*DR_MP3_IMPLEMENTATION*/ - -// DIFFERENCES BETWEEN minimp3 AND dr_mp3 -// ====================================== -// - First, keep in mind that minimp3 (https://github.com/lieff/minimp3) is where all the real work was done. All of the -// code relating to the actual decoding remains mostly unmodified, apart from some namespacing changes. -// - dr_mp3 adds a pulling style API which allows you to deliver raw data via callbacks. So, rather than pushing data -// to the decoder, the decoder _pulls_ data from your callbacks. -// - In addition to callbacks, a decoder can be initialized from a block of memory and a file. -// - The dr_mp3 pull API reads PCM frames rather than whole MP3 frames. -// - dr_mp3 adds convenience APIs for opening and decoding entire files in one go. -// - dr_mp3 is fully namespaced, including the implementation section, which is more suitable when compiling projects -// as a single translation unit (aka unity builds). At the time of writing this, a unity build is not possible when -// using minimp3 in conjunction with stb_vorbis. dr_mp3 addresses this. - - -// REVISION HISTORY -// ================ -// -// v0.4.1 - 2018-12-30 -// - Fix a warning. -// -// v0.4.0 - 2018-12-16 -// - API CHANGE: Rename some APIs: -// - drmp3_read_f32 -> to drmp3_read_pcm_frames_f32 -// - drmp3_seek_to_frame -> drmp3_seek_to_pcm_frame -// - drmp3_open_and_decode_f32 -> drmp3_open_and_read_f32 -// - drmp3_open_and_decode_memory_f32 -> drmp3_open_memory_and_read_f32 -// - drmp3_open_and_decode_file_f32 -> drmp3_open_file_and_read_f32 -// - Add drmp3_get_pcm_frame_count(). -// - Add drmp3_get_mp3_frame_count(). -// - Improve seeking performance. -// -// v0.3.2 - 2018-09-11 -// - Fix a couple of memory leaks. -// - Bring up to date with minimp3. -// -// v0.3.1 - 2018-08-25 -// - Fix C++ build. -// -// v0.3.0 - 2018-08-25 -// - Bring up to date with minimp3. This has a minor API change: the "pcm" parameter of drmp3dec_decode_frame() has -// been changed from short* to void* because it can now output both s16 and f32 samples, depending on whether or -// not the DR_MP3_FLOAT_OUTPUT option is set. -// -// v0.2.11 - 2018-08-08 -// - Fix a bug where the last part of a file is not read. -// -// v0.2.10 - 2018-08-07 -// - Improve 64-bit detection. -// -// v0.2.9 - 2018-08-05 -// - Fix C++ build on older versions of GCC. -// - Bring up to date with minimp3. -// -// v0.2.8 - 2018-08-02 -// - Fix compilation errors with older versions of GCC. -// -// v0.2.7 - 2018-07-13 -// - Bring up to date with minimp3. -// -// v0.2.6 - 2018-07-12 -// - Bring up to date with minimp3. -// -// v0.2.5 - 2018-06-22 -// - Bring up to date with minimp3. -// -// v0.2.4 - 2018-05-12 -// - Bring up to date with minimp3. -// -// v0.2.3 - 2018-04-29 -// - Fix TCC build. -// -// v0.2.2 - 2018-04-28 -// - Fix bug when opening a decoder from memory. -// -// v0.2.1 - 2018-04-27 -// - Efficiency improvements when the decoder reaches the end of the stream. -// -// v0.2 - 2018-04-21 -// - Bring up to date with minimp3. -// - Start using major.minor.revision versioning. -// -// v0.1d - 2018-03-30 -// - Bring up to date with minimp3. -// -// v0.1c - 2018-03-11 -// - Fix C++ build error. -// -// v0.1b - 2018-03-07 -// - Bring up to date with minimp3. -// -// v0.1a - 2018-02-28 -// - Fix compilation error on GCC/Clang. -// - Fix some warnings. -// -// v0.1 - 2018-02-xx -// - Initial versioned release. - +/* +DIFFERENCES BETWEEN minimp3 AND dr_mp3 +====================================== +- First, keep in mind that minimp3 (https://github.com/lieff/minimp3) is where all the real work was done. All of the + code relating to the actual decoding remains mostly unmodified, apart from some namespacing changes. +- dr_mp3 adds a pulling style API which allows you to deliver raw data via callbacks. So, rather than pushing data + to the decoder, the decoder _pulls_ data from your callbacks. +- In addition to callbacks, a decoder can be initialized from a block of memory and a file. +- The dr_mp3 pull API reads PCM frames rather than whole MP3 frames. +- dr_mp3 adds convenience APIs for opening and decoding entire files in one go. +- dr_mp3 is fully namespaced, including the implementation section, which is more suitable when compiling projects + as a single translation unit (aka unity builds). At the time of writing this, a unity build is not possible when + using minimp3 in conjunction with stb_vorbis. dr_mp3 addresses this. +*/ /* +REVISION HISTORY +================ +v0.4.4 - 2019-05-06 + - Fixes to the VC6 build. + +v0.4.3 - 2019-05-05 + - Use the channel count and/or sample rate of the first MP3 frame instead of DR_MP3_DEFAULT_CHANNELS and + DR_MP3_DEFAULT_SAMPLE_RATE when they are set to 0. To use the old behaviour, just set the relevant property to + DR_MP3_DEFAULT_CHANNELS or DR_MP3_DEFAULT_SAMPLE_RATE. + - Add s16 reading APIs + - drmp3_read_pcm_frames_s16 + - drmp3_open_memory_and_read_s16 + - drmp3_open_and_read_s16 + - drmp3_open_file_and_read_s16 + - Add drmp3_get_mp3_and_pcm_frame_count() to the public header section. + - Add support for C89. + - Change license to choice of public domain or MIT-0. + +v0.4.2 - 2019-02-21 + - Fix a warning. + +v0.4.1 - 2018-12-30 + - Fix a warning. + +v0.4.0 - 2018-12-16 + - API CHANGE: Rename some APIs: + - drmp3_read_f32 -> to drmp3_read_pcm_frames_f32 + - drmp3_seek_to_frame -> drmp3_seek_to_pcm_frame + - drmp3_open_and_decode_f32 -> drmp3_open_and_read_f32 + - drmp3_open_and_decode_memory_f32 -> drmp3_open_memory_and_read_f32 + - drmp3_open_and_decode_file_f32 -> drmp3_open_file_and_read_f32 + - Add drmp3_get_pcm_frame_count(). + - Add drmp3_get_mp3_frame_count(). + - Improve seeking performance. + +v0.3.2 - 2018-09-11 + - Fix a couple of memory leaks. + - Bring up to date with minimp3. + +v0.3.1 - 2018-08-25 + - Fix C++ build. + +v0.3.0 - 2018-08-25 + - Bring up to date with minimp3. This has a minor API change: the "pcm" parameter of drmp3dec_decode_frame() has + been changed from short* to void* because it can now output both s16 and f32 samples, depending on whether or + not the DR_MP3_FLOAT_OUTPUT option is set. + +v0.2.11 - 2018-08-08 + - Fix a bug where the last part of a file is not read. + +v0.2.10 - 2018-08-07 + - Improve 64-bit detection. + +v0.2.9 - 2018-08-05 + - Fix C++ build on older versions of GCC. + - Bring up to date with minimp3. + +v0.2.8 - 2018-08-02 + - Fix compilation errors with older versions of GCC. + +v0.2.7 - 2018-07-13 + - Bring up to date with minimp3. + +v0.2.6 - 2018-07-12 + - Bring up to date with minimp3. + +v0.2.5 - 2018-06-22 + - Bring up to date with minimp3. + +v0.2.4 - 2018-05-12 + - Bring up to date with minimp3. + +v0.2.3 - 2018-04-29 + - Fix TCC build. + +v0.2.2 - 2018-04-28 + - Fix bug when opening a decoder from memory. + +v0.2.1 - 2018-04-27 + - Efficiency improvements when the decoder reaches the end of the stream. + +v0.2 - 2018-04-21 + - Bring up to date with minimp3. + - Start using major.minor.revision versioning. + +v0.1d - 2018-03-30 + - Bring up to date with minimp3. + +v0.1c - 2018-03-11 + - Fix C++ build error. + +v0.1b - 2018-03-07 + - Bring up to date with minimp3. + +v0.1a - 2018-02-28 + - Fix compilation error on GCC/Clang. + - Fix some warnings. + +v0.1 - 2018-02-xx + - Initial versioned release. +*/ + +/* +This software is available as a choice of the following licenses. Choose +whichever you prefer. + +=============================================================================== +ALTERNATIVE 1 - Public Domain (www.unlicense.org) +=============================================================================== This is free and unencumbered software released into the public domain. -Anyone is free to copy, modify, publish, use, compile, sell, or -distribute this software, either in source code form or as a compiled -binary, for any purpose, commercial or non-commercial, and by any -means. +Anyone is free to copy, modify, publish, use, compile, sell, or distribute this +software, either in source code form or as a compiled binary, for any purpose, +commercial or non-commercial, and by any means. -In jurisdictions that recognize copyright laws, the author or authors -of this software dedicate any and all copyright interest in the -software to the public domain. We make this dedication for the benefit -of the public at large and to the detriment of our heirs and -successors. We intend this dedication to be an overt act of -relinquishment in perpetuity of all present and future rights to this -software under copyright law. +In jurisdictions that recognize copyright laws, the author or authors of this +software dedicate any and all copyright interest in the software to the public +domain. We make this dedication for the benefit of the public at large and to +the detriment of our heirs and successors. We intend this dedication to be an +overt act of relinquishment in perpetuity of all present and future rights to +this software under copyright law. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR -OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. For more information, please refer to + +=============================================================================== +ALTERNATIVE 2 - MIT No Attribution +=============================================================================== +Copyright 2018 David Reid + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. */ /* From 75bcda9f34dd78733a2c4f052e117a99e968bc86 Mon Sep 17 00:00:00 2001 From: Nimetu Date: Sun, 12 May 2019 17:14:21 +0300 Subject: [PATCH 43/77] Fixed: mp3 decoder not compiled on linux/macOS --HG-- branch : develop --- code/nel/include/nel/sound/audio_decoder_mp3.h | 2 +- code/nel/src/sound/audio_decoder.cpp | 4 ++-- code/nel/src/sound/audio_decoder_mp3.cpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/code/nel/include/nel/sound/audio_decoder_mp3.h b/code/nel/include/nel/sound/audio_decoder_mp3.h index e6ef91326..d9566608d 100644 --- a/code/nel/include/nel/sound/audio_decoder_mp3.h +++ b/code/nel/include/nel/sound/audio_decoder_mp3.h @@ -18,7 +18,7 @@ #define NLSOUND_AUDIO_DECODER_MP3_H #include -#if (NL_COMP_VC_VERSION > 90) /* VS2008 does not have stdint.h */ +#if !defined(NL_OS_WINDOWS) || (NL_COMP_VC_VERSION > 90) /* VS2008 does not have stdint.h */ #include diff --git a/code/nel/src/sound/audio_decoder.cpp b/code/nel/src/sound/audio_decoder.cpp index f56f16a2e..6f558ad91 100644 --- a/code/nel/src/sound/audio_decoder.cpp +++ b/code/nel/src/sound/audio_decoder.cpp @@ -103,7 +103,7 @@ IAudioDecoder *IAudioDecoder::createAudioDecoder(const std::string &type, NLMISC { return new CAudioDecoderVorbis(stream, loop); } -#if (NL_COMP_VC_VERSION > 90) /* VS2008 does not have stdint.h */ +#if !defined(NL_OS_WINDOWS) || (NL_COMP_VC_VERSION > 90) /* VS2008 does not have stdint.h */ else if (type_lower == "mp3") { return new CAudioDecoderMP3(stream, loop); @@ -146,7 +146,7 @@ bool IAudioDecoder::getInfo(const std::string &filepath, std::string &artist, st nlwarning("Unable to open: '%s'", filepath.c_str()); } -#if (NL_COMP_VC_VERSION > 90) /* VS2008 does not have stdint.h */ +#if !defined(NL_OS_WINDOWS) || (NL_COMP_VC_VERSION > 90) /* VS2008 does not have stdint.h */ else if (type_lower == "mp3") { CIFile ifile; diff --git a/code/nel/src/sound/audio_decoder_mp3.cpp b/code/nel/src/sound/audio_decoder_mp3.cpp index fd8b1721c..47795ec6e 100644 --- a/code/nel/src/sound/audio_decoder_mp3.cpp +++ b/code/nel/src/sound/audio_decoder_mp3.cpp @@ -17,7 +17,7 @@ #include "stdsound.h" -#if (NL_COMP_VC_VERSION > 90) /* VS2008 does not have stdint.h */ +#if !defined(NL_OS_WINDOWS) || (NL_COMP_VC_VERSION > 90) /* VS2008 does not have stdint.h */ #include From 33a3ad04f5bcbeaf36fc7dd86da67e8e2c2530d2 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Mon, 13 May 2019 04:02:37 +0800 Subject: [PATCH 44/77] Retry ligo export on crash --- .../build_gamedata/processes/ligo/1_export.py | 57 ++++++++++++++++--- .../ligo/maxscript/nel_ligo_export.ms | 45 ++++++++++++++- 2 files changed, 92 insertions(+), 10 deletions(-) diff --git a/code/nel/tools/build_gamedata/processes/ligo/1_export.py b/code/nel/tools/build_gamedata/processes/ligo/1_export.py index 09be53494..4077ddb1c 100755 --- a/code/nel/tools/build_gamedata/processes/ligo/1_export.py +++ b/code/nel/tools/build_gamedata/processes/ligo/1_export.py @@ -61,8 +61,9 @@ if LigoExportLand == "" or LigoExportOnePass == 1: mkPath(log, ExportBuildDirectory + "/" + LigoEcosystemZoneLigoExportDirectory) mkPath(log, ExportBuildDirectory + "/" + LigoEcosystemCmbExportDirectory) mkPath(log, DatabaseDirectory + "/" + ZoneSourceDirectory[0]) - mkPath(log, ExportBuildDirectory + "/" + LigoEcosystemTagExportDirectory) - if (needUpdateDirByTagLogFiltered(log, DatabaseDirectory + "/" + LigoMaxSourceDirectory, ".max", ExportBuildDirectory + "/" + LigoEcosystemTagExportDirectory, ".max.tag", [ "zonematerial", "zonetransition", "zonespecial" ])): + tagDirectory = ExportBuildDirectory + "/" + LigoEcosystemTagExportDirectory + mkPath(log, tagDirectory) + if (needUpdateDirByTagLogFiltered(log, DatabaseDirectory + "/" + LigoMaxSourceDirectory, ".max", tagDirectory, ".max.tag", [ "zonematerial", "zonetransition", "zonespecial" ])): printLog(log, "WRITE " + ligoIniPath) ligoIni = open(ligoIniPath, "w") ligoIni.write("[LigoConfig]\n") @@ -71,29 +72,69 @@ if LigoExportLand == "" or LigoExportOnePass == 1: ligoIni.write("LigoOldZonePath=" + DatabaseDirectory + "/" + ZoneSourceDirectory[0] + "/\n") ligoIni.close() - outDirTag = ExportBuildDirectory + "/" + LigoEcosystemTagExportDirectory - logFile = ScriptDirectory + "/processes/ligo/log.log" + outputLogfile = ScriptDirectory + "/processes/ligo/log.log" smallBank = ExportBuildDirectory + "/" + SmallbankExportDirectory + "/" + BankTileBankName + ".smallbank" + maxRunningTagFile = tagDirectory + "/max_running.tag" scriptSrc = "maxscript/nel_ligo_export.ms" scriptDst = MaxUserDirectory + "/scripts/nel_ligo_export.ms" + tagList = findFiles(log, tagDirectory, "", ".max.tag") + tagLen = len(tagList) + if os.path.isfile(scriptDst): os.remove(scriptDst) + tagDiff = 1 printLog(log, "WRITE " + scriptDst) sSrc = open(scriptSrc, "r") sDst = open(scriptDst, "w") for line in sSrc: - newline = line.replace("output_logfile", logFile) - newline = newline.replace("output_directory_tag", outDirTag) + newline = line.replace("output_logfile", outputLogfile) + newline = newline.replace("output_directory_tag", tagDirectory) newline = newline.replace("bankFilename", smallBank) sDst.write(newline) sSrc.close() sDst.close() - printLog(log, "MAXSCRIPT " + scriptDst) - subprocess.call([ Max, "-U", "MAXScript", "nel_ligo_export.ms", "-q", "-mi", "-mip" ]) + zeroRetryLimit = 3 + while tagDiff > 0: + mrt = open(maxRunningTagFile, "w") + mrt.write("moe-moe-kyun") + mrt.close() + printLog(log, "MAXSCRIPT " + scriptDst) + subprocess.call([ Max, "-U", "MAXScript", "nel_ligo_export.ms", "-q", "-mi", "-mip" ]) + if os.path.exists(outputLogfile): + try: + lSrc = open(outputLogfile, "r") + for line in lSrc: + lineStrip = line.strip() + if (len(lineStrip) > 0): + printLog(log, lineStrip) + lSrc.close() + os.remove(outputLogfile) + except Exception: + printLog(log, "ERROR Failed to read 3dsmax log") + else: + printLog(log, "WARNING No 3dsmax log") + tagList = findFiles(log, tagDirectory, "", ".max.tag") + newTagLen = len(tagList) + tagDiff = newTagLen - tagLen + tagLen = newTagLen + addTagDiff = 0 + if os.path.exists(maxRunningTagFile): + printLog(log, "FAIL 3ds Max crashed and/or file export failed!") + if tagDiff == 0: + if zeroRetryLimit > 0: + zeroRetryLimit = zeroRetryLimit - 1 + addTagDiff = 1 + else: + printLog(log, "FAIL Retry limit reached!") + else: + addTagDiff = 1 + os.remove(maxRunningTagFile) + printLog(log, "Exported " + str(tagDiff) + " .max files!") + tagDiff += addTagDiff os.remove(scriptDst) printLog(log, "") diff --git a/code/nel/tools/build_gamedata/processes/ligo/maxscript/nel_ligo_export.ms b/code/nel/tools/build_gamedata/processes/ligo/maxscript/nel_ligo_export.ms index 07d032809..e1d5de20e 100755 --- a/code/nel/tools/build_gamedata/processes/ligo/maxscript/nel_ligo_export.ms +++ b/code/nel/tools/build_gamedata/processes/ligo/maxscript/nel_ligo_export.ms @@ -16,6 +16,7 @@ TransitionNumBis = #( 5, 4, 2, 3, 7, 6, 0, 1, 8) NEL3D_APPDATA_IGNAME = 1423062564 -- string : name of the Instance Group tagThisFile = true +removeRunningTag = true -- Unhide layers fn unhidelayers = @@ -599,6 +600,7 @@ try if tagFile == undefined then ( nlerror ("WARNING can't create tag file "+tag) + removeRunningTag = false ) else ( @@ -606,6 +608,10 @@ try close tagFile ) ) + else + ( + removeRunningTag = false + ) resetMAXFile #noprompt gc () @@ -832,6 +838,7 @@ try if tagFile == undefined then ( nlerror ("WARNING can't create tag file "+tag) + removeRunningTag = false ) else ( @@ -839,6 +846,10 @@ try close tagFile ) ) + else + ( + removeRunningTag = false + ) ) resetMAXFile #noprompt @@ -956,6 +967,7 @@ try if tagFile == undefined then ( nlerror ("WARNING can't create tag file "+tag) + removeRunningTag = false ) else ( @@ -963,6 +975,10 @@ try close tagFile ) ) + else + ( + removeRunningTag = false + ) resetMAXFile #noprompt gc () @@ -978,13 +994,38 @@ try catch ( -- Error - nlerror ("ERROR fatal error exporting ligo zone in folder"+ligo_root_path) + nlerror("ERROR fatal error exporting ligo zone in folder"+ligo_root_path) + nlerror("FAIL Fatal error occurred") + NelForceQuitRightNow() + removeRunningTag = false tagThisFile = false ) +try +( + if (removeRunningTag) then + ( + resetMAXFile #noPrompt + ) +) +catch +( + nlerror("FAIL Last reset fails") + removeRunningTag = false +) +if (removeRunningTag) then +( + nlerror("SUCCESS All .max files have been successfully exported") + deleteFile("%TagDirectory%/max_running.tag") +) +else +( + nlerror("FAIL One or more issues occurred") + NelForceQuitRightNow() +) -resetMAXFile #noprompt +nlerror("BYE") quitMAX #noPrompt quitMAX () #noPrompt From 20920be7bdd95214abd0d3e14e392ea8b393164c Mon Sep 17 00:00:00 2001 From: kaetemi Date: Mon, 13 May 2019 09:14:59 +0800 Subject: [PATCH 45/77] Fix ligoscape.cfg load --- code/nel/tools/3d/ligo/plugin_max/max_to_ligo.cpp | 2 +- code/nel/tools/3d/plugin_max/nel_patch_paint/paint.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/code/nel/tools/3d/ligo/plugin_max/max_to_ligo.cpp b/code/nel/tools/3d/ligo/plugin_max/max_to_ligo.cpp index a4d41649f..c09158a05 100644 --- a/code/nel/tools/3d/ligo/plugin_max/max_to_ligo.cpp +++ b/code/nel/tools/3d/ligo/plugin_max/max_to_ligo.cpp @@ -134,7 +134,7 @@ bool CMaxToLigo::loadLigoConfigFile (CLigoConfig& config, Interface& it, bool di if (res) { // Path - std::string path = NLMISC::CFile::getPath(MCharStrToUtf8(sModulePath) + "ligoscape.cfg"); + std::string path = NLMISC::CFile::getPath(MCharStrToUtf8(sModulePath)) + "ligoscape.cfg"; try { diff --git a/code/nel/tools/3d/plugin_max/nel_patch_paint/paint.cpp b/code/nel/tools/3d/plugin_max/nel_patch_paint/paint.cpp index 8f3912b0e..5c5bd82f8 100644 --- a/code/nel/tools/3d/plugin_max/nel_patch_paint/paint.cpp +++ b/code/nel/tools/3d/plugin_max/nel_patch_paint/paint.cpp @@ -4063,7 +4063,7 @@ bool loadLigoConfigFile (CLigoConfig& config, Interface& it) if (res) { // Path - std::string modulePath = NLMISC::CFile::getPath(MCharStrToUtf8(sModulePath)); + std::string modulePath = NLMISC::CFile::getPath(MCharStrToUtf8(sModulePath)) + "ligoscape.cfg"; try { From 8d96487b6973cbcdcf12b260ca98eb8e4bd15c4c Mon Sep 17 00:00:00 2001 From: kaetemi Date: Mon, 13 May 2019 09:15:37 +0800 Subject: [PATCH 46/77] Quit max on ligoscape export error --- .../build_gamedata/processes/ligo/maxscript/nel_ligo_export.ms | 3 +++ 1 file changed, 3 insertions(+) diff --git a/code/nel/tools/build_gamedata/processes/ligo/maxscript/nel_ligo_export.ms b/code/nel/tools/build_gamedata/processes/ligo/maxscript/nel_ligo_export.ms index e1d5de20e..bbeffe495 100755 --- a/code/nel/tools/build_gamedata/processes/ligo/maxscript/nel_ligo_export.ms +++ b/code/nel/tools/build_gamedata/processes/ligo/maxscript/nel_ligo_export.ms @@ -86,6 +86,9 @@ fn lowercase instring = -- Allocate 20 Me for the script heapSize += 15000000 +-- In case of error just abort the app and don't show nel report window +NelForceQuitOnMsgDisplayer() + nlErrorFilename = "output_logfile" nlErrorStream = openFile nlErrorFilename mode:"a" if nlErrorStream == undefined then From 8bae2ef613e49118988fbe7a6081a2962693a60f Mon Sep 17 00:00:00 2001 From: kaetemi Date: Mon, 13 May 2019 09:24:53 +0800 Subject: [PATCH 47/77] Save shapes in lowercase --- .../3d/plugin_max/nel_export/nel_export.cpp | 8 +++---- .../generators/max_exporter_scripts/shape.ms | 24 +++++++++++++++++-- .../processes/shape/maxscript/shape_export.ms | 24 +++++++++++++++++-- 3 files changed, 48 insertions(+), 8 deletions(-) diff --git a/code/nel/tools/3d/plugin_max/nel_export/nel_export.cpp b/code/nel/tools/3d/plugin_max/nel_export/nel_export.cpp index a44167294..fdedc9a3d 100644 --- a/code/nel/tools/3d/plugin_max/nel_export/nel_export.cpp +++ b/code/nel/tools/3d/plugin_max/nel_export/nel_export.cpp @@ -354,7 +354,7 @@ static INT_PTR CALLBACK CNelExportDlgProc(HWND hWnd, UINT msg, WPARAM wParam, LP if (RPO::isZone (*pNode, time)) { // Save path - std::string sSavePath = MCharStrToUtf8(pNode->GetName()); + std::string sSavePath = NLMISC::toLower(MCharStrToUtf8(pNode->GetName())); // Choose a file to export if (!CExportNel::getScriptAppData (pNode, NEL3D_APPDATA_DONTEXPORT, 0)) @@ -372,7 +372,7 @@ static INT_PTR CALLBACK CNelExportDlgProc(HWND hWnd, UINT msg, WPARAM wParam, LP else if (CExportNel::isVegetable (*pNode, time)) { // Save path - std::string sSavePath = MCharStrToUtf8(pNode->GetName()); + std::string sSavePath = NLMISC::toLower(MCharStrToUtf8(pNode->GetName())); // Choose a file to export if (!CExportNel::getScriptAppData (pNode, NEL3D_APPDATA_DONTEXPORT, 0)) @@ -391,7 +391,7 @@ static INT_PTR CALLBACK CNelExportDlgProc(HWND hWnd, UINT msg, WPARAM wParam, LP else if (CExportNel::isLodCharacter (*pNode, time)) { // Save path - std::string sSavePath = MCharStrToUtf8(pNode->GetName()); + std::string sSavePath = NLMISC::toLower(MCharStrToUtf8(pNode->GetName())); // Choose a file to export if (!CExportNel::getScriptAppData (pNode, NEL3D_APPDATA_DONTEXPORT, 0)) @@ -410,7 +410,7 @@ static INT_PTR CALLBACK CNelExportDlgProc(HWND hWnd, UINT msg, WPARAM wParam, LP else if (CExportNel::isMesh (*pNode, time)) { // Save path - std::string sSavePath = MCharStrToUtf8(pNode->GetName()); + std::string sSavePath = NLMISC::toLower(MCharStrToUtf8(pNode->GetName())); // Choose a file to export if (!CExportNel::getScriptAppData (pNode, NEL3D_APPDATA_DONTEXPORT, 0)) diff --git a/code/nel/tools/build_gamedata/generators/max_exporter_scripts/shape.ms b/code/nel/tools/build_gamedata/generators/max_exporter_scripts/shape.ms index a3b28bc02..590dcab75 100755 --- a/code/nel/tools/build_gamedata/generators/max_exporter_scripts/shape.ms +++ b/code/nel/tools/build_gamedata/generators/max_exporter_scripts/shape.ms @@ -26,6 +26,26 @@ NEL3D_APPDATA_COLLISION = 1423062613 NEL3D_APPDATA_COLLISION_EXTERIOR = 1423062614 NEL3D_APPDATA_AUTOMATIC_ANIMATION = 1423062617 +-- Lower case +fn lowercase instring = +( + local upper, lower, outstring + upper="ABCDEFGHIJKLMNOPQRSTUVWXYZ" + lower="abcdefghijklmnopqrstuvwxyz" + + outstring = copy instring + + for iii = 1 to outstring.count do + ( + jjj = findString upper outstring[iii] + if (jjj != undefined) then + outstring[iii] = lower[jjj] + else + outstring[iii] = instring[iii] + ) + return outstring -- value of outstring will be returned as function result +) + -- This node is n accelerator ? fn isAccelerator node = ( @@ -287,9 +307,9 @@ fn runNelMaxExportSub inputMaxFile retryCount = ( -- Output directory if (haveCoarseMesh node) == true then - output = ("%OutputDirectoryWithCoarseMesh%/" + (node.name) + ".shape") + output = ("%OutputDirectoryWithCoarseMesh%/" + lowercase(node.name) + ".shape") else - output = ("%OutputDirectoryWithoutCoarseMesh%/" + (node.name) + ".shape") + output = ("%OutputDirectoryWithoutCoarseMesh%/" + lowercase(node.name) + ".shape") -- Compare file date if (NeLTestFileDate output inputMaxFile) == true then diff --git a/code/nel/tools/build_gamedata/processes/shape/maxscript/shape_export.ms b/code/nel/tools/build_gamedata/processes/shape/maxscript/shape_export.ms index 375fe8eea..9df535d1d 100755 --- a/code/nel/tools/build_gamedata/processes/shape/maxscript/shape_export.ms +++ b/code/nel/tools/build_gamedata/processes/shape/maxscript/shape_export.ms @@ -102,6 +102,26 @@ NEL3D_APPDATA_COLLISION = 1423062613 NEL3D_APPDATA_COLLISION_EXTERIOR = 1423062614 NEL3D_APPDATA_AUTOMATIC_ANIMATION = 1423062617 +-- Lower case +fn lowercase instring = +( + local upper, lower, outstring + upper="ABCDEFGHIJKLMNOPQRSTUVWXYZ" + lower="abcdefghijklmnopqrstuvwxyz" + + outstring = copy instring + + for iii = 1 to outstring.count do + ( + jjj = findString upper outstring[iii] + if (jjj != undefined) then + outstring[iii] = lower[jjj] + else + outstring[iii] = instring[iii] + ) + return outstring -- value of outstring will be returned as function result +) + -- This node is n accelerator ? fn isAccelerator node = ( @@ -363,9 +383,9 @@ fn runNelMaxExportSub inputMaxFile retryCount = ( -- Output directory if (haveCoarseMesh node) == true then - output = ("%OutputDirectoryWithCoarseMesh%/" + (node.name) + ".shape") + output = ("%OutputDirectoryWithCoarseMesh%/" + lowercase(node.name) + ".shape") else - output = ("%OutputDirectoryWithoutCoarseMesh%/" + (node.name) + ".shape") + output = ("%OutputDirectoryWithoutCoarseMesh%/" + lowercase(node.name) + ".shape") -- Compare file date if (NeLTestFileDate output inputMaxFile) == true then From 2d29e7224fdab31b0773461613eb63c62ffa0440 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Mon, 13 May 2019 09:33:01 +0800 Subject: [PATCH 48/77] Fix ligo export log --- code/nel/tools/build_gamedata/processes/ligo/1_export.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/code/nel/tools/build_gamedata/processes/ligo/1_export.py b/code/nel/tools/build_gamedata/processes/ligo/1_export.py index 4077ddb1c..dc0e0d4b4 100755 --- a/code/nel/tools/build_gamedata/processes/ligo/1_export.py +++ b/code/nel/tools/build_gamedata/processes/ligo/1_export.py @@ -29,7 +29,9 @@ sys.path.append("../../configuration") if os.path.isfile("log.log"): os.remove("log.log") -log = open("log.log", "w") +if os.path.isfile("temp_log.log"): + os.remove("temp_log.log") +log = open("temp_log.log", "w") from scripts import * from buildsite import * from process import * @@ -140,6 +142,9 @@ if LigoExportLand == "" or LigoExportOnePass == 1: printLog(log, "") log.close() +if os.path.isfile("log.log"): + os.remove("log.log") +shutil.move("temp_log.log", "log.log") # end of file From 76d88f546af9f7c34b7aa1ed7ad7a56d3ff5a0a0 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Mon, 13 May 2019 10:58:20 +0800 Subject: [PATCH 49/77] Cleanup ligo export script --- .../build_gamedata/processes/ligo/1_export.py | 6 +- .../ligo/maxscript/nel_ligo_export.ms | 112 ++++++++++++------ 2 files changed, 76 insertions(+), 42 deletions(-) diff --git a/code/nel/tools/build_gamedata/processes/ligo/1_export.py b/code/nel/tools/build_gamedata/processes/ligo/1_export.py index dc0e0d4b4..e0f9bab77 100755 --- a/code/nel/tools/build_gamedata/processes/ligo/1_export.py +++ b/code/nel/tools/build_gamedata/processes/ligo/1_export.py @@ -92,9 +92,9 @@ if LigoExportLand == "" or LigoExportOnePass == 1: sSrc = open(scriptSrc, "r") sDst = open(scriptDst, "w") for line in sSrc: - newline = line.replace("output_logfile", outputLogfile) - newline = newline.replace("output_directory_tag", tagDirectory) - newline = newline.replace("bankFilename", smallBank) + newline = line.replace("%OutputLogfile%", outputLogfile) + newline = newline.replace("%TagDirectory%", tagDirectory) + newline = newline.replace("%SmallBankFilename%", smallBank) sDst.write(newline) sSrc.close() sDst.close() diff --git a/code/nel/tools/build_gamedata/processes/ligo/maxscript/nel_ligo_export.ms b/code/nel/tools/build_gamedata/processes/ligo/maxscript/nel_ligo_export.ms index bbeffe495..c74c4b916 100755 --- a/code/nel/tools/build_gamedata/processes/ligo/maxscript/nel_ligo_export.ms +++ b/code/nel/tools/build_gamedata/processes/ligo/maxscript/nel_ligo_export.ms @@ -89,7 +89,7 @@ heapSize += 15000000 -- In case of error just abort the app and don't show nel report window NelForceQuitOnMsgDisplayer() -nlErrorFilename = "output_logfile" +nlErrorFilename = "%OutputLogfile%" nlErrorStream = openFile nlErrorFilename mode:"a" if nlErrorStream == undefined then nlErrorStream = createFile nlErrorFilename @@ -237,16 +237,19 @@ fn isToBeExportedCollision node = return false ) --- Export collisions from the current loaded zone -fn exportCollisionsFromZone outputNelDir filename = +fn selectCollisionsForExport = ( -- Select all collision mesh max select none clearSelection() + anySelected = false; for m in geometry do ( if (isToBeExportedCollision m) == true then + ( selectmore m + anySelected = true + ) ) for node in objects where classOf node == XRefObject do ( @@ -254,10 +257,18 @@ fn exportCollisionsFromZone outputNelDir filename = if (superclassOf sourceObject == GeometryClass) then ( if (isToBeExportedCollision node) == true then + ( selectmore node + anySelected = true + ) ) ) - + return anySelected +) + +-- Export collisions from the current loaded zone +fn exportCollisionsFromZone outputNelDir filename = +( -- Export the collision if (NelExportCollision ($selection as array) outputNelDir) == false then ( @@ -388,8 +399,8 @@ fn exportInstanceGroupFromZone inputFile outputPath igName transitionZone cellSi output = (outputPath + ig_array[ig] + ".ig") -- Check date - if (NeLTestFileDate output inputFile) == true then - ( + -- if (NeLTestFileDate output inputFile) == true then + -- ( -- Select none max select none clearSelection() @@ -460,12 +471,12 @@ fn exportInstanceGroupFromZone inputFile outputPath igName transitionZone cellSi nlerror ("ERROR fatal error exporting ig "+ig_array[ig]+" in file "+inputFile) tagThisFile = false ) - ) - else - ( - nlerror ("SKIPPED ligo ig "+output) - tagThisFile = false - ) + -- ) + -- else + -- ( + -- nlerror ("SKIPPED ligo ig "+output) + -- tagThisFile = false + -- ) ) ) ) @@ -488,7 +499,7 @@ MaxFilesList = getFiles (ligo_root_path + "*.max") try ( -- Set the bank pathname - bank_filename = "bankFilename" + bank_filename = "%SmallBankFilename%" NelSetTileBank bank_filename cellSize = NeLLigoGetCellSize () @@ -504,7 +515,7 @@ try if (tokenArray.count == 3) and (tokenArray[1] == "zonematerial") then ( -- Get the tag file name - tag = ("output_directory_tag/"+(getFilenameFile curFileName)+(getFilenameType curFileName)+".tag") + tag = ("%TagDirectory%/"+(getFilenameFile curFileName)+(getFilenameType curFileName)+".tag") -- Compare date with the tag file if (NeLTestFileDate tag curFileName) == true then @@ -584,21 +595,27 @@ try ) -- export collisions - try + if selectCollisionsForExport() then ( - nlerror("exportCollisionsFromZone " + curFileName) - exportCollisionsFromZone (ligo_export_path + "cmb\\") curFileName - ) - catch - ( - nlerror("couldn't export collision for " + curFileName) - tagThisFile = false + try + ( + nlerror("exportCollisionsFromZone " + curFileName) + exportCollisionsFromZone (ligo_export_path + "cmb\\") curFileName + nlerror("past exportCollisionsFromZone") + ) + catch + ( + nlerror("couldn't export collision for " + curFileName) + tagThisFile = false + ) ) -- Write a tag file + nlerror("check to write tag") if tagThisFile == true then ( - nlerror("tagThisFile " + curFileName) + nlerror("TAG " + curFileName) + nlerror("TAGFILE " + tag) tagFile = createFile tag if tagFile == undefined then ( @@ -613,6 +630,7 @@ try ) else ( + nlerror("NOT TAGGING " + curFileName) removeRunningTag = false ) @@ -657,7 +675,7 @@ try ) -- Get the tag file name - tag = ("output_directory_tag/"+(getFilenameFile curFileName)+(getFilenameType curFileName)+".tag") + tag = ("%TagDirectory%/"+(getFilenameFile curFileName)+(getFilenameType curFileName)+".tag") -- Compare date with the tag file if (NeLTestFileDate tag curFileName) == true then @@ -813,6 +831,7 @@ try -- export igs try ( + nlerror("exportInstanceGroupFromZone " + curFileName) exportInstanceGroupFromZone curFileName (ligo_export_path + "igs\\") (lowercase (zoneBaseName)) zone cellSize ) catch @@ -822,14 +841,18 @@ try ) -- export collisions - try + if selectCollisionsForExport() then ( - exportCollisionsFromZone (ligo_export_path + "cmb\\") curFileName - ) - catch - ( - nlerror("couldn't export collision for " + curFileName) - tagThisFile = false + try + ( + nlerror("exportCollisionsFromZone " + curFileName) + exportCollisionsFromZone (ligo_export_path + "cmb\\") curFileName + ) + catch + ( + nlerror("couldn't export collision for " + curFileName) + tagThisFile = false + ) ) ) ) @@ -837,6 +860,8 @@ try -- Write a tag file if tagThisFile == true then ( + nlerror("TAG " + curFileName) + nlerror("TAGFILE " + tag) tagFile = createFile tag if tagFile == undefined then ( @@ -851,6 +876,7 @@ try ) else ( + nlerror("NOT TAGGING " + curFileName) removeRunningTag = false ) ) @@ -878,7 +904,7 @@ try if (tokenArray.count == 2) and (tokenArray[1] == "zonespecial") then ( -- Get the tag file name - tag = ("output_directory_tag/"+(getFilenameFile curFileName)+(getFilenameType curFileName)+".tag") + tag = ("%TagDirectory%/"+(getFilenameFile curFileName)+(getFilenameType curFileName)+".tag") -- Compare date with the tag file if (NeLTestFileDate tag curFileName) == true then @@ -944,6 +970,7 @@ try -- export matching igs try ( + nlerror("exportInstanceGroupFromZone " + curFileName) exportInstanceGroupFromZone curFileName (ligo_export_path + "igs\\") "" 0 cellSize ) catch @@ -953,19 +980,25 @@ try ) -- export collisions - try + if selectCollisionsForExport() then ( - exportCollisionsFromZone (ligo_export_path + "cmb\\") curFileName - ) - catch - ( - nlerror("couldn't export collision for " + curFileName) - tagThisFile = false + try + ( + nlerror("exportCollisionsFromZone " + curFileName) + exportCollisionsFromZone (ligo_export_path + "cmb\\") curFileName + ) + catch + ( + nlerror("couldn't export collision for " + curFileName) + tagThisFile = false + ) ) -- Write a tag file if tagThisFile == true then ( + nlerror("TAG " + curFileName) + nlerror("TAGFILE " + tag) tagFile = createFile tag if tagFile == undefined then ( @@ -980,6 +1013,7 @@ try ) else ( + nlerror("NOT TAGGING " + curFileName) removeRunningTag = false ) From f3c45d7e8228442e2f97e9ad7f47ced2bb3ecab5 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Mon, 13 May 2019 11:12:45 +0800 Subject: [PATCH 50/77] Don't block on warnings during ligo export --- .../ligo/maxscript/nel_ligo_export.ms | 41 +++++++++++++++---- 1 file changed, 34 insertions(+), 7 deletions(-) diff --git a/code/nel/tools/build_gamedata/processes/ligo/maxscript/nel_ligo_export.ms b/code/nel/tools/build_gamedata/processes/ligo/maxscript/nel_ligo_export.ms index c74c4b916..90f8b1b26 100755 --- a/code/nel/tools/build_gamedata/processes/ligo/maxscript/nel_ligo_export.ms +++ b/code/nel/tools/build_gamedata/processes/ligo/maxscript/nel_ligo_export.ms @@ -84,7 +84,7 @@ fn lowercase instring = ) -- Allocate 20 Me for the script -heapSize += 15000000 +heapSize += 30000000 -- In case of error just abort the app and don't show nel report window NelForceQuitOnMsgDisplayer() @@ -526,8 +526,17 @@ try resetMAXFile #noprompt nlerror ("Scanning file "+curFileName+" ...") - mergeMaxFile curFileName quiet:true - objXRefMgr.UpdateAllRecords() + loadMaxFile curFileName quiet:true + try + ( + nlerror("Update XRef records...") + objXRefMgr.UpdateAllRecords() + ) + catch + ( + nlerror("ERROR Failed to update XRef! (DON'T TAG)...") + tagThisFile = false + ) -- Unhide category unhidelayers() @@ -686,8 +695,17 @@ try resetMAXFile #noprompt nlerror ("Scanning file "+curFileName+" ...") - mergeMaxFile curFileName quiet:true - objXRefMgr.UpdateAllRecords() + loadMaxFile curFileName quiet:true + try + ( + nlerror("Update XRef records...") + objXRefMgr.UpdateAllRecords() + ) + catch + ( + nlerror("ERROR Failed to update XRef! (DON'T TAG)...") + tagThisFile = false + ) -- Unhide category unhidelayers() @@ -915,8 +933,17 @@ try resetMAXFile #noprompt nlerror ("Scanning file "+curFileName+" ...") - mergeMaxFile curFileName quiet:true - objXRefMgr.UpdateAllRecords() + loadMaxFile curFileName quiet:true + try + ( + nlerror("Update XRef records...") + objXRefMgr.UpdateAllRecords() + ) + catch + ( + nlerror("ERROR Failed to update XRef! (DON'T TAG)...") + tagThisFile = false + ) -- Unhide category unhidelayers() From 5d9e1d9bf8024f6b290fa24c262f9200f78fd8e7 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Mon, 13 May 2019 19:58:50 +0800 Subject: [PATCH 51/77] Fix ligo export --- code/nel/src/ligo/zone_bank.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/nel/src/ligo/zone_bank.cpp b/code/nel/src/ligo/zone_bank.cpp index b1c6b73c6..c26205316 100644 --- a/code/nel/src/ligo/zone_bank.cpp +++ b/code/nel/src/ligo/zone_bank.cpp @@ -508,7 +508,7 @@ bool CZoneBank::initFromPath(const std::string &sPathName, std::string &error) if (ext == "ligozone") { - if (!addElement(NLMISC::CFile::getFilename(files[i]), error)) + if (!addElement(files[i], error)) return false; } } From 6cc30e7e6b40dd11fd9f18ec81c58e83ef381862 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Tue, 14 May 2019 05:00:00 +0800 Subject: [PATCH 52/77] Resave world editor rc --- .../world_editor/world_editor/resource.h | 20 +- .../world_editor/world_editor/world_editor.rc | 632 +++++++++--------- 2 files changed, 311 insertions(+), 341 deletions(-) diff --git a/code/ryzom/tools/leveldesign/world_editor/world_editor/resource.h b/code/ryzom/tools/leveldesign/world_editor/world_editor/resource.h index 2a294d748..d90a7e8c0 100644 --- a/code/ryzom/tools/leveldesign/world_editor/world_editor/resource.h +++ b/code/ryzom/tools/leveldesign/world_editor/world_editor/resource.h @@ -1,21 +1,5 @@ -// Ryzom - MMORPG Framework -// Copyright (C) 2010 Winch Gate Property Limited -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU Affero General Public License as -// published by the Free Software Foundation, either version 3 of the -// License, or (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public License -// along with this program. If not, see . - //{{NO_DEPENDENCIES}} -// Microsoft Developer Studio generated include file. +// Microsoft Visual C++ generated include file. // Used by world_editor.rc // #define IDC_BROWSE 3 @@ -341,7 +325,7 @@ #ifdef APSTUDIO_INVOKED #ifndef APSTUDIO_READONLY_SYMBOLS #define _APS_3D_CONTROLS 1 -#define _APS_NEXT_RESOURCE_VALUE 178 +#define _APS_NEXT_RESOURCE_VALUE 179 #define _APS_NEXT_COMMAND_VALUE 33485 #define _APS_NEXT_CONTROL_VALUE 1022 #define _APS_NEXT_SYMED_VALUE 101 diff --git a/code/ryzom/tools/leveldesign/world_editor/world_editor/world_editor.rc b/code/ryzom/tools/leveldesign/world_editor/world_editor/world_editor.rc index 4a790bf23..6a03f0390 100644 --- a/code/ryzom/tools/leveldesign/world_editor/world_editor/world_editor.rc +++ b/code/ryzom/tools/leveldesign/world_editor/world_editor/world_editor.rc @@ -1,4 +1,4 @@ -//Microsoft Developer Studio generated resource script. +// Microsoft Visual C++ generated resource script. // #include "resource.h" @@ -16,10 +16,8 @@ // English resources #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) -#ifdef _WIN32 LANGUAGE LANG_ENGLISH, SUBLANG_NEUTRAL #pragma code_page(1252) -#endif //_WIN32 #ifdef APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// @@ -27,18 +25,18 @@ LANGUAGE LANG_ENGLISH, SUBLANG_NEUTRAL // TEXTINCLUDE // -1 TEXTINCLUDE DISCARDABLE +1 TEXTINCLUDE BEGIN "resource.h\0" END -2 TEXTINCLUDE DISCARDABLE +2 TEXTINCLUDE BEGIN "#include ""afxres.h""\r\n" "\0" END -3 TEXTINCLUDE DISCARDABLE +3 TEXTINCLUDE BEGIN "#define _AFX_NO_OLE_RESOURCES\r\n" "#define _AFX_NO_TRACKER_RESOURCES\r\n" @@ -69,41 +67,63 @@ END // Icon with lowest ID value placed first to ensure application icon // remains consistent on all systems. -IDR_MAINFRAME ICON DISCARDABLE "res\\world_editor.ico" -IDR_WORLDETYPE ICON DISCARDABLE "res\\world_editor_doc.ico" -IDI_FOLDER_CLOSED ICON DISCARDABLE "res\\folder_closed.ico" -IDI_POINT_OPENED ICON DISCARDABLE "res\\point_opened.ico" -IDI_LINE_OPENED ICON DISCARDABLE "res\\line_opened.ico" -IDI_ZONE_OPENED ICON DISCARDABLE "res\\zone_opened.ico" -IDI_FOLDER_OPENED ICON DISCARDABLE "res\\folder_opened.ico" -IDI_PROPERTY_CLOSED ICON DISCARDABLE "res\\property_closed.ico" -IDI_ROOT_CLOSED ICON DISCARDABLE "res\\root_closed.ico" -IDI_PROPERTY_OPENED ICON DISCARDABLE "res\\property_opened.ico" -IDI_LINE_CLOSED ICON DISCARDABLE "res\\line_closed.ico" -IDI_POINT_CLOSED ICON DISCARDABLE "res\\point_closed.ico" -IDI_ZONE_CLOSED ICON DISCARDABLE "res\\zone_closed.ico" -IDI_ROOT_OPENED ICON DISCARDABLE "res\\root_opened.ico" -IDI_FOLDER_HIDDEN ICON DISCARDABLE "res\\folder_hidden.ico" -IDI_LINE_HIDDEN ICON DISCARDABLE "res\\line_hidden.ico" -IDI_POINT_HIDDEN ICON DISCARDABLE "res\\point_hidden.ico" -IDI_PROPERTY_HIDDEN ICON DISCARDABLE "res\\property_hidden.ico" -IDI_ROOT_HIDDEN ICON DISCARDABLE "res\\root_hidden.ico" -IDI_ZONE_HIDDEN ICON DISCARDABLE "res\\zone_hidden.ico" -IDI_ERROR_STRUCTURE ICON DISCARDABLE "res\\erro.ico" +IDR_MAINFRAME ICON "res\\world_editor.ico" + +IDR_WORLDETYPE ICON "res\\world_editor_doc.ico" + +IDI_FOLDER_CLOSED ICON "res\\folder_closed.ico" + +IDI_POINT_OPENED ICON "res\\point_opened.ico" + +IDI_LINE_OPENED ICON "res\\line_opened.ico" + +IDI_ZONE_OPENED ICON "res\\zone_opened.ico" + +IDI_FOLDER_OPENED ICON "res\\folder_opened.ico" + +IDI_PROPERTY_CLOSED ICON "res\\property_closed.ico" + +IDI_ROOT_CLOSED ICON "res\\root_closed.ico" + +IDI_PROPERTY_OPENED ICON "res\\property_opened.ico" + +IDI_LINE_CLOSED ICON "res\\line_closed.ico" + +IDI_POINT_CLOSED ICON "res\\point_closed.ico" + +IDI_ZONE_CLOSED ICON "res\\zone_closed.ico" + +IDI_ROOT_OPENED ICON "res\\root_opened.ico" + +IDI_FOLDER_HIDDEN ICON "res\\folder_hidden.ico" + +IDI_LINE_HIDDEN ICON "res\\line_hidden.ico" + +IDI_POINT_HIDDEN ICON "res\\point_hidden.ico" + +IDI_PROPERTY_HIDDEN ICON "res\\property_hidden.ico" + +IDI_ROOT_HIDDEN ICON "res\\root_hidden.ico" + +IDI_ZONE_HIDDEN ICON "res\\zone_hidden.ico" + +IDI_ERROR_STRUCTURE ICON "res\\erro.ico" + ///////////////////////////////////////////////////////////////////////////// // // Bitmap // -IDR_MAINFRAME BITMAP MOVEABLE PURE "res\\Toolbar.bmp" +IDR_MAINFRAME BITMAP "res\\Toolbar.bmp" + ///////////////////////////////////////////////////////////////////////////// // // Toolbar // -IDR_MAINFRAME TOOLBAR DISCARDABLE 16, 16 +IDR_MAINFRAME TOOLBAR 16, 16 BEGIN BUTTON ID_FILE_NEW BUTTON ID_FILE_OPEN @@ -165,7 +185,7 @@ END // Menu // -IDR_MAINFRAME MENU PRELOAD DISCARDABLE +IDR_MAINFRAME MENU BEGIN POPUP "&File" BEGIN @@ -236,12 +256,8 @@ BEGIN MENUITEM "Show / Hide C&ollisions\tO", ID_VIEW_COLLISIONS MENUITEM "Show / Hide &PACS\tCTRL+P", ID_VIEW_PACS MENUITEM SEPARATOR - MENUITEM "Locate selected primitives\tALT+L", - ID_VIEW_LOCATESELECTEDPRIMITIVES - - MENUITEM "Locate selected primitives in tree\tALT+T", - ID_VIEW_LOCATESELECTEDPRIMITIVES_TREE - + MENUITEM "Locate selected primitives\tALT+L", ID_VIEW_LOCATESELECTEDPRIMITIVES + MENUITEM "Locate selected primitives in tree\tALT+T", ID_VIEW_LOCATESELECTEDPRIMITIVES_TREE END POPUP "&Project" BEGIN @@ -257,14 +273,11 @@ BEGIN MENUITEM "&Reset unique ID", ID_PROJECT_RESETUNIQUEID MENUITEM "&Generate missing ID", ID_PROJECT_GENERATENULLID MENUITEM "&Force ID uniqueness", ID_PROJECT_CORRECT_ID - MENUITEM "&Reset primitive configuration", - ID_PROJECT_RESET_PRIMITIVE_CONFIGURATION - + MENUITEM "&Reset primitive configuration", ID_PROJECT_RESET_PRIMITIVE_CONFIGURATION END POPUP "Windows" BEGIN MENUITEM "Primitive configuration", ID_WINDOWS_PRIMITIVECONFIGURATION - END POPUP "&Help" BEGIN @@ -275,13 +288,23 @@ BEGIN END END +IDR_MENU1 MENU +BEGIN + POPUP "Primitive Configuration" + BEGIN + MENUITEM "&Select", ID_PRIMITIVECONFIGURATION_SELECT + MENUITEM "&Show", ID_PRIMITIVECONFIGURATION_SHOW + MENUITEM "&Hide", ID_PRIMITIVECONFIGURATION_HIDE + END +END + ///////////////////////////////////////////////////////////////////////////// // // Accelerator // -IDR_DIALOG ACCELERATORS PRELOAD MOVEABLE PURE +IDR_DIALOG ACCELERATORS BEGIN "F", ID_FIND, VIRTKEY, CONTROL, NOINVERT "G", ID_GOTO, VIRTKEY, CONTROL, NOINVERT @@ -291,8 +314,7 @@ BEGIN "O", ID_FILE_OPEN, VIRTKEY, CONTROL, NOINVERT "P", ID_VIEW_PACS, VIRTKEY, CONTROL, NOINVERT "S", ID_FILE_SAVE, VIRTKEY, CONTROL, NOINVERT - "T", ID_VIEW_LOCATESELECTEDPRIMITIVES_TREE, VIRTKEY, ALT, - NOINVERT + "T", ID_VIEW_LOCATESELECTEDPRIMITIVES_TREE, VIRTKEY, ALT, NOINVERT VK_F1, ID_HELP_FINDER, VIRTKEY, NOINVERT VK_F10, ID_EDIT_RADIUS, VIRTKEY, NOINVERT VK_F11, ID_EDIT_ADD_POINT, VIRTKEY, NOINVERT @@ -308,7 +330,7 @@ BEGIN VK_RETURN, ID_EDIT_PROPERTIES, VIRTKEY, ALT, NOINVERT END -IDR_MAINFRAME ACCELERATORS PRELOAD MOVEABLE PURE +IDR_MAINFRAME ACCELERATORS BEGIN "A", ID_EDIT_SELECT_ALL, VIRTKEY, CONTROL, NOINVERT "C", ID_EDIT_SELECT_CHILDREN, VIRTKEY, NOINVERT @@ -332,8 +354,7 @@ BEGIN "R", ID_EDIT_COLLAPSE, VIRTKEY, NOINVERT "S", ID_VIEW_SHOW, VIRTKEY, NOINVERT "S", ID_FILE_SAVE, VIRTKEY, CONTROL, NOINVERT - "T", ID_VIEW_LOCATESELECTEDPRIMITIVES_TREE, VIRTKEY, ALT, - NOINVERT + "T", ID_VIEW_LOCATESELECTEDPRIMITIVES_TREE, VIRTKEY, ALT, NOINVERT "V", ID_EDIT_PASTE, VIRTKEY, CONTROL, NOINVERT VK_BACK, ID_EDIT_UNDO, VIRTKEY, ALT, NOINVERT VK_DELETE, ID_EDIT_DELETE, VIRTKEY, NOINVERT @@ -369,8 +390,8 @@ END // Dialog // -IDD_CREATE_ELEMENT DIALOG DISCARDABLE 0, 0, 247, 47 -STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +IDD_CREATE_ELEMENT DIALOG 0, 0, 247, 47 +STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Create Element" FONT 8, "MS Sans Serif" BEGIN @@ -379,84 +400,58 @@ BEGIN EDITTEXT IDC_EDIT_NAME,32,7,148,14,ES_AUTOHSCROLL LTEXT "Name",IDC_STATIC,7,7,20,8 LTEXT "Type",IDC_STATIC,7,25,20,8 - COMBOBOX IDC_COMBOTYPE,32,25,148,106,CBS_DROPDOWN | CBS_SORT | - WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_COMBOTYPE,32,25,148,106,CBS_DROPDOWN | CBS_SORT | WS_VSCROLL | WS_TABSTOP END -IDD_TOOLS_ZONE DIALOG DISCARDABLE 0, 0, 246, 278 -STYLE WS_CHILD -FONT 8, "MS Sans Serif" +IDD_TOOLS_ZONE DIALOGEX 0, 0, 246, 278 +STYLE DS_SETFONT | WS_CHILD +FONT 8, "MS Sans Serif", 0, 0, 0x0 BEGIN - COMBOBOX IDC_CATTYPE1,7,7,83,65,CBS_DROPDOWNLIST | CBS_SORT | - WS_VSCROLL | WS_TABSTOP - COMBOBOX IDC_CATVALUE1,94,7,83,66,CBS_DROPDOWNLIST | CBS_SORT | - WS_VSCROLL | WS_TABSTOP - COMBOBOX IDC_CATTYPE2,7,26,83,65,CBS_DROPDOWNLIST | CBS_SORT | - WS_VSCROLL | WS_TABSTOP - COMBOBOX IDC_CATVALUE2,94,26,83,66,CBS_DROPDOWNLIST | CBS_SORT | - WS_VSCROLL | WS_TABSTOP - COMBOBOX IDC_CATTYPE3,7,46,83,65,CBS_DROPDOWNLIST | CBS_SORT | - WS_VSCROLL | WS_TABSTOP - COMBOBOX IDC_CATVALUE3,94,46,83,66,CBS_DROPDOWNLIST | CBS_SORT | - WS_VSCROLL | WS_TABSTOP - COMBOBOX IDC_CATTYPE4,7,66,83,65,CBS_DROPDOWNLIST | CBS_SORT | - WS_VSCROLL | WS_TABSTOP - COMBOBOX IDC_CATVALUE4,94,66,83,66,CBS_DROPDOWNLIST | CBS_SORT | - WS_VSCROLL | WS_TABSTOP - CONTROL "AND",IDC_AND2,"Button",BS_AUTORADIOBUTTON | WS_GROUP, - 183,28,31,10 + COMBOBOX IDC_CATTYPE1,7,7,83,65,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_CATVALUE1,94,7,83,66,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_CATTYPE2,7,26,83,65,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_CATVALUE2,94,26,83,66,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_CATTYPE3,7,46,83,65,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_CATVALUE3,94,46,83,66,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_CATTYPE4,7,66,83,65,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_CATVALUE4,94,66,83,66,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP + CONTROL "AND",IDC_AND2,"Button",BS_AUTORADIOBUTTON | WS_GROUP,183,28,31,10 CONTROL "OR",IDC_OR2,"Button",BS_AUTORADIOBUTTON,213,28,29,10 - CONTROL "AND",IDC_AND3,"Button",BS_AUTORADIOBUTTON | WS_GROUP, - 183,47,31,10 + CONTROL "AND",IDC_AND3,"Button",BS_AUTORADIOBUTTON | WS_GROUP,183,47,31,10 CONTROL "OR",IDC_OR3,"Button",BS_AUTORADIOBUTTON,213,47,29,10 - CONTROL "AND",IDC_AND4,"Button",BS_AUTORADIOBUTTON | WS_GROUP, - 183,66,31,10 + CONTROL "AND",IDC_AND4,"Button",BS_AUTORADIOBUTTON | WS_GROUP,183,66,31,10 CONTROL "OR",IDC_OR4,"Button",BS_AUTORADIOBUTTON,213,66,29,10 GROUPBOX "",IDC_STATIC,180,22,59,18,WS_GROUP GROUPBOX "",IDC_STATIC,180,41,59,18,WS_GROUP GROUPBOX "",IDC_STATIC,180,60,59,18,WS_GROUP - CONTROL "0°",IDC_ROT0,"Button",BS_AUTORADIOBUTTON | WS_GROUP,7, - 83,23,10 - CONTROL "90°",IDC_ROT90,"Button",BS_AUTORADIOBUTTON,31,83,27,10 - CONTROL "180°",IDC_ROT180,"Button",BS_AUTORADIOBUTTON,59,83,31, - 10 - CONTROL "270°",IDC_ROT270,"Button",BS_AUTORADIOBUTTON,91,83,31, - 10 - CONTROL "Ran",IDC_ROTRANDOM,"Button",BS_AUTORADIOBUTTON,123,83, - 29,10 - CONTROL "Full Cycle",IDC_ROTCYCLE,"Button",BS_AUTORADIOBUTTON, - 152,83,46,10 - CONTROL "NoFlip",IDC_FLIPNO,"Button",BS_AUTORADIOBUTTON | - WS_GROUP,7,94,36,10 - CONTROL "Flip",IDC_FLIPYES,"Button",BS_AUTORADIOBUTTON,45,94,27, - 10 - CONTROL "Ran",IDC_FLIPRANDOM,"Button",BS_AUTORADIOBUTTON,74,94, - 29,10 - CONTROL "Full Cycle",IDC_FLIPCYCLE,"Button",BS_AUTORADIOBUTTON, - 103,94,46,10 - CONTROL "Random",IDC_RANDOM,"Button",BS_AUTOCHECKBOX | - WS_TABSTOP,189,7,43,10 - CONTROL "Not Propagate",IDC_NOT_PROPAGATE,"Button", - BS_AUTOCHECKBOX | WS_TABSTOP,177,95,62,10 - CONTROL "Full Cycle",IDC_FULL_CYCLE,"Button",BS_AUTOCHECKBOX | - WS_TABSTOP,189,16,46,10 - CONTROL "Force",IDC_FORCE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP, - 205,84,34,10 + CONTROL "0°",IDC_ROT0,"Button",BS_AUTORADIOBUTTON | WS_GROUP,7,83,23,10 + CONTROL "90°",IDC_ROT90,"Button",BS_AUTORADIOBUTTON,31,83,27,10 + CONTROL "180°",IDC_ROT180,"Button",BS_AUTORADIOBUTTON,59,83,31,10 + CONTROL "270°",IDC_ROT270,"Button",BS_AUTORADIOBUTTON,91,83,31,10 + CONTROL "Ran",IDC_ROTRANDOM,"Button",BS_AUTORADIOBUTTON,123,83,29,10 + CONTROL "Full Cycle",IDC_ROTCYCLE,"Button",BS_AUTORADIOBUTTON,152,83,46,10 + CONTROL "NoFlip",IDC_FLIPNO,"Button",BS_AUTORADIOBUTTON | WS_GROUP,7,94,36,10 + CONTROL "Flip",IDC_FLIPYES,"Button",BS_AUTORADIOBUTTON,45,94,27,10 + CONTROL "Ran",IDC_FLIPRANDOM,"Button",BS_AUTORADIOBUTTON,74,94,29,10 + CONTROL "Full Cycle",IDC_FLIPCYCLE,"Button",BS_AUTORADIOBUTTON,103,94,46,10 + CONTROL "Random",IDC_RANDOM,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,189,7,43,10 + CONTROL "Not Propagate",IDC_NOT_PROPAGATE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,177,95,62,10 + CONTROL "Full Cycle",IDC_FULL_CYCLE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,189,16,46,10 + CONTROL "Force",IDC_FORCE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,205,84,34,10 END -IDD_SELECTZONE DIALOG DISCARDABLE 0, 0, 186, 95 -STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +IDD_SELECTZONE DIALOG 0, 0, 186, 95 +STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Select Zone" FONT 8, "MS Sans Serif" BEGIN DEFPUSHBUTTON "OK",IDOK,129,7,50,14 PUSHBUTTON "Cancel",IDCANCEL,129,74,50,14 - LISTBOX IDC_LISTZONE,7,7,118,81,LBS_SORT | LBS_NOINTEGRALHEIGHT | - WS_VSCROLL | WS_TABSTOP + LISTBOX IDC_LISTZONE,7,7,118,81,LBS_SORT | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP END -IDD_GENERATE DIALOG DISCARDABLE 0, 0, 186, 95 -STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +IDD_GENERATE DIALOG 0, 0, 186, 95 +STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Generate" FONT 8, "MS Sans Serif" BEGIN @@ -470,16 +465,15 @@ BEGIN EDITTEXT IDC_EDITMAXX,33,49,40,14,ES_AUTOHSCROLL LTEXT "MaxY",IDC_STATIC,7,71,19,8 EDITTEXT IDC_EDITMAXY,33,67,40,14,ES_AUTOHSCROLL - COMBOBOX IDC_COMBOMATERIAL,87,7,92,58,CBS_DROPDOWN | CBS_SORT | - WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_COMBOMATERIAL,87,7,92,58,CBS_DROPDOWN | CBS_SORT | WS_VSCROLL | WS_TABSTOP LTEXT "Zone Base X",IDC_STATIC,94,33,42,8 EDITTEXT IDC_EDITZONEBASEX,139,31,40,14,ES_AUTOHSCROLL LTEXT "Zone Base Y",IDC_STATIC,93,52,42,8 EDITTEXT IDC_EDITZONEBASEY,139,50,40,14,ES_AUTOHSCROLL END -IDD_MOVE DIALOG DISCARDABLE 0, 0, 186, 46 -STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +IDD_MOVE DIALOG 0, 0, 186, 46 +STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Move In Cell" FONT 8, "MS Sans Serif" BEGIN @@ -491,8 +485,8 @@ BEGIN EDITTEXT IDC_EDITYOFFSET,49,23,40,14,ES_AUTOHSCROLL END -IDD_EXPORT DIALOG DISCARDABLE 0, 0, 375, 316 -STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +IDD_EXPORT DIALOG 0, 0, 375, 316 +STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Export To Client" FONT 8, "MS Sans Serif" BEGIN @@ -502,12 +496,9 @@ BEGIN LTEXT "Reference Zones Directory",IDC_STATIC,7,7,86,8 PUSHBUTTON "...",IDC_BUTTON_REFZONEDIR,166,16,13,14 GROUPBOX "Lighting",IDC_STATIC,195,280,118,30 - CONTROL "Noise",IDC_RADIOLIGHTNOISE,"Button",BS_AUTORADIOBUTTON | - WS_GROUP,203,292,34,10 - CONTROL "Patch",IDC_RADIOLIGHTPATCH,"Button",BS_AUTORADIOBUTTON, - 241,292,35,10 - CONTROL "No",IDC_RADIOLIGHTNO,"Button",BS_AUTORADIOBUTTON,279, - 292,25,10 + CONTROL "Noise",IDC_RADIOLIGHTNOISE,"Button",BS_AUTORADIOBUTTON | WS_GROUP,203,292,34,10 + CONTROL "Patch",IDC_RADIOLIGHTPATCH,"Button",BS_AUTORADIOBUTTON,241,292,35,10 + CONTROL "No",IDC_RADIOLIGHTNO,"Button",BS_AUTORADIOBUTTON,279,292,25,10 LTEXT "Output Zones Directory",IDC_STATIC,7,33,74,8 EDITTEXT IDC_EDIT_OUTZONEDIR,7,42,153,14,ES_AUTOHSCROLL PUSHBUTTON "...",IDC_BUTTON_OUTZONEDIR,166,42,13,14 @@ -530,8 +521,7 @@ BEGIN EDITTEXT IDC_EDIT_ZONEMAX,321,255,40,14,ES_AUTOHSCROLL GROUPBOX "Export Limiter",IDC_STATIC,195,245,172,27 EDITTEXT IDC_EDIT_REFIGDIR,7,80,153,14,ES_AUTOHSCROLL - LTEXT "Reference Instance Group Directory",IDC_STATIC,7,70,115, - 8 + LTEXT "Reference Instance Group Directory",IDC_STATIC,7,70,115,8 PUSHBUTTON "...",IDC_BUTTON_REFIGDIR,166,80,13,14 LTEXT "Output Instance Group Directory",IDC_STATIC,7,97,103,8 EDITTEXT IDC_EDIT_OUTIGDIR,7,105,153,14,ES_AUTOHSCROLL @@ -545,19 +535,14 @@ BEGIN EDITTEXT IDC_EDIT_OUTCMBDIR,197,42,153,14,ES_AUTOHSCROLL PUSHBUTTON "...",IDC_BUTTON_OUTCMBDIR,355,42,13,14 GROUPBOX "",IDC_STATIC,191,1,182,61 - EDITTEXT IDC_EDIT_REFADDITIONNALIGDIR,198,80,153,14, - ES_AUTOHSCROLL - LTEXT "Reference Instance Group Directory",IDC_STATIC,198,70, - 115,8 + EDITTEXT IDC_EDIT_REFADDITIONNALIGDIR,198,80,153,14,ES_AUTOHSCROLL + LTEXT "Reference Instance Group Directory",IDC_STATIC,198,70,115,8 PUSHBUTTON "...",IDC_BUTTON_REFADDITIONNALIGDIR,356,80,13,14 - LTEXT "Output Instance Group Directory",IDC_STATIC,198,97,103, - 8 - EDITTEXT IDC_EDIT_OUTADDITIONNALIGDIR,198,105,153,14, - ES_AUTOHSCROLL + LTEXT "Output Instance Group Directory",IDC_STATIC,198,97,103,8 + EDITTEXT IDC_EDIT_OUTADDITIONNALIGDIR,198,105,153,14,ES_AUTOHSCROLL PUSHBUTTON "...",IDC_BUTTON_OUTADDITIONNALIGDIR,356,105,13,14 GROUPBOX "",IDC_STATIC,192,62,181,61 - CONTROL "Export collisions",IDC_EXPORT_COLLISIONS,"Button", - BS_AUTOCHECKBOX | WS_TABSTOP,201,215,81,11 + CONTROL "Export collisions",IDC_EXPORT_COLLISIONS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,201,215,81,11 EDITTEXT IDC_EDIT_DFNDIR,197,138,153,14,ES_AUTOHSCROLL LTEXT "Dfn base directory",IDC_STATIC,197,128,58,8 PUSHBUTTON "...",IDC_BUTTON_DFNDIR,355,138,13,14 @@ -574,22 +559,21 @@ BEGIN PUSHBUTTON "...",IDC_BUTTON_COLORMAPFILE,164,255,13,14 END -IDD_TYPEMANAGER DIALOG DISCARDABLE 0, 0, 186, 156 -STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +IDD_TYPEMANAGER DIALOG 0, 0, 186, 156 +STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Type Manager" FONT 8, "MS Sans Serif" BEGIN DEFPUSHBUTTON "OK",IDOK,7,135,50,14 PUSHBUTTON "Cancel",IDCANCEL,129,135,50,14 - LISTBOX IDC_LISTTYPE,7,26,172,102,LBS_SORT | - LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP + LISTBOX IDC_LISTTYPE,7,26,172,102,LBS_SORT | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP PUSHBUTTON "Add Type",IDC_ADDTYPE,7,7,50,14 PUSHBUTTON "Remove Type",IDC_REMOVETYPE,68,7,50,14 PUSHBUTTON "Edit Type",IDC_EDITTYPE,129,7,50,14 END -IDD_TYPE DIALOG DISCARDABLE 0, 0, 186, 46 -STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +IDD_TYPE DIALOG 0, 0, 186, 46 +STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Type" FONT 8, "MS Sans Serif" BEGIN @@ -598,42 +582,38 @@ BEGIN LTEXT "Name",IDC_STATIC,7,7,20,8 LTEXT "Color",IDC_STATIC,7,29,17,8 EDITTEXT IDC_EDITNAME,36,7,82,14,ES_AUTOHSCROLL - CONTROL "Color",IDC_BUTTONCOLOR,"Button",BS_OWNERDRAW | - WS_TABSTOP,36,24,50,14 + CONTROL "Color",IDC_BUTTONCOLOR,"Button",BS_OWNERDRAW | WS_TABSTOP,36,24,50,14 END -IDD_TYPESEL DIALOG DISCARDABLE 0, 0, 186, 95 -STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +IDD_TYPESEL DIALOG 0, 0, 186, 95 +STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Select Type" FONT 8, "MS Sans Serif" BEGIN DEFPUSHBUTTON "OK",IDOK,129,7,50,14 PUSHBUTTON "Cancel",IDCANCEL,129,74,50,14 - LISTBOX IDC_LIST,7,7,117,81,LBS_SORT | LBS_NOINTEGRALHEIGHT | - WS_VSCROLL | WS_TABSTOP + LISTBOX IDC_LIST,7,7,117,81,LBS_SORT | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP END -IDD_EXPORTCB DIALOG DISCARDABLE 0, 0, 310, 138 -STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION +IDD_EXPORTCB DIALOG 0, 0, 310, 138 +STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION CAPTION "Export Callback" FONT 8, "MS Sans Serif" BEGIN PUSHBUTTON "Cancel",IDCANCEL,7,117,296,14 LTEXT "Export Pass",IDC_PASSTEXT,7,7,296,8 - CONTROL "Progress1",IDC_PROGRESS,"msctls_progress32",WS_BORDER,7, - 18,296,14 - EDITTEXT IDC_EDIT_INFO,7,39,296,73,ES_MULTILINE | ES_AUTOHSCROLL | - WS_VSCROLL + CONTROL "Progress1",IDC_PROGRESS,"msctls_progress32",WS_BORDER,7,18,296,14 + EDITTEXT IDC_EDIT_INFO,7,39,296,73,ES_MULTILINE | ES_AUTOHSCROLL | WS_VSCROLL END -IDD_TOOLS_LOGIC DIALOG DISCARDABLE 0, 0, 178, 278 -STYLE WS_CHILD +IDD_TOOLS_LOGIC DIALOG 0, 0, 178, 278 +STYLE DS_SETFONT | WS_CHILD FONT 8, "MS Sans Serif" BEGIN END -IDD_EDIT_STRING DIALOG DISCARDABLE 0, 0, 247, 47 -STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +IDD_EDIT_STRING DIALOG 0, 0, 247, 47 +STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Edit name" FONT 8, "MS Sans Serif" BEGIN @@ -644,21 +624,19 @@ BEGIN END IDD_LOADING DIALOGEX 0, 0, 281, 47 -STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION +STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION EXSTYLE WS_EX_TOOLWINDOW CAPTION "NeL World Editor" FONT 8, "MS Sans Serif", 0, 0, 0x1 BEGIN CONTROL "Please Wait While Loading...",IDC_STATIC_TEXT_LOADING, "Static",SS_LEFTNOWORDWRAP | WS_GROUP,5,5,269,8 - ICON IDR_MAINFRAME,IDC_STATIC,5,20,20,20,SS_CENTERIMAGE | - SS_RIGHTJUST | SS_REALSIZEIMAGE - CONTROL "Progress1",IDC_PROGRESS1,"msctls_progress32",WS_BORDER, - 30,20,245,20 + ICON IDR_MAINFRAME,IDC_STATIC,5,20,20,20,SS_CENTERIMAGE | SS_RIGHTJUST | SS_REALSIZEIMAGE + CONTROL "Progress1",IDC_PROGRESS1,"msctls_progress32",WS_BORDER,30,20,245,20 END -IDD_CUSTOM_SNAPSHOT DIALOG DISCARDABLE 0, 0, 147, 130 -STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +IDD_CUSTOM_SNAPSHOT DIALOG 0, 0, 147, 130 +STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Snapshot" FONT 8, "MS Sans Serif" BEGIN @@ -668,20 +646,15 @@ BEGIN EDITTEXT IDC_HEIGHT,90,45,51,12,ES_AUTOHSCROLL LTEXT "Width:",IDC_STATIC,15,30,70,13,SS_CENTERIMAGE LTEXT "Height:",IDC_STATIC,15,45,70,12,SS_CENTERIMAGE - CONTROL "Keep bitmap ratio",IDC_KEEPRATIO,"Button", - BS_AUTOCHECKBOX | WS_TABSTOP,15,60,75,10 - CONTROL "RGB",IDC_RGBA,"Button",BS_AUTORADIOBUTTON | WS_GROUP,5, - 80,60,10 - CONTROL "Grayscale",IDC_GRAY_SCALE,"Button",BS_AUTORADIOBUTTON,5, - 90,60,10 - CONTROL "Fixed size",IDC_FIXED_SIZE,"Button",BS_AUTORADIOBUTTON | - WS_GROUP,5,5,60,10 - CONTROL "Custom size",IDC_GRAY_SCALE2,"Button", - BS_AUTORADIOBUTTON,5,15,60,10 + CONTROL "Keep bitmap ratio",IDC_KEEPRATIO,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,60,75,10 + CONTROL "RGB",IDC_RGBA,"Button",BS_AUTORADIOBUTTON | WS_GROUP,5,80,60,10 + CONTROL "Grayscale",IDC_GRAY_SCALE,"Button",BS_AUTORADIOBUTTON,5,90,60,10 + CONTROL "Fixed size",IDC_FIXED_SIZE,"Button",BS_AUTORADIOBUTTON | WS_GROUP,5,5,60,10 + CONTROL "Custom size",IDC_GRAY_SCALE2,"Button",BS_AUTORADIOBUTTON,5,15,60,10 END -IDD_PROJECT_SETTINGS DIALOG DISCARDABLE 0, 0, 254, 153 -STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +IDD_PROJECT_SETTINGS DIALOG 0, 0, 254, 153 +STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Project Settings" FONT 8, "MS Sans Serif" BEGIN @@ -690,13 +663,12 @@ BEGIN EDITTEXT IDC_DATA_DIRECTORY,5,15,190,12,ES_AUTOHSCROLL LTEXT "Data directory:",IDC_STATIC,5,5,50,10 PUSHBUTTON "Browse",IDC_BROWSE,200,15,50,14 - COMBOBOX IDC_CONTEXT,5,45,105,85,CBS_DROPDOWNLIST | WS_VSCROLL | - WS_TABSTOP + COMBOBOX IDC_CONTEXT,5,45,105,85,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP LTEXT "Context:",IDC_STATIC,5,35,50,10 END IDD_PROPERTIES DIALOGEX 0, 0, 298, 121 -STYLE WS_MAXIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME +STYLE DS_SETFONT | WS_MAXIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME CAPTION "Properties" FONT 8, "MS Sans Serif", 0, 0, 0x1 BEGIN @@ -704,14 +676,12 @@ BEGIN PUSHBUTTON "&Cancel",IDCANCEL,124,105,50,15 PUSHBUTTON "&Update",IDUPDATE,240,105,50,15 SCROLLBAR IDC_SCROLLBAR_PROP,283,15,12,76,SBS_VERT - CONTROL "",IDC_PROPERTY_FRAME,"Static",SS_BLACKFRAME,0,0,297,103, - WS_EX_CLIENTEDGE - CONTROL "",IDC_FIRST_PROP,"Static",SS_BLACKFRAME | NOT - WS_VISIBLE,6,6,273,19 + CONTROL "",IDC_PROPERTY_FRAME,"Static",SS_BLACKFRAME,0,0,297,103,WS_EX_CLIENTEDGE + CONTROL "",IDC_FIRST_PROP,"Static",SS_BLACKFRAME | NOT WS_VISIBLE,6,6,273,19 END -IDD_SELECT_PRIMITIVE_BY_LOCATION DIALOG DISCARDABLE 0, 0, 172, 85 -STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +IDD_SELECT_PRIMITIVE_BY_LOCATION DIALOG 0, 0, 172, 85 +STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Select a primitive by its location" FONT 8, "MS Sans Serif" BEGIN @@ -726,8 +696,8 @@ BEGIN LTEXT "Threshold :",IDC_STATIC,10,45,40,15,SS_CENTERIMAGE END -IDD_FIND_PRIMITIVE DIALOG DISCARDABLE 0, 0, 349, 145 -STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +IDD_FIND_PRIMITIVE DIALOG 0, 0, 349, 145 +STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Find a primitive..." FONT 8, "MS Sans Serif" BEGIN @@ -738,16 +708,15 @@ BEGIN LTEXT "",IDC_PRIMITIVE_NAME,7,104,335,34,SS_SUNKEN DEFPUSHBUTTON "&Find Next",ID_FIND_NEXT,102,83,50,14 PUSHBUTTON "&Cancel",IDCANCEL,7,83,50,14 - CONTROL "selection only",IDC_SELECTION,"Button",BS_AUTOCHECKBOX | - WS_TABSTOP,57,65,59,10 + CONTROL "selection only",IDC_SELECTION,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,57,65,59,10 LTEXT "Replace With :",IDC_STATIC,7,48,48,8 EDITTEXT IDC_REPLACE_TEXT,56,42,286,14,ES_AUTOHSCROLL PUSHBUTTON "&Replace",ID_REPLACE,197,83,50,14 PUSHBUTTON "&ReplaceAll",ID_REPLACE_ALL,292,83,50,14 END -IDD_GOTO_POS DIALOG DISCARDABLE 0, 0, 142, 58 -STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION +IDD_GOTO_POS DIALOG 0, 0, 142, 58 +STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION CAPTION "Goto position" FONT 8, "MS Sans Serif" BEGIN @@ -757,12 +726,11 @@ BEGIN EDITTEXT IDC_GOTO_POS_X,20,5,50,12,ES_AUTOHSCROLL LTEXT "Y",IDC_STATIC,5,25,10,8 EDITTEXT IDC_GOTO_POS_Y,20,25,50,12,ES_AUTOHSCROLL - CONTROL "&zoom at position",IDC_CHECK_POS_ZOMM,"Button", - BS_AUTOCHECKBOX | WS_TABSTOP,5,45,70,10 + CONTROL "&zoom at position",IDC_CHECK_POS_ZOMM,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,5,45,70,10 END -IDD_NAME DIALOG DISCARDABLE 0, 0, 483, 354 -STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +IDD_NAME DIALOG 0, 0, 483, 354 +STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Name attribution" FONT 8, "MS Sans Serif" BEGIN @@ -773,11 +741,8 @@ BEGIN EDITTEXT IDC_NAME_EBOX_IG,162,34,151,12,ES_AUTOHSCROLL DEFPUSHBUTTON "&Assign",ID_NAME_ASSIGN,217,52,50,14,WS_DISABLED EDITTEXT IDC_NAME_FILTER,180,92,125,12,ES_AUTOHSCROLL - LISTBOX IDC_NAME_SEARCH,29,110,426,84,LBS_SORT | LBS_USETABSTOPS | - LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP - LISTBOX IDC_NAME_ID,29,220,426,78,LBS_SORT | LBS_USETABSTOPS | - LBS_NOINTEGRALHEIGHT | LBS_EXTENDEDSEL | WS_VSCROLL | - WS_TABSTOP + LISTBOX IDC_NAME_SEARCH,29,110,426,84,LBS_SORT | LBS_USETABSTOPS | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP + LISTBOX IDC_NAME_ID,29,220,426,78,LBS_SORT | LBS_USETABSTOPS | LBS_NOINTEGRALHEIGHT | LBS_EXTENDEDSEL | WS_VSCROLL | WS_TABSTOP GROUPBOX "Assign name",IDC_STATIC,107,7,270,67 LTEXT "Generic name:",IDC_STATIC,111,17,47,8 LTEXT "In game name:",IDC_STATIC,111,36,48,8 @@ -788,6 +753,31 @@ BEGIN GROUPBOX "Name database:",IDC_STATIC,20,83,445,122 END +IDD_PRIMITIVE_CONFIGURATION DIALOGEX 0, 0, 238, 87 +STYLE DS_SETFONT | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME +EXSTYLE WS_EX_TOOLWINDOW +CAPTION "Primitive configuration" +FONT 8, "MS Sans Serif", 0, 0, 0x1 +BEGIN + CONTROL "List1",IDC_LIST,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP,7,7,224,73 +END + +IDD_SPLASHSCREEN DIALOG 0, 0, 186, 95 +STYLE DS_SETFONT | WS_POPUP | WS_CAPTION +CAPTION "World Edit Load" +FONT 8, "MS Sans Serif" +BEGIN + LTEXT "Static",IDC_LOAD_WORLD_EDIT,7,5,172,85,SS_SUNKEN +END + +IDD_DIRECTORY_SELECTOR DIALOG 0, 0, 282, 26 +STYLE DS_SETFONT | DS_3DLOOK | DS_CONTROL | WS_CHILD | WS_CLIPSIBLINGS +FONT 8, "MS Sans Serif" +BEGIN + COMBOBOX IDC_DIRLIST,54,7,216,234,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP + LTEXT "Previous dir:",IDC_STATIC,6,7,45,12,SS_CENTERIMAGE +END + ///////////////////////////////////////////////////////////////////////////// // @@ -795,14 +785,58 @@ END // #ifdef APSTUDIO_INVOKED -GUIDELINES DESIGNINFO DISCARDABLE +GUIDELINES DESIGNINFO BEGIN - IDD_ABOUTBOX, DIALOG + IDD_CREATE_ELEMENT, DIALOG + BEGIN + END + + IDD_TOOLS_ZONE, DIALOG + BEGIN + END + + IDD_SELECTZONE, DIALOG + BEGIN + END + + IDD_GENERATE, DIALOG + BEGIN + END + + IDD_MOVE, DIALOG + BEGIN + END + + IDD_EXPORT, DIALOG + BEGIN + END + + IDD_TYPEMANAGER, DIALOG + BEGIN + END + + IDD_TYPE, DIALOG + BEGIN + END + + IDD_TYPESEL, DIALOG + BEGIN + END + + IDD_EXPORTCB, DIALOG + BEGIN + END + + IDD_TOOLS_LOGIC, DIALOG + BEGIN + END + + IDD_EDIT_STRING, DIALOG + BEGIN + END + + IDD_LOADING, DIALOG BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 228 - TOPMARGIN, 8 - BOTTOMMARGIN, 66 END IDD_CUSTOM_SNAPSHOT, DIALOG @@ -858,6 +892,18 @@ BEGIN TOPMARGIN, 7 BOTTOMMARGIN, 347 END + + IDD_PRIMITIVE_CONFIGURATION, DIALOG + BEGIN + END + + IDD_SPLASHSCREEN, DIALOG + BEGIN + END + + IDD_DIRECTORY_SELECTOR, DIALOG + BEGIN + END END #endif // APSTUDIO_INVOKED @@ -867,36 +913,59 @@ END // Cursor // -IDC_MOVE CURSOR DISCARDABLE "res\\move.cur" -IDC_ROTATE CURSOR DISCARDABLE "res\\rotate.cur" -IDC_TURN CURSOR DISCARDABLE "res\\turn.cur" -IDC_SCALE CURSOR DISCARDABLE "res\\scale.cur" -IDC_ADD_POINT CURSOR DISCARDABLE "res\\add_point.cur" -IDC_COPY CURSOR DISCARDABLE "res\\copy.cur" -IDC_SELECT CURSOR DISCARDABLE "res\\select.cur" -IDC_SELECT_COPY CURSOR DISCARDABLE "res\\select_copy.cur" -IDC_INSERT_POINT CURSOR DISCARDABLE "res\\insert_point.cur" -IDC_HAND1 CURSOR DISCARDABLE "res\\hand.cur" -IDC_ZOOM CURSOR DISCARDABLE "res\\zoom.cur" -IDC_RADIUS CURSOR DISCARDABLE "res\\radius.cur" +IDC_MOVE CURSOR "res\\move.cur" + +IDC_ROTATE CURSOR "res\\rotate.cur" + +IDC_TURN CURSOR "res\\turn.cur" + +IDC_SCALE CURSOR "res\\scale.cur" + +IDC_ADD_POINT CURSOR "res\\add_point.cur" + +IDC_COPY CURSOR "res\\copy.cur" + +IDC_SELECT CURSOR "res\\select.cur" + +IDC_SELECT_COPY CURSOR "res\\select_copy.cur" + +IDC_INSERT_POINT CURSOR "res\\insert_point.cur" + +IDC_HAND1 CURSOR "res\\hand.cur" + +IDC_ZOOM CURSOR "res\\zoom.cur" + +IDC_RADIUS CURSOR "res\\radius.cur" + + +///////////////////////////////////////////////////////////////////////////// +// +// AFX_DIALOG_LAYOUT +// + +IDD_TOOLS_ZONE AFX_DIALOG_LAYOUT +BEGIN + 0 +END + ///////////////////////////////////////////////////////////////////////////// // // String Table // -STRINGTABLE PRELOAD DISCARDABLE +STRINGTABLE BEGIN IDR_MAINFRAME "NeL World Editor\n\nNeLWorldEditor\nNeL World Editor Files (*.worldedit)\n.worldedit\nWorldeditor.Document\nNeL World Editor Document" END -STRINGTABLE PRELOAD DISCARDABLE +STRINGTABLE BEGIN AFX_IDS_APP_TITLE "NeL World Editor" AFX_IDS_IDLEMESSAGE "Ready" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_INDICATOR_ZONENAMENEL " " ID_INDICATOR_ZONENAMEREF @@ -908,7 +977,7 @@ BEGIN ID_INDICATOR_SELECTION "9999 selected primitives" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_FILE_NEW "Create a new document\nNew" ID_FILE_OPEN "Open an existing document\nOpen (CTRL+O)" @@ -921,14 +990,14 @@ BEGIN ID_FILE_PRINT_PREVIEW "Display full pages\nPrint Preview" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_APP_ABOUT "Display program information, version number and copyright\nAbout" ID_APP_EXIT "Quit the application; prompts to save documents\nExit" ID_HELP_FINDER "List Help topics\nHelp Topics (F1)" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_FILE_MRU_FILE1 "Open this document" ID_FILE_MRU_FILE2 "Open this document" @@ -948,18 +1017,18 @@ BEGIN ID_FILE_MRU_FILE16 "Open this document" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_NEXT_PANE "Switch to the next window pane\nNext Pane" ID_PREV_PANE "Switch back to the previous window pane\nPrevious Pane" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_WINDOW_SPLIT "Split the active window into panes\nSplit" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_EDIT_CLEAR "Erase the selection\nErase" ID_EDIT_CLEAR_ALL "Erase everything\nErase All" @@ -974,13 +1043,13 @@ BEGIN ID_EDIT_REDO "Redo the previously undone action\nRedo (Ctrl+Y)" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_VIEW_TOOLBAR "Show or hide the toolbar\nToggle ToolBar" ID_VIEW_STATUS_BAR "Show or hide the status bar\nToggle StatusBar" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN AFX_IDS_SCSIZE "Change the window size" AFX_IDS_SCMOVE "Change the window position" @@ -991,26 +1060,30 @@ BEGIN AFX_IDS_SCCLOSE "Close the active window and prompts to save the documents" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN AFX_IDS_SCRESTORE "Restore the window to normal size" AFX_IDS_SCTASKLIST "Activate Task List" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN AFX_IDS_PREVIEW_CLOSE "Close print preview mode\nCancel Preview" +END + +STRINGTABLE +BEGIN ID_WINDOWS_PLUGINS "Menu to select betwen the different plugins \n Plugins" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_VIEW_GRID "Show / hide grid\nShow / Hide grid (G)" ID_MODE_LOGIC "Logic Edition" ID_MODE_ZONE "Zone edition" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_EDIT_PACS "Show / hide PACS lines\nPACS (CTRL+P)" ID_VIEW_PACS "Show / hide PACS lines\nPACS (CTRL+P)" @@ -1023,7 +1096,7 @@ BEGIN ID_NAME_DLG "Name generator\nName generator" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_EDIT_TURN "Turn selection\nTurn (F8)" ID_EDIT_SCALE "Scale selection\nScale (F9)" @@ -1031,7 +1104,7 @@ BEGIN ID_EDIT_ADD_POINT "Add points in selection\nAdd points (F11)" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_PROJECT_SETTINGS "Project properties\nProperties (Alt+F7)" ID_EDIT_LOCK "Edit current selection points\nEdit points (Space)" @@ -1043,7 +1116,7 @@ BEGIN ID_EDIT_ROTATE "Rotate selection\nRotate (F7)" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_EDIT_DETAILS "Show / hide details\nDetails (D)" ID_VIEW_SHOW "Show selected primitives\nShow (S)" @@ -1053,19 +1126,19 @@ BEGIN ID_EDIT_COLLAPSE "Collapse selected nodes\nCollapse (R)" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_VIEW_LANDSCAPE "Show / hide landscapes\nShow / Hide landscapes (L)" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_VIEW_PRIMITIVES "Show / hide primitives\nShow / Hide primitives (P)" ID_VIEW_LAYERS "Show / hide layers\nShow / Hide layers (Y)" ID_VIEW_GRIS "Show / hide grid\nShow / Hide gris (G)" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_EDIT_SELECT_BY_LOCATION "Select primitives by location CTRL+L\nSelect primitives by location (CTRL+L)" @@ -1081,93 +1154,6 @@ BEGIN ID_REPAIR_SELECTED "Repair selected elements by adding missing fields" END -///////////////////////////////////////////////////////////////////////////// -// -// Menu -// - -IDR_MENU1 MENU DISCARDABLE -BEGIN - POPUP "Primitive Configuration" - BEGIN - MENUITEM "&Select", ID_PRIMITIVECONFIGURATION_SELECT - - MENUITEM "&Show", ID_PRIMITIVECONFIGURATION_SHOW - - MENUITEM "&Hide", ID_PRIMITIVECONFIGURATION_HIDE - - END -END - - -///////////////////////////////////////////////////////////////////////////// -// -// Dialog -// - -IDD_PRIMITIVE_CONFIGURATION DIALOGEX 0, 0, 238, 87 -STYLE WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME -EXSTYLE WS_EX_TOOLWINDOW -CAPTION "Primitive configuration" -FONT 8, "MS Sans Serif", 0, 0, 0x1 -BEGIN - CONTROL "List1",IDC_LIST,"SysListView32",LVS_REPORT | - LVS_SINGLESEL | LVS_NOSORTHEADER | WS_BORDER | - WS_TABSTOP,7,7,224,73 -END - -IDD_SPLASHSCREEN DIALOG DISCARDABLE 0, 0, 186, 95 -STYLE WS_POPUP | WS_CAPTION -CAPTION "World Edit Load" -FONT 8, "MS Sans Serif" -BEGIN - LTEXT "Static",IDC_LOAD_WORLD_EDIT,7,5,172,85,SS_SUNKEN -END - -IDD_DIRECTORY_SELECTOR DIALOG DISCARDABLE 0, 0, 282, 26 -STYLE DS_3DLOOK | DS_CONTROL | WS_CHILD | WS_CLIPSIBLINGS -FONT 8, "MS Sans Serif" -BEGIN - COMBOBOX IDC_DIRLIST,54,7,216,234,CBS_DROPDOWNLIST | CBS_SORT | - WS_VSCROLL | WS_TABSTOP - LTEXT "Previous dir:",IDC_STATIC,6,7,45,12,SS_CENTERIMAGE -END - - -///////////////////////////////////////////////////////////////////////////// -// -// DESIGNINFO -// - -#ifdef APSTUDIO_INVOKED -GUIDELINES DESIGNINFO DISCARDABLE -BEGIN - IDD_PRIMITIVE_CONFIGURATION, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 231 - TOPMARGIN, 7 - BOTTOMMARGIN, 80 - END - - IDD_SPLASHSCREEN, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 179 - TOPMARGIN, 7 - BOTTOMMARGIN, 88 - END - - IDD_DIRECTORY_SELECTOR, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 275 - TOPMARGIN, 7 - BOTTOMMARGIN, 19 - END -END -#endif // APSTUDIO_INVOKED - #endif // English resources ///////////////////////////////////////////////////////////////////////////// From f688c23580140abf9210e7f136e2f052579759a0 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Tue, 14 May 2019 06:32:37 +0800 Subject: [PATCH 53/77] Fixed: Don't use CListBox itemData for drawing text, it doesn't actually point to the item string --- .../leveldesign/world_editor/world_editor/tools_zone.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/code/ryzom/tools/leveldesign/world_editor/world_editor/tools_zone.cpp b/code/ryzom/tools/leveldesign/world_editor/world_editor/tools_zone.cpp index bcb46cd6c..23e8aaec0 100644 --- a/code/ryzom/tools/leveldesign/world_editor/world_editor/tools_zone.cpp +++ b/code/ryzom/tools/leveldesign/world_editor/world_editor/tools_zone.cpp @@ -118,13 +118,12 @@ const string &CToolsZoneList::getItem (uint32 nIndex) void CToolsZoneList::DrawItem (LPDRAWITEMSTRUCT lpDrawItemStruct) { ASSERT(lpDrawItemStruct->CtlType == ODT_LISTBOX); - LPCTSTR lpszText = (LPCTSTR) lpDrawItemStruct->itemData; - if (lpszText == NULL) - return; CDC dc; if (lpDrawItemStruct->itemID >= _BitmapList.size()) return; + if (lpDrawItemStruct->itemID >= _ItemNames.size()) + return; dc.Attach (lpDrawItemStruct->hDC); @@ -168,7 +167,8 @@ void CToolsZoneList::DrawItem (LPDRAWITEMSTRUCT lpDrawItemStruct) } // Draw the text. - dc.DrawText (lpszText, _tcslen(lpszText), &rectLeft, DT_CENTER|DT_SINGLELINE|DT_VCENTER); + NLMISC::tstring itemName = NLMISC::utf8ToTStr(_ItemNames[lpDrawItemStruct->itemID]); + dc.DrawText(itemName.c_str(), itemName.size(), &rectLeft, DT_CENTER|DT_SINGLELINE|DT_VCENTER); // Reset the background color and the text color back to their original values. dc.SetTextColor (crOldTextColor); From 7ed7491f04e22b082ae71a0f5c1851875cf5ddc1 Mon Sep 17 00:00:00 2001 From: Nimetu Date: Tue, 14 May 2019 20:54:38 +0300 Subject: [PATCH 54/77] Fixed: Invalid duplicate landmark check. --HG-- branch : develop --- code/ryzom/client/src/continent_manager.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/ryzom/client/src/continent_manager.cpp b/code/ryzom/client/src/continent_manager.cpp index c4b5cc693..cb8e11dbd 100644 --- a/code/ryzom/client/src/continent_manager.cpp +++ b/code/ryzom/client/src/continent_manager.cpp @@ -628,8 +628,8 @@ void CContinentManager::readFrom(xmlNodePtr node) for(uint i = 0; i< itContinent->second->UserLandMarks.size(); ++i) { const CUserLandMark& test = itContinent->second->UserLandMarks[i]; - uint xdiff = abs(test.Pos.x - lm.Pos.x) * 100; - uint ydiff = abs(test.Pos.y - lm.Pos.y) * 100; + uint xdiff = fabs(test.Pos.x - lm.Pos.x) * 100.f; + uint ydiff = fabs(test.Pos.y - lm.Pos.y) * 100.f; if (xdiff == 0 && ydiff == 0) { add = false; From e573c7b6e9a525bdc62e9ccaca8fdb76f6ed3fa3 Mon Sep 17 00:00:00 2001 From: Nimetu Date: Tue, 21 May 2019 23:07:27 +0300 Subject: [PATCH 55/77] Changed: Remove window content tiny size limit --HG-- branch : develop --- code/nel/include/nel/gui/interface_group.h | 3 +++ code/nel/src/gui/group_container.cpp | 4 ++-- code/nel/src/gui/interface_group.cpp | 28 +++++++++++++++------- code/nel/src/gui/view_text.cpp | 6 ++--- 4 files changed, 27 insertions(+), 14 deletions(-) diff --git a/code/nel/include/nel/gui/interface_group.h b/code/nel/include/nel/gui/interface_group.h index fea928cb3..cef9abb45 100644 --- a/code/nel/include/nel/gui/interface_group.h +++ b/code/nel/include/nel/gui/interface_group.h @@ -353,6 +353,9 @@ namespace NLGUI void makeNewClip (sint32 &oldClipX, sint32 &oldClipY, sint32 &oldClipW, sint32 &oldClipH); void restoreClip (sint32 oldSciX, sint32 oldSciY, sint32 oldSciW, sint32 oldSciH); + // Compute clip contribution for current window. This doesn't change the clip window in the driver. + void computeClipContribution(sint32 &newX, sint32 &newY, sint32 &newW, sint32 &newH) const; + // Compute clip contribution for current window, and a previous clipping rectangle. This doesn't change the clip window in the driver. void computeCurrentClipContribution(sint32 prevX, sint32 prevY, sint32 prevW, sint32 prevH, sint32 &newX, sint32 &newY, sint32 &newW, sint32 &newH) const; diff --git a/code/nel/src/gui/group_container.cpp b/code/nel/src/gui/group_container.cpp index 26a23fd9f..a21734fdb 100644 --- a/code/nel/src/gui/group_container.cpp +++ b/code/nel/src/gui/group_container.cpp @@ -2385,7 +2385,7 @@ namespace NLGUI { _W = _Parent->getW(); } - setMaxH (16384); // No scrollbar for container of layer > 0 + setMaxH (std::numeric_limits::max()); // No scrollbar for container of layer > 0 newH = (pLayer->H_T - pLayer->InsetT); } @@ -2468,7 +2468,7 @@ namespace NLGUI else { if (_List != NULL) - _List->setMaxH (16384); + _List->setMaxH (std::numeric_limits::max()); } if (_LayerSetup == 0) diff --git a/code/nel/src/gui/interface_group.cpp b/code/nel/src/gui/interface_group.cpp index 3996d827f..07b840695 100644 --- a/code/nel/src/gui/interface_group.cpp +++ b/code/nel/src/gui/interface_group.cpp @@ -51,14 +51,14 @@ namespace NLGUI CInterfaceGroup::CInterfaceGroup(const TCtorParam ¶m) : CCtrlBase(param) { _ParentSizeMax = NULL; - _MaxW = _MaxH = 16384; + _MaxW = _MaxH = std::numeric_limits::max(); _OffsetX = _OffsetY = 0; _Overlappable= true; _ResizeFromChildW= false; _ResizeFromChildH= false; _ResizeFromChildWMargin= 0; _ResizeFromChildHMargin= 0; - _MaxWReal = _MaxHReal = 16384; + _MaxWReal = _MaxHReal = std::numeric_limits::max(); _GroupSizeRef = 0; _Escapable= false; _Priority= WIN_PRIORITY_NORMAL; @@ -1542,12 +1542,8 @@ namespace NLGUI // \todo yoyo: do not know why but don't work if this==scroll_text if(sonGroup && !isGroupScrollText()) { - sint32 oldSciX= -16384; - sint32 oldSciY= -16384; - sint32 oldSciW= 32768; - sint32 oldSciH= 32768; sint32 w, h; - sonGroup->computeCurrentClipContribution(oldSciX, oldSciY, oldSciW, oldSciH, x0, y0, w, h); + sonGroup->computeClipContribution(x0, y0, w, h); x1= x0 + w; y1= y0 + h; } @@ -1926,8 +1922,7 @@ namespace NLGUI } // ------------------------------------------------------------------------------------------------ - void CInterfaceGroup::computeCurrentClipContribution(sint32 oldSciX, sint32 oldSciY, sint32 oldSciW, sint32 oldSciH, - sint32 &newSciXDest, sint32 &newSciYDest, sint32 &newSciWDest, sint32 &newSciHDest) const + void CInterfaceGroup::computeClipContribution(sint32 &newSciXDest, sint32 &newSciYDest, sint32 &newSciWDest, sint32 &newSciHDest) const { sint32 newSciX = _XReal; sint32 newSciY = _YReal; @@ -1947,6 +1942,21 @@ namespace NLGUI newSciY = _YReal + _HReal - _MaxHReal; newSciH = _MaxHReal; } + // Don't apply margins because HTML list marker is drawn outside group paragraph inner content. + // Should not be an issue because horizontal scolling not used. + newSciXDest = newSciX/* + _MarginLeft*/; + newSciYDest = newSciY; + newSciWDest = newSciW/* - _MarginLeft*/; + newSciHDest = newSciH; + } + + // ------------------------------------------------------------------------------------------------ + void CInterfaceGroup::computeCurrentClipContribution(sint32 oldSciX, sint32 oldSciY, sint32 oldSciW, sint32 oldSciH, + sint32 &newSciXDest, sint32 &newSciYDest, sint32 &newSciWDest, sint32 &newSciHDest) const + { + sint32 newSciX, newSciY, newSciW, newSciH; + computeClipContribution(newSciX, newSciY, newSciW, newSciH); + // Clip Left if (newSciX < oldSciX) { diff --git a/code/nel/src/gui/view_text.cpp b/code/nel/src/gui/view_text.cpp index cf3857102..fc388ec72 100644 --- a/code/nel/src/gui/view_text.cpp +++ b/code/nel/src/gui/view_text.cpp @@ -79,7 +79,7 @@ namespace NLGUI _MultiLine = false; _TextMode = DontClipWord; _MultiLineSpace = 8; - _LineMaxW = 16384; + _LineMaxW = std::numeric_limits::max(); _MultiLineMaxWOnly = false; _MultiLineClipEndSpace = false; _LastMultiLineMaxW = 0; @@ -199,7 +199,7 @@ namespace NLGUI _MultiLine = false; _MultiLineSpace = 8; - _LineMaxW= 16384; + _LineMaxW= std::numeric_limits::max(); _MultiLineMaxWOnly = false; _MultiLineClipEndSpace = false; _LastMultiLineMaxW = 0; @@ -858,7 +858,7 @@ namespace NLGUI } prop = (char*) xmlGetProp( cur, (xmlChar*)"line_maxw" ); - _LineMaxW = 16384; + _LineMaxW = std::numeric_limits::max(); if (prop) fromString((const char*)prop, _LineMaxW); From e61c5937f3d39a1317970b3cf234ff68241a6d3e Mon Sep 17 00:00:00 2001 From: Nimetu Date: Tue, 21 May 2019 23:07:30 +0300 Subject: [PATCH 56/77] Changed: Better handling of br tag --HG-- branch : develop --- code/nel/src/gui/group_html.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/code/nel/src/gui/group_html.cpp b/code/nel/src/gui/group_html.cpp index 1d0468e3f..1b3a23ce4 100644 --- a/code/nel/src/gui/group_html.cpp +++ b/code/nel/src/gui/group_html.cpp @@ -5418,8 +5418,15 @@ namespace NLGUI // *************************************************************************** void CGroupHTML::htmlBR(const CHtmlElement &elm) { - ucstring tmp("\n"); - addString(tmp); + if (!_Paragraph || _Paragraph->getNumChildren() == 0) + { + ucstring tmp("\n"); + addString(tmp); + } + else + { + endParagraph(); + } } // *************************************************************************** From 41e6951fb27d84315e6b090c17a18cc3ea6d8610 Mon Sep 17 00:00:00 2001 From: Nimetu Date: Tue, 21 May 2019 23:07:32 +0300 Subject: [PATCH 57/77] Fixed: List forced child element to be visible on the time of insertion --HG-- branch : develop --- code/nel/src/gui/group_list.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/code/nel/src/gui/group_list.cpp b/code/nel/src/gui/group_list.cpp index 216c8f682..624c68d75 100644 --- a/code/nel/src/gui/group_list.cpp +++ b/code/nel/src/gui/group_list.cpp @@ -1026,7 +1026,6 @@ namespace NLGUI } child->_Parent = this; child->_ParentPos = NULL; - child->_Active = true; child->_X = 0; child->_Y = 0; child->_RenderLayer = this->_RenderLayer; From 0017a5fb26d090a1b837a1aff18f0d8c59174687 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Wed, 22 May 2019 19:39:56 +0800 Subject: [PATCH 58/77] v1.0.1 --- code/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/CMakeLists.txt b/code/CMakeLists.txt index 681f7a959..a508dbdc4 100644 --- a/code/CMakeLists.txt +++ b/code/CMakeLists.txt @@ -55,7 +55,7 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.6) PROJECT(RyzomCore CXX C) SET(NL_VERSION_MAJOR 1) SET(NL_VERSION_MINOR 0) -SET(NL_VERSION_PATCH 0) +SET(NL_VERSION_PATCH 1) SET(YEAR "2004-${CURRENT_YEAR}") SET(AUTHOR "Winch Gate and The Ryzom Core Community") From 08ac7175dc9ab980c1fa1467ba7d46d9a2f62039 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Sun, 26 May 2019 17:22:10 +0800 Subject: [PATCH 59/77] This might possibly fix the XP build --- code/nel/src/misc/stdmisc.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/code/nel/src/misc/stdmisc.h b/code/nel/src/misc/stdmisc.h index d7a623465..794fd9050 100644 --- a/code/nel/src/misc/stdmisc.h +++ b/code/nel/src/misc/stdmisc.h @@ -20,8 +20,11 @@ #if defined(_MSC_VER) && defined(_DEBUG) #define _CRTDBG_MAP_ALLOC #include + #include #include #define DEBUG_NEW new(_NORMAL_BLOCK, __FILE__, __LINE__) +#elif defined(_MSC_VER) + #include #endif #include From 7ce995b294b4d7c725b5018f92ef77c690d0fd8d Mon Sep 17 00:00:00 2001 From: kaetemi Date: Sun, 26 May 2019 21:26:20 +0800 Subject: [PATCH 60/77] Fix window title character set under XP --- code/nel/src/3d/driver/direct3d/driver_direct3d.cpp | 11 +++++------ code/nel/src/3d/driver/direct3d/driver_direct3d.h | 2 +- .../nel/src/3d/driver/opengl/driver_opengl_window.cpp | 2 +- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/code/nel/src/3d/driver/direct3d/driver_direct3d.cpp b/code/nel/src/3d/driver/direct3d/driver_direct3d.cpp index 43d33d081..ce63ce2cd 100644 --- a/code/nel/src/3d/driver/direct3d/driver_direct3d.cpp +++ b/code/nel/src/3d/driver/direct3d/driver_direct3d.cpp @@ -1247,23 +1247,23 @@ bool CDriverD3D::init (uintptr_t windowIcon, emptyProc exitFunc) createCursors(); - _WindowClass = "NLD3D" + toString(windowIcon); + _WindowClass = utf8ToWide("NLD3D" + toString(windowIcon)); // Register a window class - WNDCLASSA wc; + WNDCLASSW wc; memset(&wc,0,sizeof(wc)); wc.style = 0; // CS_HREDRAW | CS_VREDRAW ;//| CS_DBLCLKS; wc.lpfnWndProc = (WNDPROC)WndProc; wc.cbClsExtra = 0; wc.cbWndExtra = 0; - wc.hInstance = GetModuleHandleA(NULL); + wc.hInstance = GetModuleHandleW(NULL); wc.hIcon = (HICON)windowIcon; wc.hCursor = _DefaultCursor; wc.hbrBackground = WHITE_BRUSH; wc.lpszClassName = _WindowClass.c_str(); wc.lpszMenuName = NULL; - if (!RegisterClassA(&wc)) + if (!RegisterClassW(&wc)) { DWORD error = GetLastError(); if (error != ERROR_CLASS_ALREADY_EXISTS) @@ -1416,8 +1416,7 @@ bool CDriverD3D::setDisplay(nlWindow wnd, const GfxMode& mode, bool show, bool r AdjustWindowRect(&WndRect,WndFlags,FALSE); // Create - ucstring ustr(_WindowClass); - _HWnd = CreateWindowW((LPCWSTR)ustr.c_str(), L"", WndFlags, CW_USEDEFAULT,CW_USEDEFAULT, WndRect.right-WndRect.left,WndRect.bottom-WndRect.top, NULL, NULL, + _HWnd = CreateWindowW(_WindowClass.c_str(), L"", WndFlags, CW_USEDEFAULT,CW_USEDEFAULT, WndRect.right-WndRect.left,WndRect.bottom-WndRect.top, NULL, NULL, GetModuleHandleW(NULL), NULL); if (!_HWnd) { diff --git a/code/nel/src/3d/driver/direct3d/driver_direct3d.h b/code/nel/src/3d/driver/direct3d/driver_direct3d.h index 51c21bbc9..8b17fa28b 100644 --- a/code/nel/src/3d/driver/direct3d/driver_direct3d.h +++ b/code/nel/src/3d/driver/direct3d/driver_direct3d.h @@ -2314,7 +2314,7 @@ private: TShaderDrvInfoPtrList _ShaderDrvInfos; // Windows - std::string _WindowClass; + std::wstring _WindowClass; HWND _HWnd; sint32 _WindowX; sint32 _WindowY; diff --git a/code/nel/src/3d/driver/opengl/driver_opengl_window.cpp b/code/nel/src/3d/driver/opengl/driver_opengl_window.cpp index 2e0f2e7a5..6120ecd4c 100644 --- a/code/nel/src/3d/driver/opengl/driver_opengl_window.cpp +++ b/code/nel/src/3d/driver/opengl/driver_opengl_window.cpp @@ -316,7 +316,7 @@ bool CDriverGL::init (uintptr_t windowIcon, emptyProc exitFunc) wc.lpfnWndProc = (WNDPROC)WndProc; wc.cbClsExtra = 0; wc.cbWndExtra = 0; - wc.hInstance = GetModuleHandle(NULL); + wc.hInstance = GetModuleHandleW(NULL); wc.hIcon = (HICON)windowIcon; wc.hCursor = _DefaultCursor; wc.hbrBackground = WHITE_BRUSH; From ba6ab6262629bf21843cee3cfd4892ad70b813c8 Mon Sep 17 00:00:00 2001 From: Jan Boon Date: Mon, 27 May 2019 06:53:37 +0800 Subject: [PATCH 61/77] Added tag ryzomcore/v1.0.1 for changeset 8eb94c3549be --HG-- branch : develop --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 6a404b346..5dfa83d0e 100644 --- a/.hgtags +++ b/.hgtags @@ -14,3 +14,4 @@ bfe5628e14a024ba7ea32e4b326ae433a07856b9 ryzomcore/v0.11.3 043aaeb3d8a2a54177581b57bda87a9deaad510e ryzom-patch-3.1.0-april_patch 00dde390a394fce9da06c2f3264140282158d39f 3.3.0 dcd4c4d161ef775136e18c7e8f5072b75dede27e ryzom-patch-3.3.1 +8eb94c3549be898fdc4a7c6d791d2477bdc11a18 ryzomcore/v1.0.1 From 4d45de3e7d7c9838f05789ac8dfa1845d9713150 Mon Sep 17 00:00:00 2001 From: Jan Boon Date: Mon, 27 May 2019 06:54:42 +0800 Subject: [PATCH 62/77] Added tag ryzomcore/v1.0.0 for changeset 3e92c7104c20 --HG-- branch : develop --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 5dfa83d0e..463c24849 100644 --- a/.hgtags +++ b/.hgtags @@ -15,3 +15,4 @@ bfe5628e14a024ba7ea32e4b326ae433a07856b9 ryzomcore/v0.11.3 00dde390a394fce9da06c2f3264140282158d39f 3.3.0 dcd4c4d161ef775136e18c7e8f5072b75dede27e ryzom-patch-3.3.1 8eb94c3549be898fdc4a7c6d791d2477bdc11a18 ryzomcore/v1.0.1 +3e92c7104c20d6bc6c2147b4b5fc289e8621d322 ryzomcore/v1.0.0 From 1163d11ede67026625b200bda385bbd97886afde Mon Sep 17 00:00:00 2001 From: Jan Boon Date: Mon, 27 May 2019 06:57:51 +0800 Subject: [PATCH 63/77] Cleanup tags --HG-- branch : develop --- .hgtags | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.hgtags b/.hgtags index 463c24849..697b987fa 100644 --- a/.hgtags +++ b/.hgtags @@ -1,4 +1,3 @@ -950d650ca92e6041611258d7e5131ccf661e4ec2 compatibility-merge 4eddbaff0c5e5d685db96ee3e8427aa0fd96ac83 ryzomcore/v0.8.0 00d9b6e29e95f56785fbf85abe60afd34674f402 ryzomcore/v0.9.0 79776c337176dd5b02e1a74fe5dfb703b91747aa ryzomcore/v0.9.1 @@ -12,7 +11,7 @@ bfe5628e14a024ba7ea32e4b326ae433a07856b9 ryzomcore/v0.11.3 153e0b605c9e0c83ba05b6428c62838b49cc84b2 ryzom-patch-3.0.1 4300cc14aad098b1f86ea4c55577b7fa4a4cb5d2 ryzom-patch-3.1.0 043aaeb3d8a2a54177581b57bda87a9deaad510e ryzom-patch-3.1.0-april_patch -00dde390a394fce9da06c2f3264140282158d39f 3.3.0 +00dde390a394fce9da06c2f3264140282158d39f ryzom-patch-3.3.0 dcd4c4d161ef775136e18c7e8f5072b75dede27e ryzom-patch-3.3.1 8eb94c3549be898fdc4a7c6d791d2477bdc11a18 ryzomcore/v1.0.1 3e92c7104c20d6bc6c2147b4b5fc289e8621d322 ryzomcore/v1.0.0 From c439a10cfec123470fcf5a5a31c8eae36c56ae2d Mon Sep 17 00:00:00 2001 From: Nimetu Date: Mon, 3 Jun 2019 20:55:39 +0300 Subject: [PATCH 64/77] Fixed: WebIG notif thread did not have curl certificates loaded. --HG-- branch : develop --- .../src/interface_v3/group_html_webig.cpp | 23 +++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/code/ryzom/client/src/interface_v3/group_html_webig.cpp b/code/ryzom/client/src/interface_v3/group_html_webig.cpp index c7ee1a6c3..8f5c6da01 100644 --- a/code/ryzom/client/src/interface_v3/group_html_webig.cpp +++ b/code/ryzom/client/src/interface_v3/group_html_webig.cpp @@ -30,6 +30,7 @@ #include "../connection.h" #include +#include "nel/gui/curl_certificates.h" using namespace std; using namespace NLMISC; @@ -168,6 +169,17 @@ public: _Thread = NULL; curl_global_init(CURL_GLOBAL_ALL); + Curl = NULL; + //nlinfo("ctor CWebigNotificationThread"); + } + + void init() + { + if (Curl) + { + return; + } + Curl = curl_easy_init(); if(!Curl) return; curl_easy_setopt(Curl, CURLOPT_COOKIEFILE, ""); @@ -175,7 +187,8 @@ public: curl_easy_setopt(Curl, CURLOPT_USERAGENT, getUserAgent().c_str()); curl_easy_setopt(Curl, CURLOPT_FOLLOWLOCATION, 1); curl_easy_setopt(Curl, CURLOPT_WRITEFUNCTION, writeDataFromCurl); - //nlinfo("ctor CWebigNotificationThread"); + + NLGUI::CCurlCertificates::useCertificates(Curl); } ~CWebigNotificationThread() @@ -183,7 +196,7 @@ public: if(Curl) { curl_easy_cleanup(Curl); - Curl = 0; + Curl = NULL; } if (_Thread) { @@ -275,6 +288,9 @@ public: void startThread() { + // initialize curl outside thread + init(); + if (!_Thread) { _Thread = IThread::create(this); @@ -286,7 +302,6 @@ public: { nlwarning("WebIgNotification thread already started"); } - } void stopThread() @@ -305,7 +320,7 @@ public: } } - bool isRunning() const + bool isRunning() const { return _Running; } From abad5aa84ef7405ed7c9dcd63cae2aca6387fa12 Mon Sep 17 00:00:00 2001 From: Nimetu Date: Tue, 4 Jun 2019 13:35:00 +0300 Subject: [PATCH 65/77] Changed: Workaround for intermittent ssl certificate issue under windows. --HG-- branch : develop --- code/nel/src/gui/curl_certificates.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/code/nel/src/gui/curl_certificates.cpp b/code/nel/src/gui/curl_certificates.cpp index 6d1bc86ee..dbd3005ad 100644 --- a/code/nel/src/gui/curl_certificates.cpp +++ b/code/nel/src/gui/curl_certificates.cpp @@ -332,7 +332,9 @@ namespace NLGUI { ERR_error_string_n(errCode, errorBuffer, 1024); nlwarning("Error adding certificate %s: %s", entry.name.c_str(), errorBuffer); - res = CURLE_SSL_CACERT; + // There seems to be intermittent issues (on windows) where cert loading will fail for same 3 to 5 certs + // with an 'SSL_shutdown while in init' error. It does not seem to be fatal for connection. + //res = CURLE_SSL_CACERT; } } else From 527d4bf00c65329d20e22da4cc4bd76ee59122d1 Mon Sep 17 00:00:00 2001 From: Nimetu Date: Thu, 6 Jun 2019 11:03:47 +0300 Subject: [PATCH 66/77] Changed: Show server returned error message for http/404,500 errors --HG-- branch : develop --- code/nel/src/gui/group_html.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/code/nel/src/gui/group_html.cpp b/code/nel/src/gui/group_html.cpp index 1b3a23ce4..b2808ad14 100644 --- a/code/nel/src/gui/group_html.cpp +++ b/code/nel/src/gui/group_html.cpp @@ -3827,6 +3827,9 @@ namespace NLGUI return; } + // received content from remote + std::string content = trim(_CurlWWW->Content); + // save HSTS header from all requests regardless of HTTP code if (_CurlWWW->hasHSTSHeader()) { @@ -3868,8 +3871,11 @@ namespace NLGUI else if ( (code < 200 || code >= 300) ) { // catches 304 not modified, but html is not in cache anyway - browseError(string("Connection failed\nhttp code " + toString((sint32)code) + ")\nURL '" + _CurlWWW->Url + "'").c_str()); - return; + // if server did not send any error back + if (content.empty()) + { + content = string("ERROR

Connection failed

HTTP code '" + toString((sint32)code) + "'

URL '" + _CurlWWW->Url + "'

"); + } } char *ch; @@ -3880,7 +3886,7 @@ namespace NLGUI contentType = ch; } - htmlDownloadFinished(_CurlWWW->Content, contentType, code); + htmlDownloadFinished(content, contentType, code); // clear curl handler if (MultiCurl) From f17aeff6f2062bf451d3e4c2d67d67a9d2edcb24 Mon Sep 17 00:00:00 2001 From: Inky Date: Wed, 19 Jun 2019 00:10:01 +0300 Subject: [PATCH 67/77] Changed: cli character selection --HG-- branch : develop --- code/ryzom/client/src/client.cpp | 7 +++++++ code/ryzom/client/src/connection.cpp | 22 +++++++++++++++------- code/ryzom/client/src/connection.h | 1 + 3 files changed, 23 insertions(+), 7 deletions(-) diff --git a/code/ryzom/client/src/client.cpp b/code/ryzom/client/src/client.cpp index 4c0121d2e..37cb36279 100644 --- a/code/ryzom/client/src/client.cpp +++ b/code/ryzom/client/src/client.cpp @@ -180,6 +180,7 @@ int main(int argc, char **argv) Args.addAdditionalArg("login", "Login to use", true, false); Args.addAdditionalArg("password", "Password to use", true, false); Args.addAdditionalArg("shard_id", "Shard ID to use", true, false); + Args.addAdditionalArg("slot", "Char slot to use", true, false); #ifdef TEST_CRASH_COUNTER Args.addArg("", "crash", "", "Crash client before init"); @@ -220,6 +221,12 @@ int main(int argc, char **argv) if (Args.haveAdditionalArg("shard_id")) sLoginShardId = Args.getAdditionalArg("shard_id").front(); + + if (Args.haveAdditionalArg("slot")) + { + if (!fromString(Args.getAdditionalArg("slot").front(), LoginCharsel)) + LoginCharsel = -1; + } } } diff --git a/code/ryzom/client/src/connection.cpp b/code/ryzom/client/src/connection.cpp index 045822370..dd776b7fb 100644 --- a/code/ryzom/client/src/connection.cpp +++ b/code/ryzom/client/src/connection.cpp @@ -144,14 +144,13 @@ ucstring PlayerSelectedHomeShardName; ucstring PlayerSelectedHomeShardNameWithParenthesis; extern std::string CurrentCookie; - ucstring NewKeysCharNameWanted; // name of the character for which a new keyset must be created ucstring NewKeysCharNameValidated; std::string GameKeySet = "keys.xml"; std::string RingEditorKeySet = "keys_r2ed.xml"; string ScenarioFileName; - +sint LoginCharsel = -1; static const char *KeySetVarName = "BuiltInKeySets"; @@ -1095,8 +1094,15 @@ TInterfaceState globalMenu() noUserChar = userChar = false; if( FarTP.isReselectingChar() || !FarTP.isServerHopInProgress() ) // if doing a Server Hop, expect serverReceivedReady without action from the user { + sint charSelect = -1; + if (ClientCfg.SelectCharacter != -1) + charSelect = ClientCfg.SelectCharacter; + + if (LoginCharsel != -1) + charSelect = LoginCharsel; + WaitServerAnswer = false; - if (ClientCfg.SelectCharacter == -1) + if (charSelect == -1) { CCDBNodeLeaf *pNL = NLGUI::CDBManager::getInstance()->getDbProp("UI:SERVER_RECEIVED_CHARS", false); if (pNL != NULL) @@ -1112,7 +1118,7 @@ TInterfaceState globalMenu() else { // check that the pre selected character is available - if (CharacterSummaries[ClientCfg.SelectCharacter].People == EGSPD::CPeople::Unknown) + if (CharacterSummaries[charSelect].People == EGSPD::CPeople::Unknown || charSelect > 4) { // BAD ! preselected char does not exist, use the first available or fail uint i; @@ -1132,12 +1138,14 @@ TInterfaceState globalMenu() if (ret == UDriver::noId) exit(-1); else - ClientCfg.SelectCharacter = i; + charSelect = i; } } - // Auto-selection for fast launching (dev only) - CAHManager::getInstance()->runActionHandler("launch_game", NULL, toString("slot=%d|edit_mode=0", ClientCfg.SelectCharacter)); + CAHManager::getInstance()->runActionHandler("launch_game", NULL, toString("slot=%d|edit_mode=0", charSelect)); + + if (LoginCharsel == -1) + ClientCfg.SelectCharacter = charSelect; } } diff --git a/code/ryzom/client/src/connection.h b/code/ryzom/client/src/connection.h index 92dfa859e..a424e80e9 100644 --- a/code/ryzom/client/src/connection.h +++ b/code/ryzom/client/src/connection.h @@ -34,6 +34,7 @@ extern ucstring PlayerSelectedHomeShardName; // The home shard name (aniro, extern ucstring PlayerSelectedHomeShardNameWithParenthesis; // Same with parenthesis extern std::vector CharacterSummaries; extern std::string UserPrivileges; +extern sint LoginCharsel; extern ucstring NewKeysCharNameWanted; extern ucstring NewKeysCharNameValidated; From 3da8dcbdac84a5f9f8688a340f4c126fae1e38be Mon Sep 17 00:00:00 2001 From: Inky Date: Tue, 25 Jun 2019 23:35:52 +0300 Subject: [PATCH 68/77] Changed: copy of changeset #ba5a7ec85045 (dead branch) --HG-- branch : develop --- code/ryzom/client/src/login.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/code/ryzom/client/src/login.cpp b/code/ryzom/client/src/login.cpp index 986465986..52f51873d 100644 --- a/code/ryzom/client/src/login.cpp +++ b/code/ryzom/client/src/login.cpp @@ -61,6 +61,7 @@ #include "game_share/bg_downloader_msg.h" #include "misc.h" +#include "user_agent.h" void ConnectToShard(); @@ -783,6 +784,15 @@ void initLoginScreen() ClientApp = ClientCfg.ConfigFile.getVar("Application").asString(0); + // version + std::string ext; + if (ClientApp.find("ryzom_") != ucstring::npos) + ext = " (" + ClientApp.substr(6) + ")"; + + CViewText *pV = dynamic_cast(CWidgetManager::getInstance()->getElementFromId("ui:login:checkpass:content:ver_value")); + if (pV) + pV->setHardText(getDisplayVersion() + (ext.empty() ? "" : ext)); + // give priority to login specified as argument string l = !LoginLogin.empty() ? LoginLogin:ClientCfg.LastLogin; From 7d688f1a6410ed8dd2f36123ac835c649ba1d5e7 Mon Sep 17 00:00:00 2001 From: Nimetu Date: Fri, 12 Jul 2019 14:07:02 +0300 Subject: [PATCH 69/77] Fixed: IOS crash on startup when phrase language file is missing. --HG-- branch : develop --- .../src/input_output_service/string_manager_parser.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/code/ryzom/server/src/input_output_service/string_manager_parser.cpp b/code/ryzom/server/src/input_output_service/string_manager_parser.cpp index ef55570f9..79d0aba50 100644 --- a/code/ryzom/server/src/input_output_service/string_manager_parser.cpp +++ b/code/ryzom/server/src/input_output_service/string_manager_parser.cpp @@ -242,9 +242,17 @@ public: return; } + // no _wk file or empty if (addition.size() == 0) return; + // no _lang file or empty + if (reference.size() == 0) + { + text = prepareExcelSheet(addition); + return; + } + // create missing columns in reference and addition to make the diff for (uint i=0; i Date: Tue, 16 Jul 2019 15:09:50 +0300 Subject: [PATCH 70/77] Changed: Fixes for php7 --HG-- branch : develop --- .../ams/autoload/.plugincache.php.swp | Bin 16384 -> 0 bytes code/web/private_php/ams/autoload/helpers.php | 1 - code/web/private_php/ams/libinclude.php | 4 +- .../smarty_internal_compilebase.php | 41 +- code/web/public_php/admin/common.php | 2 +- .../web/public_php/admin/functions_common.php | 9 +- code/web/public_php/admin/functions_mysql.php | 381 -------------- .../web/public_php/admin/functions_mysqli.php | 10 +- .../admin/functions_tool_log_analyser.php | 4 +- .../public_php/admin/functions_tool_main.php | 6 +- code/web/public_php/admin/jpgraph/jpgraph.php | 66 +-- .../admin/jpgraph/jpgraph_gradient.php | 2 +- .../public_php/admin/jpgraph/jpgraph_line.php | 6 +- .../public_php/admin/jpgraph/jpgraph_log.php | 11 +- .../admin/jpgraph/jpgraph_plotmark.inc | 6 +- .../admin/jpgraph/jpgraph_polar.php | 2 +- .../admin/jpgraph/jpgraph_radar.php | 16 +- code/web/public_php/admin/nel/nel_message.php | 7 +- .../public_php/admin/smarty/Smarty.class.php | 2 +- .../admin/smarty/Smarty_Compiler.class.php | 17 +- .../admin/templates/default/_index.tpl | 486 ------------------ .../admin/templates/default/index.tpl | 2 +- code/web/public_php/login/config.php | 5 +- code/web/public_php/login/logs/placeholder | 1 - .../ring/ring_session_manager_itf.php | 28 +- .../public_php/ring/welcome_service_itf.php | 2 +- code/web/public_php/tools/nel_message.php | 9 +- 27 files changed, 133 insertions(+), 993 deletions(-) delete mode 100644 code/web/private_php/ams/autoload/.plugincache.php.swp delete mode 100644 code/web/public_php/admin/functions_mysql.php delete mode 100644 code/web/public_php/admin/templates/default/_index.tpl delete mode 100644 code/web/public_php/login/logs/placeholder diff --git a/code/web/private_php/ams/autoload/.plugincache.php.swp b/code/web/private_php/ams/autoload/.plugincache.php.swp deleted file mode 100644 index 4993b302e2b689c202f1f0d64181857d67e06a07..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 16384 zcmeI3UuYaf9LL92jji^dg+dW@OjDAcw%0#u5lx#mjc{#Rlcud`iO1gUTz1>L-OKK5 zuGcEm`e1!gK?)+&heGj1T7_b*;)@_6_#hOl5V3-Sh>AW`r20_5zx{K&cg@`eau15L z@X6io{^rl`J2StXncL*nAIR+Ho7Zh(IF>SY_3WjwUweLMFFwMUW80E0w>!j?SzLQy zWN>KvriX_1G`CJ0c1fhkI_-$E?HUtlr+U;bWc^W}H%SBfYF zlmbctrGQdEDWDWk3Md7X0{=4wWO+Wj0iWlASHUeIH*i$&{k8CXK0X(KE*OxFI+OxR z0i}RaKq;UUPzopolmbctrGQdEDWDYi?I735t1W0%1t@E&*_RKQ_S0MCLxz`-?aXnYPn z1|NWT!EtZ|>;)-sFIWkdfva~gb_JXVC&6=|0&K7qYzE7~FI|j%2d2Sga2lKfHrNTa zfJeawFdzJVJ7eF1ufPTHCU^zB3|;`cz#v!xy1# zLp(a3=Pdf#BMsB#Yq#*=jg72n6>Q$md&*hsG2f`{<%(vW7d$I3P21wGkR$%f9T`~m z`G$NAKNe(|N{63(psYDsi3j&J$I+_Mo#+!8g@tmzP)$n5%z099-<;b8E)Bu$+#!*d z>-<#dRLcJhvfwyccw%WKF*{H8z;c$JxTvEw!KF<)MAfH~f(r6fsBEh7K9Aj-t7ERz zr00@rdYdL1^DW_;-m-~w9%e}|`fyn-3$%y~M4r*1(7bal;cX(9Iv0GJY~#~DR1Y3a zw)AKc9?j5DVKFT{iz?DN*UG{vnQr8rY~$TX%^E(+mOjd$rNZ7c=?SO$V9@Jod9-je zQLPU6n$fB0+@{WDbhzWTbjPJWCnki$O}$0EO??g{$q~|XEC_pZ%$vFD6LrCEhA;<% zC<+8Yj3Qmxq z{sjt9cpi$9up~`*3PR?MzB;q`K0RD>MKTjdL>`lpr%Y+so*bcBjoZh&$A*T72KV84 z|HR%WcZVUs?M{~JXVA|rQQcghErP66Yjy@*rInF0lZGHD2^hd z|A_X@?w1_ z;$_F2LLcEhp5IrZ6@ouWuMMA?QT;NawGjQ#e_M;F)VEM#v&wIsL3sQ&;_?@ ziA+SVd{J{<9`scI)pRUd7^gK$iVxt`b;EYJYj`;W3zw1*mWIEU#2fHB&sF(u%##cZ z=3#BZ7MSMK%s7PxA?c)MS}sR8lbFbI&BBa2_)aF(PwW48Xgv;S{f}iXyMXolX|NM)1owfZ;7{269NK`q~-=oc3T3%xrp4j|pNJHsxB(n*w1b>@c z?+Nog*lXDKVSiVncl=;au=_weIpg?ABd-;USr7m2o~7SEqg}DOov36{$5`@=zMBQ! k=l>RkotY>(ex;EP{hxe=wgeL;()Jqf@8{UW5qu5%2YG$87ytkO diff --git a/code/web/private_php/ams/autoload/helpers.php b/code/web/private_php/ams/autoload/helpers.php index 28e4ce036..6838699b5 100644 --- a/code/web/private_php/ams/autoload/helpers.php +++ b/code/web/private_php/ams/autoload/helpers.php @@ -29,7 +29,6 @@ class Helpers { // define('SMARTY_SPL_AUTOLOAD',1); require_once $AMS_LIB . '/smarty/libs/Smarty.class.php'; - spl_autoload_register( '__autoload' ); $smarty = new Smarty; $smarty -> setCompileDir( $SITEBASE . '/templates_c/' ); diff --git a/code/web/private_php/ams/libinclude.php b/code/web/private_php/ams/libinclude.php index 230c6849c..20b1dba0a 100644 --- a/code/web/private_php/ams/libinclude.php +++ b/code/web/private_php/ams/libinclude.php @@ -3,7 +3,7 @@ * Base include file for library functions for AMS. * Autoload function that loads the classes in case they aren't loaded yet. */ -function __autoload( $className ){ +function __ams_autoload( $className ){ global $AMS_LIB; global $SITEBASE; //if the class exists in the lib's autload dir, load that one @@ -16,4 +16,6 @@ function __autoload( $className ){ } } +spl_autoload_register( '__ams_autoload' ); + diff --git a/code/web/private_php/ams/smarty/libs/sysplugins/smarty_internal_compilebase.php b/code/web/private_php/ams/smarty/libs/sysplugins/smarty_internal_compilebase.php index f78f15f40..075b2a72e 100644 --- a/code/web/private_php/ams/smarty/libs/sysplugins/smarty_internal_compilebase.php +++ b/code/web/private_php/ams/smarty/libs/sysplugins/smarty_internal_compilebase.php @@ -72,30 +72,31 @@ abstract class Smarty_Internal_CompileBase } // named attribute } else { - $kv = each($mixed); - // option flag? - if (in_array($kv['key'], $this->option_flags)) { - if (is_bool($kv['value'])) { - $_indexed_attr[$kv['key']] = $kv['value']; - } elseif (is_string($kv['value']) && in_array(trim($kv['value'], '\'"'), array('true', 'false'))) { - if (trim($kv['value']) == 'true') { - $_indexed_attr[$kv['key']] = true; + foreach($mixed as $k => $v) { + // option flag? + if (in_array($k, $this->option_flags)) { + if (is_bool($v)) { + $_indexed_attr[$k] = $v; + } elseif (is_string($v) && in_array(trim($v, '\'"'), array('true', 'false'))) { + if (trim($v) == 'true') { + $_indexed_attr[$k] = true; + } else { + $_indexed_attr[$k] = false; + } + } elseif (is_numeric($v) && in_array($v, array(0, 1))) { + if ($v == 1) { + $_indexed_attr[$k] = true; + } else { + $_indexed_attr[$k] = false; + } } else { - $_indexed_attr[$kv['key']] = false; - } - } elseif (is_numeric($kv['value']) && in_array($kv['value'], array(0, 1))) { - if ($kv['value'] == 1) { - $_indexed_attr[$kv['key']] = true; - } else { - $_indexed_attr[$kv['key']] = false; + $compiler->trigger_template_error("illegal value of option flag \"{$k}\"", $compiler->lex->taglineno); } + // must be named attribute } else { - $compiler->trigger_template_error("illegal value of option flag \"{$kv['key']}\"", $compiler->lex->taglineno); + reset($mixed); + $_indexed_attr[$k] = $v; } - // must be named attribute - } else { - reset($mixed); - $_indexed_attr[key($mixed)] = $mixed[key($mixed)]; } } } diff --git a/code/web/public_php/admin/common.php b/code/web/public_php/admin/common.php index 1ddecc2d9..ceb9aa87b 100644 --- a/code/web/public_php/admin/common.php +++ b/code/web/public_php/admin/common.php @@ -32,7 +32,7 @@ $tpl = new Smarty; if (!is_object($tpl)) die("error on smarty init"); - $iPhone = (strstr($_SERVER['HTTP_USER_AGENT'], "iPhone") !== FALSE); + $iPhone = (strstr($_SERVER['HTTP_USER_AGENT'], "iPhone") !== FALSE); $tpl->assign('iPhone', $iPhone); $tpl->template_dir = NELTOOL_SYSTEMBASE .'/templates/default/'; diff --git a/code/web/public_php/admin/functions_common.php b/code/web/public_php/admin/functions_common.php index c7553fcba..a06183109 100644 --- a/code/web/public_php/admin/functions_common.php +++ b/code/web/public_php/admin/functions_common.php @@ -4,6 +4,13 @@ * THIS FILE SHOULD ONLY INCLUDE SMALL USEFUL FUNCTIONS */ + if (!function_exists('ereg')) { + /** removed from php 7.0.0 */ + function ereg($pattern, $line, &$match = array()) { + return preg_match('/'.$pattern.'/', $line, $match); + } + } + /* * pushes some data in the debug variable */ @@ -206,4 +213,4 @@ } } -?> \ No newline at end of file +?> diff --git a/code/web/public_php/admin/functions_mysql.php b/code/web/public_php/admin/functions_mysql.php deleted file mode 100644 index 79c968ca9..000000000 --- a/code/web/public_php/admin/functions_mysql.php +++ /dev/null @@ -1,381 +0,0 @@ -persistency = $persistency; - $this->user = $sqluser; - $this->password = $sqlpassword; - $this->server = $sqlserver; - $this->dbname = $database; - - if($this->persistency) - { - $this->db_connect_id = mysql_pconnect($this->server, $this->user, $this->password); - } - else - { - $this->db_connect_id = mysql_connect($this->server, $this->user, $this->password); - } - if($this->db_connect_id) - { - if($database != "") - { - $this->dbname = $database; - $dbselect = mysql_select_db($this->dbname); - if(!$dbselect) - { - mysql_close($this->db_connect_id); - $this->db_connect_id = $dbselect; - } - } - return $this->db_connect_id; - } - else - { - echo "Connection to mySQL failed!"; - exit; - } - } - - // - // Other base methods - // - function sql_close() - { - if($this->db_connect_id) - { - if($this->query_result) - { - @mysql_free_result($this->query_result); - } - $result = mysql_close($this->db_connect_id); - return $result; - } - else - { - return false; - } - } - - // - // Base query method - // - function sql_query($query = "", $transaction = FALSE) - { - // Remove any pre-existing queries - unset($this->query_result); - if($query != "") - { - nt_common_add_debug($query); - $this->num_queries++; - $this->query_result = mysql_query($query, $this->db_connect_id); - } - if($this->query_result) - { - unset($this->row[$this->query_result]); - unset($this->rowset[$this->query_result]); - return $this->query_result; - } - else - { - return ( $transaction == 'END_TRANSACTION' ) ? true : false; - } - } - - function sql_select_db($dbname) - { - if($this->db_connect_id) - { - $result = mysql_select_db($dbname, $this->db_connect_id); - return $result; - } - return false; - } - function sql_reselect_db() - { - if($this->db_connect_id) - { - $result = mysql_select_db($this->dbname, $this->db_connect_id); - return $result; - } - return false; - } - // - // Other query methods - // - function sql_numrows($query_id = 0) - { - if(!$query_id) - { - $query_id = $this->query_result; - } - if($query_id) - { - $result = mysql_num_rows($query_id); - return $result; - } - else - { - return false; - } - } - function sql_affectedrows() - { - if($this->db_connect_id) - { - $result = mysql_affected_rows($this->db_connect_id); - return $result; - } - else - { - return false; - } - } - function sql_numfields($query_id = 0) - { - if(!$query_id) - { - $query_id = $this->query_result; - } - if($query_id) - { - $result = mysql_num_fields($query_id); - return $result; - } - else - { - return false; - } - } - function sql_fieldname($offset, $query_id = 0) - { - if(!$query_id) - { - $query_id = $this->query_result; - } - if($query_id) - { - $result = mysql_field_name($query_id, $offset); - return $result; - } - else - { - return false; - } - } - function sql_fieldtype($offset, $query_id = 0) - { - if(!$query_id) - { - $query_id = $this->query_result; - } - if($query_id) - { - $result = mysql_field_type($query_id, $offset); - return $result; - } - else - { - return false; - } - } - function sql_fetchrow($query_id = 0) - { - if(!$query_id) - { - $query_id = $this->query_result; - } - if($query_id) - { - $this->row[$query_id] = mysql_fetch_array($query_id); - return $this->row[$query_id]; - } - else - { - return false; - } - } - function sql_fetchrowset($query_id = 0) - { - if(!$query_id) - { - $query_id = $this->query_result; - } - if($query_id) - { - unset($this->rowset[$query_id]); - unset($this->row[$query_id]); - while($this->rowset[$query_id] = mysql_fetch_array($query_id)) - { - $result[] = $this->rowset[$query_id]; - } - return $result; - } - else - { - return false; - } - } - function sql_fetchfield($field, $rownum = -1, $query_id = 0) - { - if(!$query_id) - { - $query_id = $this->query_result; - } - if($query_id) - { - if($rownum > -1) - { - $result = mysql_result($query_id, $rownum, $field); - } - else - { - if(empty($this->row[$query_id]) && empty($this->rowset[$query_id])) - { - if($this->sql_fetchrow()) - { - $result = $this->row[$query_id][$field]; - } - } - else - { - if($this->rowset[$query_id]) - { - $result = $this->rowset[$query_id][$field]; - } - else if($this->row[$query_id]) - { - $result = $this->row[$query_id][$field]; - } - } - } - return $result; - } - else - { - return false; - } - } - function sql_rowseek($rownum, $query_id = 0){ - if(!$query_id) - { - $query_id = $this->query_result; - } - if($query_id) - { - $result = mysql_data_seek($query_id, $rownum); - return $result; - } - else - { - return false; - } - } - function sql_nextid(){ - if($this->db_connect_id) - { - $result = mysql_insert_id($this->db_connect_id); - return $result; - } - else - { - return false; - } - } - function sql_freeresult($query_id = 0){ - if(!$query_id) - { - $query_id = $this->query_result; - } - - if ( $query_id ) - { - unset($this->row[$query_id]); - unset($this->rowset[$query_id]); - - @mysql_free_result($query_id); - - return true; - } - else - { - return false; - } - } - function sql_error($query_id = 0) - { - $result["message"] = mysql_error($this->db_connect_id); - $result["code"] = mysql_errno($this->db_connect_id); - - return $result; - } - -} // class sql_db - -class sql_db_string extends sql_db -{ - // - // Constructor ($connstring format : mysql://user:password@host/dbname) - // - function sql_db_string($connstring, $persistency = true) - { - $ret = false; - - if ($connstring != '') - { - if (ereg("^mysql\:\/\/([^\:]+)\:([^\@]+)\@([^\\]+)\/([^\/]+)[\/]?$", $connstring, $params)) - { - $sqlserver = $params[3]; - $sqluser = $params[1]; - $sqlpassword = $params[2]; - $database = $params[4]; - - $ret = $this->sql_db($sqlserver, $sqluser, $sqlpassword, $database, $persistency); - } - } - - return $ret; - } -} // class sql_db_string - - -} // if ... define - -?> \ No newline at end of file diff --git a/code/web/public_php/admin/functions_mysqli.php b/code/web/public_php/admin/functions_mysqli.php index 8cc2737c3..82ef9efa7 100644 --- a/code/web/public_php/admin/functions_mysqli.php +++ b/code/web/public_php/admin/functions_mysqli.php @@ -41,7 +41,7 @@ class sql_db // // Constructor // - function sql_db($sqlserver, $sqluser, $sqlpassword, $database, $persistency = true) + function __construct($sqlserver, $sqluser, $sqlpassword, $database, $persistency = true) { $this->persistency = $persistency; @@ -72,8 +72,7 @@ class sql_db } else { - echo "Connection to mySQL failed!"; - exit; + throw new \RuntimeException('Connection to mySQL failed!'); } } @@ -270,7 +269,7 @@ class sql_db_string extends sql_db // // Constructor ($connstring format : mysql://user:password@host/dbname) // - function sql_db_string($connstring, $persistency = true) + function __construct($connstring, $persistency = true) { $ret = false; if ($connstring != '') @@ -282,10 +281,9 @@ class sql_db_string extends sql_db $sqlpassword = $params[2]; $database = $params[4]; - $ret = $this->sql_db($sqlserver, $sqluser, $sqlpassword, $database, $persistency); + $ret = parent::__construct($sqlserver, $sqluser, $sqlpassword, $database, $persistency); } } - return $ret; } } // class sql_db_string diff --git a/code/web/public_php/admin/functions_tool_log_analyser.php b/code/web/public_php/admin/functions_tool_log_analyser.php index 3d5478b4b..caf79a9b3 100644 --- a/code/web/public_php/admin/functions_tool_log_analyser.php +++ b/code/web/public_php/admin/functions_tool_log_analyser.php @@ -30,7 +30,7 @@ reset($file_list); foreach($file_list as $tmp_key => $tmp_val) { - $date_ary[$tmp_key] = $file_list['date']; + $date_ary[$tmp_key] = $tmp_val['date']; } array_multisort($date_ary, SORT_DESC, $file_list); @@ -242,4 +242,4 @@ } -?> \ No newline at end of file +?> diff --git a/code/web/public_php/admin/functions_tool_main.php b/code/web/public_php/admin/functions_tool_main.php index cb541a83e..97d833fd3 100644 --- a/code/web/public_php/admin/functions_tool_main.php +++ b/code/web/public_php/admin/functions_tool_main.php @@ -320,6 +320,9 @@ foreach($sline_vars as $sline_var) { $sline_parts = explode("=", $sline_var); + if (!isset($sline_parts[1])) { + $sline_parts[1] = ''; + } if ($sline_parts[0] == 'RunningState') { @@ -1023,6 +1026,7 @@ function tool_main_get_shards_info_from_db($application, $status, $filters, $ringsqlstring='') { $shard_list = array(); + $shard_list2 = array(); $shard_list_result = array(); //nt_common_add_debug('in tool_main_get_shards_info_from_db()'); @@ -1034,7 +1038,7 @@ foreach($status as $sline) { $shard_name = trim($sline['ShardName']); - $shard_id = trim($sline['ShardId']); + $shard_id = isset($sline['ShardId']) ? trim($sline['ShardId']) : ''; if (($shard_name != '' && $shard_id != '') && (isset($filters[$shard_name]) || isset($filters['_all_']))) { diff --git a/code/web/public_php/admin/jpgraph/jpgraph.php b/code/web/public_php/admin/jpgraph/jpgraph.php index ee41112fc..0d0dfbfbf 100644 --- a/code/web/public_php/admin/jpgraph/jpgraph.php +++ b/code/web/public_php/admin/jpgraph/jpgraph.php @@ -225,7 +225,7 @@ require_once 'jpgraph_gradient.php'; class ErrMsgText { var $lt=NULL; var $supportedLocales = array('en'); - function ErrMsgText() { + function __construct() { GLOBAL $__jpg_err_locale; if( !in_array($__jpg_err_locale,$this->supportedLocales) ) $aLoc = 'en'; @@ -294,16 +294,16 @@ GLOBAL $__jpg_err; GLOBAL $__jpg_err_locale ; $__jpg_err_locale = 'en'; class JpGraphError { - function Install($aErrObject) { + static function Install($aErrObject) { GLOBAL $__jpg_err; $__jpg_err = $aErrObject; } - function Raise($aMsg,$aHalt=true){ + static function Raise($aMsg,$aHalt=true){ GLOBAL $__jpg_err; $tmp = new $__jpg_err; $tmp->Raise($aMsg,$aHalt); } - function RaiseL($errnbr,$a1=null,$a2=null,$a3=null,$a4=null,$a5=null) { + static function RaiseL($errnbr,$a1=null,$a2=null,$a3=null,$a4=null,$a5=null) { GLOBAL $__jpg_err; $t = new ErrMsgText(); $msg = $t->Get($errnbr,$a1,$a2,$a3,$a4,$a5); @@ -383,7 +383,7 @@ class JpGraphErrObject { var $iTitle = "JpGraph Error"; var $iDest = false; - function JpGraphErrObject() { + function __construct() { // Empty. Reserved for future use } @@ -631,7 +631,7 @@ class JpgTimer { var $idx; //--------------- // CONSTRUCTOR - function JpgTimer() { + function __construct() { $this->idx=0; } @@ -671,7 +671,7 @@ class DateLocale { //--------------- // CONSTRUCTOR - function DateLocale() { + function __construct() { settype($this->iDayAbb, 'array'); settype($this->iShortDay, 'array'); settype($this->iShortMonth, 'array'); @@ -758,7 +758,7 @@ class Footer { var $iRightMargin = 3; var $iBottomMargin = 3; - function Footer() { + function __construct() { $this->left = new Text(); $this->left->ParagraphAlign('left'); $this->center = new Text(); @@ -866,7 +866,7 @@ class Graph { // aTimeOut Timeout in minutes for image in cache // aInline If true the image is streamed back in the call to Stroke() // If false the image is just created in the cache - function Graph($aWidth=300,$aHeight=200,$aCachedName="",$aTimeOut=0,$aInline=true) { + function __construct($aWidth=300,$aHeight=200,$aCachedName="",$aTimeOut=0,$aInline=true) { GLOBAL $gJpgBrandTiming; // If timing is used create a new timing object if( $gJpgBrandTiming ) { @@ -3071,7 +3071,7 @@ class TTF { var $font_files,$style_names; //--------------- // CONSTRUCTOR - function TTF() { + function __construct() { $this->style_names=array(FS_NORMAL=>'normal',FS_BOLD=>'bold',FS_ITALIC=>'italic',FS_BOLDITALIC=>'bolditalic'); // File names for available fonts $this->font_files=array( @@ -3193,7 +3193,7 @@ class Text { // CONSTRUCTOR // Create new text at absolute pixel coordinates - function Text($aTxt="",$aXAbsPos=0,$aYAbsPos=0) { + function __construct($aTxt="",$aXAbsPos=0,$aYAbsPos=0) { if( ! is_string($aTxt) ) { JpGraphError::RaiseL(25050);//('First argument to Text::Text() must be s atring.'); } @@ -3429,7 +3429,8 @@ class GraphTabTitle extends Text{ var $corner = 6 , $posx = 7, $posy = 4; var $color='darkred',$fillcolor='lightyellow',$bordercolor='black'; var $align = 'left', $width=TABTITLE_WIDTHFIT; - function GraphTabTitle() { + function __construct() { + parent::__construct(); $this->t = ''; $this->font_style = FS_BOLD; $this->hide = true; @@ -3450,8 +3451,9 @@ class GraphTabTitle extends Text{ $this->align = $aAlign; } - function SetPos($aAlign) { - $this->align = $aAlign; + function SetPos($aXAbsPos = 0, $aYAbsPos = 0, $aHAlign = 'left', $aVAlign = 'top') { + //$this->align = $aXAbsPos; + throw new \Exception('Invalid function call. should use SetTabAlign()'); } function SetWidth($aWidth) { @@ -3467,7 +3469,8 @@ class GraphTabTitle extends Text{ $this->corner = $aD ; } - function Stroke(&$aImg) { + // parent class compat function + function Stroke(&$aImg, $x = NULL, $y = NULL) { if( $this->hide ) return; $this->boxed = false; @@ -3560,8 +3563,8 @@ class SuperScriptText extends Text { var $iSDir=0; var $iSimple=false; - function SuperScriptText($aTxt="",$aSuper="",$aXAbsPos=0,$aYAbsPos=0) { - parent::Text($aTxt,$aXAbsPos,$aYAbsPos); + function __construct($aTxt="",$aSuper="",$aXAbsPos=0,$aYAbsPos=0) { + parent::__construct($aTxt,$aXAbsPos,$aYAbsPos); $this->iSuper = $aSuper; } @@ -3738,7 +3741,7 @@ class Grid { var $fill=false,$fillcolor=array('#EFEFEF','#BBCCFF'); //--------------- // CONSTRUCTOR - function Grid(&$aAxis) { + function __construct(&$aAxis) { $this->scale = &$aAxis->scale; $this->img = &$aAxis->img; } @@ -3901,7 +3904,7 @@ class Axis { //--------------- // CONSTRUCTOR - function Axis(&$img,&$aScale,$color=array(0,0,0)) { + function __construct(&$img,&$aScale,$color=array(0,0,0)) { $this->img = &$img; $this->scale = &$aScale; $this->color = $color; @@ -4356,7 +4359,7 @@ class Ticks { //--------------- // CONSTRUCTOR - function Ticks(&$aScale) { + function __construct(&$aScale) { $this->scale=&$aScale; $this->precision = -1; } @@ -4483,7 +4486,8 @@ class LinearTicks extends Ticks { //--------------- // CONSTRUCTOR - function LinearTicks() { + function __construct() { + parent::__construct(); $this->precision = -1; } @@ -4825,7 +4829,7 @@ class LinearScale { var $name = 'lin'; //--------------- // CONSTRUCTOR - function LinearScale($aMin=0,$aMax=0,$aType="y") { + function __construct($aMin=0,$aMax=0,$aType="y") { assert($aType=="x" || $aType=="y" ); assert($aMin<=$aMax); @@ -5360,7 +5364,7 @@ class LinearScale { class RGB { var $rgb_table; var $img; - function RGB(&$aImg) { + function __construct(&$aImg) { $this->img = &$aImg; // Conversion array between color names and RGB @@ -5950,7 +5954,7 @@ class Image { //--------------- // CONSTRUCTOR - function Image($aWidth,$aHeight,$aFormat=DEFAULT_GFORMAT) { + function __construct($aWidth,$aHeight,$aFormat=DEFAULT_GFORMAT) { $this->CreateImgCanvas($aWidth,$aHeight); $this->SetAutoMargin(); @@ -7531,8 +7535,8 @@ class RotImage extends Image { var $a=0; var $dx=0,$dy=0,$transx=0,$transy=0; - function RotImage($aWidth,$aHeight,$a=0,$aFormat=DEFAULT_GFORMAT) { - $this->Image($aWidth,$aHeight,$aFormat); + function __construct($aWidth,$aHeight,$a=0,$aFormat=DEFAULT_GFORMAT) { + parent::__construct($aWidth,$aHeight,$aFormat); $this->dx=$this->left_margin+$this->plotwidth/2; $this->dy=$this->top_margin+$this->plotheight/2; $this->SetAngle($a); @@ -7597,7 +7601,7 @@ class RotImage extends Image { parent::Arc($xc,$yc,$w,$h,$s,$e); } - function FilledArc($xc,$yc,$w,$h,$s,$e) { + function FilledArc($xc,$yc,$w,$h,$s,$e, $style='') { list($xc,$yc) = $this->Rotate($xc,$yc); $s += $this->a; $e += $this->a; @@ -7686,7 +7690,7 @@ class ImgStreamCache { var $timeout=0; // Infinite timeout //--------------- // CONSTRUCTOR - function ImgStreamCache(&$aImg, $aCacheDir=CACHE_DIR) { + function __construct(&$aImg, $aCacheDir=CACHE_DIR) { $this->img = &$aImg; $this->cache_dir = $aCacheDir; } @@ -7862,7 +7866,7 @@ class Legend { var $reverse = false ; //--------------- // CONSTRUCTOR - function Legend() { + function __construct() { // Empty } //--------------- @@ -8334,7 +8338,7 @@ class Plot { var $legendcsimalt=''; //--------------- // CONSTRUCTOR - function Plot(&$aDatay,$aDatax=false) { + function __construct(&$aDatay,$aDatax=false) { $this->numpoints = count($aDatay); if( $this->numpoints==0 ) JpGraphError::RaiseL(25121);//("Empty input data array specified for plot. Must have at least one data point."); @@ -8510,7 +8514,7 @@ class PlotLine { //--------------- // CONSTRUCTOR - function PlotLine($aDir=HORIZONTAL,$aPos=0,$aColor="black",$aWeight=1) { + function __construct($aDir=HORIZONTAL,$aPos=0,$aColor="black",$aWeight=1) { $this->direction = $aDir; $this->color=$aColor; $this->weight=$aWeight; diff --git a/code/web/public_php/admin/jpgraph/jpgraph_gradient.php b/code/web/public_php/admin/jpgraph/jpgraph_gradient.php index d7382c060..356657950 100644 --- a/code/web/public_php/admin/jpgraph/jpgraph_gradient.php +++ b/code/web/public_php/admin/jpgraph/jpgraph_gradient.php @@ -34,7 +34,7 @@ class Gradient { var $numcolors=100; //--------------- // CONSTRUCTOR - function Gradient(&$img) { + function __construct(&$img) { $this->img = &$img; } diff --git a/code/web/public_php/admin/jpgraph/jpgraph_line.php b/code/web/public_php/admin/jpgraph/jpgraph_line.php index 4f9c0d0fb..60ef128ce 100644 --- a/code/web/public_php/admin/jpgraph/jpgraph_line.php +++ b/code/web/public_php/admin/jpgraph/jpgraph_line.php @@ -36,8 +36,8 @@ class LinePlot extends Plot{ //--------------- // CONSTRUCTOR - function LinePlot(&$datay,$datax=false) { - $this->Plot($datay,$datax); + function __construct(&$datay,$datax=false) { + parent::__construct($datay,$datax); $this->mark = new PlotMark(); } //--------------- @@ -424,7 +424,7 @@ class AccLinePlot extends Plot { var $iStartEndZero=true; //--------------- // CONSTRUCTOR - function AccLinePlot($plots) { + function __construct($plots) { $this->plots = $plots; $this->nbrplots = count($plots); $this->numpoints = $plots[0]->numpoints; diff --git a/code/web/public_php/admin/jpgraph/jpgraph_log.php b/code/web/public_php/admin/jpgraph/jpgraph_log.php index 95882e71a..d9561f56e 100644 --- a/code/web/public_php/admin/jpgraph/jpgraph_log.php +++ b/code/web/public_php/admin/jpgraph/jpgraph_log.php @@ -23,8 +23,8 @@ class LogScale extends LinearScale { // CONSTRUCTOR // Log scale is specified using the log of min and max - function LogScale($min,$max,$type="y") { - $this->LinearScale($min,$max,$type); + function __construct($min,$max,$type="y") { + parent::__construct($min,$max,$type); $this->ticks = new LogTicks(); $this->name = 'log'; } @@ -84,7 +84,7 @@ class LogScale extends LinearScale { // Note that for log autoscale the "maxstep" the fourth argument // isn't used. This is just included to give the method the same // signature as the linear counterpart. - function AutoScale(&$img,$min,$max,$dummy) { + function AutoScale(&$img,$min,$max,$dummy, $dummy2 = true) { if( $min==0 ) $min=1; if( $max <= 0 ) { @@ -107,7 +107,8 @@ class LogTicks extends Ticks{ var $label_logtype=LOGLABELS_MAGNITUDE; //--------------- // CONSTRUCTOR - function LogTicks() { + function __construct() { + parent::__construct(); } //--------------- // PUBLIC METHODS @@ -264,4 +265,4 @@ class LogTicks extends Ticks{ } } // Class /* EOF */ -?> \ No newline at end of file +?> diff --git a/code/web/public_php/admin/jpgraph/jpgraph_plotmark.inc b/code/web/public_php/admin/jpgraph/jpgraph_plotmark.inc index bc955bda7..c555aab6e 100644 --- a/code/web/public_php/admin/jpgraph/jpgraph_plotmark.inc +++ b/code/web/public_php/admin/jpgraph/jpgraph_plotmark.inc @@ -59,7 +59,7 @@ class FlagCache { global $_gFlagCache; require_once('jpgraph_flags.php'); if( $_gFlagCache[$aSize] === null ) { - $_gFlagCache[$aSize] =& new FlagImages($aSize); + $_gFlagCache[$aSize] = new FlagImages($aSize); } $f =& $_gFlagCache[$aSize]; $idx = $f->GetIdxByName($aName,$aFullName); @@ -89,7 +89,7 @@ class PlotMark { //-------------- // CONSTRUCTOR - function PlotMark() { + function __construct() { $this->title = new Text(); $this->title->Hide(); $this->csimareas = ''; @@ -479,4 +479,4 @@ class PlotMark { } // Class -?> \ No newline at end of file +?> diff --git a/code/web/public_php/admin/jpgraph/jpgraph_polar.php b/code/web/public_php/admin/jpgraph/jpgraph_polar.php index acab58b88..1690fcb2a 100644 --- a/code/web/public_php/admin/jpgraph/jpgraph_polar.php +++ b/code/web/public_php/admin/jpgraph/jpgraph_polar.php @@ -47,7 +47,7 @@ class PolarPlot { var $csimalts=null; // ALT:s for corresponding target var $line_style='solid',$mark; - function PolarPlot($aData) { + function __construct($aData) { $n = count($aData); if( $n & 1 ) { JpGraphError::RaiseL(17001); diff --git a/code/web/public_php/admin/jpgraph/jpgraph_radar.php b/code/web/public_php/admin/jpgraph/jpgraph_radar.php index ac3b8b38c..d08ca0d11 100644 --- a/code/web/public_php/admin/jpgraph/jpgraph_radar.php +++ b/code/web/public_php/admin/jpgraph/jpgraph_radar.php @@ -15,7 +15,7 @@ require_once('jpgraph_plotmark.inc'); class RadarLogTicks extends Ticks { //--------------- // CONSTRUCTOR - function RadarLogTicks() { + function __construct() { } //--------------- // PUBLIC METHODS @@ -468,17 +468,17 @@ class RadarGraph extends Graph { //("Illegal scale for radarplot ($axtype). Must be \"lin\" or \"log\""); } if( $axtype=="lin" ) { - $this->yscale = & new LinearScale($ymin,$ymax); - $this->yscale->ticks = & new RadarLinearTicks(); + $this->yscale = new LinearScale($ymin,$ymax); + $this->yscale->ticks = new RadarLinearTicks(); $this->yscale->ticks->SupressMinorTickMarks(); } elseif( $axtype=="log" ) { - $this->yscale = & new LogScale($ymin,$ymax); - $this->yscale->ticks = & new RadarLogTicks(); + $this->yscale = new LogScale($ymin,$ymax); + $this->yscale->ticks = new RadarLogTicks(); } - $this->axis = & new RadarAxis($this->img,$this->yscale); - $this->grid = & new RadarGrid(); + $this->axis = new RadarAxis($this->img,$this->yscale); + $this->grid = new RadarGrid(); } function SetSize($aSize) { @@ -644,4 +644,4 @@ class RadarGraph extends Graph { } // Class /* EOF */ -?> \ No newline at end of file +?> diff --git a/code/web/public_php/admin/nel/nel_message.php b/code/web/public_php/admin/nel/nel_message.php index 42dd91cbe..ab0e55f0e 100644 --- a/code/web/public_php/admin/nel/nel_message.php +++ b/code/web/public_php/admin/nel/nel_message.php @@ -19,7 +19,7 @@ var $InputStream; var $Pos; - function CMemStream () + function __construct() { $this->InputStream = false; $this->Pos = 0; @@ -104,11 +104,6 @@ { var $MsgName; - function CMessage() - { - $this->CMemStream(); - } - function setName($name) { $this->MsgName = $name; diff --git a/code/web/public_php/admin/smarty/Smarty.class.php b/code/web/public_php/admin/smarty/Smarty.class.php index 39eed5fc5..d57c1f67e 100644 --- a/code/web/public_php/admin/smarty/Smarty.class.php +++ b/code/web/public_php/admin/smarty/Smarty.class.php @@ -566,7 +566,7 @@ class Smarty /** * The class constructor. */ - function Smarty() + function __construct() { $this->assign('SCRIPT_NAME', isset($_SERVER['SCRIPT_NAME']) ? $_SERVER['SCRIPT_NAME'] : @$GLOBALS['HTTP_SERVER_VARS']['SCRIPT_NAME']); diff --git a/code/web/public_php/admin/smarty/Smarty_Compiler.class.php b/code/web/public_php/admin/smarty/Smarty_Compiler.class.php index c1bc798d1..27bf469f1 100644 --- a/code/web/public_php/admin/smarty/Smarty_Compiler.class.php +++ b/code/web/public_php/admin/smarty/Smarty_Compiler.class.php @@ -78,8 +78,10 @@ class Smarty_Compiler extends Smarty { /** * The class constructor. */ - function Smarty_Compiler() + function __construct() { + parent::__construct(); + // matches double quoted strings: // "foobar" // "foo\"bar" @@ -262,12 +264,11 @@ class Smarty_Compiler extends Smarty { reset($this->_folded_blocks); /* replace special blocks by "{php}" */ - $source_content = preg_replace_callback($search, create_function ('$matches', "return '" - . $this->_quote_replace($this->left_delimiter) . 'php' - . "' . str_repeat(\"\n\", substr_count('\$matches[1]', \"\n\")) .'" - . $this->_quote_replace($this->right_delimiter) - . "';") - , $source_content); + $source_content = preg_replace_callback($search, function($matches) { + return $this->_quote_replace($this->left_delimiter).'php'. + str_repeat("\n", substr_count($matches[1], "\n")). + $this->_quote_replace($this->right_delimiter); + }, $source_content); /* Gather all template tags. */ preg_match_all("~{$ldq}\s*(.*?)\s*{$rdq}~s", $source_content, $_match); @@ -556,7 +557,7 @@ class Smarty_Compiler extends Smarty { case 'php': /* handle folded tags replaced by {php} */ - list(, $block) = each($this->_folded_blocks); + $block = current($this->_folded_blocks); $this->_current_line_no += substr_count($block[0], "\n"); /* the number of matched elements in the regexp in _compile_file() determins the type of folded tag that was found */ diff --git a/code/web/public_php/admin/templates/default/_index.tpl b/code/web/public_php/admin/templates/default/_index.tpl deleted file mode 100644 index 9f7a11340..000000000 --- a/code/web/public_php/admin/templates/default/_index.tpl +++ /dev/null @@ -1,486 +0,0 @@ - -{include file="page_header.tpl"} - -{literal} - -{/literal} - -
- - - - - - - - - -
- -{if $tool_domain_selected && $tool_shard_selected} - - - - - - - - -{if $tool_refresh_rate > 0} - - - -{/if} - -
Refresh
- -
- - -
-
-{/if} - - - - - -{section name=domain loop=$tool_domain_list} - - - -{/section} -
Domains
{$tool_domain_list[domain].domain_name}
- -{if $tool_domain_selected} -
- - - - -{section name=shard loop=$tool_shard_list} -{if $tool_domain_selected == $tool_shard_list[shard].shard_domain_id} - - - -{/if} -{/section} -
Shards
{$tool_shard_list[shard].shard_name}
-{/if} - -{if $restriction_tool_notes && $tool_note_list} -
- - - - -{section name=note loop=$tool_note_list} - -{if $tool_note_list[note].note_mode == 0} - -{elseif $tool_note_list[note].note_mode == 1} - -{/if} - -{/section} -
Notes
{$tool_note_list[note].note_title}{$tool_note_list[note].note_title}
-{/if} - -{if $tool_hd_list} -
- - - - -{section name=hd loop=$tool_hd_list} -{if $tool_hd_list[hd].hd_percent >= 85}{assign var="hdtrclass" value="row_red"} -{elseif $tool_hd_list[hd].hd_percent >= 75}{assign var="hdtrclass" value="row_orange_light"} -{else}{assign var="hdtrclass" value="row0"}{/if} - - - - -{/section} - - - -
HardDrives
{$tool_hd_list[hd].hd_server}{$tool_hd_list[hd].hd_percent}%
{$tool_hd_time|date_format:"%Y/%m/%d %H:%M:%S"}
-{/if} - -
  -{if tool_domain_selected && $tool_shard_selected} - - -{if $tool_annotation_info || $tool_has_lock} - - - - -{/if} - - - - - - -
Annotation {if $tool_has_lock}{/if} -{if $tool_annotation_info} - ({$tool_annotation_info.annotation_user_name} @ {$tool_annotation_info.annotation_date|date_format:"%Y/%m/%d %H:%M:%S"}) -{/if} -
Lock -{if $tool_no_lock} -{* if (!$tool_lock_info || $tool_lock_info.lock_shard_id) && !$tool_cant_lock && ($tool_shard_restart_status == 0) && !$tool_no_domain_lock *} -{if (!$tool_lock_info || $tool_lock_info.lock_shard_id) && !$tool_cant_lock && !$tool_no_domain_lock} - {if $restriction_tool_main_lock_shard}{/if} -{else} - Lock unavailable, a restart sequence is active ! -{/if} -{if ($tool_shard_restart_status == 0) && ($tool_domain_has_shard_restart == 0)} - {if $restriction_tool_main_lock_domain}{/if} -{/if} -{elseif $tool_has_shard_lock} -{if $tool_shard_restart_status == 0} - -{/if} -{if ($tool_shard_restart_status == 0) && ($tool_domain_has_shard_restart == 0)} - {if $restriction_tool_main_lock_domain}{/if} -{elseif $tool_shard_restart_status > 0} - Restart Sequence is active ! -{/if} - -{if $restriction_tool_main_easy_restart && ($tool_shard_restart_status == 0)} - - -{/if} - -{elseif $tool_has_domain_lock} - -{/if} -{if $tool_lock_info} -{if $tool_lock_info.lock_domain_id} Domain{elseif $tool_lock_info.lock_shard_id} Shard{/if} - Locked by {$tool_lock_info.lock_user_name} @ {$tool_lock_info.lock_date|date_format:"%Y/%m/%d %H:%M:%S"} -{else} - Unlocked. -{/if} -
-
-{/if} - -{if !$tool_domain_selected} - - - - -
You need to select a domain.
-{elseif !$tool_shard_selected} - - - - -
You need to select a shard.
-{elseif $tool_domain_error} - - - - -
{$tool_domain_error}
-{else} -{if $tool_as_error} - - - - -
{$tool_as_error}
-
-{/if} -
- - - - - -{**} - -{**} - - - - - - - - - - - - - -{section name=service loop=$tool_services_list} -{assign var="service_shard_id" value=$tool_services_list[service].ShardName} -{if $tool_shard_filters.$service_shard_id || $tool_shard_filters._all_ || ($tool_shard_filters._unknown_ && !$tool_services_list[service].ShardName)} -{cycle assign="trclass" values="row0,row1"} -{assign var="tdclass1" value=""} -{assign var="tdclass2" value=""} -{if $tool_services_list[service]._flags_.rs_stopped}{assign var="tdclass1" value="class=\"cell_inactive1\""}{assign var="tdclass2" value="class=\"cell_inactive2\""}{assign var="trclass" value="row_stopped"}{/if} -{if $tool_services_list[service]._flags_.rs_starting}{* assign var="tdclass1" value="class=\"cell_inactive1\"" *}{assign var="tdclass2" value="class=\"cell_inactive2\""}{assign var="trclass" value="row_starting"}{/if} -{if $tool_services_list[service]._flags_.alert_red && ($tool_services_list[service]._flags_.rs_starting || $tool_services_list[service]._flags_.rs_online)}{assign var="trclass" value="row_red"} -{elseif $tool_services_list[service]._flags_.alert_orange_dark && ($tool_services_list[service]._flags_.rs_starting || $tool_services_list[service]._flags_.rs_online)}{assign var="trclass" value="row_orange_dark"} -{elseif $tool_services_list[service]._flags_.alert_orange_light && ($tool_services_list[service]._flags_.rs_starting || $tool_services_list[service]._flags_.rs_online)}{assign var="trclass" value="row_orange_light"}{/if} -{assign var="check_name" value=$tool_services_list[service].AliasName} - - - - -{**} - -{**} - - - - - - - - - - - - - -{/if} -{/section} -
AliasNameShardLongNameShortNameServiceAliasHostnameRunning StateRunning OrdersRunning TagsStateReportStart CountersUser SLTick SLMemoryNbPlayersUpTime
{$tool_services_list[service].AliasName}{if $tool_services_list[service].ShardName != ""}{$tool_services_list[service].ShardName}{else}?{/if}{if $tool_services_list[service].ShardId != ""}/{$tool_services_list[service].ShardId}{/if}{$tool_services_list[service].LongName}{$tool_services_list[service].ShortName}{$tool_services_list[service].ServiceAlias}{$tool_services_list[service].Hostname}{$tool_services_list[service].RunningState}{$tool_services_list[service].RunningOrders}{$tool_services_list[service].RunningTags}{$tool_services_list[service].State}{$tool_services_list[service].NoReportSince}{$tool_services_list[service].StartCounter}{$tool_services_list[service].UserSpeedLoop}{$tool_services_list[service].TickSpeedLoop}{$tool_services_list[service].ProcessUsedMemory}{$tool_services_list[service].NbPlayers}{$tool_services_list[service].UpTime}
- - -
- - -{if $restriction_tool_main_easy_restart && ($tool_shard_restart_status > 0)} - -{include file="index_restart_sequence.tpl"} - -{else} - -{if $restriction_tool_main_ws} -
- - - - - -
WS : {if $restriction_tool_main_ws_old}
new/old{/if}
-{if $restriction_tool_main_ws_old} - -{/if} -
- - - - - -{section name=shard loop=$tool_shard_run_list} -{assign var="sname" value=$tool_shard_run_list[shard]} -{if $tool_shard_infos[$sname] && $tool_shard_su_name} - - - - - - - -{/if} -{/section} -
 {$tool_shard_run_list[shard]} -  
-
-
-{/if} - -{if $restriction_tool_main_start || $restriction_tool_main_stop || $restriction_tool_main_restart || $restriction_tool_main_kill || $restriction_tool_main_abort || $restriction_tool_main_reset_counters || $restriction_tool_main_service_autostart} -
- - - - - -
Services :   -{if $restriction_tool_main_start} -   -{/if} -{if $restriction_tool_main_stop} -   -{/if} -{if $restriction_tool_main_restart} -   -{/if} -{if $restriction_tool_main_kill} -   -{/if} -{if $restriction_tool_main_abort} -   -{/if} -{if $restriction_tool_main_service_autostart} -   -   -{/if} -{if $restriction_tool_main_reset_counters} -   -{/if} -
-{/if} - -{if $restriction_tool_main_shard_autostart && $tool_shard_run_list} -
- - - - - -
Shards : - -{section name=shard loop=$tool_shard_run_list} -{assign var="sname" value=$tool_shard_run_list[shard]} - - - - - -{/section} -
 {$tool_shard_run_list[shard]}{if $sname != ""}{$tool_shard_orders[$sname]|replace:'_':' '}{/if}  -   -   -
-{/if} - -{if $restriction_tool_main_execute} -
- - - - - -
Command :    -   -
- -{if $tool_execute_command} -
- - - - - - - -
Command Results for '{$tool_execute_command}' :
-{/if} -{/if} - -{* end of: if $restriction_tool_main_easy_restart && ($tool_shard_restart_status > 0) *} -{/if} -
-{/if} - -
- - -{include file="page_footer.tpl"} diff --git a/code/web/public_php/admin/templates/default/index.tpl b/code/web/public_php/admin/templates/default/index.tpl index 04fe742df..6f7dea40f 100644 --- a/code/web/public_php/admin/templates/default/index.tpl +++ b/code/web/public_php/admin/templates/default/index.tpl @@ -195,7 +195,7 @@   -{if tool_domain_selected && $tool_shard_selected} +{if $tool_domain_selected && $tool_shard_selected} {if $tool_annotation_info || $tool_has_lock} diff --git a/code/web/public_php/login/config.php b/code/web/public_php/login/config.php index d69bdfea1..6ae107119 100644 --- a/code/web/public_php/login/config.php +++ b/code/web/public_php/login/config.php @@ -2,9 +2,10 @@ // This file contains all variables needed by other php scripts -require_once('../config.php'); +require_once dirname(__DIR__).'/config.php'; -$LogRelativePath = 'logs/'; +// !! IMPORTANT !! keep these outside public webroot +$LogRelativePath = '../../logs/'; // ---------------------------------------------------------------------------------------- // Variables for nel database access diff --git a/code/web/public_php/login/logs/placeholder b/code/web/public_php/login/logs/placeholder deleted file mode 100644 index 0519ecba6..000000000 --- a/code/web/public_php/login/logs/placeholder +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/code/web/public_php/ring/ring_session_manager_itf.php b/code/web/public_php/ring/ring_session_manager_itf.php index 4ef78555f..2c6afc477 100644 --- a/code/web/public_php/ring/ring_session_manager_itf.php +++ b/code/web/public_php/ring/ring_session_manager_itf.php @@ -21,7 +21,7 @@ { var $Value; - function RSMGR_TSessionPartStatus() + function __construct() { global $RSMGR_TSessionPartStatus_InvalidValue; $this->Value = $RSMGR_TSessionPartStatus_InvalidValue; @@ -81,7 +81,7 @@ { var $Value; - function RSMGR_TSessionType() + function __construct() { global $RSMGR_TSessionType_InvalidValue; $this->Value = $RSMGR_TSessionType_InvalidValue; @@ -143,7 +143,7 @@ { var $Value; - function RSMGR_TSessionOrientation() + function __construct() { global $RSMGR_TSessionOrientation_InvalidValue; $this->Value = $RSMGR_TSessionOrientation_InvalidValue; @@ -203,7 +203,7 @@ { var $Value; - function RSMGR_TSessionState() + function __construct() { global $RSMGR_TSessionState_InvalidValue; $this->Value = $RSMGR_TSessionState_InvalidValue; @@ -261,7 +261,7 @@ { var $Value; - function RSMGR_TAnimMode() + function __construct() { global $RSMGR_TAnimMode_InvalidValue; $this->Value = $RSMGR_TAnimMode_InvalidValue; @@ -319,7 +319,7 @@ { var $Value; - function RSMGR_TAccessType() + function __construct() { global $RSMGR_TAccessType_InvalidValue; $this->Value = $RSMGR_TAccessType_InvalidValue; @@ -377,7 +377,7 @@ { var $Value; - function RSMGR_TRuleType() + function __construct() { global $RSMGR_TRuleType_InvalidValue; $this->Value = $RSMGR_TRuleType_InvalidValue; @@ -439,7 +439,7 @@ { var $Value; - function RSMGR_TLevelFilter() + function __construct() { global $RSMGR_TLevelFilter_InvalidValue; $this->Value = $RSMGR_TLevelFilter_InvalidValue; @@ -498,7 +498,7 @@ { var $Value; - function RSMGR_TEstimatedDuration() + function __construct() { global $RSMGR_TEstimatedDuration_InvalidValue; $this->Value = $RSMGR_TEstimatedDuration_InvalidValue; @@ -558,7 +558,7 @@ { var $Value; - function RSMGR_TRaceFilter() + function __construct() { global $RSMGR_TRaceFilter_InvalidValue; $this->Value = $RSMGR_TRaceFilter_InvalidValue; @@ -617,7 +617,7 @@ { var $Value; - function RSMGR_TReligionFilter() + function __construct() { global $RSMGR_TReligionFilter_InvalidValue; $this->Value = $RSMGR_TReligionFilter_InvalidValue; @@ -675,7 +675,7 @@ { var $Value; - function RSMGR_TGuildFilter() + function __construct() { global $RSMGR_TGuildFilter_InvalidValue; $this->Value = $RSMGR_TGuildFilter_InvalidValue; @@ -763,7 +763,7 @@ { var $Value; - function RSMGR_TShardFilter() + function __construct() { global $RSMGR_TShardFilter_InvalidValue; $this->Value = $RSMGR_TShardFilter_InvalidValue; @@ -822,7 +822,7 @@ { var $Value; - function RSMGR_TSessionEvent() + function __construct() { global $RSMGR_TSessionEvent_InvalidValue; $this->Value = $RSMGR_TSessionEvent_InvalidValue; diff --git a/code/web/public_php/ring/welcome_service_itf.php b/code/web/public_php/ring/welcome_service_itf.php index 0945a2010..8b043bf55 100644 --- a/code/web/public_php/ring/welcome_service_itf.php +++ b/code/web/public_php/ring/welcome_service_itf.php @@ -14,7 +14,7 @@ { var $Value; - function WS_TUserRole() + function __construct() { global $WS_TUserRole_InvalidValue; $this->Value = $WS_TUserRole_InvalidValue; diff --git a/code/web/public_php/tools/nel_message.php b/code/web/public_php/tools/nel_message.php index b696bb151..d4cbc55d6 100644 --- a/code/web/public_php/tools/nel_message.php +++ b/code/web/public_php/tools/nel_message.php @@ -14,7 +14,7 @@ var $InputStream; var $Pos; - function CMemStream () + function __construct() { $this->InputStream = false; $this->Pos = 0; @@ -115,11 +115,6 @@ { var $MsgName; - function CMessage() - { - $this->CMemStream(); - } - function setName($name) { $this->MsgName = $name; @@ -521,4 +516,4 @@ // // return $ok; // } -?> + From e3b0cdeadf7e8faa8b77196d9e71c48c365f3f0f Mon Sep 17 00:00:00 2001 From: Nimetu Date: Wed, 17 Jul 2019 15:01:58 +0300 Subject: [PATCH 71/77] Changed: Remove duplicate js/css files from ams page template --HG-- branch : develop --- code/web/public_php/ams/templates/layout.tpl | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/code/web/public_php/ams/templates/layout.tpl b/code/web/public_php/ams/templates/layout.tpl index 7720ca65c..8e19e1ec5 100644 --- a/code/web/public_php/ams/templates/layout.tpl +++ b/code/web/public_php/ams/templates/layout.tpl @@ -22,6 +22,7 @@ + @@ -33,11 +34,6 @@ - - - @@ -229,9 +225,6 @@ _("status").innerHTML = "upload Aborted"; } - - -