Single app for GUI and console mode on Windows

Bug #520532 reported by Fridrich
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
Low
Krzysztof Kosinski

Bug Description

There are some issue when building inkscape in a case-sensitive environment. This patch fixes some of those.
It also adds the building of inkscape using normal configury into a "windows" application with the possibility to have console output when we launch inkscape or inkview from console (windows xp or further).

Tags: build win32
Revision history for this message
Fridrich (fridrich-strba) wrote :
jazzynico (jazzynico)
tags: added: build win32
Changed in inkscape:
assignee: nobody → Krzysztof Kosinski (tweenk)
Changed in inkscape:
status: New → In Progress
Changed in inkscape:
status: In Progress → Fix Committed
summary: - Patch to allow building inkscape for 32-bit windows using mingw-w64
- flawour of mingw toochain
+ Single app for GUI and console mode on Windows + mingw-w64 fixes
Changed in inkscape:
milestone: none → 0.48
Revision history for this message
Krzysztof Kosinski (tweenk) wrote :

The patch does not work as I expected. Typing "inkscape" in the command prompt should behave exactly as on Unix. I have some ideas how to do this, but until now none of them worked, so I'm leaving this as "In Progress".

summary: - Single app for GUI and console mode on Windows + mingw-w64 fixes
+ Single app for GUI and console mode on Windows
Changed in inkscape:
status: Fix Committed → In Progress
importance: Undecided → Low
Revision history for this message
Fridrich (fridrich-strba) wrote :

Could I know what "does not work as expected". The patch is doing following: if you launch inkscape by clicking the icon, the stdout and stderr are redirected to invalid file handles as it is normal in windows applications. When inkscape is launched from a console, you will get the console output on the console (works on Windows XP and later) with all the eventual debugging messages. For instance all glib and gtk critical errors and warnings show. This can be useful when things are not doing what one expects. It is also good because one can produce one version with symbols, strip the symbols into a separate inkscape.exe.debug file and use that version as a normal version. When debugging is needed, one can just install the debug files and have all the console stuff present.

Revision history for this message
Krzysztof Kosinski (tweenk) wrote :

The problem is that Inkscape will immediately detach from the console, and any output will write over the command prompt. It's also not possible to use standard input (important e.g. for shell mode).

Revision history for this message
Fridrich (fridrich-strba) wrote :

Yeah, it is true about the fact that it detaches from the console. But this is the closest to Unix way that one is able to get on windows, at least I did not get closer than that myself. I still guess that it is useful, because like that if user makes for instance "inkscape --help" on command prompt, he can read the output :)

Revision history for this message
Krzysztof Kosinski (tweenk) wrote :

Yes, it's more useful than a plain GUI app; but there's a second way, namely use a second executable named inkscape.com that will spawn the GUI app and feed its output to the console. I haven't had success with this approach so far, but it's definitely possible (it's essentially what the inkcl.py hack uses).

Revision history for this message
su_v (suv-lp) wrote :

Doesn't inkscapec.exe - A Command Line Wrapper for Win32' from <http://kaioa.com/node/63> already do this?

«… a tiny console application, which spawns Inkscape (with the specified arguments) and captures its stdout (default output) and stderr (default error output) streams and redirects it to this console. …»

Revision history for this message
Krzysztof Kosinski (tweenk) wrote :

Yes, it looks like precisely the thing I wanted

Revision history for this message
Krzysztof Kosinski (tweenk) wrote :

Fixed in 9254. There are actually two executables, but the console executable has a .com extension and takes precedence over inkscape.exe when run from the command prompt. Finally, typing "inkscape" into the command prompt should work like it does on Unix.

Changed in inkscape:
status: In Progress → Fix Committed
jazzynico (jazzynico)
Changed in inkscape:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.