解壓下載到的.gz源碼:
gunzip xxx.tar.gz
tar xvf xxx.tar, 其實在Mac中可以直接雙擊解壓的.
然后定位到解壓后的目錄下:
./configure
make
sudo make install
這樣Qt就會被安裝到/usr/local/Trolltech/qt-4.4.0 了
這樣, 就可以用qmake了.
/usr/local/Trolltech/Qt-4.4.0/bin/qmake -project
/usr/local/Trolltech/Qt-4.4.0/bin/qmake
make -f Makefile
open ./Qt01.app
In order to use Qt, some environment variables need to be extended.
In .login (in case your shell is csh or tcsh), add the following line:
setenv PATH /usr/local/Trolltech/Qt-4.3.4/bin:$PATH
If you use a different shell, please modify your environment variables accordingly.
更詳細的說明見:http://doc.trolltech.com/4.3/install-mac.html
1. 添加 PATH:在終端下敲 vim ~/.profile
不知道你會用 vim 不會,不會的話搜索一下網絡;然后添加 export PATH="/usr/local/Trolltech/Qt-4.4.0/bin:$PATH"
保存、退出 vim,最后重新啟動終端,新路徑就有了:可以用 echo $PATH 看看。
2. 打開 *.app 文件:你可以直接在 Finder 中雙擊打開啊(要轉到/usr/local/Trolltech/Qt-4.4.0/bin 目錄,在 Finder 菜單中有的)
或者在終端中使用 open *.app 這樣就可以了。
3. 發布 qt 程序,和 Win 上一樣,也是找到需要的 dylib 等資源,然后打包一起發布。
XCode 中也有相關工具的,見 /Developer/Applications,具體我沒有嘗試過,以后大家一起探索看看...
gunzip xxx.tar.gz
tar xvf xxx.tar, 其實在Mac中可以直接雙擊解壓的.
然后定位到解壓后的目錄下:
./configure
make
sudo make install
這樣Qt就會被安裝到/usr/local/Trolltech/qt-4.4.0 了
這樣, 就可以用qmake了.
/usr/local/Trolltech/Qt-4.4.0/bin/qmake -project
/usr/local/Trolltech/Qt-4.4.0/bin/qmake
make -f Makefile
open ./Qt01.app
In order to use Qt, some environment variables need to be extended.
PATH - to locate qmake, moc and other Qt tools
This is done like this:
In .profile (if your shell is bash), add the following lines:
PATH=/usr/local/Trolltech/Qt-4.3.4/bin:$PATH
export PATH
In .login (in case your shell is csh or tcsh), add the following line:
setenv PATH /usr/local/Trolltech/Qt-4.3.4/bin:$PATH
If you use a different shell, please modify your environment variables accordingly.
更詳細的說明見:http://doc.trolltech.com/4.3/install-mac.html
1. 添加 PATH:在終端下敲 vim ~/.profile
不知道你會用 vim 不會,不會的話搜索一下網絡;然后添加 export PATH="/usr/local/Trolltech/Qt-4.4.0/bin:$PATH"
保存、退出 vim,最后重新啟動終端,新路徑就有了:可以用 echo $PATH 看看。
2. 打開 *.app 文件:你可以直接在 Finder 中雙擊打開啊(要轉到/usr/local/Trolltech/Qt-4.4.0/bin 目錄,在 Finder 菜單中有的)
或者在終端中使用 open *.app 這樣就可以了。
3. 發布 qt 程序,和 Win 上一樣,也是找到需要的 dylib 等資源,然后打包一起發布。
XCode 中也有相關工具的,見 /Developer/Applications,具體我沒有嘗試過,以后大家一起探索看看...