Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
jobily
SteamTools
提交
f3ea23f2
S
SteamTools
项目概览
jobily
/
SteamTools
9 个月 前同步成功
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
SteamTools
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
f3ea23f2
编写于
8月 10, 2023
作者:
A
Aigio Liu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
🔥
Remove Com Ref
上级
4d4dbfb2
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
55 addition
and
28 deletion
+55
-28
ref/Interop.IWshRuntimeLibrary.dll
ref/Interop.IWshRuntimeLibrary.dll
+0
-0
src/BD.WTTS.Client.Tools.Publish/Commands/IDotNetPublishCommand.cs
...TS.Client.Tools.Publish/Commands/IDotNetPublishCommand.cs
+2
-2
src/BD.WTTS.Client.Tools.Publish/Helpers/DotNetCLIHelper.cs
src/BD.WTTS.Client.Tools.Publish/Helpers/DotNetCLIHelper.cs
+1
-13
src/BD.WTTS.Client.Tools.Publish/Helpers/MSIXHelper.cs
src/BD.WTTS.Client.Tools.Publish/Helpers/MSIXHelper.cs
+4
-4
src/BD.WTTS.Client.Tools.Publish/Helpers/ObfuscarHelper.cs
src/BD.WTTS.Client.Tools.Publish/Helpers/ObfuscarHelper.cs
+6
-2
src/BD.WTTS.Client.Tools.Publish/Helpers/ProcessHelper.cs
src/BD.WTTS.Client.Tools.Publish/Helpers/ProcessHelper.cs
+17
-0
src/BD.WTTS.Client/BD.WTTS.Client.csproj
src/BD.WTTS.Client/BD.WTTS.Client.csproj
+5
-2
src/BD.WTTS.Client/Properties/InternalsVisibleTo.cs
src/BD.WTTS.Client/Properties/InternalsVisibleTo.cs
+3
-0
src/BD.WTTS.Client/Services.Implementation/Platform/Windows/WindowsPlatformServiceImpl.Shortcut.cs
...n/Platform/Windows/WindowsPlatformServiceImpl.Shortcut.cs
+17
-5
未找到文件。
ref/Interop.IWshRuntimeLibrary.dll
0 → 100644
浏览文件 @
f3ea23f2
文件已添加
src/BD.WTTS.Client.Tools.Publish/Commands/IDotNetPublishCommand.cs
浏览文件 @
f3ea23f2
...
...
@@ -85,7 +85,7 @@ interface IDotNetPublishCommand : ICommand
DirTryDelete
(
rootPublishDir
);
// 发布主体
StartProcess
AndWaitForExit
(
psi
);
ProcessHelper
.
Start
AndWaitForExit
(
psi
);
// 验证 Avalonia.Base.dll 版本号必须为 11+
var
avaloniaBaseDllPath
=
Path
.
Combine
(
publishDir
,
"Avalonia.Base.dll"
);
...
...
@@ -804,7 +804,7 @@ publish -c {0} -p:OutputType={1} -p:PublishDir=bin\{0}\Publish\win-any -p:Publis
var
argument
=
string
.
Join
(
' '
,
psi
.
ArgumentList
);
Console
.
WriteLine
(
argument
);
StartProcess
AndWaitForExit
(
psi
);
ProcessHelper
.
Start
AndWaitForExit
(
psi
);
var
publishDir
=
Path
.
Combine
(
projRootPath
,
arg
.
PublishDir
);
CopyDirectory
(
publishDir
,
destinationDir
,
true
);
...
...
src/BD.WTTS.Client.Tools.Publish/Helpers/DotNetCLIHelper.cs
浏览文件 @
f3ea23f2
...
...
@@ -15,23 +15,11 @@ static partial class DotNetCLIHelper
IOPath
.
DirTryDelete
(
objPath
);
}
public
static
void
StartProcessAndWaitForExit
(
ProcessStartInfo
psi
)
{
var
process
=
Process
.
Start
(
psi
);
process
.
ThrowIsNull
();
process
.
WaitForExit
();
var
exitCode
=
process
.
ExitCode
;
if
(
exitCode
!=
default
)
{
throw
new
ArgumentOutOfRangeException
(
nameof
(
exitCode
),
exitCode
,
null
);
}
}
public
static
void
StartProcessAndWaitForExit
(
string
workingDirectory
,
string
?
arguments
=
null
)
{
var
psi
=
GetProcessStartInfo
(
workingDirectory
);
if
(
arguments
!=
null
)
psi
.
Arguments
=
arguments
;
StartProcess
AndWaitForExit
(
psi
);
ProcessHelper
.
Start
AndWaitForExit
(
psi
);
}
public
static
ProcessStartInfo
GetProcessStartInfo
(
string
workingDirectory
)
...
...
src/BD.WTTS.Client.Tools.Publish/Helpers/MSIXHelper.cs
浏览文件 @
f3ea23f2
...
...
@@ -54,7 +54,7 @@ createconfig /cf "{xmlPath}" /dq lang-en-US /o /pv 10.0.0
""",
WorkingDirectory
=
rootPublicPath
,
};
DotNetCLIHelper
.
StartProcess
AndWaitForExit
(
psi
);
ProcessHelper
.
Start
AndWaitForExit
(
psi
);
var
prPath
=
$@"
{
ProjectUtils
.
ProjPath
}
\res\windows\makepri"
;
CopyDirectory
(
prPath
,
rootPublicPath
,
true
);
psi
=
new
ProcessStartInfo
...
...
@@ -67,7 +67,7 @@ new /cf "{xmlPath}" /pr "{prPath}"
""",
WorkingDirectory
=
rootPublicPath
,
};
DotNetCLIHelper
.
StartProcess
AndWaitForExit
(
psi
);
ProcessHelper
.
Start
AndWaitForExit
(
psi
);
IOPath
.
FileIfExistsItDelete
(
xmlPath
);
}
...
...
@@ -119,7 +119,7 @@ $"""
pack
/
v
/
h
SHA256
/
d
"{rootPublicPath}"
/
p
"{msixPath}"
""",
};
DotNetCLIHelper
.
StartProcess
AndWaitForExit
(
psi
);
ProcessHelper
.
Start
AndWaitForExit
(
psi
);
}
/// <summary>
...
...
@@ -299,7 +299,7 @@ $"""
sign
/
a
/
fd
SHA256
/
f
"{pfxFilePath}"
/
p
"{pwdS}"
/
tr
{
timestamp_url
}
/
td
SHA256
{
fileName
}
""",
};
DotNetCLIHelper
.
StartProcess
AndWaitForExit
(
psi
);
ProcessHelper
.
Start
AndWaitForExit
(
psi
);
}
}
...
...
src/BD.WTTS.Client.Tools.Publish/Helpers/ObfuscarHelper.cs
浏览文件 @
f3ea23f2
...
...
@@ -56,14 +56,18 @@ static class ObfuscarHelper
{
WriteConfig
(
dirPath
);
var
psi
=
new
ProcessStartInfo
var
psi
=
DotNetCLIHelper
.
GetProcessStartInfo
(
AppContext
.
BaseDirectory
);
psi
.
Arguments
=
"tool install --global Obfuscar.GlobalTool"
;
ProcessHelper
.
StartAndWaitForExit
(
psi
);
psi
=
new
ProcessStartInfo
{
FileName
=
"obfuscar.console.exe"
,
UseShellExecute
=
false
,
Arguments
=
configFileName
,
WorkingDirectory
=
dirPath
,
};
DotNetCLIHelper
.
StartProcess
AndWaitForExit
(
psi
);
ProcessHelper
.
Start
AndWaitForExit
(
psi
);
var
oldFilePath
=
Path
.
Combine
(
dirPath
,
"Steam++.exe"
);
var
newFilePath
=
Path
.
Combine
(
dirPath
,
"Obfuscar"
,
"Steam++.exe"
);
...
...
src/BD.WTTS.Client.Tools.Publish/Helpers/ProcessHelper.cs
0 → 100644
浏览文件 @
f3ea23f2
namespace
BD.WTTS.Client.Tools.Publish.Helpers
;
static
partial
class
ProcessHelper
{
public
static
void
StartAndWaitForExit
(
ProcessStartInfo
psi
,
bool
ignoreExitCode
=
false
)
{
var
process
=
Process
.
Start
(
psi
);
process
.
ThrowIsNull
();
process
.
WaitForExit
();
if
(
ignoreExitCode
)
return
;
var
exitCode
=
process
.
ExitCode
;
if
(
exitCode
!=
default
)
{
throw
new
ArgumentOutOfRangeException
(
nameof
(
exitCode
),
exitCode
,
null
);
}
}
}
src/BD.WTTS.Client/BD.WTTS.Client.csproj
浏览文件 @
f3ea23f2
...
...
@@ -142,7 +142,7 @@
<PackageReference Include="Microsoft.Extensions.Logging.EventLog" />
<PackageReference Include="Microsoft.Win32.SystemEvents" />
<PackageReference Include="Vanara.PInvoke.PowrProf" />
<COMReference Include="IWshRuntimeLibrary">
<
!--<
COMReference Include="IWshRuntimeLibrary">
<WrapperTool>tlbimp</WrapperTool>
<VersionMinor>0</VersionMinor>
<VersionMajor>1</VersionMajor>
...
...
@@ -150,7 +150,10 @@
<Lcid>0</Lcid>
<Isolated>false</Isolated>
<EmbedInteropTypes>true</EmbedInteropTypes>
</COMReference>
</COMReference>-->
<Reference Include="Interop.IWshRuntimeLibrary">
<HintPath>..\..\ref\Interop.IWshRuntimeLibrary.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows' OR $([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'macos' OR $([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst' OR $([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == ''">
...
...
src/BD.WTTS.Client/Properties/InternalsVisibleTo.cs
浏览文件 @
f3ea23f2
[
assembly
:
InternalsVisibleTo
(
"BD.WTTS.UnitTest"
)]
[
assembly
:
InternalsVisibleTo
(
"Steam++"
)]
[
assembly
:
InternalsVisibleTo
(
"Steam++.Designer"
)]
src/BD.WTTS.Client/Services.Implementation/Platform/Windows/WindowsPlatformServiceImpl.Shortcut.cs
浏览文件 @
f3ea23f2
...
...
@@ -9,23 +9,35 @@ partial class WindowsPlatformServiceImpl
/// <summary>
/// 创建一个快捷方式
/// </summary>
/// <param name="pathLink"></param>
/// <param name="targetPath"></param>
/// <param name="arguments"></param>
/// <param name="workingDirectory"></param>
[
MethodImpl
(
MethodImplOptions
.
AggressiveInlining
)]
public
static
void
CreateShortcut
(
string
pathLink
,
string
targetPath
,
string
?
arguments
=
null
,
string
?
description
=
null
,
string
?
hotkey
=
null
,
string
?
iconLocation
=
null
,
string
?
workingDirectory
=
null
)
{
WshShell
shell
=
new
();
IWshShortcut
shortcut
=
(
IWshShortcut
)
shell
.
CreateShortcut
(
pathLink
);
var
shortcut
=
(
IWshShortcut
)
shell
.
CreateShortcut
(
pathLink
);
shortcut
.
TargetPath
=
targetPath
;
if
(!
string
.
IsNullOrEmpty
(
description
))
shortcut
.
Description
=
description
;
if
(!
string
.
IsNullOrEmpty
(
arguments
))
shortcut
.
Arguments
=
arguments
;
if
(!
string
.
IsNullOrEmpty
(
hotkey
))
shortcut
.
Hotkey
=
hotkey
;
if
(!
string
.
IsNullOrEmpty
(
iconLocation
))
shortcut
.
IconLocation
=
iconLocation
;
if
(!
string
.
IsNullOrEmpty
(
workingDirectory
))
shortcut
.
WorkingDirectory
=
workingDirectory
;
shortcut
.
Save
();
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录