B4J Question Inno Setup not creating desktop shortcut properly

Mike1970

Well-Known Member
Licensed User
Longtime User
Hi everyone, it's the first time i'm using Inno Setup, in particular following this tutorial: https://www.b4x.com/android/forum/t...-way-to-distribute-standalone-ui-apps.117880/

I noticed that if I put spaces (or symbols like "_") in this variables:

B4X:
#define MyAppName "Name"
#define MyAppPublisher "Publisher"
#define MyAppExeName "Name.exe"

the installer create a "dummy" shortcut without icon that can't be clicked because the path is incorrect.

If i remove the spaces it works.

I tried also to put " around all the paths in the Inno Setup script but nothing changes

Thanks in advance
 

Dadaista

Active Member
Licensed User
Longtime User
inside file.iss:
AppName={#MyAppName}
AppVersion={#MyAppVersion}
AppVerName={#MyAppName}
VersionInfoVersion={#MyAppVersion}
AppPublisher={#MyAppPublisher}
DefaultDirName={commonpf}\{#MyAppName}
DefaultGroupName={#MyAppName}
OutputBaseFilename=SetUp-{#MyAppName}-{#MyAppVersion}
UninstallDisplayIcon={app}\{#MyAppExeName}
OutputDir=.
Compression=lzma
SolidCompression=yes
SetupIconFile=Objects\temp\icon.ico
ArchitecturesAllowed=x64
ArchitecturesInstallIn64BitMode=x64
DisableWelcomePage=no

[Tasks]
Name: desktopicon; Description: {cm:CreateDesktopIcon}; GroupDescription: {cm:AdditionalIcons}; Flags: unchecked

[Files]
Source: Objects\temp\build\*; DestDir: {app}; Flags: ignoreversion recursesubdirs createallsubdirs
; NOTE: Don't use "Flags: ignoreversion" on any shared system files

[Icons]
Name: {group}\{#MyAppName}; Filename: {app}\{#MyAppExeName}
Name: {commondesktop}\{#MyAppName}; Filename: {app}\{#MyAppExeName}; Tasks: desktopicon

[Run]
Filename: {app}\{#MyAppExeName}; Description: {cm:LaunchProgram,{#MyAppName}}; Flags: nowait postinstall skipifsilent
 
Upvote 0

TILogistic

Expert
Licensed User
Longtime User
very easy and much more:

and you can further optimize and customize the "iss" file generated by "Build Standalone Package"


Example the script posted by @Dadaista

1627154137295.png
 
Upvote 0
Top