-
Notifications
You must be signed in to change notification settings - Fork 131
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
Enable Portable Mode in Blueprint #276
base: master
Are you sure you want to change the base?
Conversation
…into portable-mode
@marcdumais-work Ping? |
theia-extensions/product/src/node/theia-blueprint-variables-server.ts
Outdated
Show resolved
Hide resolved
Generally, I like how small the code change is for this. The concern I have is not related to the code as such, but how to present and document this feature in the correct light, to set reasonable expectations. The equivalent vscode feature is documented to work only with the ".zip" install "package", which is natural for the end-user to install somewhere, where they have write permissions. i.e. often under they own home folder. I suspect vscode does that to avoid as much as possible the permissions problems that would occur if the user tried the procedure on a globally-installed instance of vscode (i.e. installed from a .msi on Windows, .deb on Debian/Ubuntu Linux). One little peculiarity we have vs vscode I think, is that on Linux one can generate a .AppImage package for a Theia app, that's static and cannot be modified - in consequence it will not be possible to create the "data" folder, under the app's install folder, in this case (not for the end-user anyway). |
a thought: we could do like vscode and officially support portable mode only for "zip" packages. I think we could provide these packages by zipping the "prepackage folder" , generated by "yarn electron package:preview", which we already do in Jenkins CI (we may be skipping built-ins download for efficiency ATM, which would need revert). |
FYI, @vladarama will be back in a few weeks, working part-time. If this is wanted sooner, I think he would not mind, if someone took it over. |
…into portable-mode
…into portable-mode
This commit addresses review commments and adds caching to avoid reading and writing to the disk too often. Signed-off-by: Vlad Arama <[email protected]>
@vladarama, the current code is a full copy-paste of the default Theia code except for the |
@kittaakos Any thoughts on removing |
I think this is the right way to go, it is a lot simpler to do for the end-user. |
I think this feature could be added in Theia directly - is that what you meant? |
Yep it has been added in eclipse-theia/theia@bf93b29 I think we can just use |
If we remove |
Here is an update: Removing As for the customizability of the |
Portable Mode in Theia Blueprint
Fixes: #270
Creating a
data
folder at the root of a Theia Blueprint application install (next to the executable) will make it portable. So all of the app data and user data will get written to thedata
folder instead of their default locations.The
.theia-blueprint
folder is moved from the user’s home directory (%userprofile%
or~/
) to a folder calleduser-data
inside thedata
folder.user-data
contains all of the settings, preferences and extensions.In addition, all of the application data which is stored by default inside a
Theia Blueprint
folder in (%appdata%
or~/.config
) is moved to a folder calledapp-data
inside thedata
folder.app-data
contains all of the application’s cache and layout information.How to Start (User Guide)
Windows, Linux, MacOS
Download and run the correct Theia Blueprint for your platform.
During the installation wizard, select the download location for the Blueprint application. After the install is finished, navigate to the download location and create a
data
folder. The file folder should look similar to the following:As such, all of the data created by Theia Blueprint will be stored inside the
data
folder, more specifically insideuser-data
andapp-data
.Updating Theia Blueprint Portable
Download the latest Theia Blueprint version and run the installer. Copy and paste your current
data
folder to the root of the directory where you installed the latest version of Blueprint. This should update your application.Migrate to Portable Mode
If you want to make an existing installation of Blueprint portable, you can do so with the following steps:
data
folder at the root of your Blueprint install directorydata
calleduser-data
:%userprofile%/.theia-blueprint
~/.theia-blueprint
~/.theia
data
calledapp-data
:%appdata%/Theia Blueprint
$HOME/.config/Theia Blueprint
$HOME/Library/Application Support/Theia Blueprint
This should make your existing installation portable.
How to test
The following changes only makes the
user-data
portable (settings, preferences, recent workspace ...)For the
app-data
to be made portable, the following PR should be merged, published to npm and the dependencies updated:eclipse-theia/theia#12690
You can test that the portable-mode is functional by packaging a new Theia Blueprint application using
yarn
and thenyarn electron package
. Then, you can run the executable and create adata
folder at the download location. This should write all the user data from~/.theia-blueprint
todata/user-data
.Review checklist
Reminder for reviewers