On Wed, 01 Mar 2006 04:02:41 -0500, Jason E Katz-Brown wrote:
> On Wed, 2006-03-01 at 00:16 +0100, Anand Buddhdev wrote:
>
>> Jason E Katz-Brown wrote:
>>
>>> Quackle didn't use wstring and friends until about two months ago
>>> when
>>> I got rid of the english-centricness of libquackle and enabled
>>> support
>>> for any language that can be represented with unicode. It would be
>>> straightforward to provide a way to disable wstring, because any
>>> English-language games wouldn't be affected. I can do this with much
>>> less effort than y'all making super-cool live cd's :-) So I will try
>>> to when I feel like it; I'll feel like it soon. Then Quackle will run
>>> natively on Windows if no other snags come up.
>>>
>> I think this might be a good idea. If you add an ifdef...endif check to
>> include wstring only if it is present, and define a macro called
>> WSTRING, and replace all occurrences of wstring with this macro, then
>> we'd have a way of compiling it under Linux as well as Windows,
>> assuming there are no other issues with MinGW.
>>
> er, yeah, except it's about 43 times harder than that :-)
>
> But, despite the extreme crapulosity of that, I'm done! Update, and
> comment out
>
> #define QUACKLE_USE_WCHAR_FOR_USER_VISIBLE
>
> in quackle/uv.h and there should be no wchar_t/wstring usage anymore.
> There is a problem with strings in the UI starting to get twice as big
> as they should be. recursively. which is a really big problem. But it
> should work somewhat!
>
> Please let me know if Quackle still does not compile on Windows.
>
> thanks!
> Jason
Good news. I've gotten everything to compile and link under Windows with
the wstring stuff in place (and also without...but I'm finding no
difference between the two in terms of serious bugs).
Right now, quackletest crashes immediately on startup...I've not
investigated. The quackle interface itself seems to function (with minor,
but very noticeable issues with the string handling of player names). The
engine doesn't seem to be working. A simulation of a perfectly reasonable
rack suggests about 10 different exchanges, and the computer never plays
(probably for the same reason). And pressing the Commit button results in
a crash.
Nothing investigated further cause it's way past time for me to go to bed.
In summary, building with wstring support required a number of tweaks to
the build system. Without wstring support required very few tweaks...most
significantly, I had to replace some backslashes with forward slashes in
various pathname specifications in the QT-generated makefiles. Odd, since
I would have expected QT to generate makefiles that work out of the box.
But it's not hard to do.
Aside from that, I have had to make three source code changes to get mingw
to compile (the first two were only required to use STLport to get wstrings
to work). They are...
C:\quackle>cvs diff alphabetparameters.h quacker/quacker.cpp
Index: alphabetparameters.h
===================================================================
RCS file: /cvsroot/quackle/quackle/alphabetparameters.h,v
retrieving revision 1.3
diff -r1.3 alphabetparameters.h
90c90
< return *(--letterString.end());
---
> return *(letterString.end() - 1);
95c95
< letterString.erase(--letterString.end());
---
> letterString.erase(letterString.end() - 1);
Index: quacker/quacker.cpp
===================================================================
RCS file: /cvsroot/quackle/quackle/quacker/quacker.cpp,v
retrieving revision 1.5
diff -r1.5 quacker.cpp
30a31
> #include <algorithm>
I may not look at this again until the weekend. If anybody else wants to
try to replicate this and go further, the non-wstring case should be pretty
easy to set up given the info I've already provided. The wstring case
requires a number of detailed steps which I won't go into right now.
Sincerely,
John Fultz
[EMAIL PROTECTED]
User Interface Group
Wolfram Research, Inc.
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/quackle/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/