> I would appreciate if you send me the exact process you used and the
> DLL, so we can publish it on the FarsiWeb website on SourceForge.

OK.  I send the step-by-step process on the list, and will send you the
relevant files off-list, so that you can put them on sourceforge.

Here are the steps I took to accomplish the job:

1.  After installing the Microsoft Keyboard Layout Creator (MSKLC) tool, I
inspected its install directory, and figured that it's being shipped with a
version of the MS C/C++ compiler (cl.exe) in the directory: C:\Program
Files\Microsoft Keyboard Layout Creator\bin\i386.  This assured me that the
tool creates a C source file, and feeds that to the compiler to create the
layout DLL.

Now, I needed to know the location of the generated source file, and also
the command prompt parameters passed to the compiler.

2.  To get the command prompt options passed to the compiler, I wrote a
simple application which appends its command line arguments to a log.txt
file.  This application is called shim.cpp, and is shipped  in the src
package inside the shim directory.  It can simply be compiled to shim.exe
using the command "cl shim.cpp".

3.  Now, I moved all of the .exe files in the C:\Program Files\Microsoft
Keyboard Layout Creator\bin\i386 directory, and copied shim.exe under all of
the moved files' names.  So, now I had a cl.exe, rc.exe, link.exe, etc. in
that directory which were all actually the shim.exe program.  This enabled
me to figure the command prompt options passed to the compiler tools from
the MSKLC tool so that I could immitate them manually.

4.  I opened MSKLC, and selected File | Load Existing Keyboard menu item to
load the "Persian experimental standard" keyboard (version 1.0.3.13) that I
had already grabbed from sf.net repository.

5.  I selected the Project | Build DLL and Setup Package menu item to build
the DLL.  The tool invoked my shim tool instead of all of the compiler's
tools (see Step 3 above.)

6.  I created the directory C:\Program Files\Microsoft Keyboard Layout
Creator\hack, and created a build.bat file there, which would execute the
compiler's tools with the command prompts passed by MSKLC to it.

7.  I copied the keyboard layout source files generated by MSKLC from the
temporary directory to the hack directory as well.

8.  I edited Persian.c, to change the shift state code for the Space key
from ' ' to 0x200C.  The patched line is line 268 in the original file
copied from the temp directory.

9.  I edited Persian.rc to change the version number from 1.0.3.13 to
1.0.3.14 so that I could tell my modified Persian.dll version from the
original FarsiWeb one.

10.  I ran build.bat, and voila!  The Persian.dll version 1.0.3.14 got
built.  Then I just had to replace it with the version 1.0.3.13 DLL from the
original FarsiWeb package.  The installer didn't need any change.  Now, I
just ran the installer to uninstall the old version, and install the new
version, and I had my keyboard working with Shift+Space.

I'm sending to Roozbeh two files: Persian-src-1_0_3_14.zip which contains
the modified source files, and Persian-1_0_3_14.zip which contains the DLL
plus the installer, which I guess he'd make available through the
sourceforge.

I'm open for questions/comments.  Please don't hesitate if you have any.

-------------
Ehsan Akhgari

Farda Technology (http://www.farda-tech.com/)

List Owner: [EMAIL PROTECTED]

[ Email: [EMAIL PROTECTED] ]
[ WWW: http://www.beginthread.com/Ehsan ]



_______________________________________________
PersianComputing mailing list
[EMAIL PROTECTED]
http://lists.sharif.edu/mailman/listinfo/persiancomputing

Reply via email to