sketchPath() broken on exported apps from 2.1?

edited October 2013 in Using Processing

As far as I can tell, sketchPath() is returning my home directory on Processing 2.1 with OSX 10.8.5 causing my exported builds to fail -- are others seeing this as well? Any known good workarounds? Did I miss something in the build notes and this is just user-error? (hopefully)

Jack

Tagged:

Answers

  • edited October 2013 Answer ✓

    Don't own a Mac! Anyways, here's a diag snippet: ~O)

    println( javaVersionName );
    println( System.getProperty("java.home")  + "\n" );
    
    println( System.getProperty("os.arch") );
    println( System.getProperty("os.name") );
    println( System.getProperty("os.version") + "\n" );
    
    println( System.getProperty("user.home") );
    println( System.getProperty("user.dir")   + "\n" );
    
    println( sketchPath );
    println( dataPath("") );
    
    exit();
    
  • Good call I should have done that. Yup, seeing some wonkyness... when running from processing I get:

    javaVersionName: 1.7.0_45
    java.home:       /Applications/Processing-2.1.app/Contents/PlugIns/jdk1.7.0_45.jdk/Contents/Home/jre
    
    os.arch:         x86_64
    os.name:         Mac OS X
    os.version:      10.8.5
    
    user.home:        /Users/jack.kern
    user.dir:        /Users/jack.kern
    dataPath():      /Users/jack.kern/Dropbox/Jack/My Programming/Processing/sketchPathDiag/data
    sketchPath():    /Users/jack.kern/Dropbox/Jack/My Programming/Processing/sketchPathDiag/
    

    And then running exported app from the commandline:

    JKERNOAKOSX2:sketchPathDiag jack.kern$ ./run.sh
    javaVersionName: 1.7.0_45
    java.home:       /Users/jack.kern/Desktop/sketchPathDiag/sketchPathDiag.app/Contents/PlugIns/jdk1.7.0_45.jdk/Contents/Home/jre
    
    os.arch:         x86_64
    os.name:         Mac OS X
    os.version:      10.8.5
    
    user.home:        /Users/jack.kern
    user.dir:        /Users/jack.kern
    /Users/jack.kern/Desktop/sketchPathDiag/sketchPathDiag.app/Contents/Java/data
    dataPath():      /Users/jack.kern/Desktop/sketchPathDiag/sketchPathDiag.app/Contents/Java/data
    sketchPath():    /Users/jack.kern/
    

    Guess it's time to file a bug.

  • edited October 2013

    That's what I got in mine: :D

    1.7.0_25
    /usr/lib/jvm/java-7-openjdk-amd64/jre
    
    amd64
    Linux
    3.8.0-32-generic
    
    /home/goto
    /home/goto/processing-2.0.2
    
    /home/goto/sketchbook/Examples/JavaVersion
    /home/goto/sketchbook/Examples/JavaVersion/data
    
  • That was after exporting?

Sign In or Register to comment.