More work on the installer, cleanup, back to MIT because i read unlicensed is illegal in some countries 🤦

This commit is contained in:
Master Kwoth 2017-06-04 05:09:19 +02:00
parent ff07777a38
commit 747a834e60
16 changed files with 53 additions and 78 deletions

39
NadekoBot.iss Normal file
View File

@ -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";

View File

@ -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 <http://unlicense.org/>

View File

@ -1,5 +1,4 @@
using Discord;
using Discord.WebSocket;
using System.Threading.Tasks;
namespace NadekoBot.DataStructures.ModuleBehaviors

View File

@ -1,6 +1,4 @@
using System;
using System.Collections.Generic;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Migrations;
namespace NadekoBot.Migrations
{

View File

@ -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
{

View File

@ -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

View File

@ -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
//{

View File

@ -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;

View File

@ -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();

View File

@ -19,7 +19,7 @@
<AssemblyVersion>1.0.0.0</AssemblyVersion>
<FileVersion>1.0.0.0</FileVersion>
<ApplicationIcon>nadeko_icon.ico</ApplicationIcon>
<RuntimeIdentifiers>win7-x64;ubuntu.14.04-x64;osx.10.10-x64</RuntimeIdentifiers>
<RuntimeIdentifiers>win7-x64<!--;ubuntu.14.04-x64;osx.10.10-x64 --></RuntimeIdentifiers>
</PropertyGroup>
<PropertyGroup Condition=" '$(Version)' == '' ">
@ -28,6 +28,10 @@
<Version Condition=" '$(Version)' == '' ">$(VersionPrefix)</Version>
</PropertyGroup>
<PropertyGroup>
<PostBuildEvent>copy credentials_example.json credentials.json </PostBuildEvent>
</PropertyGroup>
<ItemGroup>
<Compile Remove="data\**\*;credentials.json" />
<None Update="credentials_example.json">

View File

@ -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";

View File

@ -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;

View File

@ -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

View File

@ -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

View File

@ -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;

View File

@ -1,8 +1,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace NadekoBot.Extensions
{