[longomatch] Update tools to parse the new csproj files
- From: Andoni Morales Alastruey <amorales src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [longomatch] Update tools to parse the new csproj files
- Date: Wed, 24 Sep 2014 20:30:28 +0000 (UTC)
commit 31d9552e802a4cb36401d034639ace11496535c7
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date: Fri Sep 12 03:44:48 2014 +0200
Update tools to parse the new csproj files
tools/mdptomakefile.py | 13 +++++++------
1 files changed, 7 insertions(+), 6 deletions(-)
---
diff --git a/tools/mdptomakefile.py b/tools/mdptomakefile.py
index 983b615..ec4d552 100644
--- a/tools/mdptomakefile.py
+++ b/tools/mdptomakefile.py
@@ -20,20 +20,21 @@ def mdptoam(mdp):
with open (mdp) as f:
l = f.read()
try:
- assembly = re.findall('assembly="([^"]*)"', l)[0]
+ assembly = re.findall('<AssemblyName>([^"]*)</AssemblyName>', l)[0]
except:
assembly = ""
try:
- target = re.findall('target="([^"]*)"', l)[0].lower()
+ target = re.findall('<OutputType>([^"]*)</OutputType>', l)[0]
except:
assembly = "library"
try:
- files = re.findall('subtype="Code" buildaction="Compile" name="([^"]*)"', l)
+ files = re.findall('<Compile Include="([^"]*)" />', l)
+ files = [x.replace('\\', '/') for x in files]
except:
files = []
try:
- resources = re.findall('subtype="Code" buildaction="EmbedAsResource" name="([^"]*)"', l)
- resources = [x.replace("../", "$(top_srcdir)/") for x in resources]
+ resources = re.findall('<EmbeddedResource Include="([^"]*)">', l)
+ resources = [x.replace('\\', '/').replace("../", "$(top_srcdir)/") for x in resources]
except:
resources = []
files.sort()
@@ -73,7 +74,7 @@ def main():
if not os.path.isdir(d):
continue
for f in os.listdir(os.path.join(p, d)):
- if not f.endswith(".mdp"):
+ if not f.endswith(".csproj"):
continue
mdps.append(os.path.join(d, f))
for mdp in mdps:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]