Code Monkey home page Code Monkey logo

wpilibinstaller-avalonia's Introduction

WPILibInstaller-Avalonia

Welcome to the WPILibInstaller repository, which hosts the source code used to install the various components, libraries, and applications of the wpilibsuite.

Generating Installers

Required Dependencies

  • DotNetCore 8.0 or higher.
  • Java 11

Building

An installer can be generated by running the following command:

gradlew generateInstallers -PXmx3072m -PlinuxBuild -PjenkinsBuild

-PlinuxBuild can be replaced with the OS of your choice to build.

  • -PlinuxBuild
  • -PlinuxBuildArm64
  • -PmacBuild
  • -PmacBuildArm
  • -PwindowsBuild

If no OS argument is given, it will default to building Windows 64. Additionally, the other gradle options ensure that the build has enough RAM to build properly. It's not recommended to build the installer if your system has less than 4GB of RAM.

Organization of repository

This is the organization of the repository directories

  • WPILibInstaller-Avalonia (Contains the C# application files for the installer UI, as well as the main installer program)
  • WPILibShortcutCreator (Contains various scripts to handle creating shortcuts on different OSes)
  • apps (Integrates with Gradle into downloading the various WPILib tools and applications needed)
  • files (Miscellaneous script files that are used for VSCode integration, and path handling)
  • scripts (Core gradle scripts that download required dependencies)

License

This repository is licensed under BSD 3. Copyright FIRST All rights reserved.

wpilibinstaller-avalonia's People

Contributors

austinshalit avatar calcmogul avatar daltz333 avatar dependabot[bot] avatar gold856 avatar jkunkee avatar jwbonner avatar noamzaks avatar ohowe1 avatar peterjohnson avatar prateekma avatar sciencewhiz avatar spacey-sooty avatar starlight220 avatar thadhouse avatar thetriplev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

wpilibinstaller-avalonia's Issues

Installer crashes when trying to skip VS Code install

Stacktrace:

System.TypeLoadException
   at MessageBox.Avalonia.Views.MsBoxStandardWindow.!XamlIlPopulate(IServiceProvider , MsBoxStandardWindow )
   at MessageBox.Avalonia.Views.MsBoxStandardWindow.!XamlIlPopulateTrampoline(MsBoxStandardWindow )
   at MessageBox.Avalonia.Views.MsBoxStandardWindow.InitializeComponent()
   at MessageBox.Avalonia.Views.MsBoxStandardWindow..ctor(Style style)
   at MessageBox.Avalonia.MessageBoxManager.GetMessageBoxStandardWindow(MessageBoxStandardParams params)
   at MessageBox.Avalonia.MessageBoxManager.GetMessageBoxStandardWindow(String title, String text, ButtonEnum enum, Icon icon, Style style)
   at WPILibInstaller.ViewModels.VSCodePageViewModel.SkipVsCodeFunc()

Reproduction steps:

  1. when asked to select how to install VS Code (the first screen after start), select Skip installing VS Code.

Linux tar.gz has files marked executable that don't need to be

-rwxr--r-- 1 joe joe 1086704 Nov 2 23:03 libHarfBuzzSharp.so
-rwxr--r-- 1 joe joe 920882 Nov 2 23:03 libMonoPosixHelper.so
-rwxr--r-- 1 joe joe 8541744 Nov 2 23:03 libSkiaSharp.so
-rwxr--r-- 1 joe joe 2416513 Nov 2 23:03 System.Reactive.xml

Feedback from post6733

UX: Continue button moves

The continue button moves around. It should always be in the bottom right. In the example below, the continue button is replaced by the back button.

image

image

Use python to execute .py scripts

The scripts for SetupTools and CleanMavenMetadata are called as executables -- this doesn't work on Mac.

https://github.com/wpilibsuite/WPILibInstaller-Avalonia/blob/master/WPILibInstaller-Avalonia/ViewModels/InstallPageViewModel.cs#L456

My temporary workaround (needs to be more robust to various python installations):

private Task<bool> RunScriptExecutable(string script, params string[] args)
{
    ProcessStartInfo pstart;
    if (script.Contains(".py"))
    {
        pstart = new ProcessStartInfo();
        pstart.FileName = "/usr/bin/python3";
        pstart.Arguments = script;
    }
    else
    {
        pstart = new ProcessStartInfo(script, string.Join(" ", args));
    }
    var p = Process.Start(pstart);
    return Task.Run(() =>
    {
        return p!.WaitForExit(5000);
    });
}

Create a basic vs advanced install path

We should hide some of the installation paths and user options to avoid confusion about what is needed. This path would automatically install everything and download a single instance of VS Code. We can create an advanced button on the start page that then allows users to select what they want to install.

This is spawned from feedback in post6706.

Mac installer fails on non-existant directory

When I tried to install with single VS Code, the installer failed with:

System.ComponentModel.Win32Exception (2): No such file or directory
   at System.Diagnostics.Process.ForkAndExecProcess(String filename, String[] argv, String[] envp, String cwd, Boolean redirectStdin, Boolean redirectStdout, Boolean redirectStderr, Boolean setCredentials, UInt32 userId, UInt32 groupId, UInt32[] groups, Int32& stdinFd, Int32& stdoutFd, Int32& stderrFd, Boolean usesTerminal, Boolean throwOnNoExec)
   at System.Diagnostics.Process.StartCore(ProcessStartInfo startInfo)
   at System.Diagnostics.Process.Start()
   at System.Diagnostics.Process.Start(ProcessStartInfo startInfo)
   at WPILibInstaller.ViewModels.InstallPageViewModel.RunScriptExecutable(String script, Int32 timeoutMs, String[] args) in /Users/runner/work/WPILibInstaller-Avalonia/WPILibInstaller-Avalonia/WPILibInstaller-Avalonia/ViewModels/InstallPageViewModel.cs:line 497
   at WPILibInstaller.ViewModels.InstallPageViewModel.RunToolSetup() in /Users/runner/work/WPILibInstaller-Avalonia/WPILibInstaller-Avalonia/WPILibInstaller-Avalonia/ViewModels/InstallPageViewModel.cs:line 514
   at WPILibInstaller.ViewModels.InstallPageViewModel.RunInstall() in /Users/runner/work/WPILibInstaller-Avalonia/WPILibInstaller-Avalonia/WPILibInstaller-Avalonia/ViewModels/InstallPageViewModel.cs:line 103
   at WPILibInstaller.ViewModels.InstallPageViewModel.<>c__DisplayClass16_0.<<-ctor>g__installFunc|0>d.MoveNext() in /Users/runner/work/WPILibInstaller-Avalonia/WPILibInstaller-Avalonia/WPILibInstaller-Avalonia/ViewModels/InstallPageViewModel.cs:line 67

When I tried with skip VS code, it failed with

System.TypeLoadException: Could not load type 'Avalonia.Markup.Xaml.MarkupExtensions.BindingExtension' from assembly 'Avalonia.Markup.Xaml, Version=0.10.0.0, Culture=neutral, PublicKeyToken=null'.
   at MessageBox.Avalonia.Views.MsBoxStandardWindow.!XamlIlPopulate(IServiceProvider , MsBoxStandardWindow )
   at MessageBox.Avalonia.Views.MsBoxStandardWindow.!XamlIlPopulateTrampoline(MsBoxStandardWindow )
   at MessageBox.Avalonia.Views.MsBoxStandardWindow.InitializeComponent()
   at MessageBox.Avalonia.Views.MsBoxStandardWindow..ctor(Style style)
   at MessageBox.Avalonia.MessageBoxManager.GetMessageBoxStandardWindow(MessageBoxStandardParams params)
   at MessageBox.Avalonia.MessageBoxManager.GetMessageBoxStandardWindow(String title, String text, ButtonEnum enum, Icon icon, Style style)
   at WPILibInstaller.ViewModels.VSCodePageViewModel.SkipVsCodeFunc() in /Users/runner/work/WPILibInstaller-Avalonia/WPILibInstaller-Avalonia/WPILibInstaller-Avalonia/ViewModels/VSCodePageViewModel.cs:line 143

My user directory is /Users/nyjeanne. There is no /Users/runner. I don't know where it is getting that from.

I don't think is relevant, but I had to right click and choose open to get around the Apple cannot check for malicious software/verify the identity of the developer.

Crash on Invalid ZIP

Selecting an Invalid ZIP file gives the following exception. The reasonable response would be to tell the user that the zip file is invalid and select a different zip file.

System.NullReferenceException
  HResult=0x80004003
  Message=Object reference not set to an instance of an object.
  Source=WPILibInstaller_Avalonia
  StackTrace:
   at WPILibInstaller_Avalonia.ViewModels.StartPageViewModel.<SelectResourceFilesFunc>d__23.MoveNext() in C:\Users\Dalton Smith\Documents\WPILibInstaller-Avalonia\WPILibInstaller-Avalonia\ViewModels\StartPageViewModel.cs:line 95

On using (StreamReader reader = new StreamReader(entry.Open()))

Crash on Installation Step/Screen

System.ComponentModel.Win32Exception
  HResult=0x80004005
  Message=The system cannot find the file specified.
  Source=System.Diagnostics.Process
  StackTrace:
   at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
   at System.Diagnostics.Process.Start()
   at System.Diagnostics.Process.Start(ProcessStartInfo startInfo)
   at WPILibInstaller_Avalonia.ViewModels.InstallPageViewModel.<>c__DisplayClass32_0.<RunVsCodeExtensionsSetup>b__8() in C:\Users\Dalton Smith\Documents\WPILibInstaller-Avalonia\WPILibInstaller-Avalonia\ViewModels\InstallPageViewModel.cs:line 506
   at System.Threading.Tasks.Task`1.InnerInvoke()
   at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)

on
Fixing up metadata when I just pressed "Next" without installing VS Code

macOS Menu not available

Sometimes when using the installer on macOS the menubar menu becomes unavailable. When I click on the menu bar, I see the click register but no menu appears and the computer beeps. The computer also beeps when I press a keyboard shortcut (command + q).

UX - Next button moves

The continue button moves around. It should always be in the bottom right. In the example below, the continue button is replaced by the back button.

image

image

Cleanup 2020 tools

image

With 2021, the plan is to put the tools into a folder, we should cleanup the 2020 tools and put them in a folder too that way users cannot get confused.

Add option for running by CLI args

This would be very helpful for install automation. I can try to help implement this, but I am not very sure in my ability to help significantly.

Add drive space check

            try
            {
                var rootDirectory = Directory.GetDirectoryRoot(Environment.GetFolderPath(Environment.SpecialFolder.Personal));

                var driveInfo = new DriveInfo(rootDirectory);

                if (driveInfo.AvailableFreeSpace < 3L * 1000L * 1000L * 1000L)
                {
                    ;
                    // Fail
                }
            }
            catch
            {
                // Do nothing if we couldn't determine the drive
            }

In theory, this might work on unix platforms as well.

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.