Re: [Fink-devel] This Newbie Could Use Some Help

2010-08-05 Thread Hanspeter Niederstrasser
On 8/4/10 11:00 PM, David Lowe wrote:
 On 2 Aug, 2010, at 8:58 PM, Hanspeter Niederstrasser wrote:

 An option like that is generally not kept in Makefiles.  If
 makefiles are involved, it's more likely as a defines that is then
 used by the c code.  This command grep -r
 default_sound_plugin_name * suggests that client/options.c is the
 file to modify.  I see 2 occurrences of default_sound_plugin_name
 there.  The first one (line 316) sets the default value for the -P
 option when freeciv is run via the command line (defaults to 0).
 The second (line 475) is for the actual checkbox used in the
 Options dialog.  Presumably setting the first NULL to sdl
 (including the ) changes the setting.  I don't know which of the
 two locations would need to be changed.  It might be just one or
 both.

 The following two lines modify each of the two instances.  Make a
 PatchScript field in the .info file, add them both, and then
 comment out (prefix with #) as needed until you get the right
 combination (don't forget to remove ~/.freeciv-client-rc-2.2
 between runs to make sure you get a clean start).

 After reading [but perhaps not comprehending?] options.c myself, i
 have the opinion that the first one is irrelevant.  It looks like the
 '\0' is supposed to be overwritten by the list of choices found in
 the second part.  A developer upstream thinks there is a bug there,
 though i'm waiting to enter it into their tracker until i gather some
 more data.  Anyway, i've built a new .deb using your second patch.
 The interesting thing is, the new version doesn't install a new
 .freeciv-client-rc-2.2 .  When i

 $ dpkg -x
 /sw/fink/dists/local/main/binary-darwin-i386/freeciv_2.2.2-8_darwin-i386.deb
 ~/temp/

dpkg-deb -c DEB FILE does the same thing if you just want a listing of
the deb contents.

 i don't see the rc file at all, just the stuff that goes into /sw .
 Is there a better way to check this?  I have tinkered with a few
 other ConfigureParams between then and now so it's a possibility that
 it's not being built anymore...

I don't think the default settings file is ever created and put into the 
deb file.  As far as I can tell, it's created from scratch when the 
program first is run by the user if there's no ~/.freeciv-client-rc-2.2 
file already present.  It won't overwrite, even if the default setting 
has changed.

I just tested and using just the 2nd patch line (NULL -- sdl change), 
the client was started with SDL already filled in as a plugin and sound 
was heard when moving the units.  This was on a system with no previous 
~/.freeciv-client-rc-2.2 file around.

Hanspeter

--
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://p.sf.net/sfu/dev2dev-palm
___
Fink-devel mailing list
Fink-devel@lists.sourceforge.net
http://news.gmane.org/gmane.os.apple.fink.devel
Subscription management:
https://lists.sourceforge.net/lists/listinfo/fink-devel


Re: [Fink-devel] This Newbie Could Use Some Help

2010-08-05 Thread David Lowe
On 5 Aug, 2010, at 8:24 AM, Hanspeter Niederstrasser wrote:

 dpkg-deb -c DEB FILE does the same thing if you just want a listing of
 the deb contents.

Okeh, it's always good to have another tool in my toolkit.

 i don't see the rc file at all, just the stuff that goes into /sw .
 Is there a better way to check this?  I have tinkered with a few
 other ConfigureParams between then and now so it's a possibility that
 it's not being built anymore...
 
 I don't think the default settings file is ever created and put into the 
 deb file.  As far as I can tell, it's created from scratch when the 
 program first is run by the user if there's no ~/.freeciv-client-rc-2.2 
 file already present.  It won't overwrite, even if the default setting 
 has changed.
 
 I just tested and using just the 2nd patch line (NULL -- sdl change), 
 the client was started with SDL already filled in as a plugin and sound 
 was heard when moving the units.  This was on a system with no previous 
 ~/.freeciv-client-rc-2.2 file around.

I'm still adjusting my understanding of how this works, but i have to 
agree with your observations.  One minor correction: the rc file doesn't seem 
to be created after just running and quitting freeciv.  Evidently it is not 
created until the user selects Game  Options  Local Client and clicks on 
'Save', or possibly also Game  Options  Save Options Now.  The reason i 
assumed that the rc file was being installed via fink was that i had not 
knowingly created it.  It does seem likely, though, that i must have done 
something like this and just didn't remember it.  So that leads me to believe 
that there is something other than the rc file that is being created by our 
patched version of options.c.  Not that it is a problem, but we still have an 
open question as to how the client knows about sdl when there is no rc file 
present.

Here is a minimally related question: with the perl patch in place, 
will it be difficult to also use a diff patch?  Upstream has a patch in the 
tracker now that will sort the list of save files in the loader dialog, 
something which does not happen now.  It's a bit of an annoyance, depending 
upon how many saves the user has [You see, i currently have ~ 200 saves despite 
periodically throwing out old stuff.].  This patch has been committed into the 
2.2.3 branch, but i don't yet know how long of a wait i'll have until that is 
released.  If it's a while, i may have a go at attaching this diff to the 
package.

Sent from my MacBookPro

No raindrop considers itself responsible for the flood.
--
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
___
Fink-devel mailing list
Fink-devel@lists.sourceforge.net
http://news.gmane.org/gmane.os.apple.fink.devel
Subscription management:
https://lists.sourceforge.net/lists/listinfo/fink-devel


Re: [Fink-devel] This Newbie Could Use Some Help

2010-08-04 Thread David Lowe
On 2 Aug, 2010, at 8:58 PM, Hanspeter Niederstrasser wrote:

 An option like that is generally not kept in Makefiles.  If makefiles 
 are involved, it's more likely as a defines that is then used by the c 
 code.  This command grep -r default_sound_plugin_name * suggests that 
 client/options.c is the file to modify.  I see 2 occurrences of 
 default_sound_plugin_name there.  The first one (line 316) sets the 
 default value for the -P option when freeciv is run via the command line 
 (defaults to 0).  The second (line 475) is for the actual checkbox used 
 in the Options dialog.  Presumably setting the first NULL to sdl 
 (including the ) changes the setting.  I don't know which of the two 
 locations would need to be changed.  It might be just one or both.
 
 The following two lines modify each of the two instances.  Make a 
 PatchScript field in the .info file, add them both, and then comment out 
 (prefix with #) as needed until you get the right combination (don't 
 forget to remove ~/.freeciv-client-rc-2.2 between runs to make sure you 
 get a clean start).

After reading [but perhaps not comprehending?] options.c myself, i have 
the opinion that the first one is irrelevant.  It looks like the '\0' is 
supposed to be overwritten by the list of choices found in the second part.  A 
developer upstream thinks there is a bug there, though i'm waiting to enter it 
into their tracker until i gather some more data.  Anyway, i've built a new 
.deb using your second patch.  The interesting thing is, the new version 
doesn't install a new .freeciv-client-rc-2.2 .  When i 

$ dpkg -x 
/sw/fink/dists/local/main/binary-darwin-i386/freeciv_2.2.2-8_darwin-i386.deb 
~/temp/

i don't see the rc file at all, just the stuff that goes into /sw .  Is 
there a better way to check this?  I have tinkered with a few other 
ConfigureParams between then and now so it's a possibility that it's not being 
built anymore...

Sent from my MacBookPro

Never trust anyone who says trust me.  Except just this once.
--
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://p.sf.net/sfu/dev2dev-palm
___
Fink-devel mailing list
Fink-devel@lists.sourceforge.net
http://news.gmane.org/gmane.os.apple.fink.devel
Subscription management:
https://lists.sourceforge.net/lists/listinfo/fink-devel


Re: [Fink-devel] This Newbie Could Use Some Help

2010-08-02 Thread Hanspeter Niederstrasser
On 8/2/10 7:19 PM, David Lowe wrote:
 I have an [admittedly minor] problem with my own package and lack the
 know how to find a solution.  Here's the story: the freeciv package
 is [at least for me] quite silent as built.  It is built with the
 appropriate configure flags to use sdl-mixer as a sound plugin, but
 .freeciv-client-rc-2.2 as installed by the .deb in ~ contains
 'default_sound_plugin_name=none' when it should contain
 'default_sound_plugin_name=sdl'.  This is not a show-stopper, as
 starting the client and setting the plugin to sdl works just fine.
 However, i don't think users should have to do this, and i see that
 in Ubuntu [for example] this works properly 'out of the box'.

 I've tried grepping the makefiles for default_sound_plugin_name and
 i don't find it.  Can somebody explain to me how i should be
 troubleshooting this?

An option like that is generally not kept in Makefiles.  If makefiles 
are involved, it's more likely as a defines that is then used by the c 
code.  This command grep -r default_sound_plugin_name * suggests that 
client/options.c is the file to modify.  I see 2 occurrences of 
default_sound_plugin_name there.  The first one (line 316) sets the 
default value for the -P option when freeciv is run via the command line 
(defaults to 0).  The second (line 475) is for the actual checkbox used 
in the Options dialog.  Presumably setting the first NULL to sdl 
(including the ) changes the setting.  I don't know which of the two 
locations would need to be changed.  It might be just one or both.

The following two lines modify each of the two instances.  Make a 
PatchScript field in the .info file, add them both, and then comment out 
(prefix with #) as needed until you get the right combination (don't 
forget to remove ~/.freeciv-client-rc-2.2 between runs to make sure you 
get a clean start).

perl -pi -e 's|default_sound_plugin_name\[512\] = 
\\0|default_sound_plugin_name\[512\] = sdl|' client/options.c

perl -pi -e 's|COC_SOUND, GUI_LAST, NULL|COC_SOUND, GUI_LAST, sdl|' 
client/options.c

Hanspeter

--
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://p.sf.net/sfu/dev2dev-palm
___
Fink-devel mailing list
Fink-devel@lists.sourceforge.net
http://news.gmane.org/gmane.os.apple.fink.devel
Subscription management:
https://lists.sourceforge.net/lists/listinfo/fink-devel