brew cask install dia
After his it won't run because DISPLAY=:0 env var is not set
vim /Applications/Dia.app/Contents/Resources/bin/dia
Add the following content to line 40 (right before the oascript call)
#########################################################
# Ref: http://navkirats.blogspot.de/2014/10/dia-diagram-mac-osx-yosemite-fix-i-use.html
versionOSX=$(sw_vers -productVersion | awk -F '.' '{print $(NF-1)}')
[[ ${versionOSX} -ge 10 ]] && export DISPLAY=:0
#########################################################
Ok. I doing any wrong way. But I don´t know.
I downloaded de package from this site [http://dia-installer.de/download/macosx.html.en]. Then I did copy the package to aplications folder. Then I change the document /bin/.dia like your code. Then I started the app and the system said me the app is broken.
I don´t write de last line, this:
export DISPLAY=:0 # Fixes the "cannot open display".
export LANG="en_US.UTF-8" # Fixes the annoying Xterm window opening.
exec "$CWD/dia-bin" --integrated
becuase I don´t know what is the place to write.
THX