话筒突然不工作了

UBUNTU dapper,前段时间一直工作的,今天一用skype,居然罢工了。
首先怀疑是硬件的原因,但无法检查,再怀疑是OS的问题,于是切换到WIN下,一切正常。

问题应该处在最近安装的软件上,检查系统的历史记录,发现最近只安装过SKYPE 1.3。
有可能是skype的问题,于是google之。找到了答案:
http://taint.org/2006/06/07/150917a.html

There is a solution for the Skype microphone problem:

1.

Install Skype 1.3 beta (see http://www.macewan.org/2006/06/28/skype-13-ubuntu-dapper/#comments)
Do NOT run it during working on next point.
2.

Go to your sound channel settings (i.e. right-click the reproductor icon in the Gnome interface and select “Open volume settings”) and make sure that both Microphone AND Capture channels are selected as recording devices.
And yes, I also had Capture off in Breezy with Skype 1.2, but now it is needed to have it on or the microphone will not work. It is probably good idea also to enable the capture “output” which in fact enables automatic volume level control of the microphone.
3.

Run Skype

Another possibly affecting factor is that I have installed the oss-alsa package as result of my previous attempts to get skype to work (I do not know if it matters or not).
This way it works for me, I hope it will for you also…

ubuntu dapper下编译mapserver

好久没有安装mapserver了,今天才发现mapserver都已经进入官方的源了。
看来已经出了好长时间了,今天要重装mapserver才发现。
ubuntu dapper中的版本是4.6.1

apt-cache search mapserver
cgi-mapserver – cgi module of mapserver
mapserver-bin – mapserver binary utilities
mapserver-doc – documentation for mapserver
perl-mapscript – perl mapserver library
php4-mapscript – module for php4-cgi to use mapserver
php5-mapscript – module for php5-cgi to use mapserver
python-mapscript – python mapserver lib

debian stable中是4.4.1,testing和unstable是4.8.3版本。

并且发现现在安装mapserver好简单了:

./configure –with-ogr –with-gdal –with-geos –with-proj –with-postgis –with-php=/usr/include/php5/
make
sudo cp php_mapscript.so /usr/lib/php5/20051025/
#// 加入php_mapscript.so的extensions
sudo nano /etc/php5/apache2/php.ini
sudo /etc/init.d/apache2 restart

已经安装了apache2-mpm-prefork,libapache2-mod-php5包。

cross compile QT4 program for windows on ubuntu dapper

1、首先安装基础程序:
sudo wine mingw32 mingw32-binutils mingw32-runtime
2、安装QT4支持(LINUX下的支持):
sudo apt-get install libqt4-core libqt4-gui libqt4-qt3support libqt4-sql libqt4-debug-dev libqt4-dev
3、下载QT4 for win程序:
wget http://wftp.tu-chemnitz.de/pub/Qt/qt/source/qt-win-opensource-4.1.2-mingw.exe
4、安装:
wine qt-win-opensource-4.1.2-mingw.exe
中间会提示找不到MINGW32的位置,没关系,可以直接跳过。
5、修改specs文件
sudo cp -Rf /usr/share/qt4/mkspecs/win32-g++ /usr/share/qt4/mkspecs/win32-x-g++
sudo nano /usr/share/qt4/mkspecs/win32-x-g++/qmake.conf
把和下面相关的内容都进行修改:

QMAKE_CXX = i586-mingw32msvc-g++

QMAKE_INCDIR = /usr/i586-mingw32msvc/include/
QMAKE_INCDIR_QT = /usr/local/qt4-w32/4.1.2/include
QMAKE_LIBDIR_QT = /usr/local/qt4-w32/4.1.2/lib

QMAKE_LINK = i586-mingw32msvc-g++

# ne pas oublier le -mwindows ici
QMAKE_LFLAGS = -mthreads -Wl,-enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc -mwindows

#isEqual(MINGW_IN_SHELL, 1) {
QMAKE_DIR_SEP = /
QMAKE_COPY = cp
QMAKE_COPY_DIR = cp -r
QMAKE_MOVE = mv
QMAKE_DEL_FILE = rm -f
QMAKE_MKDIR = mkdir -p
QMAKE_DEL_DIR = rm -rf
#} else {
# QMAKE_COPY = cp
# QMAKE_COPY_DIR = cp -r
# QMAKE_MOVE = mv
# QMAKE_DEL_FILE = rm -f
# QMAKE_MKDIR = mkdir -p
# QMAKE_DEL_DIR = rm -rf
#}

# Enlever les .exe et rajouter -qt4
QMAKE_MOC = $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}moc-qt4
QMAKE_UIC = $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}uic-qt4

# Je n’ai pas trouvé d’équivalent de ce fichier, j’ai quand meme enlevé le .exe
QMAKE_IDC = $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}idc

QMAKE_RC = i586-mingw32msvc-windres

QMAKE_STRIP = i586-mingw32msvc-strip

6、QT4的跨平台编译支持就完成了,以后可以这样编译WINDOWS程序:
qmake-qt4 -project
qmake-qt4 -spec win32-x-g++
make

编译sqlite for windows on ubuntu dapper

参考其中的SQLITE部分: http://mpa.itc.it/radim/wingrass/INSTALL

下载源码,解压缩:

cd sqlite-3.3.5
nano Makefile.linux-gcc
#modify:
#TOP = ../sqlite-3.3.5
#这个修改不知道有没有意义

# Note: SQLite is using for example its own parser (lemon) which must be compiled first for Linux

make -f Makefile.linux-gcc lemon keywordhash.h

cp Makefile.linux-gcc Makefile.mingw-gcc

nano Makefile.mingw-gcc
# modify Makefile.mingw-gcc (BCC,TCC,AR,RANLIB):
# 修改一下相关部分:
# BCC = i586-mingw32msvc-gcc -g -O2
# TCC = i586-mingw32msvc-gcc -O6
# AR = i586-mingw32msvc-ar cr
# RANLIB = i586-mingw32msvc-ranlib

# delete tclsqlite.o from LIBOBJ in main.mk

make -f Makefile.mingw-gcc libsqlite3.a

i586-mingw32msvc-g++ –shared -o sqlite3.dll \
-Wl,–out-implib=libsqlite3.dll.a \
-Wl,–export-all-symbols \
-Wl,–enable-auto-import \
-Wl,–whole-archive libsqlite3.a \
-Wl,–no-whole-archive -lmingw32

i586-mingw32msvc-strip sqlite3.dll
cp sqlite3.dll /usr/i586-mingw32msvc/bin/
cp libsqlite3.dll.a /usr/i586-mingw32msvc/lib
cp sqlite3.h /usr/i586-mingw32msvc/include

编译wxWidgets for windows on ubuntu dapper

原文:http://www.wxwidgets.org/wiki/index.php/Cross-Compiling_Under_Linux

下载allportscombine包,然后:

./configure –with-msw –target=i586-mingw32msvc –host=i586-mingw32msvc –build=i386-linux –enable-unicode –prefix=/usr/i586-mingw32msvc/
make
make install

注意编译的时候要分两步走,不能象G++那样一步到位:

i586-mingw32msvc-g++ -c -o minimal.o minimal.cpp `/usr/i586-mingw32/bin/wx-config –cxxflags`

i586-mingw32msvc-g++ -o minimal.exe minimal.o `/usr/i586-mingw32/bin/wx-config –libs`

因为wxWidgets是以动态库的方式编译的,还需要拷贝相关的DLL:

cp /usr/i586-mingw32msvc/lib/wx*.dll .

同时,还要拷贝mingw32的一个库过来:

cp /usr/share/doc/mingw32-runtime/mingwm10.dll.gz .
gzip -d *.gz

然后就可以进行测试了:
wine minimal.exe

thuban 1.1.0@dapper

源中的thuban应该1.0版本,而且存在依赖问题。
从官方下载source,解开:

mv Thuban-1.1.0 thuban-1.1.0
cd thuban-1.1.0
nano debian/control
#修改几个相关依赖,主要是gdal和python相关的部分
#libwxgtk2.6-dev, libgdal1-1.3.1-dev, python-wxgtk2.6
dch -i
dpkgbuildpackage -rfakeroot
cd ..
sudo dpkg -i *.deb

我印象中原来thuban是用C++写的,怎么现在改成python+wxWidgets了。