Install CodeTyphon in QT5 environment on Mac

OS/Mac 2021. 1. 15. 23:41 Posted by 파란크리스마스

출처

xcode 설치

bluesanta@Sunghoui-MacBookPro ~ % xcode-select --install

"sudo" 루트 권한 부여

bluesanta@Sunghoui-MacBookPro ~ % sudo vi /etc/sudoers

%admin          ALL = (ALL) ALL
bluesanta       ALL=(ALL) NOPASSWD: ALL

CodeTyphon 압축 해제

bluesanta@Sunghoui-MacBookPro ~ % cd Downloads/
bluesanta@Sunghoui-MacBookPro Downloads % unzip CodeTyphonIns.zip

7zip 설치

bluesanta@Sunghoui-MacBookPro ~ % brew install p7zip

필수 라이브러리 설치 (xterm, wget, gdb이 설치되어 있는지 먼저 확인 할것)

bluesanta@Sunghoui-MacBookPro ~ % brew install wget gdb
bluesanta@Sunghoui-MacBookPro ~ % ln -s /usr/local/Homebrew/Library/Homebrew/shims/mac/super/gmake /usr/local/bin/gmake
bluesanta@Sunghoui-MacBookPro ~ % ln -s /usr/share/terminfo/78/xterm /usr/local/bin/xterm
bluesanta@Sunghoui-MacBookPro ~ % ln -s /Library/Developer/CommandLineTools/usr/bin/make /usr/local/bin/make
bluesanta@Sunghoui-MacBookPro ~ % ln -s /usr/local/bin/gdb /usr/local/bin/ggdb

Qt 버전 확인

bluesanta@Sunghoui-MacBookPro ~ % /usr/local/Cellar/qt/5.15.2/bin/qmake --version
QMake version 3.1
Using Qt version 5.15.2 in /usr/local/Cellar/qt/5.15.2/lib

Qt5pas 라이브러리 설치 (Option : CodeTyphon 설치시 11) -- Platform (widget) Setup 에서 실행)

qt5-qmake 설치

bluesanta@Sunghoui-MacBookPro ~ % brew install qt5
 
 ... 생략 ...
 
qt is keg-only, which means it was not symlinked into /usr/local,
because Qt 5 has CMake issues when linked.
 
If you need to have qt first in your PATH run:
  echo 'export PATH="/usr/local/opt/qt/bin:$PATH"' >> ~/.zshrc
 
For compilers to find qt you may need to set:
  export LDFLAGS="-L/usr/local/opt/qt/lib"
  export CPPFLAGS="-I/usr/local/opt/qt/include"
 
==> Summary
🍺  /usr/local/Cellar/qt/5.15.2: 10,688 files, 367.9MB
bluesanta@Sunghoui-MacBookPro ~ % brew install Caskroom/cask/qt-creator
==> Installing Cask qt-creator
==> Moving App 'Qt Creator.app' to '/Applications/Qt Creator.app'.
🍺  qt-creator was successfully installed!

ln_Typhon1_QT5pas_Build.sh 수정

bluesanta@Sunghoui-MacBookPro ScriptsLin % vi ln_Typhon1_QT5pas_Build.sh

qmake 경로 수정

  Darwin)
       vQMake=/usr/local/Cellar/qt/5.15.2/bin/qmake

수동 컴파일 및 설치

bluesanta@Sunghoui-MacBookPro /opt % sudo mkdir -p /opt/local/libexec
bluesanta@Sunghoui-MacBookPro /opt % sudo ln -s /usr/local/Cellar/qt/5.15.2 /opt/
bluesanta@Sunghoui-MacBookPro ScriptsLin % chmod 755 *.sh
bluesanta@Sunghoui-MacBookPro ScriptsLin % ./ln_Typhon1_QT5pas_Build.sh
 
 ... 생략 ...
 
mv -f Qt5Pas Qt5Pas.framework/Versions/1/Qt5Pas
ln -s Versions/Current/Qt5Pas Qt5Pas.framework/Qt5Pas
rm -f -r /usr/local/Cellar/qt/5.15.2/lib/Qt5Pas.framework
/usr/local/Cellar/qt/5.15.2/bin/qmake -install qinstall Qt5Pas.framework /usr/local/Cellar/qt/5.15.2/lib/Qt5Pas.framework
strip -S -x /usr/local/Cellar/qt/5.15.2/lib/Qt5Pas.framework/Versions/1/Qt5Pas
/usr/local/codetyphon/qt5pas/x86_64-darwin
make install
   
   
---------------------------------------
[INFO]: Qt5Pas.framework Library finish Build OK for x86_64-darwin
   
   
---------------------------------------------------------
    Make qt5pas Libraries Links
---------------------------------------------------------
   
[INFO] Make Qt5Pas.framework links to /Library/Frameworks/Qt5Pas.framework for x86_64-darwin finish OK

fpc.cnf 수정

bluesanta@Sunghoui-MacBookPro ScriptsLin % vi /usr/local/codetyphon/fpc/fpc64/bin/x86_64-darwin/fpc.cnf

# -------------
# Linking
# -------------
-Ff/Library/Frameworks

CodeTyphon 설치 스크립트 실행

bluesanta@Sunghoui-MacBookPro Downloads % cd CodeTyphonIns/
bluesanta@Sunghoui-MacBookPro CodeTyphonIns % export FPCOPT=-Ff/Library/Frameworks
bluesanta@Sunghoui-MacBookPro CodeTyphonIns % ./install.sh

0번 선택

====================================================
             CodeTyphon Studio 
            Version 7.30 (GEN 7)
  Installation for Linux-Solaris-Openindiana-MacOS
          FreeBSD-NetBSD-OpenBSD-DragonFly
====================================================
 
   0) Install CodeTyphon Studio
 
   9) Exit
 
>>> Select an action (press 0..9 key): 0

11번 선택

====================================================
  CodeTyphon Studio 7.30 Setup for Darwin64
   Settings: Platform=cocoa  Multiarch Mode=0
====================================================
   
   0) Install System Libraries
   1) Run CodeTyphon Center (CTC)
   
     11) -- Platform (widget) Setup
     12) -- Multi-Architecture Setup
   
   3) Remove FreePascal
   4) Remove and Build FreePascal
   
   5) Remove Typhon IDE
   6) Remove and Build Typhon IDE
   
   7) Remove ALL
   8) Remove and Build ALL
   
   9) EXIT
   
>>> Select an action (press 0..9 key): 11

5번 QT5 선택

====================================================
    CodeTyphon Studio MacOS Platform (widget) Setup 
        Current Platform: cocoa
====================================================
   
Warning: Install System Libraries after every Platform change
   
   1) Cocoa         (Default)
   2) Carbon
   3) GTK2
   4) QT4
   5) QT5
   6) GTK3           (Experimental)
   7) FpGUI          (Experimental)
   8) CustomDrawn    (Experimental)
   
   9) Back to Main Setup
   
>>> Select a platform (press 0..9 key): 5

12번 선택

====================================================
  CodeTyphon Studio 7.30 Setup for Darwin64
   Settings: Platform=qt5  Multiarch Mode=0
====================================================
   
   0) Install System Libraries
   1) Run CodeTyphon Center (CTC)
   
     11) -- Platform (widget) Setup
     12) -- Multi-Architecture Setup
   
   3) Remove FreePascal
   4) Remove and Build FreePascal
   
   5) Remove Typhon IDE
   6) Remove and Build Typhon IDE
   
   7) Remove ALL
   8) Remove and Build ALL
   
   9) EXIT
   
>>> Select an action (press 0..9 key): 12

1번 선택

====================================================
    CodeTyphon Studio Multi-Architecture Setup
      Current Multiarch Mode: 0
====================================================
   
   0) NO  Multi-Architecture Mode (Multiarch=0)
   
   1) Use Multi-Architecture Mode (Multiarch=1)
   
   
   9) Back to Main Setup
   
>>> Select Mode (press 0..9 key): 1

0번 선택 ( 0) Install System Libraries )

====================================================
  CodeTyphon Studio 7.30 Setup for Darwin64
   Settings: Platform=qt5  Multiarch Mode=0
====================================================
   
   0) Install System Libraries
   1) Run CodeTyphon Center (CTC)
   
     11) -- Platform (widget) Setup
     12) -- Multi-Architecture Setup
   
   3) Remove FreePascal
   4) Remove and Build FreePascal
   
   5) Remove Typhon IDE
   6) Remove and Build Typhon IDE
   
   7) Remove ALL
   8) Remove and Build ALL
   
   9) EXIT
   
>>> Select an action (press 0..9 key): 0

8번 선택 ( 8) Remove and Build ALL )

====================================================
  CodeTyphon Studio 7.30 Setup for Darwin64
   Settings: Platform=qt5  Multiarch Mode=1
====================================================
   
   0) Install System Libraries
   1) Run CodeTyphon Center (CTC)
   
     11) -- Platform (widget) Setup
     12) -- Multi-Architecture Setup
   
   3) Remove FreePascal
   4) Remove and Build FreePascal
   
   5) Remove Typhon IDE
   6) Remove and Build Typhon IDE
   
   7) Remove ALL
   8) Remove and Build ALL
   
   9) EXIT
   
>>> Select an action (press 0..9 key): 8

9번 선택 ( 9) EXIT )

====================================================
  CodeTyphon Studio 7.30 Setup for Darwin64
   Settings: Platform=qt5  Multiarch Mode=0
====================================================
   
   0) Install System Libraries
   1) Run CodeTyphon Center (CTC)
   
     11) -- Platform (widget) Setup
     12) -- Multi-Architecture Setup
   
   3) Remove FreePascal
   4) Remove and Build FreePascal
   
   5) Remove Typhon IDE
   6) Remove and Build Typhon IDE
   
   7) Remove ALL
   8) Remove and Build ALL
   
   9) EXIT
   
>>> Select an action (press 0..9 key): 9

/opt/local/libexec/qt5

bluesanta@Sunghoui-MacBookPro libexec % sudo ln -s /opt/local/libexec/qt5-mac/ /opt/local/libexec/qt5

실행

댓글을 달아 주세요