Announcement

Collapse
No announcement yet.

Automatic revisoning

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

  • Automatic revisoning

    After about one year of developing small and crappy NSIS scripts, I finally started to organize them in a logical structure.
    The first thing I suppose to deploy is a "EXE versioning system", that could tell me the build number of my script.
    Actually, I use a very simple build number (it's time-related: CrappyScript v.{YYMMDD}) that I set manually thru a !define directive.
    It's simple, i know, but for me is enough!

    I wonder if there is a simple method to gain the system date to set automatically the !define parameter (or to launch something via !system and get the output, maybe a NSIS script ) )...

  • #2
    You should check out this archive page and modify the function used there to suit your needs.

    Vytautas
    My NSIS Mods and Files

    Comment


    • #3
      It's already possible Grab the latest development version and use ${__DATE__}

      Comment


      • #4
        What do you mean with "latest development version"?
        Should I use a CVS snapshot or can I use a simple 2.0b3?

        Thanks a lot, Vytautas. I will try it anyway ....

        Comment


        • #5
          Vytautas' solution is for getting the date on run-time.

          You need to get the date on compile time, so you should use ${__DATE__}. You have to get the latest CVS version.

          Comment


          • #6
            Anyone knows how to compile a CVS snapshot without a C compiler ?
            Or, maybe, someome knows where could I download a binary CVS build?

            (Maybe a sticky topic on the forum "Latest CVS Binaries" will be useful...)

            Comment


            • #7
              The "nightly" CVS snapshot includes the binaries - I am using ${__DATE__} and all the other useful things like it even though I do not have a suitable C compiler. The VersionInformation feature is proving very useful.

              Comment


              • #8
                Ok... Obtained the "nightly" CVS...
                Is the ${__DATE__} function already documented? (I cannot find it on the documentation... maybe I'm blind )
                I never heard/seen anything about "VersionInformation". Maybe I've missed something about it?

                Comment


                • #9
                  It has been added a few weeks ago and has not been documented yet.

                  With the version information commands, you can add a version info resource (File Properties > Version tab).

                  Comment


                  • #10
                    Sorry for any confusion I caused, it was late and my brain was not functioning very well.

                    Vytautas
                    My NSIS Mods and Files

                    Comment


                    • #11
                      You're welcome, Vytautas.

                      Seems interesting... The version info commands, I mean.

                      The only thing I need is some documentation about ${__DATE__}.
                      I will wait until some documentation will be released.

                      Comment


                      • #12
                        Just for information, can I format ${__DATE__} contents to fit my needs (YYMMDD or YY.MM.DD) ?
                        Or maybe there is a method to pass the contents of a $n/$Rn variable to the !define statement (so I will do the dirty job with some crappy script snippet)?

                        Comment


                        • #13
                          NSIS uses your local date format to set ${__DATE__}. You can't set the format through NSIS. If you want to pass some variables as defines you can create a script that will compile your script calling to makensis with some command line arguments. /Ddefine_name=value will probably be the most useful one for this task.
                          NSIS FAQ | NSIS Home Page | Donate $
                          "I hear and I forget. I see and I remember. I do and I understand." -- Confucius

                          Comment


                          • #14
                            Originally posted by Joost Verburg
                            It has been added a few weeks ago and has not been documented yet.

                            With the version information commands, you can add a version info resource (File Properties > Version tab).
                            This would be in resource hacker yes?

                            -Stu

                            Comment


                            • #15
                              No, that's the whole point, you no longer need Resource Hacker to add it.
                              NSIS FAQ | NSIS Home Page | Donate $
                              "I hear and I forget. I see and I remember. I do and I understand." -- Confucius

                              Comment

                              Working...
                              X
                              😀
                              🥰
                              🤢
                              😎
                              😡
                              👍
                              👎