View Issue Details

IDProjectCategoryView StatusLast Update
0001860FreeCADFeaturepublic2015-12-15 13:15
Reporterpiffpoof Assigned Towmayer  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
PlatformMacintoshOSMac OS XOS Version10.6.8
Product Version0.14 
Fixed in Version0.16 
Summary0001860: Can not open a FreeCAD project in FreeCAD by double-clicking the project file on Macintosh
DescriptionCan only start working on a FreeCAD project file by starting FreeCAD and then selecting project file from within FreeCAD. Double-clicking a project file does not open that project within FreeCAD.

By Macintosh standards this should open the file in the associated application.
Steps To Reproduce1 double-click on a FreeCAD project file
2 FreeCAD will start up, but will not open the project file
Additional InformationI have associated the .FCStd file extension with the FreeCAD application in the Info box of the Finder:
File->Get Info
in the Info box "Open WIth:" is set to FreeCAD.app

OS: Mac OS X
Word size: 64-bit
Version: 0.14.3703 (Git)
Branch: releases/FreeCAD-0-14
Hash: c6edd47334a3e6f209e493773093db2b9b4f0e40
Python version: 2.7.5
Qt version: 4.8.6
Coin version: 3.1.3
SoQt version: 1.5.0
OCC version: 6.7.0
TagsNo tags attached.
FreeCAD Information

Activities

piffpoof

2014-12-17 10:05

reporter  

screen snapshot.jpg (Attachment missing)

wmayer

2014-12-21 15:33

administrator   ~0005417

Is there a way to determine with which arguments the FreeCAD executable will be started?

piffpoof

2014-12-21 15:42

reporter   ~0005418

This surpasses my knowledge of FreeCAD on the Macintosh. I am quite happy to look for something if someone can tell me what to look for. For example, is there a command file in the application package that would carry such information?

wmayer

2014-12-21 16:51

administrator   ~0005419

What is a "command file"? Isn't the psn argument used for this purpose?
http://stackoverflow.com/questions/10242115/os-x-strange-psn-command-line-parameter-when-launched-from-finder

piffpoof

2014-12-21 17:05

reporter   ~0005421

Well a "command file" is a shell script or file or whatever else might be used to launch an image as a process within the operating system. As far as I can see from reading the Apple Developer page referenced in StackOverflow, the PSN is just the Process ID which the process will need to register itself for system events etc. and possibly to set up communications with other process(es) on the system.

But as I understand from reading the page the PSN is a returned value after registering with the Process Manager.

I took your initial question to be asking what parameters were passed in when the command line (which could be a shell script) started FreeCAD.

The text on the Stack Overflow page "Our OS X Java application which is launched by a shell script inside the MyApp.app bundle gets a strange command line parameter -psn_0_989382 when launched from the Finder" is what I was saying I could look for. I don't know if FreeCAD is launched by a shell script (what I called a command file) inside the FreeCAD app bundle or not.

nikospap

2014-12-27 08:28

reporter   ~0005449

The same issue with Mageia Linux, and Freecad 0.13 .

I think that the problem, here,
is that the " freecad " command doesn't accept any arguments
(despite what " man freecad " claims).

It could have to do with how the freecad package was build (or compiled).
It would be strange, though, for two different operating systems to have the same issue.

In Mageia Linux, typing on a terminal,
  freecad SOMETHING
will just start Freecad.

For example, the commands
   freecad --help
   freecad 001.fcstd
   freecad --console
will all just start Freecad, and the arguments will be, simply, ignored.

--------------------------------------
Example of terminal output:

[bash 4.2]$ freecad -c
FreeCAD 0.13, Libs: 0.13R$WCREV$
© Juergen Riegel, Werner Mayer, Yorik van Havre 2001-2011
  ##### #### ### ####
  # # # # # #
  # ## #### #### # # # # #
  #### # # # # # # # ##### # #
  # # #### #### # # # # #
  # # # # # # # # # ## ## ##
  # # #### #### ### # # #### ## ## ##




--------------------------------------


Additionally, the freecadcmd isn't there:

[bash 4.2]$ freecadcmd
bash: freecadcmd: command not found



--------------------------------------

wmayer

2014-12-28 18:32

administrator   ~0005458

http://qt-project.org/doc/qt-4.8/qfileopenevent.html
http://www.qtforum.org/article/23098/how-to-make-my-app-open-a-doc-by-dd-or-doubleclick-on-a-mac.html

piffpoof

2014-12-29 10:26

reporter   ~0005462

In case it sheds any light on things, I tried what 'nikospap' reported and it seems that with FreeCAD 0.14 on OS X 10.6.8, the FreeCAD image is accepting the parameters, I've appended the Terminal log:
---------------------------------
Last login: Mon Dec 29 12:02:29 on ttys000
Intel-Mac-Mini:~ macmini2$ /Applications/FreeCAD/FreeCAD.app/Contents/bin/FreeCADCmd
FreeCAD 0.14, Libs: 0.14R3703 (Git)
(c) Juergen Riegel, Werner Mayer, Yorik van Havre 2001-2011
  ##### #### ### ####
  # # # # # #
  # ## #### #### # # # # #
  #### # # # # # # # ##### # #
  # # #### #### # # # # #
  # # # # # # # # # ## ## ##
  # # #### #### ### # # #### ## ## ##

[FreeCAD Console mode <Use Ctrl-D (i.e. EOF) to exit.>]
>>> ^D
Intel-Mac-Mini:~ macmini2$



Intel-Mac-Mini:~ macmini2$ /Applications/FreeCAD/FreeCAD.app/Contents/bin/FreeCADCmd -h
FreeCAD

For detailed descripton see http://www.freecadweb.org

Usage: FreeCAD [options] File1 File2 ...

Allowed options:

Generic options:
  -v [ --version ] Prints version string
  -h [ --help ] Prints help message
  -c [ --console ] Starts in console mode
  --response-file arg Can be specified with '@name', too

Configuration:
  -l [ --write-log ] Writes a log file to:
                           /Users/macmini2/Library/Preferences/FreeCAD/FreeCAD.
                           log
  --log-file arg Unlike to --write-log this allows to log to an
                           arbitrary file
  -u [ --user-cfg ] arg User config file to load/save user settings
  -s [ --system-cfg ] arg Systen config file to load/save system settings
  -t [ --run-test ] arg Test level
  -M [ --module-path ] arg Additional module paths
  -P [ --python-path ] arg Additional python paths

Intel-Mac-Mini:~ macmini2$





Intel-Mac-Mini:~ macmini2$ /Applications/FreeCAD/FreeCAD.app/Contents/bin/FreeCADCmd /Users/macmini2/abc.FCStd
FreeCAD 0.14, Libs: 0.14R3703 (Git)
(c) Juergen Riegel, Werner Mayer, Yorik van Havre 2001-2011
  ##### #### ### ####
  # # # # # #
  # ## #### #### # # # # #
  #### # # # # # # # ##### # #
  # # #### #### # # # # #
  # # # # # # # # # ## ## ##
  # # #### #### ### # # #### ## ## ##

Importing project files......
Intel-Mac-Mini:~ macmini2$ (100.0 %)
Intel-Mac-Mini:~ macmini2$
Intel-Mac-Mini:~ macmini2$

wmayer

2015-11-28 18:10

administrator   ~0006557

http://forum.freecadweb.org/viewtopic.php?f=3&t=13335&p=106617#p106617

Related Changesets

FreeCAD: master 76c238fc

2015-11-29 15:36:47

wmayer

Details Diff
+ fixes 0001860: Can not open a FreeCAD project in FreeCAD by double-clicking the project file on Macintosh Affected Issues
0001860
mod - src/Gui/GuiApplication.cpp Diff File
mod - src/Gui/GuiApplication.h Diff File
mod - src/MacAppBundle/FreeCAD.app/Contents/Info.plist Diff File

Issue History

Date Modified Username Field Change
2014-12-17 10:05 piffpoof New Issue
2014-12-17 10:05 piffpoof File Added: screen snapshot.jpg
2014-12-21 15:33 wmayer Note Added: 0005417
2014-12-21 15:42 piffpoof Note Added: 0005418
2014-12-21 16:51 wmayer Note Added: 0005419
2014-12-21 17:05 piffpoof Note Added: 0005421
2014-12-27 08:28 nikospap Note Added: 0005449
2014-12-28 18:32 wmayer Note Added: 0005458
2014-12-29 10:26 piffpoof Note Added: 0005462
2015-11-28 18:10 wmayer Note Added: 0006557
2015-11-29 14:37 wmayer Changeset attached => FreeCAD Master master 76c238fc
2015-11-29 14:37 wmayer Assigned To => wmayer
2015-11-29 14:37 wmayer Status new => closed
2015-11-29 14:37 wmayer Resolution open => fixed
2015-12-15 13:15 yorik Fixed in Version => 0.16