Developer forums (C::B DEVELOPMENT STRICTLY!) > Development

Codeblocks ported to sqrat

<< < (8/11) > >>

stahta01:
FYI: For proper Windows PCH creation sdk.h needs moved to src.


--- Code: ---diff --git a/src/CodeBlocks.cbp b/src/CodeBlocks.cbp
index 1e6f409..090715d 100644
--- a/src/CodeBlocks.cbp
+++ b/src/CodeBlocks.cbp
@@ -1322,7 +1322,7 @@
  <Unit filename="include/sdk.h">
  <Option compile="1" />
  <Option weight="1" />
- <Option target="sdk" />
+ <Option target="src" />
  </Unit>
  <Unit filename="include/sdk_common.h">
  <Option target="sdk" />

--- End code ---

Tim S.

stahta01:
Patch to get Win32 wx30 cbp to build.


--- Code: ---diff --git a/src/CodeBlocks_wx30.cbp b/src/CodeBlocks_wx30.cbp
index 72a5a0e..aaf47e5 100644
--- a/src/CodeBlocks_wx30.cbp
+++ b/src/CodeBlocks_wx30.cbp
@@ -1154,6 +1154,9 @@
  <Unit filename="include/scripting/bindings/sq_wx/sq_wx_dialog.h">
  <Option target="sdk" />
  </Unit>
+ <Unit filename="include/scripting/bindings/sq_wx/sq_wx_propgrid.h">
+ <Option target="sdk" />
+ </Unit>
  <Unit filename="include/scripting/bindings/sq_wx/sq_wx_type_handler.h">
  <Option target="sdk" />
  </Unit>
@@ -3158,6 +3161,9 @@
  <Unit filename="sdk/scripting/bindings/sq_wx/sq_wx_base_controls.cpp">
  <Option target="sdk" />
  </Unit>
+ <Unit filename="sdk/scripting/bindings/sq_wx/sq_wx_propgrid.cpp">
+ <Option target="sdk" />
+ </Unit>
  <Unit filename="sdk/scripting/bindings/sq_wx/sq_wx_constants.cpp">
  <Option target="sdk" />
  </Unit>

--- End code ---

Tim S.

oBFusCATed:
@BlueHazzard:

What version of Squirrel are you using in this branch?
Also have you seen this problem:

--- Code: ---a<-_T("Test");
b<-_T("Test");
print(a==b); //<-- this one here prints false, instead of the expected true.

--- End code ---
?
If you have seen it, then have you solved it?
I can see that other people have reported this problem and it has not been fixed.
There is also a patch that modifies the VM, see here: http://forum.squirrel-lang.org/mainsite/forums/default.aspx?g=posts&m=4084#post4084

@devs: What do you think of applying this patch to our VM?

BlueHazzard:

--- Quote from: oBFusCATed on July 06, 2014, 02:34:07 am ---What version of Squirrel are you using in this branch?

--- End quote ---
At the moment i'm using 3.0.4, but i will update to 3.0.6 after Alberto (fagiano) will release his bugfix, becaues there are two (non common) bugs that hopefully will get fixed.


--- Quote from: oBFusCATed on July 06, 2014, 02:34:07 am ---Also have you seen this problem:

--- Code: ---a<-_T("Test");
b<-_T("Test");
print(a==b); //<-- this one here prints false, instead of the expected true.

--- End code ---

--- End quote ---
This is nor a bug nor a problem... This is how squirrel works with user pointers... You have to use a cmp function to compare the content of user pointers. In my version of the squirrel port this won't be a big problem, because you can work with native strings:


--- Code: ---a<-"Test";
b<-"Test";
print(a==b);

FunctionThatOnlyCanUseWxString(a); // This will work...

c <- wxString("fail");
d <- "faile";
print(c==d); // This won't work...

--- End code ---

It is not a intuitive thing, but if speed is what you want, this is the obvious way to deal with user pointers (and tables and strings and so on).
At the beginning i wanted to implement this patch, (or use the mingobad version of squirrel, because he has a few interesting features) but then i thought the base version of the language is used in a lot big projects, well tested and some kind of well maintained, so why use a patched untested version... I'm open for discussions on this...

In two weeks i will continue my work on this port...

greetings

oBFusCATed:
I know that according to fagiano it is not a bug, but a feature.
But as far as I know C::B doesn't care for scripting performance, game-developers care.
We want to have something that is easy to use and not surprising. And non-working operator== for our types is quite surprising thing.
In fact it silently works and returns false, it is not a runtime error or something like that!
I'd probably be fine if this was a runtime error, so we'll know when it fails to work.

Also in HEAD we have not exposed any compare function for wxString or any other class, I don't know about your branch.

p.s. Can your tests for scripting be extracted and committed with the HEAD version of squirrel and its binding (probably partially)?

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version