View previous topic :: View next topic |
Author |
Message |
livings124
Joined: 08 Dec 2007 Posts: 10
|
Posted: Thu Jun 04, 2009 12:23 am Post subject: wrong version string |
|
|
It appears that the MINIUPNPC_VERSION_STRING in miniupnpcstrings.h is still 1.2 even though it's 1.3.
Also, out of curiosity, why is the OS_STRING hardcoded as "Debian/4.0"? |
|
Back to top |
|
|
miniupnp Site Admin
Joined: 14 Apr 2007 Posts: 1589
|
Posted: Thu Jun 04, 2009 9:05 am Post subject: Re: wrong version string |
|
|
livings124 wrote: | It appears that the MINIUPNPC_VERSION_STRING in miniupnpcstrings.h is still 1.2 even though it's 1.3.
Also, out of curiosity, why is the OS_STRING hardcoded as "Debian/4.0"? |
Thanks for pointing that.
You can use updateminiupnpcstrings.sh to update OS_STRING _________________ Main miniUPnP author.
https://miniupnp.tuxfamily.org/ |
|
Back to top |
|
|
livings124
Joined: 08 Dec 2007 Posts: 10
|
Posted: Thu Jun 04, 2009 12:02 pm Post subject: |
|
|
I'm running that script (in that directory) and get displayed in terminal:
Code: | setting OS_STRING macro value to Darwin/9.7.0 in miniupnpcstrings.h.. |
But miniupnpcstrings.h still contains #define OS_STRING "Debian/4.0". |
|
Back to top |
|
|
miniupnp Site Admin
Joined: 14 Apr 2007 Posts: 1589
|
Posted: Thu Jun 04, 2009 9:16 pm Post subject: |
|
|
sorry for the bug.
Code: |
diff -u -r1.1 -r1.2
--- updateminiupnpcstrings.sh 11 Oct 2008 16:39:29 -0000 1.1
+++ updateminiupnpcstrings.sh 4 Jun 2009 09:13:53 -0000 1.2
@@ -1,5 +1,5 @@
#! /bin/sh
-# $Id: updateminiupnpcstrings.sh,v 1.1 2008/10/11 16:39:29 nanard Exp $
+# $Id: updateminiupnpcstrings.sh,v 1.2 2009/06/04 09:13:53 nanard Exp $
FILE=miniupnpcstrings.h
@@ -27,7 +27,7 @@
echo "Detected OS [$OS_NAME] version [$OS_VERSION]"
-EXPR="s/OS_STRING\s\".*\"/OS_STRING \"${OS_NAME}\/${OS_VERSION}\"/"
+EXPR="s/OS_STRING \".*\"/OS_STRING \"${OS_NAME}\/${OS_VERSION}\"/"
#echo $EXPR
echo "Backuping $FILE to $FILE.bak."
cp $FILE $FILE.bak
|
_________________ Main miniUPnP author.
https://miniupnp.tuxfamily.org/ |
|
Back to top |
|
|
livings124
Joined: 08 Dec 2007 Posts: 10
|
Posted: Thu Jun 04, 2009 11:52 pm Post subject: |
|
|
That does the trick! Can I recommend not creating a backup file - I don't see the need since it's a trivial change and adding files is annoying with the svn viewer. |
|
Back to top |
|
|
livings124
Joined: 08 Dec 2007 Posts: 10
|
Posted: Sun Jun 07, 2009 1:21 pm Post subject: |
|
|
Would it be too much to request that miniupnpcstrings.h be removed or renamed to something like miniupnpcstrings.h.in, and require the script to be run before building to generate the miniupnpstrings.h? Miniupnp is included with our code through svn, so we need the file included, but every time we have to check in changes it asks us to commit this updated version. It would be a lot easier to simply set it to create miniupnpstrings.h when building, and have svn ignore that file. It would also ensure people don't use the wrong operating system string, which we have been doing for a while apparently.
Alternatively, if the OS detection could be done in the actual code, that would be the ideal solution. |
|
Back to top |
|
|
livings124
Joined: 08 Dec 2007 Posts: 10
|
Posted: Tue Jul 07, 2009 1:20 am Post subject: |
|
|
Hate to bump, but I really would like to know about this. |
|
Back to top |
|
|
miniupnp Site Admin
Joined: 14 Apr 2007 Posts: 1589
|
Posted: Tue Jul 07, 2009 8:42 am Post subject: |
|
|
I had no time to do the modification yet... _________________ Main miniUPnP author.
https://miniupnp.tuxfamily.org/ |
|
Back to top |
|
|
miniupnp Site Admin
Joined: 14 Apr 2007 Posts: 1589
|
|
Back to top |
|
|
livings124
Joined: 08 Dec 2007 Posts: 10
|
Posted: Mon Jul 13, 2009 12:21 pm Post subject: |
|
|
Great, thanks! |
|
Back to top |
|
|
|