Author Topic: Squirrel 3.1 and new bindings  (Read 22831 times)

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: Squirrel 3.1 and new bindings
« Reply #15 on: April 25, 2021, 06:08:34 am »
After manually creating "sdk_tests" sub folder these results on the third run.

Tim S.

Code
======= Test SDK function END ======= 

Global executed tests: 519
Global passed tests:   498
Global failed tests:   21
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: Squirrel 3.1 and new bindings
« Reply #16 on: April 25, 2021, 06:16:54 am »
Code
======= Test helpers BEGINN ======= 
Test: MakePath 0....................PASSED
[ERROR] Test: MakePath 1....................FAILED
[ERROR] got:    "path\name"
[ERROR] needed: "path/name "
[ERROR] Test: MakePath 2....................FAILED
[ERROR] got:    "path/\name"
[ERROR] needed: "path/name "
[ERROR] Test: MakeDir 0.....................FAILED
[ERROR] got:    "name\"
[ERROR] needed: "name/ "
[ERROR] Test: MakeDir 1.....................FAILED
[ERROR] got:    "name/\"
[ERROR] needed: "name/ "
[ERROR] Test: MakeDir 2.....................FAILED
[ERROR] got:    "path\name/\"
[ERROR] needed: "path/name/ "
[ERROR] Test: MakeDir 3.....................FAILED
[ERROR] got:    "path/\name/\"
[ERROR] needed: "path/name/ "

Executed tests: 7
passed tests:   1
failed tests:   6
======= Test helpers END =======

Code
[ERROR] Test: CompileTargetBase::GetOutputFilename......................................FAILED
[ERROR] got:    "NewProject.exe"
[ERROR] needed: "NewProject "
[ERROR] Test: CompileTargetBase::SuggestOutputFilename..................................FAILED
[ERROR] got:    "NewProject.exe"
[ERROR] needed: "NewProject "
[ERROR] Test: CompileTargetBase::SetOutputFilename......................................FAILED
[ERROR] got:    "debugOutput.exe"
[ERROR] needed: "debugOutput "
[ERROR] Test: CompileTargetBase::SuggestOutputFilename after set........................FAILED
[ERROR] got:    "NewProject.exe"
[ERROR] needed: "NewProject "

Code
[ERROR] Test: CompileTargetBase::GetExecutableFilename..................................FAILED
[ERROR] got:    "C:\Users\stahta01\AppData\Local\Temp\sdk_tests\NewProject.exe"
[ERROR] needed: "C:\Users\stahta01\AppData\Local\Temp\sdk_tests\NewProject "
[ERROR] Test: CompileTargetBase::GetDynamicLibFilename..................................FAILED
[ERROR] got:    "C:\Users\stahta01\AppData\Local\Temp\sdk_tests\NewProject.exe"
[ERROR] needed: "C:\Users\stahta01\AppData\Local\Temp\sdk_tests\NewProject "

Code
[ERROR] Test: cbProject::AddFile 2: weight..........FAILED
[ERROR] got:    50
[ERROR] needed: 17

Code
[ERROR] Test: cbProject::ExtensionListNodes root after 2....FAILED
[ERROR] got:    "//rootNode[0]"
[ERROR] needed: "/rootNode[0] "
[ERROR] Test: cbProject::ExtensionListNodes after addition..FAILED
[ERROR] got:    "rootNode[0]/child[0];rootNode[0]/multi[1];rootNode[0]/multi[2]"
[ERROR] needed: "rootNode[0]/child[0];rootNode[0]/multi[0];rootNode[0]/multi[1] "

Code
[ERROR] Test: cbProject::ExtensionRemoveNode multi 1....................FAILED
[ERROR] got:    "rootNode[0]/child[0];rootNode[0]/multi[1]"
[ERROR] needed: "rootNode[0]/child[0];rootNode[0]/multi[0] "

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5910
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Squirrel 3.1 and new bindings
« Reply #17 on: April 25, 2021, 06:22:58 am »
Code
From fcd586699f2330ee51d684945031252d7122c378 Mon Sep 17 00:00:00 2001
From: Tim Stahlhut <stahta01@gmail.com>
Date: Sat, 24 Apr 2021 11:47:24 -0400
Subject: Add define of EXPORT_LIB to Squirrel target

---
 src/CodeBlocks_wx31.cbp    | 1 +
 src/CodeBlocks_wx31_64.cbp | 1 +
 2 files changed, 2 insertions(+)

diff --git a/src/CodeBlocks_wx31.cbp b/src/CodeBlocks_wx31.cbp
index adfafe2aa..0652f4cf4 100644
--- a/src/CodeBlocks_wx31.cbp
+++ b/src/CodeBlocks_wx31.cbp
@@ -50,6 +50,7 @@
  <Option type="2" />
  <Option compiler="gcc" />
  <Compiler>
+ <Add option="-DEXPORT_LIB" />
  <Add directory="include/scripting/include" />
  </Compiler>
  </Target>
diff --git a/src/CodeBlocks_wx31_64.cbp b/src/CodeBlocks_wx31_64.cbp
index 16c775c76..6d31ed7d5 100644
--- a/src/CodeBlocks_wx31_64.cbp
+++ b/src/CodeBlocks_wx31_64.cbp
@@ -50,6 +50,7 @@
  <Option type="2" />
  <Option compiler="gcc" />
  <Compiler>
+ <Add option="-DEXPORT_LIB" />
  <Add directory="include/scripting/include" />
  </Compiler>
  </Target>
--
2.31.1.windows.1


Updated the patch file; I have only tested the 64 bit project and it builds without error.
I have yet to run the built binaries.

Tim S.

Hi, Tim, thanks, you patch fixes the build error on my 64bit Windows. I don't have 32bit GCC system right now.
And I see that I got the same test results as posted by you.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: Squirrel 3.1 and new bindings
« Reply #18 on: April 25, 2021, 05:44:42 pm »
My MinGW GCC 32 bit build fails on this line from scriptingmanager.cpp

Code
static_assert(sizeof(int64_t)==sizeof(SQInteger), "Incorrect setup of Squirrel!");

Tim S.

« Last Edit: April 25, 2021, 05:58:42 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Squirrel 3.1 and new bindings
« Reply #19 on: April 25, 2021, 06:00:08 pm »
My MinGW GCC 32 bit build fails on this line from scriptingmanager.cpp
What do you use to build project files or autotools?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Squirrel 3.1 and new bindings
« Reply #20 on: April 25, 2021, 06:06:37 pm »
In fact it should work fine if we change the comparison to >=. This is there to make sure that int64_t could take SQInteger values without loss of precision.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: Squirrel 3.1 and new bindings
« Reply #21 on: April 25, 2021, 10:11:18 pm »
My MinGW GCC 32 bit build fails on this line from scriptingmanager.cpp
What do you use to build project files or autotools?

CB Projects and MSys2 GCC.

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: Squirrel 3.1 and new bindings
« Reply #22 on: April 26, 2021, 01:53:23 am »
In fact it should work fine if we change the comparison to >=. This is there to make sure that int64_t could take SQInteger values without loss of precision.

Doing that did result in the core CB project building.

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Squirrel 3.1 and new bindings
« Reply #23 on: May 04, 2021, 07:29:12 pm »
I've pushed a new commit and the tests should behave the same as on linux (as much as it is possible).

Have anyone tried any wizard? Are there any problems to report?
I'm nearing completion of this feature and I'll push it to svn in the next weeks.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: Squirrel 3.1 and new bindings
« Reply #24 on: May 05, 2021, 01:00:23 am »
Nice work, could compile it right away on windows.

failed tests:
Code
[ERROR] Test: cbProject::AddFile 2: weight..........FAILED
[ERROR] got:    50
[ERROR] needed: 17
[ERROR] Test: cbProject::AddFile 2: weight..........FAILED
[ERROR] got:    50
[ERROR] needed: 17

[ERROR] Test: cbProject::ExtensionListNodes root after 2....FAILED
[ERROR] got:    "//rootNode[0]"
[ERROR] needed: "/rootNode[0] "
[ERROR] Test: cbProject::ExtensionListNodes after addition..FAILED
[ERROR] got:    "rootNode[0]/child[0];rootNode[0]/multi[1];rootNode[0]/multi[2]"
[ERROR] needed: "rootNode[0]/child[0];rootNode[0]/multi[0];rootNode[0]/multi[1] "
[ERROR] Test: cbProject::ExtensionRemoveNode multi 1....................FAILED
[ERROR] got:    "rootNode[0]/child[0];rootNode[0]/multi[1]"
[ERROR] needed: "rootNode[0]/child[0];rootNode[0]/multi[0] "

Also the "Allow this script for this session" permission is not working, it keeps asking for permissions (probably old bug)

I only use wxWidgets wizard and console project wizard, and both seem to work

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Squirrel 3.1 and new bindings
« Reply #25 on: May 05, 2021, 10:28:38 pm »
Thanks for testing. So next week would be push time...

The failures are expected and are bugs in the API. I'll take a look at some of them soon.
The permission/sandbox/access system is also totally broken and what you see is totally normal unfortunately. At the moment I don't intend to fix it, I've looked at this and I don't have the time required to untangle it. :(
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Squirrel 3.1 and new bindings
« Reply #26 on: May 09, 2021, 02:58:09 pm »
Pushed in both svn and git...
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline The_GTA

  • Multiple posting newcomer
  • *
  • Posts: 21
  • Developer & Entrepreneur
    • EirDev
Re: Squirrel 3.1 and new bindings
« Reply #27 on: May 11, 2021, 07:27:16 pm »
Thank you very much for your work on the project scripting system, oBFusCATed! While I have not yet tested this special Code::Blocks version I am very inclined to do so because most of my projects use the Squirrel based scripting system for inter-project static library dependency resolution! You see, scripting is the only way to apply build-time properties - including preprocessor definitions and when-existing static library inclusion - when they truly matter. In fact, I have even grown much experience of build-scripting and a fancy to writing these!

Thus let me share some of my experience with you. Maybe it can lead to a better scripting system design:

  • The _T syntax of scripts is very annoying. In the official Code::Blocks build forgetting to use the _T could even crash the entire IDE. Since you mention that the "==" should now just work, this makes me really happy. Please make use of strings as natural as possible.
  • How about adding a script function to add C/C++ preprocessor definitions into the compilation unit? After all, there is such an option in the IDE and it would be only natural to add a direct equivalent into the build scripting system. Having a direct function does also promote the idea of build script preprocessor definitions inspection, a well-needed addition to the existing #ifdef appliance check and color-highlighting features.

Looking forward to further developments! 👍

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Squirrel 3.1 and new bindings
« Reply #28 on: May 11, 2021, 07:44:20 pm »
  • The _T syntax of scripts is very annoying. In the official Code::Blocks build forgetting to use the _T could even crash the entire IDE. Since you mention that the "==" should now just work, this makes me really happy. Please make use of strings as natural as possible.
  • How about adding a script function to add C/C++ preprocessor definitions into the compilation unit? After all, there is such an option in the IDE and it would be only natural to add a direct equivalent into the build scripting system. Having a direct function does also promote the idea of build script preprocessor definitions inspection, a well-needed addition to the existing #ifdef appliance check and color-highlighting features.
1. Try the new version and tell me if something doesn't work. Keep in mind that string <->wxString casts aren't universal and might not work everywhere. But if there are crashes don't hesitate to report them. There is already a night build.
2. No idea what you're talking about. Please be more specific.

Looking forward to further developments! 👍
The only reason I've spend so much time on this is because the ond binding failed in closures, and I needed those to make debugger testing work. I hope to spend my time on something a bit more productive now.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: Squirrel 3.1 and new bindings
« Reply #29 on: May 18, 2021, 12:34:34 am »
Has someone tested the wxWidgets wizard on linux?
I have a problem, but i am not 100% sure if i have a broken installation or if it is a bug:
latest codeblocks trunk, linux mint 20
1) Create a new wxWidgets project
2) Name the project "test"
3) choose wxSmith as editor
4) finish the project

The generated source files have the name
Code
testApp.cpp
testApp.h
testMain.cpp
testMain.h

But the include is
Code
#include "TESTMain.h"
also the class is called
Code
TESTDialog
instead of
Code
testDialog
Now i get compilation errors about "TESTMain.h" not found


Afternote:
i have the same bug on windows, but because windows is case insensitive it does not trigger compilation error