Re: getting rid of lyx.bat - Aiksaurus problem
On Mon, Jan 22, 2007 at 03:40:52AM +0100, Enrico Forestieri wrote: On Mon, Jan 22, 2007 at 01:33:31AM +0100, Uwe Stöhr wrote: Now I implemented in the installer that Aiksaurus is registered as standalone program. The installer sets the needed environment variable. This has unfortunately the disadvantage that invoking the thesaurus, when LyX is started the first time directly after the installation, it crashes. This crash occurs because the Aiksaurus data couldn't be found. This is because the environment variable was set via the registry and Windows always needs some time to accept this change. Has anybody of the Windows people an idea? (Enrico?) Do you mean that you directly set the variable in HKCU\Environment? Instead, why don't you try setting the path to the Aiksaurus directory through HKCU\Software\Aiksaurus\Data Path (according to the patch in development/Win32/patches)? When the installer writes crucial data to HKCU it basically means only the person running the installer can use the installed program. Doesn't make too much sense in a non-single-parent-home-PC setting, does it? Andre'
Re: getting rid of lyx.bat - Aiksaurus problem
On Wed, Jan 24, 2007 at 12:05:01AM +0100, Andre Poenitz wrote: On Mon, Jan 22, 2007 at 03:40:52AM +0100, Enrico Forestieri wrote: On Mon, Jan 22, 2007 at 01:33:31AM +0100, Uwe Stöhr wrote: Now I implemented in the installer that Aiksaurus is registered as standalone program. The installer sets the needed environment variable. This has unfortunately the disadvantage that invoking the thesaurus, when LyX is started the first time directly after the installation, it crashes. This crash occurs because the Aiksaurus data couldn't be found. This is because the environment variable was set via the registry and Windows always needs some time to accept this change. Has anybody of the Windows people an idea? (Enrico?) Do you mean that you directly set the variable in HKCU\Environment? Instead, why don't you try setting the path to the Aiksaurus directory through HKCU\Software\Aiksaurus\Data Path (according to the patch in development/Win32/patches)? When the installer writes crucial data to HKCU it basically means only the person running the installer can use the installed program. Doesn't make too much sense in a non-single-parent-home-PC setting, does it? Right. The unpatched Aiksaurus expects to get its settings from HKLM, the patched one either from HKCU or HKLM. However, you can't write to HKLM without admin privileges, so HKCU. I think that the installer asks what kind of installation it should perform (all users or not), and accordingly uses HKCU or HKLM. I also think that Uwe knows all of this. -- Enrico
getting rid of lyx.bat - Aiksaurus problem
I already got rid of lyx.bat in the official installer a few months ago. This is why we need a single official installer: doing duplicate work is a waste of time. Joost
Re: getting rid of lyx.bat - Aiksaurus problem
On 1/25/07, Joost Verburg [EMAIL PROTECTED] wrote: I already got rid of lyx.bat in the official installer a few months ago. This is why we need a single official installer: doing duplicate work is a waste of time. So you have your hidec.exe working? I think people are talking about more command line options to pass rc options and language settings. Bo
Re: getting rid of lyx.bat - Aiksaurus problem
Bo Peng wrote: So you have your hidec.exe working? I think people are talking about more command line options to pass rc options and language settings. The official installer includes a lyx.exe that handles the environment variables and everything else. A GUI with a debug log is provided in case of a crash, without requiring a command line window to stay open. When the -dgb option is used you'll also get this log. All command line parameters are passed to LyX itself, so things that are added to LyX will work automatically. Of course an option to override the language setting in the registry can also be added. Note that using a language setting in any file (like lyx.bat) inside the LyX installation directory is problematic, because each user should be able to set a different language without having write access here. My installer therefore uses a HKCU registry key (with HKLM as a possible system-wide default value). Joost
Re: getting rid of lyx.bat - Aiksaurus problem
On Wed, 24 Jan 2007, Joost Verburg wrote: Bo Peng wrote: So you have your hidec.exe working? I think people are talking about more command line options to pass rc options and language settings. All command line parameters are passed to LyX itself, so things that are added to LyX will work automatically. Of course an option to override the language setting in the registry can also be added. Note that using a language setting in any file (like lyx.bat) inside the LyX installation directory is problematic, because each user should be able to set a different language without having write access here. My installer therefore uses a HKCU registry key (with HKLM as a possible system-wide default value). IIRC, people think that 'LANG' and 'LC_*' should be considered when it comes to selecting UI language. How does an insallation of LyX from your installer select the language of the UI today? Will setting 'LANG' etc before invoking LyX from the command line change the UI language? Does this take precedence over registry settings? cheers /Christian -- Christian Ridderström, +46-8-768 39 44 http://www.md.kth.se/~chr
Re: getting rid of lyx.bat - Aiksaurus problem
On Mon, Jan 22, 2007 at 03:40:52AM +0100, Enrico Forestieri wrote: > On Mon, Jan 22, 2007 at 01:33:31AM +0100, Uwe Stöhr wrote: > > > Now I implemented in the installer that Aiksaurus is registered as > > standalone program. The installer sets the needed environment > > variable. This has unfortunately the disadvantage that invoking the > > thesaurus, when LyX is started the first time directly after the > > installation, it crashes. This crash occurs because the Aiksaurus > > data couldn't be found. This is because the environment variable was > > set via the registry and Windows always needs some time to accept > > this change. > > > > Has anybody of the Windows people an idea? (Enrico?) > > Do you mean that you directly set the variable in HKCU\Environment? > Instead, why don't you try setting the path to the Aiksaurus directory > through "HKCU\Software\Aiksaurus\Data Path" (according to the patch in > development/Win32/patches)? When the installer writes crucial data to HKCU it basically means only the person running the installer can use the installed program. Doesn't make too much sense in a non-single-parent-home-PC setting, does it? Andre'
Re: getting rid of lyx.bat - Aiksaurus problem
On Wed, Jan 24, 2007 at 12:05:01AM +0100, Andre Poenitz wrote: > On Mon, Jan 22, 2007 at 03:40:52AM +0100, Enrico Forestieri wrote: > > On Mon, Jan 22, 2007 at 01:33:31AM +0100, Uwe Stöhr wrote: > > > > > Now I implemented in the installer that Aiksaurus is registered as > > > standalone program. The installer sets the needed environment > > > variable. This has unfortunately the disadvantage that invoking the > > > thesaurus, when LyX is started the first time directly after the > > > installation, it crashes. This crash occurs because the Aiksaurus > > > data couldn't be found. This is because the environment variable was > > > set via the registry and Windows always needs some time to accept > > > this change. > > > > > > Has anybody of the Windows people an idea? (Enrico?) > > > > Do you mean that you directly set the variable in HKCU\Environment? > > Instead, why don't you try setting the path to the Aiksaurus directory > > through "HKCU\Software\Aiksaurus\Data Path" (according to the patch in > > development/Win32/patches)? > > When the installer writes crucial data to HKCU it basically means only > the person running the installer can use the installed program. Doesn't > make too much sense in a non-single-parent-home-PC setting, does it? Right. The unpatched Aiksaurus expects to get its settings from HKLM, the patched one either from HKCU or HKLM. However, you can't write to HKLM without admin privileges, so HKCU. I think that the installer asks what kind of installation it should perform (all users or not), and accordingly uses HKCU or HKLM. I also think that Uwe knows all of this. -- Enrico
getting rid of lyx.bat - Aiksaurus problem
I already got rid of lyx.bat in the official installer a few months ago. This is why we need a single official installer: doing duplicate work is a waste of time. Joost
Re: getting rid of lyx.bat - Aiksaurus problem
On 1/25/07, Joost Verburg <[EMAIL PROTECTED]> wrote: I already got rid of lyx.bat in the official installer a few months ago. This is why we need a single official installer: doing duplicate work is a waste of time. So you have your hidec.exe working? I think people are talking about more command line options to pass rc options and language settings. Bo
Re: getting rid of lyx.bat - Aiksaurus problem
Bo Peng wrote: So you have your hidec.exe working? I think people are talking about more command line options to pass rc options and language settings. The official installer includes a lyx.exe that handles the environment variables and everything else. A GUI with a debug log is provided in case of a crash, without requiring a command line window to stay open. When the -dgb option is used you'll also get this log. All command line parameters are passed to LyX itself, so things that are added to LyX will work automatically. Of course an option to override the language setting in the registry can also be added. Note that using a language setting in any file (like lyx.bat) inside the LyX installation directory is problematic, because each user should be able to set a different language without having write access here. My installer therefore uses a HKCU registry key (with HKLM as a possible system-wide default value). Joost
Re: getting rid of lyx.bat - Aiksaurus problem
On Wed, 24 Jan 2007, Joost Verburg wrote: Bo Peng wrote: So you have your hidec.exe working? I think people are talking about more command line options to pass rc options and language settings. All command line parameters are passed to LyX itself, so things that are added to LyX will work automatically. Of course an option to override the language setting in the registry can also be added. Note that using a language setting in any file (like lyx.bat) inside the LyX installation directory is problematic, because each user should be able to set a different language without having write access here. My installer therefore uses a HKCU registry key (with HKLM as a possible system-wide default value). IIRC, people think that 'LANG' and 'LC_*' should be considered when it comes to selecting UI language. How does an insallation of LyX from your installer select the language of the UI today? Will setting 'LANG' etc before invoking LyX from the command line change the UI language? Does this take precedence over registry settings? cheers /Christian -- Christian Ridderström, +46-8-768 39 44 http://www.md.kth.se/~chr
Re: getting rid of lyx.bat - Aiksaurus problem
On Tue, Jan 23, 2007 at 08:48:02AM +1800, Bo Peng wrote: Seems that it has disappeared from the repository, though... Joost said that he was writing a *better* hidec.exe... For some definition of better, I think. I suppose this is development/Win32/launcher/launcher.nsi, but I don't even know what language it is written in... -- Enrico
Re: getting rid of lyx.bat - Aiksaurus problem
Peter Kümmel wrote: Abdelrazak Younes wrote: Enrico Forestieri wrote: On Mon, Jan 22, 2007 at 10:56:25AM +0100, Jean-Marc Lasgouttes wrote: Enrico == Enrico Forestieri [EMAIL PROTECTED] writes: @echo off SET LANG=de_DE start LyX lyx.exe %* Enrico Are you aware that the console hiding code is no more in Enrico place, such that using a lyx.bat doesn't hide the cmd window Enrico anymore? And I guess this also means that people who preferred to have two lyx.bat files for two languages, cannot do it anymore. There was a hidecmd.c wrapper in development/Win32 to hide the console window without any flashing. I don't know if anything changed in this domain recently but if I set the SubSystem to Windows (/SUBSYSTEM:WINDOWS) as opposed to Console (/SUBSYSTEM:CONSOLE) I don't see anymore the flashing console. Peter? Yes, for a windows application /subystem:windows is the correct setting (it's a linker option.) But then when texing the console windows pops up, I assume that this could also be suppressed. This comment in os_win32.C from Angus should help. I guess there is no problem going this road because we don't use shell script anymore. /* Note from Angus, 17 Jan 2005: * * The code below is taken verbatim from Ruurd's original patch * porting LyX to Win32. * * Windows allows us to define LyX either as a console-based app * or as a GUI-based app. Ruurd decided to define LyX as a * console-based app with a main function rather than a WinMain * function as the point of entry to the program, but to * immediately close the console window that Windows helpfully * opens for us. Doing so allows the user to see all of LyX's * debug output simply by running LyX from a DOS or MSYS-shell * prompt. * * The alternative approach is to define LyX as a genuine * GUI-based app, with a WinMain function as the entry point to the * executable rather than a main function, so: * * #if defined (_WIN32) * # define WIN32_LEAN_AND_MEAN * # include stdlib.h // for __argc, __argv * # include windows.h // for WinMain * #endif * * // This will require the -mwindows flag when linking with * // gcc under MinGW. * // For MSVC, use /subsystem:windows. * #if defined (_WIN32) * int WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) * { * return mymain(__argc, __argv); * } * #endif * * where mymain is just a renamed main. * * However, doing so means that the lyxerr messages would mysteriously * disappear. They could be resurrected with something like: * * #ifdef WIN32 * AllocConsole(); * freopen(conin$,r,stdin); * freopen(conout$,w,stdout); * freopen(conout$,w,stderr); * #endif * * This code could be invoked (say) the first time that lyxerr * is called. However, Ruurd has tried this route and found that some * shell scripts failed, for mysterious reasons... * * I've chosen for now, therefore, to simply add Ruurd's original * code as-is. A wrapper program hidecmd.c has been added to * development/Win32 which hides the console window of lyx when * lyx is invoked as a parameter of hidecmd.exe. */
Re: getting rid of lyx.bat - Aiksaurus problem
Uwe Stöhr schrieb: Now I implemented in the installer that Aiksaurus is registered as standalone program. The installer sets the needed environment variable. What do you mean by standalone program? Aiksaurus is used as a library and it should stay as such! Michael
Re: getting rid of lyx.bat - Aiksaurus problem
I wrote: Do you mean that you directly set the variable in HKCU\Environment? Yes. Instead, why don't you try setting the path to the Aiksaurus directory through HKCU\Software\Aiksaurus\Data Path (according to the patch in development/Win32/patches)? I wasn't aware of this. I used this now and it works. Thanks for pointing me to this. I found out today that this setting isn't recognized by aiksaurus when the user hasn't admin permissions. So I have to remove this solution :-( . regards Uwe
Re: getting rid of lyx.bat - Aiksaurus problem
Michael Gerz schrieb: What do you mean by standalone program? Aiksaurus is used as a library and it should stay as such! I haven't said that I changed this, it's the way it's registered, see my and Enrico's posts in this thread. Uwe
Re: getting rid of lyx.bat - Aiksaurus problem
On Wed, Jan 24, 2007 at 02:01:37AM +0100, Uwe Stöhr wrote: I wrote: Do you mean that you directly set the variable in HKCU\Environment? Yes. Instead, why don't you try setting the path to the Aiksaurus directory through HKCU\Software\Aiksaurus\Data Path (according to the patch in development/Win32/patches)? I wasn't aware of this. I used this now and it works. Thanks for pointing me to this. I found out today that this setting isn't recognized by aiksaurus when the user hasn't admin permissions. So I have to remove this solution :-( . Strange. A normal user should be able to write to HKEY_CURRENT_USER. Are you sure that you applied the patch in development/Win32/patches? Another thing to take care of is that, according to that patch, an existing HKLM\Software\Aiksaurus\Data Path will hide the corresponding entry in HKCU. I don't know why Joost decided to do so, but you could try to do the opposite. HTH -- Enrico
Re: getting rid of lyx.bat - Aiksaurus problem
On Tue, Jan 23, 2007 at 08:48:02AM +1800, Bo Peng wrote: > > Seems that it has > > disappeared from the repository, though... > > Joost said that he was writing a *better* hidec.exe... For some definition of "better", I think. I suppose this is development/Win32/launcher/launcher.nsi, but I don't even know what language it is written in... -- Enrico
Re: getting rid of lyx.bat - Aiksaurus problem
Peter Kümmel wrote: Abdelrazak Younes wrote: Enrico Forestieri wrote: On Mon, Jan 22, 2007 at 10:56:25AM +0100, Jean-Marc Lasgouttes wrote: "Enrico" == Enrico Forestieri <[EMAIL PROTECTED]> writes: @echo off SET LANG=de_DE start "LyX" "lyx.exe" %* Enrico> Are you aware that the console hiding code is no more in Enrico> place, such that using a lyx.bat doesn't hide the cmd window Enrico> anymore? And I guess this also means that people who preferred to have two lyx.bat files for two languages, cannot do it anymore. There was a hidecmd.c wrapper in development/Win32 to hide the console window without any flashing. I don't know if anything changed in this domain recently but if I set the SubSystem to "Windows (/SUBSYSTEM:WINDOWS)" as opposed to "Console (/SUBSYSTEM:CONSOLE)" I don't see anymore the flashing console. Peter? Yes, for a windows application /subystem:windows is the correct setting (it's a linker option.) But then when texing the console windows pops up, I assume that this could also be suppressed. This comment in os_win32.C from Angus should help. I guess there is no problem going this road because we don't use shell script anymore. /* Note from Angus, 17 Jan 2005: * * The code below is taken verbatim from Ruurd's original patch * porting LyX to Win32. * * Windows allows us to define LyX either as a console-based app * or as a GUI-based app. Ruurd decided to define LyX as a * console-based app with a "main" function rather than a "WinMain" * function as the point of entry to the program, but to * immediately close the console window that Windows helpfully * opens for us. Doing so allows the user to see all of LyX's * debug output simply by running LyX from a DOS or MSYS-shell * prompt. * * The alternative approach is to define LyX as a genuine * GUI-based app, with a "WinMain" function as the entry point to the * executable rather than a "main" function, so: * * #if defined (_WIN32) * # define WIN32_LEAN_AND_MEAN * # include // for __argc, __argv * # include // for WinMain * #endif * * // This will require the "-mwindows" flag when linking with * // gcc under MinGW. * // For MSVC, use "/subsystem:windows". * #if defined (_WIN32) * int WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) * { * return mymain(__argc, __argv); * } * #endif * * where "mymain" is just a renamed "main". * * However, doing so means that the lyxerr messages would mysteriously * disappear. They could be resurrected with something like: * * #ifdef WIN32 * AllocConsole(); * freopen("conin$","r",stdin); * freopen("conout$","w",stdout); * freopen("conout$","w",stderr); * #endif * * This code could be invoked (say) the first time that lyxerr * is called. However, Ruurd has tried this route and found that some * shell scripts failed, for mysterious reasons... * * I've chosen for now, therefore, to simply add Ruurd's original * code as-is. A wrapper program hidecmd.c has been added to * development/Win32 which hides the console window of lyx when * lyx is invoked as a parameter of hidecmd.exe. */
Re: getting rid of lyx.bat - Aiksaurus problem
Uwe Stöhr schrieb: Now I implemented in the installer that Aiksaurus is registered as standalone program. The installer sets the needed environment variable. What do you mean by "standalone" program? Aiksaurus is used as a library and it should stay as such! Michael
Re: getting rid of lyx.bat - Aiksaurus problem
I wrote: > Do you mean that you directly set the variable in HKCU\Environment? Yes. > Instead, why don't you try setting the path to the Aiksaurus directory > through "HKCU\Software\Aiksaurus\Data Path" (according to the patch in > development/Win32/patches)? I wasn't aware of this. I used this now and it works. Thanks for pointing me to this. I found out today that this setting isn't recognized by aiksaurus when the user hasn't admin permissions. So I have to remove this solution :-( . regards Uwe
Re: getting rid of lyx.bat - Aiksaurus problem
Michael Gerz schrieb: What do you mean by "standalone" program? Aiksaurus is used as a library and it should stay as such! I haven't said that I changed this, it's the way it's registered, see my and Enrico's posts in this thread. Uwe
Re: getting rid of lyx.bat - Aiksaurus problem
On Wed, Jan 24, 2007 at 02:01:37AM +0100, Uwe Stöhr wrote: > I wrote: > > > > Do you mean that you directly set the variable in HKCU\Environment? > > > > Yes. > > > > > Instead, why don't you try setting the path to the Aiksaurus directory > > > through "HKCU\Software\Aiksaurus\Data Path" (according to the patch in > > > development/Win32/patches)? > > > > I wasn't aware of this. I used this now and it works. Thanks for > > pointing me to this. > > I found out today that this setting isn't recognized by aiksaurus when the > user hasn't admin > permissions. So I have to remove this solution :-( . Strange. A normal user should be able to write to HKEY_CURRENT_USER. Are you sure that you applied the patch in development/Win32/patches? Another thing to take care of is that, according to that patch, an existing "HKLM\Software\Aiksaurus\Data Path" will hide the corresponding entry in HKCU. I don't know why Joost decided to do so, but you could try to do the opposite. HTH -- Enrico
Re: getting rid of lyx.bat - Aiksaurus problem
Enrico == Enrico Forestieri [EMAIL PROTECTED] writes: @echo off SET LANG=de_DE start LyX lyx.exe %* Enrico Are you aware that the console hiding code is no more in Enrico place, such that using a lyx.bat doesn't hide the cmd window Enrico anymore? And I guess this also means that people who preferred to have two lyx.bat files for two languages, cannot do it anymore. JMarc
Re: getting rid of lyx.bat - Aiksaurus problem
On Mon, Jan 22, 2007 at 10:56:25AM +0100, Jean-Marc Lasgouttes wrote: Enrico == Enrico Forestieri [EMAIL PROTECTED] writes: @echo off SET LANG=de_DE start LyX lyx.exe %* Enrico Are you aware that the console hiding code is no more in Enrico place, such that using a lyx.bat doesn't hide the cmd window Enrico anymore? And I guess this also means that people who preferred to have two lyx.bat files for two languages, cannot do it anymore. There was a hidecmd.c wrapper in development/Win32 to hide the console window without any flashing. Its purpose, once renamed as lyx.exe, was to launch the real lyx, named lyxc.exe, but it would also let specify a series of env variables to be set (like the unix env command). This means that the user could have set different shortcuts for different languages, for example. Apart the non-flashing cmd window, its advantage over a batch file would be the possibility to embed an icon in it. Seems that it has disappeared from the repository, though... -- Enrico
Re: getting rid of lyx.bat - Aiksaurus problem
Seems that it has disappeared from the repository, though... Joost said that he was writing a *better* hidec.exe... Bo
Re: getting rid of lyx.bat - Aiksaurus problem
Enrico Forestieri wrote: On Mon, Jan 22, 2007 at 10:56:25AM +0100, Jean-Marc Lasgouttes wrote: Enrico == Enrico Forestieri [EMAIL PROTECTED] writes: @echo off SET LANG=de_DE start LyX lyx.exe %* Enrico Are you aware that the console hiding code is no more in Enrico place, such that using a lyx.bat doesn't hide the cmd window Enrico anymore? And I guess this also means that people who preferred to have two lyx.bat files for two languages, cannot do it anymore. There was a hidecmd.c wrapper in development/Win32 to hide the console window without any flashing. I don't know if anything changed in this domain recently but if I set the SubSystem to Windows (/SUBSYSTEM:WINDOWS) as opposed to Console (/SUBSYSTEM:CONSOLE) I don't see anymore the flashing console. Peter? Its purpose, once renamed as lyx.exe, was to launch the real lyx, named lyxc.exe, but it would also let specify a series of env variables to be set (like the unix env command). This means that the user could have set different shortcuts for different languages, for example. Apart the non-flashing cmd window, its advantage over a batch file would be the possibility to embed an icon in it. What is the problem of embedding the icon into the lyx.exe executable directly? Abdel.
Re: getting rid of lyx.bat - Aiksaurus problem
What is the problem of embedding the icon into the lyx.exe executable directly? A black command window will be started with lyx. This is useful for debugging, but annoying for normal users. Bo
Re: getting rid of lyx.bat - Aiksaurus problem
Jean-Marc Lasgouttes wrote: Enrico == Enrico Forestieri [EMAIL PROTECTED] writes: @echo off SET LANG=de_DE start LyX lyx.exe %* Enrico Are you aware that the console hiding code is no more in Enrico place, such that using a lyx.bat doesn't hide the cmd window Enrico anymore? And I guess this also means that people who preferred to have two lyx.bat files for two languages, cannot do it anymore. We could perhaps implement this new feature: lyx -xxx yyy will override setting xxx with value yyy, for example: lyx -gui_language french Should be easy to implement. Abdel.
Re: getting rid of lyx.bat - Aiksaurus problem
Abdelrazak == Abdelrazak Younes [EMAIL PROTECTED] writes: Abdelrazak We could perhaps implement this new feature: Abdelrazak lyx -xxx yyy Abdelrazak will override setting xxx with value yyy, for example: Abdelrazak lyx -gui_language french Yes, but maybe with another syntax (not one option per possible lyxrc entry). JMarc
Re: getting rid of lyx.bat - Aiksaurus problem
Jean-Marc Lasgouttes wrote: Abdelrazak == Abdelrazak Younes [EMAIL PROTECTED] writes: Abdelrazak We could perhaps implement this new feature: Abdelrazak lyx -xxx yyy Abdelrazak will override setting xxx with value yyy, for example: Abdelrazak lyx -gui_language french Yes, but maybe with another syntax (not one option per possible lyxrc entry). What about this: lyx -rc gui_language french Abdel.
Re: getting rid of lyx.bat - Aiksaurus problem
Bo Peng wrote: What is the problem of embedding the icon into the lyx.exe executable directly? You are not answering to this question here but to the previous one I guess. A black command window will be started with lyx. This is useful for debugging, but annoying for normal users. The debug output could be redirected to an editor on Window (and optionally on other platforms too). Abdel.
Re: getting rid of lyx.bat - Aiksaurus problem
A black command window will be started with lyx. This is useful for debugging, but annoying for normal users. The debug output could be redirected to an editor on Window (and optionally on other platforms too). I have investigated this approach. Lyx relies on stdout/cout in many places. Even if lyx itself can be made cout-free, scripts such as lyx2lyx called by lyx may force a black command window when it is started from a lyx.exe without stdout and try to get one from the OS. The best approach, as far as I can see, is hide the command window (the hidec.exe wrapper) and forward stdout to a window if needed (pending). It is possible to use hidec.exe equivalence to fire external scripts within lyx after making lyx a non-console application, but that implies lots of work. If QProcess can start a script without a flashing command window, we should switch to QProcess. Cheers, Bo
Re: getting rid of lyx.bat - Aiksaurus problem
Abdelrazak == Abdelrazak Younes [EMAIL PROTECTED] writes: Abdelrazak Jean-Marc Lasgouttes wrote: Abdelrazak == Abdelrazak Younes [EMAIL PROTECTED] writes: Abdelrazak We could perhaps implement this new feature: Abdelrazak lyx -xxx yyy Abdelrazak will override setting xxx with value yyy, for example: Abdelrazak lyx -gui_language french Yes, but maybe with another syntax (not one option per possible lyxrc entry). Abdelrazak What about this: Abdelrazak lyx -rc gui_language french Yes, or rather -pref (since people do not know what this rc thing is). JMarc
Re: getting rid of lyx.bat - Aiksaurus problem
Bo Peng wrote: A black command window will be started with lyx. This is useful for debugging, but annoying for normal users. The debug output could be redirected to an editor on Window (and optionally on other platforms too). I have investigated this approach. Lyx relies on stdout/cout in many places. Even if lyx itself can be made cout-free, scripts such as lyx2lyx called by lyx may force a black command window when it is started from a lyx.exe without stdout and try to get one from the OS. I'm not sure about that but I will try. The best approach, as far as I can see, is hide the command window (the hidec.exe wrapper) and forward stdout to a window if needed (pending). It is possible to use hidec.exe equivalence to fire external scripts within lyx after making lyx a non-console application, but that implies lots of work. If QProcess can start a script without a flashing command window, Of course it does, it is just a matter of re-directing the stdout/stderr thanks to pipes. Abdel.
Re: getting rid of lyx.bat - Aiksaurus problem
On Monday 22 January 2007 5:43:26 pm Jean-Marc Lasgouttes wrote: Yes, or rather -pref (since people do not know what this rc thing is). Let us make --pref then. We should be consistent in the options naming, we use one dash for one letter option and two dashes for word options. JMarc -- José Abílio
Re: getting rid of lyx.bat - Aiksaurus problem
José Matos wrote: On Monday 22 January 2007 5:43:26 pm Jean-Marc Lasgouttes wrote: Yes, or rather -pref (since people do not know what this rc thing is). Let us make --pref then. We should be consistent in the options naming, we use one dash for one letter option and two dashes for word options. Then that would be '-p' and '--preference' I think. Abdel.
Re: getting rid of lyx.bat - Aiksaurus problem
Even if lyx itself can be made cout-free, scripts such as lyx2lyx called by lyx may force a black command window when it is started from a lyx.exe without stdout and try to get one from the OS. I'm not sure about that but I will try. You need to compile lyx as a windows (rather than console) application. Last time I tried, lyx opens and closes a console window for each python script it starts. If QProcess can start a script without a flashing command window, Of course it does, it is just a matter of re-directing the stdout/stderr thanks to pipes. Then we should replace all system() calls with QProcess. This was not an option when I was writing hidec.exe, but we are allowed to use non-GUI Qt classes now. Bo
Re: getting rid of lyx.bat - Aiksaurus problem
Bo == Bo Peng [EMAIL PROTECTED] writes: Of course it does, it is just a matter of re-directing the stdout/stderr thanks to pipes. Bo Then we should replace all system() calls with QProcess. This was Bo not an option when I was writing hidec.exe, but we are allowed to Bo use non-GUI Qt classes now. When they are unavoidable, yes. JMarc
Re: getting rid of lyx.bat - Aiksaurus problem
Abdelrazak Younes wrote: Enrico Forestieri wrote: On Mon, Jan 22, 2007 at 10:56:25AM +0100, Jean-Marc Lasgouttes wrote: Enrico == Enrico Forestieri [EMAIL PROTECTED] writes: @echo off SET LANG=de_DE start LyX lyx.exe %* Enrico Are you aware that the console hiding code is no more in Enrico place, such that using a lyx.bat doesn't hide the cmd window Enrico anymore? And I guess this also means that people who preferred to have two lyx.bat files for two languages, cannot do it anymore. There was a hidecmd.c wrapper in development/Win32 to hide the console window without any flashing. I don't know if anything changed in this domain recently but if I set the SubSystem to Windows (/SUBSYSTEM:WINDOWS) as opposed to Console (/SUBSYSTEM:CONSOLE) I don't see anymore the flashing console. Peter? Yes, for a windows application /subystem:windows is the correct setting (it's a linker option.) But then when texing the console windows pops up, I assume that this could also be suppressed. Its purpose, once renamed as lyx.exe, was to launch the real lyx, named lyxc.exe, but it would also let specify a series of env variables to be set (like the unix env command). This means that the user could have set different shortcuts for different languages, for example. Apart the non-flashing cmd window, its advantage over a batch file would be the possibility to embed an icon in it. What is the problem of embedding the icon into the lyx.exe executable directly? Isn't this the job of a resource file? Abdel. -- Peter Kümmel
Re: getting rid of lyx.bat - Aiksaurus problem
On Mon, Jan 22, 2007 at 04:47:27PM +0100, Abdelrazak Younes wrote: What is the problem of embedding the icon into the lyx.exe executable directly? You can also do that, of course, but the .lyx files should be associated with the application deputed to open them. If this is a .bat file, you have a default shell type icon in the list of applications you get when choosing Open with... instead of the lyx icon, because an icon cannot be embedded in a batch file, AFAIK. -- Enrico
Re: getting rid of lyx.bat - Aiksaurus problem
Do you mean that you directly set the variable in HKCU\Environment? Yes. Instead, why don't you try setting the path to the Aiksaurus directory through HKCU\Software\Aiksaurus\Data Path (according to the patch in development/Win32/patches)? I wasn't aware of this. I used this now and it works. Thanks for pointing me to this. regards Uwe
Re: getting rid of lyx.bat - Aiksaurus problem
> "Enrico" == Enrico Forestieri <[EMAIL PROTECTED]> writes: >> @echo off SET LANG=de_DE start "LyX" "lyx.exe" %* Enrico> Are you aware that the console hiding code is no more in Enrico> place, such that using a lyx.bat doesn't hide the cmd window Enrico> anymore? And I guess this also means that people who preferred to have two lyx.bat files for two languages, cannot do it anymore. JMarc
Re: getting rid of lyx.bat - Aiksaurus problem
On Mon, Jan 22, 2007 at 10:56:25AM +0100, Jean-Marc Lasgouttes wrote: > > "Enrico" == Enrico Forestieri <[EMAIL PROTECTED]> writes: > > >> @echo off SET LANG=de_DE start "LyX" "lyx.exe" %* > > Enrico> Are you aware that the console hiding code is no more in > Enrico> place, such that using a lyx.bat doesn't hide the cmd window > Enrico> anymore? > > And I guess this also means that people who preferred to have two > lyx.bat files for two languages, cannot do it anymore. There was a hidecmd.c wrapper in development/Win32 to hide the console window without any flashing. Its purpose, once renamed as lyx.exe, was to launch the real lyx, named lyxc.exe, but it would also let specify a series of env variables to be set (like the unix env command). This means that the user could have set different shortcuts for different languages, for example. Apart the non-flashing cmd window, its advantage over a batch file would be the possibility to embed an icon in it. Seems that it has disappeared from the repository, though... -- Enrico
Re: getting rid of lyx.bat - Aiksaurus problem
Seems that it has disappeared from the repository, though... Joost said that he was writing a *better* hidec.exe... Bo
Re: getting rid of lyx.bat - Aiksaurus problem
Enrico Forestieri wrote: On Mon, Jan 22, 2007 at 10:56:25AM +0100, Jean-Marc Lasgouttes wrote: "Enrico" == Enrico Forestieri <[EMAIL PROTECTED]> writes: @echo off SET LANG=de_DE start "LyX" "lyx.exe" %* Enrico> Are you aware that the console hiding code is no more in Enrico> place, such that using a lyx.bat doesn't hide the cmd window Enrico> anymore? And I guess this also means that people who preferred to have two lyx.bat files for two languages, cannot do it anymore. There was a hidecmd.c wrapper in development/Win32 to hide the console window without any flashing. I don't know if anything changed in this domain recently but if I set the SubSystem to "Windows (/SUBSYSTEM:WINDOWS)" as opposed to "Console (/SUBSYSTEM:CONSOLE)" I don't see anymore the flashing console. Peter? Its purpose, once renamed as lyx.exe, was to launch the real lyx, named lyxc.exe, but it would also let specify a series of env variables to be set (like the unix env command). This means that the user could have set different shortcuts for different languages, for example. Apart the non-flashing cmd window, its advantage over a batch file would be the possibility to embed an icon in it. What is the problem of embedding the icon into the lyx.exe executable directly? Abdel.
Re: getting rid of lyx.bat - Aiksaurus problem
What is the problem of embedding the icon into the lyx.exe executable directly? A black command window will be started with lyx. This is useful for debugging, but annoying for normal users. Bo
Re: getting rid of lyx.bat - Aiksaurus problem
Jean-Marc Lasgouttes wrote: "Enrico" == Enrico Forestieri <[EMAIL PROTECTED]> writes: @echo off SET LANG=de_DE start "LyX" "lyx.exe" %* Enrico> Are you aware that the console hiding code is no more in Enrico> place, such that using a lyx.bat doesn't hide the cmd window Enrico> anymore? And I guess this also means that people who preferred to have two lyx.bat files for two languages, cannot do it anymore. We could perhaps implement this new feature: lyx -xxx yyy will override setting xxx with value yyy, for example: lyx -gui_language french Should be easy to implement. Abdel.
Re: getting rid of lyx.bat - Aiksaurus problem
> "Abdelrazak" == Abdelrazak Younes <[EMAIL PROTECTED]> writes: Abdelrazak> We could perhaps implement this new feature: Abdelrazak> lyx -xxx yyy Abdelrazak> will override setting xxx with value yyy, for example: Abdelrazak> lyx -gui_language french Yes, but maybe with another syntax (not one option per possible lyxrc entry). JMarc
Re: getting rid of lyx.bat - Aiksaurus problem
Jean-Marc Lasgouttes wrote: "Abdelrazak" == Abdelrazak Younes <[EMAIL PROTECTED]> writes: Abdelrazak> We could perhaps implement this new feature: Abdelrazak> lyx -xxx yyy Abdelrazak> will override setting xxx with value yyy, for example: Abdelrazak> lyx -gui_language french Yes, but maybe with another syntax (not one option per possible lyxrc entry). What about this: lyx -rc gui_language french Abdel.
Re: getting rid of lyx.bat - Aiksaurus problem
Bo Peng wrote: What is the problem of embedding the icon into the lyx.exe executable directly? You are not answering to this question here but to the previous one I guess. A black command window will be started with lyx. This is useful for debugging, but annoying for normal users. The debug output could be redirected to an editor on Window (and optionally on other platforms too). Abdel.
Re: getting rid of lyx.bat - Aiksaurus problem
> A black command window will be started with lyx. This is useful for > debugging, but annoying for normal users. The debug output could be redirected to an editor on Window (and optionally on other platforms too). I have investigated this approach. Lyx relies on stdout/cout in many places. Even if lyx itself can be made cout-free, scripts such as lyx2lyx called by lyx may force a black command window when it is started from a lyx.exe without stdout and try to get one from the OS. The best approach, as far as I can see, is hide the command window (the hidec.exe wrapper) and forward stdout to a window if needed (pending). It is possible to use hidec.exe equivalence to fire external scripts within lyx after making lyx a non-console application, but that implies lots of work. If QProcess can start a script without a flashing command window, we should switch to QProcess. Cheers, Bo
Re: getting rid of lyx.bat - Aiksaurus problem
> "Abdelrazak" == Abdelrazak Younes <[EMAIL PROTECTED]> writes: Abdelrazak> Jean-Marc Lasgouttes wrote: >>> "Abdelrazak" == Abdelrazak Younes <[EMAIL PROTECTED]> writes: >> Abdelrazak> We could perhaps implement this new feature: >> Abdelrazak> lyx -xxx yyy >> Abdelrazak> will override setting xxx with value yyy, for example: >> Abdelrazak> lyx -gui_language french >> Yes, but maybe with another syntax (not one option per possible >> lyxrc entry). Abdelrazak> What about this: Abdelrazak> lyx -rc gui_language french Yes, or rather -pref (since people do not know what this rc thing is). JMarc
Re: getting rid of lyx.bat - Aiksaurus problem
Bo Peng wrote: > A black command window will be started with lyx. This is useful for > debugging, but annoying for normal users. The debug output could be redirected to an editor on Window (and optionally on other platforms too). I have investigated this approach. Lyx relies on stdout/cout in many places. Even if lyx itself can be made cout-free, scripts such as lyx2lyx called by lyx may force a black command window when it is started from a lyx.exe without stdout and try to get one from the OS. I'm not sure about that but I will try. The best approach, as far as I can see, is hide the command window (the hidec.exe wrapper) and forward stdout to a window if needed (pending). It is possible to use hidec.exe equivalence to fire external scripts within lyx after making lyx a non-console application, but that implies lots of work. If QProcess can start a script without a flashing command window, Of course it does, it is just a matter of re-directing the stdout/stderr thanks to pipes. Abdel.
Re: getting rid of lyx.bat - Aiksaurus problem
On Monday 22 January 2007 5:43:26 pm Jean-Marc Lasgouttes wrote: > Yes, or rather -pref (since people do not know what this rc thing is). Let us make --pref then. We should be consistent in the options naming, we use one dash for one letter option and two dashes for word options. > JMarc -- José Abílio
Re: getting rid of lyx.bat - Aiksaurus problem
José Matos wrote: On Monday 22 January 2007 5:43:26 pm Jean-Marc Lasgouttes wrote: Yes, or rather -pref (since people do not know what this rc thing is). Let us make --pref then. We should be consistent in the options naming, we use one dash for one letter option and two dashes for word options. Then that would be '-p' and '--preference' I think. Abdel.
Re: getting rid of lyx.bat - Aiksaurus problem
Even if lyx itself can be made cout-free, scripts such as > lyx2lyx called by lyx may force a black command window when it is > started from a lyx.exe without stdout and try to get one from the OS. I'm not sure about that but I will try. You need to compile lyx as a windows (rather than console) application. Last time I tried, lyx opens and closes a console window for each python script it starts. > If QProcess can start a > script without a flashing command window, Of course it does, it is just a matter of re-directing the stdout/stderr thanks to pipes. Then we should replace all system() calls with QProcess. This was not an option when I was writing hidec.exe, but we are allowed to use non-GUI Qt classes now. Bo
Re: getting rid of lyx.bat - Aiksaurus problem
> "Bo" == Bo Peng <[EMAIL PROTECTED]> writes: >> Of course it does, it is just a matter of re-directing the >> stdout/stderr thanks to pipes. Bo> Then we should replace all system() calls with QProcess. This was Bo> not an option when I was writing hidec.exe, but we are allowed to Bo> use non-GUI Qt classes now. When they are unavoidable, yes. JMarc
Re: getting rid of lyx.bat - Aiksaurus problem
Abdelrazak Younes wrote: > Enrico Forestieri wrote: >> On Mon, Jan 22, 2007 at 10:56:25AM +0100, Jean-Marc Lasgouttes wrote: >> "Enrico" == Enrico Forestieri <[EMAIL PROTECTED]> writes: > @echo off SET LANG=de_DE start "LyX" "lyx.exe" %* >>> Enrico> Are you aware that the console hiding code is no more in >>> Enrico> place, such that using a lyx.bat doesn't hide the cmd window >>> Enrico> anymore? >>> >>> And I guess this also means that people who preferred to have two >>> lyx.bat files for two languages, cannot do it anymore. >> >> There was a hidecmd.c wrapper in development/Win32 to hide the console >> window without any flashing. > > I don't know if anything changed in this domain recently but if I set > the SubSystem to "Windows (/SUBSYSTEM:WINDOWS)" as opposed to "Console > (/SUBSYSTEM:CONSOLE)" I don't see anymore the flashing console. > > Peter? Yes, for a windows application /subystem:windows is the correct setting (it's a linker option.) But then when texing the console windows pops up, I assume that this could also be suppressed. > >> Its purpose, once renamed as lyx.exe, was >> to launch the real lyx, named lyxc.exe, but it would also let specify a >> series of env variables to be set (like the unix env command). This means >> that the user could have set different shortcuts for different languages, >> for example. Apart the non-flashing cmd window, its advantage over a >> batch >> file would be the possibility to embed an icon in it. > > What is the problem of embedding the icon into the lyx.exe executable > directly? Isn't this the job of a resource file? > > Abdel. > -- Peter Kümmel
Re: getting rid of lyx.bat - Aiksaurus problem
On Mon, Jan 22, 2007 at 04:47:27PM +0100, Abdelrazak Younes wrote: > What is the problem of embedding the icon into the lyx.exe executable > directly? You can also do that, of course, but the .lyx files should be associated with the application deputed to open them. If this is a .bat file, you have a default shell type icon in the list of applications you get when choosing "Open with..." instead of the lyx icon, because an icon cannot be embedded in a batch file, AFAIK. -- Enrico
Re: getting rid of lyx.bat - Aiksaurus problem
> Do you mean that you directly set the variable in HKCU\Environment? Yes. > Instead, why don't you try setting the path to the Aiksaurus directory > through "HKCU\Software\Aiksaurus\Data Path" (according to the patch in > development/Win32/patches)? I wasn't aware of this. I used this now and it works. Thanks for pointing me to this. regards Uwe
getting rid of lyx.bat - Aiksaurus problem
Last week we discussed how to include the menu language setting to lyxrc. I think this would be an improvement because then we could get rid of the lyx.bat file that is currently used to start LyX on Windows. lyx.bat calls lyx.exe, sets temporarily the language environment variable and the environment variable for Aiksaurus. Now I implemented in the installer that Aiksaurus is registered as standalone program. The installer sets the needed environment variable. This has unfortunately the disadvantage that invoking the thesaurus, when LyX is started the first time directly after the installation, it crashes. This crash occurs because the Aiksaurus data couldn't be found. This is because the environment variable was set via the registry and Windows always needs some time to accept this change. Has anybody of the Windows people an idea? (Enrico?) besides this problem, lyx.bat is now only: @echo off SET LANG=de_DE start LyX lyx.exe %* So Abdel, if you could apply your patch to set the language in lyxrc, lyx.bat can go. regards Uwe Btw., I uploaded my installer source code to SVN under \development\Win32\packaging\LyXWinInstaller
Re: getting rid of lyx.bat - Aiksaurus problem
On Mon, Jan 22, 2007 at 01:33:31AM +0100, Uwe Stöhr wrote: Now I implemented in the installer that Aiksaurus is registered as standalone program. The installer sets the needed environment variable. This has unfortunately the disadvantage that invoking the thesaurus, when LyX is started the first time directly after the installation, it crashes. This crash occurs because the Aiksaurus data couldn't be found. This is because the environment variable was set via the registry and Windows always needs some time to accept this change. Has anybody of the Windows people an idea? (Enrico?) Do you mean that you directly set the variable in HKCU\Environment? Instead, why don't you try setting the path to the Aiksaurus directory through HKCU\Software\Aiksaurus\Data Path (according to the patch in development/Win32/patches)? besides this problem, lyx.bat is now only: @echo off SET LANG=de_DE start LyX lyx.exe %* Are you aware that the console hiding code is no more in place, such that using a lyx.bat doesn't hide the cmd window anymore? -- Enrico
getting rid of lyx.bat - Aiksaurus problem
Last week we discussed how to include the menu language setting to lyxrc. I think this would be an improvement because then we could get rid of the lyx.bat file that is currently used to start LyX on Windows. lyx.bat calls lyx.exe, sets temporarily the language environment variable and the environment variable for Aiksaurus. Now I implemented in the installer that Aiksaurus is registered as standalone program. The installer sets the needed environment variable. This has unfortunately the disadvantage that invoking the thesaurus, when LyX is started the first time directly after the installation, it crashes. This crash occurs because the Aiksaurus data couldn't be found. This is because the environment variable was set via the registry and Windows always needs some time to accept this change. Has anybody of the Windows people an idea? (Enrico?) besides this problem, lyx.bat is now only: @echo off SET LANG=de_DE start "LyX" "lyx.exe" %* So Abdel, if you could apply your patch to set the language in lyxrc, lyx.bat can go. regards Uwe Btw., I uploaded my installer source code to SVN under \development\Win32\packaging\LyXWinInstaller
Re: getting rid of lyx.bat - Aiksaurus problem
On Mon, Jan 22, 2007 at 01:33:31AM +0100, Uwe Stöhr wrote: > Now I implemented in the installer that Aiksaurus is registered as standalone > program. The installer > sets the needed environment variable. > This has unfortunately the disadvantage that invoking the thesaurus, when LyX > is started the first > time directly after the installation, it crashes. This crash occurs because > the Aiksaurus data > couldn't be found. This is because the environment variable was set via the > registry and Windows > always needs some time to accept this change. > > Has anybody of the Windows people an idea? (Enrico?) Do you mean that you directly set the variable in HKCU\Environment? Instead, why don't you try setting the path to the Aiksaurus directory through "HKCU\Software\Aiksaurus\Data Path" (according to the patch in development/Win32/patches)? > besides this problem, lyx.bat is now only: > > @echo off > SET LANG=de_DE > start "LyX" "lyx.exe" %* Are you aware that the console hiding code is no more in place, such that using a lyx.bat doesn't hide the cmd window anymore? -- Enrico