http://marcin-wiacek.fkn.pl/english/zips/mygnokii.tar.gz
[gnokii.git] / Docs / README-WIN32
1
2 README-WIN32
3 ============
4
5 The Win32 port of Gnokii currently supports only Gnokii for the Nokia 6110 
6 phone. Other phones in the 51xx and 61xx familie are likely to work also with 
7 this version. The graphical X version, the AT-emulater and virtual device are 
8 not ported to Win32. This might change in the future but as far as I know no 
9 work is in progress. Ofcourse the effort of porting only makes sense if there is 
10 a need. Do you have the need for extended Win32 functionality don't ask me but 
11 let us all know on the Gnokii mailing list.
12
13 Update: Allthough not finished I did explore the possibility to compile Xgnokii 
14 using the Win32 port of GTK+. It seems to compile fine but right after the 
15 splash screen the program crashes. This means no luck since I do not have time 
16 to go into detail (aka debugging).
17
18 The following sections describe what I did to compile Gnokii on Win32 using two 
19 (completely) different tools. I am aware of the fact that more ways may lead to 
20 the same result. I just think these two are two most logical methods. The first 
21 method is the graphical Windows way of working with M$ software tools. The 
22 second option is the freaky Unix command prompt way utilizing a GPL'ed software 
23 development environment.
24
25         * Microsoft Visual Studio and Visual C++ 
26         * Cygwin B20 
27
28
29 Compile using Microsoft Visual Studio and Visual C++
30 ====================================================
31
32 Below a description of how I compiled Gnokii with the Microsoft Visual Studio 
33 6.0 and Visual C++ 6.0. It is not the only solution but it is how I typically 
34 work with Visual Studio. I also think this method relates more to the average 
35 Windows programmer. It is assumed you have some basic knowledge about workspaces 
36 and projects in Microsoft Visual Studio. If not, please go back to the 
37 documentation as this page has no intention to learn you the details about this.
38
39 0. Put the Gnokii sources somewhere.
40
41 Put the Gnokii source in <path>\gnokii\gnokii src. Please do not use a version 
42 in the path. This wil cause problems as you have to modify the project any time 
43 you get new sources. In case you want to use CVS you need to check out the 
44 sources in <path>\gnokii\gnokii src.
45
46 1. First create a blank workspace called Gnokii.
47
48 Visual Studio appends the the workspace name to the location, please keep this 
49 default. As location <path> is assumed. The combined location should now read 
50 <path>\gnokii.
51
52 2. Create project 'Gnokii lib'.
53
54 The project has to be of type 'win32 static library'. Add this project to the 
55 current workspace, this is the one you just created. The location will now be 
56 <path>\gnokii\gnokii lib. Do not check 'pre-compiled header' and 'MFC support' 
57 in the window appearing next. Click finish and Ok to create the project.
58 Add the files below to the project. (Menu: Project -> Add To Project -> Files 
59 ...) Open the directory gnokii src and select the files below, click OK to add 
60 the files to the project.
61
62   cfgreader.c 
63   cfgreader.h 
64   fbus-3810.c 
65   fbus-3810.h 
66   fbus-6110-auth.c 
67   fbus-6110-auth.h 
68   fbus-6110-ringtones.c 
69   fbus-6110-ringtones.h 
70   fbus-6110.c 
71   fbus-6110.h 
72   win32\getopt.c 
73   win32\getopt.h 
74   gsm-api.c 
75   gsm-api.h 
76   gsm-common.h 
77   gsm-filetypes.c 
78   gsm-filetypes.h 
79   gsm-networks.c 
80   gsm-networks.h 
81   mbus-2110.c 
82   mbus-2110.h 
83   win32\winserial.c 
84   win32\winserial.h 
85
86 To really finish the project change it's settings (Menu: Project -> Settings 
87 ...). On the tab C/C++ the box with 'Preprocessor definitions:' should be 
88 changed to:
89 WIN32,_DEBUG,_CONSOLE,_MBCS,VERSION=\"win32\",MODEL=\"6110\",PORT=\"COM1\",DEBUG
90 for the Win32 Debug version. For the Win 32 Release version leave out the DEBUG. 
91 This way the version is fixed to win32 and there is no easy way to automate 
92 this. Please change the version after you have installed new sources.
93
94 3. Project Gnokii rlp (win32 static library).
95
96 Repeat step 2 but now for the following files.
97 (location: <path>\gnokii\gnokii rlp).
98
99   rlp-common.c 
100   rlp-common.h 
101   rlp-crc24.c 
102   rlp-crc24.h 
103
104 4. Project Gnokii.
105
106 This step is simular to the previous steps but instead make this project a win32 
107 console application. (location: <path>\gnokii\gnokii)
108
109   gnokii.c 
110   gnokii.h 
111
112 The project has to be dependent on 'Gnokii lib' and 'Gnokii rlp'.
113
114 5. The final step.
115
116 The last step is to make 'Gnokii' the 'active project'. Now building Gnokii will 
117 also build the library and rlp stuff because of the dependencies. The final 
118 result is an executable file with the name gnokii.exe.
119
120
121 Compile with Cygwin (B20)
122 =========================
123
124 This is in fact the easiest option. Because Cygwin implements a GNU (Unix style) 
125 environment on your PC you can almost compile Gnokii 'as is' out of the box. 
126
127 There are just a few steps extra needed to tweak the Makefile. Read the comments 
128 in the Makefile. Actually you might want to keep the '-s' in the LDFLAGS since 
129 this strips debug information and keeps your executable lean.
130
131
132 Disclaimer
133 ==========
134
135 No warranty, you are on your own. If you have questions or remarks, please let me
136 know on my email address mentioned below.
137
138 Author: Feico de Boer (mailto:feico.de.boer@hetnet.nl)
139 Date:   December 6th, 1999
140
141 Pre-compiled Gnokii binaries are available on:
142         http://www.homepages.hetnet.nl/~fdboerhetnet/
143
144 Here you will also find the latest edition of the README-WIN32.