Re: GSoC: Libreoffice Theme WIN (not getting stdout, cannot do printfdebugging)
For the record, this also works in gdb (and front-ends such as ddd): ignore where is the breakpoint number and is the number of times to ignore it. -- Kurt On Tuesday, July 2nd, 2024 at 12:41 AM, Mike Kaganski wrote: > On 01.07.2024 23:42, Sahil Gautam wrote: > > > Hi, I successfully built libreoffice on windows using LODE. The problem > > is that I cannot see stdout on the terminal, or in vscode's terminal. I > > rely on that for checking if opening this dialog trips this breakpoint > > or not, and how many times does it do so. using a debugger seems a good > > choice, but it's a hassle considering that UI can trigger a function > > changing colors n times, and I don't want to press F5 n times, it's not > > feasible. Is there any way to get the stdout on the terminal? > > > Since you develop on Windows, a natural choice would be using Visual > Studio for debugging. And it allows setting a special kind of > breakpoints, which outputs a string (maybe with different variables > values), and continued execution. This is in a sense superior to printf, > because it doesn't need a modification and compilation, but you can do > it at the runtime, changing the output dynamically, enabling and > disabling the breakpoints. The downside is its lower performance; so > e.g. putting such a breakpoint to e.g. OUString constructor would make > your debugging session crawl and last for days :-) > > In a reply to another mail, I mention that there is a proper console > mode on Windows since version 6.3. However, Cygwin's mintty has never > beed affected by the problem, so if you run from mintty, it should > output properly, even if you run soffice.exe. In Windows' cmd.exe, > calling soffice without an extension runs soffice.com automatically, and > also should give the proper console output. But of course, this is all > general considerations, and to advise something concrete, specifics of > your problem are required. > > -- > Best regards, > Mike Kaganski
Re: GSoC: Libreoffice Theme WIN (not getting stdout, cannot do printfdebugging)
On 01.07.2024 23:42, Sahil Gautam wrote: Hi, I successfully built libreoffice on windows using LODE. The problem is that I cannot see stdout on the terminal, or in vscode's terminal. I rely on that for checking if opening this dialog trips this breakpoint or not, and how many times does it do so. using a debugger seems a good choice, but it's a hassle considering that UI can trigger a function changing colors n times, and I don't want to press F5 n times, it's not feasible. Is there any way to get the stdout on the terminal? Since you develop on Windows, a natural choice would be using Visual Studio for debugging. And it allows setting a special kind of breakpoints, which outputs a string (maybe with different variables values), and continued execution. This is in a sense superior to printf, because it doesn't need a modification and compilation, but you can do it at the runtime, changing the output dynamically, enabling and disabling the breakpoints. The downside is its lower performance; so e.g. putting such a breakpoint to e.g. OUString constructor would make your debugging session crawl and last for days :-) In a reply to another mail, I mention that there is a proper console mode on Windows since version 6.3. However, Cygwin's mintty has never beed affected by the problem, so if you run from mintty, it should output properly, even if you run soffice.exe. In Windows' cmd.exe, calling soffice without an extension runs soffice.com automatically, and also should give the proper console output. But of course, this is all general considerations, and to advise something concrete, specifics of your problem are required. -- Best regards, Mike Kaganski
Re: GSoC: Libreoffice Theme WIN (not getting stdout, cannot do printfdebugging)
On 02.07.2024 11:07, Jim Raykowski wrote: For me, running with instdir/program/soffice.exe doesn't show std::cout output in the terminal. Running with instdir/program/soffice.bin does. https://mikekaganski.wordpress.com/2018/11/21/proper-console-mode-for-libreoffice-on-windows/ -- Best regards, Mike Kaganski
Re: GSoC: Libreoffice Theme WIN (not getting stdout, cannot do printfdebugging)
For me, running with instdir/program/soffice.exe doesn't show std::cout output in the terminal. Running with instdir/program/soffice.bin does. On Mon, Jul 1, 2024 at 9:15 PM Heiko Tietze wrote: > > In cygwin environment, don't you run instdir/program/soffice.exe? Works well > here. > > > On 01.07.24 8:42 PM, Sahil Gautam wrote: > > Hi, I successfully built libreoffice on windows using LODE. The problem is > > that > > I cannot see stdout on the terminal, or in vscode's terminal. I rely on > > that for > > checking if opening this dialog trips this breakpoint or not, and how many > > times > > does it do so. using a debugger seems a good choice, but it's a hassle > > considering that UI can trigger a function changing colors n times, and I > > don't > > want to press F5 n times, it's not feasible. Is there any way to get the > > stdout > > on the terminal? I tried ./..soffice > log.file, but didn't get anything. > > If not > > then n times F5 (continue the debugger) will be the only option. I use > > `std::cout << "string here" << std::endl;` in the function calls. Regards > > Sahil > > Gautam
Re: GSoC: Libreoffice Theme WIN (not getting stdout, cannot do printfdebugging)
In cygwin environment, don't you run instdir/program/soffice.exe? Works well here. On 01.07.24 8:42 PM, Sahil Gautam wrote: Hi, I successfully built libreoffice on windows using LODE. The problem is that I cannot see stdout on the terminal, or in vscode's terminal. I rely on that for checking if opening this dialog trips this breakpoint or not, and how many times does it do so. using a debugger seems a good choice, but it's a hassle considering that UI can trigger a function changing colors n times, and I don't want to press F5 n times, it's not feasible. Is there any way to get the stdout on the terminal? I tried ./..soffice > log.file, but didn't get anything. If not then n times F5 (continue the debugger) will be the only option. I use `std::cout << "string here" << std::endl;` in the function calls. Regards Sahil Gautam OpenPGP_signature.asc Description: OpenPGP digital signature
Re: GSoC: Libreoffice Theme WIN (not getting stdout, cannot do printfdebugging)
Hi, I successfully built libreoffice on windows using LODE. The problem is that I cannot see stdout on the terminal, or in vscode's terminal. I rely on that for checking if opening this dialog trips this breakpoint or not, and how many times does it do so. using a debugger seems a good choice, but it's a hassle considering that UI can trigger a function changing colors n times, and I don't want to press F5 n times, it's not feasible. Is there any way to get the stdout on the terminal? I tried ./..soffice > log.file, but didn't get anything. If not then n times F5 (continue the debugger) will be the only option. I use `std::cout << "string here" << std::endl;` in the function calls. Regards Sahil Gautam On 6/30/24 12:49 AM, Sahil Gautam wrote: Hi, So I was setting up Libreoffice Dev on windows (Yes, windows), I was following the LODE guide from the wiki. I faced this error while running ./autogen.sh checking whether build should auto use hardening compiler flags... no checking whether to build a Community flavor... yes checking whether to sign windows build... no checking for gawk... gawk checking for gawk... /usr/bin/gawk checking for bash... /bin/sh checking for pigz... no checking for gzip... /usr/bin/gzip checking for GNU or BSD tar... tar checking for tar's option to strip components... --strip-components checking how to build and package galleries... internal src images for desktop checking build with or without template files... enable all templates checking for ccache... not found checking for sccache... (cached) not foundchecking whether to build with .NET support... yes checking for dotnet... no checking whether to build with Java support... yes checking whether to treat the installation as read-only... no checking Visual C++... checking VC++ Build Tools and similar... configure: error: no Visual Studio installation found Error running configure at ./autogen.sh line 321. I will try one more time, and If I get some success, then I will write a followup. Also I Installed visual studio 2022 community (this is what I found on the first few links. on a google search) On 28-06-2024 10:37, Sahil Gautam wrote: Hi, I missed the email for the last week, sorry for that. So the patch for gtk was pushed, and the one for QT will be out by tommorrow(+1 day). I spent quite some time with QStyle trying to get it to paint the UI elements, which complicated stuff, and took a lot of time, where it was just palette manipulation (mostly). Also I found that we handle the menubar separately, and it's not drawn via drawNativeControl(...). What is left for QT: - color customization for menus (menubar/window/button/etc done) - adding a listener for instant redraw - And some improvements on the GTK patch (on color coverage). Then I will start with windows vcl plugin. Can't say, but I would be very happy if I get done with windows vcl plugin before the mid term evaluation. In this time I tried setting up macos VM as well, and using quickget (as suggested by Ilmari), it was quite simple. (Though it took years to install neovim via brew, and I had to C^c it every time) Regards Sahil Gautam On 6/11/24 11:44 PM, Sahil Gautam wrote: Hi, so the issue has been resolved,https://gerrit.libreoffice.org/c/core/+/168016/comment/b977e358_def16582/ [Rafael's comment on missing registry entry for LoadDefaultSystemColors]. Now it loads the default colors into the registry once (as expected). On 6/11/24 4:04 AM, Sahil Gautam wrote: Hi went through the design of data flow this week. I found myself running away from the VCL and it's colors, or rather from the question of "how to get 2 way exchange of colors working". https://gerrit.libreoffice.org/c/core/+/168016 Here's the patch [WIP] There is quite some information to keep in the head, I would try to briefly describe it. - So we get colors out of the widget toolkits using the updateSettings() functions. - We have ColorConfig() which gives access to the ExpertConfiguration colors (or colors in the registry