mirror of
https://github.com/danbulant/Cosmos
synced 2026-05-27 05:52:11 +00:00
Programatically get ApplicationData path
Inno Setup {userappdata} always points to C:\
This commit is contained in:
parent
0ba4f6c418
commit
cf56bb9eec
2 changed files with 7 additions and 2 deletions
|
|
@ -15,6 +15,10 @@
|
||||||
#define VSVersion "vs2019"
|
#define VSVersion "vs2019"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef RealPath
|
||||||
|
#define RealPath {userappdata}
|
||||||
|
#endif
|
||||||
|
|
||||||
#if BuildConfiguration == "DevKit"
|
#if BuildConfiguration == "DevKit"
|
||||||
; devkit releases are not compressed
|
; devkit releases are not compressed
|
||||||
#pragma warning "Building Dev Kit release"
|
#pragma warning "Building Dev Kit release"
|
||||||
|
|
@ -36,7 +40,7 @@ AppSupportURL=http://www.goCosmos.org/
|
||||||
AppUpdatesURL=http://www.goCosmos.org/
|
AppUpdatesURL=http://www.goCosmos.org/
|
||||||
AppVersion={#ChangeSetVersion}
|
AppVersion={#ChangeSetVersion}
|
||||||
SetupMutex=CosmosSetupMutexName,Global\CosmoSetupMutexName
|
SetupMutex=CosmosSetupMutexName,Global\CosmoSetupMutexName
|
||||||
DefaultDirName={userappdata}\Cosmos User Kit
|
DefaultDirName={#RealPath}\Cosmos User Kit
|
||||||
DefaultGroupName=Cosmos User Kit
|
DefaultGroupName=Cosmos User Kit
|
||||||
OutputDir=.\Setup\Output
|
OutputDir=.\Setup\Output
|
||||||
OutputBaseFilename=CosmosUserKit-{#ChangeSetVersion}-{#VSVersion}
|
OutputBaseFilename=CosmosUserKit-{#ChangeSetVersion}-{#VSVersion}
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,8 @@ namespace Cosmos.Build.Builder.BuildTasks
|
||||||
_defines = new Dictionary<string, string>()
|
_defines = new Dictionary<string, string>()
|
||||||
{
|
{
|
||||||
["BuildConfiguration"] = configuration,
|
["BuildConfiguration"] = configuration,
|
||||||
["ChangeSetVersion"] = releaseVersion
|
["ChangeSetVersion"] = releaseVersion,
|
||||||
|
["RealPath"] = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData)
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue