1
0
mirror of https://github.com/chylex/TweetDuck.git synced 2025-05-21 14:34:09 +02:00

Fuck you and your stupid cmd line MS

This commit is contained in:
chylex 2017-05-24 13:20:41 +02:00
parent b9b9193222
commit 9f415b11b5
2 changed files with 12 additions and 2 deletions
Configuration
bld

View File

@ -40,7 +40,7 @@ public static CommandLineArgs GetCurrentForInstaller(){
} }
public static string GetCurrentForInstallerCmd(){ public static string GetCurrentForInstallerCmd(){
return GetCurrentForInstaller().ToString().Replace("\"", "^\""); return GetCurrentForInstaller().ToString().Replace("\"", "::");
} }
} }
} }

View File

@ -47,7 +47,7 @@ Source: "..\bin\x86\Release\*"; DestDir: "{app}"; Flags: ignoreversion recursesu
Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Check: TDIsUninstallable Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Check: TDIsUninstallable
[Run] [Run]
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Parameters: "{param:RUNARGS}"; Flags: nowait postinstall shellexec Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Parameters: "{code:TDGetRunArgs}"; Flags: nowait postinstall shellexec
[InstallDelete] [InstallDelete]
Type: files; Name: "{app}\*.xml" Type: files; Name: "{app}\*.xml"
@ -69,6 +69,7 @@ Type: filesandordirs; Name: "{localappdata}\{#MyAppName}\GPUCache"
[Code] [Code]
function TDIsUninstallable: Boolean; forward; function TDIsUninstallable: Boolean; forward;
function TDGetRunArgs(Param: String): String; forward;
function TDFindUpdatePath: String; forward; function TDFindUpdatePath: String; forward;
function TDGetNetFrameworkVersion: Cardinal; forward; function TDGetNetFrameworkVersion: Cardinal; forward;
function TDGetAppVersionClean: String; forward; function TDGetAppVersionClean: String; forward;
@ -164,6 +165,15 @@ begin
Result := not IsPortable Result := not IsPortable
end; end;
{ Returns a string used for arguments when running the app after update. }
function TDGetRunArgs(Param: String): String;
var Args: String;
begin
Args := ExpandConstant('{param:RUNARGS}')
StringChangeEx(Args, '::', '"', True)
Result := Args
end;
{ Returns a validated installation path (including trailing backslash) using the /UPDATEPATH parameter or installation info in registry. Returns empty string on failure. } { Returns a validated installation path (including trailing backslash) using the /UPDATEPATH parameter or installation info in registry. Returns empty string on failure. }
function TDFindUpdatePath: String; function TDFindUpdatePath: String;
var Path: String; var Path: String;