Updated installation script for v3

This commit is contained in:
Kwoth
2021-08-31 19:31:04 +02:00
parent f9e6891a3a
commit bbb8d191ab
3 changed files with 7 additions and 115 deletions

View File

@@ -1,7 +1,7 @@
#define sysfolder "system"
#define version GetEnv("NADEKOBOT_INSTALL_VERSION")
#define target "win7-x64"
#define platform "netcoreapp2.1"
#define platform "net5.0"
[Setup]
AppName = {param:botname|NadekoBot}
@@ -35,7 +35,7 @@ Source: "src\NadekoBot\bin\Release\{#platform}\{#target}\publish\*"; DestDir: "{
;reinstall - i want to copy all files, but i don't want to overwrite any data files because users will lose their customization if they don't have a backup,
; and i don't want them to have to backup and then copy-merge into data folder themselves, or lose their currency images due to overwrite.
Source: "src\NadekoBot\bin\Release\{#platform}\{#target}\publish\*"; DestDir: "{app}\{#sysfolder}"; Permissions: users-full; Flags: recursesubdirs ignoreversion onlyifdestfileexists createallsubdirs; Excludes: "*.pdb, *.db, data\*, credentials.json";
Source: "src\NadekoBot\bin\Release\{#platform}\{#target}\publish\*"; DestDir: "{app}\{#sysfolder}"; Permissions: users-full; Flags: recursesubdirs ignoreversion onlyifdestfileexists createallsubdirs; Excludes: "*.pdb, *.db, data\*, credentials.json, creds.yml";
Source: "src\NadekoBot\bin\Release\{#platform}\{#target}\publish\data\*"; DestDir: "{app}\{#sysfolder}\data"; Permissions: users-full; Flags: recursesubdirs onlyifdoesntexist createallsubdirs;
; overwrite strings and aliases
Source: "src\NadekoBot\bin\Release\{#platform}\{#target}\publish\data\aliases.yml"; DestDir: "{app}\{#sysfolder}\data\"; Permissions: users-full; Flags: recursesubdirs ignoreversion onlyifdestfileexists createallsubdirs;
@@ -48,12 +48,12 @@ Name:"{app}\{#sysfolder}"; Permissions: everyone-modify
; [Run]
; Filename: "http://nadekobot.readthedocs.io/en/latest/jsons-explained/"; Flags: postinstall shellexec runasoriginaluser; Description: "Open setup guide"
; Filename: "{app}\{#sysfolder}\credentials.json"; Flags: postinstall shellexec runasoriginaluser; Description: "Open credentials file"
; Filename: "{app}\{#sysfolder}\creds.yml"; Flags: postinstall shellexec runasoriginaluser; Description: "Open creds file"
[Icons]
; for pretty install directory
Name: "{app}\NadekoBot"; Filename: "{app}\{#sysfolder}\NadekoBot.exe"; IconFilename: "{app}\{#sysfolder}\nadeko_icon.ico"
Name: "{app}\credentials"; Filename: "{app}\{#sysfolder}\credentials.json"
Name: "{app}\creds"; Filename: "{app}\{#sysfolder}\creds.yml"
Name: "{app}\data"; Filename: "{app}\{#sysfolder}\data"
; desktop shortcut
@@ -69,7 +69,7 @@ procedure CurStepChanged(CurStep: TSetupStep);
begin
if (CurStep = ssPostInstall) then
begin
if FileExists(GetFileName('credentials_example.json')) and not FileExists(GetFileName('credentials.json')) then
RenameFile(GetFileName('credentials_example.json'), GetFileName('credentials.json'));
if FileExists(GetFileName('creds_example.yml')) and not FileExists(GetFileName('creds.yml')) then
RenameFile(GetFileName('creds_example.yml'), GetFileName('creds.yml'));
end;
end;