4

I failed to understand the INSTALL.md file. I know few programming knowledge. I appreciate anyone can give me a thorough explanation or instruction.

The software I wanna install is https://sourceforge.net/projects/scidavis/

Information in INSTALL.md

Mac OS X - MacPorts instructions

These notes refer to use MacPorts. Using other build environments such as HomeBrew is presumably equally as viable, but you may need to hack the config files a bit.

  1. Install MacPorts.

  2. Install XCode and XCode command line tools

  3. If you want to be able to run your build on an earlier version of MacOSX than your build machine, see How to build a Macintosh executable that will run on older versions of MacOSX.

  4. Install the prerequisites for scidavis.

  • port install qt4-mac qwt52 qwtplot3d boost gsl py27-pyqt4 py-pyqwt py27-sip muparser
    Sadly, you may need to do this step multiple times before eveything is installed
  1. link sip-2.7 share directory to where sip expects it to be:
ln -sf /opt/local/Library/Frameworks/Python.framework/Versions/2.7/share/sip /opt/local/share/py27-sip
  1. Add qt's bin directory to your PATH
  • PATH=/opt/local/bin:/opt/local/libexec/qt4/bin:$PATH
  1. Configure scidavis
  • qmake CONFIG+=osx_dist
  1. Build scidavis
  • make qmake
  • make
  1. Create the installable package
  • sh mkMacDist.sh

Thanks in advance

Daniel Liu
  • 63
  • 1
  • 2
  • 5

2 Answers2

2

If you are trying to install a tar.gz files you must first run gunzip on the file. gunzip filename. This should give you a .tar file. To open the tar file run: tar -x filename.tar.

Natsfan
  • 4,093
  • 3
  • 22
  • 29
2

NOTE: if you're trying to install a unix executable, it's sometimes easier to use homebrew. Search the internet for the application you're trying to install and the term homebrew, and it might bring up a page on homebrew and give you a simple install command which you can run in the mac terminal.


Steps to install tar.gz on macOS

  1. Double click it the tar.gz file open it
  2. Its contents (e.g. directories/files it contained) should appear in the same directory the tar.gz file is in (to prevent clutter, consider placing the tar.gz file in a new, empty directory before double clicking on it)
  3. One of the new files might be a unix executable that looks like this: enter image description here
  4. Open another finder window (command + n), navigate to this location /usr/local/bin, and place the executable file you found in the previous step in this new location (you can do this using the mac terminal if you prefer - here's a random example showing show)
  5. At this point, open a new terminal tab, and type the name of the program (the file you moved in steps 4), terminal should recognise the program. However, if you see this there is one more step:

enter image description here

  1. Go to System Preferences -> Security & Privacy -> General tab. Click the lock icon, type password if it asks for it, and then click on 'Allow'.

enter image description here

stevec
  • 41,291
  • 27
  • 223
  • 311
  • A `.tar.gz` might not contain an executable at all, and given OP has been trying to install something that needs to be compiled, that's likely going to be the case here. – AKX Jul 27 '22 at 07:26
  • Secondly, if the tarball has other files, chances are the executable contained within also needs those to operate, so just moving the executable to `/usr/local/bin` isn't necessarily going to help much. – AKX Jul 27 '22 at 07:27
  • @AKX I'm kinda hazy on this myself tbh. But I use cli's a lot yet still hadn't solidified my knowledge of how to install them form tar.gz. My primary motivation for adding this answer is when I searched 'how install tar.gz on mac' this is the best result (aside from pretty awful clickbait and apple discussions forums), as well as the 12k views with very low upvotes/answers. – stevec Jul 27 '22 at 07:27
  • I'd suspect that's because there is no one good definitive answer. The question itself is almost the same as "How to install .zip on Windows". – AKX Jul 27 '22 at 07:29
  • @AKX gotcha. I've only had to do this a handful of times (first time was ngrok, which took me, like, half an hour to figure out). But those hand full of times I've always opened the tar.gz and found a unix exec file (e.g. ngrok, delta, grype). I'll be glad to try to expand the answer to include other file types if you think it's worth it. It may be true that my answer is really only a partial answer – stevec Jul 27 '22 at 07:30
  • @AKX I think a partial answer is a *big* improvement on the other (mostly junk) that google throws up though. Even if it's only dealing with one possibility. – stevec Jul 27 '22 at 07:31
  • 1
    For future reference, Ngrok, Delta and Grype are all on Homebrew, so `brew install ngrok/ngrok/ngrok anchore/grype delta` would've saved you a bunch of time. ;-) – AKX Jul 27 '22 at 07:33
  • @AKX If it's okay, I'll add that to the answer and credit you. Sometimes circumventing an entire problem is the best solution! (prevention is the best cure type thing) – stevec Jul 27 '22 at 07:35
  • @AKX I installed a bunch more command line tools (some of [these common ones](https://github.com/ibraheemdev/modern-unix)) and used homebrew as per your recommended, was a *lot* easier. Also, I added your tip to the (partial) answer. – stevec Jul 28 '22 at 02:02