Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: z64555 on July 29, 2013, 11:48:06 am

Title: wxFRED: July '13 Progress Report
Post by: z64555 on July 29, 2013, 11:48:06 am
Ladies and Gent's, you will all be happy to know that the first phase of the Get wxFRED Working project has been completed! All major editors have been designed, and now I turn my focus onto "wiring them up."

The wiring process will first connect the frames to the main wxFRED2 frame, so that the appropriate subordinate frame will displayed when you click on its corresponding menu item on the wxFRED2 frame. Once this is done, it will finally be time to dive into the behemoth that is the FRED2 code-base, so that the frames will get some actual muscle to pull around their dainty weight.


Technical Stuff:
The wxFormBuilder project file that currently holds all of the configuration data of wxFRED ultimately will not be committed along with the new .cpp's and .h's. The reason for this is that the wxFormBuilder is currently over 5MB and is not expected to slim down anytime soon.

Instead, the .xrc file (which contains all the needed form design data) will be generated by wxFormBuilder and committed along with a README.txt that will outline the needed project settings such as resource and output directories. Why wxFormBuilder's project file is so bloated, I cannot tell for now.

And, as mentioned before in the previous project report (2 months ago!?) I am using a local Git repo to backup my stuff. I also just recently got a Github account, and I'm considering making a clone of the progress there as well.


Shiny Stuff:
Here be .gif's of the new wxFRED forms!

(http://db.tt/aMkliiie)
Object Editor

(https://dl.dropboxusercontent.com/u/97612992/FreeSpace2%20Open/SCP/wxFRED/wxFRED_009.gif)
Wing Editor

(https://dl.dropboxusercontent.com/u/97612992/FreeSpace2%20Open/SCP/wxFRED/wxFRED_010.gif)
Waypoint Editor

(https://dl.dropboxusercontent.com/u/97612992/FreeSpace2%20Open/SCP/wxFRED/wxFRED_011.gif)
Mission Objectives Editor

(https://dl.dropboxusercontent.com/u/97612992/FreeSpace2%20Open/SCP/wxFRED/wxFRED_012.gif)
Events Editor

(https://dl.dropboxusercontent.com/u/97612992/FreeSpace2%20Open/SCP/wxFRED/wxFRED_013.gif)
Team Loadout Editor

(https://dl.dropboxusercontent.com/u/97612992/FreeSpace2%20Open/SCP/wxFRED/wxFRED_014.gif)
Reinforcements Editor

(https://dl.dropboxusercontent.com/u/97612992/FreeSpace2%20Open/SCP/wxFRED/wxFRED_015.gif)
Briefing Editor

(https://dl.dropboxusercontent.com/u/97612992/FreeSpace2%20Open/SCP/wxFRED/wxFRED_016.gif)
Debriefing Editor

(https://dl.dropboxusercontent.com/u/97612992/FreeSpace2%20Open/SCP/wxFRED/wxFRED_017.gif)
Command Briefing Editor

(https://dl.dropboxusercontent.com/u/97612992/FreeSpace2%20Open/SCP/wxFRED/wxFRED_018.gif)
Fiction Viewer

(https://dl.dropboxusercontent.com/u/97612992/FreeSpace2%20Open/SCP/wxFRED/wxFRED_019.gif)
Shield System Editor

(https://dl.dropboxusercontent.com/u/97612992/FreeSpace2%20Open/SCP/wxFRED/wxFRED_020.gif)
Global Ship Flags Editor

(https://dl.dropboxusercontent.com/u/97612992/FreeSpace2%20Open/SCP/wxFRED/wxFRED_021.gif)
Voice Acting Manager

(https://dl.dropboxusercontent.com/u/97612992/FreeSpace2%20Open/SCP/wxFRED/wxFRED_022a.gif)
Campaign Editor (topmost controls shown)

(https://dl.dropboxusercontent.com/u/97612992/FreeSpace2%20Open/SCP/wxFRED/wxFRED_022b.gif)
Campaign Editor (bottommost controls shown)

(https://dl.dropboxusercontent.com/u/97612992/FreeSpace2%20Open/SCP/wxFRED/wxFRED_023.gif)
Mission Statistics

(https://dl.dropboxusercontent.com/u/97612992/FreeSpace2%20Open/SCP/wxFRED/wxFRED_024.gif)
About FRED2 :D

(https://dl.dropboxusercontent.com/u/97612992/FreeSpace2%20Open/SCP/wxFRED/wxFRED_025.gif)
Hmm, what could this be?

Title: Re: wxFRED: July '13 Progress Report
Post by: Goober5000 on July 29, 2013, 11:54:31 am
Outstanding. :)

I would say to just go ahead and commit the wxFormBuilder project, even if it is oversized.  It's helpful for development purposes, and it won't affect the size of the published wxFRED.
Title: Re: wxFRED: July '13 Progress Report
Post by: FreeSpaceFreak on July 29, 2013, 12:22:21 pm
Ah, good to see this still alive! RL has me quite busy ATM, but I hope to be able to contribute again in a few months from now.
Title: Re: wxFRED: July '13 Progress Report
Post by: Arpit on July 29, 2013, 01:52:52 pm
What's argument info(last pic)? Is it for -argument SEXPs ?
Title: Re: wxFRED: July '13 Progress Report
Post by: Rodo on July 29, 2013, 03:46:17 pm
I long for a new fred, wuv u forever :yes:
Title: Re: wxFRED: July '13 Progress Report
Post by: Fury on September 10, 2013, 01:18:02 pm
I feel ashamed I haven't posted here to encourage you fine folks on this undertaking. I am also dumbfounded why this topic gathered so little attention when it was posted. Come on people!

Keep up good work.  :yes:
Title: Re: wxFRED: July '13 Progress Report
Post by: FelixJim on September 11, 2013, 06:44:05 am
Want.
Title: Re: wxFRED: July '13 Progress Report Addenda
Post by: z64555 on September 12, 2013, 01:38:11 am
Commited some wxFred changes to the SVN, please let me know if any build conflicts arise from them (there shouldn't be any, but just in case)

Everyone should be able to compile the new wxFred to see what all has been done so far. I'm still against uploading any .fbp file to the SVN (due to its size and nature), but if this proves to be a problem with further design of the GUI, I'll go ahead and commit a copy.

I'm currently looking at the problem of implementing the fred viewport, by using wxWidget's method of GLCanvases and GLContexts. Hopefully if I can get this set up right, wxFred will allow for a better briefing editor and maybe also multiple viewports in the future.
Title: Re: wxFRED: July '13 Progress Report
Post by: mjn.mixael on September 12, 2013, 09:46:24 am
I didn't try too hard.. but a simple compile failed on MVSC 2010. Dunno if I need to specify some options or anything first (or make sure all the proper files are linked).
Title: Re: wxFRED: July '13 Progress Report
Post by: z64555 on September 12, 2013, 06:53:38 pm
oh, right, forgot to mention that you need the wxWidgets 2.9.4 or later lib's built. I've currently got it configured to do static linking because I had trouble getting the dynamic linking working.

You'll need an Environment Variable for windows (WXWIN) that points to the install folder such as C:/code/wxwidgets-2.9.4
Title: Re: wxFRED: July '13 Progress Report
Post by: mjn.mixael on September 12, 2013, 07:07:49 pm
Would you be willing to whip up a short how to on that? I'd love to be able to build it in order to provide more support and testing. (Sorry that's all I can offer :p )
Title: Re: wxFRED: July '13 Progress Report
Post by: z64555 on September 12, 2013, 07:50:20 pm
wxWidgets installation guides (http://wiki.wxwidgets.org/Guides_%26_Tutorials#Installing_wxWidgets_and_Setting_up_Your_IDE)

First, download the the source files from wxWidgets Download page (http://www.wxwidgets.org/downloads/#latest_dev). I currently have 2.9.4 and it has been pretty stable for me so far. Their stable release, 2.8.12, has a lot of things deprecated since 2.9 and 2.9 has a number of goodies in it that should make life easier.

Unpack the source files into a directory without spaces, such as "C:/code/wxWidgets-2.9.4". The unpacking software should take care of the naming for you.

For Windows, Create an environment variable named WXWIN, and set it to be the full path name of your installation location (C:/code/wxWidgets-2.9.4 for this example)

Since it's been awhile, I don't quite remember if I had any problems building wxWidgets 2.9.4 on MSVC 2010, all I did was select the "Universal Release" solution configuration and Built it from there. There's a header file somewhere that allows you to enable/disable particular components of wxWidgets, but I don't think you'll need to mess with it at all.
Title: Re: wxFRED: July '13 Progress Report
Post by: niffiwan on September 12, 2013, 08:12:28 pm
Would it be worthwhile (especially given that 2.9.x is the development release) including the wxWidgets build as part of the wxFRED build?  Like how libpng/liblua (etc) are currently configured?
(Given that most Linux distro's will stick with the latest stable for their repos, I'd like to do this for the autotools build.  Somehow.  When I figure out how. :nervous:)
Title: Re: wxFRED: July '13 Progress Report
Post by: z64555 on September 12, 2013, 08:43:04 pm
wxWidgets is far larger (in number of files) than libpng and liblua combined.  :nervous:
Title: Re: wxFRED: July '13 Progress Report
Post by: niffiwan on September 13, 2013, 10:53:36 pm
I think I've almost got wxFRED compiling on Linux, using wxWidgets 2.9.5 compiled separately.  However, I've got the following error and I have no idea where wxGLContext::wxGLContext() or wxGLCanvas::wxGLCanvas is being called in the class initialiser list :confused:  Is it just that you're halfway through the process of setting up the viewpoints?  (note, line 82 was also complaining until I hacked at it)

Code: [Select]
wxfred2/frmFRED2.h: In constructor ‘frmFRED2::frmFRED2(const wxChar*, int, int, int, int)’:
wxfred2/frmFRED2.h:274:17: warning: ‘frmFRED2::fredName’ will be initialised after [-Wreorder]
wxfred2/frmFRED2.h:244:18: warning:   ‘frmShipsEditor* frmFRED2::frmShipsEditor_p’ [-Wreorder]
wxfred2/frmFRED2.cpp:50:1: warning:   when initialised here [-Wreorder]
wxfred2/frmFRED2.cpp:59:94: error: no matching function for call to ‘wxGLContext::wxGLContext()’
wxfred2/frmFRED2.cpp:59:94: note: candidates are:
/usr/local/include/wx-2.9/wx/unix/glx11.h:23:5: note: wxGLContext::wxGLContext(wxGLCanvas*, const wxGLContext*)
/usr/local/include/wx-2.9/wx/unix/glx11.h:23:5: note:   candidate expects 2 arguments, 0 provided
/usr/local/include/wx-2.9/wx/unix/glx11.h:20:22: note: wxGLContext::wxGLContext(const wxGLContext&)
/usr/local/include/wx-2.9/wx/unix/glx11.h:20:22: note:   candidate expects 1 argument, 0 provided
wxfred2/frmFRED2.cpp:59:94: error: no matching function for call to ‘wxGLCanvas::wxGLCanvas()’
wxfred2/frmFRED2.cpp:59:94: note: candidates are:
/usr/local/include/wx-2.9/wx/gtk/glcanvas.h:77:5: note: wxGLCanvas::wxGLCanvas(wxWindow*, const wxGLCanvas*, wxWindowID, const wxPoint&, const wxSize&, long int, const wxString&, const int*, const wxPalette&)
/usr/local/include/wx-2.9/wx/gtk/glcanvas.h:77:5: note:   candidate expects 9 arguments, 0 provided
/usr/local/include/wx-2.9/wx/gtk/glcanvas.h:65:5: note: wxGLCanvas::wxGLCanvas(wxWindow*, const wxGLContext*, wxWindowID, const wxPoint&, const wxSize&, long int, const wxString&, const int*, const wxPalette&)
/usr/local/include/wx-2.9/wx/gtk/glcanvas.h:65:5: note:   candidate expects 9 arguments, 0 provided
/usr/local/include/wx-2.9/wx/gtk/glcanvas.h:54:5: note: wxGLCanvas::wxGLCanvas(wxWindow*, wxWindowID, const wxPoint&, const wxSize&, long int, const wxString&, const int*, const wxPalette&)
/usr/local/include/wx-2.9/wx/gtk/glcanvas.h:54:5: note:   candidate expects 8 arguments, 0 provided
/usr/local/include/wx-2.9/wx/gtk/glcanvas.h:24:5: note: wxGLCanvas::wxGLCanvas(wxWindow*, wxWindowID, const int*, const wxPoint&, const wxSize&, long int, const wxString&, const wxPalette&)
/usr/local/include/wx-2.9/wx/gtk/glcanvas.h:24:5: note:   candidate expects 8 arguments, 0 provided
/usr/local/include/wx-2.9/wx/gtk/glcanvas.h:21:22: note: wxGLCanvas::wxGLCanvas(const wxGLCanvas&)
/usr/local/include/wx-2.9/wx/gtk/glcanvas.h:21:22: note:   candidate expects 1 argument, 0 provided
wxfred2/frmFRED2.cpp:85:139: warning: ‘wxGLCanvas::wxGLCanvas(wxWindow*, wxWindowID, const wxPoint&, const wxSize&, long int, const wxString&, const int*, const wxPalette&)’ is deprecated (declared at /usr/local/include/wx-2.9/wx/gtk/glcanvas.h:54) [-Wdeprecated-declarations]

Code: (code/wxfred2/frmFRED2.cpp:50-59) [Select]
frmFRED2::frmFRED2( const wxChar *title, int xpos, int ypos, int width, int height )
: fredBase::frmFRED( NULL, wxID_ANY, wxEmptyString, wxPoint(xpos, ypos), wxSize(width, height) ),
currentFilename("Untitled"), fredName("FreeSpace 2 Mission Editor"),
frmShipsEditor_p(NULL), frmWingEditor_p(NULL), dlgObjectEditor_p(NULL),
frmWaypointEditor_p(NULL), dlgMissionObjectivesEditor_p(NULL), dlgEventsEditor_p(NULL),
frmTeamLoadoutEditor_p(NULL), dlgBackgroundEditor_p(NULL), dlgReinforcementsEditor_p(NULL),
dlgAsteroidFieldEditor_p(NULL), dlgMissionSpecsEditor_p(NULL), frmBriefingEditor_p(NULL),
frmDebriefingEditor_p(NULL), frmCommandBriefingEditor_p(NULL), dlgFictionViewer_p(NULL),
dlgShieldSystemEditor_p(NULL), dlgSetGlobalShipFlagsEditor_p(NULL), dlgVoiceActingManager_p(NULL),
frmCampaignEditor_p(NULL), dlgMissionStats_p(NULL), dlgAboutBox_p(NULL), dlgSexpHelp_p(NULL)
Title: Re: wxFRED: July '13 Progress Report
Post by: The E on September 14, 2013, 03:52:27 am
wxWidgets is far larger (in number of files) than libpng and liblua combined.  :nervous:

Yes, but you could conceivably provide the headers and .lib files to link against, if only as a separate download. Building wxWidgets is weird, with all those switches in headers and stuff.
Title: Re: wxFRED: July '13 Progress Report
Post by: z64555 on September 14, 2013, 07:08:32 am
I think I've almost got wxFRED compiling on Linux, using wxWidgets 2.9.5 compiled separately.  However, I've got the following error and I have no idea where wxGLContext::wxGLContext() or wxGLCanvas::wxGLCanvas is being called in the class initialiser list :confused:  Is it just that you're halfway through the process of setting up the viewpoints?  (note, line 82 was also complaining until I hacked at it)

Bugger. Looks like some of the experimental code for the viewport setup snuck into the commit. The error you're getting is most likely due to the wxGLCanvas (or wxGLContext, I forget which) private member way at the bottom of frmFRED.h, it's not initialized in the constructor, so the compiler is probably trying to do a call to the nonexistant default constructor (a lot of wxWidgets classes require you to use a specific constructor).

wxWidgets is far larger (in number of files) than libpng and liblua combined.  :nervous:

Yes, but you could conceivably provide the headers and .lib files to link against, if only as a separate download. Building wxWidgets is weird, with all those switches in headers and stuff.

Likely doable. I'll see if I can get something like that set up.