VMD-L Mailing List
From: FX (fxcoudert_at_gmail.com)
Date: Thu Dec 05 2019 - 07:58:46 CST
- Next message: John Stone: "Re: Loading large trajectories using multiple threads/direct calls?"
- Previous message: Bart Bruininks: "Loading large trajectories using multiple threads/direct calls?"
- In reply to: FX: "VMD 1.9.4a38 build for macOS Catalina"
- Next in thread: FX: "Re: VMD 1.9.4a38 build for macOS Catalina"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
> I have put together a binary for VMD 1.9.4a38 (from the source dated 2019-10-17) which I would like to invite you to test.
Another know issue: the interface is somewhat blurry, with text rendered in very low resolution.
The test binary shipped with the exact same FLTK is perfectly clear, so it is not a problem inherent to FLTK itself.
Someone asked me how I had built this 64-bit VMD, and it is relatively easy.
- You need to link against a Tcl/Tk installation, and I chose Homebrew’s binaries for version 8.6.9
- You need to link against FLTK. It works out of the box with recent FLTK development branch (fltk-1.4.x-20191122-61a86d19)
- You can also use the stable FLTK 1.3.5 version, in which case you need the patch below (which I reported already in April 2018… I remember it was hard to track down: https://www.ks.uiuc.edu/Research/vmd/mailing_list/vmd-l/29701.html)
- Build the plugins
- Configure and build VMD (configure options: MACOSXX86_64 FLTKOPENGL FLTK TK ACTC IMD LIBTACHYON COLVARS TCL PTHREADS SILENT LP64)
- The src/Makefile needs to be edited so that all paths point to the right direction (plugins, fltk, tcl/tk, etc) and the right version of tcl/tk libraries are linked
In order to make the .app bundle, I then needed to change the "Contents/MacOS/startup.command” script in order to lookup the shared tcl/tk libraries at runtime in the VMD bundle. I decided to set DYLD_LIBRARY_PATH, which is a bit crude, but works fine.
I hope this can help others, and an official version can be released.
John, if you have specific points you want to address please let me know, I can look into it.
Cheers,
FX
------------------------
The modified Contents/MacOS/startup.command:
#!/bin/sh
# startup.command
# This is the script executed by VMDLauncher to actually start VMD.
p=`dirname "$0"`
export DYLD_LIBRARY_PATH="$p/../vmd"
"$p/../Resources/VMD.app/Contents/MacOS/VMD" $*
------------------------
The patch for fltk 1.3.5 (and all 1.3.x versions):
diff -pur fltk-1.3.4-2.old/src/Fl_Gl_Window.cxx fltk-1.3.4-2/src/Fl_Gl_Window.cxx
--- fltk-1.3.4-2.old/src/Fl_Gl_Window.cxx 2016-06-22 07:44:14.000000000 +0200
+++ fltk-1.3.4-2/src/Fl_Gl_Window.cxx 2018-04-27 00:04:06.000000000 +0200
@@ -276,10 +276,8 @@ void Fl_Gl_Window::swap_buffers() {
glMatrixMode(matrixmode);
glRasterPos3f(pos[0], pos[1], pos[2]); // restore original glRasterPos
}
- /* // nothing to do here under Cocoa because [NSOpenGLContext -flushBuffer] done later replaces it
- else
- aglSwapBuffers((AGLContext)context_);
- */
+ else
+ Fl_X::GLcontext_flushbuffer(context_);
#else
# error unsupported platform
#endif
- Next message: John Stone: "Re: Loading large trajectories using multiple threads/direct calls?"
- Previous message: Bart Bruininks: "Loading large trajectories using multiple threads/direct calls?"
- In reply to: FX: "VMD 1.9.4a38 build for macOS Catalina"
- Next in thread: FX: "Re: VMD 1.9.4a38 build for macOS Catalina"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]