Skip to content

Commit

Permalink
Adding Installment Check utility on startup
Browse files Browse the repository at this point in the history
  • Loading branch information
Lisias committed Jul 19, 2022
1 parent 8a21bdf commit db5f8ef
Show file tree
Hide file tree
Showing 13 changed files with 941 additions and 3 deletions.
37 changes: 37 additions & 0 deletions AirplanePlus.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.810.11
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AirplanePlus", "Source\AirplanePlus\AirplanePlus.csproj", "{4B9138AF-285C-44A8-852F-E579BEAD5BEF}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{4B9138AF-285C-44A8-852F-E579BEAD5BEF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4B9138AF-285C-44A8-852F-E579BEAD5BEF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4B9138AF-285C-44A8-852F-E579BEAD5BEF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4B9138AF-285C-44A8-852F-E579BEAD5BEF}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {BB249C29-F83E-4B77-8085-A05A48EC414C}
EndGlobalSection
GlobalSection(MonoDevelopProperties) = preSolution
Policies = $0
$0.TextStylePolicy = $1
$1.FileWidth = 132
$1.EolMarker = Unix
$1.scope = text/x-csharp
$0.CSharpFormattingPolicy = $2
$2.SpaceAfterColonInBaseTypeDeclaration = False
$2.SpaceAfterSemicolonsInForStatement = False
$2.SpaceBeforeColonInBaseTypeDeclaration = False
$2.scope = text/x-csharp
EndGlobalSection
EndGlobal
12 changes: 11 additions & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,14 @@ All assets under the following subdirectories on GameData/AirplanePlus :

* Plus/

are © Drag0nD3str0yer, Concodroid & MyraJia and licensed under the CC-BY-NC-SA 4.0 International.
are © Drag0nD3str0yer, Concodroid & MyraJia and licensed under the CC-BY-NC-SA 4.0 International.


# Source Code

Source code on the subdirectory Source (and the respective compiled code, DLLs) are double licensed under:

* GPLv2
* SKLv1

And you has the choice to choose the license that best suits your needs.
339 changes: 339 additions & 0 deletions LICENSE.GPL-2_0

Large diffs are not rendered by default.

112 changes: 112 additions & 0 deletions LICENSE.SKL-1_0
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
Standard Lisias' (unofficial) KSP License
Version 1.0. March, 25 2018
http://ksp.lisias.net/SKL-1_0.txt

TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

0. Preamble

The present License is intended to allow You, the user, to use and redistribute this Work as long as it is not modified and it is applied for KSP enhancement, development and/or promotion.

Absolutely no other right is granted in any form, unless additional licensing terms (DOUBLE LICENSING) are mentioned explicitly on the Work's original documentation.

You must comply with this License. Failing to fully accept these License terms, revokes any rights on this Work, unless additional licensing terms are available.

The Author of this License and Work is not a native English speaker. For any orthographic error, misplaced word or false cognate, it should be understood in such a way this Preamble is satisfied.

While some License terms were inspired by the BSD 2, Apache 2.0 and GPL 2.0 licenses, no affiliation or implications of any forms are intended or accepted.


1. Definitions.

"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.

"Licensor" shall mean the copyright owner, owners or entity authorized by the copyright owner(s) that is granting the License.

"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means:

(i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise; or

(ii) ownership of fifty percent (50%) or more of the outstanding shares; or

(iii) beneficial ownership of such entity.

"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.

"Source" form shall mean the preferred form for making modifications, including (but not limited to) software source code, documentation source, and configuration files.

"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including (but not limited to) compiled object code, generated documentation, and conversions to other media types.

"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work.

"Official Distribution Sites" shall mean http://ksp.lisias.net , any additional/replacement URLs as long as owned by Lisias A. Toledo or his affiliates, as well the following third parties sites Curse Forge (https://www.curseforge.com/kerbal/ksp-mods), SpaceDock (https://spacedock.info/kerbal-space-program), Kerbal-X (https://kerbalx.com) *AND* CKAN (https://github.com/KSP-CKAN/CKAN) as long no conditions denying this License terms are imposed.

"KSP" shall mean any past, present or future Software package currently (as March 2018) known as Kerbal Space Program (KSP), obtainable from the site https://kerbalspaceprogram.com/kspstore/ (or any other official distribution location) and copyrighted by Squad or Take Two Interactive.


2. Grant of Copyright License.

Subject to the terms and conditions of this License, the Licensor hereby grants to You a worldwide, non-exclusive, no-charge, royalty-free, conditioned copyright license to reproduce, publicly display, publicly perform, and distribute the Work in the presented unaltered package form as long as the conditions specified at Items 4 and 5 are satisfied.

The Licensor retains the Right to DOUBLE LICENSE the Work. In such event, You are allowed to choose the License that better suits Your needs. The Termination of the Licensing Terms (see Item 9) does not revoke any rights granted to You by additional License(s). The termination of the licensing terms from eventual additional licenses mandatorily subjects You to fully compliance to this License.


3. Grant of Patent License.

Subject to the terms and conditions of this License, the Licensor hereby grants to You a worldwide, non-exclusive, no-charge, royalty-free, conditioned patent license to use the Work under the conditions of this License. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for the Work shall terminate as of the date such litigation is filed.


4. Redistribution.

You may reproduce and further redistribute copies of the Work thereof in any medium, provided that You fulfil the following conditions:

(a) The Work must not be altered, edited, modified or tampered in any form; and

(b) You must give any other recipients of the Work a copy of this License in the same form(s) You receive it; and

(c) You must retain all copyright, patent, trademark, and attribution notices from the Work; and

(d) The distribution package is not changed, altered, obfuscated or edited in any way; and

(e) You explicitly mention the Official Distribution Sites as the canonical source of new versions, information and support for the Work; and

(f) Any and every licensing terms of any companion work that are packaged together the Work are respected and correctly enforced.


5. Conditions for Use of the Work.

You are allowed to use the Work as long the conditions presented in this Item are satisfied. Under no circumstances the Work can be used without the fully compliance of the following terms:

(1) The Work will only be used to produce, fix, promote, enhance or develop add-ons, plugins, modules or any KSP specific artifact including itself. By no means You are allowed to use the Work on or with any artifact intended to be solely used on any other Software than KSP; and

(2) You agree, accept and acquiesce to all the licensing terms of the Work; and

(3) You agree, accept and acquiesce to all the licensing terms of KSP; and

(4) No additional complementary or substituting licensing terms are provided by the Licensor.


6. Access or Use of the Source code

This license explicitly DOES NOT grant You any rights on the Work's Source code other that the right to read it as long the Source is available on the Official Distribution Sites, or other location directly linked or pinpointed by the Official Distribution Sites.


7. Trademarks.

This License DOES NOT grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.


8. Disclaimer of Warranty and Limitation of Liability.

The Licensor provides the Work on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.

In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise shall the Licensor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses).


9. Termination of the Licensing Terms

If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on You (whether by court order, agreement or otherwise) that contradict any conditions of this License, they do not excuse You from the conditions of this License.

If any portion of this section is held invalid or unenforceable under any particular circumstance, the whole License is Null and Void for You, and You are not allowed to further using and redistributing the Work unless under the terms of an additional license, if present.


4 changes: 3 additions & 1 deletion NOTICE
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
"AirplanePlus" is trademark blackheart612
"AirplanePlus (Plus)" is trademark of Drag0nD3str0yer
"AirplanePlus /L" is trademark of LisiasT
"Airplane++ /L" is trademark of LisiasT

"Kerbal Standard" is a fictitious entity created for entertainment purposes. It is in no way meant to represent a real entity. Any similarity to a real entity is purely coincidental.

"/L Aerospace" is a fictitious entity created for entertainment purposes. It is in no way meant to represent a real entity. Any similarity to a real entity is purely coincidental.

"Kerbal Space Program" is ©2011-2017 Squad; ©2011-2022 Take-Two Interactive Software, Inc. This project is in no way associated with nor endorsed by Squad or Take-Two Interactive.

Other trademarks and registered trademarks are the property of the respective trademark holders.
Expand Down
31 changes: 30 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ Please note the copyrights and trademarks in [NOTICE](./NOTICE).
### Assets by blackheart612

Unless explicitly stated otherwise, all assets under the following subdirectories on `GameData/AirplanePlus`:

* [Agencies](./GameData/AirplanePlus/Agencies)
* [Compatibility](./GameData/AirplanePlus/Compatibility)
* [FX](./GameData/AirplanePlus/FX)
Expand All @@ -81,6 +80,36 @@ All assets under the following subdirectories:

are ©[Drag0nD3str0yer](https://forum.kerbalspaceprogram.com/?app=core&module=members&controller=profile&id=173824) and licensed under [CC BY-NC-SA 4.0](https://creativecommons.org/licenses/by-nc-sa/4.0/?).

### Source Code

Source code on the subdirectory [Source](./Source) (and the respective compiled code, DLLs) are double licensed as follows:

* [SKL 1.0](https://ksp.lisias.net/SKL-1_0.txt). See [here](./LICENSE.KSPe.SKL-1_0)
+ You are free to:
- Use : unpack and use the material in any computer or device
- Redistribute : redistribute the original package in any medium
+ Under the following terms:
- You agree to use the material only on (or to) KSP
- You don't alter the package in any form or way (but you can embedded it)
- You don't change the material in any way, and retain any copyright notices
- You must explicitly state the author's Copyright, as well an Official Site for downloading the original and new versions (the one you used to download is good enough)
* [GPL 2.0](https://www.gnu.org/licenses/gpl-2.0.txt). See [here](./LICENSE.KSPe.GPL-2_0)
+ You are free to:
- Use : unpack and use the material in any computer or device
- Redistribute : redistribute the original package in any medium
- Adapt : Reuse, modify or incorporate source code into your works (and redistribute it!)
+ Under the following terms:
- You retain any copyright notices
- You recognise and respect any trademarks
- You don't impersonate the authors, neither redistribute a derivative that could be misrepresented as theirs.
- You credit the author and republish the copyright notices on your works where the code is used.
- You relicense (and fully comply) your works using GPL 2.0 (or later)
- Please note that upgrading the license to GPLv3 **IS NOT ALLOWED** for this work, as the author **DID NOT** added the "or (at your option) any later version" on the license.
- You don't mix your work with GPL incompatible works.
* If by some reason the GPL would be invalid for you, rest assured that you still retain the right to Use the Work under SKL 1.0.

And you has the choice to choose the license that best suits your needs.

## References

* [blackheart612](https://forum.kerbalspaceprogram.com/index.php?/profile/42741-blackheart612/) ROOT
Expand Down
66 changes: 66 additions & 0 deletions Source/AirplanePlus/AirplanePlus.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{4B9138AF-285C-44A8-852F-E579BEAD5BEF}</ProjectGuid>
<OutputType>Library</OutputType>
<RootNamespace>AirplanePlus</RootNamespace>
<AssemblyName>AirplanePlus</AssemblyName>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<BaseIntermediateOutputPath>..\..\obj\Unity5</BaseIntermediateOutputPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\..\bin\Debug</OutputPath>
<DefineConstants>DEBUG;</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<ConsolePause>false</ConsolePause>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<Optimize>true</Optimize>
<OutputPath>..\..\bin\Release</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<ConsolePause>false</ConsolePause>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="KSPe">
<HintPath>..\..\..\..\..\..\LIB\plugins\KSPe.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="KSPe.UI">
<HintPath>..\..\..\..\..\..\LIB\plugins\KSPe.UI.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="UnityEngine">
<HintPath>..\..\..\..\..\..\LIB\managed\1.3.0\UnityEngine.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Assembly-CSharp">
<HintPath>..\..\..\..\..\..\LIB\managed\1.3.0\Assembly-CSharp.dll</HintPath>
<Private>False</Private>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Properties\LegalMamboJambo.cs" />
<Compile Include="Startup.cs" />
<Compile Include="Log.cs" />
<Compile Include="Properties\Version.cs">
<DependentUpon>Version.tt</DependentUpon>
</Compile>
<Compile Include="GUI\UnmetRequirementsShowStopperAlertBox.cs" />
</ItemGroup>
<ItemGroup>
<None Include="Properties\Version.tt">
<Generator>TextTemplatingFileGenerator</Generator>
<LastGenOutput>Version.cs</LastGenOutput>
</None>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
</Project>
46 changes: 46 additions & 0 deletions Source/AirplanePlus/GUI/UnmetRequirementsShowStopperAlertBox.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
/*
This file is part of Airplane++ /L
© 2022 by:
Drag0nD3str0yer : https://github.com/Drag0nD3str0yer <
LisiasT : http://lisias.net <support@lisias.net>
The Source Code for Airplane++ is double licensed, as follows:
* SKL 1.0 : https://ksp.lisias.net/SKL-1_0.txt
* GPL 2.0 : https://www.gnu.org/licenses/gpl-2.0.txt
And you are allowed to choose the License that better suit your needs.
Airplane++ /L is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
You should have received a copy of the SKL Standard License 1.0
along with Airplane++ /L. If not, see <https://ksp.lisias.net/SKL-1_0.txt>.
You should have received a copy of the GNU General Public License 2.0
along with Airplane++ /L. If not, see <https://www.gnu.org/licenses/>.
*/
using UnityEngine;
using KSPe.UI;

namespace AirplanePlus.GUI
{
internal class UnmetRequirementsShowStopperAlertBox
{
private static readonly string MSG = @"Unfortunately Airplane+ is unable to proceed due unmet requirements!
You need to have {0} installed, otherwise this Add'On will not work as intended.";

private static readonly string AMSG = @"download and install {0} and then restart KSP (it will close now)";

internal static void Show(string failedRequirement)
{
KSPe.Common.Dialogs.ShowStopperAlertBox.Show(
string.Format(MSG, failedRequirement),
string.Format(AMSG, failedRequirement),
() => { Application.Quit(); }
);
Log.detail("\"Houston, we have a Problem!\" about unmet dependencies {0} was displayed", failedRequirement);
}
}
}
Loading

0 comments on commit db5f8ef

Please sign in to comment.