comandline option don't work on win xp

Bug #541956 reported by Bernhard
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
Medium
Krzysztof Kosinski

Bug Description

I tried to use the commandline options as described in the help menu.
There is no reaction to -?, ---help, -V, --version and no other comandline option like export to eps or wmf.
I'm using Inkscape 0.47 r22583, built Nov 21 2009 on Windows XP SP3.

Tags: cli win32

Related branches

su_v (suv-lp)
tags: added: cli win32
Revision history for this message
Bernhard (comercial-abwangler) wrote :

Similar issue on Mac OS X Snow Leopard:

bash-3.2$ ./inkscape /Users/xyz/Desktop/Bug.svg --export-eps=/Users/xyz/Desktop/Bug.eps --export-text-to-path
Setting Language: de_DE.UTF-8
Xlib: extension "RANDR" missing on display "/tmp/launch-IgucU3/:0".

(inkscape-bin:6899): Gtk-WARNING **: Could not find the icon 'object-visible'. The 'hicolor' theme
was not found either, perhaps you need to install it.
You can get a copy from:
        http://icon-theme.freedesktop.org/releases

Same output for all comand line options described in http://inkscape.modevia.com/inkscape-man.html.

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

regarding the OS X issue: please read these reports for an in-depth explanation how it works with bundled applications on osx and how you still have access to all command line options available:

Bug #181639 “Command-line invocation on Mac OSX partially broken”:
<https://bugs.launchpad.net/inkscape/+bug/181639>
Bug #435812 “Inkscape command-line is broken on Mac OS X”:
<https://bugs.launchpad.net/inkscape/+bug/435812>

Revision history for this message
Alvin Penner (apenner) wrote :

with respect to the Windows issue, could you try the method outlined at:]
http://kaioa.com/node/63
This will involve downloading and running a small utility called inkscapec.exe from a DOS prompt in the same directory where Inkscape is. This will allow you to see all the messages generated by Inkscape. Attached is a typical output:

D:\Program Files\Inkscape>inkscapec -V
Inkscape 0.47+devel r9192 (Mar 14 2010)

Revision history for this message
Bernhard (comercial-abwangler) wrote :

In Windows, I tried the tool on kaioa.com. It worked fine and revealed a strange behavior of inkscape:
If you want to convert a svg file, you have to refer it with its full path. Shortforms like ".\a.svg" don't work. The same for the target file.
This is not intuitive.

If you forget the targetfile after the '='-sign - no error will be shown and no action done.

The function works but there is still much to be optimized left.

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

> The function works but there is still much to be optimized left.
already reported in bug #167455 “WinXP2: Command line file names not current dir relative”

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

This particular symptom is caused by the fact that inkscape.exe is a GUI application. The only way to have an application that behaves as GUI or command line depending on how it is run is to have two applications, inkscape.exe and inkscape.com. The .com application would run in console mode.

Revision history for this message
LucaDC (lucadc) wrote :

I'm not a guru in Windows programming, but for what I know it's not true that you need two different applications. Every Windows application have two entry points, winmain() and main() that are called based on where the call is issued: if it's from command prompt the main() is called, if from GUI the winmain() is called.
In this way it's possible to give a message like "this program cannot be run in DOS mode" or to exibit different behavior like a command prompt version.
The .com is something really old (DOS) that is related on how the executable was loaded in memory as it's a direct image of what will be loaded in memory while the .exe is relocated and processed at the veery beginning of the execution. The .com was meant for small, lightweight executables in times when memory was measured in kB (in fact if I remember well it must be smaller than 64 kB).

Feel free to correct me if I'm wrong.

Regards.

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

LucaDC: this is wrong. Which entry point is called depends on how the application is linked, not where it is run from.

The message about DOS mode is not related in any way to running the program in console. It is a backward compatibility feature of the PE executable format. The first kilobyte or so of a PE file mimic a legacy DOS application that displays this message and exits. This code path is never run in Windows, regardless of whether the app is console or GUI.

Here's a good explanation
http://blogs.msdn.com/oldnewthing/archive/2009/01/01/9259142.aspx

Revision history for this message
LucaDC (lucadc) wrote :

Ok, I've said I'm not a guru in Windows programming ;)
I never tried to have an application behave both as a console and a GUI one. Now It's more clear to me, thanks for the link.

This explains why many applications have a specific separate executable for command-line operations.

Regards.

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

Fixed in 9251. There is now inkscape.com that is a console wrapper for Inkscape's GUI executable. Typing "inkscape" on the command prompt works as in Unix now.

Changed in inkscape:
status: New → Fix Committed
importance: Undecided → Medium
assignee: nobody → Krzysztof Kosinski (tweenk)
milestone: none → 0.48
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.