Skip to content

Commit

Permalink
Merge pull request #38 from ihsoft/next
Browse files Browse the repository at this point in the history
Release v2.3
  • Loading branch information
ihsoft authored Jul 2, 2021
2 parents 7e8858f + bd5141d commit e808f02
Show file tree
Hide file tree
Showing 19 changed files with 1,950 additions and 1,530 deletions.
Binary file removed Binaries/KSPDev_Utils.2.4.dll
Binary file not shown.
Binary file added Binaries/KSPDev_Utils.2.6-EVS.dll
Binary file not shown.
3,038 changes: 1,698 additions & 1,340 deletions Binaries/KSPDev_Utils.2.4.xml → Binaries/KSPDev_Utils.2.6-EVS.xml

Large diffs are not rendered by default.

9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
# 2.2 (Jaunary 19th, 2021)
# 2.3 (July 1st, 2021)
* [Change] The hint overlay now uses the stock Unity GUI style.
* [Change] The only adjustable text property is now the font size. Set the font size to `0` or just comment out the line to use the default game's font size.
* [Change] The hint overlay is now rescaling to the game's UI scale.
* [Change] An explicit setting `showOverlay` is added to the settings to stop showing the overlay.
* [Enhancement] Workaround the `KSP 1.12` bug that halts the game in case of duplicated mods are detected.

# 2.2 (January 19th, 2021)
* [Change] Switch to KSP 1.11. There is no backwards compatibility!
* [Change] Drop the old `MiniAVC` in favor of `MiniAVC-V2`.
* [Enhancement] Some fixes in French localization.
Expand Down
6 changes: 3 additions & 3 deletions EasyVesselSwitch.version
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
"NAME": "Easy Vessel Switch",
"URL": "https://raw.githubusercontent.com/ihsoft/EasyVesselSwitch/master/EasyVesselSwitch.version",
"VERSION": {
"BUILD": 40431,
"BUILD": 41352,
"MAJOR": 2,
"MINOR": 2,
"PATCH": 7689
"MINOR": 3,
"PATCH": 7852
}
}
9 changes: 3 additions & 6 deletions PluginData/settings.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,11 @@ UI
}
InfoOverlay
{
// tells if the overlay with brioef info should be presented when hovered
// over a vessel with the `vesselSwitchKey` pressed.
showOverlay = true
// Vessel info hint overlay font size.
fontSize = 10
// RGBA format.
backgroundColor = 0,0,0,0.5
// RGBA format. Set it to 0,0,0,0 to completely disable the info overlay.
textColor = 1,1,1,1
// Pixels between the border and the text in the vessel info hint overlay.
hintPadding = 6
}
CameraStabilization
{
Expand Down
215 changes: 106 additions & 109 deletions Source/Controller.cs

Large diffs are not rendered by default.

11 changes: 9 additions & 2 deletions Source/EasyVesselSwitch.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
<SignAssembly>False</SignAssembly>
<DelaySign>False</DelaySign>
<RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent>
<LangVersion>9</LangVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'AnyCPU' ">
<PlatformTarget>x64</PlatformTarget>
Expand Down Expand Up @@ -56,8 +57,8 @@
<Reference Include="Assembly-CSharp-firstpass, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null">
<HintPath>Q:\KSP_x64_Data\Managed\Assembly-CSharp-firstpass.dll</HintPath>
</Reference>
<Reference Include="KSPDev_Utils.2.4, Version=2.4.7504.27510, Culture=neutral, PublicKeyToken=null">
<HintPath>..\Binaries\KSPDev_Utils.2.4.dll</HintPath>
<Reference Include="KSPDev_Utils.2.6-EVS, Version=2.6.0.0, Culture=neutral, PublicKeyToken=null">
<HintPath>..\Binaries\KSPDev_Utils.2.6-EVS.dll</HintPath>
</Reference>
<Reference Include="System">
<HintPath>Q:\KSP_x64_Data\Managed\System.dll</HintPath>
Expand All @@ -69,6 +70,12 @@
<Reference Include="UnityEngine.CoreModule">
<HintPath>Q:\KSP_x64_Data\Managed\UnityEngine.CoreModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.IMGUIModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null">
<HintPath>Q:\KSP_x64_Data\Managed\UnityEngine.IMGUIModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.TextRenderingModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null">
<HintPath>Q:\KSP_x64_Data\Managed\UnityEngine.TextRenderingModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.UI">
<HintPath>Q:\KSP_x64_Data\Managed\UnityEngine.UI.dll</HintPath>
<Private>False</Private>
Expand Down
6 changes: 3 additions & 3 deletions Source/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
//
// You can specify all the values or you can use the default the Revision and
// Build Numbers by using the '*' as shown below:
[assembly: AssemblyVersion ("2.2.*")]
[assembly: AssemblyInformationalVersion ("2.2 for KSP v1.11+")]
[assembly: AssemblyVersion ("2.3.*")]
[assembly: AssemblyInformationalVersion ("2.3 for KSP v1.11+")]
[assembly: Guid ("52fd90de-a2a6-4642-8fc4-50f8d938319c")]
[assembly: KSPAssembly ("EasyVesselSwitch", 2, 2)]
[assembly: KSPAssembly ("EasyVesselSwitch", 2, 3)]
[assembly: AssemblyFlags (AssemblyNameFlags.PublicKey | AssemblyNameFlags.EnableJITcompileOptimizer)]
34 changes: 34 additions & 0 deletions Tools/KspReleaseBuilder_License.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# KSPDev: Kerbal Development tools - ReleaseBuilder

Author: [email protected]

GitHub: https://github.com/ihsoft/KSPDev/tree/master/Sources/ReleaseBuilder

* * *

## License

This is free and unencumbered software released into the public domain.

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.

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

For more information, please refer to <http://unlicense.org/>
12 changes: 12 additions & 0 deletions Tools/KspReleaseBuilder_Readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# KSPDev: Kerbal Development tools - ReleaseBuilder

`ReleaseBuilder` is flexible script that allows building mod releases for KSP quick and easy.
Just define mod's structure and the script will manage everything else: from updating MinAVC
version file to preparing final ZIP package.

Read discussions, ask questions and suggest features on
[forum](http://forum.kerbalspaceprogram.com/index.php?/topic/150786-12-kspdev-logconsole-utils).

# Documentation

See Wiki: https://github.com/ihsoft/KSPDev/wiki/ReleaseBuilder
30 changes: 11 additions & 19 deletions Tools/PublishCurseForge.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Public domain license.
# Author: [email protected]
# GitHub: https://github.com/ihsoft/KSPDev_ReleaseBuilder
# $version: 2
# $date: 10/16/2018
# $version: 4
# $date: 10/28/2018

""" Script to publish releases to Kerbal CurseForge.
Expand Down Expand Up @@ -72,6 +72,7 @@
import textwrap

from clients import CurseForgeClient
from utils import ChangelogUtils


LOGGER = logging.getLogger()
Expand Down Expand Up @@ -138,6 +139,10 @@ def main(argv):
default='.+?_(v.+?)\\.zip',
help='''the RegExp to extract the version tag from the archive name.
[Default: %(default)s]''')
parser.add_argument(
'--github', action='store', metavar='<GitHub>',
help='''the GitHub project and user, separated by "/" symbol. Used when
expanding the GitHub links. Example: "ihsoft/KIS"''')
opts = vars(parser.parse_args(argv[1:]))

project_id = opts['project']
Expand Down Expand Up @@ -166,7 +171,10 @@ def main(argv):
print 'ERROR: No versions found for RegExp: %s' % versions_re
exit(-1)

desc = _ExtractDescription(opts['changelog'], opts['changelog_breaker'])
desc = ChangelogUtils.ExtractDescription(
opts['changelog'], opts['changelog_breaker'])
if opts['github']:
desc = ChangelogUtils.ProcessGitHubLinks(desc, opts['github'])
filename = opts['archive']

if opts['title']:
Expand Down Expand Up @@ -219,20 +227,4 @@ def _Shutdown():
logging.shutdown()


def _ExtractDescription(changelog_file, breaker_re):
"""Helper method to extract the meaningful part of the release changelog."""
with open(changelog_file, 'r') as f:
lines= f.readlines()
changelog = ''
for line in lines:
# Ignore any trailing empty lines.
if not changelog and not line.strip():
continue
# Stop at the breaker.
if re.match(breaker_re, line.strip()):
break
changelog += line
return changelog.strip()


main(sys.argv)
30 changes: 8 additions & 22 deletions Tools/PublishGitHub.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Public domain license.
# Author: [email protected]
# GitHub: https://github.com/ihsoft/KSPDev_ReleaseBuilder
# $version: 1
# $date: 07/17/2018
# $version: 2
# $date: 10/28/2018

""" Script to publish releases to GitHub.
Expand All @@ -11,7 +11,7 @@
Example:
$ PublishCurseForge.py\
$ PublishGitHub.py\
--user=my_github_user\
--repo=MyGitHubMod\
--token=1111111111122222222222222333333333333333\
Expand Down Expand Up @@ -40,7 +40,7 @@
Not to mention the quotes and back slashes issues. To avoid all this burden,
simple put all the options into a text file and provide it to the script:
$ PublishCurseForge.py @my_params.txt
$ PublishGitHub.py @my_params.txt
Don't bother about escaping in this file. Anything, placed in a line goes to
the parameter value *as-is*. So you don't need to escape backslashes,
Expand All @@ -67,6 +67,7 @@
import textwrap

from clients import GitHubClient
from utils import ChangelogUtils


LOGGER = logging.getLogger()
Expand Down Expand Up @@ -136,10 +137,11 @@ def main(argv):
user = opts['user']
repo = opts['repo']

# Init CurseForge client.
# Init GitHub client.
GitHubClient.API_TOKEN = opts['token']

desc = _ExtractDescription(opts['changelog'], opts['changelog_breaker'])
desc = ChangelogUtils.ExtractDescription(
opts['changelog'], opts['changelog_breaker'])
filename = opts['archive']
as_draft = opts['as_draft']

Expand Down Expand Up @@ -190,22 +192,6 @@ def _Shutdown():
logging.shutdown()


def _ExtractDescription(changelog_file, breaker_re):
"""Helper method to extract the meaningful part of the release changelog."""
with open(changelog_file, 'r') as f:
lines= f.readlines()
changelog = ''
for line in lines:
# Ignore any trailing empty lines.
if not changelog and not line.strip():
continue
# Stop at the breaker.
if re.match(breaker_re, line.strip()):
break
changelog += line
return changelog.strip()


try:
main(sys.argv)
except Exception, ex:
Expand Down
34 changes: 13 additions & 21 deletions Tools/PublishSpacedock.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Public domain license.
# Author: [email protected]
# GitHub: https://github.com/ihsoft/KSPDev_ReleaseBuilder
# $version: 1
# $date: 07/13/2018
# $version: 5
# $date: 10/28/2018

""" Script to publish releases to Spacedock.
Expand Down Expand Up @@ -32,7 +32,7 @@
Not to mention the quotes and back slashes issues. To avoid all this burden,
simple put all the options into a text file and provide it to the script:
$ PublishCurseForge.py @my_params.txt
$ PublishSpacedock.py @my_params.txt
Don't bother about escaping in this file. Anything, placed in a line goes to
the parameter value *as-is*. So you don't need to escape backslashes,
Expand Down Expand Up @@ -62,6 +62,7 @@
import textwrap

from clients import SpacedockClient
from utils import ChangelogUtils


LOGGER = logging.getLogger()
Expand Down Expand Up @@ -90,7 +91,7 @@ def main(argv):
parser.add_argument(
'--project', action='store', metavar='<project ID>', required=True,
help='''the ID of the project to publish to. To get it, go to the mod
overview on Spacedock and extarct the number from the URL:
overview on Spacedock and extract the number from the URL:
/mod/<project ID>/...''')
parser.add_argument(
'--changelog', action='store', metavar='<file path>', required=True,
Expand Down Expand Up @@ -125,6 +126,10 @@ def main(argv):
'--pass', action='store', metavar='<SD password>',
help='''the password for the Spacedock account. If not set, then it will
be asked in the command line.''')
parser.add_argument(
'--github', action='store', metavar='<GitHub>',
help='''the GitHub project and user, separated by "/" symbol. Used when
expanding the GitHub links. Example: "ihsoft/KIS"''')
opts = vars(parser.parse_args(argv[1:]))

mod_id = opts['project']
Expand All @@ -149,7 +154,10 @@ def main(argv):
exit(-1)
game_version = all_versions[0]['name']

desc = _ExtractDescription(opts['changelog'], opts['changelog_breaker'])
desc = ChangelogUtils.ExtractDescription(
opts['changelog'], opts['changelog_breaker'])
if opts['github']:
desc = ChangelogUtils.ProcessGitHubLinks(desc, opts['github'])
filename = opts['archive']

parts = re.findall(opts['version_extract'], os.path.basename(filename))
Expand Down Expand Up @@ -214,20 +222,4 @@ def _Shutdown():
logging.shutdown()


def _ExtractDescription(changelog_file, breaker_re):
"""Helper method to extract the meaningful part of the release changelog."""
with open(changelog_file, 'r') as f:
lines= f.readlines()
changelog = ''
for line in lines:
# Ignore any trailing empty lines.
if not changelog and not line.strip():
continue
# Stop at the breaker.
if re.match(breaker_re, line.strip()):
break
changelog += line
return changelog.strip()


main(sys.argv)
3 changes: 2 additions & 1 deletion Tools/publish_curseforge_args.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
--project=245805
--token=<<SECRET>>
--changelog=../CHANGELOG.md
--github=ihsoft/EasyVesselSwitch
--versions=latest_all_builds
--title=EVS {tag}
--archive=../EasyVesselSwitch_v2.1.zip
--archive=../EasyVesselSwitch_v2.3.zip
2 changes: 1 addition & 1 deletion Tools/publish_github_args.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
--changelog=../CHANGELOG.md
--as_draft
--title=EVS v{tag}
--archive=../EasyVesselSwitch_v2.1.zip
--archive=../EasyVesselSwitch_v2.3.zip
3 changes: 2 additions & 1 deletion Tools/publish_spacedock_args.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
--project=1906
--login=<<SECRET>>
--changelog=../CHANGELOG.md
--github=ihsoft/EasyVesselSwitch
--ksp_version=latest
--archive=../EasyVesselSwitch_v2.1.zip
--archive=../EasyVesselSwitch_v2.3.zip
1 change: 0 additions & 1 deletion Tools/release_setup.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
"{COMPILED_BINARY}",
"{MINIAVC_VERSION_FILE}",
"/PluginData",
"/Binaries/MiniAVC-V2.dll",
"/Binaries/KSPDev_Utils*"
]
}
Expand Down
Loading

0 comments on commit e808f02

Please sign in to comment.