Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Renamed the project #2

Merged
merged 3 commits into from
Oct 3, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion BusinessLogic/INameValidator.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace CK2LandedTitlesManager.BusinessLogic
namespace CKCulturalNamesManager.BusinessLogic
{
public interface INameValidator
{
Expand Down
10 changes: 5 additions & 5 deletions BusinessLogic/LandedTitleManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@

using NuciExtensions;

using CK2LandedTitlesManager.BusinessLogic.Mapping;
using CK2LandedTitlesManager.BusinessLogic.Models;
using CK2LandedTitlesManager.DataAccess.IO;
using CK2LandedTitlesManager.Models;
using CKCulturalNamesManager.BusinessLogic.Mapping;
using CKCulturalNamesManager.BusinessLogic.Models;
using CKCulturalNamesManager.DataAccess.IO;
using CKCulturalNamesManager.Models;

namespace CK2LandedTitlesManager.BusinessLogic
namespace CKCulturalNamesManager.BusinessLogic
{
public sealed class LandedTitleManager
{
Expand Down
6 changes: 3 additions & 3 deletions BusinessLogic/Mapping/LandedTitleMappingExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
using System.Drawing;
using System.Linq;

using CK2LandedTitlesManager.DataAccess.DataObjects;
using CK2LandedTitlesManager.Models;
using CKCulturalNamesManager.DataAccess.DataObjects;
using CKCulturalNamesManager.Models;

namespace CK2LandedTitlesManager.BusinessLogic.Mapping
namespace CKCulturalNamesManager.BusinessLogic.Mapping
{
/// <summary>
/// LandedTitle mapping extensions for converting between entities and domain models.
Expand Down
2 changes: 1 addition & 1 deletion BusinessLogic/Models/OverwrittenDynamicName.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace CK2LandedTitlesManager.BusinessLogic.Models
namespace CKCulturalNamesManager.BusinessLogic.Models
{
public class OverwrittenName
{
Expand Down
2 changes: 1 addition & 1 deletion BusinessLogic/NameValidator.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System.Collections.Generic;
using System.Linq;

namespace CK2LandedTitlesManager.BusinessLogic
namespace CKCulturalNamesManager.BusinessLogic
{
public sealed class NameValidator : INameValidator
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
<RootNamespace>CK2LandedTitlesManager</RootNamespace>
<RootNamespace>CKCulturalNamesManager</RootNamespace>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion DataAccess/DataObjects/LandedTitleEntity.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System.Collections.Generic;

namespace CK2LandedTitlesManager.DataAccess.DataObjects
namespace CKCulturalNamesManager.DataAccess.DataObjects
{
public class LandedTitleEntity
{
Expand Down
4 changes: 2 additions & 2 deletions DataAccess/IO/LandedTitleDefinition.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
using Pdoxcl2Sharp;
using NuciExtensions;

using CK2LandedTitlesManager.DataAccess.DataObjects;
using CKCulturalNamesManager.DataAccess.DataObjects;

namespace CK2LandedTitlesManager.DataAccess.IO
namespace CKCulturalNamesManager.DataAccess.IO
{
public sealed class LandedTitleDefinition : IParadoxRead, IParadoxWrite
{
Expand Down
4 changes: 2 additions & 2 deletions DataAccess/IO/LandedTitlesFile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

using Pdoxcl2Sharp;

using CK2LandedTitlesManager.DataAccess.DataObjects;
using CKCulturalNamesManager.DataAccess.DataObjects;

namespace CK2LandedTitlesManager.DataAccess.IO
namespace CKCulturalNamesManager.DataAccess.IO
{
public sealed class LandedTitlesFile : IParadoxRead, IParadoxWrite
{
Expand Down
10 changes: 5 additions & 5 deletions Menus/MainMenu.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
using NuciCLI;
using NuciCLI.Menus;

using CK2LandedTitlesManager.BusinessLogic;
using CK2LandedTitlesManager.BusinessLogic.Models;
using CK2LandedTitlesManager.Models;
using CKCulturalNamesManager.BusinessLogic;
using CKCulturalNamesManager.BusinessLogic.Models;
using CKCulturalNamesManager.Models;

namespace CK2LandedTitlesManager.Menus
namespace CKCulturalNamesManager.Menus
{
/// <summary>
/// Main menu.
Expand All @@ -25,7 +25,7 @@ public MainMenu()
{
landedTitleManager = new LandedTitleManager();

Title = "CK2 Landed Titles Extractor";
Title = "Crusader Kings Cultural Names Manager";

AddCommand(
"load",
Expand Down
2 changes: 1 addition & 1 deletion Models/LandedTitle.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;

namespace CK2LandedTitlesManager.Models
namespace CKCulturalNamesManager.Models
{
/// <summary>
/// The title entity.
Expand Down
4 changes: 2 additions & 2 deletions Program.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using CK2LandedTitlesManager.Menus;
using CKCulturalNamesManager.Menus;

using NuciCLI.Menus;

namespace CK2LandedTitlesManager
namespace CKCulturalNamesManager
{
public class Program
{
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
[![Build Status](https://travis-ci.com/hmlendea/ck-cultural-names-manager.svg?branch=master)](https://travis-ci.com/hmlendea/ck-cultural-names-manager)

# About

This is a tool that extracts the landed title names from CK2 landed title files
This is a tool that can manipulate the cultural names from `Crusader Kings 2` landed title files
67 changes: 67 additions & 0 deletions package.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
#!/bin/bash

APP_NAME=$(git remote -v | tail -1 | sed 's|.*/\([^/]*\)\.git.*|\1|')
VERSION="$1"
RELEASE_DIR_RELATIVE="bin/Release"
PUBLISH_DIR_RELATIVE="${RELEASE_DIR_RELATIVE}/publish-script-output"
RELEASE_DIR="$(pwd)/$RELEASE_DIR_RELATIVE"
PUBLISH_DIR="$(pwd)/$PUBLISH_DIR_RELATIVE"

if [ -z "$VERSION" ]; then
echo "ERROR: Please specify a version"
exit 1
fi

function package {
ARCH="$1"

OUTPUT_DIR="$PUBLISH_DIR/$ARCH"
OUTPUT_FILE="$RELEASE_DIR/${APP_NAME}_${VERSION}_${ARCH}.zip"

echo "Packaging \"$OUTPUT_DIR\" to \"$OUTPUT_FILE\""

if [ -f "$OUTPUT_FILE" ]; then
rm "$OUTPUT_FILE"
fi

cd "$OUTPUT_DIR"
zip -q -9 -r "$OUTPUT_FILE" .
cd -
}

function dotnet-pub {
ARCH="$1"
OUTPUT_DIR="$PUBLISH_DIR_RELATIVE/$ARCH"

dotnet publish -c Release -r "$ARCH" -o "$OUTPUT_DIR" --self-contained=true /p:TrimUnusedDependencies=true /p:LinkDuringPublish=true
}

function prepare {
echo "Adding the temporary NuGet packages"
dotnet add package Microsoft.Packaging.Tools.Trimming --version 1.1.0-preview1-26619-01
#dotnet add package ILLink.Tasks --version 0.1.5-preview-1841731 --source https://dotnet.myget.org/F/dotnet-core/api/v3/index.json
}

function cleanup {
echo "Removing the temporary NuGet packages"
dotnet remove package Microsoft.Packaging.Tools.Trimming
#dotnet remove package ILLink.Task

echo "Cleaning build output"
rm -rf "$PUBLISH_DIR"
}

function build-release {
dotnet-pub $1
package $1
}

prepare

build-release linux-arm
build-release linux-arm64
build-release linux-x64
build-release osx-x64
build-release win-x64

cleanup