Skip to content

Commit

Permalink
update .net 9.0
Browse files Browse the repository at this point in the history
  • Loading branch information
HendrikMennen committed Nov 14, 2024
1 parent d5d882f commit 66de8ef
Show file tree
Hide file tree
Showing 10 changed files with 40 additions and 33 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
dotnet-version: 9.0.x
- name: Get Version
uses: kzrnm/[email protected]
id: get-version
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.0.x
dotnet-version: 9.0.x
- name: Workload Restore
run: dotnet workload restore
- name: Restore dependencies
Expand Down
5 changes: 3 additions & 2 deletions src/OneWare.Quartus/Helper/IQsfSetting.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
using OneWare.Settings.ViewModels.SettingTypes;
using OneWare.Essentials.Models;
using OneWare.Settings.ViewModels.SettingTypes;

namespace OneWare.Quartus.Helper;

public interface IQsfSetting
{
public SettingViewModel GetViewModel();
public TitledSetting GetSettingModel();
public void Save();
}
9 changes: 6 additions & 3 deletions src/OneWare.Quartus/Helper/QsfSettingComboBox.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ public QsfSettingComboBox(QsfFile file, string name, string title, string descri
_name = name;
_options = options;

_setting = new ComboBoxSetting(title, description, defaultValue, options.Values);
_setting = new ComboBoxSetting(title, defaultValue, options.Values)
{
HoverDescription = description
};

var setting = file.GetGlobalAssignment(name);

Expand All @@ -28,9 +31,9 @@ public QsfSettingComboBox(QsfFile file, string name, string title, string descri
}
}

public SettingViewModel GetViewModel()
public TitledSetting GetSettingModel()
{
return new ComboBoxSettingViewModel(_setting);
return _setting;
}

public void Save()
Expand Down
9 changes: 6 additions & 3 deletions src/OneWare.Quartus/Helper/QsfSettingSlider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ public QsfSettingSlider(QsfFile file, string name, string title, string descript
_qsfFile = file;
_name = name;

_setting = new SliderSetting(title, description, defaultValue, min, max, step);
_setting = new SliderSetting(title, defaultValue, min, max, step)
{
HoverDescription = description
};

var setting = file.GetGlobalAssignment(name);

Expand All @@ -26,9 +29,9 @@ public QsfSettingSlider(QsfFile file, string name, string title, string descript
}
}

public SettingViewModel GetViewModel()
public TitledSetting GetSettingModel()
{
return new SliderSettingViewModel(_setting);
return _setting;
}

public void Save()
Expand Down
6 changes: 3 additions & 3 deletions src/OneWare.Quartus/OneWare.Quartus.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<Version>0.8.4</Version>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<EnableDynamicLoading>true</EnableDynamicLoading>
Expand All @@ -15,8 +15,8 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="OneWare.Essentials" Version="0.11.0" Private="false" ExcludeAssets="runtime;Native" />
<PackageReference Include="OneWare.UniversalFpgaProjectSystem" Version="0.41.0" Private="false" ExcludeAssets="runtime;Native" />
<PackageReference Include="OneWare.Essentials" Version="0.11.2" Private="false" ExcludeAssets="runtime;Native" />
<PackageReference Include="OneWare.UniversalFpgaProjectSystem" Version="0.41.2" Private="false" ExcludeAssets="runtime;Native" />
</ItemGroup>

<Target Name="GenerateCompatibilityFile" AfterTargets="Build">
Expand Down
2 changes: 1 addition & 1 deletion src/OneWare.Quartus/QuartusModule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public void OnInitialized(IContainerProvider containerProvider)
"quartus")
};

settingsService.RegisterTitledPath("Tools", "Quartus", "Quartus_Path", "Quartus Path",
settingsService.RegisterTitledFolderPath("Tools", "Quartus", "Quartus_Path", "Quartus Path",

Check warning on line 56 in src/OneWare.Quartus/QuartusModule.cs

View workflow job for this annotation

GitHub Actions / build

'ISettingsService.RegisterTitledFolderPath(string, string, string, string, string, string, string?, string?, Func<string, bool>?)' is obsolete: 'Use RegisterSetting instead'

Check warning on line 56 in src/OneWare.Quartus/QuartusModule.cs

View workflow job for this annotation

GitHub Actions / build

'ISettingsService.RegisterTitledFolderPath(string, string, string, string, string, string, string?, string?, Func<string, bool>?)' is obsolete: 'Use RegisterSetting instead'
"Sets the path for Quartus", defaultQuartusPath, null, null, IsQuartusPathValid);

settingsService.GetSettingObservable<string>("Quartus_Path").Subscribe(x =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public QuartusCompileSettingsViewModel(UniversalFpgaProjectRoot fpgaProjectRoot)

foreach (var setting in _settings)
{
SettingsCollection.SettingModels.Add(setting.GetViewModel());
SettingsCollection.SettingModels.Add(setting.GetSettingModel());
}
}

Expand Down
34 changes: 17 additions & 17 deletions src/OneWare.Quartus/ViewModels/QuartusLoaderSettingsViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,28 +41,28 @@ public QuartusLoaderSettingsViewModel(UniversalFpgaProjectRoot projectRoot, IFpg
var defaultProperties = fpga.Properties;
_settings = FpgaSettingsParser.LoadSettings(projectRoot, fpga.Name);

_shortTermModeSetting = new ComboBoxSetting("Short Term Mode", "Mode to use for Short Term Programming",
_shortTermModeSetting = new ComboBoxSetting("Short Term Mode",
defaultProperties.GetValueOrDefault("quartusProgrammerShortTermMode") ?? "", ["JTAG", "AS", "PS", "SD"]);

_shortTermOperationSetting = new TitledSetting("Short Term Operation", "Operation to use for Short Term Programming",
_shortTermOperationSetting = new TextBoxSetting("Short Term Operation", "Operation to use for Short Term Programming",
defaultProperties.GetValueOrDefault("quartusProgrammerShortTermOperation") ?? "");

_shortTermArgumentsSetting = new TitledSetting("Short Term Additional Arguments", "Additional Arguments to use for Short Term Programming",
_shortTermArgumentsSetting = new TextBoxSetting("Short Term Additional Arguments", "Additional Arguments to use for Short Term Programming",
defaultProperties.GetValueOrDefault("quartusProgrammerShortTermArguments") ?? "");

_longTermModeSetting = new ComboBoxSetting("Long Term Mode", "Mode to use for Long Term Programming",
_longTermModeSetting = new ComboBoxSetting("Long Term Mode",
defaultProperties.GetValueOrDefault("quartusProgrammerLongTermMode") ?? "", ["JTAG", "AS", "PS", "SD"]);

_longTermOperationSetting = new TitledSetting("Long Term Operation", "Operation to use for Long Term Programming",
_longTermOperationSetting = new TextBoxSetting("Long Term Operation", "Operation to use for Long Term Programming",
defaultProperties.GetValueOrDefault("quartusProgrammerLongTermOperation") ?? "");

_longTermFormatSetting = new ComboBoxSetting("Long Term Format", "Programming Format to use",
_longTermFormatSetting = new ComboBoxSetting("Long Term Format",
defaultProperties.GetValueOrDefault("quartusProgrammerLongTermFormat") ?? "", ["POF", "JIC"]);

_longTermCpfArgumentsSetting = new TitledSetting("Long Term Cpf Arguments", "If format is different from POF, these arguments will be used to convert .sof to given format",
_longTermCpfArgumentsSetting = new TextBoxSetting("Long Term Cpf Arguments", "If format is different from POF, these arguments will be used to convert .sof to given format",
defaultProperties.GetValueOrDefault("quartusProgrammerLongTermCpfArguments") ?? "");

_longTermArgumentsSetting = new TitledSetting("Long Term Additional Arguments", "Additional Arguments to use for Long Term Programming",
_longTermArgumentsSetting = new TextBoxSetting("Long Term Additional Arguments", "Additional Arguments to use for Long Term Programming",
defaultProperties.GetValueOrDefault("quartusProgrammerLongTermArguments") ?? "");

if (_settings.TryGetValue("quartusProgrammerShortTermMode", out var qPstMode))
Expand All @@ -89,14 +89,14 @@ public QuartusLoaderSettingsViewModel(UniversalFpgaProjectRoot projectRoot, IFpg
if (_settings.TryGetValue("quartusProgrammerLongTermArguments", out var qPltArguments))
_longTermArgumentsSetting.Value = qPltArguments;

SettingsCollection.SettingModels.Add(new ComboBoxSettingViewModel(_shortTermModeSetting));
SettingsCollection.SettingModels.Add(new TextBoxSettingViewModel(_shortTermOperationSetting));
SettingsCollection.SettingModels.Add(new TextBoxSettingViewModel(_shortTermArgumentsSetting));
SettingsCollection.SettingModels.Add(new ComboBoxSettingViewModel(_longTermModeSetting));
SettingsCollection.SettingModels.Add(new TextBoxSettingViewModel(_longTermOperationSetting));
SettingsCollection.SettingModels.Add(new ComboBoxSettingViewModel(_longTermFormatSetting));
SettingsCollection.SettingModels.Add(new TextBoxSettingViewModel(_longTermCpfArgumentsSetting));
SettingsCollection.SettingModels.Add(new TextBoxSettingViewModel(_longTermArgumentsSetting));
SettingsCollection.SettingModels.Add(_shortTermModeSetting);
SettingsCollection.SettingModels.Add(_shortTermOperationSetting);
SettingsCollection.SettingModels.Add(_shortTermArgumentsSetting);
SettingsCollection.SettingModels.Add(_longTermModeSetting);
SettingsCollection.SettingModels.Add(_longTermOperationSetting);
SettingsCollection.SettingModels.Add(_longTermFormatSetting);
SettingsCollection.SettingModels.Add(_longTermCpfArgumentsSetting);
SettingsCollection.SettingModels.Add(_longTermArgumentsSetting);
}

public void Save(FlexibleWindow flexibleWindow)
Expand All @@ -119,7 +119,7 @@ public void Reset()
{
foreach (var setting in SettingsCollection.SettingModels)
{
setting.Setting.Value = setting.Setting.DefaultValue;
setting.Value = setting.DefaultValue;
}
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<OutputType>Library</OutputType>
<IsPackable>False</IsPackable>
<IsTestProject>True</IsTestProject>
Expand Down

0 comments on commit 66de8ef

Please sign in to comment.