Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rewrite bundling code to be more centralized #439

Open
calcmogul opened this issue Oct 8, 2024 · 0 comments
Open

Rewrite bundling code to be more centralized #439

calcmogul opened this issue Oct 8, 2024 · 0 comments

Comments

@calcmogul
Copy link
Member

The bundling code for, say, AdvantageScope is spread across many files:

[tav@myriad WPILibInstaller-Avalonia]$ rg AdvantageScope
scripts/tools.gradle
10:def advantageScopeScriptFile = file("files/AdvantageScope.vbs")
11:def advantageScopeScriptPythonFile = file("files/AdvantageScope.py")
12:def advantageScopeScriptUnixFile = file("files/AdvantageScope.sh")
55:    advantageScopeItem['name'] = "AdvantageScope"

scripts/advantagescope.gradle
3:def baseUrl = "https://github.com/Mechanical-Advantage/AdvantageScope/releases/download/$advantagescopeGitTag/"
27:def downloadTaskWindows = tasks.register('downloadAdvantageScopeWindows', Download) {
34:def downloadTaskMac = tasks.register('downloadAdvantageScopeMac', Download) {
41:def downloadTaskMacArm = tasks.register('downloadAdvantageScopeMacArm', Download) {
48:def downloadTaskLinux = tasks.register('downloadAdvantageScopeLinux', Download) {
55:def downloadTaskLinuxArm64 = tasks.register('downloadAdvantageScopeLinuxArm64', Download) {

WPILibInstaller-Avalonia/Models/AdvantageScopeConfig.cs
7:    public class AdvantageScopeConfig

apps/ToolsUpdater/src/main/java/Program.java
100:  private static void installAdvantageScope(String toolsPath) {
134:        if (tool.name.equals("AdvantageScope")) {
135:          installAdvantageScope(toolsPath);

files/AdvantageScope.sh
14:    open "$AS_PATH/AdvantageScope (WPILib).app"

WPILibInstaller-Avalonia/Interfaces/IConfigurationProvider.cs
17:        AdvantageScopeConfig AdvantageScopeConfig { get; }

files/AdvantageScope.py
16:    cmd = ["open", year_folder + "/advantagescope/AdvantageScope (WPILib).app"]
18:    cmd = [year_folder + "\\advantagescope\\AdvantageScope (WPILib).exe"]

files/AdvantageScope.vbs
7:'Get the AdvantageScope folder
13:fullExeName = fso.BuildPath(advantageScopeFolder, "AdvantageScope (WPILib).exe")

WPILibInstaller-Avalonia/ViewModels/StartPageViewModel.cs
211:                AdvantageScopeConfig = JsonConvert.DeserializeObject<AdvantageScopeConfig>(configStr, new JsonSerializerSettings
415:        public AdvantageScopeConfig AdvantageScopeConfig { get; private set; } = null!;

WPILibInstaller-Avalonia/ViewModels/InstallPageViewModel.cs
97:                configurationProvider.AdvantageScopeConfig.Folder + "/",
801:            shortcutData.DesktopShortcuts.Add(new ShortcutInfo(Path.Join(frcHomePath, "advantagescope", "AdvantageScope (WPILib).exe"), $"{frcYear} WPILib Tools/AdvantageScope (WPILib) {frcYear}", $"AdvantageScope (WPILib) {frcYear}", ""));
812:            shortcutData.StartMenuShortcuts.Add(new ShortcutInfo(Path.Join(frcHomePath, "advantagescope", "AdvantageScope (WPILib).exe"), $"Programs/{frcYear} WPILib Tools/AdvantageScope (WPILib) {frcYear}", $"AdvantageScope (WPILib) {frcYear}", ""));

We should refactor the process to make it easier to bundle new applications like Elastic and Choreo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant