Code Monkey home page Code Monkey logo

launchpad's Introduction

Launchpad

An open-source launcher for your games. Launchpad was originally made for Unreal Engine 4, but supports arbitrary software and games.

Chat on Discord with us! http://discord.gg/0uvPPH2sOmcalj0K

Build Status codecov

Launchpad (GTK# on Linux)

Features

  • Self-updating
  • Can install, update and verify the game installation
  • Support for a number of widespread protocols (currently FTP and HTTP/HTTPS)

Usage guide

Game Developer Quickstart

Note for users installing on Unix - you may need to install some additional libraries for Launchpad to run. Simply run /Scripts/launchpad-dependencies.sh if your system is Debian or Debian-based, and it'll install them for you.

Requirements

Building

Every OS

  • .NET Core SDK (>=2.0.0)
  • JetBrains Rider (or any IDE supporting the modern C# tooling)

Running

Linux & Mac

  • Mono (or 32-bit .NET Core)
  • libgtk-3-0

Windows

  • .NET 4.6.2

Contributing

If you want to contribute code back to the project, great! Open a pull request with your changes based on the master branch and I'll gladly take a look.

If you're not a developer, but want to contribute anyway, or if you just want to say thank you by buying me lunch, you can toss me some loose change via PayPal or Ko-Fi.

Donate

Buy Me a Coffee at ko-fi.com

Code contributors

  • Jarl Gullberg

launchpad's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

launchpad's Issues

A call to PInvoke function has unbalanced the stack

Hello,

I tried to run your code to get a better understanding of how it works, and it threw the following exception on line 83 of Program.cs when it tried to run the GTK UI:

Managed Debugging Assistant 'PInvokeStackImbalance' : 'A call to PInvoke function 'GLibSharp!GLib.Marshaller+d_g_malloc::Invoke' has unbalanced the stack. This is likely because the managed PInvoke signature does not match the unmanaged target signature. Check that the calling convention and parameters of the PInvoke signature match the target unmanaged signature.'

I first opened the project in VS 2017, and was prompted to download .NET 4.6.2 by several build errors. Those problems were solved after I downloaded that package, but running the project after I did so is when the exception first started popping up.

I have attached the full output log to this issue. Any advice that you might have for me would be deeply appreciated. :)
Launchpad_OutputLog.txt

MSBuild xml namespace error

getting an error saying

D:\folder\Launchpad-master\Launchpad-master\Launchpad.Launcher\Launchpad.Launcher.csproj
: error : The default XML namespace of the project must be the MSBuild XML namespace. If the project is authored in the MSBuild 2003 format, please add xmlns="http://schemas.microsoft.com/developer/msbuild/2003" to the element. If the project has been authored in the old 1.0 or 1.2 format, please convert it to MSBuild 2003 format. D:\folder\Launchpad-master\Launchpad-master\Launchpad.Launcher\Launchpad.Launcher.csproj

D:\folder\Launchpad-master\Launchpad-master\Launchpad.Utilities\Launchpad.Utilities.csproj : error : The default XML namespace of the project must be the MSBuild XML namespace. If the project is authored in the MSBuild 2003 format, please add xmlns="http://schemas.microsoft.com/developer/msbuild/2003" to the element. If the project has been authored in the old 1.0 or 1.2 format, please convert it to MSBuild 2003 format. D:\folder\Launchpad-master\Launchpad-master\Launchpad.Utilities\Launchpad.Utilities.csproj

D:\folder\Launchpad-master\Launchpad-master\Launchpad.Tests\Launchpad.Tests.csproj : error : The default XML namespace of the project must be the MSBuild XML namespace. If the project is authored in the MSBuild 2003 format, please add xmlns="http://schemas.microsoft.com/developer/msbuild/2003" to the element. If the project has been authored in the old 1.0 or 1.2 format, please convert it to MSBuild 2003 format. D:\folder\Launchpad-master\Launchpad-master\Launchpad.Tests\Launchpad.Tests.csproj

D:\folder\Launchpad-master\Launchpad-master\Launchpad.Common\Launchpad.Common.csproj : error : The default XML namespace of the project must be the MSBuild XML namespace. If the project is authored in the MSBuild 2003 format, please add xmlns="http://schemas.microsoft.com/developer/msbuild/2003" to the element. If the project has been authored in the old 1.0 or 1.2 format, please convert it to MSBuild 2003 format. D:\folder\Launchpad-master\Launchpad-master\Launchpad.Common\Launchpad.Common.csproj

this happens upon opening the .sln file in visual studio 2015

Update Progress

No Install Progress is provided. The progress bar should show the file being downloaded.

Usernames cannot contain reserved characters

Due to deprecated functionality where simple string concatenation was used for create FTP credentials, the launcher will crash if the username contains reserved characters such as the @ symbol.

launchpad.log launcher dont start

2017-06-16 20:34:51,904 [Launchpad.Launcher.Program | INFO]: ----------------
2017-06-16 20:34:51,914 [Launchpad.Launcher.Program | INFO]: Launchpad v0.3.2.34468 starting...
2017-06-16 20:34:51,916 [Launchpad.Launcher.Program | INFO]: Current platform: Win64 (x64)
2017-06-16 20:34:51,918 [Launchpad.Launcher.Program | INFO]: Initializing UI...
2017-06-16 20:34:51,931 [Launchpad.Launcher.Program | FATAL]: ----------------
2017-06-16 20:34:51,933 [Launchpad.Launcher.Program | FATAL]: FATAL UNHANDLED EXCEPTION!
2017-06-16 20:34:51,939 [Launchpad.Launcher.Program | FATAL]: Something has gone terribly, terribly wrong during runtime.
2017-06-16 20:34:51,941 [Launchpad.Launcher.Program | FATAL]: The following is what information could be gathered by the program before crashing.
2017-06-16 20:34:51,943 [Launchpad.Launcher.Program | FATAL]: Please report this to [email protected] or via GitHub. Include the full log and a description of what you were doing when it happened.
2017-06-16 20:34:51,946 [Launchpad.Launcher.Program | FATAL]: This exception is typical of instances where the GTK# runtime has not been installed.
If you haven't installed it, download it at 'http://www.mono-project.com/download/#download-win'.
If you have installed it, reboot your computer and try again.
2017-06-16 20:34:51,981 [Launchpad.Launcher.Program | FATAL]: Exception type: System.DllNotFoundException
2017-06-16 20:34:51,984 [Launchpad.Launcher.Program | FATAL]: Exception Message: Impossible de charger la DLL 'libgtk-win32-2.0-0.dll': La procédure spécifiée est introuvable. (Exception de HRESULT : 0x8007007F)
2017-06-16 20:34:51,989 [Launchpad.Launcher.Program | FATAL]: Exception Stacktrace: à Gtk.Application.gtk_init(Int32& argc, IntPtr& argv)
à Gtk.Application.Init()
à Launchpad.Launcher.Program.Main()
2017-06-16 20:34:58,529 [Launchpad.Launcher.Program | INFO]: ----------------
2017-06-16 20:34:58,537 [Launchpad.Launcher.Program | INFO]: Launchpad v0.3.2.34468 starting...
2017-06-16 20:34:58,540 [Launchpad.Launcher.Program | INFO]: Current platform: Win64 (x64)
2017-06-16 20:34:58,543 [Launchpad.Launcher.Program | INFO]: Initializing UI...
2017-06-16 20:34:58,559 [Launchpad.Launcher.Program | FATAL]: ----------------
2017-06-16 20:34:58,561 [Launchpad.Launcher.Program | FATAL]: FATAL UNHANDLED EXCEPTION!
2017-06-16 20:34:58,564 [Launchpad.Launcher.Program | FATAL]: Something has gone terribly, terribly wrong during runtime.
2017-06-16 20:34:58,567 [Launchpad.Launcher.Program | FATAL]: The following is what information could be gathered by the program before crashing.
2017-06-16 20:34:58,569 [Launchpad.Launcher.Program | FATAL]: Please report this to [email protected] or via GitHub. Include the full log and a description of what you were doing when it happened.
2017-06-16 20:34:58,572 [Launchpad.Launcher.Program | FATAL]: This exception is typical of instances where the GTK# runtime has not been installed.
If you haven't installed it, download it at 'http://www.mono-project.com/download/#download-win'.
If you have installed it, reboot your computer and try again.
2017-06-16 20:34:58,602 [Launchpad.Launcher.Program | FATAL]: Exception type: System.DllNotFoundException
2017-06-16 20:34:58,606 [Launchpad.Launcher.Program | FATAL]: Exception Message: Impossible de charger la DLL 'libgtk-win32-2.0-0.dll': La procédure spécifiée est introuvable. (Exception de HRESULT : 0x8007007F)
2017-06-16 20:34:58,610 [Launchpad.Launcher.Program | FATAL]: Exception Stacktrace: à Gtk.Application.gtk_init(Int32& argc, IntPtr& argv)
à Gtk.Application.Init()
à Launchpad.Launcher.Program.Main()
2017-06-17 00:59:13,275 [Launchpad.Launcher.Program | INFO]: ----------------
2017-06-17 00:59:13,284 [Launchpad.Launcher.Program | INFO]: Launchpad v0.3.2.34468 starting...
2017-06-17 00:59:13,287 [Launchpad.Launcher.Program | INFO]: Current platform: Win64 (x64)
2017-06-17 00:59:13,290 [Launchpad.Launcher.Program | INFO]: Initializing UI...
2017-06-17 00:59:13,417 [Launchpad.Launcher.Program | FATAL]: ----------------
2017-06-17 00:59:13,420 [Launchpad.Launcher.Program | FATAL]: FATAL UNHANDLED EXCEPTION!
2017-06-17 00:59:13,422 [Launchpad.Launcher.Program | FATAL]: Something has gone terribly, terribly wrong during runtime.
2017-06-17 00:59:13,425 [Launchpad.Launcher.Program | FATAL]: The following is what information could be gathered by the program before crashing.
2017-06-17 00:59:13,427 [Launchpad.Launcher.Program | FATAL]: Please report this to [email protected] or via GitHub. Include the full log and a description of what you were doing when it happened.
2017-06-17 00:59:13,430 [Launchpad.Launcher.Program | FATAL]: This exception is typical of instances where the GTK# runtime has not been installed.
If you haven't installed it, download it at 'http://www.mono-project.com/download/#download-win'.
If you have installed it, reboot your computer and try again.
2017-06-17 00:59:13,456 [Launchpad.Launcher.Program | FATAL]: Exception type: System.DllNotFoundException
2017-06-17 00:59:13,460 [Launchpad.Launcher.Program | FATAL]: Exception Message: Impossible de charger la DLL 'libgtk-win32-2.0-0.dll': La procédure spécifiée est introuvable. (Exception de HRESULT : 0x8007007F)
2017-06-17 00:59:13,464 [Launchpad.Launcher.Program | FATAL]: Exception Stacktrace: à Gtk.Application.gtk_init(Int32& argc, IntPtr& argv)
à Gtk.Application.Init()
à Launchpad.Launcher.Program.Main()
2017-06-17 01:05:27,821 [Launchpad.Launcher.Program | INFO]: ----------------
2017-06-17 01:05:27,831 [Launchpad.Launcher.Program | INFO]: Launchpad v0.3.2.34468 starting...
2017-06-17 01:05:27,835 [Launchpad.Launcher.Program | INFO]: Current platform: Win64 (x64)
2017-06-17 01:05:27,838 [Launchpad.Launcher.Program | INFO]: Initializing UI...
2017-06-17 01:05:27,858 [Launchpad.Launcher.Program | FATAL]: ----------------
2017-06-17 01:05:27,861 [Launchpad.Launcher.Program | FATAL]: FATAL UNHANDLED EXCEPTION!
2017-06-17 01:05:27,867 [Launchpad.Launcher.Program | FATAL]: Something has gone terribly, terribly wrong during runtime.
2017-06-17 01:05:27,873 [Launchpad.Launcher.Program | FATAL]: The following is what information could be gathered by the program before crashing.
2017-06-17 01:05:27,877 [Launchpad.Launcher.Program | FATAL]: Please report this to [email protected] or via GitHub. Include the full log and a description of what you were doing when it happened.
2017-06-17 01:05:27,880 [Launchpad.Launcher.Program | FATAL]: This exception is typical of instances where the GTK# runtime has not been installed.
If you haven't installed it, download it at 'http://www.mono-project.com/download/#download-win'.
If you have installed it, reboot your computer and try again.
2017-06-17 01:05:27,909 [Launchpad.Launcher.Program | FATAL]: Exception type: System.DllNotFoundException
2017-06-17 01:05:27,913 [Launchpad.Launcher.Program | FATAL]: Exception Message: Impossible de charger la DLL 'libgtk-win32-2.0-0.dll': La procédure spécifiée est introuvable. (Exception de HRESULT : 0x8007007F)
2017-06-17 01:05:27,917 [Launchpad.Launcher.Program | FATAL]: Exception Stacktrace: à Gtk.Application.gtk_init(Int32& argc, IntPtr& argv)
à Gtk.Application.Init()
à Launchpad.Launcher.Program.Main()

Can you make a new doc?

I am not able to understand how to use it from the source. Also the links are not working.(link from launcher utlis)

Launcher freezes when trying to upload banner.png

Launcher freezes when I am trying to upload banner.png into launcher folder on ftp, seems it cant connect to server.
If I remove banner.png from the ftp folder it starts to work again.
If i change config file to your ftp - it downloads banner and everything looks ok.
Any suggestions?
With much thanks!

Large File resume unhandled error

Error -

An unhandled exception of type 'System.ArgumentOutOfRangeException' occurred in System.Windows.Forms.dll
Additional information: Value of '10008' is not valid for 'Value'. 'Value' should be between 'minimum' and 'maximum'.

e -

DownloadedBytes - 792447924
DownloadedFiles - 0
FileName - "TC-WindowsNoEditor"
TotalBytes - 791775078
TotalFiles - 0

Cause: Lacks clamping -

                 if (e.DownloadedBytes > 0 && e.TotalBytes > 0)
                    {
                        double fraction = ((double)e.DownloadedBytes / (double)e.TotalBytes) * 10000;

                        mainProgressBar.Value = (int)fraction;
                        mainProgressBar.Update();
                    }   

Function -

 private void OnGameDownloadProgressChanged(object sender, FileDownloadProgressChangedEventArgs e)
        {
            this.Invoke((MethodInvoker)delegate
            {
                if (!String.IsNullOrEmpty(e.FileName))
                {
                    string progressbarText = String.Format(
                                                        LocalizationCatalog.GetString("fileDownloadMessage"),
                                                        System.IO.Path.GetFileNameWithoutExtension(e.FileName),
                                                        e.DownloadedBytes.ToString(),
                                                        e.TotalBytes.ToString());

                    downloadProgressLabel.Text = progressbarText;

                    mainProgressBar.Minimum = 0;
                    mainProgressBar.Maximum = 10000;

Now its saying failed to connect to patch server

the project is saying failed to connect to patch server.

here is my LauncherConfig.ini

[Local]
LauncherVersion = 0.3.0.24157
GameName = MultiTest
SystemTarget = Win64
GUID = 8637b68e-95c3-1941-b34b-7663ea148028
MainExecutableName = MultiTest

[Remote]
ChangelogURL = http://192.168.0.15/launchpad/changelog.html
Protocol = HTTP
FileRetries = 2
Username = anonymous
Password = anonymous
BufferSize = 8192

[FTP]
URL = ftp://192.168.0.15

[HTTP]
URL = http://192.168.0.15/launchpad

[BitTorrent]
Magnet =

[Launchpad]
bOfficialUpdates = true
bAllowAnonymousStats = true

and my vsftpd is set to local_root=/srv/
I also have anonymous_enable=YES

Sorry if im bothering you with this.

Suggestion: Delete Old Files

I don't believe this feature is implemented, but I think there should be a way to delete the game folder of all files not listed in the manifest. Some games generate config files that can generate user errors (if the user does something wrong). And/or maybe files listed in manifest with a null or 00000000000000000000 as their md5 will signal that this file is flagged for deletion.

Change localization engine to NGetText

Currently, the Windows strings and Unix strings are sourced from two different files. NGetText should be used instead, since it is GNU/GetText and supports both platforms.

Implement BitTorrent protocol

In an effort to make the launcher more widely usable, BitTorrent should be implemented as a supported protocol.

See the milestone for more information.

TODO

  • Implement protocol
  • Document use of protocol

Implement Amazon S3 Bucket protocol

In an effort to make the launcher more widely usable, Amazon S3 should be implemented as a supported protocol.

See the milestone for more information.

TODO

  • Implement protocol (DONE: Protocol supports access via HTTP/HTTPS)
  • Document use of protocol

License

I know that you have said that this is under the MIT license with the Gentleman's agreement of not distributing this as a standalone product, but I think you are taking the wrong approach by stating it like that. The MIT license has an expectation with those that know about it as being essentially do what you want to it.

A better approach since you want to modify the license is to use one that allows that sort of thing by design.

Here is a site that gives and easy to use breakdown of different open source licenses.
http://choosealicense.com/licenses/

I would recommend using a license like the No License, which restricts most things, but allows you to specifically unrestrict them at your digression. It is essentially a "Build your own" license.

The No license looks like this by default.

Copyright [year] [fullname]

And you just add the specific things you unrestrict after it.

These are the default rules to No License.

How to apply this license

Simply do nothing, though including a copyright notice is recommended.

Note: This option may be subject to the Terms Of Use of the site where you publish your source code.
Required

License and copyright notice
Permitted

Commercial Use
Private Use
Forbidden

Distribution
Modification
Sublicensing

Implement Dropbox protocol

In an effort to make the launcher more widely usable, Dropbox should be implemented as a supported protocol.

See the milestone for more information.

TODO

  • Implement protocol
  • Document use of protocol

Not starting custom Version

I get the following Error and a 404 but in the browser It works perfect. What did I wrong? (I hope German isn't a problem otherwise I will translate it :))
$exception {System.NotSupportedException: Dieser Stream unterstützt keine Suchvorgänge. bei System.Net.ConnectStream.get_Length() bei Launchpad.Launcher.Handlers.Protocols.HTTPProtocolHandler.ReadRemoteFile(String URL, Boolean useAnonymousLogin) bei Launchpad.Launcher.Handlers.Protocols.HTTPProtocolHandler.GetRemoteLauncherVersion() bei Launchpad.Launcher.Handlers.Protocols.HTTPProtocolHandler.IsLauncherOutdated() bei Launchpad.Launcher.Handlers.ChecksHandler.IsLauncherOutdated() bei Launchpad.Launcher.WindowsUI.MainForm..ctor() bei Launchpad.Launcher.Program.Main()} System.NotSupportedException

Extreme Duplication

Huge amounts of code is duplicated between Windows and Unix UI. These should be abstracted out to use a common code base.
Is the best method for cross platform to use two unique UI toolkits? Seems repetitive and counter-intuitive

vsftpd wont transfer large files through public IP

when I connect to it using the private IP (192.blah), it works perfectly, everything transfers super fast, BUT when I connect to it using the public IP port forwarded on my router, it connects and can transfer small files but completely fails with anything over 4000Kb

Download Threading

The downloading of files from FTP should be away from the UI thread this would allow for simulations downloads instead of 1 file at a time.

Implement Google Cloud Storage protocol

In an effort to make the launcher more widely usable, Google Cloud Storage should be implemented as a supported protocol.

See the milestone for more information.

TODO

  • Implement protocol (DONE: Protocol supports access through HTTP/HTTPS)
  • Document use of protocol

GUID generation only generates a per-game signature, not per-user.

Due to the location the GUID is stored in (the settings file), the GUID is typically only generated once when the launcher is packaged. The GUID should be stored separately from the configuration file, and should not be packaged along with the release binaries.

Move from direct executable updating to installation package

Just updating the launcher binary will not work in the future. An installation package approach is more advisable.

Possible solutions:

  • Inno Setup on Windows
  • .deb package on Linux
  • .app package on Mac
  • Custom solution using the same Manifest-Server model as the game installation

Launchpad (and utilities) silently exiting on Windows, log empty

Upon attempting to run the pre-compiled Launchpad binaries (and the utilities app) under Windows 10 1809, the app immediately closes silently. There's no output to either the command line or the log.

I suspected that it might be due to missing .net libraries, but when I attempt to install it, I get .NET Framework 4.6.2 or a later update is already installed on this computer., with no way to force an install.

So, switching to trying to compile my own version in Visual Studio 2017, I am presented with these errors:

image

Again, I can't install these libraries for the reason stated above.

I tried installing Mono, as somebody suggested in another thread, but even installing both x64 and x86 libraries made no difference.

Suggestion: Tutorial

Hi!
My suggestion, create a tutorial video series .
-Installation Requirements (Win and Linux)
-Compilation
-Implementation

This tutorial helps popularize the repository.
I would like to create, but my English is bad.

Error Handling

Multiple errors go unchecked. If manifest fails to download, you will get a success message for the mere act of downloading the .provides file

Implement ownCloud protocol

In an effort to make the launcher more widely usable, ownCloud should be implemented as a supported protocol.

See the milestone for more information.

TODO

  • Implement protocol (DONE: Protocol supports access via HTTP/HTTPS)
  • Document use of protocol

Launchpad freezing

When I deleted a file to check if the install verifier worked, instead of letting me click Yes or No it just froze.

Implement Google Drive protocol handler

In an effort to make the launcher more widely usable, Google Drive should be implemented as a supported protocol.

See the milestone for more information.

TODO

  • Implement protocol
  • Document use of protocol

Implement resuming of large files

When downloading large files such as .pak files, it is very simple to be interrupted and lose all progress.

Implement resuming in

  • FTPHandler.cs
    using ContentOffset.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.