Skip to content
This repository has been archived by the owner on Jul 23, 2019. It is now read-only.

Commit

Permalink
取消模块加载与打包
Browse files Browse the repository at this point in the history
  • Loading branch information
huoyaoyuan committed Dec 13, 2017
1 parent da4b0c7 commit e753166
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 21 deletions.
10 changes: 1 addition & 9 deletions AdmiralRoom/Composition/ModuleHost.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,7 @@ internal class ModuleHost
{
private ModuleHost()
{
var a = new AssemblyCatalog(Assembly.GetExecutingAssembly());
ComposablePartCatalog catalog;
try
{
var d = new DirectoryCatalog("modules");
catalog = new AggregateCatalog(a, d);
}
catch { catalog = a; }
container = new CompositionContainer(catalog);
container = new CompositionContainer(new AssemblyCatalog(Assembly.GetExecutingAssembly()));
container.ComposeParts(this);
}
public static ModuleHost Instance { get; } = new ModuleHost();
Expand Down
12 changes: 0 additions & 12 deletions packaging/package.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ function Main

$exeSource = 'AdmiralRoom.exe'

$modules = 'Akashi', 'MasterDataViewer', 'Ranking', 'RawApiViewer'

if (-not(Test-Path $bin))
{
throw 'Script detected as locate in invalid path exception!! Make sure exist in <AdmiralRoom repository root>\packaging\'
Expand All @@ -32,16 +30,6 @@ function Main

Copy-StrictedFilterFileWithDirectoryStructure -Path $(Join-Path $bin $target) -Destination '.\' -Targets $targetKeywords -Exclude $ignoreKeywords #-ChildFolders $childFolders

$moduleDir = [System.IO.Path]::Combine('.\', $target, 'Modules')
New-Item $moduleDir -ItemType Directory

foreach ($module in $modules)
{
$moduleFile = $module+'.dll'
$modulePath = [System.IO.Path]::Combine('..\Modules\', $module, 'bin', $target, $moduleFile)
Copy-Item $modulePath -Destination $(Join-Path $moduleDir $moduleFile)
}

# valid path check
$versionSource = Join-Path $target $exeSource -Resolve

Expand Down

0 comments on commit e753166

Please sign in to comment.