Skip to content
This repository has been archived by the owner on Dec 12, 2019. It is now read-only.

oneClickToBuildCARTAMacDesktop(Draft)

Grimmer edited this page May 19, 2017 · 27 revisions

This is mainly for packaging CARTA and deploy, but it is OK to setup development environment at once, instead of following step by step in https://github.com/CARTAvis/carta/.

Step1:

curl -O https://raw.githubusercontent.com/CARTAvis/carta/upgradeToNewNamespace/carta/scripts/ci_mac.sh

Step2: Use "~/cartahome" as your carta working directory

sudo sh ./ci_mac.sh Then it will be: ~/cartahome/CARTAvis will be the git downloaded folder of CARTA.

Step2-2: Use other places as the download folder. If it is $WhereYouWant, append as the 1st parameter

sudo sh ./ci_mac.sh $WhereYouWant

The other optional parameters you can directly modify the ci_mi.sh script. We may supply the script's parameters way

Qt library path, we use homebrew's Qt5.8 by default, it will download automatically.

export QT5PATH=/usr/local/Cellar/qt/5.8.0_2

Or you can use Qt installer to install the version you want, then change the this QT5PATH in the script, the execute this script. e.g. export QT5PATH=~/Qt/5.8/clang_64

Put build folder inside source code folder, change it if you prefer other places.

export CARTABUILDHOME=$cartawork/CARTAvis/build

Which version of prebuilt QtWebkit it use, the default:

export qtwebkit=qtwebkit-tp5-qt58-darwin-x64 

If you want to change to use different version, two things:

1. change the path here, `wget https://github.com/annulen/webkit/releases/download/qtwebkit-tp5/$qtwebkit.tar.xz`, such as `https://github.com/annulen/webkit/releases/download/qtwebkit-tp4/qtwebkit-tp4-qt57-darwin.tar.xz`
2. `use export qtwebkit=qtwebkit-tp4-qt57-darwin`

Final app/dmg will be in /tmp/

What this script install

Some libraries are installed by the global way, some are in the $WhereYouWant/CARTAvis-externals/ThirdParty, so most of them are in your own local folder. So if you choose different places to build for the next time, the results are independent.

The globally installed libraries:

  1. GSL (/usr/local)
  2. libsakura (/usr/local)
  3. All homebrew packages (/usr/local/opt/), but they are installed very soon.

Remove the debug pause function

I setup some breakpoint(pause) to check each step, you can comment this line to let the script not stop

function pause(){
  ## read -p "Press [Enter] key to continue"
}
Clone this wiki locally