Skip to content

Commit f1c116a

Browse files
committed
feat: installer
1 parent acc89ee commit f1c116a

36 files changed

+1617
-244
lines changed

App/App.csproj

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,22 @@
1717
<LangVersion>preview</LangVersion>
1818
<!-- We have our own implementation of main with exception handling -->
1919
<DefineConstants>DISABLE_XAML_GENERATED_MAIN</DefineConstants>
20+
21+
<AssemblyName>Coder Desktop</AssemblyName>
22+
<ApplicationIcon>coder.ico</ApplicationIcon>
2023
</PropertyGroup>
2124

2225
<PropertyGroup Condition="$(Configuration) == 'Release'">
23-
<PublishTrimmed>true</PublishTrimmed>
24-
<TrimMode>CopyUsed</TrimMode>
26+
<PublishTrimmed>false</PublishTrimmed>
27+
<!-- <TrimMode>CopyUsed</TrimMode> -->
2528
<PublishReadyToRun>true</PublishReadyToRun>
26-
<SelfContained>true</SelfContained>
29+
<SelfContained>false</SelfContained>
2730
</PropertyGroup>
2831

32+
<ItemGroup>
33+
<Content Include="coder.ico" />
34+
</ItemGroup>
35+
2936
<ItemGroup>
3037
<Manifest Include="$(ApplicationManifest)" />
3138
</ItemGroup>

App/Services/CredentialManager.cs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -239,11 +239,9 @@ private struct CREDENTIAL
239239
public int Flags;
240240
public int Type;
241241

242-
[MarshalAs(UnmanagedType.LPWStr)]
243-
public string TargetName;
242+
[MarshalAs(UnmanagedType.LPWStr)] public string TargetName;
244243

245-
[MarshalAs(UnmanagedType.LPWStr)]
246-
public string Comment;
244+
[MarshalAs(UnmanagedType.LPWStr)] public string Comment;
247245

248246
public long LastWritten;
249247
public int CredentialBlobSize;
@@ -252,11 +250,9 @@ private struct CREDENTIAL
252250
public int AttributeCount;
253251
public IntPtr Attributes;
254252

255-
[MarshalAs(UnmanagedType.LPWStr)]
256-
public string TargetAlias;
253+
[MarshalAs(UnmanagedType.LPWStr)] public string TargetAlias;
257254

258-
[MarshalAs(UnmanagedType.LPWStr)]
259-
public string UserName;
255+
[MarshalAs(UnmanagedType.LPWStr)] public string UserName;
260256
}
261257
}
262258
}

App/ViewModels/SignInViewModel.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,9 @@ public partial class SignInViewModel : ObservableObject
3333
[NotifyPropertyChangedFor(nameof(ApiTokenError))]
3434
public partial bool ApiTokenTouched { get; set; } = false;
3535

36-
[ObservableProperty]
37-
public partial string? SignInError { get; set; } = null;
36+
[ObservableProperty] public partial string? SignInError { get; set; } = null;
3837

39-
[ObservableProperty]
40-
public partial bool SignInLoading { get; set; } = false;
38+
[ObservableProperty] public partial bool SignInLoading { get; set; } = false;
4139

4240
public string? CoderUrlError => CoderUrlTouched ? _coderUrlError : null;
4341

App/ViewModels/TrayWindowDisconnectedViewModel.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ public partial class TrayWindowDisconnectedViewModel : ObservableObject
1010
{
1111
private readonly IRpcController _rpcController;
1212

13-
[ObservableProperty]
14-
public partial bool ReconnectButtonEnabled { get; set; } = true;
13+
[ObservableProperty] public partial bool ReconnectButtonEnabled { get; set; } = true;
1514

1615
public TrayWindowDisconnectedViewModel(IRpcController rpcController)
1716
{

App/ViewModels/TrayWindowViewModel.cs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,12 @@ public partial class TrayWindowViewModel : ObservableObject
2323

2424
private DispatcherQueue? _dispatcherQueue;
2525

26-
[ObservableProperty]
27-
public partial VpnLifecycle VpnLifecycle { get; set; } = VpnLifecycle.Unknown;
26+
[ObservableProperty] public partial VpnLifecycle VpnLifecycle { get; set; } = VpnLifecycle.Unknown;
2827

2928
// This is a separate property because we need the switch to be 2-way.
30-
[ObservableProperty]
31-
public partial bool VpnSwitchActive { get; set; } = false;
29+
[ObservableProperty] public partial bool VpnSwitchActive { get; set; } = false;
3230

33-
[ObservableProperty]
34-
public partial string? VpnFailedMessage { get; set; } = null;
31+
[ObservableProperty] public partial string? VpnFailedMessage { get; set; } = null;
3532

3633
[ObservableProperty]
3734
[NotifyPropertyChangedFor(nameof(NoAgents))]
@@ -49,8 +46,7 @@ public partial class TrayWindowViewModel : ObservableObject
4946

5047
public IEnumerable<AgentViewModel> VisibleAgents => ShowAllAgents ? Agents : Agents.Take(MaxAgents);
5148

52-
[ObservableProperty]
53-
public partial string DashboardUrl { get; set; } = "https://coder.com";
49+
[ObservableProperty] public partial string DashboardUrl { get; set; } = "https://coder.com";
5450

5551
public TrayWindowViewModel(IRpcController rpcController, ICredentialManager credentialManager)
5652
{

App/coder.ico

422 KB
Binary file not shown.

App/packages.lock.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -112,17 +112,17 @@
112112
"System.Collections.Immutable": "9.0.0"
113113
}
114114
},
115-
"codersdk": {
115+
"Coder.Desktop.CoderSdk": {
116116
"type": "Project"
117117
},
118-
"vpn": {
118+
"Coder.Desktop.Vpn": {
119119
"type": "Project",
120120
"dependencies": {
121-
"System.IO.Pipelines": "[9.0.1, )",
122-
"Vpn.Proto": "[1.0.0, )"
121+
"Coder.Desktop.Vpn.Proto": "[1.0.0, )",
122+
"System.IO.Pipelines": "[9.0.1, )"
123123
}
124124
},
125-
"vpn.proto": {
125+
"Coder.Desktop.Vpn.Proto": {
126126
"type": "Project",
127127
"dependencies": {
128128
"Google.Protobuf": "[3.29.3, )"

Coder.Desktop.sln

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "App", "App\App.csproj", "{8
2121
EndProject
2222
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Vpn.DebugClient", "Vpn.DebugClient\Vpn.DebugClient.csproj", "{1BBFDF88-B25F-4C07-99C2-30DA384DB730}"
2323
EndProject
24+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Installer", "Installer\Installer.csproj", "{39F5B55A-09D8-477D-A3FA-ADAC29C52605}"
25+
EndProject
2426
Global
2527
GlobalSection(SolutionConfigurationPlatforms) = preSolution
2628
Debug|Any CPU = Debug|Any CPU
@@ -185,6 +187,22 @@ Global
185187
{1BBFDF88-B25F-4C07-99C2-30DA384DB730}.Release|x64.Build.0 = Release|Any CPU
186188
{1BBFDF88-B25F-4C07-99C2-30DA384DB730}.Release|x86.ActiveCfg = Release|Any CPU
187189
{1BBFDF88-B25F-4C07-99C2-30DA384DB730}.Release|x86.Build.0 = Release|Any CPU
190+
{39F5B55A-09D8-477D-A3FA-ADAC29C52605}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
191+
{39F5B55A-09D8-477D-A3FA-ADAC29C52605}.Debug|Any CPU.Build.0 = Debug|Any CPU
192+
{39F5B55A-09D8-477D-A3FA-ADAC29C52605}.Debug|ARM64.ActiveCfg = Debug|Any CPU
193+
{39F5B55A-09D8-477D-A3FA-ADAC29C52605}.Debug|ARM64.Build.0 = Debug|Any CPU
194+
{39F5B55A-09D8-477D-A3FA-ADAC29C52605}.Debug|x64.ActiveCfg = Debug|Any CPU
195+
{39F5B55A-09D8-477D-A3FA-ADAC29C52605}.Debug|x64.Build.0 = Debug|Any CPU
196+
{39F5B55A-09D8-477D-A3FA-ADAC29C52605}.Debug|x86.ActiveCfg = Debug|Any CPU
197+
{39F5B55A-09D8-477D-A3FA-ADAC29C52605}.Debug|x86.Build.0 = Debug|Any CPU
198+
{39F5B55A-09D8-477D-A3FA-ADAC29C52605}.Release|Any CPU.ActiveCfg = Release|Any CPU
199+
{39F5B55A-09D8-477D-A3FA-ADAC29C52605}.Release|Any CPU.Build.0 = Release|Any CPU
200+
{39F5B55A-09D8-477D-A3FA-ADAC29C52605}.Release|ARM64.ActiveCfg = Release|Any CPU
201+
{39F5B55A-09D8-477D-A3FA-ADAC29C52605}.Release|ARM64.Build.0 = Release|Any CPU
202+
{39F5B55A-09D8-477D-A3FA-ADAC29C52605}.Release|x64.ActiveCfg = Release|Any CPU
203+
{39F5B55A-09D8-477D-A3FA-ADAC29C52605}.Release|x64.Build.0 = Release|Any CPU
204+
{39F5B55A-09D8-477D-A3FA-ADAC29C52605}.Release|x86.ActiveCfg = Release|Any CPU
205+
{39F5B55A-09D8-477D-A3FA-ADAC29C52605}.Release|x86.Build.0 = Release|Any CPU
188206
EndGlobalSection
189207
GlobalSection(SolutionProperties) = preSolution
190208
HideSolutionNode = FALSE

CoderSdk/CoderSdk.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3+
<AssemblyName>Coder.Desktop.CoderSdk</AssemblyName>
34
<RootNamespace>Coder.Desktop.CoderSdk</RootNamespace>
45
<TargetFramework>net8.0</TargetFramework>
56
<ImplicitUsings>enable</ImplicitUsings>

Installer/Installer.csproj

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<AssemblyName>Coder.Desktop.Installer</AssemblyName>
5+
<RootNamespace>Coder.Desktop.Installer</RootNamespace>
6+
<OutputType>Exe</OutputType>
7+
<TargetFramework>net481</TargetFramework>
8+
<LangVersion>13.0</LangVersion>
9+
</PropertyGroup>
10+
11+
<ItemGroup>
12+
<None Remove="*.msi" />
13+
<None Remove="*.exe" />
14+
<None Remove="*.wxs" />
15+
<None Remove="*.wixpdb" />
16+
<None Remove="*.wixobj" />
17+
</ItemGroup>
18+
19+
<ItemGroup>
20+
<PackageReference Include="WixSharp_wix4" Version="2.6.0" />
21+
<PackageReference Include="WixSharp_wix4.bin" Version="2.6.0" />
22+
<PackageReference Include="CommandLineParser" Version="2.9.1" />
23+
</ItemGroup>
24+
</Project>

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy