diff --git a/src/RetroGOG/frmDependencies.Designer.cs b/src/RetroGOG/frmDependencies.Designer.cs index d97844d..99ead58 100644 --- a/src/RetroGOG/frmDependencies.Designer.cs +++ b/src/RetroGOG/frmDependencies.Designer.cs @@ -46,6 +46,9 @@ private void InitializeComponent() this.btnRetroBrowse = new System.Windows.Forms.Button(); this.tmrCheck = new System.Windows.Forms.Timer(this.components); this.btnDownloadGOG = new System.Windows.Forms.Button(); + this.btnGOGBrowse = new System.Windows.Forms.Button(); + this.txtGOGPath = new System.Windows.Forms.TextBox(); + this.lblGOGBrowse = new System.Windows.Forms.Label(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.imgRetroStatus)).BeginInit(); @@ -164,7 +167,7 @@ private void InitializeComponent() // this.lblRetroBrowse.AutoSize = true; this.lblRetroBrowse.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lblRetroBrowse.Location = new System.Drawing.Point(90, 182); + this.lblRetroBrowse.Location = new System.Drawing.Point(90, 213); this.lblRetroBrowse.Name = "lblRetroBrowse"; this.lblRetroBrowse.Size = new System.Drawing.Size(343, 18); this.lblRetroBrowse.TabIndex = 18; @@ -174,7 +177,7 @@ private void InitializeComponent() // txtRetroPath // this.txtRetroPath.Enabled = false; - this.txtRetroPath.Location = new System.Drawing.Point(93, 203); + this.txtRetroPath.Location = new System.Drawing.Point(93, 234); this.txtRetroPath.Name = "txtRetroPath"; this.txtRetroPath.Size = new System.Drawing.Size(444, 20); this.txtRetroPath.TabIndex = 19; @@ -182,7 +185,7 @@ private void InitializeComponent() // // btnRetroBrowse // - this.btnRetroBrowse.Location = new System.Drawing.Point(543, 200); + this.btnRetroBrowse.Location = new System.Drawing.Point(543, 231); this.btnRetroBrowse.Name = "btnRetroBrowse"; this.btnRetroBrowse.Size = new System.Drawing.Size(75, 23); this.btnRetroBrowse.TabIndex = 20; @@ -208,6 +211,37 @@ private void InitializeComponent() this.btnDownloadGOG.Visible = false; this.btnDownloadGOG.Click += new System.EventHandler(this.btnDownloadGOG_Click); // + // btnGOGBrowse + // + this.btnGOGBrowse.Location = new System.Drawing.Point(543, 177); + this.btnGOGBrowse.Name = "btnGOGBrowse"; + this.btnGOGBrowse.Size = new System.Drawing.Size(75, 23); + this.btnGOGBrowse.TabIndex = 24; + this.btnGOGBrowse.Text = "B&rowse"; + this.btnGOGBrowse.UseVisualStyleBackColor = true; + this.btnGOGBrowse.Visible = false; + this.btnGOGBrowse.Click += new System.EventHandler(this.btnGOGBrowse_Click); + // + // txtGOGPath + // + this.txtGOGPath.Enabled = false; + this.txtGOGPath.Location = new System.Drawing.Point(93, 180); + this.txtGOGPath.Name = "txtGOGPath"; + this.txtGOGPath.Size = new System.Drawing.Size(444, 20); + this.txtGOGPath.TabIndex = 23; + this.txtGOGPath.Visible = false; + // + // lblGOGBrowse + // + this.lblGOGBrowse.AutoSize = true; + this.lblGOGBrowse.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblGOGBrowse.Location = new System.Drawing.Point(90, 159); + this.lblGOGBrowse.Name = "lblGOGBrowse"; + this.lblGOGBrowse.Size = new System.Drawing.Size(386, 18); + this.lblGOGBrowse.TabIndex = 22; + this.lblGOGBrowse.Text = "Please enter the path to your GOG Galaxy 2.0 installation:"; + this.lblGOGBrowse.Visible = false; + // // frmDependencies // this.AcceptButton = this.btnNext; @@ -215,6 +249,9 @@ private void InitializeComponent() this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.CancelButton = this.btnBack; this.ClientSize = new System.Drawing.Size(630, 378); + this.Controls.Add(this.btnGOGBrowse); + this.Controls.Add(this.txtGOGPath); + this.Controls.Add(this.lblGOGBrowse); this.Controls.Add(this.btnDownloadGOG); this.Controls.Add(this.btnRetroBrowse); this.Controls.Add(this.txtRetroPath); @@ -264,5 +301,8 @@ private void InitializeComponent() private System.Windows.Forms.Button btnRetroBrowse; private System.Windows.Forms.Timer tmrCheck; private System.Windows.Forms.Button btnDownloadGOG; + private System.Windows.Forms.Button btnGOGBrowse; + private System.Windows.Forms.TextBox txtGOGPath; + private System.Windows.Forms.Label lblGOGBrowse; } } \ No newline at end of file diff --git a/src/RetroGOG/frmDependencies.cs b/src/RetroGOG/frmDependencies.cs index 47015ed..22a51b1 100644 --- a/src/RetroGOG/frmDependencies.cs +++ b/src/RetroGOG/frmDependencies.cs @@ -53,6 +53,14 @@ private void frmDependencies_Load(object sender, EventArgs e) lblGOGStatus.Text = "GOG Galaxy 2.0 is installed in the default location."; GOGFound = true; } + else if (Directory.Exists(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) + "\\GOG.com\\Galaxy\\plugins\\installed")) + { + imgGOGStatus.Image = Properties.Resources.warn; + lblGOGStatus.Text = "GOG Galaxy 2.0 not found in the default location."; + lblGOGBrowse.Visible = true; + txtGOGPath.Visible = true; + btnGOGBrowse.Visible = true; + } else { imgGOGStatus.Image = Properties.Resources.no; @@ -96,6 +104,23 @@ private void tmrCheck_Tick(object sender, EventArgs e) } } + private void btnGOGBrowse_Click(object sender, EventArgs e) + { + OpenFileDialog browser = new OpenFileDialog(); + browser.Title = "Please select your GalaxyClient.exe file"; + browser.InitialDirectory = @"c:\"; + browser.Filter = "GOG Galaxy 2.0 Application|GalaxyClient.exe"; + browser.FilterIndex = 2; + browser.RestoreDirectory = true; + if (browser.ShowDialog() == DialogResult.OK) + { + txtGOGPath.Text = browser.FileName; + imgGOGStatus.Image = Properties.Resources.yes; + lblGOGStatus.Text = "GOG Galaxy 2.0 location has been entered by user."; + GOGFound = true; + } + } + private void btnRetroBrowse_Click(object sender, EventArgs e) { OpenFileDialog browser = new OpenFileDialog();