finish #2273 and probably break non-Mac builds in the process
This commit is contained in:
parent
1170ac2c73
commit
1df06d12a1
|
@ -1600,6 +1600,7 @@
|
|||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = BE11834C0CE160A80002D0F3 /* Build configuration list for PBXNativeTarget "miniupnp" */;
|
||||
buildPhases = (
|
||||
A2305097100C0293003FDB0C /* ShellScript */,
|
||||
BE1183440CE160960002D0F3 /* Headers */,
|
||||
BE1183450CE160960002D0F3 /* Sources */,
|
||||
BE1183460CE160960002D0F3 /* Frameworks */,
|
||||
|
@ -1826,6 +1827,19 @@
|
|||
shellPath = /bin/sh;
|
||||
shellScript = "sh update-version-h.sh";
|
||||
};
|
||||
A2305097100C0293003FDB0C /* ShellScript */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
);
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "cd ./third-party/miniupnp/\nsh updateminiupnpcstrings.sh";
|
||||
};
|
||||
BE75C3510C729EE100DBEFE0 /* ShellScript */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
|
|
|
@ -20,7 +20,6 @@ noinst_HEADERS = \
|
|||
minisoap.h \
|
||||
minissdpc.h \
|
||||
miniupnpc.h \
|
||||
miniupnpcstrings.h \
|
||||
miniwget.h \
|
||||
minixml.h \
|
||||
upnpcommands.h \
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
#ifndef __MINIUPNPCSTRINGS_H__
|
||||
#define __MINIUPNPCSTRINGS_H__
|
||||
|
||||
#define OS_STRING "RedHatEnterpriseClient/5.3"
|
||||
#define OS_STRING "Darwin/9.7.0"
|
||||
#define MINIUPNPC_VERSION_STRING "1.3"
|
||||
|
||||
#endif
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
/* $Id: miniupnpcstrings.h.in,v 1.1 2009/07/09 16:13:31 nanard Exp $ */
|
||||
/* Project: miniupnp
|
||||
* http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/
|
||||
* Author: Thomas Bernard
|
||||
* Copyright (c) 2005-2009 Thomas Bernard
|
||||
* This software is subjects to the conditions detailed
|
||||
* in the LICENCE file provided within this distribution */
|
||||
#ifndef __MINIUPNPCSTRINGS_H__
|
||||
#define __MINIUPNPCSTRINGS_H__
|
||||
|
||||
#define OS_STRING "OS/version"
|
||||
#define MINIUPNPC_VERSION_STRING "1.3"
|
||||
|
||||
#endif
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
#! /bin/sh
|
||||
# $Id: updateminiupnpcstrings.sh,v 1.3 2009/07/09 16:13:31 nanard Exp $
|
||||
|
||||
FILE=miniupnpcstrings.h
|
||||
|
||||
# detecting the OS name and version
|
||||
OS_NAME=`uname -s`
|
||||
OS_VERSION=`uname -r`
|
||||
if [ -f /etc/debian_version ]; then
|
||||
OS_NAME=Debian
|
||||
OS_VERSION=`cat /etc/debian_version`
|
||||
fi
|
||||
# use lsb_release (Linux Standard Base) when available
|
||||
LSB_RELEASE=`which lsb_release`
|
||||
if [ 0 -eq $? ]; then
|
||||
OS_NAME=`${LSB_RELEASE} -i -s`
|
||||
OS_VERSION=`${LSB_RELEASE} -r -s`
|
||||
case $OS_NAME in
|
||||
Debian)
|
||||
#OS_VERSION=`${LSB_RELEASE} -c -s`
|
||||
;;
|
||||
Ubuntu)
|
||||
#OS_VERSION=`${LSB_RELEASE} -c -s`
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
echo "Detected OS [$OS_NAME] version [$OS_VERSION]"
|
||||
|
||||
EXPR="s/OS_STRING \".*\"/OS_STRING \"${OS_NAME}\/${OS_VERSION}\"/"
|
||||
#echo $EXPR
|
||||
#echo "Backuping $FILE to $FILE.bak."
|
||||
#cp $FILE $FILE.bak
|
||||
test -f ${FILE}.in
|
||||
echo "setting OS_STRING macro value to ${OS_NAME}/${OS_VERSION} in $FILE."
|
||||
cat ${FILE}.in | sed -e "$EXPR" > $FILE
|
||||
|
Loading…
Reference in New Issue