Announcement

Collapse
No announcement yet.

Favor to ask

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    Right, I couldn't stand the fact the dll was so big so I made it work without using STD and I went back to C. (Source should just be a drop in replacement for the example plugin)

    DLL size has gone from 283KB to 8.5KB.

    I don't think anything else has changed.
    Attached Files
    count!last.fmplanner

    Comment


    • #17
      your previous test script gave me this:

      code:
      101111001100000110000Ûôv0.T
      Completed

      and it doesn't work in pimpbot anymore (gives me 000000000000000000000Ûôv0.T as result)
      NSIS IDE for Atom | NSIS for Visual Studio Code | NSIS for Sublime Text | NSIS.docset

      Comment


      • #18
        Hmm okay, I think I know what would cause that and I've added a fix in the attached version.
        Checks if the path given ends with a / or \, and appends one if not.
        I couldn't find any other way to make it spit out all zeros.

        I hope that fixes the issue. :S
        Attached Files
        count!last.fmplanner

        Comment


        • #19
          working again!
          NSIS IDE for Atom | NSIS for Visual Studio Code | NSIS for Sublime Text | NSIS.docset

          Comment


          • #20
            i guess it's more difficult to build something like this for texer images, videos or gvm files?
            NSIS IDE for Atom | NSIS for Visual Studio Code | NSIS for Sublime Text | NSIS.docset

            Comment


            • #21
              You want a program that goes through all the presets and checks for .bmp, .avi and .gvm files?
              Or you'd like it to list the required file names? (I guess it would need to ignore the default texer images)

              I would need to see if I can alter the binary search code, so it can find the extension and then find the first null byte before it and use that as the file name -- which is easier said than done for me, probably.

              I'm not sure how to return a list like that to NSIS, which I assume is the end goal here.
              Doing it as a comma separated string could easily be way too long.
              Can a plugin just keep pushing strings to the stack?
              count!last.fmplanner

              Comment


              • #22
                Originally Posted by QOAL View Post
                You want a program that goes through all the presets and checks for .bmp, .avi and .gvm files?

                right now i guess the most annoying part is creating installers for presets and you don't know which files they require. so scanning them and copying the bitmaps etc. automatically would really be a timesaver.

                I would need to see if I can alter the binary search code, so it can find the extension and then find the first null byte before it and use that as the file name -- which is easier said than done for me, probably.
                i guess it might be difficult, but maybe it helps matching that up with the files existing in the avs directory.

                I'm not sure how to return a list like that to NSIS, which I assume is the end goal here.
                Doing it as a comma separated string could easily be way too long.
                Can a plugin just keep pushing strings to the stack?
                i'm not sure which is the best way, but unless it's too slow i'd be okay with a solution per preset using a loop within nsis. i'd then have to decide whether i filter out duplicate files before copying them or if i don't care as those files are small anyway.

                if you want to discuss this on chat let me know, i'm on about ever instant messaging service there is. just dm me your contact.
                NSIS IDE for Atom | NSIS for Visual Studio Code | NSIS for Sublime Text | NSIS.docset

                Comment


                • #23
                  Okay so...

                  I have made progress / might of hit a hole in one with this.

                  Usage is like so:
                  avsresources::listresources "$1\avs\QOAL\" "$1\avs\"
                  ${Do}
                  Pop $R0
                  DetailPrint $R0
                  ${LoopUntil} ${Errors}

                  First parameter: Dir to search for AVS in
                  Second parameter: Resource dir

                  Each string you pop contains the name of a filename, verified to exist, relative to the resource dir passed.

                  Apparently as a plugin, you can just keep on pushing strings, which you can then just pop off in a while loop. (Which does work with 1000's of strings, hooray)
                  Of course, I can also output the file names to a text file too. (Disabled right now)

                  Couple of things that I noticed while doing this:
                  One APE prepends(?) the bitmap file name with ð?, rather than NULL (Removed internally)
                  Lots of possibly old references to files are left in presets, leading to the plugin finding lots of names that have the start cut off. (All files are checked to see if they exist, and are otherwise ignored)

                  The attached zip contains avsresources.dll and a test.nsi (change the plugin path in it!)
                  The plugin is large this time as I used some STL stuff (Vector stuff), to hold the list of files, so it can be checked for dupes during the scan.

                  Hopefully this post makes (some) sense!

                  Edit:
                  Just realised that having it check the passed dir for the resource files is a bit silly, and probably only works correctly on a main AVS dir. I'll have to add a second parameter?
                  Also: The file extensions it looks for are: .gvm, .GVM, .bmp, .BMP, .avi and .AVI
                  Edit 2:
                  Updated the plugin with a second parameter for the resource dir and updated the post.
                  Attached Files
                  count!last.fmplanner

                  Comment


                  • #24
                    Dum de dum...

                    So... why have two separate plugins when you can have just the one?!

                    Function names have changed, and a new one has been added for a laugh, please see attached.
                    I also made it so it checks for presets ending in .AVS along with the previous .avs.

                    (Contains complied DLL, source and an example nsi file)
                    Attached Files
                    count!last.fmplanner

                    Comment


                    • #25
                      doesnt work for me, all it does is creating an empty textfile. my next question wouldve been whether this scans recursively? if not, could you add another parameter for that?

                      edit: my post was regarding the first version, have to test the new one

                      edit2: avstools is now listing resources and already works recursively - nice!
                      NSIS IDE for Atom | NSIS for Visual Studio Code | NSIS for Sublime Text | NSIS.docset

                      Comment


                      • #26
                        Yeah, I only noticed this morning that what I posted yesterday had the code to check parameters for trailing slashes (and append one if not) removed by accident - and it had spitting out to a file still enabled. Whoops!

                        But what a difference a day makes.

                        The apesniffer in AVS tools should, hopefully, return a string that is as long as the number of APEs (before it was 32 chars, which probably contained memory from other stuff at the end)

                        And yes, everything is recursive.
                        count!last.fmplanner

                        Comment


                        • #27
                          uploaded a first beta using your plugin
                          NSIS IDE for Atom | NSIS for Visual Studio Code | NSIS for Sublime Text | NSIS.docset

                          Comment


                          • #28
                            Originally Posted by QOAL View Post
                            Also: The file extensions it looks for are: .gvm, .GVM, .bmp, .BMP, .avi and .AVI
                            maybe you could add JPG and SVP (yes, i know). i haven't really run into presets using JPEGs, but since the option is available in both APEs and PimpBot, it would be a good addition. i think i'm only support the JPG extension, not JPE or JPEG.
                            NSIS IDE for Atom | NSIS for Visual Studio Code | NSIS for Sublime Text | NSIS.docset

                            Comment


                            • #29
                              Here we go:
                              Attached Files
                              count!last.fmplanner

                              Comment


                              • #30
                                i've tested avstools on a couple of scenarios and it's not always working. to reproduce my problem, download this file and put the resource files in your avs directory.

                                avs 1
                                detects only the bitmaps in the texer, texer 2, picture and picture 2 preset. i've also added two presets using videos and two more using the svp/uvs loader (i didn't know until know the svp plugin also handles uvs files, never heard of those).

                                avs 2
                                contains a preset using a picture, but although present in my avs directory, the bitmap never gets detected (the picture effect worked in my first example).
                                NSIS IDE for Atom | NSIS for Visual Studio Code | NSIS for Sublime Text | NSIS.docset

                                Comment

                                Working...
                                X