[banshee] windows: MSBuild related fixes (bgo#641541)
- From: Gabriel Burt <gburt src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [banshee] windows: MSBuild related fixes (bgo#641541)
- Date: Mon, 7 Feb 2011 00:08:34 +0000 (UTC)
commit 500e75429aa2ce209bec425b740fdd3fd12215cb
Author: Matt Sturgeon <mttza1 gmail com>
Date: Sun Feb 6 05:43:00 2011 +0000
windows: MSBuild related fixes (bgo#641541)
* Use %WINDIR% instead of C:\WINDOWS
* Look for .NET 4.0 as well as 3.5
* Call post-build.bat from build-banshee.bat
Signed-off-by: Gabriel Burt <gabriel burt gmail com>
build/windows/build-banshee.bat | 19 +++++++++++++++++--
build/windows/build-installer.js | 16 ++++++++++++++--
2 files changed, 31 insertions(+), 4 deletions(-)
---
diff --git a/build/windows/build-banshee.bat b/build/windows/build-banshee.bat
index c8ae0d8..2e10cdc 100644
--- a/build/windows/build-banshee.bat
+++ b/build/windows/build-banshee.bat
@@ -1,2 +1,17 @@
-cd ..\..
-C:\WINDOWS\Microsoft.NET\Framework\v3.5\msbuild Banshee.sln /p:Configuration=Windows /p:Platform="Any CPU"
+ ECHO OFF
+SET v40-30319="%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild"
+SET v35="%WINDIR%\Microsoft.NET\Framework\v3.5\msbuild"
+CD ..\..
+ECHO "Looking for Microsoft.NET MSBuild..."
+IF EXIST %v40-30319% (
+ECHO "Building with Microsoft.NET v4.0 MSBuild"
+%v40-30319% Banshee.sln /p:Configuration=Windows /p:Platform="Any CPU"
+) ELSE IF EXIST "%v35%" (
+ECHO "Building with Microsoft.NET v3.5 MSBuild"
+%v35% Banshee.sln /p:Configuration=Windows /p:Platform="Any CPU"
+) ELSE (
+ECHO "Build failed: Microsoft.NET MSBuild (msbuild.exe) not found"
+)
+ECHO 'Running "post-build.bat"'
+build\windows\post-build.bat
+CD build\windows
diff --git a/build/windows/build-installer.js b/build/windows/build-installer.js
index 7ea70f5..9db87e2 100644
--- a/build/windows/build-installer.js
+++ b/build/windows/build-installer.js
@@ -12,6 +12,18 @@ var env = sh.Environment("Process");
var heat = "\"" + env("WIX") + "bin\\heat.exe\"";
+// Look for msbuild.exe
+if (fs.FileExists(env("windir") + "\\Microsoft.NET\\Framework\\v4.0.30319\\msbuild.exe") == 1){
+ var msbuild = env("windir") + "\\Microsoft.NET\\Framework\\v4.0.30319\\msbuild.exe"
+}
+else if (fs.FileExists(env("windir") + "\\Microsoft.NET\\Framework\\v3.5\\msbuild.exe") == 1){
+ var msbuild = env("windir") + "\\Microsoft.NET\\Framework\\v3.5\\msbuild.exe"
+}
+else {
+ WScript.Echo ('Build failed: Microsoft.NET MSBuild \(msbuild.exe\) not found');
+ WScript.Quit (1);
+}
+
// Build Banshee
//build ("..\\..\\Banshee.sln");
@@ -50,9 +62,9 @@ function run (cmd)
function build (file)
{
- if (sh.run ("C:\\Windows\\Microsoft.NET\\Framework\\v3.5\\msbuild.exe " + file, 5, true) != 0) {
+ if (sh.run (msbuild + " " + file, 5, true) != 0) {
WScript.Echo ("Build failed");
- WScript.Quit (1);
+ WScript.Quit (1);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]