News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

Squirrel 3.1 and new bindings

Started by oBFusCATed, April 16, 2021, 09:09:32 PM

Previous topic - Next topic

stahta01

After manually creating "sdk_tests" sub folder these results on the third run.

Tim S.


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

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

stahta01


======= 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 =======



[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 "



[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 "



[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] "


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

ollydbg

Quote from: stahta01 on April 24, 2021, 07:09:11 PM

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.

stahta01

#18
My MinGW GCC 32 bit build fails on this line from scriptingmanager.cpp

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


Tim S.

C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

oBFusCATed

Quote from: stahta01 on April 25, 2021, 05:44:42 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!]

oBFusCATed

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!]

stahta01

Quote from: oBFusCATed on April 25, 2021, 06:00:08 PM
Quote from: stahta01 on April 25, 2021, 05:44:42 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++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

stahta01

Quote from: oBFusCATed 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.

Doing that did result in the core CB project building.

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

oBFusCATed

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!]

BlueHazzard

Nice work, could compile it right away on windows.

failed tests:

[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

oBFusCATed

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!]

oBFusCATed

(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!]

The_GTA

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! 👍
Me on [url="//osdn.net"]OSDN.net[/url]: [url="https://osdn.net/users/quiret/"]https://osdn.net/users/quiret/[/url]

oBFusCATed

Quote from: The_GTA on May 11, 2021, 07:27:16 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.

Quote from: The_GTA on May 11, 2021, 07:27:16 PM
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!]

BlueHazzard

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

testApp.cpp
testApp.h
testMain.cpp
testMain.h


But the include is
#include "TESTMain.h"
also the class is called
TESTDialog
instead of
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