TEST

顯示具有 software 標籤的文章。 顯示所有文章
顯示具有 software 標籤的文章。 顯示所有文章

2010年5月23日 星期日

安裝設定Wine執行Zoundry Raven

請先參考 [教學] 圖解 wine 入門 來安裝wine、cabextract,不用裝ies4linux,以winetricks裝ie6、msxml3、mfc40、mfc42、wininet。
打開Configure Wine,還需要用到Windows的shlwapi.dll,在libraries頁中新增輸入shlwapi,之後將c:\Windows\system32目錄下的shlwapi.dll複製到~/.wine/drive_c/Windows/system32下,可以覆蓋。

請勿安裝1.1.42版本,在編輯區會沒有滑鼠游標,害我重裝了一整天也沒用......><",後來才知道是bug
後來裝了1.2-rc1版,又遇到一個bug,某些地方字型無法平滑化,目前無解,尚可執行就勉強用了。請看最後有解決了。

之後以下例的方式新增字型:
將/usr/share/fonts/中要新增字型檔案連結到~/.wine/drive_c/windows/Fonts
修改./wine/system.reg 全部替換成自己要的字型。

[Software\\Microsoft\\Windows NT\\CurrentVersion\\FontSubstitutes]
"Arial CE,238"="PMingLiU"
"Arial CYR,204"="PMingLiU"
"Arial Greek,161"="PMingLiU"
"Arial TUR,162"="PMingLiU"
"Courier New CE,238"="PMingLiU"
"Courier New CYR,204"="PMingLiU"
"Courier New Greek,161"="PMingLiU"
"Courier New TUR,162"="PMingLiU"
.....

修改視窗亂碼:
修改./wine/system.reg

[Software\\Microsoft\\Windows NT\\CurrentVersion\\FontLink\\SystemLink]
"Lucida Sans Unicode"="DroidSansFallback.ttf,Droid Sans Fallback"
"Microsoft Sans Serif"="DroidSansFallback.ttf,Droid Sans Fallback"
"PMingLiU"="DroidSansFallback.ttf,Droid Sans Fallback"
"SimSun"="DroidSansFallback.ttf,Droid Sans Fallback"
"Tahoma"="DroidSansFallback.ttf,Droid Sans Fallback"

字型平滑化:
修改./wine/user.reg

[Control Panel\\Desktop]
"DragFullWindows"="0"
"FontSmoothing"="2"
"FontSmoothingGamma"=dword:00000578
"FontSmoothingOrientation"=dword:00000001
"FontSmoothingType"=dword:00000002

[Software\\Wine\\X11 Driver]
"ClientSideAntiAliasWithCore"="Y"
"ClientSideAntiAliasWithRender"="Y"
"ClientSideWithCore"="Y"
"ClientSideWithRender"="Y"
"Managed"="Y"

執行畫面:

另外可考慮安裝Wine-doors來使用其他程式。

1.2-rc1版某些地方字型無法平滑化,最後跟據回報bug頁的解法是說不是wine的問題,可能是我裝在9.04上的關係吧。
新增一檔案~/font.conf,輸入以下內容就可以了。

<?xml version="1.0"?><!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<match target="font" >
<edit mode="assign" name="rgba" >
<const>rgb</const>
</edit>
</match>
<match target="font" >
<edit mode="assign" name="hinting" >
<bool>true</bool>
</edit>
</match>
<match target="font" >
<edit mode="assign" name="hintstyle" >
<const>hintmedium</const>
</edit>
</match>
<match target="font" >
<edit mode="assign" name="antialias" >
<bool>true</bool>
</edit>
</match>
</fontconfig>

2010年5月5日 星期三

自訂Beagle搜尋rar、big5編碼txt

Beagle是很好用的桌面搜尋,預設是只搜尋使用者家目錄,且不會找隱藏資料夾裡的檔案。有些文件如.doc裡面的中文是搜尋不到的,英文可以。但.odt、.pdf中英文都可以。對我來說,主要還有以下缺點:
  • 但是如果是rar壓縮檔裡面的資料就找不到。
  • 搜尋中文時,以前是big5編碼的純文字內容就會找不到,我有不少以前的資料是用big5存的阿。
分享一下解決方法:
安裝完Beagle後,到/etc/beagle新增external-filters.xml加入資料如下:
<?xml version="1.0" encoding="utf-8"?>
<external-filters>
<filter>
  <mimetype>application/x-rar</mimetype>
  <extension>.rar</extension>
  <command>rar</command>
  <arguments>lb %s</arguments>
</filter>

<filter>
  <mimetype>text/plain</mimetype>
  <!--mimetype>application/gedit</mimetype-->
  <extension>.txt</extension>
  <command>iconv</command>
  <arguments>-f big5 -t utf-8 %s</arguments>
</filter>
</external-filters>
然後到console

beagle-config --beagled-reload-config

就可以了。
但是之前已經index過得檔案就不會重新index喔,所以當然還是找不到,把舊index刪除 ,重新index就可以了。

如果你不確定增加external-filters有沒有成功,可以試試以下指令來確認:
beagle-info --list-filters
會列出所有支援的filters,在這個例子應該出現;
FilterExternal - Version 10 (/usr/lib/beagle/Filters/Filters.dll)
  - MimeType: application/x-rar
  - Extension: .rar
  - MimeType: text/plain
  - Extension: .txt
要確認是不是指令下錯,可以使用:
beagle-extract-content --show-generated test.rar
beagle-extract-content --show-generated test.txt
來測試你要尋找有包含資料的檔案,如果他的輸出內容有包含你要搜尋的字串就對了。
.doc裡面的中文搜尋不到,目前不急用就先不解了。
參考:
http://www.linux.com/news/software/applications/254610:desktop-search-engines-compared
http://beagle-project.org/ExternalFiltersRepository#Rar_filter
http://osdir.com/ml/dashboard-hackers/2010-03/msg00006.html

2010年2月3日 星期三

在windows單機上使用rsync備份

首先至cwRsync下載安裝檔cwRsync_4.0.3_Installer.zip,只要單機用不需要安裝server版。
安裝完之後,並沒有將rsync所需環境參數設定進系統,而是寫在範例檔C:\Program Files\cwRsync\cwrsync.cmd。把指令寫在範例檔最後,直接執行即可。
rsync -av --delete /cygdrive/c/Temp/test/ /cygdrive/c/Temp/test2/ >>test
rsync -av --delete-after --exclude-from=rsync_exclude.txt /cygdrive/d/ /cygdrive/z/company/ >rsync3.log

rsync_exclude.txt內容範例
#System file
RECYCLER/
System Volume Information/
Thumbs.db

#no use data
not sync/
*.obj
*.pch
*.ncb
*.bsc
*.ilk
*.pdb

2009年10月11日 星期日

如何用Zoundry Raven透過ISA proxy發佈文章

在內部網路時,必須透過ISA proxy來發佈文章,但是Zoundry Raven目前並不支援ISA proxy,實在是很麻煩阿。

只好使用Cntlm再轉出去:

下載執行setup.bat安裝之後會在C:\Program Files\Cntlm內。
先修改cntlm.ini後執行:

cntlm.exe -c cntlm.ini -v
-c: 讀取設定檔
-v: 秀出訊息

並在Zoundry Raven設定proxy為127.0.0.1:3128。

2009年10月8日 星期四

測試使用Zoundry Raven發佈文章

這是第一篇使用Zoundry Raven發佈的文章

設定上比較麻煩一些,我又是在proxy之後更麻煩。 也算還方便,但是Zoundry Raven已經很久沒更新了。有點擔心阿,雖然已經是open source了。 而且可以做出文繞圖的效果,實在是太強,可能就是太強了才沒人有辦法更新吧?

試貼好吃的墨西哥烤雞餐:

使用上很方便,但上傳Blogger的話要更改個設定,以免一堆空行: