diff --git a/fsBuddyClient/App.xaml b/Client/App.xaml similarity index 100% rename from fsBuddyClient/App.xaml rename to Client/App.xaml diff --git a/fsBuddyClient/App.xaml.cs b/Client/App.xaml.cs similarity index 100% rename from fsBuddyClient/App.xaml.cs rename to Client/App.xaml.cs diff --git a/fsBuddyClient/AssemblyInfo.cs b/Client/AssemblyInfo.cs similarity index 100% rename from fsBuddyClient/AssemblyInfo.cs rename to Client/AssemblyInfo.cs diff --git a/fsBuddyClient/Assets/Icons/create.png b/Client/Assets/Icons/create.png similarity index 100% rename from fsBuddyClient/Assets/Icons/create.png rename to Client/Assets/Icons/create.png diff --git a/fsBuddyClient/Assets/Icons/delete.png b/Client/Assets/Icons/delete.png similarity index 100% rename from fsBuddyClient/Assets/Icons/delete.png rename to Client/Assets/Icons/delete.png diff --git a/fsBuddyClient/Assets/Icons/edit.png b/Client/Assets/Icons/edit.png similarity index 100% rename from fsBuddyClient/Assets/Icons/edit.png rename to Client/Assets/Icons/edit.png diff --git a/fsBuddyClient/Assets/Icons/logs.png b/Client/Assets/Icons/logs.png similarity index 100% rename from fsBuddyClient/Assets/Icons/logs.png rename to Client/Assets/Icons/logs.png diff --git a/fsBuddyClient/Assets/Icons/pause.png b/Client/Assets/Icons/pause.png similarity index 100% rename from fsBuddyClient/Assets/Icons/pause.png rename to Client/Assets/Icons/pause.png diff --git a/fsBuddyClient/Assets/Icons/power.png b/Client/Assets/Icons/power.png similarity index 100% rename from fsBuddyClient/Assets/Icons/power.png rename to Client/Assets/Icons/power.png diff --git a/fsBuddyClient/Assets/Icons/reload.png b/Client/Assets/Icons/reload.png similarity index 100% rename from fsBuddyClient/Assets/Icons/reload.png rename to Client/Assets/Icons/reload.png diff --git a/fsBuddyClient/Assets/Icons/shrink.png b/Client/Assets/Icons/shrink.png similarity index 100% rename from fsBuddyClient/Assets/Icons/shrink.png rename to Client/Assets/Icons/shrink.png diff --git a/fsBuddyClient/Assets/logo_black.jpg b/Client/Assets/logo_black.jpg similarity index 100% rename from fsBuddyClient/Assets/logo_black.jpg rename to Client/Assets/logo_black.jpg diff --git a/fsBuddyClient/Assets/logo_black.svg b/Client/Assets/logo_black.svg similarity index 100% rename from fsBuddyClient/Assets/logo_black.svg rename to Client/Assets/logo_black.svg diff --git a/fsBuddyClient/Assets/logo_dark.png b/Client/Assets/logo_dark.png similarity index 100% rename from fsBuddyClient/Assets/logo_dark.png rename to Client/Assets/logo_dark.png diff --git a/fsBuddyClient/Assets/logo_white.jpg b/Client/Assets/logo_white.jpg similarity index 100% rename from fsBuddyClient/Assets/logo_white.jpg rename to Client/Assets/logo_white.jpg diff --git a/fsBuddyClient/Assets/logo_white.png b/Client/Assets/logo_white.png similarity index 100% rename from fsBuddyClient/Assets/logo_white.png rename to Client/Assets/logo_white.png diff --git a/fsBuddyClient/Assets/logo_white.svg b/Client/Assets/logo_white.svg similarity index 100% rename from fsBuddyClient/Assets/logo_white.svg rename to Client/Assets/logo_white.svg diff --git a/fsBuddyClient/Assets/montserrat.ttf b/Client/Assets/montserrat.ttf similarity index 100% rename from fsBuddyClient/Assets/montserrat.ttf rename to Client/Assets/montserrat.ttf diff --git a/fsBuddyClient/Assets/source_code_pro.ttf b/Client/Assets/source_code_pro.ttf similarity index 100% rename from fsBuddyClient/Assets/source_code_pro.ttf rename to Client/Assets/source_code_pro.ttf diff --git a/fsBuddyClient/Client.csproj b/Client/Client.csproj similarity index 94% rename from fsBuddyClient/Client.csproj rename to Client/Client.csproj index 3a4d390..c1d6288 100644 --- a/fsBuddyClient/Client.csproj +++ b/Client/Client.csproj @@ -5,6 +5,7 @@ net6.0-windows7.0 enable true + fsbuddy_icon.ico @@ -27,6 +28,10 @@ + + + + diff --git a/fsBuddyClient/Fonts.xaml b/Client/Fonts.xaml similarity index 100% rename from fsBuddyClient/Fonts.xaml rename to Client/Fonts.xaml diff --git a/fsBuddyClient/Model/ServiceConnection.cs b/Client/Model/ServiceConnection.cs similarity index 99% rename from fsBuddyClient/Model/ServiceConnection.cs rename to Client/Model/ServiceConnection.cs index 7fd25a3..77355dc 100644 --- a/fsBuddyClient/Model/ServiceConnection.cs +++ b/Client/Model/ServiceConnection.cs @@ -67,7 +67,7 @@ public async Task Connect() "fsbuddy-service", PipeDirection.InOut, PipeOptions.Asynchronous, - System.Security.Principal.TokenImpersonationLevel.Identification + System.Security.Principal.TokenImpersonationLevel.Impersonation ); } catch (Exception e) diff --git a/fsBuddyClient/View/Components/FolderEntry.xaml b/Client/View/Components/FolderEntry.xaml similarity index 100% rename from fsBuddyClient/View/Components/FolderEntry.xaml rename to Client/View/Components/FolderEntry.xaml diff --git a/fsBuddyClient/View/Components/FolderEntry.xaml.cs b/Client/View/Components/FolderEntry.xaml.cs similarity index 100% rename from fsBuddyClient/View/Components/FolderEntry.xaml.cs rename to Client/View/Components/FolderEntry.xaml.cs diff --git a/fsBuddyClient/View/Components/Navbar.xaml b/Client/View/Components/Navbar.xaml similarity index 100% rename from fsBuddyClient/View/Components/Navbar.xaml rename to Client/View/Components/Navbar.xaml diff --git a/fsBuddyClient/View/Components/Navbar.xaml.cs b/Client/View/Components/Navbar.xaml.cs similarity index 100% rename from fsBuddyClient/View/Components/Navbar.xaml.cs rename to Client/View/Components/Navbar.xaml.cs diff --git a/fsBuddyClient/View/Components/WatcherList.xaml b/Client/View/Components/WatcherList.xaml similarity index 100% rename from fsBuddyClient/View/Components/WatcherList.xaml rename to Client/View/Components/WatcherList.xaml diff --git a/fsBuddyClient/View/Components/WatcherList.xaml.cs b/Client/View/Components/WatcherList.xaml.cs similarity index 100% rename from fsBuddyClient/View/Components/WatcherList.xaml.cs rename to Client/View/Components/WatcherList.xaml.cs diff --git a/fsBuddyClient/View/CreateWatcher.xaml b/Client/View/CreateWatcher.xaml similarity index 100% rename from fsBuddyClient/View/CreateWatcher.xaml rename to Client/View/CreateWatcher.xaml diff --git a/fsBuddyClient/View/CreateWatcher.xaml.cs b/Client/View/CreateWatcher.xaml.cs similarity index 100% rename from fsBuddyClient/View/CreateWatcher.xaml.cs rename to Client/View/CreateWatcher.xaml.cs diff --git a/fsBuddyClient/View/EditWatcher.xaml b/Client/View/EditWatcher.xaml similarity index 100% rename from fsBuddyClient/View/EditWatcher.xaml rename to Client/View/EditWatcher.xaml diff --git a/fsBuddyClient/View/EditWatcher.xaml.cs b/Client/View/EditWatcher.xaml.cs similarity index 100% rename from fsBuddyClient/View/EditWatcher.xaml.cs rename to Client/View/EditWatcher.xaml.cs diff --git a/fsBuddyClient/View/MainWindow.xaml b/Client/View/MainWindow.xaml similarity index 100% rename from fsBuddyClient/View/MainWindow.xaml rename to Client/View/MainWindow.xaml diff --git a/fsBuddyClient/View/MainWindow.xaml.cs b/Client/View/MainWindow.xaml.cs similarity index 100% rename from fsBuddyClient/View/MainWindow.xaml.cs rename to Client/View/MainWindow.xaml.cs diff --git a/fsBuddyClient/ViewModel/CreateWatcherCommand.cs b/Client/ViewModel/CreateWatcherCommand.cs similarity index 100% rename from fsBuddyClient/ViewModel/CreateWatcherCommand.cs rename to Client/ViewModel/CreateWatcherCommand.cs diff --git a/fsBuddyClient/ViewModel/CreateWatcherPresenter.cs b/Client/ViewModel/CreateWatcherPresenter.cs similarity index 100% rename from fsBuddyClient/ViewModel/CreateWatcherPresenter.cs rename to Client/ViewModel/CreateWatcherPresenter.cs diff --git a/fsBuddyClient/ViewModel/DeleteWatcherCommand.cs b/Client/ViewModel/DeleteWatcherCommand.cs similarity index 100% rename from fsBuddyClient/ViewModel/DeleteWatcherCommand.cs rename to Client/ViewModel/DeleteWatcherCommand.cs diff --git a/fsBuddyClient/ViewModel/EditWatcherCommand.cs b/Client/ViewModel/EditWatcherCommand.cs similarity index 100% rename from fsBuddyClient/ViewModel/EditWatcherCommand.cs rename to Client/ViewModel/EditWatcherCommand.cs diff --git a/fsBuddyClient/ViewModel/EditWatcherPresenter.cs b/Client/ViewModel/EditWatcherPresenter.cs similarity index 100% rename from fsBuddyClient/ViewModel/EditWatcherPresenter.cs rename to Client/ViewModel/EditWatcherPresenter.cs diff --git a/fsBuddyClient/ViewModel/GetAllWatcherCommand.cs b/Client/ViewModel/GetAllWatcherCommand.cs similarity index 100% rename from fsBuddyClient/ViewModel/GetAllWatcherCommand.cs rename to Client/ViewModel/GetAllWatcherCommand.cs diff --git a/fsBuddyClient/ViewModel/PauseWatcherCommand.cs b/Client/ViewModel/PauseWatcherCommand.cs similarity index 100% rename from fsBuddyClient/ViewModel/PauseWatcherCommand.cs rename to Client/ViewModel/PauseWatcherCommand.cs diff --git a/fsBuddyClient/ViewModel/Presenter.cs b/Client/ViewModel/Presenter.cs similarity index 100% rename from fsBuddyClient/ViewModel/Presenter.cs rename to Client/ViewModel/Presenter.cs diff --git a/fsBuddyClient/ViewModel/RefreshCommand.cs b/Client/ViewModel/RefreshCommand.cs similarity index 100% rename from fsBuddyClient/ViewModel/RefreshCommand.cs rename to Client/ViewModel/RefreshCommand.cs diff --git a/fsBuddyClient/ViewModel/ShowCreateWatcherCommand.cs b/Client/ViewModel/ShowCreateWatcherCommand.cs similarity index 100% rename from fsBuddyClient/ViewModel/ShowCreateWatcherCommand.cs rename to Client/ViewModel/ShowCreateWatcherCommand.cs diff --git a/fsBuddyClient/ViewModel/ShowEditWatcherCommand.cs b/Client/ViewModel/ShowEditWatcherCommand.cs similarity index 100% rename from fsBuddyClient/ViewModel/ShowEditWatcherCommand.cs rename to Client/ViewModel/ShowEditWatcherCommand.cs diff --git a/fsBuddyClient/ViewModel/SwitchConnectionStatusCommand.cs b/Client/ViewModel/SwitchConnectionStatusCommand.cs similarity index 100% rename from fsBuddyClient/ViewModel/SwitchConnectionStatusCommand.cs rename to Client/ViewModel/SwitchConnectionStatusCommand.cs diff --git a/Client/fsbuddy_icon.ico b/Client/fsbuddy_icon.ico new file mode 100644 index 0000000..d22175b Binary files /dev/null and b/Client/fsbuddy_icon.ico differ diff --git a/fsBuddyConfiguration/Configuration.csproj b/Configuration/Configuration.csproj similarity index 100% rename from fsBuddyConfiguration/Configuration.csproj rename to Configuration/Configuration.csproj diff --git a/fsBuddyConfiguration/ConfigurationContext.cs b/Configuration/ConfigurationContext.cs similarity index 100% rename from fsBuddyConfiguration/ConfigurationContext.cs rename to Configuration/ConfigurationContext.cs diff --git a/fsBuddyConfiguration/ManagerConfiguration.cs b/Configuration/ManagerConfiguration.cs similarity index 100% rename from fsBuddyConfiguration/ManagerConfiguration.cs rename to Configuration/ManagerConfiguration.cs diff --git a/fsBuddyConfiguration/Migrations/20230430002530_InitialCreate.Designer.cs b/Configuration/Migrations/20230430002530_InitialCreate.Designer.cs similarity index 100% rename from fsBuddyConfiguration/Migrations/20230430002530_InitialCreate.Designer.cs rename to Configuration/Migrations/20230430002530_InitialCreate.Designer.cs diff --git a/fsBuddyConfiguration/Migrations/20230430002530_InitialCreate.cs b/Configuration/Migrations/20230430002530_InitialCreate.cs similarity index 100% rename from fsBuddyConfiguration/Migrations/20230430002530_InitialCreate.cs rename to Configuration/Migrations/20230430002530_InitialCreate.cs diff --git a/fsBuddyConfiguration/Migrations/20230430032525_unique-watcher-name.Designer.cs b/Configuration/Migrations/20230430032525_unique-watcher-name.Designer.cs similarity index 100% rename from fsBuddyConfiguration/Migrations/20230430032525_unique-watcher-name.Designer.cs rename to Configuration/Migrations/20230430032525_unique-watcher-name.Designer.cs diff --git a/fsBuddyConfiguration/Migrations/20230430032525_unique-watcher-name.cs b/Configuration/Migrations/20230430032525_unique-watcher-name.cs similarity index 100% rename from fsBuddyConfiguration/Migrations/20230430032525_unique-watcher-name.cs rename to Configuration/Migrations/20230430032525_unique-watcher-name.cs diff --git a/fsBuddyConfiguration/Migrations/20230430180249_system-settings.Designer.cs b/Configuration/Migrations/20230430180249_system-settings.Designer.cs similarity index 100% rename from fsBuddyConfiguration/Migrations/20230430180249_system-settings.Designer.cs rename to Configuration/Migrations/20230430180249_system-settings.Designer.cs diff --git a/fsBuddyConfiguration/Migrations/20230430180249_system-settings.cs b/Configuration/Migrations/20230430180249_system-settings.cs similarity index 100% rename from fsBuddyConfiguration/Migrations/20230430180249_system-settings.cs rename to Configuration/Migrations/20230430180249_system-settings.cs diff --git a/fsBuddyConfiguration/Migrations/20230430182507_system-settings-created-at.Designer.cs b/Configuration/Migrations/20230430182507_system-settings-created-at.Designer.cs similarity index 100% rename from fsBuddyConfiguration/Migrations/20230430182507_system-settings-created-at.Designer.cs rename to Configuration/Migrations/20230430182507_system-settings-created-at.Designer.cs diff --git a/fsBuddyConfiguration/Migrations/20230430182507_system-settings-created-at.cs b/Configuration/Migrations/20230430182507_system-settings-created-at.cs similarity index 100% rename from fsBuddyConfiguration/Migrations/20230430182507_system-settings-created-at.cs rename to Configuration/Migrations/20230430182507_system-settings-created-at.cs diff --git a/fsBuddyConfiguration/Migrations/20230430193244_system-settings-value-type.Designer.cs b/Configuration/Migrations/20230430193244_system-settings-value-type.Designer.cs similarity index 100% rename from fsBuddyConfiguration/Migrations/20230430193244_system-settings-value-type.Designer.cs rename to Configuration/Migrations/20230430193244_system-settings-value-type.Designer.cs diff --git a/fsBuddyConfiguration/Migrations/20230430193244_system-settings-value-type.cs b/Configuration/Migrations/20230430193244_system-settings-value-type.cs similarity index 100% rename from fsBuddyConfiguration/Migrations/20230430193244_system-settings-value-type.cs rename to Configuration/Migrations/20230430193244_system-settings-value-type.cs diff --git a/fsBuddyConfiguration/Migrations/20230504040407_not-unique-fields.Designer.cs b/Configuration/Migrations/20230504040407_not-unique-fields.Designer.cs similarity index 100% rename from fsBuddyConfiguration/Migrations/20230504040407_not-unique-fields.Designer.cs rename to Configuration/Migrations/20230504040407_not-unique-fields.Designer.cs diff --git a/fsBuddyConfiguration/Migrations/20230504040407_not-unique-fields.cs b/Configuration/Migrations/20230504040407_not-unique-fields.cs similarity index 100% rename from fsBuddyConfiguration/Migrations/20230504040407_not-unique-fields.cs rename to Configuration/Migrations/20230504040407_not-unique-fields.cs diff --git a/fsBuddyConfiguration/Migrations/20230506023448_action-field.Designer.cs b/Configuration/Migrations/20230506023448_action-field.Designer.cs similarity index 100% rename from fsBuddyConfiguration/Migrations/20230506023448_action-field.Designer.cs rename to Configuration/Migrations/20230506023448_action-field.Designer.cs diff --git a/fsBuddyConfiguration/Migrations/20230506023448_action-field.cs b/Configuration/Migrations/20230506023448_action-field.cs similarity index 100% rename from fsBuddyConfiguration/Migrations/20230506023448_action-field.cs rename to Configuration/Migrations/20230506023448_action-field.cs diff --git a/fsBuddyConfiguration/Migrations/20230508053722_exec-modified-fields.Designer.cs b/Configuration/Migrations/20230508053722_exec-modified-fields.Designer.cs similarity index 100% rename from fsBuddyConfiguration/Migrations/20230508053722_exec-modified-fields.Designer.cs rename to Configuration/Migrations/20230508053722_exec-modified-fields.Designer.cs diff --git a/fsBuddyConfiguration/Migrations/20230508053722_exec-modified-fields.cs b/Configuration/Migrations/20230508053722_exec-modified-fields.cs similarity index 100% rename from fsBuddyConfiguration/Migrations/20230508053722_exec-modified-fields.cs rename to Configuration/Migrations/20230508053722_exec-modified-fields.cs diff --git a/fsBuddyConfiguration/Migrations/20230509042516_is-enabled-field.Designer.cs b/Configuration/Migrations/20230509042516_is-enabled-field.Designer.cs similarity index 100% rename from fsBuddyConfiguration/Migrations/20230509042516_is-enabled-field.Designer.cs rename to Configuration/Migrations/20230509042516_is-enabled-field.Designer.cs diff --git a/fsBuddyConfiguration/Migrations/20230509042516_is-enabled-field.cs b/Configuration/Migrations/20230509042516_is-enabled-field.cs similarity index 100% rename from fsBuddyConfiguration/Migrations/20230509042516_is-enabled-field.cs rename to Configuration/Migrations/20230509042516_is-enabled-field.cs diff --git a/Configuration/Migrations/20230509054330_remove-service-settings.Designer.cs b/Configuration/Migrations/20230509054330_remove-service-settings.Designer.cs new file mode 100644 index 0000000..02cb82a --- /dev/null +++ b/Configuration/Migrations/20230509054330_remove-service-settings.Designer.cs @@ -0,0 +1,81 @@ +// +using System; +using Configuration; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +#nullable disable + +namespace Configuration.Migrations +{ + [DbContext(typeof(ConfigurationContext))] + [Migration("20230509054330_remove-service-settings")] + partial class removeservicesettings + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder.HasAnnotation("ProductVersion", "7.0.5"); + + modelBuilder.Entity("ConnectionInterface.Watcher", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER") + .HasColumnName("id"); + + b.Property("Action") + .HasColumnType("INTEGER") + .HasColumnName("action"); + + b.Property("CreatedAt") + .HasColumnType("TEXT") + .HasColumnName("created_at"); + + b.Property("ExecutedAt") + .HasColumnType("TEXT") + .HasColumnName("executed_at"); + + b.Property("InputPath") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("TEXT") + .HasColumnName("input_path"); + + b.Property("IsEnabled") + .HasColumnType("INTEGER") + .HasColumnName("is_enabled"); + + b.Property("ModifiedFiles") + .HasColumnType("INTEGER") + .HasColumnName("modified_files"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("TEXT") + .HasColumnName("name"); + + b.Property("OutputPath") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("TEXT") + .HasColumnName("output_path"); + + b.Property("SearchPattern") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("TEXT") + .HasColumnName("search_pattern"); + + b.HasKey("Id"); + + b.ToTable("watchers"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/Configuration/Migrations/20230509054330_remove-service-settings.cs b/Configuration/Migrations/20230509054330_remove-service-settings.cs new file mode 100644 index 0000000..bd81ed5 --- /dev/null +++ b/Configuration/Migrations/20230509054330_remove-service-settings.cs @@ -0,0 +1,37 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace Configuration.Migrations +{ + /// + public partial class removeservicesettings : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "system_settings"); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateTable( + name: "system_settings", + columns: table => new + { + id = table.Column(type: "INTEGER", nullable: false) + .Annotation("Sqlite:Autoincrement", true), + created_at = table.Column(type: "TEXT", nullable: false), + type = table.Column(type: "INTEGER", nullable: false), + value = table.Column(type: "INTEGER", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_system_settings", x => x.id); + }); + } + } +} diff --git a/fsBuddyConfiguration/Migrations/ConfigurationContextModelSnapshot.cs b/Configuration/Migrations/ConfigurationContextModelSnapshot.cs similarity index 74% rename from fsBuddyConfiguration/Migrations/ConfigurationContextModelSnapshot.cs rename to Configuration/Migrations/ConfigurationContextModelSnapshot.cs index 44778c7..520cd3c 100644 --- a/fsBuddyConfiguration/Migrations/ConfigurationContextModelSnapshot.cs +++ b/Configuration/Migrations/ConfigurationContextModelSnapshot.cs @@ -17,31 +17,6 @@ protected override void BuildModel(ModelBuilder modelBuilder) #pragma warning disable 612, 618 modelBuilder.HasAnnotation("ProductVersion", "7.0.5"); - modelBuilder.Entity("ConnectionInterface.ServiceSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasColumnName("id"); - - b.Property("CreatedAt") - .HasColumnType("TEXT") - .HasColumnName("created_at"); - - b.Property("Type") - .HasColumnType("INTEGER") - .HasColumnName("type"); - - b.Property("Value") - .IsRequired() - .HasColumnType("INTEGER") - .HasColumnName("value"); - - b.HasKey("Id"); - - b.ToTable("system_settings"); - }); - modelBuilder.Entity("ConnectionInterface.Watcher", b => { b.Property("Id") @@ -95,7 +70,7 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.HasKey("Id"); - b.ToTable("watchers"); + b.ToTable("watchers", (string)null); }); #pragma warning restore 612, 618 } diff --git a/Installer/FsBuddySetup.exe b/Installer/FsBuddySetup.exe new file mode 100644 index 0000000..18e79d5 Binary files /dev/null and b/Installer/FsBuddySetup.exe differ diff --git a/Installer/Setup.iss b/Installer/Setup.iss new file mode 100644 index 0000000..21b29b3 --- /dev/null +++ b/Installer/Setup.iss @@ -0,0 +1,56 @@ +; Script generated by the Inno Setup Script Wizard. +; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! + +#define MyAppName "FsBuddy" +#define MyAppVersion "1.0" +#define MyAppPublisher "Jhonatan David Asprilla Arango" +#define MyAppURL "https://alertbud.co/fsbuddy" +#define MyAppExeName "Client.exe" + +[Setup] +; NOTE: The value of AppId uniquely identifies this application. Do not use the same AppId value in installers for other applications. +; (To generate a new GUID, click Tools | Generate GUID inside the IDE.) +AppId={{A90A4C64-1376-4636-9563-6FEB37396F1A} +AppName={#MyAppName} +AppVersion={#MyAppVersion} +;AppVerName={#MyAppName} {#MyAppVersion} +AppPublisher={#MyAppPublisher} +AppPublisherURL={#MyAppURL} +AppSupportURL={#MyAppURL} +AppUpdatesURL={#MyAppURL} +DefaultDirName={autopf}\{#MyAppName} +DisableProgramGroupPage=yes +; Remove the following line to run in administrative install mode (install for all users.) +PrivilegesRequired=admin +PrivilegesRequiredOverridesAllowed=commandline +OutputDir=C:\Users\root\source\repos\fsBuddy\Installer +OutputBaseFilename=FsBuddySetup +SetupIconFile=C:\Users\root\Downloads\fsbuddy_icon.ico +Compression=lzma +SolidCompression=yes +WizardStyle=modern +AlwaysRestart=yes + +[Languages] +Name: "english"; MessagesFile: "compiler:Default.isl" +Name: "spanish"; MessagesFile: "compiler:Languages\Spanish.isl" + +[Tasks] +Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked + +[Files] +Source: "C:\Users\root\source\repos\fsBuddy\Client\bin\Release\net6.0-windows7.0\{#MyAppExeName}"; DestDir: "{app}"; Flags: ignoreversion +Source: "C:\Users\root\source\repos\fsBuddy\Client\bin\Release\net6.0-windows7.0\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs +Source: "C:\Users\root\source\repos\fsBuddy\Service\bin\Release\net6.0\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs +; NOTE: Don't use "Flags: ignoreversion" on any shared system files + +[Icons] +Name: "{autoprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}" +Name: "{autodesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon + +[Run] +Filename: "{sys}\sc.exe"; Parameters: "create fsbuddy start=auto binPath=""{app}\Service.exe""" ; Flags: runhidden + +[UninstallRun] +Filename: {sys}\sc.exe; Parameters: "stop fsbuddy" ; Flags: runhidden +Filename: {sys}\sc.exe; Parameters: "delete fsbuddy" ; Flags: runhidden diff --git a/fsBuddyService/FileSystemService.cs b/Service/FileSystemService.cs similarity index 82% rename from fsBuddyService/FileSystemService.cs rename to Service/FileSystemService.cs index 14447a3..c89ead9 100644 --- a/fsBuddyService/FileSystemService.cs +++ b/Service/FileSystemService.cs @@ -4,6 +4,7 @@ using Serilog.Formatting.Compact; using Serilog.Core; using System.ComponentModel.Design; +using Microsoft.Extensions.Logging.EventLog; namespace Service { @@ -11,7 +12,7 @@ class FileSystemService { private string appDirectoryPath; private string logDirectoryPath; - private IHostBuilder _hostBuilder; + public IHostBuilder _hostBuilder; private Logger LoggerFactory() { @@ -43,7 +44,8 @@ public FileSystemService() Log.Logger = LoggerFactory(); - _hostBuilder = Host.CreateDefaultBuilder() + _hostBuilder = Host + .CreateDefaultBuilder() .ConfigureLogging(logging => { logging.ClearProviders(); @@ -57,7 +59,17 @@ public FileSystemService() services.AddSingleton(); services.AddHostedService(provider => provider.GetService()); - }); + + if (OperatingSystem.IsWindows()) + { + services.Configure(config => + { + config.LogName = "fsBuddy"; + config.SourceName = "fsBuddy"; + }); + } + }) + .UseWindowsService(); } public async Task RunAsync() diff --git a/fsBuddyService/FileSystemWatcher.cs b/Service/FileSystemWatcher.cs similarity index 100% rename from fsBuddyService/FileSystemWatcher.cs rename to Service/FileSystemWatcher.cs diff --git a/fsBuddyService/PipeManager.cs b/Service/PipeManager.cs similarity index 99% rename from fsBuddyService/PipeManager.cs rename to Service/PipeManager.cs index 514a4d3..bfd67ff 100644 --- a/fsBuddyService/PipeManager.cs +++ b/Service/PipeManager.cs @@ -25,7 +25,6 @@ class PipeManager : BackgroundService private StreamReader _reader; const string PIPE_NAME = "fsbuddy-service"; - const int PIPE_STREAM_END_BYTE = -1; private Dictionary>> Handlers; diff --git a/fsBuddyService/Properties/launchSettings.json b/Service/Properties/launchSettings.json similarity index 100% rename from fsBuddyService/Properties/launchSettings.json rename to Service/Properties/launchSettings.json diff --git a/fsBuddyService/Service.cs b/Service/Service.cs similarity index 99% rename from fsBuddyService/Service.cs rename to Service/Service.cs index 4bbc9b3..47b040d 100644 --- a/fsBuddyService/Service.cs +++ b/Service/Service.cs @@ -9,3 +9,4 @@ FileSystemService service = new FileSystemService(); await service.RunAsync(); + diff --git a/fsBuddyService/Service.csproj b/Service/Service.csproj similarity index 82% rename from fsBuddyService/Service.csproj rename to Service/Service.csproj index 58568eb..81acc13 100644 --- a/fsBuddyService/Service.csproj +++ b/Service/Service.csproj @@ -8,7 +8,8 @@ - + + @@ -17,7 +18,7 @@ + - diff --git a/fsBuddyService/WatcherManager.cs b/Service/WatcherManager.cs similarity index 100% rename from fsBuddyService/WatcherManager.cs rename to Service/WatcherManager.cs diff --git a/fsBuddyService/appsettings.Development.json b/Service/appsettings.Development.json similarity index 100% rename from fsBuddyService/appsettings.Development.json rename to Service/appsettings.Development.json diff --git a/fsBuddyService/appsettings.json b/Service/appsettings.json similarity index 100% rename from fsBuddyService/appsettings.json rename to Service/appsettings.json diff --git a/fsBuddy.sln b/fsBuddy.sln index 9ea9b62..e0692b4 100644 --- a/fsBuddy.sln +++ b/fsBuddy.sln @@ -3,36 +3,54 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 17 VisualStudioVersion = 17.5.33424.131 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Service", "fsBuddyService\Service.csproj", "{98D2072C-58EC-441A-9635-D5B16F953E7A}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Service", "Service\Service.csproj", "{98D2072C-58EC-441A-9635-D5B16F953E7A}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Client", "fsBuddyClient\Client.csproj", "{3C21D363-AFE4-4DFF-83D6-EE0966AABF41}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Client", "Client\Client.csproj", "{3C21D363-AFE4-4DFF-83D6-EE0966AABF41}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Configuration", "fsBuddyConfiguration\Configuration.csproj", "{D061A062-E8C6-4A12-89A2-F123F0B2ED0D}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Configuration", "Configuration\Configuration.csproj", "{D061A062-E8C6-4A12-89A2-F123F0B2ED0D}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConnectionInterface", "ConnectionInterface\ConnectionInterface.csproj", "{F5D69ADF-9FB3-4447-89DA-829AD3639D05}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ConnectionInterface", "ConnectionInterface\ConnectionInterface.csproj", "{F5D69ADF-9FB3-4447-89DA-829AD3639D05}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU + Debug|x86 = Debug|x86 Release|Any CPU = Release|Any CPU + Release|x86 = Release|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {98D2072C-58EC-441A-9635-D5B16F953E7A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {98D2072C-58EC-441A-9635-D5B16F953E7A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {98D2072C-58EC-441A-9635-D5B16F953E7A}.Debug|x86.ActiveCfg = Debug|Any CPU + {98D2072C-58EC-441A-9635-D5B16F953E7A}.Debug|x86.Build.0 = Debug|Any CPU {98D2072C-58EC-441A-9635-D5B16F953E7A}.Release|Any CPU.ActiveCfg = Release|Any CPU {98D2072C-58EC-441A-9635-D5B16F953E7A}.Release|Any CPU.Build.0 = Release|Any CPU + {98D2072C-58EC-441A-9635-D5B16F953E7A}.Release|x86.ActiveCfg = Release|Any CPU + {98D2072C-58EC-441A-9635-D5B16F953E7A}.Release|x86.Build.0 = Release|Any CPU {3C21D363-AFE4-4DFF-83D6-EE0966AABF41}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {3C21D363-AFE4-4DFF-83D6-EE0966AABF41}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3C21D363-AFE4-4DFF-83D6-EE0966AABF41}.Debug|x86.ActiveCfg = Debug|Any CPU + {3C21D363-AFE4-4DFF-83D6-EE0966AABF41}.Debug|x86.Build.0 = Debug|Any CPU {3C21D363-AFE4-4DFF-83D6-EE0966AABF41}.Release|Any CPU.ActiveCfg = Release|Any CPU {3C21D363-AFE4-4DFF-83D6-EE0966AABF41}.Release|Any CPU.Build.0 = Release|Any CPU + {3C21D363-AFE4-4DFF-83D6-EE0966AABF41}.Release|x86.ActiveCfg = Release|Any CPU + {3C21D363-AFE4-4DFF-83D6-EE0966AABF41}.Release|x86.Build.0 = Release|Any CPU {D061A062-E8C6-4A12-89A2-F123F0B2ED0D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {D061A062-E8C6-4A12-89A2-F123F0B2ED0D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D061A062-E8C6-4A12-89A2-F123F0B2ED0D}.Debug|x86.ActiveCfg = Debug|Any CPU + {D061A062-E8C6-4A12-89A2-F123F0B2ED0D}.Debug|x86.Build.0 = Debug|Any CPU {D061A062-E8C6-4A12-89A2-F123F0B2ED0D}.Release|Any CPU.ActiveCfg = Release|Any CPU {D061A062-E8C6-4A12-89A2-F123F0B2ED0D}.Release|Any CPU.Build.0 = Release|Any CPU + {D061A062-E8C6-4A12-89A2-F123F0B2ED0D}.Release|x86.ActiveCfg = Release|Any CPU + {D061A062-E8C6-4A12-89A2-F123F0B2ED0D}.Release|x86.Build.0 = Release|Any CPU {F5D69ADF-9FB3-4447-89DA-829AD3639D05}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {F5D69ADF-9FB3-4447-89DA-829AD3639D05}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F5D69ADF-9FB3-4447-89DA-829AD3639D05}.Debug|x86.ActiveCfg = Debug|Any CPU + {F5D69ADF-9FB3-4447-89DA-829AD3639D05}.Debug|x86.Build.0 = Debug|Any CPU {F5D69ADF-9FB3-4447-89DA-829AD3639D05}.Release|Any CPU.ActiveCfg = Release|Any CPU {F5D69ADF-9FB3-4447-89DA-829AD3639D05}.Release|Any CPU.Build.0 = Release|Any CPU + {F5D69ADF-9FB3-4447-89DA-829AD3639D05}.Release|x86.ActiveCfg = Release|Any CPU + {F5D69ADF-9FB3-4447-89DA-829AD3639D05}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE