There is still the major blocker for this in that parts of the Komodo profile reside in a directory that is named after the computer hostname (which could be different for every machine you run upon).
In that case, you can install Komodo on the PC normally (or even install to the flash drive) and then just use the KOMODO_USERDATADIR environment variable to set where all the preferences are stored. Example:
set KOMODO_USERDATADIR=F:\komodo_profiles
Note: The environment variable must be set before Komodo is run (either through the command prompt or in the Windows system prefs).
So, I have to ask. I came home tried this out, and komodo is trying to Pre-load the Code Intelligence Database. Is there another folder of settings I need to copy over?
Batch file is a great idea! I'm not to familiar with how environment variables work, but this would create a temporary setting, right?
So, it would have to be redone every time the [cmd.exe is restarted|computer is restarted]. Also, can this be done on windows computers with non-admin privileges?
This batch file provides a non-admin priveledged way of changing the environment variable that only affects the running of the Komodo application. The trick is though, everytime you want to startup Komodo, you have to launch it using this batch file.
It finds the Drive Letter the batch file (which can be in any location on the same drive) is on and then it checks to see if the local folder is in the correct spot, if it's not it moves the folder to what Komodo expects "host-%computername%". If there are multiple host-___ folders this won't work (I'm not sure why there would be though).
@echo off
cd \
set KOMODO_USERDATADIR=%CD%Application Data\ActiveState\KomodoEdit
set KOMODO_HOSTDATADIR=%KOMODO_USERDATADIR%\4.2
IF NOT EXIST "%KOMODO_HOSTDATADIR%\host-%computername%\NUL" move "%KOMODO_HOSTDATADIR%\host-*" "%KOMODO_HOSTDATADIR%\host-%computername%"
"%CD%ActiveState Komodo Edit 4.2\komodo.exe"
I was using a test directory, it works just fine with real data :). This is a little more efficient in characters
REM @echo off
cd \
set KOMODO_USERDATADIR=%CD%Application Data\ActiveState\KomodoEdit
IF NOT EXIST "%KOMODO_USERDATADIR%\4.2\host-%computername%\NUL" move "%KOMODO_USERDATADIR%\4.2\host-*" "%KOMODO_USERDATADIR%\4.2\host-%computername%"
"%CD%ActiveState Komodo Edit 4.2\komodo.exe"
It spits out an error if the IF NOT EXIST fails, don't know why... but the command window closes so fast it doesn't matter.
There is still the major blocker for this in that parts of the Komodo profile reside in a directory that is named after the computer hostname (which could be different for every machine you run upon).
Reference:
http://aspn.activestate.com/ASPN/Mail/Message/komodo-discuss/3515928
I'm only going to be using this on one PC. So, if I just copy this folder I'm gravy?
In that case, you can install Komodo on the PC normally (or even install to the flash drive) and then just use the KOMODO_USERDATADIR environment variable to set where all the preferences are stored. Example:
Note: The environment variable must be set before Komodo is run (either through the command prompt or in the Windows system prefs).
For reference, here are the details for the Komodo profile settings:
http://community.activestate.com/faq/komodo-file-locations
Cheers,
Todd
So, I have to ask. I came home tried this out, and komodo is trying to Pre-load the Code Intelligence Database. Is there another folder of settings I need to copy over?
You can also set this up in a bat file, example "E:\runPortableKomodo.bat", which contains:
Note: You may have to customize the executable path.
Then when you double click/launch this "runPortableKomodo.bat" file, it will start Komodo with the custom user data profile directory.
Cheers,
Todd
Batch file is a great idea! I'm not to familiar with how environment variables work, but this would create a temporary setting, right?
So, it would have to be redone every time the [cmd.exe is restarted|computer is restarted]. Also, can this be done on windows computers with non-admin privileges?
This batch file provides a non-admin priveledged way of changing the environment variable that only affects the running of the Komodo application. The trick is though, everytime you want to startup Komodo, you have to launch it using this batch file.
Cheers,
Todd
Okay, I may finally have it hashed out. Here's my new batch file:
My directory structure on the flash drive is:
Applicaton Data/ActiveState/KomodoEdit/4.2 (local settings)
&&
ActiveState Komodo Edit 4.2/ (program)
It finds the Drive Letter the batch file (which can be in any location on the same drive) is on and then it checks to see if the local folder is in the correct spot, if it's not it moves the folder to what Komodo expects "host-%computername%". If there are multiple host-___ folders this won't work (I'm not sure why there would be though).
The renaming of the "host-" directory is a neat idea and I believe it should work.
The codeintel database preload step only occurs in either of these two times:
Todd.
I was using a test directory, it works just fine with real data :). This is a little more efficient in characters
It spits out an error if the IF NOT EXIST fails, don't know why... but the command window closes so fast it doesn't matter.