Reply to Thread

Post a reply to the thread: Change output [EXENAME] dynamically

Your Message

Click here to log in

What's the name of our main installation product (in uppercase letters), directly followed by the current year?

 

You may choose an icon for your message from this list

Additional Options

  • Will turn www.example.com into [URL]http://www.example.com[/URL].

Topic Review (Newest First)

  • 09-07-2017, 12:21 PM
    linder

    Re: Change output [EXENAME] dynamically

    Perfect! Thanks for the update.

    Friedrich
  • 09-07-2017, 10:48 AM
    CleanFacets

    Re: Change output [EXENAME] dynamically

    Thank you very much for the suggestions.
    Since we use a resource file and set the File Version and Product Version for each build, it worked out perfectly to use the Value From Resouce example.
  • 09-07-2017, 05:07 AM
    linder

    Re: Change output [EXENAME] dynamically

    Carl,

    my first idea was to use this built-in feature:

    http://www.lindersoft.com/forums/sho...-Build-Numbers

    But you are not using a "standard" version numbering format, so this can't be used here. It would create "Setup0.0.0.2.exe" instead of your "Setup002.exe" format.

    Here is another possible method, but it does not fit your needs:

    http://www.lindersoft.com/forums/sho...installer-name

    By the way, your DLL technique did not work because %NEWBUILDNAME% is a runtime variable. This is only available when you run the setup.exe and is not valid when you compile a setup.exe.

    I have developed a helper application with SetupBuilder for you. I have uploaded both the helper source code and the demo project to:

    http://www.lindersoft.com/projects/A...ementSetup.zip

    The non-elevated running helper application ("increment.exe") is called from your main project and auto increments the build number when you compile the project. The last build number is stored in the "build.txt" ASCII text file.

    See attached screenshots.

    1. Add the Lines 16-18 from the "setup_build_demo.sbp" project file to your main project.

    2. Set the "Executable Name [EXENAME]" in your main project (General Information -> Product Properties) to setup[MY_SETUP_BUILD].exe

    3. Copy the "increment.exe" helper application to the same folder where your main project .sbp file is located.

    4. Compile your project.

    Does this help?

    Friedrich
  • 09-06-2017, 11:41 AM
    CleanFacets

    Change output [EXENAME] dynamically

    We need to automatically assign the output executable to include a version within the filename.
    For example: compile the .sbp and generate Setup001.exe. Then when we have a new version run the compiler again and generate Setup002.exe.

    I added the ability to call a dll which generates a new filename with the version embeded in it where my local variable %NEWBUILDNAME% contains the characters 'Setup003.exe'

    Then, use that variable to assign it to [EXENAME] so the compiler generates a dynamically named setup file.
    If my outputdir was C:\Temp\ and [EXENAME] was set to %NEWBUILDNAME%, the filename ends up being:
    C:\Temp\%NEWBUILDNAME instead of using the value within the variable.

    I have even tried #copy and #rename set with Process After Script Compilation and it is the same result.

    Thanks in advance.
    Carl

Posting Permissions

  • You may post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts
  •