Skip to content

Commit ff849a3

Browse files
Created a new solution configuration for making screenshots
1 parent 5626a35 commit ff849a3

3 files changed

Lines changed: 18 additions & 2 deletions

File tree

TerrariaBackup.sln

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,14 @@ Global
66
GlobalSection(SolutionConfigurationPlatforms) = preSolution
77
Debug|Any CPU = Debug|Any CPU
88
Release|Any CPU = Release|Any CPU
9+
GitHubScreenshot|Any CPU = GitHubScreenshot|Any CPU
910
EndGlobalSection
1011
GlobalSection(ProjectConfigurationPlatforms) = postSolution
1112
{2B48906E-E841-4817-AA23-60EBB14CAC28}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
1213
{2B48906E-E841-4817-AA23-60EBB14CAC28}.Debug|Any CPU.Build.0 = Debug|Any CPU
1314
{2B48906E-E841-4817-AA23-60EBB14CAC28}.Release|Any CPU.ActiveCfg = Release|Any CPU
1415
{2B48906E-E841-4817-AA23-60EBB14CAC28}.Release|Any CPU.Build.0 = Release|Any CPU
16+
{2B48906E-E841-4817-AA23-60EBB14CAC28}.GitHubScreenshot|Any CPU.ActiveCfg = GitHubScreenshot|Any CPU
17+
{2B48906E-E841-4817-AA23-60EBB14CAC28}.GitHubScreenshot|Any CPU.Build.0 = GitHubScreenshot|Any CPU
1518
EndGlobalSection
1619
EndGlobal

TerrariaBackup/MainWindow.xaml.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,10 @@ private void Window_OnLoaded(object sender, RoutedEventArgs e)
275275
{
276276
try
277277
{
278+
#if GITHUBSCREENSHOT
279+
TerrariaPathTextBox.Text = Constants.DefaultTerrariaPath.Replace(Environment.UserName, "user");
280+
BackupPathTextBox.Text = Constants.DefaultBackupPath.Replace(Environment.UserName, "user");
281+
#else
278282
if (Directory.Exists(Constants.DefaultTerrariaPath))
279283
{
280284
TerrariaPathTextBox.Text = Constants.DefaultTerrariaPath;
@@ -284,6 +288,7 @@ private void Window_OnLoaded(object sender, RoutedEventArgs e)
284288
{
285289
BackupPathTextBox.Text = Constants.DefaultBackupPath;
286290
}
291+
#endif
287292
}
288293
catch (Exception ex)
289294
{

TerrariaBackup/TerrariaBackup.csproj

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,22 @@
1717
<Company>JustChickNugget</Company>
1818
<Product>TerrariaBackup</Product>
1919
<Version>1.0.0</Version>
20+
<Configurations>Debug;Release;GitHubScreenshot</Configurations>
21+
<Platforms>AnyCPU</Platforms>
2022
</PropertyGroup>
2123

2224
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
2325
<DebugType>portable</DebugType>
2426
</PropertyGroup>
25-
27+
2628
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
27-
<DebugType>embedded</DebugType>
29+
<DebugType>embedded</DebugType>
30+
</PropertyGroup>
31+
32+
<PropertyGroup Condition=" '$(Configuration)' == 'GitHubScreenshot' ">
33+
<DebugSymbols>true</DebugSymbols>
34+
<DebugType>portable</DebugType>
35+
<Optimize>false</Optimize>
2836
</PropertyGroup>
2937

3038
</Project>

0 commit comments

Comments
 (0)