Made the builder tools a little less version dependent
git-svn-id: https://duplicati.googlecode.com/svn/trunk@1059 59da171f-624f-0410-aa54-27559c288bec
This commit is contained in:
@@ -52,31 +52,35 @@ namespace LocalizationTool
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
resgenexe = System.Environment.ExpandEnvironmentVariables("%PROGRAMFILES%\\Microsoft SDKs\\Windows\\v6.0A\\bin\\resgen.exe");
|
||||
alexe = System.Environment.ExpandEnvironmentVariables("%WINDIR%\\Microsoft.Net\\Framework\\v2.0.50727\\al.exe");
|
||||
|
||||
if (!System.IO.File.Exists(resgenexe))
|
||||
{
|
||||
string resgenexe2 = System.Environment.ExpandEnvironmentVariables("%PROGRAMFILES%\\Microsoft.NET\\SDK\\v2.0\\bin\\resgen.exe");
|
||||
|
||||
if (System.IO.File.Exists(resgenexe2))
|
||||
resgenexe = resgenexe2;
|
||||
}
|
||||
if (!System.IO.File.Exists(alexe))
|
||||
{
|
||||
string v30 = System.Environment.ExpandEnvironmentVariables("%WINDIR%\\Microsoft.Net\\Framework\\v3.0\\al.exe");
|
||||
string v35 = System.Environment.ExpandEnvironmentVariables("%WINDIR%\\Microsoft.Net\\Framework\\v3.5\\al.exe");
|
||||
string sdk = System.Environment.ExpandEnvironmentVariables("%PROGRAMFILES%\\Microsoft SDKs\\Windows\\v6.0A\\bin\\al.exe");
|
||||
|
||||
if (System.IO.File.Exists(v30))
|
||||
alexe = v30;
|
||||
else if (System.IO.File.Exists(v35))
|
||||
alexe = v35;
|
||||
else if (System.IO.File.Exists(sdk))
|
||||
alexe = sdk;
|
||||
}
|
||||
|
||||
string[] known_sdk_paths =
|
||||
{
|
||||
Environment.ExpandEnvironmentVariables("%WINDIR%\\Microsoft.Net\\Framework\\v2.0.50727\\"),
|
||||
Environment.ExpandEnvironmentVariables("%PROGRAMFILES%\\Microsoft.NET\\SDK\\v2.0\\bin\\"),
|
||||
Environment.ExpandEnvironmentVariables("%WINDIR%\\Microsoft.Net\\Framework\\v3.0\\"),
|
||||
Environment.ExpandEnvironmentVariables("%WINDIR%\\Microsoft.Net\\Framework\\v3.5\\"),
|
||||
Environment.ExpandEnvironmentVariables("%PROGRAMFILES%\\Microsoft SDKs\\Windows\\v6.0A\\bin\\"),
|
||||
Environment.ExpandEnvironmentVariables("%PROGRAMFILES%\\Microsoft SDKs\\Windows\\v7.0A\\bin\\"),
|
||||
Environment.ExpandEnvironmentVariables("%PROGRAMFILES%\\Microsoft SDKs\\Windows\\v8.0A\\bin\\")
|
||||
|
||||
};
|
||||
|
||||
resgenexe = "resgen.exe";
|
||||
alexe = "al.exe";
|
||||
|
||||
foreach(var p in known_sdk_paths)
|
||||
if (System.IO.File.Exists(System.IO.Path.Combine(p, resgenexe)))
|
||||
{
|
||||
resgenexe = System.IO.Path.Combine(p, resgenexe);
|
||||
break;
|
||||
}
|
||||
|
||||
foreach (var p in known_sdk_paths)
|
||||
if (System.IO.File.Exists(System.IO.Path.Combine(p, alexe)))
|
||||
{
|
||||
alexe = System.IO.Path.Combine(p, alexe);
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
if (!System.IO.File.Exists(resgenexe))
|
||||
{
|
||||
|
||||
@@ -51,8 +51,42 @@ namespace WixProjBuilder
|
||||
|
||||
if (string.IsNullOrEmpty(wixpath))
|
||||
{
|
||||
wixpath = System.IO.Path.Combine(System.IO.Path.Combine(System.Environment.ExpandEnvironmentVariables("%programfiles%"), "Windows Installer XML v3"), "bin");
|
||||
Console.WriteLine(string.Format("*** wixpath not specified, using: {0}", wixpath));
|
||||
string[] known_wix_names = new string[]
|
||||
{
|
||||
"Windows Installer XML v3",
|
||||
"Windows Installer XML v3.1",
|
||||
"Windows Installer XML v3.2",
|
||||
"Windows Installer XML v3.3",
|
||||
"Windows Installer XML v3.4",
|
||||
"Windows Installer XML v3.5",
|
||||
"Windows Installer XML v3.6",
|
||||
"Windows Installer XML v3.7"
|
||||
};
|
||||
|
||||
foreach(var p in known_wix_names)
|
||||
{
|
||||
foreach(var p2 in new string[] {"%ProgramFiles(x86)%", "%programfiles%"})
|
||||
{
|
||||
wixpath = System.IO.Path.Combine(System.IO.Path.Combine(Environment.ExpandEnvironmentVariables(p2), p), "bin");
|
||||
if (System.IO.Directory.Exists(wixpath))
|
||||
{
|
||||
Console.WriteLine(string.Format("*** wixpath not specified, using: {0}", wixpath));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (System.IO.Directory.Exists(wixpath))
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
if (!System.IO.Directory.Exists(wixpath))
|
||||
{
|
||||
Console.WriteLine(string.Format("WiX not found, please install Windows Installer XML 3 or greater"));
|
||||
Console.WriteLine(string.Format(" supply path to WiX bin folder with option --wixpath=...path..."));
|
||||
return;
|
||||
}
|
||||
|
||||
args[0] = System.IO.Path.GetFullPath(args[0]);
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -82,9 +82,9 @@ cd "bin\Release"
|
||||
"%PROGRAMFILES%\7-zip\7z.exe" a -r "Duplicati.zip" Duplicati
|
||||
cd "..\.."
|
||||
|
||||
WixProjBuilder.exe --wixpath="C:\Program Files (x86)\Windows Installer XML v3\bin" WixInstaller.wixproj
|
||||
WixProjBuilder.exe WixInstaller.wixproj
|
||||
move "bin\Release\Duplicati.msi" "bin\Release\Duplicati.x86.msi"
|
||||
WixProjBuilder.exe --wixpath="C:\Program Files (x86)\Windows Installer XML v3\bin" --platform=x64 WixInstaller.wixproj
|
||||
WixProjBuilder.exe --platform=x64 WixInstaller.wixproj
|
||||
move "bin\Release\Duplicati.msi" "bin\Release\Duplicati.x64.msi"
|
||||
pause
|
||||
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user