這是以下安裝文件(sandhi-install.sh)。目前安裝後只能從終端運行。我想讓它獨立於終端。 Making a Ubuntu executable解釋瞭如何創建可執行文件,但我應該在哪裏放置該代碼。我認爲它應該在安裝文件本身中,因爲我們希望圖標在安裝完成後出現在桌面上。 我以前沒有Shell腳本和bash的經驗,所以很抱歉如果我錯過任何重要信息。請詢問您是否需要其他文件。我的目標基本上是運行獨立於終端的sandhi。如何製作ubuntu可執行文件並在我的安裝文件中運行
#!/bin/bash
echo "Installing the required dependencies"
sudo apt-get -y install git-core autoconf automake make libtool g++ python-dev swig \
pkg-config libboost1.48-all-dev libfftw3-dev libcppunit-dev libgsl0-dev \
libusb-dev sdcc libsdl1.2-dev python-wxgtk2.8 python-numpy \
python-cheetah python-lxml doxygen python-qt4 python-qwt5-qt4 libxi-dev \
libqt4-opengl-dev libqwt5-qt4-dev libfontconfig1-dev libxrender-dev \
python-serial python-matplotlib
echo "Sciscipy installation starting"
git clone https://github.com/manojgudi/sciscipy-1.0.0.git
cd sciscipy-1.0.0/
sudo ./install
echo "Starting Sandhi installation"
cd ../
git clone http://github.com/manojgudi/sandhi.git
cd sandhi/
git submodule init
git submodule update
git pull origin master
git submodule update
mkdir build
cd build/
cmake ../
make -j 2
sudo make install
sudo ldconfig
echo "Sandhi installation complete. Go to command line and type Sandhi to start Sandhi"
謝謝你的答案。對於不清楚,但我真正想要的是,當任何用戶運行上面的腳本,即sudo sandhi-install.sh時,圖標應該自行安裝在他/她的計算機上。通過遵循http://stackoverflow.com/questions/2691214/making-a-ubuntu-executable上的步驟,我在我的計算機上得到一個圖標,它工作正常,但我想在上面的腳本中添加...這樣當您運行上述腳本時,該圖標會出現在您的計算機上,以便您再次不必通過此處提及的所有步驟http://stackoverflow.com/questions/2691214/making-a-ubuntu-executable – PuRaK 2014-10-19 13:13:19