[MacSDK] Use msbuild's install script instead of duplicating it here
authorAlexis Christoforides <alexis@thenull.net>
Thu, 27 Apr 2017 15:17:59 +0000 (11:17 -0400)
committerAlexis Christoforides <alexis@thenull.net>
Thu, 27 Apr 2017 15:17:59 +0000 (11:17 -0400)
packaging/MacSDK/msbuild.py

index 3d123952f35168d771fbe222f1d111cc5efd1757..3b186576c4354e9e6922348c35ef5067c6011405 100644 (file)
@@ -11,47 +11,6 @@ class MSBuild (GitHubPackage):
         self.sh('./cibuild.sh --scope Compile --target Mono --host Mono')
 
     def install(self):
-        # adjusted from 'install-mono-prefix.sh'
-
-        build_output = 'bin/Debug-MONO/OSX_Deployment'
-        new_location = os.path.join(
-            self.staged_prefix,
-            'lib/mono/msbuild/%s/bin' %
-            self.version)
-        bindir = os.path.join(self.staged_prefix, 'bin')
-
-        os.makedirs(new_location)
-        self.sh('cp -R %s/* %s' % (build_output, new_location))
-
-        os.makedirs(bindir)
-
-        self.sh('cp msbuild-mono-deploy.in %s/msbuild' % bindir)
-
-        xbuild_dir = os.path.join(self.staged_prefix, 'lib/mono/xbuild')
-        new_xbuild_tv_dir = os.path.join(xbuild_dir, self.version)
-        os.makedirs(new_xbuild_tv_dir)
-
-        self.sh('mv %s/Microsoft.Common.props %s' %
-                (new_location, new_xbuild_tv_dir))
-        self.sh('cp -R nuget-support/tv/ %s' % new_xbuild_tv_dir)
-        self.sh('cp -R nuget-support/tasks-targets/ %s/' % xbuild_dir)
-        for dep in glob.glob("%s/Microsoft/NuGet/*" % xbuild_dir):
-            self.sh('ln -s %s %s' % (dep, xbuild_dir))
-
-        for line in fileinput.input('%s/msbuild' % bindir, inplace=True):
-            line = line.replace('@bindir@', '%s/bin' % self.staged_prefix)
-            line = line.replace(
-                '@mono_instdir@',
-                '%s/lib/mono' %
-                self.staged_prefix)
-            print line
-
-        patterns = ["*UnitTests*", "*xunit*", "NuGet*", "System.Runtime.InteropServices.RuntimeInformation.dll",
-                    "Roslyn/csc.exe*"]
-
-        for pattern in patterns:
-            for excluded in glob.glob("%s/%s" % (new_location, pattern)):
-                self.rm(excluded)
-
+        self.sh('./install-mono-prefix.sh %s' % self.staged_prefix)
 
 MSBuild()