Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 17cc6f0928 | |||
| 64a1a6a9ee | |||
| f3f8df2d3e |
10
.github/workflows/publish_manifest.yml
vendored
10
.github/workflows/publish_manifest.yml
vendored
@@ -1,9 +1,9 @@
|
|||||||
name: Publish launcher manifest and files
|
name: Publish launcher manifest and files
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
push:
|
||||||
# schedule:
|
tags:
|
||||||
# - cron: '0 10 * * *'
|
- 'v*'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
@@ -20,6 +20,8 @@ jobs:
|
|||||||
dotnet-version: 9.0.x
|
dotnet-version: 9.0.x
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: dotnet restore
|
run: dotnet restore
|
||||||
|
- name: Set version
|
||||||
|
run: echo "${{ github.ref }}" > ./Nebula.Launcher/Version.txt
|
||||||
- name: Build whole project
|
- name: Build whole project
|
||||||
run: dotnet build --configuration Release
|
run: dotnet build --configuration Release
|
||||||
- name: Package launcher files
|
- name: Package launcher files
|
||||||
@@ -31,4 +33,4 @@ jobs:
|
|||||||
username: ${{ secrets.FTP_USERNAME }}
|
username: ${{ secrets.FTP_USERNAME }}
|
||||||
password: ${{ secrets.FTP_PASSWORD }}
|
password: ${{ secrets.FTP_PASSWORD }}
|
||||||
local-dir: ./release/
|
local-dir: ./release/
|
||||||
server-dir: ./release/
|
server-dir: ./
|
||||||
|
|||||||
BIN
Nebula.Launcher/Assets/nebula.ico
Normal file
BIN
Nebula.Launcher/Assets/nebula.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 13 KiB |
@@ -58,6 +58,13 @@
|
|||||||
<Copy SourceFiles="..\Nebula.Runner\bin\$(Configuration)\$(TargetFramework)\Nebula.Runner.runtimeconfig.json" DestinationFolder="$(PublishDir)"/>
|
<Copy SourceFiles="..\Nebula.Runner\bin\$(Configuration)\$(TargetFramework)\Nebula.Runner.runtimeconfig.json" DestinationFolder="$(PublishDir)"/>
|
||||||
</Target>
|
</Target>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<None Remove="Version.txt" />
|
||||||
|
<EmbeddedResource Include="Version.txt">
|
||||||
|
<LogicalName>Nebula.Launcher.Version.txt</LogicalName>
|
||||||
|
</EmbeddedResource>
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\Nebula.Shared\Nebula.Shared.csproj"/>
|
<ProjectReference Include="..\Nebula.Shared\Nebula.Shared.csproj"/>
|
||||||
<ProjectReference Include="..\Nebula.SourceGenerators\Nebula.SourceGenerators.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false"/>
|
<ProjectReference Include="..\Nebula.SourceGenerators\Nebula.SourceGenerators.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false"/>
|
||||||
|
|||||||
BIN
Nebula.Launcher/Version.txt
Normal file
BIN
Nebula.Launcher/Version.txt
Normal file
Binary file not shown.
@@ -1,6 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Collections.ObjectModel;
|
using System.Collections.ObjectModel;
|
||||||
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using CommunityToolkit.Mvvm.ComponentModel;
|
using CommunityToolkit.Mvvm.ComponentModel;
|
||||||
using CommunityToolkit.Mvvm.Input;
|
using CommunityToolkit.Mvvm.Input;
|
||||||
@@ -29,6 +30,7 @@ public partial class MainViewModel : ViewModelBase
|
|||||||
|
|
||||||
private readonly List<PopupViewModelBase> _viewQueue = new();
|
private readonly List<PopupViewModelBase> _viewQueue = new();
|
||||||
|
|
||||||
|
[ObservableProperty] private string _versionInfo = "dev";
|
||||||
[ObservableProperty] private ViewModelBase _currentPage;
|
[ObservableProperty] private ViewModelBase _currentPage;
|
||||||
[ObservableProperty] private PopupViewModelBase? _currentPopup;
|
[ObservableProperty] private PopupViewModelBase? _currentPopup;
|
||||||
[ObservableProperty] private string _currentTitle = "Default";
|
[ObservableProperty] private string _currentTitle = "Default";
|
||||||
@@ -57,6 +59,13 @@ public partial class MainViewModel : ViewModelBase
|
|||||||
protected override void Initialise()
|
protected override void Initialise()
|
||||||
{
|
{
|
||||||
_logger = DebugService.GetLogger(this);
|
_logger = DebugService.GetLogger(this);
|
||||||
|
|
||||||
|
using var stream = typeof(MainViewModel).Assembly
|
||||||
|
.GetManifestResourceStream("Nebula.Launcher.Version.txt")!;
|
||||||
|
using var streamReader = new StreamReader(stream);
|
||||||
|
|
||||||
|
VersionInfo = streamReader.ReadLine() ?? "dev";
|
||||||
|
|
||||||
InitialiseInDesignMode();
|
InitialiseInDesignMode();
|
||||||
|
|
||||||
PopupMessageService.OnPopupRequired += OnPopupRequired;
|
PopupMessageService.OnPopupRequired += OnPopupRequired;
|
||||||
@@ -145,7 +154,7 @@ public partial class MainViewModel : ViewModelBase
|
|||||||
|
|
||||||
public void OpenLink()
|
public void OpenLink()
|
||||||
{
|
{
|
||||||
Helper.OpenBrowser("https://cinka.ru/nebula-launcher/");
|
Helper.OpenBrowser("https://durenko.tatar/nebula");
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnPopupRequired(object viewModelBase)
|
private void OnPopupRequired(object viewModelBase)
|
||||||
|
|||||||
@@ -117,10 +117,10 @@
|
|||||||
Foreground="#777777"
|
Foreground="#777777"
|
||||||
HorizontalAlignment="Left"
|
HorizontalAlignment="Left"
|
||||||
VerticalAlignment="Center">
|
VerticalAlignment="Center">
|
||||||
https://cinka.ru/nebula-launcher/
|
https://durenko.tatar/nebula/
|
||||||
</TextBlock>
|
</TextBlock>
|
||||||
</Button>
|
</Button>
|
||||||
<TextBlock HorizontalAlignment="Right" VerticalAlignment="Center">v0.08-a</TextBlock>
|
<TextBlock HorizontalAlignment="Right" VerticalAlignment="Center" Text="{Binding VersionInfo}"/>
|
||||||
</Panel>
|
</Panel>
|
||||||
</Label>
|
</Label>
|
||||||
</Border>
|
</Border>
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
ExtendClientAreaTitleBarHeightHint="-1"
|
ExtendClientAreaTitleBarHeightHint="-1"
|
||||||
ExtendClientAreaToDecorationsHint="True"
|
ExtendClientAreaToDecorationsHint="True"
|
||||||
Height="500"
|
Height="500"
|
||||||
Icon="/Assets/avalonia-logo.ico"
|
Icon="/Assets/nebula.ico"
|
||||||
MinHeight="500"
|
MinHeight="500"
|
||||||
MinWidth="800"
|
MinWidth="800"
|
||||||
SystemDecorations="BorderOnly"
|
SystemDecorations="BorderOnly"
|
||||||
|
|||||||
BIN
Nebula.UpdateResolver/Assets/nebula.ico
Normal file
BIN
Nebula.UpdateResolver/Assets/nebula.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 13 KiB |
@@ -87,7 +87,7 @@ public static class ConfigurationStandalone
|
|||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
|
Console.WriteLine(e.Message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -9,6 +9,7 @@
|
|||||||
<PublishSingleFile>true</PublishSingleFile>
|
<PublishSingleFile>true</PublishSingleFile>
|
||||||
<!--<PublishTrimmed>true</PublishTrimmed>-->
|
<!--<PublishTrimmed>true</PublishTrimmed>-->
|
||||||
<SelfContained>true</SelfContained>
|
<SelfContained>true</SelfContained>
|
||||||
|
<ApplicationIcon>Assets/nebula.ico</ApplicationIcon>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ public static class RestStandalone
|
|||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
|
Console.WriteLine(e.Message);
|
||||||
return defaultValue;
|
return defaultValue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ namespace Nebula.UpdateResolver;
|
|||||||
public static class UpdateConVars
|
public static class UpdateConVars
|
||||||
{
|
{
|
||||||
public static readonly ConVar<string> UpdateCacheUrl =
|
public static readonly ConVar<string> UpdateCacheUrl =
|
||||||
ConVarBuilder.Build<string>("update.url","https://cinka.ru/nebula-launcher/files/publish/release");
|
ConVarBuilder.Build<string>("update.url","https://durenko.tatar/nebula/manifest/");
|
||||||
public static readonly ConVar<LauncherManifest> CurrentLauncherManifest =
|
public static readonly ConVar<LauncherManifest> CurrentLauncherManifest =
|
||||||
ConVarBuilder.Build<LauncherManifest>("update.manifest");
|
ConVarBuilder.Build<LauncherManifest>("update.manifest");
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user