I am trying to set up this app for a friend and copy my settings from the standard portable version to the PA.c version.
Trouble is, no matter where I put the data folder from my install to the PA.c Data folder, nothing is recognised by the PA.c version of CudaText. I've tried several locations inside the PA.c Data folder.
Where do I put all the settings?
To be clear, the PA.c version data folder is here:
- F:\PortableApps\PortableApps\CudaTextPortable\App\CudaText\data
But obviously I cannot store these settings here as they will be overwritten on an update.
So where do they go for the PA.c version?
Thanks.
That data directory is part of the app, it's not your settings. The settings get stored in a settings folder within CudaTextPortable\App\CudaText\setings while running. That is moved to CudaTextPortable\Data]CudaTextSettings when closed.
Sometimes, the impossible can become possible, if you're awesome!
Thanks for your reply John.
I have been using CudaText for years and been in touch with Alexey, the dev, and am aware of several things in that data folder that are specifically user based. These files will get deleted on update if I place them in that folder.
eg. changes to lexers or user created lexers are stored here, snippets, user themes, user toolbar icons for codetree, toolbars and sidebar, all stored in the data folder: - F:\PortableApps\PortableApps\CudaTextPortable\App\CudaText\data
It seems that this wasn't checked properly for user data before release.
No problem, but would be best if this folder were added to the PortableApp/Data folder too.
Live for an ideal and leave no place in the mind for anything else.
The files within that data directory are preserved on upgrade.
Sometimes, the impossible can become possible, if you're awesome!
I'll give it a try, see how it goes.
What about updates to language files? Or even if the app updates it's lexers of anything else in there? How does that get dealt with? I thought PA.c apps always removed the whole 'App' directory on update, and that was why the Data folder contains every apps settings.
EDIT: Doesn't work correctly. It seems many settings regarding Toolbar setup are ignored. No Menu bar is shown as my original setup has it hidden and all shown in a burger menu, which is not shown on the Toolbar either.
Live for an ideal and leave no place in the mind for anything else.
Anything from the updated version within data will overwrite the existing ones, just as the publisher's zipped version does on upgrades. This is sometimes a setting to the PA.c Installer when apps don't separate out user settings vs internal app stuff. Unlike the publisher's release, all updated locales at time of publishing are included.
What specifically did you change that didn't get preserved?
Sometimes, the impossible can become possible, if you're awesome!
Toolbar settings have changed, ie, default buttons have been changed to my own preferred set. I've also changed icons for the buttons I am using. Due to the settings the Menu Bar is not shown meaning I can't access any functions to change the setup. I'm not sure these settings are in the CudaText/data folder. They may be in CudaTextPortable/Data/CudaTextSettings.
As I have used my own dark theme, that is not used.
22 lexers have been modified by me which, with PA.c updates will overwrite these.
Clips folder which contains user snippets files.
Live for an ideal and leave no place in the mind for anything else.
Ah ok, I see what you're saying now. I've posted the updated version. It should preserve your existing data within the App folder and move it to the new Data\CudaTextData where it will be stored between runs and be properly backed up from. The launcher has custom code to upgrade the languages from the DefaultData once per version release on startup.
I think this should address the issues you've mentioned experiencing above. Please let me know for sure. My apologies for not fully understanding it earlier.
Sometimes, the impossible can become possible, if you're awesome!
Thanks for implementing that.
Just to clarify:
Themes = All good
Lexers = Checked with xml and ini files, looking good.
Clips = Unable to check as the Toolbar still doesn't show my arrangement with the Burger Menu.
Toolbar = I checked after opening CTP that all required files were moved to the correct location and it seems correct, yet the Toolbar doesn't show my selection of buttons, only the default set. Would it be helpful to send my whole NON PA.c configuration to you? Or maybe just the settings files?
No apology necessary
Here is my Toolbar code showing my selected icons, so you can see what I mean. I also have a Menu setup as the first Button in this list, which is the entire MenuToolbar configured as a drop down menu system.
Live for an ideal and leave no place in the mind for anything else.
Yes, that would be helpful. Please send a ZIP if your non-PAF version as well as a screenshot of what it's expected to look like vs what's missing. You can send it to the developers address on the contact page in about. I'd like to get to the bottom of it. Thanks.
Sometimes, the impossible can become possible, if you're awesome!
I tried sending it as zip attachment, which failed, apparently it thinks it's a virus! Please double check just in case, shouldn't be though.
Resent as a RAR attachment. Seemed to go that time.
Live for an ideal and leave no place in the mind for anything else.
Got the RAR and tested it out. It looks like the py files also get updated with addons and such and need to be preserved. I've updated the launcher to handle that as well. Please try out Rev 2. You can install over your existing PAF version. After you install it, copy your existing CudaText\py file from your working non-PAF version to CudaTextPortable\Data\CudaTextPy. You don't need to replace any existing files there just add yours in. This allows all your existing stuff to work in my quick testing. I have it setup to update any py files once on each upgrade same as with the lang files so they don't go out of date.
Sometimes, the impossible can become possible, if you're awesome!
It worked, thanks for that. It's extremely slow to startup, around 1.5 - 2 mins for my old USB thumb drive! But CT has thousands of files being moved about, 2,549 to be precise!!
I'm no expert at this sort of thing, but is moving files like this ok? I mean, where these apps are run several times a day, is there no risk of degradation or file loss?
Great job, thank you!
Live for an ideal and leave no place in the mind for anything else.
Have you tried the second launch to check the speed? The first launch after an upgrade, it's essentially finishing the upgrade by copying over all the py and lang files. Second and later launches, it's just renaming 3 folders from Data to App and back again on exit. It doesn't rename them all individually or copy/replace any files.
Sometimes, the impossible can become possible, if you're awesome!
Just restarted my PC to check how quickly a fresh run of CTP would be and it's almost instant now!
Thank you for your help John!
Live for an ideal and leave no place in the mind for anything else.
The above issues with data and py are fixed in today's CudaText Portable 1.214.6.6 release. I also incorporated the Data upgrades to py and lang into the installer so it will normally upgrade all of that as part of the installers upgrade process, eliminating first run after upgrade slowness. I left it in the launcher as well for if a user restores Data from a backup at some point.
And thanks again sl23 for sending me your files so I could get things fixed.
Sometimes, the impossible can become possible, if you're awesome!