Skip to content

Commit 046d1d3

Browse files
VirtuworksVirtuworks
Virtuworks
authored and
Virtuworks
committed
Merge
2 parents bc6dc76 + a789f7a commit 046d1d3

File tree

118 files changed

+11782
-63711
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

118 files changed

+11782
-63711
lines changed

WebsitePanel.Installer/Sources/Setup.WIXInstaller/Config.wxi

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,4 @@
99
<?define PortalTitle="Portal"?>
1010
<?define PortalDescription="WebsitePanel Portal is a control panel itself with user interface which allows managing user accounts, hosting spaces, web sites, FTP accounts, files, etc."?>
1111
<?define VERSION="$(var.Version)"?>
12-
<?define sql_release_version = "$(var.Version)"?> <!--N'${release.version}'-->
13-
<?define sql_build_date = "$(var.BuildDate)"?> <!-- '${release.date}T00:00:00' - ISO 8601 Format (YYYY-MM-DDTHH:MM:SS) -->
1412
</Include>

WebsitePanel.Installer/Sources/Setup.WIXInstaller/Product.wxs

Lines changed: 80 additions & 54 deletions
Large diffs are not rendered by default.

WebsitePanel.Installer/Sources/Setup.WIXInstaller/SchedulerServiceFiles.wxs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<?define SERVERBUILDPATH = "$(var.PROJECTPATH)\Build\$(var.BUILD)\Server\bin"?>
66
<Fragment>
77
<ComponentGroup Id="SchedulerServiceFiles">
8-
<Component Id="cmpSchedulerServiceFiles" Directory="INSTALLSERVICEFOLDER" Guid="{5E9F9A14-DB8E-4555-8D40-67110698F046}">
8+
<Component Id="cmpSchedulerServiceFiles" Directory="PI_SCHEDULER_INSTALL_DIR" Guid="{5E9F9A14-DB8E-4555-8D40-67110698F046}">
99
<File Id="WebsitePanel.SchedulerService.exe" Source="$(var.BUILDPATH)\WebsitePanel.SchedulerService.exe" />
1010
<File Id="WebsitePanel.SchedulerService.exe.config" Source="$(var.BUILDPATH)\WebsitePanel.SchedulerService.exe.config" />
1111
<File Id="Ionic.Zip.Reduced.dll" Source="$(var.SERVERBUILDPATH)\Ionic.Zip.Reduced.dll"/>

WebsitePanel.Installer/Sources/Setup.WIXInstaller/Setup.WIXInstaller.wixproj

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,19 @@
1414
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
1515
<OutputPath>bin\</OutputPath>
1616
<IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath>
17-
<DefineConstants>Debug;BUILD=debug;Version=$(Version);BuildDate=$(ReleaseDate)</DefineConstants>
17+
<DefineConstants>Debug;BUILD=debug;Version=$(Version)</DefineConstants>
1818
<SuppressValidation>False</SuppressValidation>
1919
<SuppressIces>
2020
</SuppressIces>
2121
<CompilerAdditionalOptions>
2222
</CompilerAdditionalOptions>
23-
<LinkerAdditionalOptions>
23+
<LinkerAdditionalOptions>
2424
</LinkerAdditionalOptions>
2525
</PropertyGroup>
2626
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
2727
<OutputPath>bin\$(Configuration)\</OutputPath>
2828
<IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath>
29-
<DefineConstants>BUILD=release;Version=$(Version);BuildDate=$(ReleaseDate)</DefineConstants>
29+
<DefineConstants>BUILD=release;Version=$(Version)</DefineConstants>
3030
</PropertyGroup>
3131
<ItemGroup>
3232
<Compile Include="CustomVerifyReadyDlg.wxs" />
@@ -46,10 +46,6 @@
4646
<HintPath>..\..\..\tools\WIX\WixUIExtension.dll</HintPath>
4747
<Name>WixUIExtension</Name>
4848
</WixExtension>
49-
<WixExtension Include="WixIIsExtension">
50-
<HintPath>..\..\..\tools\WIX\WixIIsExtension.dll</HintPath>
51-
<Name>WixIIsExtension</Name>
52-
</WixExtension>
5349
<WixExtension Include="WixSqlExtension">
5450
<HintPath>..\..\..\tools\WIX\WixSqlExtension.dll</HintPath>
5551
<Name>WixSqlExtension</Name>
@@ -68,4 +64,4 @@
6864
<Target Name="AfterBuild">
6965
</Target>
7066
-->
71-
</Project>
67+
</Project>

WebsitePanel.Installer/Sources/WebsitePanel.Installer.sln

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -134,22 +134,18 @@ Global
134134
{24A4C231-73A9-4F03-ABAD-9A8FE5324495}.Release|x86.Build.0 = Release|x86
135135
{3343FFD8-7CCE-451B-95AE-3D97244313A2}.Debug|Any CPU.ActiveCfg = Debug|x86
136136
{3343FFD8-7CCE-451B-95AE-3D97244313A2}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
137-
{3343FFD8-7CCE-451B-95AE-3D97244313A2}.Debug|Mixed Platforms.Build.0 = Debug|x86
138137
{3343FFD8-7CCE-451B-95AE-3D97244313A2}.Debug|x86.ActiveCfg = Debug|x86
139138
{3343FFD8-7CCE-451B-95AE-3D97244313A2}.Debug|x86.Build.0 = Debug|x86
140139
{3343FFD8-7CCE-451B-95AE-3D97244313A2}.Release|Any CPU.ActiveCfg = Release|x86
141140
{3343FFD8-7CCE-451B-95AE-3D97244313A2}.Release|Mixed Platforms.ActiveCfg = Release|x86
142-
{3343FFD8-7CCE-451B-95AE-3D97244313A2}.Release|Mixed Platforms.Build.0 = Release|x86
143141
{3343FFD8-7CCE-451B-95AE-3D97244313A2}.Release|x86.ActiveCfg = Release|x86
144142
{3343FFD8-7CCE-451B-95AE-3D97244313A2}.Release|x86.Build.0 = Release|x86
145143
{978F0A18-7C81-4561-8F6D-5A165484AD0A}.Debug|Any CPU.ActiveCfg = Debug|x86
146144
{978F0A18-7C81-4561-8F6D-5A165484AD0A}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
147-
{978F0A18-7C81-4561-8F6D-5A165484AD0A}.Debug|Mixed Platforms.Build.0 = Debug|x86
148145
{978F0A18-7C81-4561-8F6D-5A165484AD0A}.Debug|x86.ActiveCfg = Debug|x86
149146
{978F0A18-7C81-4561-8F6D-5A165484AD0A}.Debug|x86.Build.0 = Debug|x86
150147
{978F0A18-7C81-4561-8F6D-5A165484AD0A}.Release|Any CPU.ActiveCfg = Release|x86
151148
{978F0A18-7C81-4561-8F6D-5A165484AD0A}.Release|Mixed Platforms.ActiveCfg = Release|x86
152-
{978F0A18-7C81-4561-8F6D-5A165484AD0A}.Release|Mixed Platforms.Build.0 = Release|x86
153149
{978F0A18-7C81-4561-8F6D-5A165484AD0A}.Release|x86.ActiveCfg = Release|x86
154150
{978F0A18-7C81-4561-8F6D-5A165484AD0A}.Release|x86.Build.0 = Release|x86
155151
EndGlobalSection

WebsitePanel.Installer/Sources/WebsitePanel.Setup/Actions/EntServerActionManager.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ public class CreateDatabaseUserAction : Action, IInstallAction, IUninstallAction
232232
{
233233
void IInstallAction.Run(SetupVariables vars)
234234
{
235-
try
235+
try
236236
{
237237
//
238238
Log.WriteStart(String.Format("Creating database user {0}", vars.Database));

WebsitePanel.Installer/Sources/WebsitePanel.Setup/Actions/ServerActionManager.cs

Lines changed: 11 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ void IInstallAction.Run(SetupVariables vars)
394394
}
395395

396396
// This flag is the opposite of poolExists flag
397-
vars.NewWebApplicationPool = !poolExists;
397+
vars.NewWebApplicationPool = !poolExists || vars.ComponentExists;
398398

399399
if (poolExists)
400400
{
@@ -501,7 +501,7 @@ public override bool Indeterminate
501501

502502
void IInstallAction.Run(SetupVariables vars)
503503
{
504-
var siteName = vars.ComponentFullName;
504+
var siteName = vars.ComponentFullName;
505505
var ip = vars.WebSiteIP;
506506
var port = vars.WebSitePort;
507507
var domain = vars.WebSiteDomain;
@@ -774,31 +774,22 @@ public override bool Indeterminate
774774

775775
void IInstallAction.Run(SetupVariables vars)
776776
{
777-
try
777+
try
778778
{
779779
Begin(LogStartInstallMessage);
780-
//
781780
Log.WriteStart("Updating configuration file (server password)");
782781
Log.WriteInfo(String.Format("Server password is: '{0}'", vars.ServerPassword));
783782
Log.WriteInfo("Single quotes are added for clarity purposes");
784-
//
785783
string file = Path.Combine(vars.InstallationFolder, vars.ConfigurationFile);
786784
string hash = Utils.ComputeSHA1(vars.ServerPassword);
787-
// load file
788-
string content = string.Empty;
789-
using (StreamReader reader = new StreamReader(file))
790-
{
791-
content = reader.ReadToEnd();
792-
}
793-
794-
// expand variables
795-
content = Utils.ReplaceScriptVariable(content, "installer.server.password", hash);
796-
797-
// save file
798-
using (StreamWriter writer = new StreamWriter(file))
799-
{
800-
writer.Write(content);
801-
}
785+
var XmlDoc = new XmlDocument();
786+
XmlDoc.Load(file);
787+
var Node = XmlDoc.SelectSingleNode("configuration/websitepanel.server/security/password") as XmlElement;
788+
if (Node == null)
789+
throw new Exception("Unable to set a server access password. Check structure of configuration file.");
790+
else
791+
Node.SetAttribute("value", hash);
792+
XmlDoc.Save(file);
802793
}
803794
catch (Exception ex)
804795
{

WebsitePanel.Installer/Sources/WebsitePanel.Setup/Common/FileUtils.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -335,10 +335,10 @@ public static int CalculateFiles(string path)
335335
return files;
336336
}
337337

338-
public static void CopyFileToFolder(string sourceFile, string destinationFolder)
338+
public static void CopyFileToFolder(string sourceFile, string destinationFolder, string destinationFileName = "")
339339
{
340340
string fileName = Path.GetFileName(sourceFile);
341-
string destinationFile = Path.Combine(destinationFolder, fileName);
341+
string destinationFile = Path.Combine(destinationFolder, string.IsNullOrWhiteSpace(destinationFileName) ? fileName : destinationFileName);
342342
CopyFile(new FileInfo(sourceFile), destinationFile);
343343
}
344344

WebsitePanel.Installer/Sources/WebsitePanel.Setup/Common/InstallAction.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,8 @@ public enum ActionTypes
8989
SwitchEntServer2AspNet40,
9090
SwitchWebPortal2AspNet40,
9191
ConfigureSecureSessionModuleInWebConfig,
92-
RestoreConfig
92+
RestoreConfig,
93+
UpdateXml
9394
}
9495

9596
public class InstallAction

WebsitePanel.Installer/Sources/WebsitePanel.Setup/Common/SecurityUtils.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,7 @@ internal static string GetAccountName(string sid)
398398
/// <summary>
399399
/// Check for existing user
400400
/// </summary>
401-
internal static bool UserExists(string domain, string userName)
401+
public static bool UserExists(string domain, string userName)
402402
{
403403
bool found = false;
404404
// check whether user account already exists

WebsitePanel.Installer/Sources/WebsitePanel.Setup/Common/SetupVariables.cs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,12 @@ public string[] UserMembership
249249

250250
public string BaseDirectory { get; set; }
251251

252+
public string SpecialBaseDirectory { get; set; }
253+
public IDictionary<string, string> FileNameMap { get; set; }
254+
public IDictionary<string, string> SessionVariables { get; set; }
255+
public IDictionary<string, string[]> XmlData { get; set; } // XPath, Value.
256+
public bool ComponentExists { get; set; }
257+
252258
public string UpdateVersion { get; set; }
253259

254260
public string EnterpriseServerURL { get; set; }
@@ -278,7 +284,8 @@ public string Domain
278284
public string ServiceName { get; set; }
279285

280286
public string ConfigurationFile { get; set; }
281-
287+
private bool m_UseUserCredentials = true;
288+
public bool UseUserCredentials { get { return m_UseUserCredentials; } set { m_UseUserCredentials = value; } }
282289
public string ServiceFile { get; set; }
283290

284291
public string LicenseKey { get; set; }

WebsitePanel.Installer/Sources/WebsitePanel.Setup/Common/WebUtils.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -768,7 +768,7 @@ internal static string GetIIS7SiteIdByBinding(string ip, string port, string hos
768768
/// </summary>
769769
/// <param name="name"></param>
770770
/// <returns></returns>
771-
internal static bool ApplicationPoolExists(string name)
771+
public static bool ApplicationPoolExists(string name)
772772
{
773773
WmiHelper wmi = new WmiHelper("root\\MicrosoftIISv2");
774774
return(wmi.ExecuteQuery(
@@ -780,7 +780,7 @@ internal static bool ApplicationPoolExists(string name)
780780
/// </summary>
781781
/// <param name="name"></param>
782782
/// <returns></returns>
783-
internal static bool IIS7ApplicationPoolExists(string name)
783+
public static bool IIS7ApplicationPoolExists(string name)
784784
{
785785
ServerManager serverManager = new ServerManager();
786786
bool ret = (serverManager.ApplicationPools[name] != null);

0 commit comments

Comments
 (0)