libpurple-core-answerscripts icon indicating copy to clipboard operation
libpurple-core-answerscripts copied to clipboard

Compiling on Windows

Open tgrosst opened this issue 14 years ago • 16 comments

I have been reading all the posts on this project and i haven't found any information on how to compile on Windows. Do you have to use something like Cygwin? Any help is appreciated. Thanks.

tgrosst avatar Feb 03 '11 01:02 tgrosst

I am bit afraid that code is not 100% ready for windows (as i have no windows machine to test it - commits are welcome). You can find where the problems are in C code comments.

Also i don't know how to build it on windows :-) But you don't need cygwin (well if you manage to build this plugin using pidgin, i guess that you will not have to modify the code at all and you can build it using supplied makefile as it is as long as you have all dependencies = libpurple headers) Anyway... i've used standard pidgin plugin skeleton when i was writing it, so if you will manage to build any other plugin, you will manage to build this one too (with exception of problems highlighted in code)

Harvie avatar Feb 03 '11 09:02 Harvie

And well... you will probably also need to write your own answerscript for windows (if you don'T have BASH). BTW If you like scripting things give Linux a chance :-) Windows are for clickerz.

Harvie avatar Feb 03 '11 09:02 Harvie

I've been reading some of the compiling instructions for windows on the pidgin website. I'll try to compile it, and see what happens. I'll probably try it out in linux in a virtual machine too. Thanks for the info.

tgrosst avatar Feb 03 '11 15:02 tgrosst

BTW you should uncomment this line: #define WIN32 and let me know what happens, thx :-)

Harvie avatar Feb 03 '11 18:02 Harvie

I've looked at the code and there are few differences 1.) answerscript should have .exe file extension 2.) scripts will probably be executed synchronously (so pidgin will remain freezed until answerscript will exit)

Harvie avatar Feb 03 '11 18:02 Harvie

hey tcodeman, just wondering if you've had any joy compiling this for windows yet? This functionality would be great for a project I'm running right now but I'm a total noob when it comes to compiling dll's etc, any pointers would be appreciated. Ta.

ifrancis avatar Feb 16 '11 17:02 ifrancis

i am looking forward for your windoze-compatibility commits ;-)

Harvie avatar Feb 22 '11 01:02 Harvie

Ironically I myself have used this before on Ubuntu, but am stuck on Windows for the moment(intend to switch to Gentoo, but I'm waiting till I have 2 weeks of free time minimum in case something go goes wrong because of my silliness).

I'll give it a go on Windows XP and see if I can get it to work :)

mickcy avatar Feb 22 '11 14:02 mickcy

I kinda stopped working on this for a while to do some other stuff. I have set up the dev environment and compiled pidgin. I am gonna try to get the plugin compiled soon.

tgrosst avatar Feb 22 '11 15:02 tgrosst

I tried compiling it, but it ended in an error. This is my input:

$ make -f Makefile.mingw answerscripts.dll

and this is the output:

gcc.exe -O2 -Wall -Waggregate-return -Wcast-align -Wdeclaration-after-statement -Werror-implicit-fun ction-declaration -Wextra -Wno-sign-compare -Wno-unused-parameter -Winit-self -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wundef -pipe -mno-cygwin -mms-bitfields -g - DHAVE_CYRUS_SASL -DHAVE_CONFIG_H -DWIN32_LEAN_AND_MEAN -I../../../win32-dev/gtk_2_0-2.14/include -I. ./../../win32-dev/gtk_2_0-2.14/include/glib-2.0 -I../../../win32-dev/gtk_2_0-2.14/lib/glib-2.0/inclu de -I../.. -I../../libpurple -I../../libpurple/win32 -o answerscripts.dll.o -c answerscripts.c answerscripts.c:1:0: warning: "WIN32" redefined :0:0: note: this is the location of the previous definition answerscripts.c:41:5: warning: no previous prototype for 'answerscripts_process_message_cb' answerscripts.c: In function 'answerscripts_process_message_cb': answerscripts.c:44:2: warning: ISO C90 forbids mixed declarations and code answerscripts.c:49:17: error: 'EWOULDBLOCK' undeclared (first use in this function) answerscripts.c:49:17: note: each undeclared identifier is reported only once for each function it a ppears in answerscripts.c: In function 'received_im_msg_cb': answerscripts.c:64:2: warning: ISO C90 forbids mixed declarations and code answerscripts.c:87:2: warning: ISO C90 forbids mixed declarations and code answerscripts.c:94:2: warning: ISO C90 forbids mixed declarations and code answerscripts.c:102:2: warning: ISO C90 forbids mixed declarations and code answerscripts.c:106:3: error: implicit declaration of function 'purple_savedstatus_get_message' answerscripts.c:106:3: warning: nested extern declaration of 'purple_savedstatus_get_message' answerscripts.c:106:3: error: implicit declaration of function 'purple_savedstatus_get_current' answerscripts.c:106:3: warning: nested extern declaration of 'purple_savedstatus_get_current' answerscripts.c:110:2: error: implicit declaration of function 'setenv' answerscripts.c:110:2: warning: nested extern declaration of 'setenv' answerscripts.c:118:2: warning: ISO C90 forbids mixed declarations and code answerscripts.c: In function 'plugin_load': answerscripts.c:137:2: error: implicit declaration of function 'asprintf' answerscripts.c:137:2: warning: nested extern declaration of 'asprintf' answerscripts.c:138:2: warning: ISO C90 forbids mixed declarations and code make: *** [answerscripts.dll] Error 1

I am gonna look at the code later, but I did uncomment the #define WIN32 line mentioned above. Let me know if you guys can glean any useful info from the output.

tgrosst avatar Feb 22 '11 15:02 tgrosst

answerscripts.c:1:0: warning: "WIN32" redefined

means that you don't need to uncomment the first line when using your compiler :-)

answerscripts.c:137:2: error: implicit declaration of function 'asprintf'

some missing header file

answerscripts.c:44:2: warning: ISO C90 forbids mixed declarations and code

too pedantic options pased to gcc :-)

answerscripts.c:49:17: error: 'EWOLDBLOCK' undeclared (first use in this function)

compiler reached the section of code which can't be compiled on windows and has to be ported :-D (or you can try to compile plugin using cygwin :-)

Harvie avatar Feb 22 '11 18:02 Harvie

BTW how are you compiling it? I've tried some Pidgin BEF (build environment fetcher - google it) script that probably could download everything needed using cygwin. (but it think it does not build using cygwin, but i've not even started the build - my windows freezed, and i haven't any motivation to boot it again :-). anyway building using cygwin can be an option too until code is fixed...

Harvie avatar Jun 11 '11 21:06 Harvie

I just used cygwin and all the dependencies listed on the pidgin website. Haven't tried the BEF though, I just downloaded them manually. Haven't really done much with this lately, as I haven't needed it.

tgrosst avatar Jul 12 '11 20:07 tgrosst

Any progress? I don't use windows, but i'd like to hear if somebody was successful with building :-)

Harvie avatar Aug 22 '15 00:08 Harvie

Try again pls, it builds bit better now on linux. maybe it will be better on windows too.

Harvie avatar Nov 04 '15 22:11 Harvie

I really would like to use this plugin but i have problems to compile it on windows.

TomTheDragon avatar Dec 03 '15 23:12 TomTheDragon