mirror of
https://github.com/psforever/GameLauncher.git
synced 2026-07-15 16:34:38 +00:00
Initial commit
This commit is contained in:
parent
b084826659
commit
837d87e323
18 changed files with 2313 additions and 0 deletions
108
.gitignore
vendored
Normal file
108
.gitignore
vendored
Normal file
|
|
@ -0,0 +1,108 @@
|
||||||
|
# Build Folders (you can keep bin if you'd like, to store dlls and pdbs)
|
||||||
|
[Bb]in/
|
||||||
|
[Oo]bj/
|
||||||
|
|
||||||
|
# mstest test results
|
||||||
|
TestResults
|
||||||
|
|
||||||
|
## Ignore Visual Studio temporary files, build results, and
|
||||||
|
## files generated by popular Visual Studio add-ons.
|
||||||
|
|
||||||
|
# User-specific files
|
||||||
|
*.suo
|
||||||
|
*.user
|
||||||
|
*.sln.docstates
|
||||||
|
|
||||||
|
# Build results
|
||||||
|
[Dd]ebug/
|
||||||
|
[Rr]elease/
|
||||||
|
x64/
|
||||||
|
*_i.c
|
||||||
|
*_p.c
|
||||||
|
*.ilk
|
||||||
|
*.meta
|
||||||
|
*.obj
|
||||||
|
*.pch
|
||||||
|
*.pdb
|
||||||
|
*.pgc
|
||||||
|
*.pgd
|
||||||
|
*.rsp
|
||||||
|
*.sbr
|
||||||
|
*.tlb
|
||||||
|
*.tli
|
||||||
|
*.tlh
|
||||||
|
*.tmp
|
||||||
|
*.log
|
||||||
|
*.vspscc
|
||||||
|
*.vssscc
|
||||||
|
.builds
|
||||||
|
|
||||||
|
# Visual C++ cache files
|
||||||
|
ipch/
|
||||||
|
*.aps
|
||||||
|
*.ncb
|
||||||
|
*.opensdf
|
||||||
|
*.sdf
|
||||||
|
|
||||||
|
# Visual Studio profiler
|
||||||
|
*.psess
|
||||||
|
*.vsp
|
||||||
|
*.vspx
|
||||||
|
|
||||||
|
# Guidance Automation Toolkit
|
||||||
|
*.gpState
|
||||||
|
|
||||||
|
# ReSharper is a .NET coding add-in
|
||||||
|
_ReSharper*
|
||||||
|
|
||||||
|
# NCrunch
|
||||||
|
*.ncrunch*
|
||||||
|
.*crunch*.local.xml
|
||||||
|
|
||||||
|
# Installshield output folder
|
||||||
|
[Ee]xpress
|
||||||
|
|
||||||
|
# DocProject is a documentation generator add-in
|
||||||
|
DocProject/buildhelp/
|
||||||
|
DocProject/Help/*.HxT
|
||||||
|
DocProject/Help/*.HxC
|
||||||
|
DocProject/Help/*.hhc
|
||||||
|
DocProject/Help/*.hhk
|
||||||
|
DocProject/Help/*.hhp
|
||||||
|
DocProject/Help/Html2
|
||||||
|
DocProject/Help/html
|
||||||
|
|
||||||
|
# Click-Once directory
|
||||||
|
publish
|
||||||
|
|
||||||
|
# Publish Web Output
|
||||||
|
*.Publish.xml
|
||||||
|
|
||||||
|
# NuGet Packages Directory
|
||||||
|
packages
|
||||||
|
|
||||||
|
# Windows Azure Build Output
|
||||||
|
csx
|
||||||
|
*.build.csdef
|
||||||
|
|
||||||
|
# Windows Store app package directory
|
||||||
|
AppPackages/
|
||||||
|
|
||||||
|
# Others
|
||||||
|
[Bb]in
|
||||||
|
[Oo]bj
|
||||||
|
sql
|
||||||
|
TestResults
|
||||||
|
[Tt]est[Rr]esult*
|
||||||
|
*.Cache
|
||||||
|
ClientBin
|
||||||
|
[Ss]tyle[Cc]op.*
|
||||||
|
~$*
|
||||||
|
*.dbmdl
|
||||||
|
Generated_Code #added for RIA/Silverlight projects
|
||||||
|
|
||||||
|
# Backup & report files from converting an old project file to a newer
|
||||||
|
# Visual Studio version. Backup files are not needed, because we have git ;-)
|
||||||
|
_UpgradeReport_Files/
|
||||||
|
Backup*/
|
||||||
|
UpgradeLog*.XML
|
||||||
BIN
Newtonsoft.Json.dll
Normal file
BIN
Newtonsoft.Json.dll
Normal file
Binary file not shown.
123
PS2ModLauncher/AboutBox1.Designer.cs
generated
Normal file
123
PS2ModLauncher/AboutBox1.Designer.cs
generated
Normal file
|
|
@ -0,0 +1,123 @@
|
||||||
|
namespace PSLauncher
|
||||||
|
{
|
||||||
|
partial class About
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Required designer variable.
|
||||||
|
/// </summary>
|
||||||
|
private System.ComponentModel.IContainer components = null;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Clean up any resources being used.
|
||||||
|
/// </summary>
|
||||||
|
protected override void Dispose(bool disposing)
|
||||||
|
{
|
||||||
|
if (disposing && (components != null))
|
||||||
|
{
|
||||||
|
components.Dispose();
|
||||||
|
}
|
||||||
|
base.Dispose(disposing);
|
||||||
|
}
|
||||||
|
|
||||||
|
#region Windows Form Designer generated code
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Required method for Designer support - do not modify
|
||||||
|
/// the contents of this method with the code editor.
|
||||||
|
/// </summary>
|
||||||
|
private void InitializeComponent()
|
||||||
|
{
|
||||||
|
this.okButton = new System.Windows.Forms.Button();
|
||||||
|
this.label1 = new System.Windows.Forms.Label();
|
||||||
|
this.label2 = new System.Windows.Forms.Label();
|
||||||
|
this.linkLabel1 = new System.Windows.Forms.LinkLabel();
|
||||||
|
this.appVersion = new System.Windows.Forms.Label();
|
||||||
|
this.SuspendLayout();
|
||||||
|
//
|
||||||
|
// okButton
|
||||||
|
//
|
||||||
|
this.okButton.Anchor = System.Windows.Forms.AnchorStyles.Bottom;
|
||||||
|
this.okButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||||
|
this.okButton.Location = new System.Drawing.Point(135, 107);
|
||||||
|
this.okButton.Name = "okButton";
|
||||||
|
this.okButton.Size = new System.Drawing.Size(75, 23);
|
||||||
|
this.okButton.TabIndex = 25;
|
||||||
|
this.okButton.Text = "&OK";
|
||||||
|
//
|
||||||
|
// label1
|
||||||
|
//
|
||||||
|
this.label1.Dock = System.Windows.Forms.DockStyle.Top;
|
||||||
|
this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||||
|
this.label1.ForeColor = System.Drawing.SystemColors.ControlText;
|
||||||
|
this.label1.Location = new System.Drawing.Point(9, 9);
|
||||||
|
this.label1.Name = "label1";
|
||||||
|
this.label1.Size = new System.Drawing.Size(328, 23);
|
||||||
|
this.label1.TabIndex = 26;
|
||||||
|
this.label1.Text = "PlanetSide 1 Launcher";
|
||||||
|
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||||
|
//
|
||||||
|
// label2
|
||||||
|
//
|
||||||
|
this.label2.Dock = System.Windows.Forms.DockStyle.Top;
|
||||||
|
this.label2.Location = new System.Drawing.Point(9, 32);
|
||||||
|
this.label2.Name = "label2";
|
||||||
|
this.label2.Size = new System.Drawing.Size(328, 23);
|
||||||
|
this.label2.TabIndex = 27;
|
||||||
|
this.label2.Text = "Designed by Chord for PSEmu";
|
||||||
|
this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||||
|
this.label2.Click += new System.EventHandler(this.label2_Click);
|
||||||
|
//
|
||||||
|
// linkLabel1
|
||||||
|
//
|
||||||
|
this.linkLabel1.Dock = System.Windows.Forms.DockStyle.Top;
|
||||||
|
this.linkLabel1.Location = new System.Drawing.Point(9, 55);
|
||||||
|
this.linkLabel1.Name = "linkLabel1";
|
||||||
|
this.linkLabel1.Size = new System.Drawing.Size(328, 22);
|
||||||
|
this.linkLabel1.TabIndex = 28;
|
||||||
|
this.linkLabel1.TabStop = true;
|
||||||
|
this.linkLabel1.Text = "http://www.planetside-universe.com/showthread.php?p=961247";
|
||||||
|
this.linkLabel1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||||
|
this.linkLabel1.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel1_LinkClicked);
|
||||||
|
//
|
||||||
|
// appVersion
|
||||||
|
//
|
||||||
|
this.appVersion.Dock = System.Windows.Forms.DockStyle.Top;
|
||||||
|
this.appVersion.Location = new System.Drawing.Point(9, 77);
|
||||||
|
this.appVersion.Name = "appVersion";
|
||||||
|
this.appVersion.Size = new System.Drawing.Size(328, 27);
|
||||||
|
this.appVersion.TabIndex = 29;
|
||||||
|
this.appVersion.Text = "label3";
|
||||||
|
this.appVersion.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||||
|
//
|
||||||
|
// About
|
||||||
|
//
|
||||||
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
this.ClientSize = new System.Drawing.Size(346, 142);
|
||||||
|
this.Controls.Add(this.appVersion);
|
||||||
|
this.Controls.Add(this.linkLabel1);
|
||||||
|
this.Controls.Add(this.label2);
|
||||||
|
this.Controls.Add(this.label1);
|
||||||
|
this.Controls.Add(this.okButton);
|
||||||
|
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
|
||||||
|
this.MaximizeBox = false;
|
||||||
|
this.MinimizeBox = false;
|
||||||
|
this.Name = "About";
|
||||||
|
this.Padding = new System.Windows.Forms.Padding(9);
|
||||||
|
this.ShowIcon = false;
|
||||||
|
this.ShowInTaskbar = false;
|
||||||
|
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||||
|
this.Text = "AboutBox1";
|
||||||
|
this.ResumeLayout(false);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
private System.Windows.Forms.Button okButton;
|
||||||
|
private System.Windows.Forms.Label label1;
|
||||||
|
private System.Windows.Forms.Label label2;
|
||||||
|
private System.Windows.Forms.LinkLabel linkLabel1;
|
||||||
|
private System.Windows.Forms.Label appVersion;
|
||||||
|
}
|
||||||
|
}
|
||||||
35
PS2ModLauncher/AboutBox1.cs
Normal file
35
PS2ModLauncher/AboutBox1.cs
Normal file
|
|
@ -0,0 +1,35 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Reflection;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
namespace PSLauncher
|
||||||
|
{
|
||||||
|
partial class About : Form
|
||||||
|
{
|
||||||
|
public About()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
|
||||||
|
System.Reflection.Assembly assembly = System.Reflection.Assembly.GetExecutingAssembly();
|
||||||
|
FileVersionInfo fvi = FileVersionInfo.GetVersionInfo(assembly.Location);
|
||||||
|
string version = fvi.FileVersion;
|
||||||
|
|
||||||
|
appVersion.Text = "Version " + version;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
|
||||||
|
{
|
||||||
|
System.Diagnostics.Process.Start(linkLabel1.Text);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void label2_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
120
PS2ModLauncher/AboutBox1.resx
Normal file
120
PS2ModLauncher/AboutBox1.resx
Normal file
|
|
@ -0,0 +1,120 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
</root>
|
||||||
394
PS2ModLauncher/LauncherForm.Designer.cs
generated
Normal file
394
PS2ModLauncher/LauncherForm.Designer.cs
generated
Normal file
|
|
@ -0,0 +1,394 @@
|
||||||
|
namespace PSLauncher
|
||||||
|
{
|
||||||
|
partial class LauncherForm
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Required designer variable.
|
||||||
|
/// </summary>
|
||||||
|
private System.ComponentModel.IContainer components = null;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Clean up any resources being used.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||||
|
protected override void Dispose(bool disposing)
|
||||||
|
{
|
||||||
|
if (disposing && (components != null))
|
||||||
|
{
|
||||||
|
components.Dispose();
|
||||||
|
}
|
||||||
|
base.Dispose(disposing);
|
||||||
|
}
|
||||||
|
|
||||||
|
#region Windows Form Designer generated code
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Required method for Designer support - do not modify
|
||||||
|
/// the contents of this method with the code editor.
|
||||||
|
/// </summary>
|
||||||
|
private void InitializeComponent()
|
||||||
|
{
|
||||||
|
this.components = new System.ComponentModel.Container();
|
||||||
|
this.findPTRDirDialogue = new System.Windows.Forms.FolderBrowserDialog();
|
||||||
|
this.savePackDialogue = new System.Windows.Forms.SaveFileDialog();
|
||||||
|
this.selectFileForPack = new System.Windows.Forms.OpenFileDialog();
|
||||||
|
this.directorySearcher1 = new System.DirectoryServices.DirectorySearcher();
|
||||||
|
this.tabPage1 = new System.Windows.Forms.TabPage();
|
||||||
|
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
|
||||||
|
this.planetsideVersion = new System.Windows.Forms.Label();
|
||||||
|
this.skipLauncher = new System.Windows.Forms.CheckBox();
|
||||||
|
this.launchMessage = new System.Windows.Forms.Label();
|
||||||
|
this.passwordLabel = new System.Windows.Forms.Label();
|
||||||
|
this.usernameLabel = new System.Windows.Forms.Label();
|
||||||
|
this.password = new System.Windows.Forms.TextBox();
|
||||||
|
this.username = new System.Windows.Forms.TextBox();
|
||||||
|
this.launchProgress = new System.Windows.Forms.ProgressBar();
|
||||||
|
this.loggingCheckBox = new System.Windows.Forms.CheckBox();
|
||||||
|
this.label10 = new System.Windows.Forms.Label();
|
||||||
|
this.launchArgs = new System.Windows.Forms.TextBox();
|
||||||
|
this.label2 = new System.Windows.Forms.Label();
|
||||||
|
this.launchGame = new System.Windows.Forms.Button();
|
||||||
|
this.selectDirectory = new System.Windows.Forms.Button();
|
||||||
|
this.planetside2PathTextField = new System.Windows.Forms.TextBox();
|
||||||
|
this.ps_consoleOutput = new System.Windows.Forms.TextBox();
|
||||||
|
this.tabControl1 = new System.Windows.Forms.TabControl();
|
||||||
|
this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
|
||||||
|
this.aboutToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
|
this.menuStrip1 = new System.Windows.Forms.MenuStrip();
|
||||||
|
this.aboutToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
|
this.tabPage1.SuspendLayout();
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
|
||||||
|
this.splitContainer1.Panel1.SuspendLayout();
|
||||||
|
this.splitContainer1.Panel2.SuspendLayout();
|
||||||
|
this.splitContainer1.SuspendLayout();
|
||||||
|
this.tabControl1.SuspendLayout();
|
||||||
|
this.contextMenuStrip1.SuspendLayout();
|
||||||
|
this.menuStrip1.SuspendLayout();
|
||||||
|
this.SuspendLayout();
|
||||||
|
//
|
||||||
|
// findPTRDirDialogue
|
||||||
|
//
|
||||||
|
this.findPTRDirDialogue.HelpRequest += new System.EventHandler(this.folderBrowserDialog1_HelpRequest);
|
||||||
|
//
|
||||||
|
// savePackDialogue
|
||||||
|
//
|
||||||
|
this.savePackDialogue.FileName = "Assets_256";
|
||||||
|
this.savePackDialogue.Filter = "Pack Files (*.pack)|*.pack";
|
||||||
|
//
|
||||||
|
// selectFileForPack
|
||||||
|
//
|
||||||
|
this.selectFileForPack.FileName = "openFileDialog1";
|
||||||
|
this.selectFileForPack.Multiselect = true;
|
||||||
|
//
|
||||||
|
// directorySearcher1
|
||||||
|
//
|
||||||
|
this.directorySearcher1.ClientTimeout = System.TimeSpan.Parse("-00:00:01");
|
||||||
|
this.directorySearcher1.ServerPageTimeLimit = System.TimeSpan.Parse("-00:00:01");
|
||||||
|
this.directorySearcher1.ServerTimeLimit = System.TimeSpan.Parse("-00:00:01");
|
||||||
|
//
|
||||||
|
// tabPage1
|
||||||
|
//
|
||||||
|
this.tabPage1.Controls.Add(this.splitContainer1);
|
||||||
|
this.tabPage1.Location = new System.Drawing.Point(4, 22);
|
||||||
|
this.tabPage1.Name = "tabPage1";
|
||||||
|
this.tabPage1.Padding = new System.Windows.Forms.Padding(3);
|
||||||
|
this.tabPage1.Size = new System.Drawing.Size(627, 285);
|
||||||
|
this.tabPage1.TabIndex = 0;
|
||||||
|
this.tabPage1.Text = "Launcher";
|
||||||
|
this.tabPage1.UseVisualStyleBackColor = true;
|
||||||
|
//
|
||||||
|
// splitContainer1
|
||||||
|
//
|
||||||
|
this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.splitContainer1.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;
|
||||||
|
this.splitContainer1.Location = new System.Drawing.Point(3, 3);
|
||||||
|
this.splitContainer1.Name = "splitContainer1";
|
||||||
|
this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal;
|
||||||
|
//
|
||||||
|
// splitContainer1.Panel1
|
||||||
|
//
|
||||||
|
this.splitContainer1.Panel1.Controls.Add(this.planetsideVersion);
|
||||||
|
this.splitContainer1.Panel1.Controls.Add(this.skipLauncher);
|
||||||
|
this.splitContainer1.Panel1.Controls.Add(this.launchMessage);
|
||||||
|
this.splitContainer1.Panel1.Controls.Add(this.passwordLabel);
|
||||||
|
this.splitContainer1.Panel1.Controls.Add(this.usernameLabel);
|
||||||
|
this.splitContainer1.Panel1.Controls.Add(this.password);
|
||||||
|
this.splitContainer1.Panel1.Controls.Add(this.username);
|
||||||
|
this.splitContainer1.Panel1.Controls.Add(this.launchProgress);
|
||||||
|
this.splitContainer1.Panel1.Controls.Add(this.loggingCheckBox);
|
||||||
|
this.splitContainer1.Panel1.Controls.Add(this.label10);
|
||||||
|
this.splitContainer1.Panel1.Controls.Add(this.launchArgs);
|
||||||
|
this.splitContainer1.Panel1.Controls.Add(this.label2);
|
||||||
|
this.splitContainer1.Panel1.Controls.Add(this.launchGame);
|
||||||
|
this.splitContainer1.Panel1.Controls.Add(this.selectDirectory);
|
||||||
|
this.splitContainer1.Panel1.Controls.Add(this.planetside2PathTextField);
|
||||||
|
this.splitContainer1.Panel1MinSize = 130;
|
||||||
|
//
|
||||||
|
// splitContainer1.Panel2
|
||||||
|
//
|
||||||
|
this.splitContainer1.Panel2.Controls.Add(this.ps_consoleOutput);
|
||||||
|
this.splitContainer1.Size = new System.Drawing.Size(621, 279);
|
||||||
|
this.splitContainer1.SplitterDistance = 150;
|
||||||
|
this.splitContainer1.TabIndex = 0;
|
||||||
|
//
|
||||||
|
// planetsideVersion
|
||||||
|
//
|
||||||
|
this.planetsideVersion.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||||
|
this.planetsideVersion.Location = new System.Drawing.Point(477, 54);
|
||||||
|
this.planetsideVersion.Name = "planetsideVersion";
|
||||||
|
this.planetsideVersion.Size = new System.Drawing.Size(132, 21);
|
||||||
|
this.planetsideVersion.TabIndex = 24;
|
||||||
|
//
|
||||||
|
// skipLauncher
|
||||||
|
//
|
||||||
|
this.skipLauncher.AutoSize = true;
|
||||||
|
this.skipLauncher.Location = new System.Drawing.Point(204, 23);
|
||||||
|
this.skipLauncher.Name = "skipLauncher";
|
||||||
|
this.skipLauncher.Size = new System.Drawing.Size(95, 17);
|
||||||
|
this.skipLauncher.TabIndex = 23;
|
||||||
|
this.skipLauncher.Text = "Skip Launcher";
|
||||||
|
this.skipLauncher.UseVisualStyleBackColor = true;
|
||||||
|
this.skipLauncher.CheckedChanged += new System.EventHandler(this.skipLauncher_CheckedChanged);
|
||||||
|
//
|
||||||
|
// launchMessage
|
||||||
|
//
|
||||||
|
this.launchMessage.ForeColor = System.Drawing.Color.Red;
|
||||||
|
this.launchMessage.Location = new System.Drawing.Point(7, 107);
|
||||||
|
this.launchMessage.Name = "launchMessage";
|
||||||
|
this.launchMessage.Size = new System.Drawing.Size(247, 27);
|
||||||
|
this.launchMessage.TabIndex = 22;
|
||||||
|
this.launchMessage.Text = "label1";
|
||||||
|
this.launchMessage.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||||
|
this.launchMessage.Visible = false;
|
||||||
|
//
|
||||||
|
// passwordLabel
|
||||||
|
//
|
||||||
|
this.passwordLabel.AutoSize = true;
|
||||||
|
this.passwordLabel.Location = new System.Drawing.Point(7, 59);
|
||||||
|
this.passwordLabel.Name = "passwordLabel";
|
||||||
|
this.passwordLabel.Size = new System.Drawing.Size(53, 13);
|
||||||
|
this.passwordLabel.TabIndex = 21;
|
||||||
|
this.passwordLabel.Text = "Password";
|
||||||
|
//
|
||||||
|
// usernameLabel
|
||||||
|
//
|
||||||
|
this.usernameLabel.AutoSize = true;
|
||||||
|
this.usernameLabel.Location = new System.Drawing.Point(5, 28);
|
||||||
|
this.usernameLabel.Name = "usernameLabel";
|
||||||
|
this.usernameLabel.Size = new System.Drawing.Size(55, 13);
|
||||||
|
this.usernameLabel.TabIndex = 20;
|
||||||
|
this.usernameLabel.Text = "Username";
|
||||||
|
//
|
||||||
|
// password
|
||||||
|
//
|
||||||
|
this.password.ImeMode = System.Windows.Forms.ImeMode.NoControl;
|
||||||
|
this.password.Location = new System.Drawing.Point(66, 55);
|
||||||
|
this.password.Name = "password";
|
||||||
|
this.password.Size = new System.Drawing.Size(123, 20);
|
||||||
|
this.password.TabIndex = 19;
|
||||||
|
this.password.UseSystemPasswordChar = true;
|
||||||
|
//
|
||||||
|
// username
|
||||||
|
//
|
||||||
|
this.username.Location = new System.Drawing.Point(66, 25);
|
||||||
|
this.username.Name = "username";
|
||||||
|
this.username.Size = new System.Drawing.Size(123, 20);
|
||||||
|
this.username.TabIndex = 18;
|
||||||
|
//
|
||||||
|
// launchProgress
|
||||||
|
//
|
||||||
|
this.launchProgress.Dock = System.Windows.Forms.DockStyle.Bottom;
|
||||||
|
this.launchProgress.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(0)))));
|
||||||
|
this.launchProgress.Location = new System.Drawing.Point(0, 137);
|
||||||
|
this.launchProgress.Name = "launchProgress";
|
||||||
|
this.launchProgress.Size = new System.Drawing.Size(621, 13);
|
||||||
|
this.launchProgress.TabIndex = 16;
|
||||||
|
this.launchProgress.Tag = "";
|
||||||
|
this.launchProgress.UseWaitCursor = true;
|
||||||
|
//
|
||||||
|
// loggingCheckBox
|
||||||
|
//
|
||||||
|
this.loggingCheckBox.AutoSize = true;
|
||||||
|
this.loggingCheckBox.Location = new System.Drawing.Point(204, 46);
|
||||||
|
this.loggingCheckBox.Name = "loggingCheckBox";
|
||||||
|
this.loggingCheckBox.Size = new System.Drawing.Size(64, 17);
|
||||||
|
this.loggingCheckBox.TabIndex = 15;
|
||||||
|
this.loggingCheckBox.Text = "Logging";
|
||||||
|
this.loggingCheckBox.UseVisualStyleBackColor = true;
|
||||||
|
this.loggingCheckBox.Visible = false;
|
||||||
|
this.loggingCheckBox.CheckedChanged += new System.EventHandler(this.loggingCheckBox_CheckedChanged);
|
||||||
|
//
|
||||||
|
// label10
|
||||||
|
//
|
||||||
|
this.label10.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||||
|
this.label10.AutoSize = true;
|
||||||
|
this.label10.Location = new System.Drawing.Point(384, 86);
|
||||||
|
this.label10.Name = "label10";
|
||||||
|
this.label10.Size = new System.Drawing.Size(158, 13);
|
||||||
|
this.label10.TabIndex = 14;
|
||||||
|
this.label10.Text = "Additional command line options";
|
||||||
|
//
|
||||||
|
// launchArgs
|
||||||
|
//
|
||||||
|
this.launchArgs.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||||
|
this.launchArgs.Location = new System.Drawing.Point(387, 102);
|
||||||
|
this.launchArgs.Name = "launchArgs";
|
||||||
|
this.launchArgs.Size = new System.Drawing.Size(222, 20);
|
||||||
|
this.launchArgs.TabIndex = 13;
|
||||||
|
//
|
||||||
|
// label2
|
||||||
|
//
|
||||||
|
this.label2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||||
|
this.label2.AutoSize = true;
|
||||||
|
this.label2.Location = new System.Drawing.Point(384, 7);
|
||||||
|
this.label2.Name = "label2";
|
||||||
|
this.label2.Size = new System.Drawing.Size(90, 13);
|
||||||
|
this.label2.TabIndex = 7;
|
||||||
|
this.label2.Text = "PlanetSide Folder";
|
||||||
|
//
|
||||||
|
// launchGame
|
||||||
|
//
|
||||||
|
this.launchGame.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(255)))), ((int)(((byte)(128)))));
|
||||||
|
this.launchGame.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||||
|
this.launchGame.Location = new System.Drawing.Point(66, 81);
|
||||||
|
this.launchGame.Name = "launchGame";
|
||||||
|
this.launchGame.Size = new System.Drawing.Size(123, 23);
|
||||||
|
this.launchGame.TabIndex = 6;
|
||||||
|
this.launchGame.Text = "Launch";
|
||||||
|
this.launchGame.UseVisualStyleBackColor = false;
|
||||||
|
this.launchGame.Click += new System.EventHandler(this.button2_Click);
|
||||||
|
//
|
||||||
|
// selectDirectory
|
||||||
|
//
|
||||||
|
this.selectDirectory.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||||
|
this.selectDirectory.Location = new System.Drawing.Point(387, 49);
|
||||||
|
this.selectDirectory.Name = "selectDirectory";
|
||||||
|
this.selectDirectory.Size = new System.Drawing.Size(75, 23);
|
||||||
|
this.selectDirectory.TabIndex = 2;
|
||||||
|
this.selectDirectory.Text = "Choose";
|
||||||
|
this.selectDirectory.UseVisualStyleBackColor = true;
|
||||||
|
this.selectDirectory.Click += new System.EventHandler(this.button1_Click);
|
||||||
|
//
|
||||||
|
// planetside2PathTextField
|
||||||
|
//
|
||||||
|
this.planetside2PathTextField.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||||
|
this.planetside2PathTextField.Location = new System.Drawing.Point(387, 23);
|
||||||
|
this.planetside2PathTextField.Name = "planetside2PathTextField";
|
||||||
|
this.planetside2PathTextField.ReadOnly = true;
|
||||||
|
this.planetside2PathTextField.Size = new System.Drawing.Size(222, 20);
|
||||||
|
this.planetside2PathTextField.TabIndex = 1;
|
||||||
|
this.planetside2PathTextField.Text = "Path to PlanetSide folder";
|
||||||
|
this.planetside2PathTextField.Click += new System.EventHandler(this.button1_Click);
|
||||||
|
//
|
||||||
|
// ps_consoleOutput
|
||||||
|
//
|
||||||
|
this.ps_consoleOutput.BackColor = System.Drawing.Color.WhiteSmoke;
|
||||||
|
this.ps_consoleOutput.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.ps_consoleOutput.Location = new System.Drawing.Point(0, 0);
|
||||||
|
this.ps_consoleOutput.Multiline = true;
|
||||||
|
this.ps_consoleOutput.Name = "ps_consoleOutput";
|
||||||
|
this.ps_consoleOutput.ReadOnly = true;
|
||||||
|
this.ps_consoleOutput.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
|
||||||
|
this.ps_consoleOutput.Size = new System.Drawing.Size(621, 125);
|
||||||
|
this.ps_consoleOutput.TabIndex = 1;
|
||||||
|
//
|
||||||
|
// tabControl1
|
||||||
|
//
|
||||||
|
this.tabControl1.Controls.Add(this.tabPage1);
|
||||||
|
this.tabControl1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.tabControl1.Location = new System.Drawing.Point(0, 0);
|
||||||
|
this.tabControl1.Name = "tabControl1";
|
||||||
|
this.tabControl1.SelectedIndex = 0;
|
||||||
|
this.tabControl1.Size = new System.Drawing.Size(635, 311);
|
||||||
|
this.tabControl1.TabIndex = 1;
|
||||||
|
//
|
||||||
|
// contextMenuStrip1
|
||||||
|
//
|
||||||
|
this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||||
|
this.aboutToolStripMenuItem});
|
||||||
|
this.contextMenuStrip1.Name = "contextMenuStrip1";
|
||||||
|
this.contextMenuStrip1.Size = new System.Drawing.Size(108, 26);
|
||||||
|
//
|
||||||
|
// aboutToolStripMenuItem
|
||||||
|
//
|
||||||
|
this.aboutToolStripMenuItem.Name = "aboutToolStripMenuItem";
|
||||||
|
this.aboutToolStripMenuItem.Size = new System.Drawing.Size(107, 22);
|
||||||
|
this.aboutToolStripMenuItem.Text = "About";
|
||||||
|
//
|
||||||
|
// menuStrip1
|
||||||
|
//
|
||||||
|
this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||||
|
this.aboutToolStripMenuItem1});
|
||||||
|
this.menuStrip1.Location = new System.Drawing.Point(0, 0);
|
||||||
|
this.menuStrip1.Name = "menuStrip1";
|
||||||
|
this.menuStrip1.Size = new System.Drawing.Size(635, 24);
|
||||||
|
this.menuStrip1.TabIndex = 2;
|
||||||
|
this.menuStrip1.Text = "menuStrip1";
|
||||||
|
//
|
||||||
|
// aboutToolStripMenuItem1
|
||||||
|
//
|
||||||
|
this.aboutToolStripMenuItem1.Name = "aboutToolStripMenuItem1";
|
||||||
|
this.aboutToolStripMenuItem1.Size = new System.Drawing.Size(52, 20);
|
||||||
|
this.aboutToolStripMenuItem1.Text = "About";
|
||||||
|
this.aboutToolStripMenuItem1.Click += new System.EventHandler(this.aboutToolStripMenuItem1_Click);
|
||||||
|
//
|
||||||
|
// LauncherForm
|
||||||
|
//
|
||||||
|
this.AcceptButton = this.launchGame;
|
||||||
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
this.ClientSize = new System.Drawing.Size(635, 311);
|
||||||
|
this.Controls.Add(this.menuStrip1);
|
||||||
|
this.Controls.Add(this.tabControl1);
|
||||||
|
this.MainMenuStrip = this.menuStrip1;
|
||||||
|
this.MinimumSize = new System.Drawing.Size(600, 350);
|
||||||
|
this.Name = "LauncherForm";
|
||||||
|
this.Text = "Planetside 1 Launcher";
|
||||||
|
this.Load += new System.EventHandler(this.Form1_Load);
|
||||||
|
this.tabPage1.ResumeLayout(false);
|
||||||
|
this.splitContainer1.Panel1.ResumeLayout(false);
|
||||||
|
this.splitContainer1.Panel1.PerformLayout();
|
||||||
|
this.splitContainer1.Panel2.ResumeLayout(false);
|
||||||
|
this.splitContainer1.Panel2.PerformLayout();
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
|
||||||
|
this.splitContainer1.ResumeLayout(false);
|
||||||
|
this.tabControl1.ResumeLayout(false);
|
||||||
|
this.contextMenuStrip1.ResumeLayout(false);
|
||||||
|
this.menuStrip1.ResumeLayout(false);
|
||||||
|
this.menuStrip1.PerformLayout();
|
||||||
|
this.ResumeLayout(false);
|
||||||
|
this.PerformLayout();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
private System.Windows.Forms.FolderBrowserDialog findPTRDirDialogue;
|
||||||
|
private System.Windows.Forms.SaveFileDialog savePackDialogue;
|
||||||
|
private System.Windows.Forms.OpenFileDialog selectFileForPack;
|
||||||
|
private System.DirectoryServices.DirectorySearcher directorySearcher1;
|
||||||
|
private System.Windows.Forms.TabPage tabPage1;
|
||||||
|
private System.Windows.Forms.SplitContainer splitContainer1;
|
||||||
|
private System.Windows.Forms.CheckBox loggingCheckBox;
|
||||||
|
private System.Windows.Forms.Label label10;
|
||||||
|
private System.Windows.Forms.TextBox launchArgs;
|
||||||
|
private System.Windows.Forms.Label label2;
|
||||||
|
private System.Windows.Forms.Button launchGame;
|
||||||
|
private System.Windows.Forms.Button selectDirectory;
|
||||||
|
private System.Windows.Forms.TextBox planetside2PathTextField;
|
||||||
|
private System.Windows.Forms.TabControl tabControl1;
|
||||||
|
private System.Windows.Forms.ContextMenuStrip contextMenuStrip1;
|
||||||
|
private System.Windows.Forms.Label usernameLabel;
|
||||||
|
private System.Windows.Forms.TextBox password;
|
||||||
|
private System.Windows.Forms.TextBox username;
|
||||||
|
private System.Windows.Forms.ProgressBar launchProgress;
|
||||||
|
private System.Windows.Forms.TextBox ps_consoleOutput;
|
||||||
|
private System.Windows.Forms.Label passwordLabel;
|
||||||
|
private System.Windows.Forms.ToolStripMenuItem aboutToolStripMenuItem;
|
||||||
|
private System.Windows.Forms.MenuStrip menuStrip1;
|
||||||
|
private System.Windows.Forms.ToolStripMenuItem aboutToolStripMenuItem1;
|
||||||
|
private System.Windows.Forms.Label launchMessage;
|
||||||
|
private System.Windows.Forms.CheckBox skipLauncher;
|
||||||
|
private System.Windows.Forms.Label planetsideVersion;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
715
PS2ModLauncher/LauncherForm.cs
Normal file
715
PS2ModLauncher/LauncherForm.cs
Normal file
|
|
@ -0,0 +1,715 @@
|
||||||
|
using Microsoft.Win32;
|
||||||
|
using Newtonsoft.Json.Linq;
|
||||||
|
using PSLauncher.Properties;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Collections.Specialized;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using System.IO;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Net;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
namespace PSLauncher
|
||||||
|
{
|
||||||
|
|
||||||
|
public enum LaunchDomain
|
||||||
|
{
|
||||||
|
Live
|
||||||
|
}
|
||||||
|
|
||||||
|
public partial class LauncherForm : Form
|
||||||
|
{
|
||||||
|
Process psProcess;
|
||||||
|
string USER_AGENT = "Mozilla/5.0 (Windows NT 6.1; rv:31.0) Gecko/20100101 Firefox/31.0";
|
||||||
|
static string PS_EXE_NAME = "planetside.exe";
|
||||||
|
int DEFAULT_WEB_TIMEOUT = 5000;
|
||||||
|
string planetsidePath = "";
|
||||||
|
bool planetsidePathValid = false;
|
||||||
|
|
||||||
|
LaunchDomain domain = LaunchDomain.Live;
|
||||||
|
|
||||||
|
Dictionary<LaunchDomain, string> domains = new Dictionary<LaunchDomain, string>()
|
||||||
|
{
|
||||||
|
{ LaunchDomain.Live, "https://lp.soe.com/ps/live" }
|
||||||
|
};
|
||||||
|
|
||||||
|
public LauncherForm()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
|
||||||
|
string psDefault = getDefaultDirectory();
|
||||||
|
|
||||||
|
// first run with no settings or invalid starting path
|
||||||
|
if (Settings.Default.PSPath == "" || !checkDirForPlanetSide(Settings.Default.PSPath))
|
||||||
|
{
|
||||||
|
// try setting the path. It may not be right, but this initializes state
|
||||||
|
setPlanetSidePath(Path.Combine(psDefault, PS_EXE_NAME), false);
|
||||||
|
Settings.Default.PSPath = psDefault;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
setPlanetSidePath(Path.Combine(Settings.Default.PSPath, PS_EXE_NAME), false);
|
||||||
|
}
|
||||||
|
|
||||||
|
planetside2PathTextField.Text = Settings.Default.PSPath;
|
||||||
|
launchArgs.Text = Settings.Default.ExtraArgs;
|
||||||
|
loggingCheckBox.Checked = Settings.Default.Logging;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void button1_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
// set the starting path for the dialog
|
||||||
|
if (planetside2PathTextField.Text != "")
|
||||||
|
findPTRDirDialogue.SelectedPath = planetside2PathTextField.Text;
|
||||||
|
|
||||||
|
DialogResult r = findPTRDirDialogue.ShowDialog();
|
||||||
|
|
||||||
|
if (r == DialogResult.OK)
|
||||||
|
{
|
||||||
|
// combine the folder name with the standard PS.exe name
|
||||||
|
string psPath = Path.Combine(findPTRDirDialogue.SelectedPath, PS_EXE_NAME);
|
||||||
|
|
||||||
|
planetside2PathTextField.Text = findPTRDirDialogue.SelectedPath;
|
||||||
|
setPlanetSidePath(psPath);
|
||||||
|
|
||||||
|
Settings.Default.PSPath = findPTRDirDialogue.SelectedPath;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private bool setPlanetSidePath(string path, bool alert = true)
|
||||||
|
{
|
||||||
|
planetsidePath = path;
|
||||||
|
planetsidePathValid = false;
|
||||||
|
|
||||||
|
if(!File.Exists(path))
|
||||||
|
{
|
||||||
|
planetsideVersion.Text = "Not found";
|
||||||
|
planetsideVersion.ForeColor = System.Drawing.Color.Red;
|
||||||
|
|
||||||
|
if(alert)
|
||||||
|
MessageBox.Show("Cannot open " + PS_EXE_NAME + " (check the selected directory)",
|
||||||
|
"Cannot Find Executable", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||||
|
return planetsidePathValid;
|
||||||
|
}
|
||||||
|
|
||||||
|
var versionInfo = FileVersionInfo.GetVersionInfo(path);
|
||||||
|
|
||||||
|
planetsidePathValid = true;
|
||||||
|
|
||||||
|
if (versionInfo.FileVersion != "")
|
||||||
|
{
|
||||||
|
planetsideVersion.Text = "Version " + versionInfo.FileVersion;
|
||||||
|
planetsideVersion.ForeColor = System.Drawing.Color.Green;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
planetsideVersion.Text = "Unknown version";
|
||||||
|
planetsideVersion.ForeColor = System.Drawing.Color.Yellow;
|
||||||
|
}
|
||||||
|
|
||||||
|
return planetsidePathValid;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void folderBrowserDialog1_HelpRequest(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void stopLaunching()
|
||||||
|
{
|
||||||
|
if (this.InvokeRequired)
|
||||||
|
{
|
||||||
|
this.Invoke((MethodInvoker)delegate
|
||||||
|
{
|
||||||
|
this.launchGame.Enabled = true;
|
||||||
|
this.launchGame.Text = "Launch";
|
||||||
|
});
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
this.launchGame.Enabled = true;
|
||||||
|
this.launchGame.Text = "Launch";
|
||||||
|
}
|
||||||
|
|
||||||
|
setProgress(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void startLaunching()
|
||||||
|
{
|
||||||
|
if (this.InvokeRequired)
|
||||||
|
{
|
||||||
|
this.Invoke((MethodInvoker)delegate
|
||||||
|
{
|
||||||
|
this.launchGame.Enabled = false;
|
||||||
|
this.launchGame.Text = "Launching...";
|
||||||
|
setProgress(0);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
this.launchGame.Enabled = false;
|
||||||
|
this.launchGame.Text = "Launching...";
|
||||||
|
setProgress(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void setProgress(int prog)
|
||||||
|
{
|
||||||
|
if (this.InvokeRequired)
|
||||||
|
{
|
||||||
|
this.Invoke((MethodInvoker)delegate
|
||||||
|
{
|
||||||
|
this.launchProgress.Value = prog;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
this.launchProgress.Value = prog;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void setErrorMessage(string error)
|
||||||
|
{
|
||||||
|
if (this.InvokeRequired)
|
||||||
|
{
|
||||||
|
this.Invoke((MethodInvoker)delegate
|
||||||
|
{
|
||||||
|
if (error == "")
|
||||||
|
{
|
||||||
|
this.launchMessage.Visible = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.launchMessage.Visible = true;
|
||||||
|
this.launchMessage.Text = error;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (error == "")
|
||||||
|
{
|
||||||
|
this.launchMessage.Visible = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.launchMessage.Visible = true;
|
||||||
|
this.launchMessage.Text = error;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void button2_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
startLaunching();
|
||||||
|
setErrorMessage("");
|
||||||
|
|
||||||
|
string path = planetside2PathTextField.Text;
|
||||||
|
string psExe = Path.Combine(path, PS_EXE_NAME);
|
||||||
|
|
||||||
|
if (!skipLauncher.Checked && (username.Text == String.Empty || password.Text == String.Empty))
|
||||||
|
{
|
||||||
|
setErrorMessage("Username or password blank");
|
||||||
|
stopLaunching();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!planetsidePathValid)
|
||||||
|
{
|
||||||
|
setErrorMessage("Invalid planetside exe");
|
||||||
|
stopLaunching();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (String.IsNullOrWhiteSpace(launchArgs.Text))
|
||||||
|
launchArgs.Text = "";
|
||||||
|
|
||||||
|
//And the extra launch args
|
||||||
|
if (Settings.Default.ExtraArgs != launchArgs.Text)
|
||||||
|
{
|
||||||
|
Settings.Default.ExtraArgs = this.launchArgs.Text;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (skipLauncher.Checked)
|
||||||
|
{
|
||||||
|
// magic string to login to planetside from the actual game
|
||||||
|
startPlanetSide(planetsidePath, Path.GetDirectoryName(planetsidePath), "/K:StagingTest " + launchArgs.Text);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Thread worker = new Thread(this.doLogin);
|
||||||
|
worker.Start();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void doLogin()
|
||||||
|
{
|
||||||
|
long ts = (long)(DateTime.UtcNow.Subtract(new DateTime(1970, 1, 1))).TotalSeconds;
|
||||||
|
|
||||||
|
string path = planetside2PathTextField.Text;
|
||||||
|
string psExe = Path.Combine(path, PS_EXE_NAME);
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////
|
||||||
|
// Step 1: Establish Session ID
|
||||||
|
/////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
String endpoint = domains[domain];
|
||||||
|
CookieContainer reqCookies = new CookieContainer();
|
||||||
|
HttpWebRequest req = WebRequest.Create(endpoint + "/?t=43323") as HttpWebRequest;
|
||||||
|
req.CookieContainer = reqCookies;
|
||||||
|
req.CookieContainer.MaxCookieSize = 4000;
|
||||||
|
req.Method = "GET";
|
||||||
|
req.UserAgent = USER_AGENT;
|
||||||
|
req.Timeout = DEFAULT_WEB_TIMEOUT;
|
||||||
|
|
||||||
|
HttpWebResponse r;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
r = req.GetResponse() as HttpWebResponse;
|
||||||
|
}
|
||||||
|
catch (WebException x)
|
||||||
|
{
|
||||||
|
addLine("Failed to gather initial session: " + x.Message);
|
||||||
|
stopLaunching();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Note: we must manually add secure cookies and CookieContainer is crap
|
||||||
|
// See http://thomaskrehbiel.com/post/1690-cookiecontainer_httpwebrequest_and_secure_cookies/
|
||||||
|
|
||||||
|
reqCookies.Add(new Uri(endpoint), r.Cookies);
|
||||||
|
|
||||||
|
addLine("PSWeb: session started");
|
||||||
|
r.Close();
|
||||||
|
setProgress(25);
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////
|
||||||
|
// Step 2: Try logging in
|
||||||
|
/////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
req = WebRequest.Create(endpoint + "/login?t=43323") as HttpWebRequest;
|
||||||
|
req.CookieContainer = reqCookies;
|
||||||
|
req.Method = "POST";
|
||||||
|
req.UserAgent = USER_AGENT;
|
||||||
|
req.Timeout = DEFAULT_WEB_TIMEOUT;
|
||||||
|
req.Headers.Add("X-Requested-With", "XMLHttpRequest");
|
||||||
|
req.Headers.Add("Origin", "https://lp.soe.com");
|
||||||
|
|
||||||
|
req.ContentType = "application/x-www-form-urlencoded";
|
||||||
|
req.Referer = endpoint + "/?t=43323";
|
||||||
|
|
||||||
|
NameValueCollection query = new NameValueCollection();
|
||||||
|
query.Add("username", username.Text);
|
||||||
|
query.Add("password", password.Text);
|
||||||
|
query.Add("rememberPassword", "false");
|
||||||
|
query.Add("ts", ts.ToString());
|
||||||
|
|
||||||
|
var postdata = Encoding.ASCII.GetBytes(query.ToQueryString());
|
||||||
|
//addLine(query.ToQueryString());
|
||||||
|
|
||||||
|
req.ContentLength = postdata.Length;
|
||||||
|
|
||||||
|
using (var stream = req.GetRequestStream())
|
||||||
|
{
|
||||||
|
stream.Write(postdata, 0, postdata.Length);
|
||||||
|
}
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
r = req.GetResponse() as HttpWebResponse;
|
||||||
|
}
|
||||||
|
catch (WebException x)
|
||||||
|
{
|
||||||
|
string txt;
|
||||||
|
|
||||||
|
using (HttpWebResponse respExcept = (HttpWebResponse)x.Response)
|
||||||
|
{
|
||||||
|
if (respExcept != null && respExcept.GetResponseStream().CanRead)
|
||||||
|
{
|
||||||
|
StreamReader r2 = new StreamReader(respExcept.GetResponseStream());
|
||||||
|
txt = r2.ReadToEnd();
|
||||||
|
respExcept.Close();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
txt = "";
|
||||||
|
addLine("Login failed: " + x.Message);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
string errorDetail = "";
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
JObject obj2 = JObject.Parse(txt);
|
||||||
|
errorDetail = (string)obj2["errorDetail"];
|
||||||
|
}
|
||||||
|
catch (Newtonsoft.Json.JsonException x2)
|
||||||
|
{
|
||||||
|
errorDetail = "Json parse error: " + x2.Message;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (errorDetail == "INVALID_ACCOUNT_ID")
|
||||||
|
{
|
||||||
|
setErrorMessage("Unknown username");
|
||||||
|
}
|
||||||
|
else if (errorDetail == "RESET_ACCOUNT_PASSWORD")
|
||||||
|
{
|
||||||
|
setErrorMessage("Your account needs a password reset");
|
||||||
|
}
|
||||||
|
else if (errorDetail == "PASSWORD_MISMATCH")
|
||||||
|
{
|
||||||
|
setErrorMessage("Bad password");
|
||||||
|
}
|
||||||
|
else // unrecognized!
|
||||||
|
{
|
||||||
|
setErrorMessage("Unknown error - see output window");
|
||||||
|
addLine("Login failure: " + x.Status);
|
||||||
|
addLine("Error: " + errorDetail);
|
||||||
|
addLine(txt);
|
||||||
|
}
|
||||||
|
|
||||||
|
stopLaunching();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!r.GetResponseStream().CanRead)
|
||||||
|
{
|
||||||
|
setErrorMessage("Unknown error - see output window");
|
||||||
|
addLine("No login response received");
|
||||||
|
addLine("Status: " + r.StatusCode);
|
||||||
|
stopLaunching();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
StreamReader reader = new StreamReader(r.GetResponseStream());
|
||||||
|
string text = reader.ReadToEnd();
|
||||||
|
|
||||||
|
//addLine(r.Headers["Set-Cookie"]);
|
||||||
|
reqCookies.Add(new Uri(endpoint), r.Cookies);
|
||||||
|
|
||||||
|
string result = "";
|
||||||
|
r.Close();
|
||||||
|
addLine("PSWeb: logged in");
|
||||||
|
setProgress(50);
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
JObject obj = JObject.Parse(text);
|
||||||
|
result = (string)obj["result"];
|
||||||
|
}
|
||||||
|
catch (Newtonsoft.Json.JsonException x2)
|
||||||
|
{
|
||||||
|
result = "Json parse error: " + x2.Message;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (result != "SUCCESS")
|
||||||
|
{
|
||||||
|
setErrorMessage("Unknown error - see output window");
|
||||||
|
addLine("Bad login response: " + result);
|
||||||
|
addLine("Status: " + r.StatusCode);
|
||||||
|
addLine(text);
|
||||||
|
stopLaunching();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////
|
||||||
|
// Step 3: Fetch the login token
|
||||||
|
/////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
req = WebRequest.Create(endpoint + "/get_play_session?t=43323") as HttpWebRequest;
|
||||||
|
req.CookieContainer = reqCookies;
|
||||||
|
req.Method = "GET";
|
||||||
|
req.UserAgent = USER_AGENT;
|
||||||
|
req.Timeout = DEFAULT_WEB_TIMEOUT;
|
||||||
|
req.Headers.Add("Origin", "https://lp.soe.com");
|
||||||
|
req.Referer = endpoint + "/login?t=43323";
|
||||||
|
req.Headers.Add("X-Requested-With", "XMLHttpRequest");
|
||||||
|
req.Accept = "*/*";
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
r = req.GetResponse() as HttpWebResponse;
|
||||||
|
}
|
||||||
|
catch (WebException x)
|
||||||
|
{
|
||||||
|
string txt;
|
||||||
|
|
||||||
|
using (HttpWebResponse respExcept = (HttpWebResponse)x.Response)
|
||||||
|
{
|
||||||
|
if (respExcept != null && respExcept.GetResponseStream().CanRead)
|
||||||
|
{
|
||||||
|
StreamReader r2 = new StreamReader(respExcept.GetResponseStream());
|
||||||
|
txt = r2.ReadToEnd();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
txt = "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
string errorDetail = "";
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
JObject obj2 = JObject.Parse(txt);
|
||||||
|
errorDetail = (string)obj2["result"];
|
||||||
|
}
|
||||||
|
catch (Newtonsoft.Json.JsonException x2)
|
||||||
|
{
|
||||||
|
errorDetail = "Json parse error: " + x2.Message;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (errorDetail == "RE_LOGIN")
|
||||||
|
{
|
||||||
|
setErrorMessage("Failed to fetch token: bad login");
|
||||||
|
}
|
||||||
|
else // unrecognized!
|
||||||
|
{
|
||||||
|
setErrorMessage("Unknown error - see output window");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
addLine("Get token failure: " + x.Status);
|
||||||
|
addLine("Error: " + errorDetail);
|
||||||
|
addLine(txt);
|
||||||
|
stopLaunching();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!r.GetResponseStream().CanRead)
|
||||||
|
{
|
||||||
|
setErrorMessage("Unknown error - see output window");
|
||||||
|
addLine("No login response received");
|
||||||
|
addLine("Status: " + r.StatusCode);
|
||||||
|
stopLaunching();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
reader = new StreamReader(r.GetResponseStream());
|
||||||
|
text = reader.ReadToEnd();
|
||||||
|
|
||||||
|
result = "";
|
||||||
|
r.Close();
|
||||||
|
setProgress(75);
|
||||||
|
|
||||||
|
string token = "";
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
JObject obj = JObject.Parse(text);
|
||||||
|
result = (string)obj["result"];
|
||||||
|
token = (string)obj["launch_args"];
|
||||||
|
}
|
||||||
|
catch (Newtonsoft.Json.JsonException x2)
|
||||||
|
{
|
||||||
|
result = "Json parse error: " + x2.Message;
|
||||||
|
token = "";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (result != "SUCCESS")
|
||||||
|
{
|
||||||
|
setErrorMessage("Failed to get token");
|
||||||
|
addLine("Bad token response: " + result);
|
||||||
|
addLine("Status: " + r.StatusCode);
|
||||||
|
addLine(text);
|
||||||
|
stopLaunching();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
addLine("PSWeb: got launch args " + token);
|
||||||
|
|
||||||
|
string launch_args = token;
|
||||||
|
string ExtraLaunchArgs = launchArgs.Text;
|
||||||
|
|
||||||
|
if (ExtraLaunchArgs != String.Empty)
|
||||||
|
launch_args += " " + ExtraLaunchArgs;
|
||||||
|
|
||||||
|
startPlanetSide(psExe, path, launch_args);
|
||||||
|
|
||||||
|
setProgress(100);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
void startPlanetSide(string exe, string workingDir, string args)
|
||||||
|
{
|
||||||
|
psProcess = new Process();
|
||||||
|
|
||||||
|
psProcess.StartInfo.WorkingDirectory = workingDir; // TODO: should this be where the launcher is for logging?
|
||||||
|
psProcess.StartInfo.FileName = exe;
|
||||||
|
psProcess.StartInfo.Arguments = args;
|
||||||
|
psProcess.StartInfo.RedirectStandardOutput = true;
|
||||||
|
psProcess.StartInfo.RedirectStandardError = true;
|
||||||
|
psProcess.StartInfo.UseShellExecute = false;
|
||||||
|
psProcess.Exited += new EventHandler(ps_Exited);
|
||||||
|
psProcess.OutputDataReceived += new DataReceivedEventHandler(ps_OutputDataReceived);
|
||||||
|
psProcess.EnableRaisingEvents = true;
|
||||||
|
|
||||||
|
psProcess.Start();
|
||||||
|
|
||||||
|
psProcess.BeginErrorReadLine();
|
||||||
|
psProcess.BeginOutputReadLine();
|
||||||
|
addLine("ProcessStart: \"" + exe + "\" " + args);
|
||||||
|
|
||||||
|
gameRunning();
|
||||||
|
}
|
||||||
|
|
||||||
|
void ps_OutputDataReceived(object sender, DataReceivedEventArgs e)
|
||||||
|
{
|
||||||
|
if(e != null)
|
||||||
|
{
|
||||||
|
addLine(e.Data);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void addLine(String line)
|
||||||
|
{
|
||||||
|
if(this.InvokeRequired)
|
||||||
|
{
|
||||||
|
this.Invoke((MethodInvoker)delegate
|
||||||
|
{
|
||||||
|
ps_consoleOutput.AppendText(line + Environment.NewLine);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ps_consoleOutput.AppendText(line + Environment.NewLine);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void gameRunning()
|
||||||
|
{
|
||||||
|
if (this.InvokeRequired)
|
||||||
|
{
|
||||||
|
this.Invoke((MethodInvoker)delegate
|
||||||
|
{
|
||||||
|
this.launchGame.Enabled = false;
|
||||||
|
this.launchGame.Text = "Running";
|
||||||
|
});
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
this.launchGame.Enabled = false;
|
||||||
|
this.launchGame.Text = "Running";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void gameStopped()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void ps_Exited(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
this.stopLaunching();
|
||||||
|
gameStopped();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Form1_Load(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private static string getDefaultDirectory()
|
||||||
|
{
|
||||||
|
RegistryKey key = null;
|
||||||
|
string psFolder = "";
|
||||||
|
|
||||||
|
// non-steam install
|
||||||
|
key = Registry.CurrentUser.OpenSubKey(@"Software\Microsoft\Windows\CurrentVersion\App Paths\LaunchPad.exe");
|
||||||
|
|
||||||
|
if (key != null && key.GetValue("") != null)
|
||||||
|
{
|
||||||
|
String defaultDirectory;
|
||||||
|
defaultDirectory = key.GetValue("").ToString();
|
||||||
|
defaultDirectory = Path.GetDirectoryName(defaultDirectory);
|
||||||
|
|
||||||
|
// verify that we aren't mistakingly returning a PlanetSide 2 directory...
|
||||||
|
if (Directory.Exists(defaultDirectory) && checkDirForPlanetSide(defaultDirectory))
|
||||||
|
return defaultDirectory;
|
||||||
|
|
||||||
|
// try to go up a directory and find the PlanetSide folder
|
||||||
|
string upOne = Directory.GetParent(defaultDirectory).FullName;
|
||||||
|
psFolder = Path.Combine(upOne, "Planetside");
|
||||||
|
|
||||||
|
if (Directory.Exists(psFolder) && checkDirForPlanetSide(psFolder))
|
||||||
|
return psFolder;
|
||||||
|
}
|
||||||
|
|
||||||
|
// worth a shot!
|
||||||
|
psFolder = Path.Combine(ProgramFilesx86(), "Sony\\PlanetSide");
|
||||||
|
|
||||||
|
if (Directory.Exists(psFolder) && checkDirForPlanetSide(psFolder))
|
||||||
|
return psFolder;
|
||||||
|
|
||||||
|
// HACK: our last attempt. Should work on Win7 and above with and updated launcher
|
||||||
|
psFolder = "C:\\Users\\Public\\Sony Online Entertainment\\Installed Games\\Planetside";
|
||||||
|
|
||||||
|
if (Directory.Exists(psFolder) && checkDirForPlanetSide(psFolder))
|
||||||
|
return psFolder;
|
||||||
|
|
||||||
|
// give up
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
private static bool checkDirForPlanetSide(string dir)
|
||||||
|
{
|
||||||
|
return File.Exists(Path.Combine(dir, PS_EXE_NAME));
|
||||||
|
}
|
||||||
|
|
||||||
|
private static string ProgramFilesx86()
|
||||||
|
{
|
||||||
|
if (8 == IntPtr.Size
|
||||||
|
|| (!String.IsNullOrEmpty(Environment.GetEnvironmentVariable("PROCESSOR_ARCHITEW6432"))))
|
||||||
|
{
|
||||||
|
return Environment.GetEnvironmentVariable("ProgramFiles(x86)");
|
||||||
|
}
|
||||||
|
|
||||||
|
return Environment.GetEnvironmentVariable("ProgramFiles");
|
||||||
|
}
|
||||||
|
|
||||||
|
private void loggingCheckBox_CheckedChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
Settings.Default.Logging = loggingCheckBox.Checked;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void loginWebBrowser_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void aboutToolStripMenuItem1_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
About a = new About();
|
||||||
|
a.ShowDialog(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void skipLauncher_CheckedChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if(skipLauncher.Checked)
|
||||||
|
{
|
||||||
|
username.Enabled = false;
|
||||||
|
password.Enabled = false;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
username.Enabled = true;
|
||||||
|
password.Enabled = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static class QueryExtensions
|
||||||
|
{
|
||||||
|
public static string ToQueryString(this NameValueCollection nvc)
|
||||||
|
{
|
||||||
|
IEnumerable<string> segments = from key in nvc.AllKeys
|
||||||
|
from value in nvc.GetValues(key)
|
||||||
|
select string.Format("{0}={1}", key, value);
|
||||||
|
return string.Join("&", segments);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
141
PS2ModLauncher/LauncherForm.resx
Normal file
141
PS2ModLauncher/LauncherForm.resx
Normal file
|
|
@ -0,0 +1,141 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<metadata name="findPTRDirDialogue.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
|
<value>17, 17</value>
|
||||||
|
</metadata>
|
||||||
|
<metadata name="savePackDialogue.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
|
<value>186, 17</value>
|
||||||
|
</metadata>
|
||||||
|
<metadata name="selectFileForPack.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
|
<value>335, 17</value>
|
||||||
|
</metadata>
|
||||||
|
<metadata name="directorySearcher1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
|
<value>479, 17</value>
|
||||||
|
</metadata>
|
||||||
|
<metadata name="contextMenuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
|
<value>633, 17</value>
|
||||||
|
</metadata>
|
||||||
|
<metadata name="menuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
|
<value>788, 17</value>
|
||||||
|
</metadata>
|
||||||
|
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<value>27</value>
|
||||||
|
</metadata>
|
||||||
|
</root>
|
||||||
225
PS2ModLauncher/PSLauncher.csproj
Normal file
225
PS2ModLauncher/PSLauncher.csproj
Normal file
|
|
@ -0,0 +1,225 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<PropertyGroup>
|
||||||
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
|
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
|
||||||
|
<ProductVersion>8.0.30703</ProductVersion>
|
||||||
|
<SchemaVersion>2.0</SchemaVersion>
|
||||||
|
<ProjectGuid>{0D6A691E-95FE-4056-8979-190A9A35BDC7}</ProjectGuid>
|
||||||
|
<OutputType>WinExe</OutputType>
|
||||||
|
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||||
|
<RootNamespace>PSLauncher</RootNamespace>
|
||||||
|
<AssemblyName>PSEmu_LaunchPad</AssemblyName>
|
||||||
|
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||||
|
<TargetFrameworkProfile>Client</TargetFrameworkProfile>
|
||||||
|
<FileAlignment>512</FileAlignment>
|
||||||
|
<IsWebBootstrapper>false</IsWebBootstrapper>
|
||||||
|
<PublishUrl>publish\</PublishUrl>
|
||||||
|
<Install>true</Install>
|
||||||
|
<InstallFrom>Disk</InstallFrom>
|
||||||
|
<UpdateEnabled>false</UpdateEnabled>
|
||||||
|
<UpdateMode>Foreground</UpdateMode>
|
||||||
|
<UpdateInterval>7</UpdateInterval>
|
||||||
|
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
|
||||||
|
<UpdatePeriodically>false</UpdatePeriodically>
|
||||||
|
<UpdateRequired>false</UpdateRequired>
|
||||||
|
<MapFileExtensions>true</MapFileExtensions>
|
||||||
|
<ApplicationRevision>0</ApplicationRevision>
|
||||||
|
<ApplicationVersion>1.0.0.0</ApplicationVersion>
|
||||||
|
<UseApplicationTrust>false</UseApplicationTrust>
|
||||||
|
<PublishWizardCompleted>true</PublishWizardCompleted>
|
||||||
|
<BootstrapperEnabled>true</BootstrapperEnabled>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
|
||||||
|
<PlatformTarget>x86</PlatformTarget>
|
||||||
|
<DebugSymbols>true</DebugSymbols>
|
||||||
|
<DebugType>full</DebugType>
|
||||||
|
<Optimize>false</Optimize>
|
||||||
|
<OutputPath>bin\Debug\</OutputPath>
|
||||||
|
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
|
||||||
|
<PlatformTarget>x86</PlatformTarget>
|
||||||
|
<DebugType>pdbonly</DebugType>
|
||||||
|
<Optimize>true</Optimize>
|
||||||
|
<OutputPath>bin\Release\</OutputPath>
|
||||||
|
<DefineConstants>TRACE</DefineConstants>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'LiveSupport|x86'">
|
||||||
|
<OutputPath>bin\x86\LiveSupport\</OutputPath>
|
||||||
|
<DefineConstants>TRACE</DefineConstants>
|
||||||
|
<Optimize>true</Optimize>
|
||||||
|
<DebugType>pdbonly</DebugType>
|
||||||
|
<PlatformTarget>x86</PlatformTarget>
|
||||||
|
<CodeAnalysisLogFile>bin\Release\LaunchPad.exe.CodeAnalysisLog.xml</CodeAnalysisLogFile>
|
||||||
|
<CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
|
||||||
|
<CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||||
|
<CodeAnalysisRuleSetDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets</CodeAnalysisRuleSetDirectories>
|
||||||
|
<CodeAnalysisIgnoreBuiltInRuleSets>true</CodeAnalysisIgnoreBuiltInRuleSets>
|
||||||
|
<CodeAnalysisRuleDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
|
||||||
|
<CodeAnalysisIgnoreBuiltInRules>true</CodeAnalysisIgnoreBuiltInRules>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
|
||||||
|
<DebugSymbols>true</DebugSymbols>
|
||||||
|
<OutputPath>bin\Debug\</OutputPath>
|
||||||
|
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||||
|
<DebugType>full</DebugType>
|
||||||
|
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||||
|
<CodeAnalysisLogFile>bin\Debug\LaunchPad.exe.CodeAnalysisLog.xml</CodeAnalysisLogFile>
|
||||||
|
<CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
|
||||||
|
<CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||||
|
<CodeAnalysisRuleSetDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets</CodeAnalysisRuleSetDirectories>
|
||||||
|
<CodeAnalysisIgnoreBuiltInRuleSets>true</CodeAnalysisIgnoreBuiltInRuleSets>
|
||||||
|
<CodeAnalysisRuleDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
|
||||||
|
<CodeAnalysisIgnoreBuiltInRules>true</CodeAnalysisIgnoreBuiltInRules>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|AnyCPU'">
|
||||||
|
<OutputPath>bin\Release\</OutputPath>
|
||||||
|
<DefineConstants>
|
||||||
|
</DefineConstants>
|
||||||
|
<Optimize>true</Optimize>
|
||||||
|
<DebugType>none</DebugType>
|
||||||
|
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||||
|
<CodeAnalysisLogFile>bin\Release\LaunchPad.exe.CodeAnalysisLog.xml</CodeAnalysisLogFile>
|
||||||
|
<CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
|
||||||
|
<CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<CodeAnalysisRuleSet>BasicCorrectnessRules.ruleset</CodeAnalysisRuleSet>
|
||||||
|
<CodeAnalysisRuleSetDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets</CodeAnalysisRuleSetDirectories>
|
||||||
|
<CodeAnalysisIgnoreBuiltInRuleSets>true</CodeAnalysisIgnoreBuiltInRuleSets>
|
||||||
|
<CodeAnalysisRuleDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
|
||||||
|
<CodeAnalysisIgnoreBuiltInRules>true</CodeAnalysisIgnoreBuiltInRules>
|
||||||
|
<UseVSHostingProcess>false</UseVSHostingProcess>
|
||||||
|
<WarningLevel>0</WarningLevel>
|
||||||
|
<CodeAnalysisIgnoreGeneratedCode>true</CodeAnalysisIgnoreGeneratedCode>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'LiveSupport|AnyCPU'">
|
||||||
|
<OutputPath>bin\LiveSupport\</OutputPath>
|
||||||
|
<DefineConstants>HACKS</DefineConstants>
|
||||||
|
<Optimize>true</Optimize>
|
||||||
|
<DebugType>pdbonly</DebugType>
|
||||||
|
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||||
|
<CodeAnalysisLogFile>bin\Release\LaunchPad.exe.CodeAnalysisLog.xml</CodeAnalysisLogFile>
|
||||||
|
<CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
|
||||||
|
<CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||||
|
<CodeAnalysisRuleSetDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets</CodeAnalysisRuleSetDirectories>
|
||||||
|
<CodeAnalysisIgnoreBuiltInRuleSets>true</CodeAnalysisIgnoreBuiltInRuleSets>
|
||||||
|
<CodeAnalysisRuleDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
|
||||||
|
<CodeAnalysisIgnoreBuiltInRules>true</CodeAnalysisIgnoreBuiltInRules>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup>
|
||||||
|
<ManifestCertificateThumbprint>793DD622BA49EF7D3494640F6D9646D8D289304B</ManifestCertificateThumbprint>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup>
|
||||||
|
<ManifestKeyFile>PSLauncher_1_TemporaryKey.pfx</ManifestKeyFile>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup>
|
||||||
|
<GenerateManifests>true</GenerateManifests>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup>
|
||||||
|
<TargetZone>LocalIntranet</TargetZone>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup>
|
||||||
|
<ApplicationManifest>Properties\app.manifest</ApplicationManifest>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup>
|
||||||
|
<SignManifests>false</SignManifests>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Reference Include="Microsoft.VisualBasic" />
|
||||||
|
<Reference Include="Newtonsoft.Json">
|
||||||
|
<HintPath>..\Newtonsoft.Json.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System" />
|
||||||
|
<Reference Include="System.Core" />
|
||||||
|
<Reference Include="System.DirectoryServices" />
|
||||||
|
<Reference Include="System.Xml.Linq" />
|
||||||
|
<Reference Include="System.Data.DataSetExtensions" />
|
||||||
|
<Reference Include="Microsoft.CSharp" />
|
||||||
|
<Reference Include="System.Data" />
|
||||||
|
<Reference Include="System.Deployment" />
|
||||||
|
<Reference Include="System.Drawing" />
|
||||||
|
<Reference Include="System.Windows.Forms" />
|
||||||
|
<Reference Include="System.Xml" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Include="AboutBox1.cs">
|
||||||
|
<SubType>Form</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="AboutBox1.Designer.cs">
|
||||||
|
<DependentUpon>AboutBox1.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="LauncherForm.cs">
|
||||||
|
<SubType>Form</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="LauncherForm.Designer.cs">
|
||||||
|
<DependentUpon>LauncherForm.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Program.cs" />
|
||||||
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
|
<EmbeddedResource Include="AboutBox1.resx">
|
||||||
|
<DependentUpon>AboutBox1.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="LauncherForm.resx">
|
||||||
|
<DependentUpon>LauncherForm.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="Properties\Resources.resx">
|
||||||
|
<Generator>ResXFileCodeGenerator</Generator>
|
||||||
|
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<Compile Include="Properties\Resources.Designer.cs">
|
||||||
|
<AutoGen>True</AutoGen>
|
||||||
|
<DependentUpon>Resources.resx</DependentUpon>
|
||||||
|
<DesignTime>True</DesignTime>
|
||||||
|
</Compile>
|
||||||
|
<None Include="app.config" />
|
||||||
|
<None Include="Properties\app.manifest" />
|
||||||
|
<None Include="Properties\Settings.settings">
|
||||||
|
<Generator>SettingsSingleFileGenerator</Generator>
|
||||||
|
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||||
|
</None>
|
||||||
|
<Compile Include="Properties\Settings.Designer.cs">
|
||||||
|
<AutoGen>True</AutoGen>
|
||||||
|
<DependentUpon>Settings.settings</DependentUpon>
|
||||||
|
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||||
|
</Compile>
|
||||||
|
<None Include="PSLauncher_1_TemporaryKey.pfx" />
|
||||||
|
<None Include="PSLauncher_TemporaryKey.pfx" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<BootstrapperPackage Include=".NETFramework,Version=v4.0,Profile=Client">
|
||||||
|
<Visible>False</Visible>
|
||||||
|
<ProductName>Microsoft .NET Framework 4 Client Profile %28x86 and x64%29</ProductName>
|
||||||
|
<Install>true</Install>
|
||||||
|
</BootstrapperPackage>
|
||||||
|
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
|
||||||
|
<Visible>False</Visible>
|
||||||
|
<ProductName>.NET Framework 3.5 SP1</ProductName>
|
||||||
|
<Install>false</Install>
|
||||||
|
</BootstrapperPackage>
|
||||||
|
<BootstrapperPackage Include="Microsoft.Windows.Installer.4.5">
|
||||||
|
<Visible>False</Visible>
|
||||||
|
<ProductName>Windows Installer 4.5</ProductName>
|
||||||
|
<Install>true</Install>
|
||||||
|
</BootstrapperPackage>
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
|
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||||
|
Other similar extension points exist, see Microsoft.Common.targets.
|
||||||
|
<Target Name="BeforeBuild">
|
||||||
|
</Target>
|
||||||
|
<Target Name="AfterBuild">
|
||||||
|
</Target>
|
||||||
|
-->
|
||||||
|
</Project>
|
||||||
30
PS2ModLauncher/Program.cs
Normal file
30
PS2ModLauncher/Program.cs
Normal file
|
|
@ -0,0 +1,30 @@
|
||||||
|
using PSLauncher.Properties;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
namespace PSLauncher
|
||||||
|
{
|
||||||
|
static class Program
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// The main entry point for the application.
|
||||||
|
/// </summary>
|
||||||
|
[STAThread]
|
||||||
|
static void Main()
|
||||||
|
{
|
||||||
|
Application.EnableVisualStyles();
|
||||||
|
Application.SetCompatibleTextRenderingDefault(false);
|
||||||
|
|
||||||
|
Settings.Default.PropertyChanged += Default_PropertyChanged;
|
||||||
|
|
||||||
|
Application.Run(new LauncherForm());
|
||||||
|
}
|
||||||
|
|
||||||
|
static void Default_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
|
||||||
|
{
|
||||||
|
Settings.Default.Save();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
36
PS2ModLauncher/Properties/AssemblyInfo.cs
Normal file
36
PS2ModLauncher/Properties/AssemblyInfo.cs
Normal file
|
|
@ -0,0 +1,36 @@
|
||||||
|
using System.Reflection;
|
||||||
|
using System.Runtime.CompilerServices;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
|
// General Information about an assembly is controlled through the following
|
||||||
|
// set of attributes. Change these attribute values to modify the information
|
||||||
|
// associated with an assembly.
|
||||||
|
[assembly: AssemblyTitle("PSEmu LaunchPad")]
|
||||||
|
[assembly: AssemblyDescription("")]
|
||||||
|
[assembly: AssemblyConfiguration("")]
|
||||||
|
[assembly: AssemblyCompany("PSEmu")]
|
||||||
|
[assembly: AssemblyProduct("PSEmu LaunchPad")]
|
||||||
|
[assembly: AssemblyCopyright("")]
|
||||||
|
[assembly: AssemblyTrademark("")]
|
||||||
|
[assembly: AssemblyCulture("")]
|
||||||
|
|
||||||
|
// Setting ComVisible to false makes the types in this assembly not visible
|
||||||
|
// to COM components. If you need to access a type in this assembly from
|
||||||
|
// COM, set the ComVisible attribute to true on that type.
|
||||||
|
[assembly: ComVisible(false)]
|
||||||
|
|
||||||
|
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||||
|
[assembly: Guid("5dff03d1-e8e0-42c0-a5b7-5ac290a55a56")]
|
||||||
|
|
||||||
|
// Version information for an assembly consists of the following four values:
|
||||||
|
//
|
||||||
|
// Major Version
|
||||||
|
// Minor Version
|
||||||
|
// Build Number
|
||||||
|
// Revision
|
||||||
|
//
|
||||||
|
// You can specify all the values or you can default the Build and Revision Numbers
|
||||||
|
// by using the '*' as shown below:
|
||||||
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
|
[assembly: AssemblyVersion("1.0.0.1")]
|
||||||
|
[assembly: AssemblyFileVersion("1.0.0.1")]
|
||||||
63
PS2ModLauncher/Properties/Resources.Designer.cs
generated
Normal file
63
PS2ModLauncher/Properties/Resources.Designer.cs
generated
Normal file
|
|
@ -0,0 +1,63 @@
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <auto-generated>
|
||||||
|
// This code was generated by a tool.
|
||||||
|
// Runtime Version:4.0.30319.42000
|
||||||
|
//
|
||||||
|
// Changes to this file may cause incorrect behavior and will be lost if
|
||||||
|
// the code is regenerated.
|
||||||
|
// </auto-generated>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
namespace PSLauncher.Properties {
|
||||||
|
using System;
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// A strongly-typed resource class, for looking up localized strings, etc.
|
||||||
|
/// </summary>
|
||||||
|
// This class was auto-generated by the StronglyTypedResourceBuilder
|
||||||
|
// class via a tool like ResGen or Visual Studio.
|
||||||
|
// To add or remove a member, edit your .ResX file then rerun ResGen
|
||||||
|
// with the /str option, or rebuild your VS project.
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
||||||
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
|
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||||
|
internal class Resources {
|
||||||
|
|
||||||
|
private static global::System.Resources.ResourceManager resourceMan;
|
||||||
|
|
||||||
|
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||||
|
|
||||||
|
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||||
|
internal Resources() {
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns the cached ResourceManager instance used by this class.
|
||||||
|
/// </summary>
|
||||||
|
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||||
|
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||||
|
get {
|
||||||
|
if (object.ReferenceEquals(resourceMan, null)) {
|
||||||
|
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("PSLauncher.Properties.Resources", typeof(Resources).Assembly);
|
||||||
|
resourceMan = temp;
|
||||||
|
}
|
||||||
|
return resourceMan;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Overrides the current thread's CurrentUICulture property for all
|
||||||
|
/// resource lookups using this strongly typed resource class.
|
||||||
|
/// </summary>
|
||||||
|
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||||
|
internal static global::System.Globalization.CultureInfo Culture {
|
||||||
|
get {
|
||||||
|
return resourceCulture;
|
||||||
|
}
|
||||||
|
set {
|
||||||
|
resourceCulture = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
120
PS2ModLauncher/Properties/Resources.resx
Normal file
120
PS2ModLauncher/Properties/Resources.resx
Normal file
|
|
@ -0,0 +1,120 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
</root>
|
||||||
62
PS2ModLauncher/Properties/Settings.Designer.cs
generated
Normal file
62
PS2ModLauncher/Properties/Settings.Designer.cs
generated
Normal file
|
|
@ -0,0 +1,62 @@
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <auto-generated>
|
||||||
|
// This code was generated by a tool.
|
||||||
|
// Runtime Version:4.0.30319.42000
|
||||||
|
//
|
||||||
|
// Changes to this file may cause incorrect behavior and will be lost if
|
||||||
|
// the code is regenerated.
|
||||||
|
// </auto-generated>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
namespace PSLauncher.Properties {
|
||||||
|
|
||||||
|
|
||||||
|
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "14.0.0.0")]
|
||||||
|
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
|
||||||
|
|
||||||
|
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||||
|
|
||||||
|
public static Settings Default {
|
||||||
|
get {
|
||||||
|
return defaultInstance;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||||
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
|
[global::System.Configuration.DefaultSettingValueAttribute("")]
|
||||||
|
public string PSPath {
|
||||||
|
get {
|
||||||
|
return ((string)(this["PSPath"]));
|
||||||
|
}
|
||||||
|
set {
|
||||||
|
this["PSPath"] = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||||
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
|
[global::System.Configuration.DefaultSettingValueAttribute("False")]
|
||||||
|
public bool Logging {
|
||||||
|
get {
|
||||||
|
return ((bool)(this["Logging"]));
|
||||||
|
}
|
||||||
|
set {
|
||||||
|
this["Logging"] = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||||
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
|
[global::System.Configuration.DefaultSettingValueAttribute("")]
|
||||||
|
public string ExtraArgs {
|
||||||
|
get {
|
||||||
|
return ((string)(this["ExtraArgs"]));
|
||||||
|
}
|
||||||
|
set {
|
||||||
|
this["ExtraArgs"] = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
15
PS2ModLauncher/Properties/Settings.settings
Normal file
15
PS2ModLauncher/Properties/Settings.settings
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
<?xml version='1.0' encoding='utf-8'?>
|
||||||
|
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="PSLauncher.Properties" GeneratedClassName="Settings">
|
||||||
|
<Profiles />
|
||||||
|
<Settings>
|
||||||
|
<Setting Name="PSPath" Type="System.String" Scope="User">
|
||||||
|
<Value Profile="(Default)" />
|
||||||
|
</Setting>
|
||||||
|
<Setting Name="Logging" Type="System.Boolean" Scope="User">
|
||||||
|
<Value Profile="(Default)">False</Value>
|
||||||
|
</Setting>
|
||||||
|
<Setting Name="ExtraArgs" Type="System.String" Scope="User">
|
||||||
|
<Value Profile="(Default)"> </Value>
|
||||||
|
</Setting>
|
||||||
|
</Settings>
|
||||||
|
</SettingsFile>
|
||||||
70
PS2ModLauncher/Properties/app.manifest
Normal file
70
PS2ModLauncher/Properties/app.manifest
Normal file
|
|
@ -0,0 +1,70 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||||
|
<assemblyIdentity version="1.0.0.0" name="MyApplication.app" />
|
||||||
|
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
|
||||||
|
<security>
|
||||||
|
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||||
|
<!-- UAC Manifest Options
|
||||||
|
If you want to change the Windows User Account Control level replace the
|
||||||
|
requestedExecutionLevel node with one of the following.
|
||||||
|
|
||||||
|
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
|
||||||
|
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
|
||||||
|
<requestedExecutionLevel level="highestAvailable" uiAccess="false" />
|
||||||
|
|
||||||
|
Specifying requestedExecutionLevel element will disable file and registry virtualization.
|
||||||
|
Remove this element if your application requires this virtualization for backwards
|
||||||
|
compatibility.
|
||||||
|
-->
|
||||||
|
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
|
||||||
|
</requestedPrivileges>
|
||||||
|
<applicationRequestMinimum>
|
||||||
|
<PermissionSet class="System.Security.PermissionSet" version="1" Unrestricted="true" ID="Custom" SameSite="site" />
|
||||||
|
<defaultAssemblyRequest permissionSetReference="Custom" />
|
||||||
|
</applicationRequestMinimum>
|
||||||
|
</security>
|
||||||
|
</trustInfo>
|
||||||
|
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
|
||||||
|
<application>
|
||||||
|
<!-- A list of the Windows versions that this application has been tested on and is
|
||||||
|
is designed to work with. Uncomment the appropriate elements and Windows will
|
||||||
|
automatically selected the most compatible environment. -->
|
||||||
|
<!-- Windows Vista -->
|
||||||
|
<!--<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}" />-->
|
||||||
|
<!-- Windows 7 -->
|
||||||
|
<!--<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}" />-->
|
||||||
|
<!-- Windows 8 -->
|
||||||
|
<!--<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}" />-->
|
||||||
|
<!-- Windows 8.1 -->
|
||||||
|
<!--<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}" />-->
|
||||||
|
<!-- Windows 10 -->
|
||||||
|
<!--<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" />-->
|
||||||
|
</application>
|
||||||
|
</compatibility>
|
||||||
|
<!-- Indicates that the application is DPI-aware and will not be automatically scaled by Windows at higher
|
||||||
|
DPIs. Windows Presentation Foundation (WPF) applications are automatically DPI-aware and do not need
|
||||||
|
to opt in. Windows Forms applications targeting .NET Framework 4.6 that opt into this setting, should
|
||||||
|
also set the 'EnableWindowsFormsHighDpiAutoResizing' setting to 'true' in their app.config. -->
|
||||||
|
<!--
|
||||||
|
<application xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||||
|
<windowsSettings>
|
||||||
|
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</dpiAware>
|
||||||
|
</windowsSettings>
|
||||||
|
</application>
|
||||||
|
-->
|
||||||
|
<!-- Enable themes for Windows common controls and dialogs (Windows XP and later) -->
|
||||||
|
<!--
|
||||||
|
<dependency>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity
|
||||||
|
type="win32"
|
||||||
|
name="Microsoft.Windows.Common-Controls"
|
||||||
|
version="6.0.0.0"
|
||||||
|
processorArchitecture="*"
|
||||||
|
publicKeyToken="6595b64144ccf1df"
|
||||||
|
language="*"
|
||||||
|
/>
|
||||||
|
</dependentAssembly>
|
||||||
|
</dependency>
|
||||||
|
-->
|
||||||
|
</assembly>
|
||||||
22
PS2ModLauncher/app.config
Normal file
22
PS2ModLauncher/app.config
Normal file
|
|
@ -0,0 +1,22 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<configuration>
|
||||||
|
<configSections>
|
||||||
|
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
|
||||||
|
<section name="PSLauncher.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
|
||||||
|
</sectionGroup>
|
||||||
|
</configSections>
|
||||||
|
<userSettings>
|
||||||
|
<PSLauncher.Properties.Settings>
|
||||||
|
<setting name="PSPath" serializeAs="String">
|
||||||
|
<value />
|
||||||
|
</setting>
|
||||||
|
<setting name="Logging" serializeAs="String">
|
||||||
|
<value>False</value>
|
||||||
|
</setting>
|
||||||
|
<setting name="ExtraArgs" serializeAs="String">
|
||||||
|
<value>
|
||||||
|
</value>
|
||||||
|
</setting>
|
||||||
|
</PSLauncher.Properties.Settings>
|
||||||
|
</userSettings>
|
||||||
|
</configuration>
|
||||||
34
PSLauncher.sln
Normal file
34
PSLauncher.sln
Normal file
|
|
@ -0,0 +1,34 @@
|
||||||
|
|
||||||
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
|
# Visual Studio 14
|
||||||
|
VisualStudioVersion = 14.0.23107.0
|
||||||
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PSLauncher", "PS2ModLauncher\PSLauncher.csproj", "{0D6A691E-95FE-4056-8979-190A9A35BDC7}"
|
||||||
|
EndProject
|
||||||
|
Global
|
||||||
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
Debug|Any CPU = Debug|Any CPU
|
||||||
|
Debug|x86 = Debug|x86
|
||||||
|
LiveSupport|Any CPU = LiveSupport|Any CPU
|
||||||
|
LiveSupport|x86 = LiveSupport|x86
|
||||||
|
Release|Any CPU = Release|Any CPU
|
||||||
|
Release|x86 = Release|x86
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
|
{0D6A691E-95FE-4056-8979-190A9A35BDC7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{0D6A691E-95FE-4056-8979-190A9A35BDC7}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{0D6A691E-95FE-4056-8979-190A9A35BDC7}.Debug|x86.ActiveCfg = Debug|x86
|
||||||
|
{0D6A691E-95FE-4056-8979-190A9A35BDC7}.Debug|x86.Build.0 = Debug|x86
|
||||||
|
{0D6A691E-95FE-4056-8979-190A9A35BDC7}.LiveSupport|Any CPU.ActiveCfg = LiveSupport|Any CPU
|
||||||
|
{0D6A691E-95FE-4056-8979-190A9A35BDC7}.LiveSupport|Any CPU.Build.0 = LiveSupport|Any CPU
|
||||||
|
{0D6A691E-95FE-4056-8979-190A9A35BDC7}.LiveSupport|x86.ActiveCfg = LiveSupport|x86
|
||||||
|
{0D6A691E-95FE-4056-8979-190A9A35BDC7}.LiveSupport|x86.Build.0 = LiveSupport|x86
|
||||||
|
{0D6A691E-95FE-4056-8979-190A9A35BDC7}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{0D6A691E-95FE-4056-8979-190A9A35BDC7}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{0D6A691E-95FE-4056-8979-190A9A35BDC7}.Release|x86.ActiveCfg = Release|x86
|
||||||
|
{0D6A691E-95FE-4056-8979-190A9A35BDC7}.Release|x86.Build.0 = Release|x86
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
|
HideSolutionNode = FALSE
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
||||||
Loading…
Add table
Add a link
Reference in a new issue