diff --git a/My Project/Resources.Designer.vb b/My Project/Resources.Designer.vb new file mode 100644 index 0000000..4ee176a --- /dev/null +++ b/My Project/Resources.Designer.vb @@ -0,0 +1,63 @@ +'------------------------------------------------------------------------------ +' +' 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. +' +'------------------------------------------------------------------------------ + +Option Strict On +Option Explicit On + +Imports System + +Namespace My.Resources + + '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. + ''' + ''' A strongly-typed resource class, for looking up localized strings, etc. + ''' + _ + Friend Module Resources + + Private resourceMan As Global.System.Resources.ResourceManager + + Private resourceCulture As Global.System.Globalization.CultureInfo + + ''' + ''' Returns the cached ResourceManager instance used by this class. + ''' + _ + Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager + Get + If Object.ReferenceEquals(resourceMan, Nothing) Then + Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("alterware_launcher.Resources", GetType(Resources).Assembly) + resourceMan = temp + End If + Return resourceMan + End Get + End Property + + ''' + ''' Overrides the current thread's CurrentUICulture property for all + ''' resource lookups using this strongly typed resource class. + ''' + _ + Friend Property Culture() As Global.System.Globalization.CultureInfo + Get + Return resourceCulture + End Get + Set + resourceCulture = value + End Set + End Property + End Module +End Namespace diff --git a/My Project/Resources.resx b/My Project/Resources.resx new file mode 100644 index 0000000..26a50bd --- /dev/null +++ b/My Project/Resources.resx @@ -0,0 +1,110 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/Program.vb b/Program.vb index 46283ca..7f2de2d 100644 --- a/Program.vb +++ b/Program.vb @@ -1,7 +1,39 @@ Imports System +Imports System.IO +Imports System.Net +Imports System.Net.Http Module Program - Sub Main(args As String()) - Console.WriteLine("Hello World!") + Private master As String = "https://master.alterware.dev" + + Sub download_and_run(game As String) + Dim filename As String = game & ".exe" + Dim remote_path As String = If(game = "iw4-sp", "/iw4/", "/iw5/") + Console.WriteLine("Downloading " & game & "...") + Using wc As New WebClient + wc.DownloadFile(master & remote_path & filename, filename) + End Using + Console.WriteLine("Starting " & game) + Process.Start(filename) + End End Sub -End Module + + Sub Main(args As String()) + Dim game As String + Try + game = args(0) + Catch ex As Exception + If File.Exists("iw4sp.exe") Or File.Exists("iw4mp.exe") Then + game = "iw4-sp" + ElseIf File.Exists("iw5sp.exe") Or File.Exists("iw5mp.exe") Or File.Exists("iw5mp_server.exe") Then + game = "iw5-mod" + Else + Console.WriteLine("No game specified nor found in local directory") + Console.ReadLine() + Return + End If + End Try + + download_and_run(game) + End Sub +End Module \ No newline at end of file diff --git a/README.md b/README.md index 6174b35..da004b9 100644 --- a/README.md +++ b/README.md @@ -1 +1,7 @@ -# alterware-launcher \ No newline at end of file +# alterware-launcher + +1. Download [latest release](https://github.com/mxve/alterware-launcher/releases/latest/download/alterware-launcher.exe) +2. Please alterware-launcher.exe in MW2/MW3 game directory +3. Run alterware-launcher.exe + +If the launcher doesn't work make sure you have dotnet 6.0 installed. Also try running the launcher as administrator. \ No newline at end of file diff --git a/alterware-launcher.vbproj b/alterware-launcher.vbproj index 09c6c27..d57fac0 100644 --- a/alterware-launcher.vbproj +++ b/alterware-launcher.vbproj @@ -4,6 +4,43 @@ Exe alterware_launcher net6.0 + true + win-x64 + true + icon.ico + AlterWare iw4-sp/iw5-mod updater + https://github.com/mxve/alterware-launcher + icon.png + git + 0.1.0 + 0.1.0 + + + + + + + True + \ + + + + + + True + True + Resources.resx + + + + + + My.Resources + VbMyResourcesResXFileCodeGenerator + Resources.Designer.vb + + + diff --git a/icon.ico b/icon.ico new file mode 100644 index 0000000..18c5b5f Binary files /dev/null and b/icon.ico differ diff --git a/icon_bg.ico b/icon_bg.ico new file mode 100644 index 0000000..46bb474 Binary files /dev/null and b/icon_bg.ico differ