Closed Bug 465874 Opened 12 years ago Closed 12 years ago
CE Environment Variables Have To Be Passed On Command Line
In WinCE, Environment Variables do not work as they do under LINUX or even Windows Desktop versions. WinCE has no environment variable support at all. For WinCE, in order to mimic the functionality provided by environment variables, all environment variables need to be passed from parent executable to child executable via the command line. This patch takes care of passing all environment variables as another argument on the command line. NOTE: There may be an upper limit to the amount of environment variables which can be passed in this way - perhaps 32k or maybe even as low as 4k. We may have to do trial-and-error testing to find out how big the environment variable passing could be. NOTE ALSO: Version 1.0 patch may not apply cleanly to mozilla-central with the WinMobile patch queue. I am trying to get a clean pull of mozilla-central and the patch queue to test/update this patch. As soon as I get a clean pull, I will update the attachment to a version 2.0 patch - the only difference being the application of v1.0 patch into the latest code.
Adds several special folders into environment variables, using the same environment variable names as the desktop. Here are the three currently added: APPDATA = "\Application Data" ProgramFiles = "\Program Files" windir = "\Windows"
Comment on attachment 350911 [details] [diff] [review] v2.0 patch - adds some special folders to env vars Oops - backing out the addition of env variable settings of special folders, which really belongs in bug 463326.
Comment on attachment 349107 [details] [diff] [review] v1.0 patch Backing out new attachment - which added code to this patch instead of to attachment for bug 463326
bsmedberg, can you think of a better way to do this? Windows mobile doesn't have a command line.
I think the general approach of using the commandline to schlep pseudo-environment data around is a good idea. In fact, it may be a good idea for the toolkit to use this approach (explicitly passing some kinds of state) instead of the environment. I think that the particular approach here is a bit messy; suggestions: * pass each environment variable separately as a name/value pair: ** --environ:NAME=VALUE * Make the API easier to read at the points where argv goes in/out: For use in nsWindowsWMain.cpp: /** argc/argv are in/out parameters */ ExtractEnvironmentFromCL(int &argc, WCHAR **&argv); For use in nsWindowsRestart.cpp: /** cl is an in/out parameter allocated with malloc */ AddEnvironementToCL(PRUnichar *&cl);
allows for the -env flag to be placed anywhere on the command line. fixes wince bustage when you pass both a image name and a commandline with a image name.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Attachment #359983 - Flags: approval1.9.1?
Comment on attachment 359983 [details] [diff] [review] patch v.4 a191=beltzner
Attachment #359983 - Flags: approval1.9.1? → approval1.9.1+
Why hasn't this landed on branch yet?
this landed on 1.9.1, clearing wanted1.9.1
You need to log in before you can comment on or make changes to this bug.