Skip to content

Commit

Permalink
Don't overwrite project guid when regenerating bindings
Browse files Browse the repository at this point in the history
  • Loading branch information
Antonius Riha committed Jan 17, 2015
1 parent bf0851d commit 51f0c9d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
11 changes: 9 additions & 2 deletions bindinate/bindinate.in
Expand Up @@ -418,7 +418,14 @@ PROJ_DEFS=
BUILD_CONFIGS=
i=1
for profile in $PROFILES; do
guid="$(@UUIDGEN@ | tr [:lower:] [:upper:])"
projPath="${OUTDIR}/sources/${NAME}-sharp-${profile}.csproj"

guid=
if guidNodeVal=$(@XMLLINT@ --xpath "//*[local-name() = 'ProjectGuid']/text()" $projPath 2>/dev/null) ; then
guid=$(echo $guidNodeVal | sed 's|{*||g' | sed 's|}*||g')
else
guid="$(@UUIDGEN@ | tr [:lower:] [:upper:])"
fi

projDef=$(cat @prefix@/lib/bindinator/Bindings.sln.ProjDefs.template | \
sed "s,#NAME#,${NAME}-sharp-${profile},g" | \
Expand All @@ -444,7 +451,7 @@ for profile in $PROFILES; do
sed "s,#NAMESPACE#,${NS},g" | \
sed "s,#PROFILE#,${profile},g" | \
sed "s,#DEFINES#,${defines},g" | \
@UNIX2DOS@ > "${OUTDIR}/sources/${NAME}-sharp-${profile}.csproj"
@UNIX2DOS@ > $projPath

i=$((i+1))
done
Expand Down
6 changes: 6 additions & 0 deletions configure.ac
Expand Up @@ -11,6 +11,12 @@ if test "x$XSLTPROC" = "xno" ; then
fi
AC_SUBST(XSLTPROC)

AC_PATH_PROG(XMLLINT, xmllint, no)
if test "x$XMLLINT" = "xno" ; then
AC_MSG_ERROR([xmllint not found])
fi
AC_SUBST(XMLLINT)

PKG_CHECK_MODULES(GIR, gobject-introspection-1.0, has_gir=true, has_gir=false)
if test "x$has_gir" = "xfalse"; then
AC_MSG_ERROR([gobject-introspection not found, cannot determine gir directory])
Expand Down

0 comments on commit 51f0c9d

Please sign in to comment.