diff --git a/.appveyor.yml b/.appveyor.yml index 4221aa0..512908a 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -1,5 +1,5 @@ -image: Visual Studio 2017 -version: 1.0.20-{build} +image: Visual Studio 2022 +version: 1.0.21-{build} environment: global: DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true diff --git a/.gitignore b/.gitignore index 1746e32..9a202af 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ bin obj +/.vs +/*.user diff --git a/BuildAllReleaseVersions.bat b/BuildAllReleaseVersions.bat index 87cdf68..68932dd 100644 --- a/BuildAllReleaseVersions.bat +++ b/BuildAllReleaseVersions.bat @@ -1,3 +1,16 @@ -SET BUILDTOOL=c:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe -%BUILDTOOL% CSMatIO.sln /p:Configuration=Release /p:TargetFrameworkVersion=v2.0 -%BUILDTOOL% CSMatIO.sln /p:Configuration=Release /p:TargetFrameworkVersion=v4.0 +SET BUILDTOOL="C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\MSBuild.exe" + +REM Restore NuGet packages first +dotnet restore src\csmatio.csproj + +REM Build for specific framework targets +dotnet build src\csmatio.csproj -c Release -f netstandard2.0 +dotnet build src\csmatio.csproj -c Release -f netstandard2.1 +dotnet build src\csmatio.csproj -c Release -f net6.0 +dotnet build src\csmatio.csproj -c Release -f net8.0 + +REM Create NuGet package with all frameworks +dotnet pack src\csmatio.csproj -c Release --no-build + +echo Press any key to continue... +pause > nul diff --git a/CSMatIO.sln b/CSMatIO.sln index 5f29178..f9c6d0c 100644 --- a/CSMatIO.sln +++ b/CSMatIO.sln @@ -1,13 +1,18 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2013 -VisualStudioVersion = 12.0.21005.1 +# Visual Studio Version 17 +VisualStudioVersion = 17.12.35728.132 MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "csmatio", "src\csmatio.csproj", "{D6EB17BF-9074-484F-9950-E06169A3C39D}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CSMatIOTest", "demo\CSMatIOTest.csproj", "{C5C58FCB-2DDA-4472-ACED-0C97FE09F7C1}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "csmatio.test", "test\csmatio.test.csproj", "{1425535D-7FE0-417E-8B2A-837F498B4792}" + ProjectSection(ProjectDependencies) = postProject + {D6EB17BF-9074-484F-9950-E06169A3C39D} = {D6EB17BF-9074-484F-9950-E06169A3C39D} + EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "test", "test\test.csproj", "{30C632C4-5F79-4893-84E9-CA4CE498846C}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CsMatIoTestExampleWpf", "demo-wpf\CsMatIoTestExampleWpf.csproj", "{A5A2B6A5-2F80-44BA-8852-562D5048C019}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CsMatIoTestExampleForms", "demo-forms\CsMatIoTestExampleForms.csproj", "{C5C58FCB-2DDA-4472-ACED-0C97FE09F7C1}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -19,14 +24,18 @@ Global {D6EB17BF-9074-484F-9950-E06169A3C39D}.Debug|Any CPU.Build.0 = Debug|Any CPU {D6EB17BF-9074-484F-9950-E06169A3C39D}.Release|Any CPU.ActiveCfg = Release|Any CPU {D6EB17BF-9074-484F-9950-E06169A3C39D}.Release|Any CPU.Build.0 = Release|Any CPU + {1425535D-7FE0-417E-8B2A-837F498B4792}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1425535D-7FE0-417E-8B2A-837F498B4792}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1425535D-7FE0-417E-8B2A-837F498B4792}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1425535D-7FE0-417E-8B2A-837F498B4792}.Release|Any CPU.Build.0 = Release|Any CPU + {A5A2B6A5-2F80-44BA-8852-562D5048C019}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A5A2B6A5-2F80-44BA-8852-562D5048C019}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A5A2B6A5-2F80-44BA-8852-562D5048C019}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A5A2B6A5-2F80-44BA-8852-562D5048C019}.Release|Any CPU.Build.0 = Release|Any CPU {C5C58FCB-2DDA-4472-ACED-0C97FE09F7C1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {C5C58FCB-2DDA-4472-ACED-0C97FE09F7C1}.Debug|Any CPU.Build.0 = Debug|Any CPU {C5C58FCB-2DDA-4472-ACED-0C97FE09F7C1}.Release|Any CPU.ActiveCfg = Release|Any CPU {C5C58FCB-2DDA-4472-ACED-0C97FE09F7C1}.Release|Any CPU.Build.0 = Release|Any CPU - {30C632C4-5F79-4893-84E9-CA4CE498846C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {30C632C4-5F79-4893-84E9-CA4CE498846C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {30C632C4-5F79-4893-84E9-CA4CE498846C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {30C632C4-5F79-4893-84E9-CA4CE498846C}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/demo/CSMatIOTest.csproj b/demo-forms/CsMatIoTestExampleForms.csproj similarity index 97% rename from demo/CSMatIOTest.csproj rename to demo-forms/CsMatIoTestExampleForms.csproj index faad076..b8f9005 100644 --- a/demo/CSMatIOTest.csproj +++ b/demo-forms/CsMatIoTestExampleForms.csproj @@ -1,81 +1,82 @@ - - - - Debug - AnyCPU - {C5C58FCB-2DDA-4472-ACED-0C97FE09F7C1} - WinExe - bin\ - Properties - CSMatIOTest - CSMatIOTest - v4.7.1 - true - prompt - 4 - - - NET40 - true - true - full - false - false - - - NET40 - false - pdbonly - true - false - - - - - - - - - - - - Form - - - Main.cs - - - - - Designer - Main.cs - - - ResXFileCodeGenerator - Resources.Designer.cs - Designer - - - True - Resources.resx - True - - - - SettingsSingleFileGenerator - Settings.Designer.cs - - - True - Settings.settings - True - - - - - {D6EB17BF-9074-484F-9950-E06169A3C39D} - csmatio - - - - + + + + Debug + AnyCPU + {C5C58FCB-2DDA-4472-ACED-0C97FE09F7C1} + WinExe + bin\ + Properties + CSMatIOTest + CSMatIOTest + v4.7.1 + true + prompt + 4 + true + + + NET40 + true + true + full + false + false + + + NET40 + false + pdbonly + true + false + + + + + + + + + + + + Form + + + Main.cs + + + + + Designer + Main.cs + + + ResXFileCodeGenerator + Resources.Designer.cs + Designer + + + True + Resources.resx + True + + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + True + Settings.settings + True + + + + + {D6EB17BF-9074-484F-9950-E06169A3C39D} + csmatio + + + + diff --git a/demo/Main.Designer.cs b/demo-forms/Main.Designer.cs similarity index 100% rename from demo/Main.Designer.cs rename to demo-forms/Main.Designer.cs diff --git a/demo/Main.cs b/demo-forms/Main.cs similarity index 100% rename from demo/Main.cs rename to demo-forms/Main.cs diff --git a/demo/Main.resx b/demo-forms/Main.resx similarity index 100% rename from demo/Main.resx rename to demo-forms/Main.resx diff --git a/demo/Program.cs b/demo-forms/Program.cs similarity index 100% rename from demo/Program.cs rename to demo-forms/Program.cs diff --git a/demo/Properties/AssemblyInfo.cs b/demo-forms/Properties/AssemblyInfo.cs similarity index 100% rename from demo/Properties/AssemblyInfo.cs rename to demo-forms/Properties/AssemblyInfo.cs diff --git a/demo/Properties/Resources.Designer.cs b/demo-forms/Properties/Resources.Designer.cs similarity index 100% rename from demo/Properties/Resources.Designer.cs rename to demo-forms/Properties/Resources.Designer.cs diff --git a/demo/Properties/Resources.resx b/demo-forms/Properties/Resources.resx similarity index 100% rename from demo/Properties/Resources.resx rename to demo-forms/Properties/Resources.resx diff --git a/demo/Properties/Settings.Designer.cs b/demo-forms/Properties/Settings.Designer.cs similarity index 100% rename from demo/Properties/Settings.Designer.cs rename to demo-forms/Properties/Settings.Designer.cs diff --git a/demo/Properties/Settings.settings b/demo-forms/Properties/Settings.settings similarity index 100% rename from demo/Properties/Settings.settings rename to demo-forms/Properties/Settings.settings diff --git a/demo-forms/README.md b/demo-forms/README.md new file mode 100644 index 0000000..0768887 --- /dev/null +++ b/demo-forms/README.md @@ -0,0 +1,35 @@ +# CSMatIO WPF Demo Application + +This is a .NET 8.0 WPF demo application for the CSMatIO library, which provides functionality for reading and writing MATLAB MAT-files in C#. + +## Features + +- Read MAT-files and display their contents +- Create MAT-files with various data types: + - Cell arrays + - Structures + - Character arrays + - Sparse arrays + - Numeric arrays (Double, Single, Int8, UInt8, Int16, UInt16, Int32, UInt32, Int64, UInt64) + - Imaginary matrices + +## Requirements + +- .NET 8.0 SDK or later +- Windows operating system + +## Building and Running + +1. Open the solution in Visual Studio 2022 or later +2. Build the solution +3. Run the CSMatIOTestWPF project + +## Usage + +1. To read a MAT-file, click the "Read MAT-File" button and select a file +2. To create a MAT-file: + - Select the data types you want to include + - Click the "Create MAT-File" button + - Choose a location to save the file + +The output window will display information about the operations performed. \ No newline at end of file diff --git a/demo/app.config b/demo-forms/app.config similarity index 100% rename from demo/app.config rename to demo-forms/app.config diff --git a/demo-froms/CsMatIoTestExampleForms.csproj b/demo-froms/CsMatIoTestExampleForms.csproj new file mode 100644 index 0000000..b8f9005 --- /dev/null +++ b/demo-froms/CsMatIoTestExampleForms.csproj @@ -0,0 +1,82 @@ + + + + Debug + AnyCPU + {C5C58FCB-2DDA-4472-ACED-0C97FE09F7C1} + WinExe + bin\ + Properties + CSMatIOTest + CSMatIOTest + v4.7.1 + true + prompt + 4 + true + + + NET40 + true + true + full + false + false + + + NET40 + false + pdbonly + true + false + + + + + + + + + + + + Form + + + Main.cs + + + + + Designer + Main.cs + + + ResXFileCodeGenerator + Resources.Designer.cs + Designer + + + True + Resources.resx + True + + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + True + Settings.settings + True + + + + + {D6EB17BF-9074-484F-9950-E06169A3C39D} + csmatio + + + + diff --git a/demo-wpf/App.xaml b/demo-wpf/App.xaml new file mode 100644 index 0000000..d156734 --- /dev/null +++ b/demo-wpf/App.xaml @@ -0,0 +1,9 @@ + + + + + \ No newline at end of file diff --git a/demo-wpf/App.xaml.cs b/demo-wpf/App.xaml.cs new file mode 100644 index 0000000..79c12f9 --- /dev/null +++ b/demo-wpf/App.xaml.cs @@ -0,0 +1,11 @@ +using System.Windows; + +namespace CSMatIOTest +{ + /// + /// Interaction logic for App.xaml + /// + public partial class App : Application + { + } +} \ No newline at end of file diff --git a/demo-wpf/CsMatIoTestExampleWpf.csproj b/demo-wpf/CsMatIoTestExampleWpf.csproj new file mode 100644 index 0000000..ae20d38 --- /dev/null +++ b/demo-wpf/CsMatIoTestExampleWpf.csproj @@ -0,0 +1,15 @@ + + + + WinExe + net8.0-windows + true + CSMatIOTest + CSMatIOTest + + + + + + + \ No newline at end of file diff --git a/demo-wpf/MainWindow.xaml b/demo-wpf/MainWindow.xaml new file mode 100644 index 0000000..2f2ec6e --- /dev/null +++ b/demo-wpf/MainWindow.xaml @@ -0,0 +1,116 @@ + + + + + + + + + + + + + + + + + + +