Thứ Sáu, 17 tháng 6, 2011

First Unikey 3.6.2 build

Sau một thời gian mày mò thì em cũng xin ra lò 1 blog đầu tiên

1. Download source Unikey 3.6.2:
http://prdownloads.sourceforge.net/unikey/Uk362src.zip và giải nén vào *
[path]*
2. Mở file *[path]\newkey\newkey.sln* bằng Visual Studio 2005 và convert
project cho tương thích với VS2005 (Conversion Wizard)
3. Sửa các file sau đây:
- *[path]\keyhook\vietkey.cpp*
- line 1035:
WideCharToMultiByte(CP_US_ANSI, 0, p, -1, (char *)ansiPush,
sizeof(ansiPush), NULL, NULL);
--> WideCharToMultiByte(CP_US_ANSI, 0, *(LPCWSTR)*p, -1, (char
*)ansiPush, sizeof(ansiPush), NULL, NULL);
- *[path]\keyhook\keyhook.cpp*
- line 444:
int count = WideCharToMultiByte(1258, 0, VnKbd.uniPush,
VnKbd.keysPushed, (char *)VnKbd.ansiPush, VnKbd.keysPushed, 0, 0);
--> int count = WideCharToMultiByte(1258, 0, *(LPCWSTR)*VnKbd.uniPush,
VnKbd.keysPushed, (char *)VnKbd.ansiPush, VnKbd.keysPushed, 0, 0);
- *[path]\vnconv\charset.cpp*
- line 164:
int k;
--> int *i,* k;
- line 1106:
int k;
--> int *i,* k;
- *[path]\newkey\tooldlg.cpp*
- line 669:
static lastFormat = CF_TEXT; // format of last converted clipboard
(CF_TEXT or CF_UNICODETEXT)
--> static *int *lastFormat = CF_TEXT; // format of last converted
clipboard (CF_TEXT or CF_UNICODETEXT)
- *[path]\newkey\mactab.cpp*
- line 145:
char * pos = strchr(item, ':');
--> char * pos = *const_cast (*strchr(item, ':')*)*;
- *[path]\newkey\label.h*
- line 107:
static setLinkCursor(HCURSOR hCursor)
--> static *void *setLinkCursor(HCURSOR hCursor)
4. Build project *NewKey* với config *Win32 Release* hoặc *Win32
Unicode Release*. Theo em thấy từ góc độ người dùng 2 cái này khác nhau ở
chỗ bản *Unicode Release có thể chuyển sang giao diện tiếng Việt*, còn
bản Release thì không.

Anh Hưng và Trung confirm xem các bước làm như vậy có đúng không?

Hic, nhìn code chóng mặt quá, dòng hiểu dòng không :(

4 nhận xét:

  1. Code mới nhất có thể download tại đây:

    http://code.google.com/p/unikeyspell/source/checkout

    Trả lờiXóa
  2. mình cũng đang nghiên cứu! mà mò sửa hoài hok dc ta ^^! có khi nào tại xài windows 7 64bit không ^^!

    Trả lờiXóa
  3. Mình build 32bit, cho chạy trên 64 bit cũng được mà.

    Trả lờiXóa
  4. Có gì bạn gửi vào email cho tiện nhé.

    vuhung16plus at gmail dot com

    Trả lờiXóa