Jump to content
The Dark Mod Forums
Sign in to follow this  
greebo

DarkRadiant 2.2.0 pre-release testing

Recommended Posts

Build from latest git fails under 32-bit Slackware 14.2, with wxWidgets 3.1.0:

 

Making all in wxutil
make[3]: Entering directory '/home/x/DarkRadiant-git/DarkRadiant/libs/wxutil'
  CXX      FreezePointer.lo
  CXX      ConsoleView.lo
  CXX      GLWidget.lo
  CXX      KeyValueTable.lo
  CXX      PanedPosition.lo
  CXX      VFSTreePopulator.lo
  CXX      WindowPosition.lo
  CXX      GLFont.lo
  CXX      PathEntry.lo
  CXX      TreeModel.lo
  CXX      TreeView.lo
  CXX      TreeModelFilter.lo
TreeView.cpp: In member function 'void wxutil::TreeView::ResetSortingOnAllColumns()':
TreeView.cpp:98:22: error: 'ResetAllSortColumns' was not declared in this scope
  ResetAllSortColumns();
                      ^

AFAICT, that's the only build error.

 

It compiles fine here with the wxGTK3 slackbuild. Where did you get the wxWidgets 3.1.0 version from? What's the content of the file wx/generic/dataview.h, obviously this header differs from the 3.1.0 version I'm using, since the protected method is mssing.

Share this post


Link to post
Share on other sites

Where did you get the wxWidgets 3.1.0 version from? What's the content of the file wx/generic/dataview.h, obviously this header differs from the 3.1.0 version I'm using, since the protected method is mssing.

From the usual place: http://wxwidgets.org/downloads/

 

Specifically, from here.

 

Contents of '/usr/local/include/wx-3.1/wx/generic/dataview.h':

 

 

/////////////////////////////////////////////////////////////////////////////
// Name:        wx/generic/dataview.h
// Purpose:     wxDataViewCtrl generic implementation header
// Author:      Robert Roebling
// Modified By: Bo Yang
// Copyright:   (c) 1998 Robert Roebling
// Licence:     wxWindows licence
/////////////////////////////////////////////////////////////////////////////

#ifndef __GENERICDATAVIEWCTRLH__
#define __GENERICDATAVIEWCTRLH__

#include "wx/defs.h"
#include "wx/object.h"
#include "wx/list.h"
#include "wx/control.h"
#include "wx/scrolwin.h"
#include "wx/icon.h"
#include "wx/vector.h"

class WXDLLIMPEXP_FWD_ADV wxDataViewMainWindow;
class WXDLLIMPEXP_FWD_ADV wxDataViewHeaderWindow;

// ---------------------------------------------------------
// wxDataViewColumn
// ---------------------------------------------------------

class WXDLLIMPEXP_ADV wxDataViewColumn : public wxDataViewColumnBase
{
public:
    wxDataViewColumn(const wxString& title,
                     wxDataViewRenderer *renderer,
                     unsigned int model_column,
                     int width = wxDVC_DEFAULT_WIDTH,
                     wxAlignment align = wxALIGN_CENTER,
                     int flags = wxDATAVIEW_COL_RESIZABLE)
        : wxDataViewColumnBase(renderer, model_column),
          m_title(title)
    {
        Init(width, align, flags);
    }

    wxDataViewColumn(const wxBitmap& bitmap,
                     wxDataViewRenderer *renderer,
                     unsigned int model_column,
                     int width = wxDVC_DEFAULT_WIDTH,
                     wxAlignment align = wxALIGN_CENTER,
                     int flags = wxDATAVIEW_COL_RESIZABLE)
        : wxDataViewColumnBase(bitmap, renderer, model_column)
    {
        Init(width, align, flags);
    }

    // implement wxHeaderColumnBase methods
    virtual void SetTitle(const wxString& title) { m_title = title; UpdateDisplay(); }
    virtual wxString GetTitle() const { return m_title; }

    virtual void SetWidth(int width) { m_width = width; UpdateDisplay(); }
    virtual int GetWidth() const;

    virtual void SetMinWidth(int minWidth) { m_minWidth = minWidth; UpdateDisplay(); }
    virtual int GetMinWidth() const { return m_minWidth; }

    virtual void SetAlignment(wxAlignment align) { m_align = align; UpdateDisplay(); }
    virtual wxAlignment GetAlignment() const { return m_align; }

    virtual void SetFlags(int flags) { m_flags = flags; UpdateDisplay(); }
    virtual int GetFlags() const { return m_flags; }

    virtual bool IsSortKey() const { return m_sort; }

    virtual void UnsetAsSortKey();

    virtual void SetSortOrder(bool ascending);

    virtual bool IsSortOrderAscending() const { return m_sortAscending; }

    virtual void SetBitmap( const wxBitmap& bitmap ) { wxDataViewColumnBase::SetBitmap(bitmap); UpdateDisplay(); }


private:
    // common part of all ctors
    void Init(int width, wxAlignment align, int flags);

    void UpdateDisplay();

    wxString m_title;
    int m_width,
        m_minWidth;
    wxAlignment m_align;
    int m_flags;
    bool m_sort,
         m_sortAscending;

    friend class wxDataViewHeaderWindowBase;
    friend class wxDataViewHeaderWindow;
    friend class wxDataViewHeaderWindowMSW;
};

// ---------------------------------------------------------
// wxDataViewCtrl
// ---------------------------------------------------------

WX_DECLARE_LIST_WITH_DECL(wxDataViewColumn, wxDataViewColumnList,
                          class WXDLLIMPEXP_ADV);

class WXDLLIMPEXP_ADV wxDataViewCtrl : public wxDataViewCtrlBase,
                                       public wxScrollHelper
{
    friend class wxDataViewMainWindow;
    friend class wxDataViewHeaderWindowBase;
    friend class wxDataViewHeaderWindow;
    friend class wxDataViewHeaderWindowMSW;
    friend class wxDataViewColumn;

public:
    wxDataViewCtrl() : wxScrollHelper(this)
    {
        Init();
    }

    wxDataViewCtrl( wxWindow *parent, wxWindowID id,
           const wxPoint& pos = wxDefaultPosition,
           const wxSize& size = wxDefaultSize, long style = 0,
           const wxValidator& validator = wxDefaultValidator,
           const wxString& name = wxDataViewCtrlNameStr )
             : wxScrollHelper(this)
    {
        Create(parent, id, pos, size, style, validator, name);
    }

    virtual ~wxDataViewCtrl();

    void Init();

    bool Create(wxWindow *parent, wxWindowID id,
                const wxPoint& pos = wxDefaultPosition,
                const wxSize& size = wxDefaultSize, long style = 0,
                const wxValidator& validator = wxDefaultValidator,
                const wxString& name = wxDataViewCtrlNameStr);

    virtual bool AssociateModel( wxDataViewModel *model );

    virtual bool AppendColumn( wxDataViewColumn *col );
    virtual bool PrependColumn( wxDataViewColumn *col );
    virtual bool InsertColumn( unsigned int pos, wxDataViewColumn *col );

    virtual void DoSetExpanderColumn();
    virtual void DoSetIndent();

    virtual unsigned int GetColumnCount() const;
    virtual wxDataViewColumn* GetColumn( unsigned int pos ) const;
    virtual bool DeleteColumn( wxDataViewColumn *column );
    virtual bool ClearColumns();
    virtual int GetColumnPosition( const wxDataViewColumn *column ) const;

    virtual wxDataViewColumn *GetSortingColumn() const;
    virtual wxVector<wxDataViewColumn *> GetSortingColumns() const;

    virtual int GetSelectedItemsCount() const;
    virtual int GetSelections( wxDataViewItemArray & sel ) const;
    virtual void SetSelections( const wxDataViewItemArray & sel );
    virtual void Select( const wxDataViewItem & item );
    virtual void Unselect( const wxDataViewItem & item );
    virtual bool IsSelected( const wxDataViewItem & item ) const;

    virtual void SelectAll();
    virtual void UnselectAll();

    virtual void EnsureVisible( const wxDataViewItem & item,
                                const wxDataViewColumn *column = NULL );
    virtual void HitTest( const wxPoint & point, wxDataViewItem & item,
                          wxDataViewColumn* &column ) const;
    virtual wxRect GetItemRect( const wxDataViewItem & item,
                                const wxDataViewColumn *column = NULL ) const;

    virtual bool SetRowHeight( int rowHeight );

    virtual void Expand( const wxDataViewItem & item );
    virtual void Collapse( const wxDataViewItem & item );
    virtual bool IsExpanded( const wxDataViewItem & item ) const;

    virtual void SetFocus();

    virtual bool SetFont(const wxFont & font);

    virtual bool AllowMultiColumnSort(bool allow);
    virtual bool IsMultiColumnSortAllowed() { return m_allowMultiColumnSort; }
    virtual void ToggleSortByColumn(int column);

#if wxUSE_DRAG_AND_DROP
    virtual bool EnableDragSource( const wxDataFormat &format );
    virtual bool EnableDropTarget( const wxDataFormat &format );
#endif // wxUSE_DRAG_AND_DROP

    virtual wxBorder GetDefaultBorder() const;

    virtual void EditItem(const wxDataViewItem& item, const wxDataViewColumn *column);

    // These methods are specific to generic wxDataViewCtrl implementation and
    // should not be used in portable code.
    wxColour GetAlternateRowColour() const { return m_alternateRowColour; }
    void SetAlternateRowColour(const wxColour& colour);

protected:
    virtual void EnsureVisible( int row, int column );

    // Notice that row here may be invalid (i.e. >= GetRowCount()), this is not
    // an error and this function simply returns an invalid item in this case.
    virtual wxDataViewItem GetItemByRow( unsigned int row ) const;
    virtual int GetRowByItem( const wxDataViewItem & item ) const;

    // Mark the column as being used or not for sorting.
    void UseColumnForSorting(int idx);
    void DontUseColumnForSorting(int idx);

    // Return true if the given column is sorted
    bool IsColumnSorted(int idx) const;

    // Reset all columns currently used for sorting.
    void ResetAllSortColumns();

    virtual void DoEnableSystemTheme(bool enable, wxWindow* window) wxOVERRIDE;

public:     // utility functions not part of the API

    // returns the "best" width for the idx-th column
    unsigned int GetBestColumnWidth(int idx) const;

    // called by header window after reorder
    void ColumnMoved( wxDataViewColumn* col, unsigned int new_pos );

    // update the display after a change to an individual column
    void OnColumnChange(unsigned int idx);

    // update after a change to the number of columns
    void OnColumnsCountChanged();

    wxWindow *GetMainWindow() { return (wxWindow*) m_clientArea; }

    // return the index of the given column in m_cols
    int GetColumnIndex(const wxDataViewColumn *column) const;

    // Return the index of the column having the given model index.
    int GetModelColumnIndex(unsigned int model_column) const;

    // return the column displayed at the given position in the control
    wxDataViewColumn *GetColumnAt(unsigned int pos) const;

    virtual wxDataViewColumn *GetCurrentColumn() const;

    virtual void OnInternalIdle();

private:
    virtual wxDataViewItem DoGetCurrentItem() const;
    virtual void DoSetCurrentItem(const wxDataViewItem& item);

    void InvalidateColBestWidths();
    void InvalidateColBestWidth(int idx);
    void UpdateColWidths();

    wxDataViewColumnList      m_cols;
    // cached column best widths information, values are for
    // respective columns from m_cols and the arrays have same size
    struct CachedColWidthInfo
    {
        CachedColWidthInfo() : width(0), dirty(true) {}
        int width;  // cached width or 0 if not computed
        bool dirty; // column was invalidated, header needs updating
    };
    wxVector<CachedColWidthInfo> m_colsBestWidths;
    // This indicates that at least one entry in m_colsBestWidths has 'dirty'
    // flag set. It's cheaper to check one flag in OnInternalIdle() than to
    // iterate over m_colsBestWidths to check if anything needs to be done.
    bool                      m_colsDirty;

    wxDataViewModelNotifier  *m_notifier;
    wxDataViewMainWindow     *m_clientArea;
    wxDataViewHeaderWindow   *m_headerArea;

    // user defined color to draw row lines, may be invalid
    wxColour m_alternateRowColour;

    // columns indices used for sorting, empty if nothing is sorted
    wxVector<int> m_sortingColumnIdxs;

    // if true, allow sorting by more than one column
    bool m_allowMultiColumnSort;

private:
    void OnSize( wxSizeEvent &event );
    virtual wxSize GetSizeAvailableForScrollTarget(const wxSize& size);

    // we need to return a special WM_GETDLGCODE value to process just the
    // arrows but let the other navigation characters through
#ifdef __WXMSW__
    virtual WXLRESULT MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
#endif // __WXMSW__

    WX_FORWARD_TO_SCROLL_HELPER()

private:
    wxDECLARE_DYNAMIC_CLASS(wxDataViewCtrl);
    wxDECLARE_NO_COPY_CLASS(wxDataViewCtrl);
    wxDECLARE_EVENT_TABLE();
};


#endif // __GENERICDATAVIEWCTRLH__

 

Share this post


Link to post
Share on other sites

Well, it appears that the GTK version of wxDataViewCtrl in 3.1.0 has different protected methods than the generic implementation. That's nice. I've added another preprocessor guard around that, so it should compile again.

Share this post


Link to post
Share on other sites

Your fix takes care of the problem. Thanks again!

A minor new problem with i18n has cropped up since the successful compile I did from latest git circa 07 Jan 2017. I worked around it by deleting the content of the 'install/i18n/LINGUAS' file and re-building. DR now compiles and runs fine.

Here's the build failure output:

 

Making all in install/i18n
make[2]: Entering directory '/home/x/DarkRadiant-git/DarkRadiant/install/i18n'
test ! -f ./darkradiant.pot || \
  test -z "de.gmo" || make de.gmo
make[3]: Entering directory '/home/x/DarkRadiant-git/DarkRadiant/install/i18n'
make[4]: Entering directory '/home/x/DarkRadiant-git/DarkRadiant/install/i18n'
File de.po does not exist. If you are a translator, you can create it through 'msginit'.
Makefile:674: recipe for target 'de.po-create' failed
make[4]: *** [de.po-create] Error 1
make[4]: Leaving directory '/home/x/DarkRadiant-git/DarkRadiant/install/i18n'
Makefile:475: recipe for target 'de.po' failed
make[3]: *** [de.po] Error 2
make[3]: Target 'de.gmo' not remade because of errors.
make[3]: Leaving directory '/home/x/DarkRadiant-git/DarkRadiant/install/i18n'
Makefile:384: recipe for target 'stamp-po' failed
make[2]: *** [stamp-po] Error 2
make[2]: Target 'all' not remade because of errors.
make[2]: Leaving directory '/home/x/DarkRadiant-git/DarkRadiant/install/i18n'

 


And here's the relevant region of 'install/i18n/Makefile':

 

# General rule for creating PO files.

.nop.po-create:
        @lang=`echo $@ | sed -e 's/\.po-create$$//'`; \
        echo "File $$lang.po does not exist. If you are a translator, you can create it through 'msginit'." 1>&2; \
        exit 1

 

 

If you need me to re-test after any changes, just let me know.

Share this post


Link to post
Share on other sites

I have no idea what's wrong on your system. Maybe the gettext binaries are missing, I've had something like this in the past.

Share this post


Link to post
Share on other sites

I have no idea what's wrong on your system. Maybe the gettext binaries are missing, I've had something like this in the past.

FWIW, it's not that (assuming I'm understanding you correctly):

==> which gettext
/usr/bin/gettext

==> gettext --version
gettext (GNU gettext-runtime) 0.19.8.1

In fact, since Jan 7th, when I last successfully built and ran DR from latest git on the same system/HDD, nothing has changed on that HDD other than some new TDM source code and some TDM 2.05-beta updates. That HDD is used exclusively for TDM and DR and it's a full, virgin 32-bit Slackware 14.2 installation (from DVD-ROM) with the addition of only the OpenAL-Soft libraries (for TDM compiles) and FTGL + wXWidgets-3.1.0 (for DR), all compiled from source code.

 

So this seems like a new issue on DR's side, otherwise I would not have even mentioned it. A quick check shows a few recent i18n-related changes in the tree, so I suspect one of them has broken something for my setup.

 

For the record, I'm perfectly OK with using my work-around indefinitely if this is something you'd rather not pursue.

Share this post


Link to post
Share on other sites

There's not terribly much I can do about it, I'm afraid. I'm running Slackware 14.2 x86 in a virtual machine here and the latest git code compiles without complaints. I'm using the wxGTK3 slackbuild though.

Share this post


Link to post
Share on other sites

There's not terribly much I can do about it, I'm afraid.

Not a problem. But, just out of curiosity, have you done any successful compiles recently from scratch, i.e. pulling the git tree in a fresh directory and running 'autogen.sh && configure --enable-darkmod-plugins && make'. Or, failing that, maybe just running 'make distclean && make' on your existing git tree?

 

I'm no i18n guru by any stretch. It just seemed to me that there's a file ('de.po') that's missing from the build directory which was probably there when I compiled on Jan 7th. And I'm speculating (with little evidence, ATM) that it might not be there for you either if you start from scratch or do the 'make distclean'.

Share this post


Link to post
Share on other sites

It seems the Makefile.in.in update I checked in to fix a gettext complaint was causing this. It overwrote a few custom changes by OrbWeaver which I didn't notice before - these are restored now and it should work again.

Share this post


Link to post
Share on other sites

New build (pre4) is up in the first post, fixing a crash when loading ASE model surfaces without texture coordinates.

Share this post


Link to post
Share on other sites

Where are models scaled by DR housed?

 

The resized model will be saved in ASE format to the models/map_specific/scaled/ folder.

Share this post


Link to post
Share on other sites

Isn't this a problem?

 

Shouldn't it be saved in "Mod Base"/models/map_specific/scaled/ ?

 

I've been working on my map using 2.05, and when I built a new build package yesterday, I wiped the old one and installed the new one. Unbeknownst to me, I wiped my scaled models, they've disappeared from my map, and now I have to find and rescale them all.

 

And since the mapper usually packages his mission from "Mod Base", what's to keep him from forgetting about his scaled models in darkmod?

 

And if I'm working on two missions at the same time (as I am) and I scale the same model differently in each mission, the second scaling will overwrite the first, and the first mission is screwed if I don't use the same scale.

Share this post


Link to post
Share on other sites

FWIW, here's a picture of my DR game settings ...

 

attachicon.gifgame.jpg

 

I think we have to discuss a few things. :)

 

The way you've set up your Doom 3 game config is kind of the other way around like it's designed to work. Back when we had darkmod as a Mod to the Doom 3 game, a Fan Mission would be set up like this:

 

- Engine: C:\Games\Doom3

- Mod Base: darkmod

- Mod: fms/saintlucia

 

"Mod base" is the foundation the actual "Mod" (==FM) is basing on. That's how it worked with Doom 3 in mind. Now DarkRadiant has a "The Dark Mod 2.0 (Standalone)" game config available where you just need to define this:

- Engine C:\Darkmod

- Mod: fms/saintlucia

 

The above two are set up such that everything is in folders below the engine path.

 

Now, the thing that's confusing me about your config is this: First, you've set up your WIP Mission in the mod base (fs_game_base) and darkmod as Mod (fs_game) - the search order for PK4s and folders will be reversed to what it's supposed to be. And second, I didn't know that one could define absolute paths in these two entry boxes - I take it this is actually working? I'm not sure all the code dealing with fs_game and fs_game_base can deal with that sort of thing. Do the particle editor and the readable editor, etc. work as they should?

 

Does every mission author have a setup like this?

 

And to answer the question of the other post: DarkRadiant is currently saving the models to the "Mod" (fs_game) path (plus models/map_specific/scaled), as fs_game is the folder where your FM is supposed to be. That way DR would never overwrite stuff in the darkmod folder, and FM don't interfere.

Share this post


Link to post
Share on other sites

I have to keep my mission work out 'darkmod', otherwise a delete of 'darkmod' will delete my mission work as well. This can happen as I delete/update 'darkmod' during release beta testing.

 

We worked with taaaki after you left the stage to allow the mission author to place his mission work anywhere.

 

This is the setup I've used for as long as I can remember.

 

I can't speak for other authors, though I've posted my setup a few times in the past when people were asking how to set things up. I don't know who followed the way I do things.

 

I've had no issues with pk4 search hierarchy.

 

AFAIK, the particle editor works fine, and the only problem I have with the readable editor is it sometimes gives me the "You can't update a pk4, so rename the name of the readable text" message, which I work around.

 

I can try any settings that don't require me to house my work under the 'darkmod' folder.

Share this post


Link to post
Share on other sites

I have to keep my mission work out 'darkmod', otherwise a delete of 'darkmod' will delete my mission work as well. This can happen as I delete/update 'darkmod' during release beta testing.

 

We worked with taaaki after you left the stage to allow the mission author to place his mission work anywhere.

 

Ok, so the requirement is to have the mission stuff in a completely different folder tree, which is unaffected if you purge your darkmod tree. I have to tinker around a bit to see how your setup actually works in DR.

 

In the meantime, can you try to swap the fs_game and fs_game_base setting in your config and see if that is working equivalently for you? Because the ScaledModelExporter is currently using Mod (fs_game) as output path, which is definitely how it should work in a Doom 3-based environment (which is something I still want to be compatible with since DarkRadiant is mainly, but not exclusively designed for The Dark Mod).

Share this post


Link to post
Share on other sites

That's the same crash in the ASE loader that has been fixed in pre4. You're still on pre3. :)

Share this post


Link to post
Share on other sites

My setup is as described by greebo, and I think it is also the way it is described on the wiki.


FM's: Builder Roads, Old Habits, Old Habits Rebuild

WIP's: Several. Although after playing Thief 4 I really wanna make a city mission.

Mapping and Scripting: Apples and Peaches

Sculptris Models and Tutorials: Obsttortes Models

My wiki articles: Obstipedia

Texture Blending in DR: DR ASE Blend Exporter

Share this post


Link to post
Share on other sites

In the meantime, can you try to swap the fs_game and fs_game_base setting in your config and see if that is working equivalently for you? Because the ScaledModelExporter is currently using Mod (fs_game) as output path, which is definitely how it should work in a Doom 3-based environment (which is something I still want to be compatible with since DarkRadiant is mainly, but not exclusively designed for The Dark Mod).

That fixed where the scaled model is saved.

 

I'll need to work with it this way for a while to see if anything else is affected. Hopefully this corrects the problem I was seeing with the readables editor.

 

Thanks!

Share this post


Link to post
Share on other sites

My setup is as described by greebo, and I think it is also the way it is described on the wiki.

Yes, that's fine as long as you don't delete your darkmod tree from time to time, as I do.

 

Where, exactly, is it described in the wiki? All I found was this: "The fs_game setting should point to your darkmod installation." which is the way I had it, but apparently that's not correct.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...