diff --git a/NadekoBot.iss b/NadekoBot.iss new file mode 100644 index 00000000..c56caae3 --- /dev/null +++ b/NadekoBot.iss @@ -0,0 +1,39 @@ +#define sysfolder "system" +#define version "1.41" +#define target "win7-x64" + +[Setup] +AppName=NadekoBot +AppVersion={#version} +AppPublisher=Kwoth +DefaultDirName={pf}\NadekoBot +DefaultGroupName=NadekoBot +UninstallDisplayIcon={app}\{#sysfolder}\NadekoBot.exe +Compression=lzma2 +SolidCompression=yes +OutputDir=userdocs:projekti/NadekoInstallerOutput +OutputBaseFilename=NadekoBot-setup-{#version} +AppReadmeFile=http://nadekobot.readthedocs.io/en/latest/Commands%20List/ + +[Files] +;install +Source: "src\NadekoBot\bin\Release\PublishOutput\{#target}\*"; DestDir: "{app}\{#sysfolder}"; Permissions: users-modify; Flags: recursesubdirs onlyifdoesntexist ignoreversion createallsubdirs; Excludes: "*.pdb, *.db" + +;reinstall - i want to copy all files, but i don't want to overwrite any data files because users will lose their customization if they don't have a backup, +; and i don't want them to have to backup and then copy-merge into data folder themselves, or lose their currency images due to overwrite. +Source: "src\NadekoBot\bin\Release\PublishOutput\{#target}\*"; DestDir: "{app}\{#sysfolder}"; Permissions: users-modify; Flags: recursesubdirs onlyifdestfileexists createallsubdirs; Excludes: "*.pdb, *.db, data\*, credentials.json"; +Source: "src\NadekoBot\bin\Release\PublishOutput\{#target}\data\*"; DestDir: "{app}\{#sysfolder}\data"; Permissions: users-modify; Flags: recursesubdirs onlyifdoesntexist createallsubdirs; + +;readme +;Source: "readme"; DestDir: "{app}"; Flags: isreadme + +[Run] +Filename: "http://nadekobot.readthedocs.io/en/latest/Commands%20List/"; Flags: postinstall checked shellexec runasoriginaluser; Description: "Open Command List" + +[Icons] +; for pretty install directory +Name: "{app}\NadekoBot"; Filename: "{app}\{#sysfolder}\NadekoBot.exe"; IconFilename: "{app}\{#sysfolder}\nadeko_icon.ico" +Name: "{app}\credentials"; Filename: "{app}\{#sysfolder}\credentials.json" +Name: "{app}\data"; Filename: "{app}\{#sysfolder}\data" +; desktop shortcut +Name: "{commondesktop}\NadekoBot"; Filename: "{app}\NadekoBot"; \ No newline at end of file diff --git a/license.md b/license.md index 68a49daa..f69f3730 100644 --- a/license.md +++ b/license.md @@ -1,24 +1,9 @@ -This is free and unencumbered software released into the public domain. +Copyright 2017 Kwoth -Anyone is free to copy, modify, publish, use, compile, sell, or -distribute this software, either in source code form or as a compiled -binary, for any purpose, commercial or non-commercial, and by any -means. +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -In jurisdictions that recognize copyright laws, the author or authors -of this software dedicate any and all copyright interest in the -software to the public domain. We make this dedication for the benefit -of the public at large and to the detriment of our heirs and -successors. We intend this dedication to be an overt act of -relinquishment in perpetuity of all present and future rights to this -software under copyright law. +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR -OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. For more information, please refer to diff --git a/src/NadekoBot/DataStructures/ModuleBehaviors/IEarlyBlocker.cs b/src/NadekoBot/DataStructures/ModuleBehaviors/IEarlyBlocker.cs index 4bc0fc74..9c10e910 100644 --- a/src/NadekoBot/DataStructures/ModuleBehaviors/IEarlyBlocker.cs +++ b/src/NadekoBot/DataStructures/ModuleBehaviors/IEarlyBlocker.cs @@ -1,5 +1,4 @@ using Discord; -using Discord.WebSocket; using System.Threading.Tasks; namespace NadekoBot.DataStructures.ModuleBehaviors diff --git a/src/NadekoBot/Migrations/20170530033406_guild-prefixes.cs b/src/NadekoBot/Migrations/20170530033406_guild-prefixes.cs index cb492268..84cef8ce 100644 --- a/src/NadekoBot/Migrations/20170530033406_guild-prefixes.cs +++ b/src/NadekoBot/Migrations/20170530033406_guild-prefixes.cs @@ -1,6 +1,4 @@ -using System; -using System.Collections.Generic; -using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Migrations; namespace NadekoBot.Migrations { diff --git a/src/NadekoBot/Migrations/NadekoSqliteContextModelSnapshot.cs b/src/NadekoBot/Migrations/NadekoSqliteContextModelSnapshot.cs index 20416f86..72a6ceba 100644 --- a/src/NadekoBot/Migrations/NadekoSqliteContextModelSnapshot.cs +++ b/src/NadekoBot/Migrations/NadekoSqliteContextModelSnapshot.cs @@ -2,9 +2,7 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Migrations; using NadekoBot.Services.Database; -using NadekoBot.Services.Database.Models; namespace NadekoBot.Migrations { diff --git a/src/NadekoBot/Modules/Administration/Commands/PrefixCommands.cs b/src/NadekoBot/Modules/Administration/Commands/PrefixCommands.cs index b7716b52..8f8d4cec 100644 --- a/src/NadekoBot/Modules/Administration/Commands/PrefixCommands.cs +++ b/src/NadekoBot/Modules/Administration/Commands/PrefixCommands.cs @@ -1,8 +1,6 @@ using Discord; using Discord.Commands; using NadekoBot.Attributes; -using NadekoBot.Services; -using NadekoBot.Services.Administration; using System.Threading.Tasks; namespace NadekoBot.Modules.Administration diff --git a/src/NadekoBot/Modules/Gambling/Commands/Lucky7Commands.cs b/src/NadekoBot/Modules/Gambling/Commands/Lucky7Commands.cs index 04120aa6..725fe7c0 100644 --- a/src/NadekoBot/Modules/Gambling/Commands/Lucky7Commands.cs +++ b/src/NadekoBot/Modules/Gambling/Commands/Lucky7Commands.cs @@ -1,16 +1,4 @@ -using System.Collections.Concurrent; -using System.Collections.Generic; -using System.Collections.Immutable; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Discord.Commands; -using Discord; -using NadekoBot.Attributes; -using NadekoBot.Extensions; -using NadekoBot.Services; - -namespace NadekoBot.Modules.Gambling +namespace NadekoBot.Modules.Gambling { //public partial class Gambling //{ diff --git a/src/NadekoBot/Modules/NadekoModule.cs b/src/NadekoBot/Modules/NadekoModule.cs index 6877d0de..8a53db50 100644 --- a/src/NadekoBot/Modules/NadekoModule.cs +++ b/src/NadekoBot/Modules/NadekoModule.cs @@ -2,7 +2,6 @@ using Discord.Commands; using NadekoBot.Extensions; using NadekoBot.Services; -using NadekoBot.Services.Administration; using NLog; using System.Globalization; using System.Threading.Tasks; diff --git a/src/NadekoBot/NadekoBot.cs b/src/NadekoBot/NadekoBot.cs index 14730245..0a3bdb42 100644 --- a/src/NadekoBot/NadekoBot.cs +++ b/src/NadekoBot/NadekoBot.cs @@ -25,7 +25,6 @@ using NadekoBot.Services.Administration; using NadekoBot.Services.Permissions; using NadekoBot.Services.Utility; using NadekoBot.Services.Help; -using NadekoBot.Extensions; namespace NadekoBot { @@ -222,6 +221,7 @@ namespace NadekoBot private async Task LoginAsync(string token) { + _log.Info("Logging in..."); //connect await Client.LoginAsync(TokenType.Bot, token).ConfigureAwait(false); await Client.StartAsync().ConfigureAwait(false); @@ -231,6 +231,7 @@ namespace NadekoBot foreach (var s in Client.Shards) s.Ready += () => Task.FromResult(Interlocked.Increment(ref readyCount)); + _log.Info("Waiting for all shards to connect..."); while (readyCount < Client.Shards.Count) await Task.Delay(100).ConfigureAwait(false); } @@ -243,6 +244,7 @@ namespace NadekoBot await LoginAsync(Credentials.Token).ConfigureAwait(false); + _log.Info("Loading serveices..."); AddServices(); sw.Stop(); diff --git a/src/NadekoBot/NadekoBot.csproj b/src/NadekoBot/NadekoBot.csproj index 438259e9..3f22fffc 100644 --- a/src/NadekoBot/NadekoBot.csproj +++ b/src/NadekoBot/NadekoBot.csproj @@ -19,7 +19,7 @@ 1.0.0.0 1.0.0.0 nadeko_icon.ico - win7-x64;ubuntu.14.04-x64;osx.10.10-x64 + win7-x64 @@ -28,6 +28,10 @@ $(VersionPrefix) + + copy credentials_example.json credentials.json + + diff --git a/src/NadekoBot/NadekoBot.iss b/src/NadekoBot/NadekoBot.iss deleted file mode 100644 index e249d8bf..00000000 --- a/src/NadekoBot/NadekoBot.iss +++ /dev/null @@ -1,28 +0,0 @@ -; -- Example1.iss -- -; Demonstrates copying 3 files and creating an icon. - -; SEE THE DOCUMENTATION FOR DETAILS ON CREATING .ISS SCRIPT FILES! -#define sysfolder "system" - - -[Setup] -AppName=NadekoBot -AppVersion=1.41 -DefaultDirName={pf}\NadekoBot -DefaultGroupName=NadekoBot -UninstallDisplayIcon={app}\NadekoBot.exe -Compression=lzma2 -SolidCompression=yes -OutputDir=userdocs:Inno Setup Examples Output - -[Files] -Source: "bin\Release\PublishOutput\win7-x64\*"; DestDir: "{app}\system"; Flags: recursesubdirs -Source: "..\..\docs\Readme.md"; DestDir: "{app}"; Flags: isreadme - -[Icons] -; for pretty install directory -Name: "{app}\NadekoBot"; Filename: "{app}\{#sysfolder}\NadekoBot.exe"; IconFilename: "{app}\{#sysfolder}\nadeko_icon.ico" -Name: "{app}\credentials"; Filename: "{app}\{#sysfolder}\credentials.json" -Name: "{app}\data"; Filename: "{app}\{#sysfolder}\data" -; desktop shortcut -Name: "{commondesktop}\NadekoBot"; Filename: "{app}\NadekoBot"; diff --git a/src/NadekoBot/Services/CommandHandler.cs b/src/NadekoBot/Services/CommandHandler.cs index addcf2da..dec52f6a 100644 --- a/src/NadekoBot/Services/CommandHandler.cs +++ b/src/NadekoBot/Services/CommandHandler.cs @@ -13,7 +13,6 @@ using NadekoBot.DataStructures; using System.Collections.Immutable; using NadekoBot.DataStructures.ModuleBehaviors; using NadekoBot.Services.Database.Models; -using NadekoBot.Services; using System.IO; using Discord.Net; diff --git a/src/NadekoBot/Services/Permissions/BlacklistService.cs b/src/NadekoBot/Services/Permissions/BlacklistService.cs index 103d04e4..4f7a691d 100644 --- a/src/NadekoBot/Services/Permissions/BlacklistService.cs +++ b/src/NadekoBot/Services/Permissions/BlacklistService.cs @@ -3,7 +3,6 @@ using NadekoBot.Services.Database.Models; using System.Collections.Concurrent; using System.Linq; using Discord; -using Discord.WebSocket; using System.Threading.Tasks; namespace NadekoBot.Services.Permissions diff --git a/src/NadekoBot/Services/Permissions/GlobalPermissionService.cs b/src/NadekoBot/Services/Permissions/GlobalPermissionService.cs index 96134c8d..633a81a3 100644 --- a/src/NadekoBot/Services/Permissions/GlobalPermissionService.cs +++ b/src/NadekoBot/Services/Permissions/GlobalPermissionService.cs @@ -4,7 +4,6 @@ using System.Collections.Concurrent; using System.Linq; using Discord; using Discord.WebSocket; -using System; using System.Threading.Tasks; namespace NadekoBot.Services.Permissions diff --git a/src/NadekoBot/Services/Utility/CommandMapService.cs b/src/NadekoBot/Services/Utility/CommandMapService.cs index 413c360d..9fe6e546 100644 --- a/src/NadekoBot/Services/Utility/CommandMapService.cs +++ b/src/NadekoBot/Services/Utility/CommandMapService.cs @@ -1,10 +1,8 @@ using NadekoBot.DataStructures.ModuleBehaviors; using NadekoBot.Services.Database.Models; -using System; using System.Collections.Concurrent; using System.Collections.Generic; using System.Linq; -using System.Text; using System.Threading.Tasks; using Discord; using NLog; diff --git a/src/NadekoBot/_Extensions/IEnumerableExtensions.cs b/src/NadekoBot/_Extensions/IEnumerableExtensions.cs index fc930fe0..80411c9c 100644 --- a/src/NadekoBot/_Extensions/IEnumerableExtensions.cs +++ b/src/NadekoBot/_Extensions/IEnumerableExtensions.cs @@ -1,8 +1,6 @@ using System; using System.Collections.Generic; using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace NadekoBot.Extensions {