Distributing wxWidgets application with source - how?

This forum can be used to talk about general design strategies, new ideas and questions in general related to wxWidgets. If you feel your questions doesn't fit anywhere, put it here.
Post Reply
Gohault
In need of some credit
In need of some credit
Posts: 4
Joined: Sun May 18, 2008 4:21 pm

Distributing wxWidgets application with source - how?

Post by Gohault »

I ran into a serious problem with my open source application.

In order to make it work as intended I had to alter several of the wxWidget's project's predefined settings and changed a few defines.

I already feared that most potential users would not be able to get it to work and a test with a few friends proved me correct. None of them was able to set up the wxWidgets project so that my application could use it.

So right now I am stuck with something which I want to distribute in a way that others can modify it but it looks rather pointless if it is such a pain to make it work.

So are here any users who already did write open source wxWidgets applications with non-standard configurations? How did you solve this?

(My app is Windows only so any portability concerns are not important right now.)
Auria
Site Admin
Site Admin
Posts: 6695
Joined: Thu Sep 28, 2006 12:23 am
Contact:

Post by Auria »

I don't quite get what the problem is... can't you just ship pre-built wx binaries along your app?

Developers should know how to apply a patch... regular users can just download the binary
Gohault
In need of some credit
In need of some credit
Posts: 4
Joined: Sun May 18, 2008 4:21 pm

Post by Gohault »

Time to resurrect this. I recently stumbled upon this thread which exemplifies the problem I am having. I didn't start it but it's precisely the same issue (mainly the GL canvas) that makes it nearly impossible for me to do a proper setup for my project's source.

http://forum.zdoom.org/viewtopic.php?f= ... &sk=t&sd=a

If you ask me, wxWidgets needs some serious rethinking of its setup to be attractive for open source projects that need something different than the default configuration. Most users are certainly *NOT* capable of messing around with its settings.

So please someone answer me:

How do I explain to people who would like to work with my source to set it up? Currently it'd go like:

- Oh, you need to download wxWidgets
- But - its default project settings are useless for my project so you have to change #define xyz in file abc and then change the compiler setting efg for wxWidgets's sub-projects abc, def, geh, ijk, lnm, opq, rst. (The setting I am talking about is the C runtime library linking. I need a static one.)
- Beware, these settings will make the wxWidgets output incompatible with other projects you might use so better create a separate copy.

That doesn't sound appealing, does it?

I'm sorry to say that while wxWidgets itself is great the impossibility to create a working out-of-the box setup for my program is one great big negative.
User avatar
T-Rex
Moderator
Moderator
Posts: 1249
Joined: Sat Oct 23, 2004 9:58 am
Location: Zaporizhzhya, Ukraine
Contact:

Post by T-Rex »

There are some video tutorials which explain how to build wxWidgets from source.
http://wxwidgets.info/video
You can give the link to videos as a reference to your users.
User avatar
doublemax
Moderator
Moderator
Posts: 19160
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Post by doublemax »

what kind of modifications to the wx setup does your application need?

Enabling GLCanvas does not break compatibility with other builds. Same goes for static and shared libs, they can co-exist.

If you explain the necessary adjustments clearly, i don't see any problem.
Use the source, Luke!
Gohault
In need of some credit
In need of some credit
Posts: 4
Joined: Sun May 18, 2008 4:21 pm

Post by Gohault »

My problem is that I'd like causal users to be able to compile my application. But so far even some relatively experienced users failed to set up wxWidgets properly.

As I said, one issue is that most people simply refuse to install and compile a 3rd party library that requires internal changes to work with a project designed for it. Normally it should be install, compile and then just use it. But it's not possible here.

The other issue is that my project requires a statically linked C runtime library. But all wx configurations for Visual C++ are set to dynamically link it, even the ones that statically link wxWidgets - so I have to change this setting in each and every wxWidgets project to get what I want.
User avatar
doublemax
Moderator
Moderator
Posts: 19160
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Post by doublemax »

My problem is that I'd like causal users to be able to compile my application. But so far even some relatively experienced users failed to set up wxWidgets properly.
especially if you're targeting Windows only, why would casual users want (or need) to compile the source themselves?
As I said, one issue is that most people simply refuse to install and compile a 3rd party library that requires internal changes to work with a project designed for it. Normally it should be install, compile and then just use it. But it's not possible here.
wxWidgets is very complex and the big number of configuration options are needed to keep if flexible enough. Maybe you could provide already adjusted version of the files that need to be changed, e.g. setup.h. Then tell your users to install wxWidgets, but replace that file (or several files) with your versions before compiling.
The other issue is that my project requires a statically linked C runtime library. But all wx configurations for Visual C++ are set to dynamically link it, even the ones that statically link wxWidgets - so I have to change this setting in each and every wxWidgets project to get what I want.
you can select them all in the solution explorer and change the settings once. You don't have to change it for every single one.
Use the source, Luke!
mc2r
wxWorld Domination!
wxWorld Domination!
Posts: 1195
Joined: Thu Feb 22, 2007 4:47 pm
Location: Denver, Co
Contact:

Post by mc2r »

Gohault wrote:My problem is that I'd like causal users to be able to compile my application. But so far even some relatively experienced users failed to set up wxWidgets properly.
Maybe you shouldn't expect 1) that casual users are going to want to compile from source and 2) that they would be up to the task of modifying code (even with instructions) and then compiling a third party library and then the app, thats alot to ask of a casual user.

Also, just a note on code changes to wxWidgets. I hate generalizations but I think either the changes are such that they should be part of wxWidgets itself and you could submit a patch, or if they really are so specific to your app that no-one else would benefit from them maybe they shouldn't be made to wx but instead you should be doing something else in your app. Like i said, its a generalization as i don't really know the specifics of your changes. Just something to think about.

Last, an option could be to provide the static library in binary format for the casual users that want to compile code but aren't up to dealing with wx.

-Max
Auria
Site Admin
Site Admin
Posts: 6695
Joined: Thu Sep 28, 2006 12:23 am
Contact:

Post by Auria »

What platform do you target?

On mac and linux (i.e., UNIX systems) wxWidgets is very easy to build. Windows is something else. But i still don't see any interest in making the casual user build from source. The casual user can just download the binary - where's the problem? If a user wants to build from source then he's not a casual user. Or you could ship pre-built wx binaries, and let the users build your app only. But i don't see the interest
Gohault
In need of some credit
In need of some credit
Posts: 4
Joined: Sun May 18, 2008 4:21 pm

Post by Gohault »

Sigh...

Read the discussion I linked to. The people posting there are all experienced programmers from what I gathered. If you still don't see the problem, pity.


To make it short:

- People see: Software 'xyz' uses wxWidgets
- People think: Why bother? I won't get it compiled anyway.
- The result: Only few people might actually compile my project and contribute in return.


The only solution I see is to incorporate the entire wxWidgets source directly into my project - which is no solution at all. :(

I'm really disappointed by the responses I got here.

Sorry, I'm done with wx. It's useless for my needs due to the fact that I can't use it out of the box. No third party library should EVER require the user to make internal changes before it can be used.
Sof_T
Can't get richer than this
Can't get richer than this
Posts: 864
Joined: Thu Jul 28, 2005 9:48 pm
Location: New Forest, United Kingdom
Contact:

Post by Sof_T »

Just saying I had to make changes is very vague, you are leaving us to guess what changes you had to make. My guess is that you are referring to the setup.h file and the changes need to include or remove a component from the library, is this correct?

To confirm this guess we need to read through a forum which isn't even related to wxWidgets, but has a peice thrown in.
I still hate wxWidget. Hey, did you know that the GL canvas above only exists if a macro is defined to true? Right. And did you know that the file where this macro is defined (along with the explanation for what it does and why it's stupidly defined to false by default) is not included by the GL canvas file? So that if you edit this file to set it to true, then it still doesn't work?

Honestly, though, why the glomp do I need to directly edit and recompile a library in order to use a program? Why? Isn't a library supposed to be stable and the same thing for all programs, not something you have to customize everytime?
The reason why GLCanvas is not compiled by default is that like many other options they are not required by most users of the library. wxWidgets is huge and most users don't want the bloat of options they will never use. Personally I am happy with the way this is set up. However I appreciate that some users don't find this approach works for them, so what do you propose as a solution to make it easier to setup the library without automatically including every option that the majority of users would remove everytime they compile?

Sof.T
The home of Sof.T http://www.sof-t.site88.net/
Author of Programming with wxDevC++
http://sourceforge.net/projects/wxdevcpp-book/
Post Reply