From: <sam...@us...> - 2006-06-18 05:37:58
|
Revision: 13 Author: samuel337 Date: 2006-06-17 22:37:49 -0700 (Sat, 17 Jun 2006) ViewCVS: http://svn.sourceforge.net/mp-webinterface/?rev=13&view=rev Log Message: ----------- Fixed path problems when starting on startup in MPWApplication Modified Paths: -------------- trunk/source/MPWApplication/frmMain.Designer.cs trunk/source/MPWApplication/frmMain.cs Modified: trunk/source/MPWApplication/frmMain.Designer.cs =================================================================== --- trunk/source/MPWApplication/frmMain.Designer.cs 2006-06-10 15:41:52 UTC (rev 12) +++ trunk/source/MPWApplication/frmMain.Designer.cs 2006-06-18 05:37:49 UTC (rev 13) @@ -76,9 +76,9 @@ this.LlblMPWWebsite = new System.Windows.Forms.LinkLabel(); this.LblCredits = new System.Windows.Forms.Label(); this.grpMPWOptions = new System.Windows.Forms.GroupBox(); + this.cmdChangePassword = new System.Windows.Forms.Button(); this.cmdChangeMPWPort = new System.Windows.Forms.Button(); this.cmdStartMPWOnStartup = new System.Windows.Forms.Button(); - this.cmdChangePassword = new System.Windows.Forms.Button(); this.grpCurrentStatus.SuspendLayout(); this.grpLogs.SuspendLayout(); this.grpMPStatus.SuspendLayout(); @@ -168,9 +168,9 @@ // // CmdRestartServer // - this.CmdRestartServer.Location = new System.Drawing.Point(346, 32); + this.CmdRestartServer.Location = new System.Drawing.Point(341, 32); this.CmdRestartServer.Name = "CmdRestartServer"; - this.CmdRestartServer.Size = new System.Drawing.Size(153, 23); + this.CmdRestartServer.Size = new System.Drawing.Size(158, 23); this.CmdRestartServer.TabIndex = 2; this.CmdRestartServer.Text = "&Restart Web Server"; this.CmdRestartServer.UseVisualStyleBackColor = true; @@ -178,9 +178,9 @@ // // CmdStopServer // - this.CmdStopServer.Location = new System.Drawing.Point(177, 32); + this.CmdStopServer.Location = new System.Drawing.Point(173, 32); this.CmdStopServer.Name = "CmdStopServer"; - this.CmdStopServer.Size = new System.Drawing.Size(153, 23); + this.CmdStopServer.Size = new System.Drawing.Size(160, 23); this.CmdStopServer.TabIndex = 1; this.CmdStopServer.Text = "S&top Web Server"; this.CmdStopServer.UseVisualStyleBackColor = true; @@ -190,7 +190,7 @@ // this.CmdStartServer.Location = new System.Drawing.Point(9, 32); this.CmdStartServer.Name = "CmdStartServer"; - this.CmdStartServer.Size = new System.Drawing.Size(153, 23); + this.CmdStartServer.Size = new System.Drawing.Size(158, 23); this.CmdStartServer.TabIndex = 0; this.CmdStartServer.Text = "&Start Web Server"; this.CmdStartServer.UseVisualStyleBackColor = true; @@ -527,6 +527,16 @@ this.grpMPWOptions.TabStop = false; this.grpMPWOptions.Text = "Options"; // + // cmdChangePassword + // + this.cmdChangePassword.Location = new System.Drawing.Point(341, 14); + this.cmdChangePassword.Name = "cmdChangePassword"; + this.cmdChangePassword.Size = new System.Drawing.Size(158, 23); + this.cmdChangePassword.TabIndex = 2; + this.cmdChangePassword.Text = "Change Password"; + this.cmdChangePassword.UseVisualStyleBackColor = true; + this.cmdChangePassword.Click += new System.EventHandler(this.cmdChangePassword_Click); + // // cmdChangeMPWPort // this.cmdChangeMPWPort.Location = new System.Drawing.Point(175, 14); @@ -547,16 +557,6 @@ this.cmdStartMPWOnStartup.UseVisualStyleBackColor = true; this.cmdStartMPWOnStartup.Click += new System.EventHandler(this.cmdStartMPWOnStartup_Click); // - // cmdChangePassword - // - this.cmdChangePassword.Location = new System.Drawing.Point(341, 14); - this.cmdChangePassword.Name = "cmdChangePassword"; - this.cmdChangePassword.Size = new System.Drawing.Size(158, 23); - this.cmdChangePassword.TabIndex = 2; - this.cmdChangePassword.Text = "Change Password"; - this.cmdChangePassword.UseVisualStyleBackColor = true; - this.cmdChangePassword.Click += new System.EventHandler(this.cmdChangePassword_Click); - // // frmMain // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); Modified: trunk/source/MPWApplication/frmMain.cs =================================================================== --- trunk/source/MPWApplication/frmMain.cs 2006-06-10 15:41:52 UTC (rev 12) +++ trunk/source/MPWApplication/frmMain.cs 2006-06-18 05:37:49 UTC (rev 13) @@ -163,7 +163,7 @@ private string GetMPVersion() { string MPAppConfigPath; - MPAppConfigPath = Environment.CurrentDirectory; + MPAppConfigPath = System.IO.Path.GetDirectoryName(Application.ExecutablePath); MPAppConfigPath = MPAppConfigPath.Remove(MPAppConfigPath.LastIndexOf(System.IO.Path.DirectorySeparatorChar)); MPAppConfigPath += @"\MediaPortal.exe.config"; @@ -193,7 +193,7 @@ private string GetMPECP2LoaderVersion() { string MPECP2LoaderPath; - MPECP2LoaderPath = Environment.CurrentDirectory; + MPECP2LoaderPath = System.IO.Path.GetDirectoryName(Application.ExecutablePath); MPECP2LoaderPath = MPECP2LoaderPath.Remove(MPECP2LoaderPath.LastIndexOf(System.IO.Path.DirectorySeparatorChar)); MPECP2LoaderPath += @"\plugins\process\ECP2Plugin.dll"; @@ -208,7 +208,7 @@ private string GetMPECP2Version() { string MPECP2Path; - MPECP2Path = Environment.CurrentDirectory; + MPECP2Path = System.IO.Path.GetDirectoryName(Application.ExecutablePath); MPECP2Path = MPECP2Path.Remove(MPECP2Path.LastIndexOf(System.IO.Path.DirectorySeparatorChar)); MPECP2Path += @"\ECP2Assembly.dll"; @@ -223,7 +223,7 @@ private string GetMPWECP2Version() { string MPWECP2Path; - MPWECP2Path = Environment.CurrentDirectory; + MPWECP2Path = System.IO.Path.GetDirectoryName(Application.ExecutablePath); MPWECP2Path += @"\htdocs\MPExtControlWS\bin\ECP2Assembly.dll"; if (System.IO.File.Exists(MPWECP2Path) == false) @@ -237,7 +237,7 @@ private string GetMPWVersion() { string MPWVersionInfoPath; - MPWVersionInfoPath = Environment.CurrentDirectory; + MPWVersionInfoPath = System.IO.Path.GetDirectoryName(Application.ExecutablePath); MPWVersionInfoPath += @"\htdocs\webscheduler\functions\version.php"; if (System.IO.File.Exists(MPWVersionInfoPath) == false) @@ -287,7 +287,7 @@ psi.RedirectStandardOutput = true; psi.UseShellExecute = false; - psi.FileName = Environment.CurrentDirectory + @"\apache\bin\apache.exe"; + psi.FileName = System.IO.Path.GetDirectoryName(Application.ExecutablePath) + @"\apache\bin\apache.exe"; if (System.IO.File.Exists(psi.FileName) == false) { @@ -536,7 +536,7 @@ { System.Diagnostics.ProcessStartInfo psi = new System.Diagnostics.ProcessStartInfo(); psi.UseShellExecute = true; - psi.FileName = Environment.CurrentDirectory + @"\apache\logs\error.log"; + psi.FileName = System.IO.Path.GetDirectoryName(Application.ExecutablePath) + @"\apache\logs\error.log"; if (System.IO.File.Exists(psi.FileName) == false) { MessageBox.Show("The Apache log file could not be found.", "MPW Error", MessageBoxButtons.OK, MessageBoxIcon.Error); @@ -550,7 +550,7 @@ { System.Diagnostics.ProcessStartInfo psi = new System.Diagnostics.ProcessStartInfo(); psi.UseShellExecute = true; - psi.FileName = Environment.CurrentDirectory + @"\php\log\phperror.log"; + psi.FileName = System.IO.Path.GetDirectoryName(Application.ExecutablePath) + @"\php\log\phperror.log"; if (System.IO.File.Exists(psi.FileName) == false) { MessageBox.Show("The PHP log file could not be found.", "MPW Error", MessageBoxButtons.OK, MessageBoxIcon.Error); @@ -566,7 +566,7 @@ psi.UseShellExecute = true; string MPLogPath; - MPLogPath = Environment.CurrentDirectory; + MPLogPath = System.IO.Path.GetDirectoryName(Application.ExecutablePath); MPLogPath = MPLogPath.Remove(MPLogPath.LastIndexOf(System.IO.Path.DirectorySeparatorChar)); MPLogPath += @"\log\MediaPortal.log"; psi.FileName = MPLogPath; @@ -748,7 +748,7 @@ { if (CheckMPWOnStartupStatus() == true) { - cmdStartMPWOnStartup.Text = "Stop MPW Starting On Startup"; + cmdStartMPWOnStartup.Text = "Remove MPW From Startup"; cmdStartMPWOnStartup.Tag = "remove"; } else This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |