Skip to content

Commit

Permalink
fix #631, fix #623
Browse files Browse the repository at this point in the history
  • Loading branch information
VShawn committed Mar 27, 2024
1 parent 1ffe8b4 commit b183078
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
6 changes: 3 additions & 3 deletions Ui/Ui.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
</PropertyGroup>

<PropertyGroup>
<AssemblyVersion>1.0.0.40316</AssemblyVersion>
<AssemblyVersion>1.0.0.40327</AssemblyVersion>
<FileVersion>$(AssemblyVersion)</FileVersion>
<Version>$(AssemblyVersion)</Version>
<Authors>Shawn</Authors>
Expand Down Expand Up @@ -494,11 +494,11 @@
</Page>
</ItemGroup>

<Target Name="PreBuild" BeforeTargets="PreBuildEvent">
<Target Name="PreBuild" BeforeTargets="PreBuildEvent" Condition="'$(Configuration)'!='Debug'">
<Exec Command="powershell.exe ..\scripts\Set-AssemblyVersion.ps1&#xD;&#xA;powershell.exe ..\scripts\Set-Secret.ps1 -filePath .\Ui\Assert.cs -Pattern &quot;===REPLACE_ME_WITH_APP_CENTER_SECRET===&quot; -localSecretFilePath &quot;C:\1Remote_Secret\APP_CENTER_SECRET_1REMOTE.txt&quot;&#xD;&#xA;powershell.exe ..\scripts\Set-Secret.ps1 -filePath .\Ui\Assert.cs -Pattern &quot;===REPLACE_ME_WITH_SALT===&quot; -localSecretFilePath &quot;C:\1Remote_Secret\Salt.txt&quot;&#xD;&#xA;powershell.exe ..\scripts\Set-BuildDate.ps1 -filePath .\Ui\AppVersion.cs" />
</Target>

<Target Name="PostBuild" AfterTargets="PostBuildEvent">
<Target Name="PostBuild" AfterTargets="PostBuildEvent" Condition="'$(Configuration)'!='Debug'">
<Exec Command="powershell.exe ..\scripts\Set-Secret.ps1 -filePath .\Ui\Assert.cs -Pattern &quot;===REPLACE_ME_WITH_APP_CENTER_SECRET===&quot; -localSecretFilePath &quot;C:\1Remote_Secret\APP_CENTER_SECRET_1REMOTE.txt&quot; -isRevert&#xD;&#xA;powershell.exe ..\scripts\Set-Secret.ps1 -filePath .\Ui\Assert.cs -Pattern &quot;===REPLACE_ME_WITH_SALT===&quot; -localSecretFilePath &quot;C:\1Remote_Secret\Salt.txt&quot; -isRevert&#xD;&#xA;powershell.exe ..\scripts\Set-BuildDate.ps1 -filePath .\Ui\AppVersion.cs -isRevert" />
</Target>
</Project>
10 changes: 8 additions & 2 deletions Ui/View/Host/ProtocolHosts/IntegrateHost.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
using _1RM.Model.Protocol.Base;
using _1RM.Model.ProtocolRunner;
using _1RM.Model.ProtocolRunner.Default;
using _1RM.Utils;
using _1RM.Utils.KiTTY;
using Shawn.Utils;
using Stylet;
Expand Down Expand Up @@ -372,8 +373,6 @@ private void CloseIntegrate()

public void Start()
{
if (File.Exists(ExeFullName) == false) return;

RunBeforeConnect?.Invoke();
var exeFullName = ExeFullName;

Expand All @@ -386,6 +385,13 @@ public void Start()
kittyConnectable.ConfigKitty(_sessionName, kittyRunner, "");
}

if (Path.IsPathRooted(exeFullName)
&& File.Exists(ExeFullName) == false)
{
MessageBoxHelper.ErrorAlert($"Exe file '{ExeFullName}' does not existed! We can not start the connection!");
return;
}

var startInfo = new ProcessStartInfo
{
FileName = exeFullName,
Expand Down

0 comments on commit b183078

Please sign in to comment.