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

Allow development builds and stable builds to be installed simultaneously #1427

Open
colinkiama opened this issue Mar 31, 2024 · 4 comments
Open
Labels
Needs Design Waiting for input from the UX team

Comments

@colinkiama
Copy link
Member

Problem

When working on elementary Code in elementary Code, you currently need to restart the app whenever you build to see the latest changes.

For people who primarily use elementary Code as their code editor, you lose time restarting the app whenever you would like to preview your changes. Some changes may break the app and will result you in having to use another editor application or revert your changes to get the elementary Code working again.

Proposal

Set the development option in meson to true by default and use a different ID, icon and name to differentiate between stable builds and development builds.

Prior Art (Optional)

GNOME apps for example:

@colinkiama colinkiama added the Needs Design Waiting for input from the UX team label Mar 31, 2024
@jeremypw
Copy link
Collaborator

jeremypw commented Apr 1, 2024

I hard-coded a different app id in the Files Gtk4 branch but this sound more elegant.

@awsdert
Copy link

awsdert commented Apr 17, 2024

My suggestion for implementing this is for the main executable to be just a thin wrapper that launches the default build. For example: $>code could launch /bin/code which in turn would launch /bin/code-bin/code-rel while $>code --use=dev would launch /bin/code --use=dev which in turn would launch /bin/code-bin/code-dev. Any time you create a release you just make a copy of code-dev as code-rel. No complications as a result.

Edit: For distinguishing between code-rel and code-dev during runtime you could just load /proc/self/cmdline I think it was.

@jeremypw
Copy link
Collaborator

jeremypw commented Oct 9, 2024

You can run a different uninstalled branch of Code by editing meson-options.txt and changing the option development to default to true. If you have the installed (master) version of code already running then launching the rebuilt version of Code from the build directory should open another window . If you enter Multitasking View (<Super>Down) and hover of the Code windows you will see they have different app ids.

To be able to install two version you would have to temporarily change the meson project name so that the executables etc are distinct. However you could end up with lots of versions that would be a pain to uninstall. You could try changing the install directory too I guess. Not sure how much of this could (or should) be automatic.

Be aware that uninstalled versions of Code would use the master versions of any plugins so this method would not be suitable if you were developing a plugin.

@jeremypw
Copy link
Collaborator

@colinkiama I can confirm that running two installed versions of Code (with different names) is possible but is difficult and causes problems. It is time consuming to remove the development version. I suggest you try setting up a VM running the same version of elementaryos as the host (Gnome Boxes works well and is very easy). You can then share the code folder between host and VM. Edit the code in the host but install it on the VM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Design Waiting for input from the UX team
Projects
None yet
Development

No branches or pull requests

3 participants