VMware Cloud Community
clairealex7
Enthusiast
Enthusiast

Change the name of executables produced in cdrom builds

Hello,

When I build my project as a cdrom, the executable for windows-x64 is called setup-windows-x64.exe. Is there a way to customize it? I cannot find the variable that sets it.

Thank you!

Claire

0 Kudos
5 Replies
michieldhont_
Hot Shot
Hot Shot

Hi @clairealex7 ,

You could change the name in the postBuildActionList using <renameFile>:

<postBuildActionList>
 
    <renameFile>
       <destination>${installbuilder_output_directory}/new-name</destination>
       <origin>${installbuilder_output_filename}</origin>
   </renameFile>   

</postBuildActionList>

Would that work for you?

Regards,

Michiel

0 Kudos
clairealex7
Enthusiast
Enthusiast

Yes I can try this, hoping this is run before signing the installer. Thank you!

Claire

0 Kudos
gongomgra
VMware Employee
VMware Employee

Hi @clairealex7 ,

Thanks for your message. Please let us know if it worked for you.

0 Kudos
clairealex7
Enthusiast
Enthusiast

Hello, no it does not work. I tried multiple combinations. The one that actually worked is:

<postBuildActionList>
<renameFile>
<destination>${project.outputDirectory}/${project.cdromDirectory}/formasetup.exe</destination>
<origin>${installbuilder_output_filename}</origin>
</renameFile>
</postBuildActionList>

and it does rename the file, but I get the following error when building:

Final executable creation step
Installer placed at C:/Repos/forma-suite-installer/Forma.Installer.VMware/UnityForma-1.0-Trial/setup-windows-x64.exe
Installer size: 7041131 bytes
Executing post build actions
Build Complete
Executing post build actions
No origin file found that matched C:/Repos/forma-suite-installer/Forma.Installer.VMware/UnityForma-1.0-Trial/setup-windows-x64.exe
Build time: 20 seconds
Build failed!

 

clairealex7_0-1627399428199.png

 

And this is before testing if the file would be signed after the renaming, which I believe will not happen.

So I ended up renaming the file in the build script and signing it externally with signtool.

Thank you!

Claire

0 Kudos
gongomgra
VMware Employee
VMware Employee

Hi @clairealex7 ,

Sorry for the delay. I think using the signtool externally is a good solution for your use case. Thank you for sharing your solution with our community!

0 Kudos