I like to use vimperator with firefox. Unfortunately, they expect a config file in the user folder. That can be overridden by setting an environment variable on startup. Is the PA wrapper able to pass arbitrary environment variables? Is there some other way to get it to work?
Thanks,
Carl Flippin
Any environment variable you pass to FirefoxPortable.exe will be passed to firefox.exe and to whatever it launches.
Sometimes, the impossible can become possible, if you're awesome!
I understand that. I guess I'm asking how I would pass an environment variable when I am launching from the PAM. I tried making a batch file and putting it in like a foreign application but it does not show up. Is there a standard way to get an environment variable passed in?
As far as I am aware, there is no standard way to do this.
However, you could convert the BAT to an EXE, http://www.google.nl/search?q=bat+to+exe
This will not hide the firefox original icon though, however you could make it like this:
Root of your drive
-- Portableapps
---- Firefox
------ The converted bat
------ The originial FirefoxPortable Directory
---- ...
-- ...
Behold, the DutchLander has arrived.
Grammatical errors are copyrighted.
I have made a modification of current Firefox Portable.
Add some codes to make Vimperator fully portable.
Using set environment way.
And add a line to set vimperator directory in ${NAME}.ini.
And add a feature to import local vimperator config.
I think Firefox Portable is under GNU so this is legal.
Could I public the link here?
Regards,
David
Out of interest, what is the variable that it uses? $HOME?
I am a Christian and a developer and moderator here.
“A soft answer turns away wrath, but a harsh word stirs up anger.” – Proverbs 15:1
Yes, it seems $HOME works well.
Put this before LaunchNow:
VimperatorEnvironment:
System::Call 'Kernel32::SetEnvironmentVariable(t, t) i("HOME", "$VIMPERATORDIRECTORY").r0'
I start the PAM with a batch file that contains the "setlocal" command. All the environmental parameters set after that command get passed to all descendant shells and child processes, unless you run the "endlocal" command. From my batch file:
@ECHO off
SETLOCAL EnableExtensions
FOR /F "Tokens=*" %%D In ('CD') Do Set CD=%%D
START %CD%"PortableApps"\"PortableApps.com"\PortableAppsPlatform.exe
I have Command Line Portable installed in my PAM from which I can run the "set" command and confirm that all the parameters that are set in the batch file that starts PAM are indeed being passed to the CLP shell.
More on setlocal: http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs...
If you don't want this parameter to affect everything PAM runs, you also can start FFP with a batch file of its own and pass the parameters just to its shell.
There's a file named FirefoxPortable.ini in the directory: \PortableApps\FirefoxPortable\Other\Source. Copy that file into the directory \PortableApps\FirefoxPortable, where the file FirefoxPortable.exe is. The .ini file is ignored unless it happens to be in this directory. Edit the line in the .ini that reads FirefoxExecutable=firefox.exe and change the "firefox.exe" to match the name of your batch file. Put the batch file in the directory: \PortableApps\FirefoxPortable\App\Firefox, along with the firefox.exe. Include the command after setting your environmental parameter to start firefox.exe.
I can't comprehend what you're trying to do. You're taking an extraordinarily circuitous route to do what is already supported.
The environment variable "CD" is already set. You can just do this to run it:
And as for passing environment variables, you just set it and it will go through. setlocal is for not doing that.
Besides all that, I can't work out how this is at all relevant to the discussion.
I am a Christian and a developer and moderator here.
“A soft answer turns away wrath, but a harsh word stirs up anger.” – Proverbs 15:1
Then I was mistaken. Thank you for educating me.