Ravbug/UnityHubNative

Linux : Install editor from "Editor Version", and maybe an update notification

hunabku94 opened this issue · 8 comments

Is your feature request related to a problem? Please describe.
No

Describe the solution you'd like
A way to install editor, and if one is, an icon or something to advert there is an update

Describe alternatives you've considered

Additional context

New editor versions can be installed from the Editor tab.

Maybe the linux release, or i'm tired but where can i please ?

qNlXscn

The Linux version currently doesn't support installing Editor versions, sorry. You're welcome to make a PR.

I don't know C++, but i can't totaly help for the linux part ;-)

i know some C#, can help, maybe

So, i have time and i'm motivated to add this feature.

I get an eye to the code and it's hard to me to understand the structure and what i need to modify.

Can we work together to do that feature ?

This line of code disables the "Install New" button on Linux. Removing the linux check will re-enable the button:

#if defined __linux__
launchHubBtn->Hide();
#endif

The code for the Install New dialog and associated functionality lives in add_install_dlg_derived.cpp. The Install Via (Official) Hub button might work out-of-the-box, but I haven't tested it as I don't currently have a machine running Linux.

Beyond that, installing outside the official hub will require some additional effort. You'll likely need to add a new case to this section of code:

// download the file
string url = "https://download.unity3d.com/download_unity/" + data.hashcode + "/UnityDownloadAssistant" +
#ifdef __APPLE__
".dmg";
#elif defined _WIN32
".exe";
#elif __linux__
#else
#error This platform is not supported.

as well as this section of code to launch their installer:
// open the file
wxCommandEvent lnevt(executeEvt);
#ifdef __APPLE__
lnevt.SetString(fmt::format("open \"{}\"", outpath));
#elif defined _WIN32
lnevt.SetString(fmt::format("\"{}\"", outpath));
#endif

Thanks i will see for that