Hello,
I am a developer for PortableApps.com, and I have a package in testing for wxDev-C++ Portable (http://portableapps.com/node/31077 Yes, I do need to update to the latest which I will do soon, hopefully sooner if my question is answered. =P ). Everything seems to work correctly, except one small issue with our automatic language switching system. wxDev-C++ currently asks the user what language in which (s)he would like to run wxDev-C++, and for the first run wxDev-C++ loads in this language. However, our language switching system starts the apps in the language the PA.c menu is using, so every other launch is done through this way. Is there a way to override the initial prompt that asks the user for their language so that we can do it automatically (be it a config setting or a command line parameter, etc.)?
Thank you.
Language switching for PortableApps.com Topic is solved
-
- Experienced Solver
- Posts: 93
- Joined: Sun Mar 15, 2009 10:28 pm
Re: Language switching for PortableApps.com
Not currently, but it shouldn't be too hard to add. Give me a week or so to let my schedule quiet down and I'll see what I can do.
-Tony
-Tony
Everybody's got something to hide except for me and my monkey.
-
- Experienced Solver
- Posts: 93
- Joined: Sun Mar 15, 2009 10:28 pm
Re: Language switching for PortableApps.com
Wow, you are awesome. Thanks.
Re: Language switching for PortableApps.com
Actually, I thought of a possibly easier way to do this.
You can pass the configuration file directory to the command line parameter for devcpp.exe.
So if you call this:
"C:\Program Files (x86)\Dev-Cpp\devcpp.exe" -c c:\users\Tony\Documents\devcpp_config_dir
it will start wxDev-C++ and use the configuration files located in directory c:\users\Tony\Documents\devcpp_config_dir. Within that directory, the file config.ini has a line specifying the language to use. So your PortableApp installer should be able to just update that file with the correct language and start devcpp with the desired language file. This method will also let you fine tune whatever config parameters you'd like to have at startup. I'm assuming your installer has a way to modify ini setting files. Plus, you can keep the config files right on the portable drive.
-Tony
You can pass the configuration file directory to the command line parameter for devcpp.exe.
So if you call this:
"C:\Program Files (x86)\Dev-Cpp\devcpp.exe" -c c:\users\Tony\Documents\devcpp_config_dir
it will start wxDev-C++ and use the configuration files located in directory c:\users\Tony\Documents\devcpp_config_dir. Within that directory, the file config.ini has a line specifying the language to use. So your PortableApp installer should be able to just update that file with the correct language and start devcpp with the desired language file. This method will also let you fine tune whatever config parameters you'd like to have at startup. I'm assuming your installer has a way to modify ini setting files. Plus, you can keep the config files right on the portable drive.
-Tony
Everybody's got something to hide except for me and my monkey.
-
- Experienced Solver
- Posts: 93
- Joined: Sun Mar 15, 2009 10:28 pm
Re: Language switching for PortableApps.com
Okay, I will look into this. Currently, there's a DefaultData directory that is moved to the active data directory on first run (all in the portable app directory so it moves where the app moves). wxDev-C++ seems to ignore this on first run (I only have the language setting in the .ini), but I can try passing it via command line params to see if that works.tbreina wrote:Actually, I thought of a possibly easier way to do this.
You can pass the configuration file directory to the command line parameter for devcpp.exe.
So if you call this:
"C:\Program Files (x86)\Dev-Cpp\devcpp.exe" -c c:\users\Tony\Documents\devcpp_config_dir
it will start wxDev-C++ and use the configuration files located in directory c:\users\Tony\Documents\devcpp_config_dir. Within that directory, the file config.ini has a line specifying the language to use. So your PortableApp installer should be able to just update that file with the correct language and start devcpp with the desired language file. This method will also let you fine tune whatever config parameters you'd like to have at startup. I'm assuming your installer has a way to modify ini setting files. Plus, you can keep the config files right on the portable drive.
-Tony
Thanks.
Re: Language switching for PortableApps.com
If you have an installed wxDev-C++, just look in the AppData\Roaming\Dev-Cpp directory for all of the files needed. I think it might only be devcpp.ini that is required to not go through the initial setup window each time the program is started.
-Tony
-Tony
Everybody's got something to hide except for me and my monkey.
-
- Experienced Solver
- Posts: 93
- Joined: Sun Mar 15, 2009 10:28 pm
Re: Language switching for PortableApps.com
Huh. I haven't looked at the package in awhile, but apparently I already use the command line switch for the data directory. If I have the devcpp.ini with only the language option in the data directory, wxDev-C++ seems to delete it and start as though it's a fresh first install. Is there a specific line in the .ini it looks for that I'll need if I want it to override the first run?tbreina wrote:If you have an installed wxDev-C++, just look in the AppData\Roaming\Dev-Cpp directory for all of the files needed. I think it might only be devcpp.ini that is required to not go through the initial setup window each time the program is started.
-Tony
Also, I assume that if I do override the first run language prompt, it'll also disable the prompt that asks about caching? If so, I'm wondering if it'd be beneficial to include the cache to begin with or let the user figure it out. The pros of including it would be less writes to users' USB drives, I suppose.
Re: Language switching for PortableApps.com
You definitely need devcpp.ini and devcpp.ini.ver in the config directory to suppress the start up dialog. I'm not sure exactly how much of the devcpp.ini contents are needed. I think you can safely cut out the compiler specific part of the ini file and it will auto-generate on startup. However, you'll just have to try it out and see what makes sense for your distro.
-Tony
-Tony
Everybody's got something to hide except for me and my monkey.
-
- Experienced Solver
- Posts: 93
- Joined: Sun Mar 15, 2009 10:28 pm
Re: Language switching for PortableApps.com
OH, duh. I found it. I went through line by line to find what it needed, but I found "First=0" which tells it to not use the prompt.tbreina wrote:You definitely need devcpp.ini and devcpp.ini.ver in the config directory to suppress the start up dialog. I'm not sure exactly how much of the devcpp.ini contents are needed. I think you can safely cut out the compiler specific part of the ini file and it will auto-generate on startup. However, you'll just have to try it out and see what makes sense for your distro.
-Tony
Thanks for your help.