Menu

#900 Update for plugin script

Next_Nightly
pending
Patch
2019-12-14
2019-12-03
bluehazzard
No

This patch will update the wizard script for the codeblocks plugin template.
This adds the 31_64 bit target on windows
Add a dummy xrc file so it does not trigger an assert on loading codeblocks, because no valid xrc file could be found in the zip archive

This patch should be in conjunction with

Index: src/sdk/scripting/bindings/sc_wxtypes.cpp
===================================================================
--- src/sdk/scripting/bindings/sc_wxtypes.cpp   (revision 11914)
+++ src/sdk/scripting/bindings/sc_wxtypes.cpp   (working copy)
@@ -136,7 +136,7 @@
         if (sa.GetType(2) == OT_INTEGER)
         {
 #ifdef _SQ64
-            result.Printf(_T("%s%ld"), str1.c_str(), sa.GetInt(2));
+            result.Printf(_T("%s%lld"), str1.c_str(), sa.GetInt(2));
 #else
             result.Printf(_T("%s%d"), str1.c_str(), sa.GetInt(2));
 #endif

that fixes an assert on running the script on 64 bit in windows.
A review would be nice before i can commit it

1 Attachments

Discussion

  • Teodor Petrov

    Teodor Petrov - 2019-12-04
    1. I don't see a reason for a dummy xrc. Just comment the loading line, if someone needs it then he/she can uncomment it.
    2. What is the purpose of all these targets. Currently the only supported thing on windows is wx31_64. Everything else is a waste of time (except for wx31, but who knows).
    3. The inline patch is wrong. 64bit ints have type long on linux (search for "LP64 wiki" if you don't believe me).
     
  • bluehazzard

    bluehazzard - 2019-12-06

    The inline patch is wrong. 64bit ints have type long on linux (search for "LP64 wiki" if you don't believe me).

    and here you told me to use %lld.....
    http://forums.codeblocks.org/index.php/topic,23596.0.html

    I don't see a reason for a dummy xrc. Just comment the loading line, if someone needs it then he/she can uncomment it.

    The dummy is needed if you want to load resources from the zip, but you do not use any xrc resource. See https://github.com/bluehazzard/cbSystemView Also allows this dummy to be a template for other resource files. So you have not to create the zip command in the post progess for yourself....

    What is the purpose of all these targets. Currently the only supported thing on windows is wx31_64. Everything else is a waste of time (except for wx31, but who knows).

    The project files are still there... But we can remove them (the targets), no problem....

    [edit:] Formating, more details

     

    Last edit: bluehazzard 2019-12-06
    • Teodor Petrov

      Teodor Petrov - 2019-12-07

      The dummy is needed if you want to load resources from the zip, but you do not use any xrc resource.

      This is not true. See the thread search pluign. It has a zip file with images, but doesn't have a xrc file in it. You can just skip the resource loading command and then use 'path/to/file.zip#zip:path/in/zip.png' or something similar.

      About project files, I'd leave only wx31_64 and wx31 for windows if I were you.

       
  • bluehazzard

    bluehazzard - 2019-12-14

    Ok, here is a new script version. It is a bit more flexible to handle things.

    I really would like to keep the dummy... It would allow to keep the zip command. (if there is no file then zip gives an error, at least on windows.) Keeping the command would simplify adding resources (only copy it to the res folder).

    [Edit: add diff patch]

     

    Last edit: bluehazzard 2019-12-15

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.