sagemath / sage

Main repository of SageMath. Now open for Issues and Pull Requests.
https://www.sagemath.org
Other
1.19k stars 412 forks source link

Create Mac Application that people love to use #9873

Closed gvol closed 13 years ago

gvol commented 13 years ago

Many people want a Mac application, but so far none has appeared that was worthy of the name Sage. This must change! We need something which can launch terminal sessions, install spkg files, run and provide quicklook support for sage files. Something that can be used as a MenuExtra, and optionally act as a primitive browser for the notebook.

Is such a thing even possible? Yes! In fact such an application is almost here!

CC: @kcrisman @jasongrout @sagetrac-GeorgSWeber @sagetrac-mhampton @qed777

Component: user interface

Keywords: mac

Author: Ivan Andrus

Reviewer: Karl-Dieter Crisman, Jason Grout, John Palmieri

Merged: sage-4.6.alpha2

Issue created by migration from https://trac.sagemath.org/ticket/9873

jasongrout commented 13 years ago
comment:2

I'm excited!

Also, Ivan: the author field should contain your full name.

gvol commented 13 years ago

A readme for Sage.app

gvol commented 13 years ago
comment:3

Attachment: README.txt

This will supersede #5296 if it gets in first.

gvol commented 13 years ago

Changed author from iandrus to Ivan Andrus

jasongrout commented 13 years ago
comment:5

As Ivan points out in the sage-devel email: #8473 is related

jasongrout commented 13 years ago
comment:6

I assume the "scripts" patch should be applied to the $SAGE_ROOT/local/bin repository?

gvol commented 13 years ago
comment:7

Replying to @jasongrout:

I assume the "scripts" patch should be applied to the $SAGE_ROOT/local/bin repository?

Yes. I think that's what hg_scripts points to, so that's why I called it "scripts".

kcrisman commented 13 years ago
comment:8

Replying to @gvol:

This will supersede #5296 if it gets in first.

Incorrect. There are two READMEs in operation.

One is the one that gets bdisted to the top level of the dmg disk image, and has information like is on here. This one is more about the app bundle itself, not about how to use Sage for an absolute beginner.

That doesn't mean they couldn't be combined, but for now they clearly address two different things.

Also, there's a typo in the comment on line 101 of the script patch.

jasongrout commented 13 years ago
comment:9

Here is what appears when I do the bdist:

Sage works!
Copying files over to tmp directory
cp: *.sage: No such file or directory
Copying Sage library over
Making empty spkg's
There will be an error about x below that you can safely ignore.
mv: rename x to x/x: Invalid argument
If you wish to create a Mac Application please set
SAGE_APP_BUNDLE=yes
Creating dmg
(If you don't wish to create a disk image please set SAGE_APP_DMG=no)
............................................................
created: /Users/grout/sage-4.5.2/tmp/sage-4.4.2-i386-Darwin.dmg
Moving final distribution file to /Users/grout/sage/dist
  1. The note about setting SAGE_APP_BUNDLE=yes should probably be deleted now, since it is done by default?

  2. It'd be nice if the two other errors about moving/copying were taken care of, but they might be from other things in bdist and not be applicable to this ticket.

kcrisman commented 13 years ago
comment:10

Respecting 2., I think that the other errors are ok. The first means that you must not have a .sage profile or whatever in your home directory (at least I think that is the point); the second one has been in this since the earliest days, and is definitely not related to the app bundle issue. If you don't like them, that would be a separate ticket, in my opinion; they are longstanding.

Putting myself in reviewer since I already put in quite a bit of feedback before this hit primetime - but lots more review needed!

kcrisman commented 13 years ago

Reviewer: Karl-Dieter Crisman

jasongrout commented 13 years ago
comment:11

I spoke too soon. I thought the app DMG would be created by default, but apparently it isn't, and I still need to set SAGE_APP_BUNDLE=yes. I guess this is okay, as usually people would just download the app directly.

jasongrout commented 13 years ago
comment:12

(if not creating an app dmg is going to be the default, then we can delete the note about SAGE_APP_BUNDLE=no)

kcrisman commented 13 years ago
comment:13

Something must have gotten messed up here. Ivan, I think the idea was that the app bundle would be the default once we could do both Terminal and Notebook in the same app, right? At least, that was my strongly encouraged idea :) One should be able to NOT do the bundle, but the default should be the bundle (same with dmg versus tar.gz). So maybe the scripts patch needs a change.

gvol commented 13 years ago
comment:14

Replying to @kcrisman:

Something must have gotten messed up here. Ivan, I think the idea was that the app bundle would be the default once we could do both Terminal and Notebook in the same app, right? At least, that was my strongly encouraged idea :) One should be able to NOT do the bundle, but the default should be the bundle (same with dmg versus tar.gz). So maybe the scripts patch needs a change.

The reason that I didn't make building the app default is that last time I did that I got in trouble :-) Well I just had to back out that portion. I'm happy to make it the default though if people think it should be. We should probably ask on sage-devel first though since it may catch people off guard (the message doesn't come until near the end of a long process).

jasongrout commented 13 years ago
comment:15

I just applied both patches and tried building with the SAGE_APP_BUNDLE=yes, and got errors:

grout@tiny:~/sage/dist% export SAGE_APP_BUNDLE=yes
grout@tiny:~/sage/dist% sage -bdist 4.4.2-app     
Sage works!
Copying files over to tmp directory
cp: *.sage: No such file or directory
Copying Sage library over
Making empty spkg's
There will be an error about x below that you can safely ignore.
mv: rename x to x/x: Invalid argument
Building the Mac Application
Build settings from command line:
    ARCHES = ppc ppc64 i386 x86_64

=== BUILD NATIVE TARGET Sage OF PROJECT Sage WITH CONFIGURATION Debug ===
Check dependencies
ProcessInfoPlistFile build/Debug/Sage.app/Contents/Info.plist Sage-Info.plist
    cd /Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app
    builtin-infoPlistUtility Sage-Info.plist -genpkginfo /Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/build/Debug/Sage.app/Contents/PkgInfo -expandbuildsettings -platform macosx -o /Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/build/Debug/Sage.app/Contents/Info.plist

error: The file “Sage-Info.plist” couldn’t be opened because there is no such file.
The file “Sage-Info.plist” couldn’t be opened because there is no such file.
CpResource build/Debug/Sage.app/Contents/Resources/English.lproj/Credits.html English.lproj/Credits.html
    cd /Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app
    /Developer/Library/PrivateFrameworks/DevToolsCore.framework/Resources/pbxcp -exclude .DS_Store -exclude CVS -exclude .svn -resolve-src-symlinks /Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/English.lproj/Credits.html /Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/build/Debug/Sage.app/Contents/Resources/English.lproj

CompileXIB English.lproj/MainMenu.xib
    cd /Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app
    /Developer/usr/bin/ibtool --errors --warnings --notices --output-format human-readable-text --compile /Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/build/Debug/Sage.app/Contents/Resources/English.lproj/MainMenu.nib /Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/English.lproj/MainMenu.xib

/* com.apple.ibtool.document.notices */
/Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/English.lproj/MainMenu.xib:551: note: This view is clipping its content.
This view is clipping its content.
/Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/English.lproj/MainMenu.xib:547: note: This view is clipping its content.
This view is clipping its content.
/Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/English.lproj/MainMenu.xib:1268: note: This view is clipping its content.
This view is clipping its content.
/Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/English.lproj/MainMenu.xib:1252: note: This view is clipping its content.
This view is clipping its content.
/Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/English.lproj/MainMenu.xib:1320: note: This view is clipping its content.
This view is clipping its content.
/Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/English.lproj/MainMenu.xib:549: note: This view is clipping its content.
This view is clipping its content.
/Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/English.lproj/MainMenu.xib:1315: note: This view is clipping its content.
This view is clipping its content.
CpResource build/Debug/Sage.app/Contents/Resources/appl.icns appl.icns
    cd /Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app
    /Developer/Library/PrivateFrameworks/DevToolsCore.framework/Resources/pbxcp -exclude .DS_Store -exclude CVS -exclude .svn -resolve-src-symlinks /Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/appl.icns /Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/build/Debug/Sage.app/Contents/Resources

pbxcp: appl.icns: No such file or directory
pbxcp: appl.icns: No such file or directory
CpResource build/Debug/Sage.app/Contents/Resources/Defaults.plist Defaults.plist
    cd /Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app
    /Developer/Library/PrivateFrameworks/DevToolsCore.framework/Resources/pbxcp -exclude .DS_Store -exclude CVS -exclude .svn -resolve-src-symlinks /Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/Defaults.plist /Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/build/Debug/Sage.app/Contents/Resources

pbxcp: Defaults.plist: No such file or directory
pbxcp: Defaults.plist: No such file or directory
CpResource build/Debug/Sage.app/Contents/Resources/sage-document-py.icns sage-document-py.icns
    cd /Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app
    /Developer/Library/PrivateFrameworks/DevToolsCore.framework/Resources/pbxcp -exclude .DS_Store -exclude CVS -exclude .svn -resolve-src-symlinks /Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/sage-document-py.icns /Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/build/Debug/Sage.app/Contents/Resources

pbxcp: sage-document-py.icns: No such file or directory
pbxcp: sage-document-py.icns: No such file or directory
CpResource build/Debug/Sage.app/Contents/Resources/sage-document-spkg.icns sage-document-spkg.icns
    cd /Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app
    /Developer/Library/PrivateFrameworks/DevToolsCore.framework/Resources/pbxcp -exclude .DS_Store -exclude CVS -exclude .svn -resolve-src-symlinks /Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/sage-document-spkg.icns /Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/build/Debug/Sage.app/Contents/Resources

pbxcp: sage-document-spkg.icns: No such file or directory
pbxcp: sage-document-spkg.icns: No such file or directory
CpResource build/Debug/Sage.app/Contents/Resources/sage-document-sage.icns sage-document-sage.icns
    cd /Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app
    /Developer/Library/PrivateFrameworks/DevToolsCore.framework/Resources/pbxcp -exclude .DS_Store -exclude CVS -exclude .svn -resolve-src-symlinks /Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/sage-document-sage.icns /Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/build/Debug/Sage.app/Contents/Resources

pbxcp: sage-document-sage.icns: No such file or directory
pbxcp: sage-document-sage.icns: No such file or directory
CpResource build/Debug/Sage.app/Contents/Resources/sage-document-sws.icns sage-document-sws.icns
    cd /Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app
    /Developer/Library/PrivateFrameworks/DevToolsCore.framework/Resources/pbxcp -exclude .DS_Store -exclude CVS -exclude .svn -resolve-src-symlinks /Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/sage-document-sws.icns /Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/build/Debug/Sage.app/Contents/Resources

pbxcp: sage-document-sws.icns: No such file or directory
pbxcp: sage-document-sws.icns: No such file or directory
CpResource build/Debug/Sage.app/Contents/Resources/sage-small-blue.png sage-small-blue.png
    cd /Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app
    /Developer/Library/PrivateFrameworks/DevToolsCore.framework/Resources/pbxcp -exclude .DS_Store -exclude CVS -exclude .svn -resolve-src-symlinks /Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/sage-small-blue.png /Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/build/Debug/Sage.app/Contents/Resources

pbxcp: sage-small-blue.png: No such file or directory
pbxcp: sage-small-blue.png: No such file or directory
CpResource build/Debug/Sage.app/Contents/Resources/sage-small-grey.png sage-small-grey.png
    cd /Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app
    /Developer/Library/PrivateFrameworks/DevToolsCore.framework/Resources/pbxcp -exclude .DS_Store -exclude CVS -exclude .svn -resolve-src-symlinks /Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/sage-small-grey.png /Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/build/Debug/Sage.app/Contents/Resources

pbxcp: sage-small-grey.png: No such file or directory
pbxcp: sage-small-grey.png: No such file or directory
CpResource build/Debug/Sage.app/Contents/Resources/sage-small-green.png sage-small-green.png
    cd /Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app
    /Developer/Library/PrivateFrameworks/DevToolsCore.framework/Resources/pbxcp -exclude .DS_Store -exclude CVS -exclude .svn -resolve-src-symlinks /Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/sage-small-green.png /Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/build/Debug/Sage.app/Contents/Resources

pbxcp: sage-small-green.png: No such file or directory
pbxcp: sage-small-green.png: No such file or directory
CpResource build/Debug/Sage.app/Contents/Resources/sage-small-red.png sage-small-red.png
    cd /Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app
    /Developer/Library/PrivateFrameworks/DevToolsCore.framework/Resources/pbxcp -exclude .DS_Store -exclude CVS -exclude .svn -resolve-src-symlinks /Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/sage-small-red.png /Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/build/Debug/Sage.app/Contents/Resources

pbxcp: sage-small-red.png: No such file or directory
pbxcp: sage-small-red.png: No such file or directory
CpResource build/Debug/Sage.app/Contents/Resources/start-sage.sh start-sage.sh
    cd /Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app
    /Developer/Library/PrivateFrameworks/DevToolsCore.framework/Resources/pbxcp -exclude .DS_Store -exclude CVS -exclude .svn -resolve-src-symlinks /Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/start-sage.sh /Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/build/Debug/Sage.app/Contents/Resources

CpResource build/Debug/Sage.app/Contents/Resources/open-location.sh open-location.sh
    cd /Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app
    /Developer/Library/PrivateFrameworks/DevToolsCore.framework/Resources/pbxcp -exclude .DS_Store -exclude CVS -exclude .svn -resolve-src-symlinks /Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/open-location.sh /Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/build/Debug/Sage.app/Contents/Resources

CpResource build/Debug/Sage.app/Contents/Resources/loading-page.html loading-page.html
    cd /Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app
    /Developer/Library/PrivateFrameworks/DevToolsCore.framework/Resources/pbxcp -exclude .DS_Store -exclude CVS -exclude .svn -resolve-src-symlinks /Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/loading-page.html /Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/build/Debug/Sage.app/Contents/Resources

CopyStringsFile build/Debug/Sage.app/Contents/Resources/English.lproj/InfoPlist.strings English.lproj/InfoPlist.strings
    cd /Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app
    setenv ICONV /usr/bin/iconv
    /Developer/Library/Xcode/Plug-ins/CoreBuildTasks.xcplugin/Contents/Resources/copystrings --validate --inputencoding utf-8 --outputencoding UTF-16 English.lproj/InfoPlist.strings --outdir /Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/build/Debug/Sage.app/Contents/Resources/English.lproj

CompileXIB English.lproj/MyDocument.xib
    cd /Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app
    /Developer/usr/bin/ibtool --errors --warnings --notices --output-format human-readable-text --compile /Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/build/Debug/Sage.app/Contents/Resources/English.lproj/MyDocument.nib /Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/English.lproj/MyDocument.xib

/* com.apple.ibtool.document.notices */
/Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/English.lproj/MyDocument.xib:100025: note: This view is clipping its content.
This view is clipping its content.
ProcessPCH /var/folders/2J/2JGMKXefHFWmTZ1Ln92Z4U+++TI/-Caches-/com.apple.Xcode.501/SharedPrecompiledHeaders/Sage_Prefix-cgjcfjqijsdnkvcdpwtgjctwsaxz/Sage_Prefix.pch.gch Sage_Prefix.pch normal x86_64 objective-c com.apple.compilers.gcc.4_2
    cd /Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app
    setenv LANG en_US.US-ASCII
    /Developer/usr/bin/gcc-4.2 -x objective-c-header -arch x86_64 -fmessage-length=0 -pipe -std=gnu99 -Wno-trigraphs -fpascal-strings -fasm-blocks -O0 -Wreturn-type -Wunused-variable -isysroot /Developer/SDKs/MacOSX10.5.sdk -mfix-and-continue -mmacosx-version-min=10.5 -gdwarf-2 -iquote /Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/build/Sage.build/Debug/Sage.build/Sage-generated-files.hmap -I/Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/build/Sage.build/Debug/Sage.build/Sage-own-target-headers.hmap -I/Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/build/Sage.build/Debug/Sage.build/Sage-all-target-headers.hmap -iquote /Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/build/Sage.build/Debug/Sage.build/Sage-project-headers.hmap -F/Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/build/Debug -I/Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/build/Debug/include -I/Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/build/Sage.build/Debug/Sage.build/DerivedSources/x86_64 -I/Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/build/Sage.build/Debug/Sage.build/DerivedSources -c /Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/Sage_Prefix.pch -o /var/folders/2J/2JGMKXefHFWmTZ1Ln92Z4U+++TI/-Caches-/com.apple.Xcode.501/SharedPrecompiledHeaders/Sage_Prefix-cgjcfjqijsdnkvcdpwtgjctwsaxz/Sage_Prefix.pch.gch

CompileC build/Sage.build/Debug/Sage.build/Objects-normal/x86_64/MyDocument.o MyDocument.m normal x86_64 objective-c com.apple.compilers.gcc.4_2
    cd /Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app
    setenv LANG en_US.US-ASCII
    /Developer/usr/bin/gcc-4.2 -x objective-c -arch x86_64 -fmessage-length=0 -pipe -std=gnu99 -Wno-trigraphs -fpascal-strings -fasm-blocks -O0 -Wreturn-type -Wunused-variable -isysroot /Developer/SDKs/MacOSX10.5.sdk -mfix-and-continue -mmacosx-version-min=10.5 -gdwarf-2 -iquote /Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/build/Sage.build/Debug/Sage.build/Sage-generated-files.hmap -I/Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/build/Sage.build/Debug/Sage.build/Sage-own-target-headers.hmap -I/Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/build/Sage.build/Debug/Sage.build/Sage-all-target-headers.hmap -iquote /Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/build/Sage.build/Debug/Sage.build/Sage-project-headers.hmap -F/Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/build/Debug -I/Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/build/Debug/include -I/Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/build/Sage.build/Debug/Sage.build/DerivedSources/x86_64 -I/Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/build/Sage.build/Debug/Sage.build/DerivedSources -include /var/folders/2J/2JGMKXefHFWmTZ1Ln92Z4U+++TI/-Caches-/com.apple.Xcode.501/SharedPrecompiledHeaders/Sage_Prefix-cgjcfjqijsdnkvcdpwtgjctwsaxz/Sage_Prefix.pch -c /Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/MyDocument.m -o /Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/build/Sage.build/Debug/Sage.build/Objects-normal/x86_64/MyDocument.o

/Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/MyDocument.m: In function '-[MyDocument connectURL:]':
/Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/MyDocument.m:99: warning: no '-loadRequest:' method found
/Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/MyDocument.m:99: warning: (Messages without a matching method signature
/Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/MyDocument.m:99: warning: will be assumed to return 'id' and accept
/Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/MyDocument.m:99: warning: '...' as arguments.)
/Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/MyDocument.m: In function '-[MyDocument webView:createWebViewWithRequest:]':
/Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/MyDocument.m:110: warning: no '-loadRequest:' method found
/Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/MyDocument.m: In function '-[MyDocument browseURL:]':
/Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/MyDocument.m:127: warning: no '-loadRequest:' method found
/Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/MyDocument.m: In function '-[MyDocument webView:didStartProvisionalLoadForFrame:]':
/Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/MyDocument.m:133: warning: no '-provisionalDataSource' method found
/Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/MyDocument.m: In function '-[MyDocument openPanelDidEnd:returnCode:contextInfo:]':
/Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/MyDocument.m:156: warning: no '-chooseFilename:' method found
CompileC build/Sage.build/Debug/Sage.build/Objects-normal/x86_64/main.o main.m normal x86_64 objective-c com.apple.compilers.gcc.4_2
    cd /Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app
    setenv LANG en_US.US-ASCII
    /Developer/usr/bin/gcc-4.2 -x objective-c -arch x86_64 -fmessage-length=0 -pipe -std=gnu99 -Wno-trigraphs -fpascal-strings -fasm-blocks -O0 -Wreturn-type -Wunused-variable -isysroot /Developer/SDKs/MacOSX10.5.sdk -mfix-and-continue -mmacosx-version-min=10.5 -gdwarf-2 -iquote /Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/build/Sage.build/Debug/Sage.build/Sage-generated-files.hmap -I/Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/build/Sage.build/Debug/Sage.build/Sage-own-target-headers.hmap -I/Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/build/Sage.build/Debug/Sage.build/Sage-all-target-headers.hmap -iquote /Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/build/Sage.build/Debug/Sage.build/Sage-project-headers.hmap -F/Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/build/Debug -I/Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/build/Debug/include -I/Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/build/Sage.build/Debug/Sage.build/DerivedSources/x86_64 -I/Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/build/Sage.build/Debug/Sage.build/DerivedSources -include /var/folders/2J/2JGMKXefHFWmTZ1Ln92Z4U+++TI/-Caches-/com.apple.Xcode.501/SharedPrecompiledHeaders/Sage_Prefix-cgjcfjqijsdnkvcdpwtgjctwsaxz/Sage_Prefix.pch -c /Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/main.m -o /Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/build/Sage.build/Debug/Sage.build/Objects-normal/x86_64/main.o

CompileC build/Sage.build/Debug/Sage.build/Objects-normal/x86_64/PreferencePanelController.o PreferencePanelController.m normal x86_64 objective-c com.apple.compilers.gcc.4_2
    cd /Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app
    setenv LANG en_US.US-ASCII
    /Developer/usr/bin/gcc-4.2 -x objective-c -arch x86_64 -fmessage-length=0 -pipe -std=gnu99 -Wno-trigraphs -fpascal-strings -fasm-blocks -O0 -Wreturn-type -Wunused-variable -isysroot /Developer/SDKs/MacOSX10.5.sdk -mfix-and-continue -mmacosx-version-min=10.5 -gdwarf-2 -iquote /Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/build/Sage.build/Debug/Sage.build/Sage-generated-files.hmap -I/Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/build/Sage.build/Debug/Sage.build/Sage-own-target-headers.hmap -I/Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/build/Sage.build/Debug/Sage.build/Sage-all-target-headers.hmap -iquote /Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/build/Sage.build/Debug/Sage.build/Sage-project-headers.hmap -F/Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/build/Debug -I/Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/build/Debug/include -I/Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/build/Sage.build/Debug/Sage.build/DerivedSources/x86_64 -I/Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/build/Sage.build/Debug/Sage.build/DerivedSources -include /var/folders/2J/2JGMKXefHFWmTZ1Ln92Z4U+++TI/-Caches-/com.apple.Xcode.501/SharedPrecompiledHeaders/Sage_Prefix-cgjcfjqijsdnkvcdpwtgjctwsaxz/Sage_Prefix.pch -c /Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/PreferencePanelController.m -o /Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/build/Sage.build/Debug/Sage.build/Objects-normal/x86_64/PreferencePanelController.o

/Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/PreferencePanelController.m: In function '-[PreferencePanelController apply:]':
/Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/PreferencePanelController.m:41: warning: no '-setupPaths' method found
/Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/PreferencePanelController.m:41: warning: (Messages without a matching method signature
/Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/PreferencePanelController.m:41: warning: will be assumed to return 'id' and accept
/Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/PreferencePanelController.m:41: warning: '...' as arguments.)
CompileC build/Sage.build/Debug/Sage.build/Objects-normal/x86_64/AppDelegate.o AppDelegate.m normal x86_64 objective-c com.apple.compilers.gcc.4_2
    cd /Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app
    setenv LANG en_US.US-ASCII
    /Developer/usr/bin/gcc-4.2 -x objective-c -arch x86_64 -fmessage-length=0 -pipe -std=gnu99 -Wno-trigraphs -fpascal-strings -fasm-blocks -O0 -Wreturn-type -Wunused-variable -isysroot /Developer/SDKs/MacOSX10.5.sdk -mfix-and-continue -mmacosx-version-min=10.5 -gdwarf-2 -iquote /Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/build/Sage.build/Debug/Sage.build/Sage-generated-files.hmap -I/Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/build/Sage.build/Debug/Sage.build/Sage-own-target-headers.hmap -I/Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/build/Sage.build/Debug/Sage.build/Sage-all-target-headers.hmap -iquote /Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/build/Sage.build/Debug/Sage.build/Sage-project-headers.hmap -F/Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/build/Debug -I/Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/build/Debug/include -I/Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/build/Sage.build/Debug/Sage.build/DerivedSources/x86_64 -I/Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/build/Sage.build/Debug/Sage.build/DerivedSources -include /var/folders/2J/2JGMKXefHFWmTZ1Ln92Z4U+++TI/-Caches-/com.apple.Xcode.501/SharedPrecompiledHeaders/Sage_Prefix-cgjcfjqijsdnkvcdpwtgjctwsaxz/Sage_Prefix.pch -c /Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/AppDelegate.m -o /Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/build/Sage.build/Debug/Sage.build/Objects-normal/x86_64/AppDelegate.o

/Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/AppDelegate.m: In function '-[AppDelegate application:openFile:]':
/Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/AppDelegate.m:86: warning: no '-webView' method found
/Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/AppDelegate.m:86: warning: (Messages without a matching method signature
/Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/AppDelegate.m:86: warning: will be assumed to return 'id' and accept
/Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/AppDelegate.m:86: warning: '...' as arguments.)
/Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/AppDelegate.m:86: warning: no '-mainFrame' method found
/Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/AppDelegate.m:90: warning: no '-loadRequest:' method found
/Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/AppDelegate.m: In function '-[AppDelegate getUrl:withReplyEvent:]':
/Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/AppDelegate.m:125: warning: no '-webView' method found
/Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/AppDelegate.m:125: warning: no '-mainFrame' method found
/Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/AppDelegate.m:126: warning: no '-loadRequest:' method found
CompileC build/Sage.build/Debug/Sage.build/Objects-normal/x86_64/AppController.o AppController.m normal x86_64 objective-c com.apple.compilers.gcc.4_2
    cd /Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app
    setenv LANG en_US.US-ASCII
    /Developer/usr/bin/gcc-4.2 -x objective-c -arch x86_64 -fmessage-length=0 -pipe -std=gnu99 -Wno-trigraphs -fpascal-strings -fasm-blocks -O0 -Wreturn-type -Wunused-variable -isysroot /Developer/SDKs/MacOSX10.5.sdk -mfix-and-continue -mmacosx-version-min=10.5 -gdwarf-2 -iquote /Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/build/Sage.build/Debug/Sage.build/Sage-generated-files.hmap -I/Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/build/Sage.build/Debug/Sage.build/Sage-own-target-headers.hmap -I/Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/build/Sage.build/Debug/Sage.build/Sage-all-target-headers.hmap -iquote /Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/build/Sage.build/Debug/Sage.build/Sage-project-headers.hmap -F/Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/build/Debug -I/Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/build/Debug/include -I/Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/build/Sage.build/Debug/Sage.build/DerivedSources/x86_64 -I/Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/build/Sage.build/Debug/Sage.build/DerivedSources -include /var/folders/2J/2JGMKXefHFWmTZ1Ln92Z4U+++TI/-Caches-/com.apple.Xcode.501/SharedPrecompiledHeaders/Sage_Prefix-cgjcfjqijsdnkvcdpwtgjctwsaxz/Sage_Prefix.pch -c /Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/AppController.m -o /Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/build/Sage.build/Debug/Sage.build/Objects-normal/x86_64/AppController.o

/Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/AppController.m: In function '-[AppController sageBrowse:]':
/Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/AppController.m:261: warning: no '-webView' method found
/Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/AppController.m:261: warning: (Messages without a matching method signature
/Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/AppController.m:261: warning: will be assumed to return 'id' and accept
/Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/AppController.m:261: warning: '...' as arguments.)
/Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/AppController.m:261: warning: no '-mainFrame' method found
/Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/AppController.m:262: warning: no '-loadRequest:' method found
/Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/AppController.m: In function '-[AppController terminalSessionPromptForInput:]':
/Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/AppController.m:321: warning: no '-runCommand:withPrompt:withArguments:editingCommand:' method found
/Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/AppController.m: In function '-[AppController sageTerminalRun:withArguments:]':
/Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/AppController.m:384: warning: no '-runCommand:withPrompt:withArguments:editingCommand:' method found
CompileC build/Sage.build/Debug/Sage.build/Objects-normal/x86_64/InputPanelController.o InputPanelController.m normal x86_64 objective-c com.apple.compilers.gcc.4_2
    cd /Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app
    setenv LANG en_US.US-ASCII
    /Developer/usr/bin/gcc-4.2 -x objective-c -arch x86_64 -fmessage-length=0 -pipe -std=gnu99 -Wno-trigraphs -fpascal-strings -fasm-blocks -O0 -Wreturn-type -Wunused-variable -isysroot /Developer/SDKs/MacOSX10.5.sdk -mfix-and-continue -mmacosx-version-min=10.5 -gdwarf-2 -iquote /Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/build/Sage.build/Debug/Sage.build/Sage-generated-files.hmap -I/Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/build/Sage.build/Debug/Sage.build/Sage-own-target-headers.hmap -I/Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/build/Sage.build/Debug/Sage.build/Sage-all-target-headers.hmap -iquote /Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/build/Sage.build/Debug/Sage.build/Sage-project-headers.hmap -F/Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/build/Debug -I/Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/build/Debug/include -I/Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/build/Sage.build/Debug/Sage.build/DerivedSources/x86_64 -I/Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/build/Sage.build/Debug/Sage.build/DerivedSources -include /var/folders/2J/2JGMKXefHFWmTZ1Ln92Z4U+++TI/-Caches-/com.apple.Xcode.501/SharedPrecompiledHeaders/Sage_Prefix-cgjcfjqijsdnkvcdpwtgjctwsaxz/Sage_Prefix.pch -c /Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/InputPanelController.m -o /Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/build/Sage.build/Debug/Sage.build/Objects-normal/x86_64/InputPanelController.o

/Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/InputPanelController.m: In function '-[InputPanelController accept:]':
/Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/InputPanelController.m:33: warning: no '-terminalRun:' method found
/Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/InputPanelController.m:33: warning: (Messages without a matching method signature
/Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/InputPanelController.m:33: warning: will be assumed to return 'id' and accept
/Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/InputPanelController.m:33: warning: '...' as arguments.)
Ld build/Debug/Sage.app/Contents/MacOS/Sage normal x86_64
    cd /Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app
    setenv MACOSX_DEPLOYMENT_TARGET 10.5
    /Developer/usr/bin/gcc-4.2 -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.5.sdk -L/Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/build/Debug -F/Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/build/Debug -filelist /Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/build/Sage.build/Debug/Sage.build/Objects-normal/x86_64/Sage.LinkFileList -mmacosx-version-min=10.5 -framework Cocoa -framework WebKit -framework Carbon -o /Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/build/Debug/Sage.app/Contents/MacOS/Sage

PhaseScriptExecution "Run Script" build/Sage.build/Debug/Sage.build/Script-1967A8B911D6696A00ABC39D.sh
    cd /Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app
    /bin/sh -c /Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/build/Sage.build/Debug/Sage.build/Script-1967A8B911D6696A00ABC39D.sh

** BUILD FAILED **

The following build commands failed:
Sage:
    ProcessInfoPlistFile /Users/grout/sage-4.5.2/data/extcode/sage/ext/mac-app/build/Debug/Sage.app/Contents/Info.plist Sage-Info.plist
    CpResource build/Debug/Sage.app/Contents/Resources/appl.icns appl.icns
    CpResource build/Debug/Sage.app/Contents/Resources/Defaults.plist Defaults.plist
    CpResource build/Debug/Sage.app/Contents/Resources/sage-document-py.icns sage-document-py.icns
    CpResource build/Debug/Sage.app/Contents/Resources/sage-document-spkg.icns sage-document-spkg.icns
    CpResource build/Debug/Sage.app/Contents/Resources/sage-document-sage.icns sage-document-sage.icns
    CpResource build/Debug/Sage.app/Contents/Resources/sage-document-sws.icns sage-document-sws.icns
    CpResource build/Debug/Sage.app/Contents/Resources/sage-small-blue.png sage-small-blue.png
    CpResource build/Debug/Sage.app/Contents/Resources/sage-small-grey.png sage-small-grey.png
    CpResource build/Debug/Sage.app/Contents/Resources/sage-small-green.png sage-small-green.png
    CpResource build/Debug/Sage.app/Contents/Resources/sage-small-red.png sage-small-red.png
(11 failures)

Failed to build Sage.app.
If you don't wish to build Sage.app set SAGE_APP_BUNDLE=no
jasongrout commented 13 years ago
comment:16

I should say that I'm running OSX 10.6.4 and XCode 3.2.2

jasongrout commented 13 years ago
comment:17

In downloading and looking at the posted patch, I see things like:

diff -r 406cb5e053a5 -r 9af17582a1cb sage/ext/mac-app/Sage-Info.plist
Binary file sage/ext/mac-app/Sage-Info.plist has changed

Apparently mercurial doesn't include the binary files when exporting a patch?

jasongrout commented 13 years ago
comment:18

If all the changes are in the mac-app directory, it may be easiest just to make a tarball of the directory and post it. To include binary changes, you can also use hg bundle (I don't know how) or use the --text option to hg export.

gvol commented 13 years ago
comment:19

Replying to @jasongrout:

If all the changes are in the mac-app directory, it may be easiest just to make a tarball of the directory and post it. To include binary changes, you can also use hg bundle (I don't know how) or use the --text option to hg export.

I created new diffs with --git which I think works. It's good to know about the --text option too. The scripts diff simply fixes the typo.

jasongrout commented 13 years ago
comment:20

Okay, it seemed to build successfully. I posted up the log at http://sage.pastebin.com/NNDhyjdc -- it seemed like there were lots of warnings. Do we have to have the warnings? It'd be more comfortable if the warnings weren't there.

jasongrout commented 13 years ago
comment:21

The readme packaged in the dmg should definitely get changed, or even better, just removed.

jasongrout commented 13 years ago
comment:22

What is the "crap" menu item under the Development|Packaging menu?

jasongrout commented 13 years ago
comment:23

After playing with it a bit, I think it's great. It also seems to have too many options---it is confusing. Personally, I would be happy if:

  1. It defaulted to the system browser

  2. It defaulted to only showing the MenuExtras item, which I think has the right simplicity.

kcrisman commented 13 years ago
comment:24

Replying to @jasongrout:

After playing with it a bit, I think it's great. It also seems to have too many options---it is confusing. Personally, I would be happy if:

  1. It defaulted to the system browser

+1

  1. It defaulted to only showing the MenuExtras item, which I think has the right simplicity.

But the problem with that is that many people are probably not familiar with how these work, especially those new to computing in general. Having a regular application is better.

The crap menu item is a legitimate sage script - see sage-crap, which apparently tests for random binary stuff or other things in a given folder. But like many other things, it could be in an "advanced" menu.

I'm not ready to test yet - still have a lot of stuff to do - but tonight I should be able to do something rigorous, also hopefully try PPC tonight or tomorrow to see if it performs as advertised. I won't be able to test bdisting on PPC in the immediate future, though; maybe Georg can? I'll cc: him.

jasongrout commented 13 years ago
comment:25

Replying to @kcrisman:

Replying to @jasongrout:

After playing with it a bit, I think it's great. It also seems to have too many options---it is confusing. Personally, I would be happy if:

  1. It defaulted to the system browser

+1

  1. It defaulted to only showing the MenuExtras item, which I think has the right simplicity.

But the problem with that is that many people are probably not familiar with how these work, especially those new to computing in general. Having a regular application is better.

I view these two as going hand-in-hand. It is pretty confusing to have the full Sage app menu (like an "Edit" menu) and then have everything work through the browser. If we're using the system browser (which I think we should do by default), the user should have a super-simple interface. The Edit menu, the Format menu, and most of the File menu are completely unnecessary and confusing.

The crap menu item is a legitimate sage script - see sage-crap, which apparently tests for random binary stuff or other things in a given folder. But like many other things, it could be in an "advanced" menu.

I would definitely rename it in the menu then. It looks very unprofessional. Maybe "binary-test" or even just delete it.

kcrisman commented 13 years ago
comment:26

Replying to @jasongrout:

Replying to @kcrisman:

Replying to @jasongrout:

After playing with it a bit, I think it's great. It also seems to have too many options---it is confusing. Personally, I would be happy if:

  1. It defaulted to the system browser

+1

  1. It defaulted to only showing the MenuExtras item, which I think has the right simplicity.

But the problem with that is that many people are probably not familiar with how these work, especially those new to computing in general. Having a regular application is better.

I view these two as going hand-in-hand. It is pretty confusing to have the full Sage app menu (like an "Edit" menu) and then have everything work through the browser. If we're using the system browser (which I think we should do by default), the user should have a super-simple interface. The Edit menu, the Format menu, and most of the File menu are completely unnecessary and confusing.

I can't comment more on this; I feel like that would be more for a future ticket, but maybe Ivan has some comments. It's good to have more than two people trying this out, that's for sure!

The crap menu item is a legitimate sage script - see sage-crap, which apparently tests for random binary stuff or other things in a given folder. But like many other things, it could be in an "advanced" menu.

I would definitely rename it in the menu then. It looks very unprofessional. Maybe "binary-test" or even just delete it.

Presumably most users wouldn't need it. Perhaps you should raise renaming this script on sage-devel as well; I agree it looks somewhat unprofessional, but it probably dates back to when William was the only person using Sage and that wasn't an issue.

jasongrout commented 13 years ago
comment:27

If using the application through the system web browser, I think there ought to be only the following menus:

That's it. By default, I think we ought to start off supporting only the subset of things we think will be really useful to people.

If the preference is to have Sage.app manage its own web browser, then the Edit and Window menus should be available. However, even just now, I was having problems with the Sage.app browser. It just gave an error, and the log said something about a bad token (possibly the startup hash token for a local user?)

gvol commented 13 years ago
comment:28

Deleting menus is easy, but I don't know how to make them depend on an option (it is possible though). We probably should get rid of much of the File, Edit and Format menus. I meant to go over them at some point, but never did. Also, renaming things in the menu is currently not easy since it just tacks a sage -- onto the beginning (or the first character if it's upper case). There is a special case for "Sage", but I would like to keep those to a minimum.

How will I know if the consensus is to strip the menus to Jason's suggestion (which I think is sensible), defaulting to system browser, and building the app by default?

jasongrout commented 13 years ago
comment:29

Replying to @gvol:

How will I know if the consensus is to strip the menus to Jason's suggestion (which I think is sensible), defaulting to system browser, and building the app by default?

Well, we've already posted to sage-devel, and the only replies seem to be kcrisman and me. So I guess the three of us form a consensus. Then when people start using it, I'm sure we'll hear more opinions.

jasongrout commented 13 years ago

Changed reviewer from Karl-Dieter Crisman to Karl-Dieter Crisman, Jason Grout

kcrisman commented 13 years ago
comment:31

How will I know if the consensus is to strip the menus to Jason's suggestion (which I think is sensible), defaulting to system browser, and building the app by default?

Well, we've already posted to sage-devel, and the only replies seem to be kcrisman and me. So I guess the three of us form a consensus. Then when people start using it, I'm sure we'll hear more opinions.

Correct. After all, none of these things are removing functionality that existed before; it's still a vast improvement. You might want to make some notes in the source as to how to (re)enable some of the more heavy functionality.

jasongrout commented 13 years ago
comment:32

How about this: in the officially distributed version right now, we just use the system browser and distribute the minimal menu? That seems like it would make things much simpler on both the users and developers. I'd also delete the "loading" page in this case. Is it easy to just make the doc icon bounce up and down while the server is starting, or display a progress bar?

Then we can work on ironing out things with the Sage.app browser. For example, after switching back to the sage.app browser, it's no longer opening up the notebook interface automatically upon startup. When I click the link in the "loading" page, it doesn't log me in automatically. If I stop the server, then start it again, it then opens up the notebook page automatically.

jasongrout commented 13 years ago
comment:33

One more problem I found. If you delete (or move) your .sage directory, then there is a problem starting up the server since it requests an admin password. Here is the log:

Starting Notebook
----------------------------------------------------------------------
| Sage Version 4.5.2, Release Date: 2010-08-05                       |
| Type notebook() for the GUI, and license() for information.        |
----------------------------------------------------------------------

Please wait while the Sage Notebook server starts...
Setting permissions of DOT_SAGE directory so only you can read and write it.
/tmp/sage-mac-app/local/lib/python/getpass.py:79: GetPassWarning: Can not control echo on the terminal.
  passwd = fallback_getpass(prompt, stream)
Warning: Password input may be echoed.
Enter new password: ...
The notebook files are stored in: sage_notebook.sagenb

Please choose a new password for the Sage Notebook 'admin' user.
Do _not_ choose a stupid password, since anybody who could guess your password
and connect to your machine could access or delete your files.
NOTE: Only the md5 hash of the password you type is stored by Sage.
You can change your password by typing notebook(reset=True).

Traceback (most recent call last):
  File "/tmp/sage-mac-app/local/bin/sage-notebook", line 36, in <module>
    notebook(port=8000)
  File "/Users/grout/projects/sagenb-0.8.2/src/sagenb/sagenb/notebook/notebook_object.py", line 217, in __call__
    return self.notebook(*args, **kwds)
  File "/Users/grout/projects/sagenb-0.8.2/src/sagenb/sagenb/notebook/run_notebook.py", line 194, in notebook_twisted
    passwd = get_admin_passwd()                
  File "/Users/grout/projects/sagenb-0.8.2/src/sagenb/sagenb/notebook/run_notebook.py", line 424, in get_admin_passwd
    passwd = getpass.getpass("Enter new password: ")
  File "/tmp/sage-mac-app/local/lib/python/getpass.py", line 79, in unix_getpass
    passwd = fallback_getpass(prompt, stream)
  File "/tmp/sage-mac-app/local/lib/python/getpass.py", line 114, in fallback_getpass
    return _raw_input(prompt, stream)
  File "/tmp/sage-mac-app/local/lib/python/getpass.py", line 130, in _raw_input
    raise EOFError
EOFError

The same sort of thing happens if the notebook tries to upgrade an old notebook (pre-2009 or so). The user is prompted to enter Y/N to whether they want to upgrade.

The first problem is definitely a problem, since every new user will have it happen to them.

gvol commented 13 years ago
comment:34

Replying to @jasongrout:

One more problem I found. If you delete (or move) your .sage directory, then there is a problem starting up the server since it requests an admin password.

Is there a way to know ahead of time (some file we can check) if this is going to happen, and then send them to an interactive shell or ask for a password or something?

The same sort of thing happens if the notebook tries to upgrade an old notebook (pre-2009 or so). The user is prompted to enter Y/N to whether they want to upgrade.

The first problem is definitely a problem, since every new user will have it happen to them.

How often do you think the second will be a problem?

jasongrout commented 13 years ago
comment:35

Replying to @gvol:

Replying to @jasongrout:

One more problem I found. If you delete (or move) your .sage directory, then there is a problem starting up the server since it requests an admin password.

Is there a way to know ahead of time (some file we can check) if this is going to happen, and then send them to an interactive shell or ask for a password or something?

We could check for existence of the .sage/sage_notebook.sagenb directory, which is where the sage notebook is stored by default. If it's not there, then the notebook will be created and the password will be solicited.

The same sort of thing happens if the notebook tries to upgrade an old notebook (pre-2009 or so). The user is prompted to enter Y/N to whether they want to upgrade.

The first problem is definitely a problem, since every new user will have it happen to them.

How often do you think the second will be a problem?

Not very often any more, though it bit my postdoc mentor over the weekend. My guess is that there will be a lot of people right off that never upgraded an old Sage version that will download the app and run into it. But after that initial rush, I don't see this happening at all.

Maybe there ought to be a separate notebook_intialized() command that checks to see if the notebook is initialized.

jasongrout commented 13 years ago
comment:36

I've posted to sage-notebook about this.

jhpalmieri commented 13 years ago
comment:37

First, the app looks great. I think that if you build the app by default, people will be a little surprised. I would suggest not building it by default but strongly encourage people to try it out (on sage-devel, for example), with the goal of distributing it by default with Sage 5.0.

As far as the menu items go, I have to disagree with kcrisman's comment

After all, none of these things are removing functionality that existed before

How do I get the output from "sage --help" or "sage --advanced"? If you remove menu items (like "crap"), then how do I execute "sage -crap"? Could we have a menu item (like the current "Calculate" one) which just lets you type in any command line options you want? Or it could be fancier and have a menu to choose a command-line option from the ones not already included. Then you can eliminate "crap" but people can still use it if they want to.

If I select "Also Show Menu Extra", I don't see any difference. (It's also not completely clear what it's supposed to do; could it say Also show "Extra" menu instead?)

I unfortunately have my terminal program set to close the window when the shell exits, so using the "Calculate" option is not ideal: it closes the window as soon as it is done executing, so I can't see it. My only options seem to be to change this for all of my Terminal windows, or to not exit after running Sage. Is that right?

jasongrout commented 13 years ago
comment:38

Replying to @jhpalmieri:

First, the app looks great. I think that if you build the app by default, people will be a little surprised. I would suggest not building it by default but strongly encourage people to try it out (on sage-devel, for example), with the goal of distributing it by default with Sage 5.0.

That sounds good. Again, I see most people downloading a pre-built app.

As far as the menu items go, I have to disagree with kcrisman's comment

After all, none of these things are removing functionality that existed before

How do I get the output from "sage --help" or "sage --advanced"? If you remove menu items (like "crap"), then how do I execute "sage -crap"? Could we have a menu item (like the current "Calculate" one) which just lets you type in any command line options you want? Or it could be fancier and have a menu to choose a command-line option from the ones not already included. Then you can eliminate "crap" but people can still use it if they want to.

+1 to having "Sage (advanced)" pop up a dialog box asking for command-line switches.

If I select "Also Show Menu Extra", I don't see any difference. (It's also not completely clear what it's supposed to do; could it say Also show "Extra" menu instead?)

I guess because people don't know what a MenuExtra is. Maybe changing the option to "Menu Bar Control" would be clearer?

I unfortunately have my terminal program set to close the window when the shell exits, so using the "Calculate" option is not ideal: it closes the window as soon as it is done executing, so I can't see it. My only options seem to be to change this for all of my Terminal windows, or to not exit after running Sage. Is that right?

I think we ought to delete the Calculate option. I don't see a valuable purpose for it.

jasongrout commented 13 years ago
comment:39

Replying to @jasongrout:

Replying to @gvol:

Replying to @jasongrout:

One more problem I found. If you delete (or move) your .sage directory, then there is a problem starting up the server since it requests an admin password.

Is there a way to know ahead of time (some file we can check) if this is going to happen, and then send them to an interactive shell or ask for a password or something?

We could check for existence of the .sage/sage_notebook.sagenb directory, which is where the sage notebook is stored by default. If it's not there, then the notebook will be created and the password will be solicited.

Actually, this check would take care of the upgrade issue as well. In the upgrade case, it sees that .sage/sage_notebook.sagenb is not available, so it tries to upgrade the old sage notebook.

So: check to see if ~/.sage/sage_notebook.sagenb directory exists. If it doesn't, start a terminal session with the notebook (or have some way for the user to interact with Sage). If it does exist, assume that there will be no interaction and just start up normally.

kcrisman commented 13 years ago
comment:40

Replying to @jhpalmieri:

First, the app looks great. I think that if you build the app by default, people will be a little surprised. I would suggest not building it by default but strongly encourage people to try it out (on sage-devel, for example), with the goal of distributing it by default with Sage 5.0.

This seems like a good progression.

As far as the menu items go, I have to disagree with kcrisman's comment

After all, none of these things are removing functionality that existed before

How do I get the output from "sage --help" or "sage --advanced"? If you remove menu items (like "crap"), then how do I execute "sage -crap"? Could we have a menu item (like the current "Calculate" one) which just lets you type in any command line options you want? Or it could be fancier and have a menu to choose a command-line option from the ones not already included. Then you can eliminate "crap" but people can still use it if they want to.

I think I was saying that all these things are in the Terminal option still; you can run the terminal. As it was I think I actually was for additional menu options before I was against them ;) but really I think that for the menu, it's not as crucial, since we didn't have that before. I also think there was a way in Preferences to execute any old command you wanted, or? Maybe not - that should be a high priority.

(The Calculate was also based on a request of mine, but if we're shrinking the # of options, then that should go away too for now.)

If I select "Also Show Menu Extra", I don't see any difference. (It's also not completely clear what it's supposed to do; could it say Also show "Extra" menu instead?)

I think you have to restart for ALL the things in Preferences to work, not just the ones it says; at least, that's the only way I could get them to work. I agree with Jason's comment about the Menu Extra, as I mentioned above. However, now that I've tried it a bit, it seems that it functions in such a way that you can have Sage not running, but then almost immediately turn it on with just a mouse flick along the top, even with the various options - is that right?

Related to that is that I did finally get the other binary to work, by dragging and selecting; the key is that you have to actually get the ./sage file, and that's probably not obvious to those who might think the folder is the 'binary', since ./sage isn't actually a compiled binary file... anyway. I don't know whether this comment is important. This also seems to require a restart.

I unfortunately have my terminal program set to close the window when the shell exits, so using the "Calculate" option is not ideal: it closes the window as soon as it is done executing, so I can't see it. My only options seem to be to change this for all of my Terminal windows, or to not exit after running Sage. Is that right?

You can set this in Preferences; in fact, Ivan's first default behavior was not to exit.

Related to this, hooray - there is only ONE window opening now! Thanks for fixing that. You were right that I had to delete the TerminalEmulatorList - weirdly, since I never created any new ones.

Random: when you click on an sws file it starts the browser, but doesn't do anything to suggest that it can't actually open them. That seems problematic, and I don't remember that behavior in earlier versions.

I also finally looked at some of the code (some of which I even understood), and I'm really impressed that you found all those hacks and basically learned Objective-C for this project. Really great work, even with all the minor things we are talking about.

I'm going to test this on PPC in the next few minutes. But after that I'll probably bow out, because actual discussion is happening, and that should soon lead to a positively reviewed final version :)

kcrisman commented 13 years ago
comment:41

Bad news on PPC.. "You cannot use ... with this version of Mac OS X".

BUT I think that this might be because of some use of the wrong MAC_OS_X_DEPLOYMENT_TARGET or something, because I am using Tiger (10.4), not necessarily because of PPC (hence it's still possible that it would work on Leopard PPC, which someone should test).

Next step; try to get the extcode thing in and see whether a bdist on this machine works.

jasongrout commented 13 years ago
comment:42

Replying to @kcrisman:

I also finally looked at some of the code (some of which I even understood), and I'm really impressed that you found all those hacks and basically learned Objective-C for this project. Really great work, even with all the minor things we are talking about.

+1. Ivan, you are doing a tremendous job here that lots of people have wanted for a long time. Thanks!

jhpalmieri commented 13 years ago
comment:43

I see what the "Menu Extra" option does, and it looks nice. I think it should be on by default. Can we figure out what to call it so that people will understand the option in the Preferences dialogue?

I think I was saying that all these things are in the Terminal option still; you can run the terminal.

Maybe I don't understand you. When I run the "Terminal Session" option, it runs Sage in a terminal window, as I would expect. Executing "sage -crap" doesn't actually run sage: it runs some script in SAGE_ROOT/local/bin and then quits. It's not something you run within sage. Same with other advanced options like "bdist" or "coverage".

You can set this [whether the Terminal exits] in Preferences.

I see that I can set Sage so that the terminal doesn't exit after running Sage, or I can set Terminal so it doesn't close windows when the shell exits, but in the first case I have a terminal window running the shell, and in the second I have to manually close all of my terminal windows. Is there some way to call Terminal and override the global preference to "close the window" or "close if the shell exited cleanly" for that particular Terminal session?

By the way, if I delete the "exit" part of the terminal script in Sage, it would be nice if there were a button to hit to restore the default script. Plenty of people using this won't necessarily know the appropriate shell syntax.

It would also be nice (but it's way beyond the scope of this particular ticket) to have a "calculate" option which just displays the result (if there is anything to display) in a window which you can close when you're done, or from which you can copy, etc. If we could run a Sage server in the background so that the "calculate" option could just send queries to it, that would be nice. I think I've heard of a possibility like this, but I can't remember where...

kcrisman commented 13 years ago
comment:44

It would also be nice (but it's way beyond the scope of this particular ticket) to have a "calculate" option which just displays the result (if there is anything to display) in a window which you can close when you're done, or from which you can copy, etc. If we could run a Sage server in the background so that the "calculate" option could just send queries to it, that would be nice. I think I've heard of a possibility like this, but I can't remember where...

Funny - this is something I requested earlier, Ivan put in, but then we nixed. ./sage -c, that is. Unfortunately it doesn't quite calculate, see a recent sage-support/ask.sagemath.org thread. Something like you are talking about (with server running) sounds like a great idea as well.

kcrisman commented 13 years ago
comment:45

Bad news on OS X 10.4 front...


Crismans-Computer:~/Desktop/sage-4.5.3 crisman$ ./sage -bdist Test
Sage works!
Copying files over to tmp directory
cp: *.sage: No such file or directory
Copying Sage library over
Making empty spkg's
There will be an error about x below that you can safely ignore.
mv: rename x to x/x: Invalid argument
Building the Mac Application
(NOTE: project Sage was written by a newer version of Xcode (45) -- temporarily downgrading it to version 42 (without modifying project file))

=== BUILDING NATIVE TARGET Sage WITH CONFIGURATION Debug ===

Checking Dependencies...
SDK package /Users/crisman/Desktop/sage-4.5.3/data/extcode/sage/ext/mac-app/macosx10.5 does not exist
** BUILD FAILED **
Failed to build Sage.app.
If you don't wish to build Sage.app set SAGE_APP_BUNDLE=no

So we will have to deal with this somehow, or deal with not having it available for Tiger (a mistake, in my opinion, since the people most likely to use this are least likely to have $ to upgrade). A quick and uninformed internet search for help on this issue didn't do much for me, but then again I don't have a lot of expertise with Xcode.

jhpalmieri commented 13 years ago
comment:46

By the way, I think the "xtermApplescript" and "iTermApplescript" options are reversed. In what is currently labeled "iTermApplescript", the text "to exit active" should read "to stay active".

Regarding "Use Alternate Sage Binary:", maybe it should say "Use alternate Sage executable"? I personally also think that too many words are capitalized in the preferences. They should say:

Regarding the 10.4 issue: it shouldn't be too hard to test whether running 10.4, and then refuse to make the binary. I think that we could release it soon just for 10.5 and 10.6, and Sage 5.0 could be the target for getting it to work on 10.4. Does anyone know whether this is possible (working on 10.4) or likely?

Can you build a binary on 10.5 or 10.6 which works on 10.4 by setting appropriate flags?

kcrisman commented 13 years ago
comment:47

Regarding the 10.4 issue: it shouldn't be too hard to test whether running 10.4, and then refuse to make the binary. I think that we could release it soon just for 10.5 and 10.6, and Sage 5.0 could be the target for getting it to work on 10.4. Does anyone know whether this is possible (working on 10.4) or likely?

Can you build a binary on 10.5 or 10.6 which works on 10.4 by setting appropriate flags?

In general, yes, with that nasty deployment target thing you tracked down (?) which caused the Snow Leopard problems. It could be as simple as setting that.

On the other hand, since this uses Xcode in a much tighter way than other spkgs, perhaps not; the error is also a little mystifying, because I don't know what Xcode 45 is supposed to be.

Okay, I finally found ONE thing that might help. In Xcode, go to Info once you've (Ivan?) opened the project, and click on "General".. Make the "Project Format" Xcode 2.4 compatible" and make the Base SDK for all configurations Mac OS X 10.4 (the first one for sure, I suspect, the second one I'm less sure on but I figure you might as well take a whirl). There isn't anything really cool you used from Xcode 3.x, is there? Presumably not, if this is a fairly basic Cocoa application.

I hope this works!

gvol commented 13 years ago
comment:48

Regarding 10.4, NSPathControl (which is how you to pick the sage executable) is 10.5+ only. I can replace it with a text field to type the path in which case drag and drop still works to some extent. If I get a chance, I will do that soon.

As for problems with the Applescript options being out of order, I think that's due to a bug in Apple's API which I think I have now worked around to some extent. If you select using the keyboard instead of the mouse it should work correctly.

I have also added an alert when opening sws files, fixed the warnings, and added a way to reset the Applescript used.

I haven't redone the menus because I'm not sure if jhpalmieri was disagreeing with the idea of a minimal set. I did add a Sage (advanced) which will prompt for any args you wish to give it.

kcrisman commented 13 years ago
comment:49

Once you get the 10.4 compatibility, give me a holler and I'll try it out again on PPC. Are you also still updating your sage.math account with the new versions? That would make it (slightly) easier for me to check this; otherwise I have to do an annoying flash drive switch.