feat: load legacy Cuts and Res runtime assets
This commit is contained in:
@@ -23,9 +23,55 @@
|
||||
<ApplicationDisplayVersion>0.1.0</ApplicationDisplayVersion>
|
||||
<ApplicationVersion>1</ApplicationVersion>
|
||||
<Version>0.1.0</Version>
|
||||
<!--
|
||||
Keep the legacy runtime assets outside this repository while reproducing the
|
||||
original executable-folder layout. Override this property at build time when
|
||||
the read-only MBN_STOCK_N checkout is in a different location:
|
||||
/p:LegacyRuntimeSourceRoot="D:\path\to\MBN_STOCK_N\bin\Debug"
|
||||
-->
|
||||
<LegacyRuntimeSourceRoot Condition="'$(LegacyRuntimeSourceRoot)' == ''">$(MSBuildProjectDirectory)\..\..\..\MBN_STOCK_N\MBN_STOCK_N\bin\Debug</LegacyRuntimeSourceRoot>
|
||||
<LegacyRuntimeSourceRoot>$([System.IO.Path]::GetFullPath('$(LegacyRuntimeSourceRoot)'))</LegacyRuntimeSourceRoot>
|
||||
<LegacyCutsSourceRoot>$(LegacyRuntimeSourceRoot)\Cuts</LegacyCutsSourceRoot>
|
||||
<LegacyResSourceRoot>$(LegacyRuntimeSourceRoot)\Res</LegacyResSourceRoot>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<!-- Explicit allowlist: these legacy Res assets contain UI/menu data only. -->
|
||||
<LegacyPackagedResAsset Include="$(LegacyResSourceRoot)\a.png" />
|
||||
<LegacyPackagedResAsset Include="$(LegacyResSourceRoot)\aa.png" />
|
||||
<LegacyPackagedResAsset Include="$(LegacyResSourceRoot)\dot.png" />
|
||||
<LegacyPackagedResAsset Include="$(LegacyResSourceRoot)\Find_16x16.png" />
|
||||
<LegacyPackagedResAsset Include="$(LegacyResSourceRoot)\Find_32x32.png" />
|
||||
<LegacyPackagedResAsset Include="$(LegacyResSourceRoot)\green.png" />
|
||||
<LegacyPackagedResAsset Include="$(LegacyResSourceRoot)\Grow.bmp" />
|
||||
<LegacyPackagedResAsset Include="$(LegacyResSourceRoot)\logo.png" />
|
||||
<LegacyPackagedResAsset Include="$(LegacyResSourceRoot)\MmoneyCoder.ico" />
|
||||
<LegacyPackagedResAsset Include="$(LegacyResSourceRoot)\MoveDown_16x16.png" />
|
||||
<LegacyPackagedResAsset Include="$(LegacyResSourceRoot)\MoveUp_16x16.png" />
|
||||
<LegacyPackagedResAsset Include="$(LegacyResSourceRoot)\P.png" />
|
||||
<LegacyPackagedResAsset Include="$(LegacyResSourceRoot)\pie.bmp" />
|
||||
<LegacyPackagedResAsset Include="$(LegacyResSourceRoot)\Preview.png" />
|
||||
<LegacyPackagedResAsset Include="$(LegacyResSourceRoot)\pro#00083.png" />
|
||||
<LegacyPackagedResAsset Include="$(LegacyResSourceRoot)\profit.bmp" />
|
||||
<LegacyPackagedResAsset Include="$(LegacyResSourceRoot)\red.png" />
|
||||
<LegacyPackagedResAsset Include="$(LegacyResSourceRoot)\sample_1.png" />
|
||||
<LegacyPackagedResAsset Include="$(LegacyResSourceRoot)\sell.bmp" />
|
||||
<LegacyPackagedResAsset Include="$(LegacyResSourceRoot)\setup.ini" />
|
||||
<LegacyPackagedResAsset Include="$(LegacyResSourceRoot)\t.png" />
|
||||
<LegacyPackagedResAsset Include="$(LegacyResSourceRoot)\VRIPNG.png" />
|
||||
<LegacyPackagedResAsset Include="$(LegacyResSourceRoot)\기타.ini" />
|
||||
<LegacyPackagedResAsset Include="$(LegacyResSourceRoot)\업종.ini" />
|
||||
<LegacyPackagedResAsset Include="$(LegacyResSourceRoot)\업종_코스닥.ini" />
|
||||
<LegacyPackagedResAsset Include="$(LegacyResSourceRoot)\업종_코스피.ini" />
|
||||
<LegacyPackagedResAsset Include="$(LegacyResSourceRoot)\종목.ini" />
|
||||
<LegacyPackagedResAsset Include="$(LegacyResSourceRoot)\종목_0111.ini" />
|
||||
<LegacyPackagedResAsset Include="$(LegacyResSourceRoot)\종목비교.ini" />
|
||||
<LegacyPackagedResAsset Include="$(LegacyResSourceRoot)\지수.ini" />
|
||||
<LegacyPackagedResAsset Include="$(LegacyResSourceRoot)\지수_0318.ini" />
|
||||
<LegacyPackagedResAsset Include="$(LegacyResSourceRoot)\지수_250401.ini" />
|
||||
<LegacyPackagedResAsset Include="$(LegacyResSourceRoot)\해외.ini" />
|
||||
<LegacyPackagedResAsset Include="$(LegacyResSourceRoot)\환율.ini" />
|
||||
|
||||
<Compile Include="..\..\LegacySceneRuntimeFactory.cs"
|
||||
Link="Runtime\LegacySceneRuntimeFactory.cs" />
|
||||
<Content Include="..\..\Assets\LockScreenLogo.scale-200.png" Link="Assets\LockScreenLogo.scale-200.png" />
|
||||
@@ -39,9 +85,99 @@
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
|
||||
</Content>
|
||||
<Content Include="$(LegacyCutsSourceRoot)\**\*">
|
||||
<Link>Cuts\%(RecursiveDir)%(Filename)%(Extension)</Link>
|
||||
<TargetPath>Cuts\%(RecursiveDir)%(Filename)%(Extension)</TargetPath>
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
|
||||
</Content>
|
||||
<Content Include="@(LegacyPackagedResAsset)">
|
||||
<Link>Res\%(Filename)%(Extension)</Link>
|
||||
<TargetPath>Res\%(Filename)%(Extension)</TargetPath>
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
|
||||
</Content>
|
||||
<!--
|
||||
The active legacy DB INI contains credentials. It is available beside the
|
||||
executable for local F5/unpackaged development only and is never MSIX Content.
|
||||
Historical copies, backups, archives and afiedt.buf.txt are not included at all.
|
||||
-->
|
||||
<Manifest Include="$(ApplicationManifest)" />
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="ValidateLegacyRuntimeAssets" BeforeTargets="PrepareForBuild">
|
||||
<Error Condition="!Exists('$(LegacyRuntimeSourceRoot)')"
|
||||
Text="Legacy runtime source root was not found: $(LegacyRuntimeSourceRoot). Set /p:LegacyRuntimeSourceRoot to the read-only MBN_STOCK_N bin\Debug directory." />
|
||||
<Error Condition="!Exists('$(LegacyCutsSourceRoot)')"
|
||||
Text="Legacy Cuts source directory was not found: $(LegacyCutsSourceRoot)." />
|
||||
<Error Condition="!Exists('$(LegacyResSourceRoot)')"
|
||||
Text="Legacy Res source directory was not found: $(LegacyResSourceRoot)." />
|
||||
<Error Condition="!Exists('$(LegacyCutsSourceRoot)\5001.t2s')"
|
||||
Text="The required legacy scene file Cuts\5001.t2s is missing from $(LegacyRuntimeSourceRoot)." />
|
||||
<Error Condition="'$(GenerateAppxPackageOnBuild)' != 'true' and
|
||||
'$(PublishAppxPackage)' != 'true' and
|
||||
!Exists('$(LegacyResSourceRoot)\MmoneyCoder.ini')"
|
||||
Text="The required legacy database settings file Res\MmoneyCoder.ini is missing from $(LegacyRuntimeSourceRoot)." />
|
||||
<Error Condition="!Exists('$(LegacyResSourceRoot)\종목.ini')"
|
||||
Text="The required legacy stock menu file Res\종목.ini is missing from $(LegacyRuntimeSourceRoot)." />
|
||||
<Error Condition="!Exists('$(LegacyResSourceRoot)\업종_코스피.ini')"
|
||||
Text="The required legacy KOSPI industry menu file Res\업종_코스피.ini is missing from $(LegacyRuntimeSourceRoot)." />
|
||||
<Error Condition="!Exists('$(LegacyResSourceRoot)\업종_코스닥.ini')"
|
||||
Text="The required legacy KOSDAQ industry menu file Res\업종_코스닥.ini is missing from $(LegacyRuntimeSourceRoot)." />
|
||||
<Error Condition="!Exists('$(LegacyResSourceRoot)\해외.ini')"
|
||||
Text="The required legacy overseas menu file Res\해외.ini is missing from $(LegacyRuntimeSourceRoot)." />
|
||||
<Error Condition="!Exists('$(LegacyResSourceRoot)\환율.ini')"
|
||||
Text="The required legacy exchange menu file Res\환율.ini is missing from $(LegacyRuntimeSourceRoot)." />
|
||||
<Error Condition="!Exists('$(LegacyResSourceRoot)\지수.ini')"
|
||||
Text="The required legacy index menu file Res\지수.ini is missing from $(LegacyRuntimeSourceRoot)." />
|
||||
</Target>
|
||||
|
||||
<!--
|
||||
Do not declare the credential-bearing INI as Content, None, or another item
|
||||
harvested by PackagingOutputs. The MSIX tooling harvests every
|
||||
CopyToOutputDirectory item into its loose-package recipe, even when
|
||||
GenerateAppxPackageOnBuild is false. This post-build copy provides the original
|
||||
executable-relative layout only for ordinary local output. The CPS-only
|
||||
up-to-date items below are not package payload candidates.
|
||||
-->
|
||||
<ItemGroup>
|
||||
<!-- These CPS-only items participate in Visual Studio's fast up-to-date check. -->
|
||||
<UpToDateCheckInput Include="$(LegacyResSourceRoot)\MmoneyCoder.ini" />
|
||||
<UpToDateCheckBuilt Include="$(TargetDir)Res\MmoneyCoder.ini" />
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="CopyLegacyDatabaseIniToLocalOutput"
|
||||
AfterTargets="Build"
|
||||
Inputs="$(LegacyResSourceRoot)\MmoneyCoder.ini"
|
||||
Outputs="$(TargetDir)Res\MmoneyCoder.ini"
|
||||
Condition="'$(GenerateAppxPackageOnBuild)' != 'true' and '$(PublishAppxPackage)' != 'true'">
|
||||
<MakeDir Directories="$(TargetDir)Res" />
|
||||
<Copy SourceFiles="$(LegacyResSourceRoot)\MmoneyCoder.ini"
|
||||
DestinationFiles="$(TargetDir)Res\MmoneyCoder.ini"
|
||||
SkipUnchangedFiles="true" />
|
||||
<ItemGroup>
|
||||
<FileWrites Include="$(TargetDir)Res\MmoneyCoder.ini" />
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
|
||||
<!-- The credential-bearing local development copy must not survive Clean. -->
|
||||
<Target Name="RemoveLegacyDatabaseIniFromLocalOutput"
|
||||
BeforeTargets="Clean">
|
||||
<Delete Files="$(TargetDir)Res\MmoneyCoder.ini"
|
||||
Condition="Exists('$(TargetDir)Res\MmoneyCoder.ini')" />
|
||||
</Target>
|
||||
|
||||
<Target Name="RejectLegacyDatabaseIniFromPackagePayload"
|
||||
BeforeTargets="_ComputeAppxPackagePayload">
|
||||
<ItemGroup>
|
||||
<_ForbiddenLegacyDatabasePackagePayload Include="@(PackagingOutputs)"
|
||||
Condition="'%(PackagingOutputs.TargetPath)' == 'Res\MmoneyCoder.ini' or
|
||||
'%(PackagingOutputs.TargetPath)' == 'Res/MmoneyCoder.ini'" />
|
||||
</ItemGroup>
|
||||
<Error Condition="'@(_ForbiddenLegacyDatabasePackagePayload)' != ''"
|
||||
Text="Credential-bearing Res\MmoneyCoder.ini must never enter an MSIX payload or package recipe." />
|
||||
</Target>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.8.260317003" />
|
||||
<PackageReference Include="Microsoft.Web.WebView2" Version="1.0.3967.48" />
|
||||
|
||||
Reference in New Issue
Block a user