[#59] Documents: Move Documents install folder from ProgramData to Program Files
All checks were successful
Test / Run tests (push) Successful in 2m19s
All checks were successful
Test / Run tests (push) Successful in 2m19s
This commit is contained in:
@ -29,6 +29,9 @@ namespace Elwig {
|
|||||||
public static readonly string MailsPath = Path.Combine(DataPath, "mails");
|
public static readonly string MailsPath = Path.Combine(DataPath, "mails");
|
||||||
public static readonly string ConfigPath = Path.Combine(DataPath, "config.ini");
|
public static readonly string ConfigPath = Path.Combine(DataPath, "config.ini");
|
||||||
public static readonly string ExePath = @"C:\Program Files\Elwig\";
|
public static readonly string ExePath = @"C:\Program Files\Elwig\";
|
||||||
|
public static readonly string DocumentsPath = (Assembly.GetEntryAssembly()?.Location.Contains(@"\bin\") ?? false) ?
|
||||||
|
Path.Combine(Assembly.GetEntryAssembly()!.Location.Split(@"\bin\")[0], "../Elwig/Documents") :
|
||||||
|
Path.Combine(ExePath, "resources/Documents");
|
||||||
public static readonly string TempPath = Path.Combine(Path.GetTempPath(), "Elwig");
|
public static readonly string TempPath = Path.Combine(Path.GetTempPath(), "Elwig");
|
||||||
|
|
||||||
public static Config Config { get; private set; } = new(ConfigPath);
|
public static Config Config { get; private set; } = new(ConfigPath);
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
@inherits TemplatePage<Elwig.Documents.BusinessDocument>
|
@inherits TemplatePage<Elwig.Documents.BusinessDocument>
|
||||||
@model Elwig.Documents.BusinessDocument
|
@model Elwig.Documents.BusinessDocument
|
||||||
@{ Layout = "Document"; }
|
@{ Layout = "Document"; }
|
||||||
<link rel="stylesheet" href="file:///@Raw(Model.DataPath)\resources\BusinessDocument.css"/>
|
<link rel="stylesheet" href="file:///@Raw(Model.DocumentsPath)\BusinessDocument.css"/>
|
||||||
<div class="info-wrapper">
|
<div class="info-wrapper">
|
||||||
<div class="address-wrapper">
|
<div class="address-wrapper">
|
||||||
<div class="sender">
|
<div class="sender">
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
@inherits TemplatePage<Elwig.Documents.CreditNote>
|
@inherits TemplatePage<Elwig.Documents.CreditNote>
|
||||||
@model Elwig.Documents.CreditNote
|
@model Elwig.Documents.CreditNote
|
||||||
@{ Layout = "BusinessDocument"; }
|
@{ Layout = "BusinessDocument"; }
|
||||||
<link rel="stylesheet" href="file:///@Raw(Model.DataPath)\resources\CreditNote.css"/>
|
<link rel="stylesheet" href="file:///@Raw(Model.DocumentsPath)\CreditNote.css" />
|
||||||
<main>
|
<main>
|
||||||
<h1>@Model.Title</h1>
|
<h1>@Model.Title</h1>
|
||||||
<table class="credit">
|
<table class="credit">
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
@inherits TemplatePage<Elwig.Documents.DeliveryAncmtList>
|
@inherits TemplatePage<Elwig.Documents.DeliveryAncmtList>
|
||||||
@model Elwig.Documents.DeliveryAncmtList
|
@model Elwig.Documents.DeliveryAncmtList
|
||||||
@{ Layout = "Document"; }
|
@{ Layout = "Document"; }
|
||||||
<link rel="stylesheet" href="file:///@Raw(Model.DataPath)\resources\DeliveryAncmtList.css" />
|
<link rel="stylesheet" href="file:///@Raw(Model.DocumentsPath)\DeliveryAncmtList.css" />
|
||||||
<main>
|
<main>
|
||||||
<h1>Anmeldeliste</h1>
|
<h1>Anmeldeliste</h1>
|
||||||
<h2>@Model.Filter</h2>
|
<h2>@Model.Filter</h2>
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
@inherits TemplatePage<Elwig.Documents.DeliveryConfirmation>
|
@inherits TemplatePage<Elwig.Documents.DeliveryConfirmation>
|
||||||
@model Elwig.Documents.DeliveryConfirmation
|
@model Elwig.Documents.DeliveryConfirmation
|
||||||
@{ Layout = "BusinessDocument"; }
|
@{ Layout = "BusinessDocument"; }
|
||||||
<link rel="stylesheet" href="file:///@Raw(Model.DataPath)\resources\DeliveryConfirmation.css"/>
|
<link rel="stylesheet" href="file:///@Raw(Model.DocumentsPath)\DeliveryConfirmation.css" />
|
||||||
<main>
|
<main>
|
||||||
<h1>@Model.Title</h1>
|
<h1>@Model.Title</h1>
|
||||||
<table class="delivery-confirmation">
|
<table class="delivery-confirmation">
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
@inherits TemplatePage<Elwig.Documents.DeliveryDepreciationList>
|
@inherits TemplatePage<Elwig.Documents.DeliveryDepreciationList>
|
||||||
@model Elwig.Documents.DeliveryDepreciationList
|
@model Elwig.Documents.DeliveryDepreciationList
|
||||||
@{ Layout = "Document"; }
|
@{ Layout = "Document"; }
|
||||||
<link rel="stylesheet" href="file:///@Raw(Model.DataPath)\resources\DeliveryDepreciationList.css" />
|
<link rel="stylesheet" href="file:///@Raw(Model.DocumentsPath)\DeliveryDepreciationList.css" />
|
||||||
<main>
|
<main>
|
||||||
<h1>Abwertungsliste</h1>
|
<h1>Abwertungsliste</h1>
|
||||||
<h2>@Model.Filter</h2>
|
<h2>@Model.Filter</h2>
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
@inherits TemplatePage<Elwig.Documents.DeliveryJournal>
|
@inherits TemplatePage<Elwig.Documents.DeliveryJournal>
|
||||||
@model Elwig.Documents.DeliveryJournal
|
@model Elwig.Documents.DeliveryJournal
|
||||||
@{ Layout = "Document"; }
|
@{ Layout = "Document"; }
|
||||||
<link rel="stylesheet" href="file:///@Raw(Model.DataPath)\resources\DeliveryJournal.css"/>
|
<link rel="stylesheet" href="file:///@Raw(Model.DocumentsPath)\DeliveryJournal.css"/>
|
||||||
<main>
|
<main>
|
||||||
<h1>Lieferjournal</h1>
|
<h1>Lieferjournal</h1>
|
||||||
<h2>@Model.Filter</h2>
|
<h2>@Model.Filter</h2>
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
@inherits TemplatePage<Elwig.Documents.DeliveryNote>
|
@inherits TemplatePage<Elwig.Documents.DeliveryNote>
|
||||||
@model Elwig.Documents.DeliveryNote
|
@model Elwig.Documents.DeliveryNote
|
||||||
@{ Layout = "BusinessDocument"; }
|
@{ Layout = "BusinessDocument"; }
|
||||||
<link rel="stylesheet" href="file:///@Raw(Model.DataPath)\resources\DeliveryNote.css" />
|
<link rel="stylesheet" href="file:///@Raw(Model.DocumentsPath)\DeliveryNote.css" />
|
||||||
<main>
|
<main>
|
||||||
<h1>@Model.Title</h1>
|
<h1>@Model.Title</h1>
|
||||||
<table class="delivery large">
|
<table class="delivery large">
|
||||||
|
@ -23,7 +23,7 @@ namespace Elwig.Documents {
|
|||||||
public bool ShowFoldMarks = App.Config.Debug;
|
public bool ShowFoldMarks = App.Config.Debug;
|
||||||
public bool DoublePaged = false;
|
public bool DoublePaged = false;
|
||||||
|
|
||||||
public string DataPath;
|
public string DocumentsPath;
|
||||||
public int CurrentNextSeason;
|
public int CurrentNextSeason;
|
||||||
public string? DocumentId;
|
public string? DocumentId;
|
||||||
public string Title;
|
public string Title;
|
||||||
@ -34,7 +34,7 @@ namespace Elwig.Documents {
|
|||||||
|
|
||||||
public Document(string title) {
|
public Document(string title) {
|
||||||
var c = App.Client;
|
var c = App.Client;
|
||||||
DataPath = App.DataPath;
|
DocumentsPath = App.DocumentsPath;
|
||||||
CurrentNextSeason = Utils.CurrentNextSeason;
|
CurrentNextSeason = Utils.CurrentNextSeason;
|
||||||
Title = title;
|
Title = title;
|
||||||
Author = c.NameFull;
|
Author = c.NameFull;
|
||||||
|
@ -7,9 +7,9 @@
|
|||||||
<title>@Model.Title</title>
|
<title>@Model.Title</title>
|
||||||
<meta name="author" value="@Model.Author"/>
|
<meta name="author" value="@Model.Author"/>
|
||||||
<meta charset="UTF-8"/>
|
<meta charset="UTF-8"/>
|
||||||
<link rel="stylesheet" href="file:///@Raw(Model.DataPath)\resources\Document.css"/>
|
<link rel="stylesheet" href="file:///@Raw(Model.DocumentsPath)\Document.css" />
|
||||||
<link rel="stylesheet" href="file:///@Raw(Model.DataPath)\resources\Document.Page.css"/>
|
<link rel="stylesheet" href="file:///@Raw(Model.DocumentsPath)\Document.Page.css" />
|
||||||
<link rel="stylesheet" href="file:///@Raw(Model.DataPath)\resources\Document.Table.css"/>
|
<link rel="stylesheet" href="file:///@Raw(Model.DocumentsPath)\Document.Table.css" />
|
||||||
@if (Model.DoublePaged) {
|
@if (Model.DoublePaged) {
|
||||||
<style>
|
<style>
|
||||||
@@page :left {
|
@@page :left {
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
@inherits TemplatePage<Elwig.Documents.MemberDataSheet>
|
@inherits TemplatePage<Elwig.Documents.MemberDataSheet>
|
||||||
@model Elwig.Documents.MemberDataSheet
|
@model Elwig.Documents.MemberDataSheet
|
||||||
@{ Layout = "BusinessDocument"; }
|
@{ Layout = "BusinessDocument"; }
|
||||||
<link rel="stylesheet" href="file:///@Raw(Model.DataPath)\resources\MemberDataSheet.css" />
|
<link rel="stylesheet" href="file:///@Raw(Model.DocumentsPath)\MemberDataSheet.css" />
|
||||||
<main>
|
<main>
|
||||||
<h1>@Model.Title</h1>
|
<h1>@Model.Title</h1>
|
||||||
<table class="member border">
|
<table class="member border">
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
@inherits TemplatePage<Elwig.Documents.MemberList>
|
@inherits TemplatePage<Elwig.Documents.MemberList>
|
||||||
@model Elwig.Documents.MemberList
|
@model Elwig.Documents.MemberList
|
||||||
@{ Layout = "Document"; }
|
@{ Layout = "Document"; }
|
||||||
<link rel="stylesheet" href="file:///@Raw(Model.DataPath)\resources\MemberList.css"/>
|
<link rel="stylesheet" href="file:///@Raw(Model.DocumentsPath)\MemberList.css" />
|
||||||
<main>
|
<main>
|
||||||
<h1>Mitgliederliste</h1>
|
<h1>Mitgliederliste</h1>
|
||||||
<h2>@Model.Filter</h2>
|
<h2>@Model.Filter</h2>
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
@inherits TemplatePage<Elwig.Documents.PaymentVariantSummary>
|
@inherits TemplatePage<Elwig.Documents.PaymentVariantSummary>
|
||||||
@model Elwig.Documents.PaymentVariantSummary
|
@model Elwig.Documents.PaymentVariantSummary
|
||||||
@{ Layout = "Document"; }
|
@{ Layout = "Document"; }
|
||||||
<link rel="stylesheet" href="file:///@Raw(Model.DataPath)\resources\PaymentVariantSummary.css" />
|
<link rel="stylesheet" href="file:///@Raw(Model.DocumentsPath)\PaymentVariantSummary.css" />
|
||||||
<main>
|
<main>
|
||||||
<h1>Auszahlungsvariante Lese @Model.Variant.Year</h1>
|
<h1>Auszahlungsvariante Lese @Model.Variant.Year</h1>
|
||||||
<h2>@Model.Variant.Name</h2>
|
<h2>@Model.Variant.Name</h2>
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
@inherits TemplatePage<Elwig.Documents.WineQualityStatistics>
|
@inherits TemplatePage<Elwig.Documents.WineQualityStatistics>
|
||||||
@model Elwig.Documents.WineQualityStatistics
|
@model Elwig.Documents.WineQualityStatistics
|
||||||
@{ Layout = "Document"; }
|
@{ Layout = "Document"; }
|
||||||
<link rel="stylesheet" href="file:///@Raw(Model.DataPath)\resources\WineQualityStatistics.css"/>
|
<link rel="stylesheet" href="file:///@Raw(Model.DocumentsPath)\WineQualityStatistics.css" />
|
||||||
<main>
|
<main>
|
||||||
<h1>Qualitätsstatistik</h1>
|
<h1>Qualitätsstatistik</h1>
|
||||||
<h2>@Model.Filter</h2>
|
<h2>@Model.Filter</h2>
|
||||||
|
@ -20,10 +20,6 @@
|
|||||||
<EmbeddedResource Include="Resources\Sql\*" />
|
<EmbeddedResource Include="Resources\Sql\*" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<Target Name="PreBuild" BeforeTargets="PreBuildEvent">
|
|
||||||
<Exec Command="call fetch-resources.bat" />
|
|
||||||
</Target>
|
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.4.0" />
|
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.4.0" />
|
||||||
<PackageReference Include="LinqKit" Version="1.3.8" />
|
<PackageReference Include="LinqKit" Version="1.3.8" />
|
||||||
|
@ -10,7 +10,7 @@ namespace Elwig.Helpers.Printing {
|
|||||||
|
|
||||||
public static async Task Init(Action? evtHandler = null) {
|
public static async Task Init(Action? evtHandler = null) {
|
||||||
var e = new RazorLightEngineBuilder()
|
var e = new RazorLightEngineBuilder()
|
||||||
.UseFileSystemProject(App.DataPath + "resources")
|
.UseFileSystemProject(App.DocumentsPath)
|
||||||
.UseMemoryCachingProvider()
|
.UseMemoryCachingProvider()
|
||||||
.Build();
|
.Build();
|
||||||
|
|
||||||
|
@ -1,5 +0,0 @@
|
|||||||
::mkdir "C:\Program Files\Elwig"
|
|
||||||
mkdir "C:\ProgramData\Elwig\resources"
|
|
||||||
copy /b /y Documents\*.css "C:\ProgramData\Elwig\resources"
|
|
||||||
copy /b /y Documents\*.cshtml "C:\ProgramData\Elwig\resources"
|
|
||||||
::copy /b /y ..\Installer\Files\*.exe "C:\Program Files\Elwig\"
|
|
@ -1,23 +1,26 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
|
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<!-- C:\Program Files (x86)\Elwig oder C:\Program Files\Elwig -->
|
<!-- C:\Program Files (x86)\Elwig oder C:\Program Files\Elwig -->
|
||||||
<StandardDirectory Id="ProgramFiles64Folder">
|
<StandardDirectory Id="ProgramFiles64Folder">
|
||||||
<Directory Id="InstallFolder" Name="!(bind.Property.ProductName)" />
|
<Directory Id="InstallFolder" Name="!(bind.Property.ProductName)">
|
||||||
|
<Directory Id="InstallFolderResources" Name="resources">
|
||||||
|
<Directory Id="InstallFolderDocuments" Name="Documents" />
|
||||||
|
</Directory>
|
||||||
|
</Directory>
|
||||||
</StandardDirectory>
|
</StandardDirectory>
|
||||||
|
|
||||||
<!-- C:\ProgramData\Elwig -->
|
<!-- C:\ProgramData\Elwig -->
|
||||||
<StandardDirectory Id="CommonAppDataFolder">
|
<StandardDirectory Id="CommonAppDataFolder">
|
||||||
<Directory Id="ConfigFolder" Name="!(bind.Property.ProductName)">
|
<Directory Id="ConfigFolder" Name="!(bind.Property.ProductName)" />
|
||||||
<Directory Id="ConfigFolderResources" Name="resources" />
|
</StandardDirectory>
|
||||||
</Directory>
|
|
||||||
</StandardDirectory>
|
<!-- C:\ProgramData\Microsoft\Windows\Start Menu\Programs -->
|
||||||
|
<StandardDirectory Id="ProgramMenuFolder">
|
||||||
<!-- C:\ProgramData\Microsoft\Windows\Start Menu\Programs -->
|
<Directory Id="StartMenuProgramsFolder" Name="!(bind.Property.ProductName)" />
|
||||||
<StandardDirectory Id="ProgramMenuFolder">
|
</StandardDirectory>
|
||||||
<Directory Id="StartMenuProgramsFolder" Name="!(bind.Property.ProductName)" />
|
|
||||||
</StandardDirectory>
|
<!-- C:\Users\{USERNAME}\Desktop -->
|
||||||
|
<StandardDirectory Id="DesktopFolder" />
|
||||||
<!-- C:\Users{USERNAME}\Desktop -->
|
|
||||||
<StandardDirectory Id="DesktopFolder" />
|
|
||||||
</Fragment>
|
</Fragment>
|
||||||
</Wix>
|
</Wix>
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
|
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<ComponentGroup Id="HeatComponents">
|
<ComponentGroup Id="HeatComponents">
|
||||||
<Files Directory="InstallFolder" Include="..\Elwig\bin\Publish\**">
|
<Files Directory="InstallFolder" Include="..\Elwig\bin\Publish\**">
|
||||||
<Exclude Files="..\Elwig\bin\Publish\**.exe" />
|
<Exclude Files="..\Elwig\bin\Publish\**.exe" />
|
||||||
<Exclude Files="..\Elwig\bin\Publish\**.pdb" />
|
<Exclude Files="..\Elwig\bin\Publish\**.pdb" />
|
||||||
</Files>
|
</Files>
|
||||||
<Files Directory="ConfigFolderResources" Include="..\Elwig\Documents\**">
|
<Files Directory="InstallFolderDocuments" Include="..\Elwig\Documents\**">
|
||||||
<Exclude Files="..\Elwig\Documents\**.cs" />
|
<Exclude Files="..\Elwig\Documents\**.cs" />
|
||||||
</Files>
|
</Files>
|
||||||
</ComponentGroup>
|
</ComponentGroup>
|
||||||
</Fragment>
|
</Fragment>
|
||||||
</Wix>
|
</Wix>
|
||||||
|
Reference in New Issue
Block a user