写了个qt程序,做成的rpm包在虚拟机上只能用root用户安装运行,原因可能是什么? 而且只会用命令行安装,怎么图形化浏览文件? 一般怎么发布?
------解决方案--------------------------------------------------------
用qt-creator
http://www.meegox.com/thread-1555-1-1
------解决方案--------------------------------------------------------
关注一下
------解决方案--------------------------------------------------------
试试Intel的AppUp
------解决方案--------------------------------------------------------
给你个例子,主要是写好 pro 文件,然后qmake,make、make rpm就可以直接打包生成rpm包了,这里需要写好spec文件。
leos@leos-laptop:test-music $ ls -lh
total 30M
-rw-r--r-- 1 leos leos 1.4K 2011-12-29 10:02 ax.pro
drwxr-xr-x 2 leos leos 4.0K 2011-12-30 16:35 build
drwxr-xr-x 3 leos leos 4.0K 2011-12-29 13:14 data
-rw-r--r-- 1 leos leos 29K 2011-12-30 10:59 Makefile
-rw-r--r-- 1 leos leos 26K 2011-12-29 10:02 netmusicDown.png
-rw-r--r-- 1 leos leos 26K 2011-12-29 10:02 netmusic.png
-rwxr-xr-x 1 leos leos 2.4M 2011-12-30 16:36 test-music
-rw-r--r-- 1 leos leos 4.5M 2011-12-29 10:02 test-music-0.1.0.tar.gz
-rw-r--r-- 1 leos leos 3.0K 2011-12-29 18:34 test-music.pro
-rw-r--r-- 1 leos leos 4.3K 2011-12-29 10:02 test-music.qrc
-rw-r--r-- 1 leos leos 1.5K 2011-12-29 17:43 test-music.spec
-rw-r--r-- 1 leos leos 9.8M 2011-12-29 10:02 qrc_test-music.cpp
-rw-r--r-- 1 leos leos 449 2011-12-29 10:02 qrc.sh
drwxr-xr-x 2 leos leos 4.0K 2012-01-04 10:07 src
给你个spec的例子
leos@leos-laptop:test-music $ cat test-music.pro
######################################################################
# Automatically generated by qmake (2.01a) ?? 7? 14 15:30:33 2011
######################################################################
NAME = test-music
VERSION = -0.1.0
TEMPLATE = app
TARGET = $${NAME}
DEPENDPATH += .
INCLUDEPATH += .
OBJECTS_DIR = build
MOC_DIR = build
DISTFILES += data/*.png \
data/wait/*.png \
data/*.db \
data/*.service \
data/*.desktop \
*.png
icon.files = *.png
icon.path = /usr/share/pixmaps
INSTALLS += icon
desktop.files = data/*.desktop
desktop.path = /usr/share/applications/desktop
INSTALLS += desktop
db.files = data/*.db
db.path = /usr/share/$${NAME}/
INSTALLS += db
dbusService.files = data/*.service
dbusService.path = /usr/share/dbus-1/services/
INSTALLS += dbusService
target.path = /usr/bin
INSTALLS += target