Skip to content

Commit

Permalink
Merge pull request #3 from ChiiAyano/feature/create-package
Browse files Browse the repository at this point in the history
リリースパッケージ作るに際して必要になった処理
  • Loading branch information
ChiiAyano committed Jun 28, 2020
2 parents 9ded039 + e5f09f1 commit e767922
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 0 deletions.
12 changes: 12 additions & 0 deletions ObsClock/Properties/PublishProfiles/FolderProfile.pubxml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration>Release</Configuration>
<Platform>Any CPU</Platform>
<PublishDir>bin\Release\netcoreapp3.1\publish\</PublishDir>
<PublishProtocol>FileSystem</PublishProtocol>
</PropertyGroup>
</Project>
5 changes: 5 additions & 0 deletions ObsController.Core/SettingLoader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,11 @@ public static T Load<T>() where T : new()
{
var json = string.Empty;

Log.WriteLogLine($"{General.SettingPath} から設定をロードしています");

if (!File.Exists(General.SettingPath))
{
Log.WriteLogLine("設定ファイルが見つかりませんでした。デフォルトをロードします");
var def = new T();
Save(def);
return def;
Expand All @@ -38,6 +41,8 @@ public static T Load<T>() where T : new()
/// <param name="data"></param>
public static void Save<T>(T data) where T : new()
{
Log.WriteLogLine($"{General.SettingPath} に設定ファイルをセーブします");

var json = JsonConvert.SerializeObject(data);

using var wr = new StreamWriter(General.SettingPath, false);
Expand Down
14 changes: 14 additions & 0 deletions ObsUserLock/Properties/PublishProfiles/FolderProfile.pubxml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration>Release</Configuration>
<Platform>Any CPU</Platform>
<PublishDir>bin\Release\netcoreapp3.1\publish\</PublishDir>
<PublishProtocol>FileSystem</PublishProtocol>
<TargetFramework>netcoreapp3.1</TargetFramework>
<SelfContained>false</SelfContained>
</PropertyGroup>
</Project>
1 change: 1 addition & 0 deletions ObsWeather/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ private static async Task Main(string[] args)
if (string.IsNullOrWhiteSpace(Settings?.OpenWeatherMap.ApiKey))
{
Log.WriteLogLine("OpenWeatherMap へ接続するための API Key が見つかりません", Log.LogType.Error);
await ConsoleHost.WaitAsync();
return;
}

Expand Down
14 changes: 14 additions & 0 deletions ObsWeather/Properties/PublishProfiles/FolderProfile.pubxml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration>Release</Configuration>
<Platform>Any CPU</Platform>
<PublishDir>bin\Release\netcoreapp3.1\publish\</PublishDir>
<PublishProtocol>FileSystem</PublishProtocol>
<TargetFramework>netcoreapp3.1</TargetFramework>
<SelfContained>false</SelfContained>
</PropertyGroup>
</Project>

0 comments on commit e767922

Please sign in to comment.