Share My Creation Automated Resource Hacker app exe changes

The attached small non-ui app automates everything described here:
It uses shell commands to make adjustments to the properties of the app.exe file that is created in the ...\temp\build\bin\ folder when the Standalone Package is built from within the B4J IDE, to make the correct app name, icon, & properties appear in Task Manager for example.

It has been tested on a few different apps but there may be adjustments needed when it's used with different JDK versions/locations. I make no guarantees that it will work everywhere out of the box.

Change the following Global Variables to suit your requirements:
B4X:
    Private RHPath As String = "C:\Program Files (x86)\Resource Hacker\ResourceHacker.exe"    'Set to path to Resource Hacker exe
    Private companyName="My Company Ltd" As String
    Private productName="My Product Name" As String
    Private appName="MyAppName" As String
    Private version="1.0.0.0" As String
    Private appDescription="My App's Description" As String
    Private exeFileFolder As String = "C:\B4JProjects\SourceCode\MyApp\Objects\temp\build\bin"    'Set to the folder containing the app's compiled release exe (...\Objects\temp\build\bin from your project folder)
    Private iconFile As String = "C:\B4JProjects\Icons\MyApp\MyApp.ico"

Then just run it through the B4J IDE.
The logs should tell you if anything doesn't work.

It relies on jShell, JavaObject and Resource Hacker needs to be installed.

(N.B. don't confuse this with the #PackagerProperty options that @Erel described here. This app changes the properties of the exe in the \temp\build\bin\ folder, @Erel's extra #PackagerProperty options alter the exe in ...\temp\build\)
 

Attachments

  • AppExeProperties.zip
    3 KB · Views: 6
Top