From b73bb0f5e4ed627be85f70e19eb01ab2233212c8 Mon Sep 17 00:00:00 2001 From: Kimura Youichi Date: Sat, 3 Sep 2022 01:26:06 +0900 Subject: [PATCH 01/29] =?UTF-8?q?=E3=83=90=E3=83=BC=E3=82=B8=E3=83=A7?= =?UTF-8?q?=E3=83=B3=20v2.7.2-dev=20=E9=96=8B=E7=99=BA=E9=96=8B=E5=A7=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- OpenTween/Properties/AssemblyInfo.cs | 2 +- OpenTween/Properties/Resources.Designer.cs | 5 +++-- OpenTween/Resources/ChangeLog.txt | 2 ++ appveyor.yml | 2 +- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/OpenTween/Properties/AssemblyInfo.cs b/OpenTween/Properties/AssemblyInfo.cs index 10392a6e2..4b29abd38 100644 --- a/OpenTween/Properties/AssemblyInfo.cs +++ b/OpenTween/Properties/AssemblyInfo.cs @@ -22,7 +22,7 @@ // 次の GUID は、このプロジェクトが COM に公開される場合の、typelib の ID です [assembly: Guid("2d0ae0ba-adac-49a2-9b10-26fd69e695bf")] -[assembly: AssemblyVersion("2.7.1.0")] +[assembly: AssemblyVersion("2.7.1.1")] [assembly: InternalsVisibleTo("OpenTween.Tests")] [assembly: InternalsVisibleTo("DynamicProxyGenAssembly2")] // for Moq diff --git a/OpenTween/Properties/Resources.Designer.cs b/OpenTween/Properties/Resources.Designer.cs index baa0084e9..6d36018e1 100644 --- a/OpenTween/Properties/Resources.Designer.cs +++ b/OpenTween/Properties/Resources.Designer.cs @@ -571,6 +571,8 @@ internal static string ChangeIconToolStripMenuItem_Confirm { /// /// 更新履歴 /// + ///==== Unreleased + /// ///==== Ver 2.7.1(2022/09/03) /// * FIX: 発言一覧の選択位置を移動した際にデッドロックが発生する場合がある不具合を修正 (thx @Kazuki_Ashiya!) /// * FIX: 発言本文の翻訳時に発生したエラーが適切に処理されない不具合を修正 @@ -581,8 +583,7 @@ internal static string ChangeIconToolStripMenuItem_Confirm { /// - デフォルトで API v2 が有効となり、通常は変更する必要はありません /// - Twitter の API キーを独自に書き換えている場合で、Project への移行を完了できていない等の理由で API v2 を使用できない時はチェックを外してください /// * CHG: 発言詳細部の名前ラベルを投稿者とRTしたユーザーで分けずに表示するように変更 - /// * FIX: タブの移動後に発言一覧が空の表示になる不具合を修正 - /// * FIX: [残りの文字列は切り詰められました]"; に類似しているローカライズされた文字列を検索します。 + /// * FIX: タブの移動後に発言一覧が空の表 [残りの文字列は切り詰められました]"; に類似しているローカライズされた文字列を検索します。 /// internal static string ChangeLog { get { diff --git a/OpenTween/Resources/ChangeLog.txt b/OpenTween/Resources/ChangeLog.txt index 533eb13a4..3c93aae43 100644 --- a/OpenTween/Resources/ChangeLog.txt +++ b/OpenTween/Resources/ChangeLog.txt @@ -1,5 +1,7 @@ 更新履歴 +==== Unreleased + ==== Ver 2.7.1(2022/09/03) * FIX: 発言一覧の選択位置を移動した際にデッドロックが発生する場合がある不具合を修正 (thx @Kazuki_Ashiya!) * FIX: 発言本文の翻訳時に発生したエラーが適切に処理されない不具合を修正 diff --git a/appveyor.yml b/appveyor.yml index f1a03ecfa..6f056819e 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,4 +1,4 @@ -version: 2.7.0.{build} +version: 2.7.1.{build} os: Visual Studio 2022 From faf53c43a2102984a0b4753b7808bc3e71dfdd80 Mon Sep 17 00:00:00 2001 From: Kimura Youichi Date: Sat, 1 Oct 2022 17:20:09 +0900 Subject: [PATCH 02/29] =?UTF-8?q?build-zip-archive.ps1=20=E5=AE=9F?= =?UTF-8?q?=E8=A1=8C=E6=99=82=E3=81=AB=20msbuild,=20csc=20=E3=81=AE?= =?UTF-8?q?=E3=83=90=E3=83=BC=E3=82=B8=E3=83=A7=E3=83=B3=E3=82=92=E5=87=BA?= =?UTF-8?q?=E5=8A=9B=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reproducible Build で問題が発生した時の調査用 --- tools/build-zip-archive.ps1 | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/tools/build-zip-archive.ps1 b/tools/build-zip-archive.ps1 index a2f8087f1..b49a628fe 100644 --- a/tools/build-zip-archive.ps1 +++ b/tools/build-zip-archive.ps1 @@ -84,6 +84,10 @@ Function Build-Package([String[]] $Path, [String] $DestPath) { Compress-Archive -Force -Path $Path -DestinationPath $DestPath } +Function Get-CommandVersion([String] $Name) { + Get-Command -Name $Name | Select -Property Name, @{Name='ProductVersion'; Expression={$_.FileVersionInfo.ProductVersion}} +} + Generate-Serializer Build-SateliteAssembly -Culture en @@ -95,4 +99,13 @@ Build-Package -Path $includePaths -DestPath $DestPath Write-Host Write-Host "Build success!" -Get-FileHash -Algorithm SHA256 $destPath | Format-List +@( + Get-CommandVersion 'msbuild.exe' + Get-CommandVersion 'csc.exe' + Get-CommandVersion 'sgen.exe' + [PSCustomObject]@{ + Name = 'SOURCE_DATE_EPOCH' + Value = $timestamp + } + Get-FileHash -Algorithm SHA256 $destPath +) | Format-List From b549174ddedee3e07da6d85cd3dd00654fd0f790 Mon Sep 17 00:00:00 2001 From: Kimura Youichi Date: Sat, 1 Oct 2022 17:58:34 +0900 Subject: [PATCH 03/29] =?UTF-8?q?AppVeyor=20=E3=81=A7=E3=81=AE=20Pull=20Re?= =?UTF-8?q?quest=20=E3=81=AE=E3=83=93=E3=83=AB=E3=83=89=E6=99=82=E3=81=AB?= =?UTF-8?q?=20SOURCE=5FDATE=5FEPOCH=20=E3=81=8C=E6=AD=A3=E3=81=97=E3=81=84?= =?UTF-8?q?=E6=99=82=E5=88=BB=E3=81=AB=E3=81=AA=E3=82=89=E3=81=AA=E3=81=84?= =?UTF-8?q?=E5=95=8F=E9=A1=8C=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- appveyor.yml | 7 ++++++- tools/build-zip-archive.ps1 | 5 +++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 6f056819e..e2d8f48c6 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -83,6 +83,11 @@ after_test: } else { $destPath = 'OpenTween_dev-' + $env:APPVEYOR_BUILD_NUMBER + '.zip' } - .\tools\build-zip-archive.ps1 -BinDir $binDir -ObjDir $objDir -AssemblyInfo $assemblyInfo -DestPath $destPath + if ($env:APPVEYOR_PULL_REQUEST_HEAD_COMMIT -ne $null) { + $headCommit = $env:APPVEYOR_PULL_REQUEST_HEAD_COMMIT + } else { + $headCommit = 'HEAD' + } + .\tools\build-zip-archive.ps1 -BinDir $binDir -ObjDir $objDir -AssemblyInfo $assemblyInfo -DestPath $destPath -HeadCommit $headCommit # vim: et fenc=utf-8 sts=2 sw=2 ts=2 diff --git a/tools/build-zip-archive.ps1 b/tools/build-zip-archive.ps1 index b49a628fe..7678695ae 100644 --- a/tools/build-zip-archive.ps1 +++ b/tools/build-zip-archive.ps1 @@ -30,7 +30,8 @@ Param( [Parameter(Mandatory = $true)][String] $BinDir, [Parameter(Mandatory = $true)][String] $ObjDir, [Parameter(Mandatory = $true)][String] $AssemblyInfo, - [Parameter(Mandatory = $true)][String] $DestPath + [Parameter(Mandatory = $true)][String] $DestPath, + [String] $HeadCommit = 'HEAD' ) Set-StrictMode -Version 3.0 @@ -70,7 +71,7 @@ Function Get-SourceDateEpoch() { # ローカルのタイムゾーンの日時でタイムスタンプが記録されるため、わざとタイムゾーンを指定していない。 # これにより、生成される ZIP アーカイブには UTC での $sourceDateEpoch に相当する日時が記録されるようになる $unixEpoch = Get-Date "1970/01/01 00:00:00" - $sourceDateUnixtime = [int](Invoke-NativeCommand "git log -1 --pretty=%ct") + $sourceDateUnixtime = [int](Invoke-NativeCommand "git log -1 --pretty=%ct ${HeadCommit}") $sourceDateEpoch = $unixEpoch.AddSeconds($sourceDateUnixtime) return $sourceDateEpoch } From 9a4d0566af6bf20c58476cd17e6c7dc87a3a7bff Mon Sep 17 00:00:00 2001 From: Kimura Youichi Date: Sat, 5 Nov 2022 04:08:58 +0900 Subject: [PATCH 04/29] =?UTF-8?q?OpenTween.XmlSerializer.dll=20=E3=81=AE?= =?UTF-8?q?=E4=BD=BF=E7=94=A8=E3=82=92=E5=BB=83=E6=AD=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- OpenTween/OpenTween.csproj | 14 ++---- OpenTween/Setting/SettingAtIdList.cs | 2 + OpenTween/Setting/SettingCommon.cs | 1 + OpenTween/Setting/SettingLocal.cs | 1 + OpenTween/Setting/SettingTabs.cs | 1 + OpenTween/XmlSerializerContract.cs | 73 ++++++++++++++++++++++++++++ tools/build-zip-archive.ps1 | 11 +---- tools/generate-serializer.ps1 | 65 ------------------------- 8 files changed, 82 insertions(+), 86 deletions(-) create mode 100644 OpenTween/XmlSerializerContract.cs delete mode 100644 tools/generate-serializer.ps1 diff --git a/OpenTween/OpenTween.csproj b/OpenTween/OpenTween.csproj index cb4691fdf..0ba0fd5a6 100644 --- a/OpenTween/OpenTween.csproj +++ b/OpenTween/OpenTween.csproj @@ -22,7 +22,7 @@ TRACE;DEBUG prompt 4 - Auto + Off false OpenTween.ruleset @@ -33,7 +33,7 @@ TRACE prompt 4 - On + Off false false @@ -478,6 +478,7 @@ + @@ -810,13 +811,4 @@ - - - - - - - - - \ No newline at end of file diff --git a/OpenTween/Setting/SettingAtIdList.cs b/OpenTween/Setting/SettingAtIdList.cs index 08ab3c4f9..2fdecf0c2 100644 --- a/OpenTween/Setting/SettingAtIdList.cs +++ b/OpenTween/Setting/SettingAtIdList.cs @@ -30,9 +30,11 @@ using System.Collections.Generic; using System.Linq; using System.Text; +using System.Xml.Serialization; namespace OpenTween { + [XmlSerializerAssembly(null, null)] // OpenTween アセンブリ内の XmlSerializerContract を使用させる public class SettingAtIdList : SettingBase { #region Settingクラス基本 diff --git a/OpenTween/Setting/SettingCommon.cs b/OpenTween/Setting/SettingCommon.cs index f89f4af8b..a3131e527 100644 --- a/OpenTween/Setting/SettingCommon.cs +++ b/OpenTween/Setting/SettingCommon.cs @@ -34,6 +34,7 @@ namespace OpenTween { + [XmlSerializerAssembly(null, null)] // OpenTween アセンブリ内の XmlSerializerContract を使用させる public class SettingCommon : SettingBase { #region "Settingクラス基本" diff --git a/OpenTween/Setting/SettingLocal.cs b/OpenTween/Setting/SettingLocal.cs index ec3ee5cf1..8c085b0f1 100644 --- a/OpenTween/Setting/SettingLocal.cs +++ b/OpenTween/Setting/SettingLocal.cs @@ -36,6 +36,7 @@ namespace OpenTween { + [XmlSerializerAssembly(null, null)] // OpenTween アセンブリ内の XmlSerializerContract を使用させる public class SettingLocal : SettingBase { #region Settingクラス基本 diff --git a/OpenTween/Setting/SettingTabs.cs b/OpenTween/Setting/SettingTabs.cs index c40d091eb..f8974b99a 100644 --- a/OpenTween/Setting/SettingTabs.cs +++ b/OpenTween/Setting/SettingTabs.cs @@ -35,6 +35,7 @@ namespace OpenTween { + [XmlSerializerAssembly(null, null)] // OpenTween アセンブリ内の XmlSerializerContract を使用させる public class SettingTabs : SettingBase { #region Settingクラス基本 diff --git a/OpenTween/XmlSerializerContract.cs b/OpenTween/XmlSerializerContract.cs new file mode 100644 index 000000000..b85d6977e --- /dev/null +++ b/OpenTween/XmlSerializerContract.cs @@ -0,0 +1,73 @@ +// OpenTween - Client of Twitter +// Copyright (c) 2022 kim_upsilon (@kim_upsilon) +// All rights reserved. +// +// This file is part of OpenTween. +// +// This program is free software; you can redistribute it and/or modify it +// under the terms of the GNU General Public License as published by the Free +// Software Foundation; either version 3 of the License, or (at your option) +// any later version. +// +// This program 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. See the GNU General Public License +// for more details. +// +// You should have received a copy of the GNU General Public License along +// with this program. If not, see , or write to +// the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor, +// Boston, MA 02110-1301, USA. + +using System; +using System.Collections; +using System.Xml.Serialization; + +#nullable enable + +namespace Microsoft.Xml.Serialization.GeneratedAssembly +{ + /// + /// OpenTween.XmlSerializer.dll のロードを防ぐための偽の XmlSerializerContract クラス + /// + /// + /// このクラスでは が常に false を返すため、 + /// は実行時にシリアライザを動的に生成します。 + /// + public class XmlSerializerContract : XmlSerializerImplementation + { + public override XmlSerializationReader Reader { get; } = new FakeXmlSerializerReader(); + + public override XmlSerializationWriter Writer { get; } = new FakeXmlSerializerWriter(); + + public override Hashtable ReadMethods { get; } = new(); + + public override Hashtable WriteMethods { get; } = new(); + + public override Hashtable TypedSerializers { get; } = new(); + + public override bool CanSerialize(Type type) + => false; + + public override XmlSerializer? GetSerializer(Type type) + => null; + } + + public class FakeXmlSerializerReader : XmlSerializationReader + { + protected override void InitCallbacks() + { + } + + protected override void InitIDs() + { + } + } + + public class FakeXmlSerializerWriter : XmlSerializationWriter + { + protected override void InitCallbacks() + { + } + } +} diff --git a/tools/build-zip-archive.ps1 b/tools/build-zip-archive.ps1 index 7678695ae..502935218 100644 --- a/tools/build-zip-archive.ps1 +++ b/tools/build-zip-archive.ps1 @@ -40,7 +40,6 @@ $ErrorActionPreference = 'Stop' $assemblyName = "OpenTween" $exePath = Join-Path $BinDir "${assemblyName}.exe" -$sgenOpts = "/type:${assemblyName}.SettingAtIdList /type:${assemblyName}.SettingCommon /type:${assemblyName}.SettingLocal /type:${assemblyName}.SettingTabs" $includeFiles = @( "en\", "Icons\", @@ -49,17 +48,11 @@ $includeFiles = @( "LICENSE.ja", "LICENSE.LGPL-3", "${assemblyName}.exe", - "${assemblyName}.exe.config", - "${assemblyName}.XmlSerializers.dll" + "${assemblyName}.exe.config" ) . .\tools\functions.ps1 -Function Generate-Serializer() { - # OpenTween.XmlSerializers.dll の生成 - .\tools\generate-serializer.ps1 -ExePath $exePath -SgenOpts $sgenOpts -} - Function Build-SateliteAssembly([String] $Culture) { # OpenTween.resources.dll の生成(カルチャ別) $sateliteAssemblyPath = Join-Path $BinDir "${Culture}\${assemblyName}.resources.dll" @@ -89,7 +82,6 @@ Function Get-CommandVersion([String] $Name) { Get-Command -Name $Name | Select -Property Name, @{Name='ProductVersion'; Expression={$_.FileVersionInfo.ProductVersion}} } -Generate-Serializer Build-SateliteAssembly -Culture en $includePaths = $includeFiles | % { Join-Path $BinDir $_ } @@ -103,7 +95,6 @@ Write-Host "Build success!" @( Get-CommandVersion 'msbuild.exe' Get-CommandVersion 'csc.exe' - Get-CommandVersion 'sgen.exe' [PSCustomObject]@{ Name = 'SOURCE_DATE_EPOCH' Value = $timestamp diff --git a/tools/generate-serializer.ps1 b/tools/generate-serializer.ps1 deleted file mode 100644 index 577057eca..000000000 --- a/tools/generate-serializer.ps1 +++ /dev/null @@ -1,65 +0,0 @@ -# OpenTween - Client of Twitter -# Copyright (c) 2021 kim_upsilon (@kim_upsilon) -# All rights reserved. -# -# This file is part of OpenTween. -# -# This program is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by the Free -# Software Foundation; either version 3 of the License, or (at your option) -# any later version. -# -# This program 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. See the GNU General Public License -# for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program. If not, see , or write to -# the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor, -# Boston, MA 02110-1301, USA. - -# -# Reproducible Build に対応した OpenTween.XmlSerializers.dll の生成を行うスクリプト -# -# 使い方: -# .\tools\generate-serializer.ps1 -ExePath ".\OpenTween\bin\Debug\OpenTween.exe" -SgenOpts "/type:OpenTween.SettingCommon" -# - -Param( - [Parameter(Mandatory = $true)][String] $ExePath, - [String] $SgenOpts = "" -) - -Set-StrictMode -Version 3.0 -$ErrorActionPreference = 'Stop' - -$binDir = Split-Path -Parent $ExePath -$exeName = Split-Path -Leaf $ExePath - -$dllName = $exeName -replace "\.exe$", ".XmlSerializers.dll" -$dllPath = Join-Path $binDir $dllName - -. .\tools\functions.ps1 - -Function Generate-Serializer() { - $tempDirName = "temp" - $tempDir = Join-Path $binDir $tempDirName - $tempExePath = Join-Path $tempDir $exeName - - # sgen は *.exe と同じディレクトリにソースコードを書き出すため、作業用のディレクトリを用意してビルドを実行する - Remove-Item -Recurse $tempDir -ErrorAction Ignore - New-Item -ItemType "directory" -Path $binDir -Name $tempDirName | Out-Null - Copy-Item $ExePath -Destination $tempDir - - # sgen が実行する C# コンパイラは Roslyn ではないため /deterministic オプションに対応していない。 - # sgen の /keep オプションによってソースコードと csc に渡すコマンドラインオプションが書き出されるため、これを使用して改めて Roslyn でコンパイルし直す - Invoke-NativeCommand "sgen /nologo /silent /keep $SgenOpts $tempExePath" - $cmdlinePath = Join-Path $tempDir "*.cmdline" - Invoke-NativeCommand "csc -nologo -warn:1 -deterministic $(Get-Content $cmdlinePath)" - - Copy-Item $(Join-Path $tempDir $dllName) -Destination $binDir - Remove-Item -Recurse $tempDir -} - -Generate-Serializer From ac9c185cf7528ec92355c704f513d02ea4db3a0e Mon Sep 17 00:00:00 2001 From: Kimura Youichi Date: Sat, 26 Nov 2022 23:23:47 +0900 Subject: [PATCH 05/29] =?UTF-8?q?=E3=83=87=E3=83=90=E3=83=83=E3=82=B0?= =?UTF-8?q?=E6=83=85=E5=A0=B1=E3=81=ABPortable=20PDB=E3=82=92=E4=BD=BF?= =?UTF-8?q?=E7=94=A8=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- OpenTween/OpenTween.csproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/OpenTween/OpenTween.csproj b/OpenTween/OpenTween.csproj index 0ba0fd5a6..626f553fc 100644 --- a/OpenTween/OpenTween.csproj +++ b/OpenTween/OpenTween.csproj @@ -16,7 +16,7 @@ true - full + portable false bin\Debug\ TRACE;DEBUG @@ -27,7 +27,7 @@ OpenTween.ruleset - pdbonly + portable true bin\Release\ TRACE From 508b954828c48ab2cba09077eb819726ef30f33e Mon Sep 17 00:00:00 2001 From: Kimura Youichi Date: Sun, 27 Nov 2022 03:36:42 +0900 Subject: [PATCH 06/29] =?UTF-8?q?=E9=87=8D=E8=A4=87=E3=81=99=E3=82=8B?= =?UTF-8?q?=E3=83=AA=E3=82=BD=E3=83=BC=E3=82=B9=E3=82=92=E5=89=8A=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- OpenTween/HashtagManage.resx | 20 -------------- OpenTween/ListAvailable.resx | 8 ------ OpenTween/ListManage.resx | 52 ------------------------------------ OpenTween/OpenURL.resx | 4 --- 4 files changed, 84 deletions(-) diff --git a/OpenTween/HashtagManage.resx b/OpenTween/HashtagManage.resx index a5275e067..2869bcdab 100644 --- a/OpenTween/HashtagManage.resx +++ b/OpenTween/HashtagManage.resx @@ -19,25 +19,17 @@ System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 7 Cancel_Button - Cancel_Button - TableLayoutButtons TableLayoutButtons System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - 0 0 CheckNotAddToAtReply $this System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 2 CheckPermanent - CheckPermanent GroupHashtag - GroupHashtag - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 8 - 8 DeleteButton GroupHashtag System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 @@ -59,25 +51,17 @@ System.Windows.Forms.ListBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 0 Label1 - Label1 - GroupDetail GroupDetail System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - 2 2 Label3 GroupHashtag System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 1 OK_Button - OK_Button TableLayoutButtons - TableLayoutButtons - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 1 - 1 PermCancel_Button TableLayoutPanel2 System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 @@ -107,12 +91,8 @@ System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 2 UseHashText - UseHashText - GroupDetail GroupDetail System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - 1 1 NoControl 240, 18 diff --git a/OpenTween/ListAvailable.resx b/OpenTween/ListAvailable.resx index 69d9544b4..108f36a46 100644 --- a/OpenTween/ListAvailable.resx +++ b/OpenTween/ListAvailable.resx @@ -15,12 +15,8 @@ ListAvailable OpenTween.OTBaseForm, OpenTween, Version=0.1.0.0, Culture=neutral, PublicKeyToken=null Cancel_Button - Cancel_Button - TableLayoutPanel1 TableLayoutPanel1 System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - 1 1 DescriptionText $this @@ -63,12 +59,8 @@ System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 10 OK_Button - OK_Button - TableLayoutPanel1 TableLayoutPanel1 System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - 0 0 RefreshButton $this diff --git a/OpenTween/ListManage.resx b/OpenTween/ListManage.resx index 17cb49b93..9f8d3267e 100644 --- a/OpenTween/ListManage.resx +++ b/OpenTween/ListManage.resx @@ -19,12 +19,8 @@ System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 7 CancelEditButton - CancelEditButton - ListGroup ListGroup System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - 1 1 CloseButton $this @@ -39,52 +35,32 @@ System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 4 DescriptionText - DescriptionText - ListGroup ListGroup System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - 11 11 EditCheckBox $this System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 1 GetMoreUsersButton - GetMoreUsersButton - MemberGroup MemberGroup System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - 1 1 GroupBox2 ListGroup System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 2 Label1 - Label1 ListGroup - ListGroup - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 0 - 0 - Label10 Label10 ListGroup - ListGroup - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 10 - 10 Label12 - Label12 - ListGroup ListGroup System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - 12 12 Label13 UserGroup @@ -107,29 +83,17 @@ System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 3 Label4 - Label4 - ListGroup ListGroup System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - 8 8 Label5 - Label5 - UserGroup UserGroup System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - 16 16 Label6 - Label6 ListGroup - ListGroup - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 9 - 9 Label8 UserGroup System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 @@ -155,32 +119,20 @@ System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 6 NameTextBox - NameTextBox - ListGroup ListGroup System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 7 - 7 - OKEditButton OKEditButton ListGroup - ListGroup - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 3 - 3 PrivateRadioButton GroupBox2 System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 0 PublicRadioButton - PublicRadioButton - GroupBox2 GroupBox2 System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - 1 1 RefreshListsButton $this @@ -211,13 +163,9 @@ OpenTween.OTPictureBox, OpenTween, Version=0.1.0.0, Culture=neutral, PublicKeyToken=null 1 UserList - UserList MemberGroup - MemberGroup - System.Windows.Forms.ListBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Windows.Forms.ListBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 0 - 0 UserLocation UserGroup System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 diff --git a/OpenTween/OpenURL.resx b/OpenTween/OpenURL.resx index 73765a39c..8a3e89a83 100644 --- a/OpenTween/OpenURL.resx +++ b/OpenTween/OpenURL.resx @@ -17,12 +17,8 @@ OpenURL OpenTween.OTBaseForm, OpenTween, Version=0.1.0.0, Culture=neutral, PublicKeyToken=null Cancel_Button - Cancel_Button - TableLayoutPanel1 TableLayoutPanel1 System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - 1 1 OK_Button TableLayoutPanel1 From f17f1e672bbf8d8304d1a2113e1ffda6faaa432b Mon Sep 17 00:00:00 2001 From: Kimura Youichi Date: Sun, 27 Nov 2022 03:40:53 +0900 Subject: [PATCH 07/29] =?UTF-8?q?=E3=83=93=E3=83=AB=E3=83=89=E6=99=82?= =?UTF-8?q?=E3=81=AB=E4=BD=BF=E7=94=A8=E3=81=97=E3=81=9F=E3=83=A9=E3=83=B3?= =?UTF-8?q?=E3=82=BF=E3=82=A4=E3=83=A0=E3=81=AE=E3=83=90=E3=83=BC=E3=82=B8?= =?UTF-8?q?=E3=83=A7=E3=83=B3=E6=83=85=E5=A0=B1=E3=82=92=E5=87=BA=E5=8A=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tools/build-zip-archive.ps1 | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tools/build-zip-archive.ps1 b/tools/build-zip-archive.ps1 index 502935218..27f25e0f2 100644 --- a/tools/build-zip-archive.ps1 +++ b/tools/build-zip-archive.ps1 @@ -82,6 +82,16 @@ Function Get-CommandVersion([String] $Name) { Get-Command -Name $Name | Select -Property Name, @{Name='ProductVersion'; Expression={$_.FileVersionInfo.ProductVersion}} } +Function Get-RuntimeVersion() { + return [PSCustomObject]@{ + Name = 'RuntimeVersion' + Value = [Attribute]::GetCustomAttribute( + [Object].Assembly, + [System.Reflection.AssemblyInformationalVersionAttribute] + ).InformationalVersion + } +} + Build-SateliteAssembly -Culture en $includePaths = $includeFiles | % { Join-Path $BinDir $_ } @@ -95,6 +105,7 @@ Write-Host "Build success!" @( Get-CommandVersion 'msbuild.exe' Get-CommandVersion 'csc.exe' + Get-RuntimeVersion [PSCustomObject]@{ Name = 'SOURCE_DATE_EPOCH' Value = $timestamp From 8189667875783c46703cf57c3b1210afd33dc2bd Mon Sep 17 00:00:00 2001 From: Kimura Youichi Date: Sun, 27 Nov 2022 04:05:27 +0900 Subject: [PATCH 08/29] =?UTF-8?q?AppVeyor=E3=81=A7=E5=87=BA=E5=8A=9B?= =?UTF-8?q?=E3=81=99=E3=82=8BArtifact=E3=81=ABPDB=E3=83=95=E3=82=A1?= =?UTF-8?q?=E3=82=A4=E3=83=AB=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- appveyor.yml | 5 +++++ tools/build-zip-archive.ps1 | 2 ++ 2 files changed, 7 insertions(+) diff --git a/appveyor.yml b/appveyor.yml index e2d8f48c6..f13edc956 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -36,6 +36,8 @@ for: artifacts: - name: OpenTween.zip path: OpenTween_dev-$(APPVEYOR_BUILD_NUMBER).zip + - name: OpenTween.pdb + path: OpenTween.pdb - # for release build matrix: only: @@ -44,6 +46,8 @@ for: artifacts: - name: OpenTween.zip path: $(APPVEYOR_REPO_TAG_NAME).zip + - name: OpenTween.pdb + path: OpenTween.pdb build: project: OpenTween.sln @@ -89,5 +93,6 @@ after_test: $headCommit = 'HEAD' } .\tools\build-zip-archive.ps1 -BinDir $binDir -ObjDir $objDir -AssemblyInfo $assemblyInfo -DestPath $destPath -HeadCommit $headCommit + Copy-Item ($binDir + 'OpenTween.pdb') -Destination '.\' # vim: et fenc=utf-8 sts=2 sw=2 ts=2 diff --git a/tools/build-zip-archive.ps1 b/tools/build-zip-archive.ps1 index 27f25e0f2..804e1e509 100644 --- a/tools/build-zip-archive.ps1 +++ b/tools/build-zip-archive.ps1 @@ -40,6 +40,7 @@ $ErrorActionPreference = 'Stop' $assemblyName = "OpenTween" $exePath = Join-Path $BinDir "${assemblyName}.exe" +$pdbPath = Join-Path $BinDir "${assemblyName}.pdb" $includeFiles = @( "en\", "Icons\", @@ -111,4 +112,5 @@ Write-Host "Build success!" Value = $timestamp } Get-FileHash -Algorithm SHA256 $destPath + Get-FileHash -Algorithm SHA256 $pdbPath ) | Format-List From 17248a55c56f53adb94532efa16f2beae6964989 Mon Sep 17 00:00:00 2001 From: Kimura Youichi Date: Tue, 29 Nov 2022 00:47:14 +0900 Subject: [PATCH 09/29] =?UTF-8?q?GitHub=20Actions=E3=81=AEWorkflow?= =?UTF-8?q?=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build.yml | 174 ++++++++++++++++++++++++++++++++++++ 1 file changed, 174 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 000000000..4816cdbc6 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,174 @@ +name: Build + +on: + push: + branches: ['develop', 'release'] + pull_request: + +env: + NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages + +jobs: + build: + runs-on: windows-2022 + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Add msbuild to PATH + uses: microsoft/setup-msbuild@v1.1 + + - name: Set configuration env + shell: pwsh + run: | + if ($env:GITHUB_REF -eq 'refs/heads/release') { + echo 'CONFIGURATION=Release' >> $env:GITHUB_ENV + } else { + echo 'CONFIGURATION=Debug' >> $env:GITHUB_ENV + } + + - uses: actions/cache@v3 + with: + path: ${{ github.workspace }}/.nuget/packages + key: nuget-${{ hashFiles('*/*.csproj') }} + restore-keys: | + nuget- + + - name: Build + shell: pwsh + run: | + msbuild /target:restore,build "/p:Configuration=$($env:CONFIGURATION)" /verbosity:minimal + + - name: Upload build result + uses: actions/upload-artifact@v3 + with: + name: build + path: | + ./OpenTween/bin/ + ./OpenTween/obj/ + ./OpenTween.Tests/bin/ + retention-days: 1 + + test: + runs-on: windows-2022 + needs: [build] + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Add msbuild to PATH + uses: microsoft/setup-msbuild@v1.1 + + - name: Set configuration env + shell: pwsh + run: | + if ($env:GITHUB_REF -eq 'refs/heads/release') { + echo 'CONFIGURATION=Release' >> $env:GITHUB_ENV + } else { + echo 'CONFIGURATION=Debug' >> $env:GITHUB_ENV + } + + - uses: actions/cache@v3 + with: + path: ${{ github.workspace }}/.nuget/packages + key: nuget-${{ hashFiles('*/*.csproj') }} + restore-keys: | + nuget- + + - name: Restore build result + uses: actions/download-artifact@v3 + with: + name: build + + - name: Run tests + shell: pwsh + run: | + $altCoverVersion = '8.2.837' + $xunitVersion = '2.4.1' + $targetFramework = 'net472' + $altCoverPath = "$($env:NUGET_PACKAGES)\altcover\$($altCoverVersion)\tools\$($targetFramework)\AltCover.exe" + $xunitPath = "$($env:NUGET_PACKAGES)\xunit.runner.console\$($xunitVersion)\tools\$($targetFramework)\xunit.console.exe" + + Start-Process ` + -FilePath $altCoverPath ` + -ArgumentList ( + '--inputDirectory', + ".\OpenTween.Tests\bin\$($env:CONFIGURATION)\$($targetFramework)", + '--outputDirectory', + '.\__Instrumented\', + '--assemblyFilter', + '?^OpenTween(?!\.Tests)', + '--typeFilter', + '?^OpenTween\.', + '--fileFilter', + '\.Designer\.cs', + '--visibleBranches' + ) ` + -NoNewWindow ` + -Wait + + Start-Process ` + -FilePath $altCoverPath ` + -ArgumentList ( + 'runner', + '--recorderDirectory', + '.\__Instrumented\', + '--executable', + $xunitPath, + '--', + '.\__Instrumented\OpenTween.Tests.dll' + ) ` + -NoNewWindow ` + -Wait + + - name: Upload test results to codecov + shell: pwsh + run: | + Invoke-WebRequest -Uri https://uploader.codecov.io/latest/windows/codecov.exe -Outfile codecov.exe + .\codecov.exe -f coverage.xml + + package: + runs-on: windows-2022 + needs: [build] + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + ref: '${{ github.event.pull_request.head.sha }}' + + - name: Add msbuild to PATH + uses: microsoft/setup-msbuild@v1.1 + + - name: Set configuration env + shell: pwsh + run: | + if ($env:GITHUB_REF -eq 'refs/heads/release') { + echo 'CONFIGURATION=Release' >> $env:GITHUB_ENV + } else { + echo 'CONFIGURATION=Debug' >> $env:GITHUB_ENV + } + + - name: Restore build result + uses: actions/download-artifact@v3 + with: + name: build + + - name: Build package + shell: powershell # runtime-versionを取得するため従来のPowershellを使用する + run: | + $env:PATH = $env:PATH + ';C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Msbuild\Current\Bin\Roslyn\' + $binDir = '.\OpenTween\bin\' + $env:CONFIGURATION + '\' + $objDir = '.\OpenTween\obj\' + $env:CONFIGURATION + '\' + $assemblyInfo = '.\OpenTween\Properties\AssemblyInfo.cs' + $destPath = 'OpenTween.zip' + $headCommit = '${{ github.event.pull_request.head.sha }}' + .\tools\build-zip-archive.ps1 -BinDir $binDir -ObjDir $objDir -AssemblyInfo $assemblyInfo -DestPath $destPath -HeadCommit $headCommit + Copy-Item ($binDir + 'OpenTween.pdb') -Destination '.\' + + - name: Upload build result + uses: actions/upload-artifact@v3 + with: + name: package + path: | + ./OpenTween.zip + ./OpenTween.pdb From f9a2005499cf20434fd150884516023f9b1eed31 Mon Sep 17 00:00:00 2001 From: kzrnm Date: Wed, 10 Aug 2022 15:28:27 +0900 Subject: [PATCH 10/29] =?UTF-8?q?OpenTween.csproj=E3=82=92=E6=96=B0?= =?UTF-8?q?=E3=81=97=E3=81=84=E5=BD=A2=E5=BC=8F=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build.yml | 4 +- OpenTween/OpenTween.csproj | 526 ++++++++++----------------- OpenTween/Properties/AssemblyInfo.cs | 28 -- appveyor.yml | 4 +- 4 files changed, 187 insertions(+), 375 deletions(-) delete mode 100644 OpenTween/Properties/AssemblyInfo.cs diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4816cdbc6..4a16fc91b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -157,8 +157,8 @@ jobs: shell: powershell # runtime-versionを取得するため従来のPowershellを使用する run: | $env:PATH = $env:PATH + ';C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Msbuild\Current\Bin\Roslyn\' - $binDir = '.\OpenTween\bin\' + $env:CONFIGURATION + '\' - $objDir = '.\OpenTween\obj\' + $env:CONFIGURATION + '\' + $binDir = '.\OpenTween\bin\' + $env:CONFIGURATION + '\net472\' + $objDir = '.\OpenTween\obj\' + $env:CONFIGURATION + '\net472\' $assemblyInfo = '.\OpenTween\Properties\AssemblyInfo.cs' $destPath = 'OpenTween.zip' $headCommit = '${{ github.event.pull_request.head.sha }}' diff --git a/OpenTween/OpenTween.csproj b/OpenTween/OpenTween.csproj index 626f553fc..13efdb7d4 100644 --- a/OpenTween/OpenTween.csproj +++ b/OpenTween/OpenTween.csproj @@ -1,41 +1,26 @@ - - - + - Debug - AnyCPU - {3D8995C7-BDF3-4273-9F9D-DDD902F6A101} WinExe - OpenTween - OpenTween - v4.7.2 + net472 10.0 - 512 + OpenTween (dev) + 2.7.1.1 + Client of Twitter. Free software(GPLv3) + (C) 2011 OpenTween contributors + bin\$(Configuration)\ true + true $(MSBuildProjectDirectory)=. - true portable - false - bin\Debug\ - TRACE;DEBUG - prompt - 4 Off - false OpenTween.ruleset portable - true - bin\Release\ - TRACE - prompt - 4 Off false - false OpenTween.ApplicationEvents @@ -62,667 +47,526 @@ - + Form - + ApiInfoDialog.cs - - - - - - - - - - - - - + Code - - - - - - - - - - - - - - - - - - - - - - + Code - - - - - - - - + Form - + AtIdSupplement.cs - + Form - + AppendSettingDialog.cs - + Form - + AuthDialog.cs - - - - - - - - - - - - - - - - - - - + Form - + EncryptApiKeyDialog.cs - - + Form - + FilterDialog.cs - - + Form - + LoginDialog.cs - - - - - - - - - - - - - - - - - - - - - - - - - - - + Form - + SendErrorReportForm.cs - - - - - - - - - + UserControl - + TweetDetailsView.cs - - + Form - + WaitingDialog.cs - + Form - + InputDialog.cs - + UserControl - + MediaSelector.cs - + Code - + Form - + Component - - + Form - + HashtagManage.cs - - + Form - + ListAvailable.cs - - Form - - + + ListManage.cs - - + Component - - - + Component - - + UserControl - + ActionPanel.cs - + UserControl - + BasedPanel.cs - + UserControl - + ConnectionPanel.cs - + UserControl - + CooperatePanel.cs - + UserControl - + FontPanel.cs - + UserControl - + FontPanel2.cs - + UserControl - + GetCountPanel.cs - + UserControl - + GetPeriodPanel.cs - + UserControl - + NotifyPanel.cs - + UserControl - + PreviewPanel.cs - + UserControl - + ProxyPanel.cs - + UserControl - + SettingPanelBase.cs - + UserControl - + ShortUrlPanel.cs - + UserControl - + StartupPanel.cs - + UserControl - + TweetActPanel.cs - + UserControl - + TweetPrvPanel.cs - - + Form - + TabsDialog.cs - - - - - - - - - - - - - - - - - + UserControl - + TweetThumbnail.cs - + Form - + UpdateDialog.cs - - - + Form - + InputTabName.cs - - - - - - + Form - + MyLists.cs - - + Form - + OpenURL.cs - - + True True Resources.resx - + Form - + SearchWordDialog.cs - - - - - - - + Form - + UserInfoDialog.cs - + Component - + Form - + Tween.cs - + Form - + TweenAboutBox.cs - + Component - - - - - - - + ApiInfoDialog.cs - + AuthDialog.cs - + AuthDialog.cs - + EncryptApiKeyDialog.cs - + FilterDialog.cs - + FilterDialog.cs - + HashtagManage.cs - + HashtagManage.cs - + InputDialog.cs - + InputDialog.cs - + ListAvailable.cs - + ListAvailable.cs - + ListManage.cs - + ListManage.cs - + AtIdSupplement.cs - + AtIdSupplement.cs - + AppendSettingDialog.cs Designer - + AppendSettingDialog.cs Designer - + LoginDialog.cs - + LoginDialog.cs - + MediaSelector.cs - + MediaSelector.cs - + SendErrorReportForm.cs - + SendErrorReportForm.cs - + TweetDetailsView.cs Designer - + TweetDetailsView.cs - + WaitingDialog.cs - + ActionPanel.cs - + ActionPanel.cs - + BasedPanel.cs - + BasedPanel.cs - + ConnectionPanel.cs - + ConnectionPanel.cs - + CooperatePanel.cs - + CooperatePanel.cs - + FontPanel.cs - + FontPanel.cs - + FontPanel2.cs - + FontPanel2.cs - + GetCountPanel.cs - + GetCountPanel.cs - + GetPeriodPanel.cs - + GetPeriodPanel.cs - + NotifyPanel.cs - + NotifyPanel.cs - + PreviewPanel.cs - + PreviewPanel.cs - + ProxyPanel.cs - + ProxyPanel.cs - + ShortUrlPanel.cs - + ShortUrlPanel.cs - + StartupPanel.cs - + StartupPanel.cs - + TweetActPanel.cs - + TweetActPanel.cs - + TweetPrvPanel.cs - + TweetPrvPanel.cs - + TabsDialog.cs - + TabsDialog.cs - + TweetThumbnail.cs - + TweetThumbnail.cs - + UpdateDialog.cs - + UpdateDialog.cs - + InputTabName.cs - + InputTabName.cs - + MyLists.cs - + MyLists.cs - + OpenURL.cs - + OpenURL.cs - + ResXFileCodeGenerator Resources.Designer.cs Designer - + Designer - + SearchWordDialog.cs - + SearchWordDialog.cs - + UserInfoDialog.cs - + UserInfoDialog.cs - + Tween.cs Designer - + Tween.cs Designer - + TweenAboutBox.cs - + TweenAboutBox.cs @@ -800,14 +644,10 @@ all - - + + + + diff --git a/OpenTween/Properties/AssemblyInfo.cs b/OpenTween/Properties/AssemblyInfo.cs deleted file mode 100644 index 4b29abd38..000000000 --- a/OpenTween/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,28 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// アセンブリに関する一般情報は以下の属性セットをとおして制御されます。 -// アセンブリに関連付けられている情報を変更するには、 -// これらの属性値を変更してください。 -[assembly: AssemblyTitle("OpenTween (dev)")] -[assembly: AssemblyDescription("Client of Twitter. Free software(GPLv3)")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("OpenTween (dev)")] -[assembly: AssemblyCopyright("(C) 2011 OpenTween contributors")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// ComVisible を false に設定すると、その型はこのアセンブリ内で COM コンポーネントから -// 参照不可能になります。COM からこのアセンブリ内の型にアクセスする場合は、 -// その型の ComVisible 属性を true に設定してください。 -[assembly: ComVisible(false)] - -// 次の GUID は、このプロジェクトが COM に公開される場合の、typelib の ID です -[assembly: Guid("2d0ae0ba-adac-49a2-9b10-26fd69e695bf")] - -[assembly: AssemblyVersion("2.7.1.1")] - -[assembly: InternalsVisibleTo("OpenTween.Tests")] -[assembly: InternalsVisibleTo("DynamicProxyGenAssembly2")] // for Moq diff --git a/appveyor.yml b/appveyor.yml index f13edc956..88470c42d 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -79,8 +79,8 @@ after_test: .\codecov.exe -f coverage.xml - ps: | $env:PATH = $env:PATH + ';C:\Program Files\Microsoft Visual Studio\2022\Community\Msbuild\Current\Bin\Roslyn\;C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8 Tools\' - $binDir = '.\OpenTween\bin\' + $env:CONFIGURATION + '\' - $objDir = '.\OpenTween\obj\' + $env:CONFIGURATION + '\' + $binDir = '.\OpenTween\bin\' + $env:CONFIGURATION + '\net472\' + $objDir = '.\OpenTween\obj\' + $env:CONFIGURATION + '\net472\' $assemblyInfo = '.\OpenTween\Properties\AssemblyInfo.cs' if ($env:RELEASE_TAG -eq 'true') { $destPath = $env:APPVEYOR_REPO_TAG_NAME + '.zip' From 4dad89ad5fbaaf6a57fe53a48faf71d4b9b12748 Mon Sep 17 00:00:00 2001 From: kzrnm Date: Thu, 11 Aug 2022 00:00:35 +0900 Subject: [PATCH 11/29] =?UTF-8?q?=E3=83=93=E3=83=AB=E3=83=89=E3=82=B9?= =?UTF-8?q?=E3=82=AF=E3=83=AA=E3=83=97=E3=83=88=E3=82=92=E6=96=B0=E3=81=97?= =?UTF-8?q?=E3=81=84=E5=BD=A2=E5=BC=8F=E3=81=AEcsproj=E3=81=AB=E5=AF=BE?= =?UTF-8?q?=E5=BF=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build.yml | 3 +-- appveyor.yml | 3 +-- tools/build-satelite-assembly.ps1 | 3 +-- tools/build-zip-archive.ps1 | 5 ++--- 4 files changed, 5 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4a16fc91b..c69ebd06c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -159,10 +159,9 @@ jobs: $env:PATH = $env:PATH + ';C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Msbuild\Current\Bin\Roslyn\' $binDir = '.\OpenTween\bin\' + $env:CONFIGURATION + '\net472\' $objDir = '.\OpenTween\obj\' + $env:CONFIGURATION + '\net472\' - $assemblyInfo = '.\OpenTween\Properties\AssemblyInfo.cs' $destPath = 'OpenTween.zip' $headCommit = '${{ github.event.pull_request.head.sha }}' - .\tools\build-zip-archive.ps1 -BinDir $binDir -ObjDir $objDir -AssemblyInfo $assemblyInfo -DestPath $destPath -HeadCommit $headCommit + .\tools\build-zip-archive.ps1 -BinDir $binDir -ObjDir $objDir -DestPath $destPath -HeadCommit $headCommit Copy-Item ($binDir + 'OpenTween.pdb') -Destination '.\' - name: Upload build result diff --git a/appveyor.yml b/appveyor.yml index 88470c42d..096c3fe9f 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -81,7 +81,6 @@ after_test: $env:PATH = $env:PATH + ';C:\Program Files\Microsoft Visual Studio\2022\Community\Msbuild\Current\Bin\Roslyn\;C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8 Tools\' $binDir = '.\OpenTween\bin\' + $env:CONFIGURATION + '\net472\' $objDir = '.\OpenTween\obj\' + $env:CONFIGURATION + '\net472\' - $assemblyInfo = '.\OpenTween\Properties\AssemblyInfo.cs' if ($env:RELEASE_TAG -eq 'true') { $destPath = $env:APPVEYOR_REPO_TAG_NAME + '.zip' } else { @@ -92,7 +91,7 @@ after_test: } else { $headCommit = 'HEAD' } - .\tools\build-zip-archive.ps1 -BinDir $binDir -ObjDir $objDir -AssemblyInfo $assemblyInfo -DestPath $destPath -HeadCommit $headCommit + .\tools\build-zip-archive.ps1 -BinDir $binDir -ObjDir $objDir -DestPath $destPath -HeadCommit $headCommit Copy-Item ($binDir + 'OpenTween.pdb') -Destination '.\' # vim: et fenc=utf-8 sts=2 sw=2 ts=2 diff --git a/tools/build-satelite-assembly.ps1 b/tools/build-satelite-assembly.ps1 index d47bb37a1..744a4b7f0 100644 --- a/tools/build-satelite-assembly.ps1 +++ b/tools/build-satelite-assembly.ps1 @@ -29,7 +29,6 @@ Param( [Parameter(Mandatory = $true)][String] $ObjDir, [Parameter(Mandatory = $true)][String] $Culture, - [Parameter(Mandatory = $true)][String] $AssemblyInfo, [Parameter(Mandatory = $true)][String] $DestPath ) @@ -40,7 +39,7 @@ $ErrorActionPreference = 'Stop' Function Generate-AssemblyInfo() { $tmpFile = New-TemporaryFile - $content = (Get-Content $AssemblyInfo) -replace "^\[assembly: AssemblyCulture.+$", "[assembly: AssemblyCulture(`"${Culture}`")]" + $content = "[assembly: System.Reflection.AssemblyCulture(`"${Culture}`")]" $content > $tmpFile.FullName return $tmpFile.FullName } diff --git a/tools/build-zip-archive.ps1 b/tools/build-zip-archive.ps1 index 804e1e509..8a5421363 100644 --- a/tools/build-zip-archive.ps1 +++ b/tools/build-zip-archive.ps1 @@ -23,13 +23,12 @@ # Reproducible Build に対応した ZIP アーカイブのビルドを行うスクリプト # # 使い方: -# .\tools\build-zip-archive.ps1 -BinDir .\OpenTween\bin\Debug\ -ObjDir .\OpenTween\obj\Debug\ -AssemblyInfo .\OpenTween\Properties\AssemblyInfo.cs -DestPath OpenTween.zip +# .\tools\build-zip-archive.ps1 -BinDir .\OpenTween\bin\Debug\ -ObjDir .\OpenTween\obj\Debug\ -DestPath OpenTween.zip # Param( [Parameter(Mandatory = $true)][String] $BinDir, [Parameter(Mandatory = $true)][String] $ObjDir, - [Parameter(Mandatory = $true)][String] $AssemblyInfo, [Parameter(Mandatory = $true)][String] $DestPath, [String] $HeadCommit = 'HEAD' ) @@ -57,7 +56,7 @@ $includeFiles = @( Function Build-SateliteAssembly([String] $Culture) { # OpenTween.resources.dll の生成(カルチャ別) $sateliteAssemblyPath = Join-Path $BinDir "${Culture}\${assemblyName}.resources.dll" - .\tools\build-satelite-assembly.ps1 -ObjDir $ObjDir -Culture $Culture -DestPath $sateliteAssemblyPath -AssemblyInfo $AssemblyInfo + .\tools\build-satelite-assembly.ps1 -ObjDir $ObjDir -Culture $Culture -DestPath $sateliteAssemblyPath } Function Get-SourceDateEpoch() { From 9d2e9b82014cba888743e11f09daddc7d31ce1a9 Mon Sep 17 00:00:00 2001 From: kzrnm Date: Fri, 12 Aug 2022 22:05:05 +0900 Subject: [PATCH 12/29] =?UTF-8?q?Microsoft.NET.Sdk=20=E3=81=A7=E3=81=AF?= =?UTF-8?q?=E3=83=87=E3=83=95=E3=82=A9=E3=83=AB=E3=83=88=E3=81=A7=20Determ?= =?UTF-8?q?inistic=3Dtrue?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- OpenTween/OpenTween.csproj | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/OpenTween/OpenTween.csproj b/OpenTween/OpenTween.csproj index 13efdb7d4..5e4657288 100644 --- a/OpenTween/OpenTween.csproj +++ b/OpenTween/OpenTween.csproj @@ -8,8 +8,7 @@ Client of Twitter. Free software(GPLv3) (C) 2011 OpenTween contributors bin\$(Configuration)\ - true - true + true $(MSBuildProjectDirectory)=. From d94f5862408e848355f497edf211aac864c61b94 Mon Sep 17 00:00:00 2001 From: kzrnm Date: Fri, 2 Sep 2022 23:45:29 +0900 Subject: [PATCH 13/29] Add UseWindowsForms --- OpenTween/OpenTween.csproj | 1 + 1 file changed, 1 insertion(+) diff --git a/OpenTween/OpenTween.csproj b/OpenTween/OpenTween.csproj index 5e4657288..364776167 100644 --- a/OpenTween/OpenTween.csproj +++ b/OpenTween/OpenTween.csproj @@ -1,6 +1,7 @@  WinExe + true net472 10.0 OpenTween (dev) From 50c3685005d97ab72cb5c38fe5731419b655d900 Mon Sep 17 00:00:00 2001 From: Kimura Youichi Date: Sat, 1 Oct 2022 10:34:46 +0900 Subject: [PATCH 14/29] =?UTF-8?q?GenerateSatelliteAssembliesForCore=20?= =?UTF-8?q?=E3=82=92=E6=9C=89=E5=8A=B9=E3=81=AB=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 従来はサテライトアセンブリを生成する際に deterministic オプションを有効にする ために build-satelite-assembly.ps1 で独自に csc.exe を呼び出していたが、 csproj の設定で GenerateSatelliteAssembliesForCore を有効にすることで同等の 効果を得ることができたためこれに置き換えた https://learn.microsoft.com/en-us/dotnet/core/extensions/create-satellite-assemblies#compile-satellite-assemblies --- .github/workflows/build.yml | 3 +- OpenTween/OpenTween.csproj | 1 + appveyor.yml | 3 +- tools/build-satelite-assembly.ps1 | 59 ------------------------------- tools/build-zip-archive.ps1 | 11 +----- 5 files changed, 4 insertions(+), 73 deletions(-) delete mode 100644 tools/build-satelite-assembly.ps1 diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c69ebd06c..a7de4ede0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -158,10 +158,9 @@ jobs: run: | $env:PATH = $env:PATH + ';C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Msbuild\Current\Bin\Roslyn\' $binDir = '.\OpenTween\bin\' + $env:CONFIGURATION + '\net472\' - $objDir = '.\OpenTween\obj\' + $env:CONFIGURATION + '\net472\' $destPath = 'OpenTween.zip' $headCommit = '${{ github.event.pull_request.head.sha }}' - .\tools\build-zip-archive.ps1 -BinDir $binDir -ObjDir $objDir -DestPath $destPath -HeadCommit $headCommit + .\tools\build-zip-archive.ps1 -BinDir $binDir -DestPath $destPath -HeadCommit $headCommit Copy-Item ($binDir + 'OpenTween.pdb') -Destination '.\' - name: Upload build result diff --git a/OpenTween/OpenTween.csproj b/OpenTween/OpenTween.csproj index 364776167..8002c131b 100644 --- a/OpenTween/OpenTween.csproj +++ b/OpenTween/OpenTween.csproj @@ -10,6 +10,7 @@ (C) 2011 OpenTween contributors bin\$(Configuration)\ true + true $(MSBuildProjectDirectory)=. diff --git a/appveyor.yml b/appveyor.yml index 096c3fe9f..970720669 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -80,7 +80,6 @@ after_test: - ps: | $env:PATH = $env:PATH + ';C:\Program Files\Microsoft Visual Studio\2022\Community\Msbuild\Current\Bin\Roslyn\;C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8 Tools\' $binDir = '.\OpenTween\bin\' + $env:CONFIGURATION + '\net472\' - $objDir = '.\OpenTween\obj\' + $env:CONFIGURATION + '\net472\' if ($env:RELEASE_TAG -eq 'true') { $destPath = $env:APPVEYOR_REPO_TAG_NAME + '.zip' } else { @@ -91,7 +90,7 @@ after_test: } else { $headCommit = 'HEAD' } - .\tools\build-zip-archive.ps1 -BinDir $binDir -ObjDir $objDir -DestPath $destPath -HeadCommit $headCommit + .\tools\build-zip-archive.ps1 -BinDir $binDir -DestPath $destPath -HeadCommit $headCommit Copy-Item ($binDir + 'OpenTween.pdb') -Destination '.\' # vim: et fenc=utf-8 sts=2 sw=2 ts=2 diff --git a/tools/build-satelite-assembly.ps1 b/tools/build-satelite-assembly.ps1 deleted file mode 100644 index 744a4b7f0..000000000 --- a/tools/build-satelite-assembly.ps1 +++ /dev/null @@ -1,59 +0,0 @@ -# OpenTween - Client of Twitter -# Copyright (c) 2021 kim_upsilon (@kim_upsilon) -# All rights reserved. -# -# This file is part of OpenTween. -# -# This program is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by the Free -# Software Foundation; either version 3 of the License, or (at your option) -# any later version. -# -# This program 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. See the GNU General Public License -# for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program. If not, see , or write to -# the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor, -# Boston, MA 02110-1301, USA. - -# -# Reproducible Build に対応したサテライトアセンブリのビルド -# -# 使い方: -# .\tools\build-satelite-assembly.ps1 -ObjDir .\OpenTween\obj\Debug\ -Culture en -AssemblyInfo .\OpenTween\Properties\AssemblyInfo.cs -DestPath .\OpenTween\bin\Debug\en\OpenTween.resources.dll -# - -Param( - [Parameter(Mandatory = $true)][String] $ObjDir, - [Parameter(Mandatory = $true)][String] $Culture, - [Parameter(Mandatory = $true)][String] $DestPath -) - -Set-StrictMode -Version 3.0 -$ErrorActionPreference = 'Stop' - -. .\tools\functions.ps1 - -Function Generate-AssemblyInfo() { - $tmpFile = New-TemporaryFile - $content = "[assembly: System.Reflection.AssemblyCulture(`"${Culture}`")]" - $content > $tmpFile.FullName - return $tmpFile.FullName -} - -Function Build-SateliteAssembly() { - $tmpAssemblyInfoPath = Generate-AssemblyInfo - try { - $resourcePaths = Get-ChildItem -Path $ObjDir -File -Filter "*.${Culture}.resources" - $cscOpts = "-utf8output -nologo -deterministic -target:library -debug- -optimize+ -out:${DestPath}" - $cscOpts += " " + ($resourcePaths | % { "-resource:$($_.FullName)" }) -join ' ' - Invoke-NativeCommand "csc $cscOpts $tmpAssemblyInfoPath" - } finally { - Remove-Item -Path $tmpAssemblyInfoPath - } -} - -Build-SateliteAssembly diff --git a/tools/build-zip-archive.ps1 b/tools/build-zip-archive.ps1 index 8a5421363..3fd8f5989 100644 --- a/tools/build-zip-archive.ps1 +++ b/tools/build-zip-archive.ps1 @@ -23,12 +23,11 @@ # Reproducible Build に対応した ZIP アーカイブのビルドを行うスクリプト # # 使い方: -# .\tools\build-zip-archive.ps1 -BinDir .\OpenTween\bin\Debug\ -ObjDir .\OpenTween\obj\Debug\ -DestPath OpenTween.zip +# .\tools\build-zip-archive.ps1 -BinDir .\OpenTween\bin\Debug\ -DestPath OpenTween.zip # Param( [Parameter(Mandatory = $true)][String] $BinDir, - [Parameter(Mandatory = $true)][String] $ObjDir, [Parameter(Mandatory = $true)][String] $DestPath, [String] $HeadCommit = 'HEAD' ) @@ -53,12 +52,6 @@ $includeFiles = @( . .\tools\functions.ps1 -Function Build-SateliteAssembly([String] $Culture) { - # OpenTween.resources.dll の生成(カルチャ別) - $sateliteAssemblyPath = Join-Path $BinDir "${Culture}\${assemblyName}.resources.dll" - .\tools\build-satelite-assembly.ps1 -ObjDir $ObjDir -Culture $Culture -DestPath $sateliteAssemblyPath -} - Function Get-SourceDateEpoch() { # 本来 $unixEpoch は UTC で表さなければならないが、ZIP アーカイブには # ローカルのタイムゾーンの日時でタイムスタンプが記録されるため、わざとタイムゾーンを指定していない。 @@ -92,8 +85,6 @@ Function Get-RuntimeVersion() { } } -Build-SateliteAssembly -Culture en - $includePaths = $includeFiles | % { Join-Path $BinDir $_ } $timestamp = Get-SourceDateEpoch From 21c17cef4f3f2ba990ea0169fefc32ddae362dcd Mon Sep 17 00:00:00 2001 From: Kimura Youichi Date: Thu, 1 Dec 2022 00:38:18 +0900 Subject: [PATCH 15/29] =?UTF-8?q?AssemblyInfo.cs=20=E3=81=AE=E8=87=AA?= =?UTF-8?q?=E5=8B=95=E7=94=9F=E6=88=90=E3=82=92=E7=84=A1=E5=8A=B9=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 生成されるソースコードに含まれるコメントがロケール設定に依存して変化してしまい Reproducible build の妨げとなる問題があるため、回避策が見つかるまで無効化する。 --- OpenTween/OpenTween.csproj | 5 +---- OpenTween/Properties/AssemblyInfo.cs | 28 ++++++++++++++++++++++++++++ 2 files changed, 29 insertions(+), 4 deletions(-) create mode 100644 OpenTween/Properties/AssemblyInfo.cs diff --git a/OpenTween/OpenTween.csproj b/OpenTween/OpenTween.csproj index 8002c131b..414945b28 100644 --- a/OpenTween/OpenTween.csproj +++ b/OpenTween/OpenTween.csproj @@ -4,12 +4,9 @@ true net472 10.0 - OpenTween (dev) - 2.7.1.1 - Client of Twitter. Free software(GPLv3) - (C) 2011 OpenTween contributors bin\$(Configuration)\ true + false true $(MSBuildProjectDirectory)=. diff --git a/OpenTween/Properties/AssemblyInfo.cs b/OpenTween/Properties/AssemblyInfo.cs new file mode 100644 index 000000000..4b29abd38 --- /dev/null +++ b/OpenTween/Properties/AssemblyInfo.cs @@ -0,0 +1,28 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// アセンブリに関する一般情報は以下の属性セットをとおして制御されます。 +// アセンブリに関連付けられている情報を変更するには、 +// これらの属性値を変更してください。 +[assembly: AssemblyTitle("OpenTween (dev)")] +[assembly: AssemblyDescription("Client of Twitter. Free software(GPLv3)")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("OpenTween (dev)")] +[assembly: AssemblyCopyright("(C) 2011 OpenTween contributors")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// ComVisible を false に設定すると、その型はこのアセンブリ内で COM コンポーネントから +// 参照不可能になります。COM からこのアセンブリ内の型にアクセスする場合は、 +// その型の ComVisible 属性を true に設定してください。 +[assembly: ComVisible(false)] + +// 次の GUID は、このプロジェクトが COM に公開される場合の、typelib の ID です +[assembly: Guid("2d0ae0ba-adac-49a2-9b10-26fd69e695bf")] + +[assembly: AssemblyVersion("2.7.1.1")] + +[assembly: InternalsVisibleTo("OpenTween.Tests")] +[assembly: InternalsVisibleTo("DynamicProxyGenAssembly2")] // for Moq From f2438cee64fac8d615585608ba02e4e5d091d37f Mon Sep 17 00:00:00 2001 From: Kimura Youichi Date: Thu, 1 Dec 2022 02:22:18 +0900 Subject: [PATCH 16/29] =?UTF-8?q?ImageCache=E3=81=AB=E5=AF=BE=E3=81=99?= =?UTF-8?q?=E3=82=8B=E6=93=8D=E4=BD=9C=E5=85=83=E3=82=92UI=E3=82=B9?= =?UTF-8?q?=E3=83=AC=E3=83=83=E3=83=89=E3=81=AE=E3=81=BF=E3=81=AB=E3=81=99?= =?UTF-8?q?=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit WM_PAINT 内で Mutex を使用することによる問題を回避するため、ImageCache を UI スレッド以外から操作しないことで Mutex が不要な設計に変更する。 --- OpenTween/ImageCache.cs | 64 ++++++++----------------- OpenTween/TimelineListViewDrawer.cs | 74 ++++++++++++++++------------- 2 files changed, 62 insertions(+), 76 deletions(-) diff --git a/OpenTween/ImageCache.cs b/OpenTween/ImageCache.cs index 76bfb639e..335c49c12 100644 --- a/OpenTween/ImageCache.cs +++ b/OpenTween/ImageCache.cs @@ -46,11 +46,6 @@ public class ImageCache : IDisposable /// private CancellationTokenSource cancelTokenSource; - /// - /// innerDictionary の排他制御のためのロックオブジェクト - /// - private readonly object lockObject = new(); - /// /// オブジェクトが破棄された否か /// @@ -89,25 +84,17 @@ public Task DownloadImageAsync(string address, bool force = false) { var cancelToken = this.cancelTokenSource.Token; - return Task.Run(() => - { - Task? cachedImageTask; - lock (this.lockObject) - this.InnerDictionary.TryGetValue(address, out cachedImageTask); - - if (cachedImageTask != null && !force) - return cachedImageTask; + this.InnerDictionary.TryGetValue(address, out var cachedImageTask); - cancelToken.ThrowIfCancellationRequested(); + if (cachedImageTask != null && !force) + return cachedImageTask; - var imageTask = this.FetchImageAsync(address, cancelToken); + cancelToken.ThrowIfCancellationRequested(); - lock (this.lockObject) - this.InnerDictionary[address] = imageTask; + var imageTask = Task.Run(() => this.FetchImageAsync(address, cancelToken)); + this.InnerDictionary[address] = imageTask; - return imageTask; - }, - cancelToken); + return imageTask; } private async Task FetchImageAsync(string uri, CancellationToken cancelToken) @@ -126,14 +113,11 @@ private async Task FetchImageAsync(string uri, CancellationToken ca public MemoryImage? TryGetFromCache(string address) { - lock (this.lockObject) - { - if (!this.InnerDictionary.TryGetValue(address, out var imageTask) || - imageTask.Status != TaskStatus.RanToCompletion) - return null; + if (!this.InnerDictionary.TryGetValue(address, out var imageTask) || + imageTask.Status != TaskStatus.RanToCompletion) + return null; - return imageTask.Result; - } + return imageTask.Result; } public MemoryImage? TryGetLargerOrSameSizeFromCache(string normalUrl, string size) @@ -154,14 +138,11 @@ private async Task FetchImageAsync(string uri, CancellationToken ca public void CancelAsync() { - lock (this.lockObject) - { - var oldTokenSource = this.cancelTokenSource; - this.cancelTokenSource = new CancellationTokenSource(); + var oldTokenSource = this.cancelTokenSource; + this.cancelTokenSource = new CancellationTokenSource(); - oldTokenSource.Cancel(); - oldTokenSource.Dispose(); - } + oldTokenSource.Cancel(); + oldTokenSource.Dispose(); } protected virtual void Dispose(bool disposing) @@ -172,17 +153,14 @@ protected virtual void Dispose(bool disposing) { this.CancelAsync(); - lock (this.lockObject) + foreach (var (_, task) in this.InnerDictionary) { - foreach (var (_, task) in this.InnerDictionary) - { - if (task.Status == TaskStatus.RanToCompletion) - task.Result?.Dispose(); - } - - this.InnerDictionary.Clear(); - this.cancelTokenSource.Dispose(); + if (task.Status == TaskStatus.RanToCompletion) + task.Result?.Dispose(); } + + this.InnerDictionary.Clear(); + this.cancelTokenSource.Dispose(); } this.disposed = true; diff --git a/OpenTween/TimelineListViewDrawer.cs b/OpenTween/TimelineListViewDrawer.cs index 1e2ae355f..44bcb9adc 100644 --- a/OpenTween/TimelineListViewDrawer.cs +++ b/OpenTween/TimelineListViewDrawer.cs @@ -167,6 +167,9 @@ private void DrawListViewItemIcon(DrawListViewItemEventArgs e) if (stateRect.Width > 0) e.Graphics.DrawIcon(this.GetPostStateIcon(post.StateIndex), stateRect); } + + // キャッシュにない画像の場合は読み込みが完了してから再描画する + _ = this.LoadProfileImage(post, scaledIconSize.Width); } private MemoryImage? LoadListViewIconLazy(PostClass post, int scaledIconSize) @@ -183,43 +186,48 @@ private void DrawListViewItemIcon(DrawListViewItemEventArgs e) if (cachedImage != null) return cachedImage; - // キャッシュにない画像の場合は読み込みが完了してから再描画する - _ = Task.Run(async () => - { - try - { - var imageUrl = Twitter.CreateProfileImageUrl(normalImageUrl, sizeName); - await this.iconCache.DownloadImageAsync(imageUrl); - } - catch (InvalidImageException) - { - return; - } - catch (HttpRequestException) - { - return; - } - catch (OperationCanceledException) - { - return; - } + return null; + } - await this.parentForm.InvokeAsync(() => - { - if (this.listView.IsDisposed) - return; + private async Task LoadProfileImage(PostClass post, int scaledIconSize) + { + if (scaledIconSize <= 0) + return; - if (this.listView.VirtualListSize == 0) - return; + var normalImageUrl = post.ImageUrl; + if (MyCommon.IsNullOrEmpty(normalImageUrl)) + return; - // ロード中に index の指す行が変化している可能性がある - var newIndex = this.tab.IndexOf(post.StatusId); - if (newIndex != -1) - this.listView.RedrawItems(newIndex, newIndex, true); - }); - }); + var sizeName = Twitter.DecideProfileImageSize(scaledIconSize); - return null; + try + { + var imageUrl = Twitter.CreateProfileImageUrl(normalImageUrl, sizeName); + await this.iconCache.DownloadImageAsync(imageUrl); + } + catch (InvalidImageException) + { + return; + } + catch (HttpRequestException) + { + return; + } + catch (OperationCanceledException) + { + return; + } + + if (this.listView.IsDisposed) + return; + + if (this.listView.VirtualListSize == 0) + return; + + // ロード中に index の指す行が変化している可能性がある + var newIndex = this.tab.IndexOf(post.StatusId); + if (newIndex != -1) + this.listView.RedrawItems(newIndex, newIndex, true); } private Icon GetPostStateIcon(int stateIndex) From 3cd3775b308e29363f795d49c008f59f1d2d0341 Mon Sep 17 00:00:00 2001 From: Kimura Youichi Date: Thu, 1 Dec 2022 03:16:13 +0900 Subject: [PATCH 17/29] =?UTF-8?q?DrawListViewItemIcon=E3=83=A1=E3=82=BD?= =?UTF-8?q?=E3=83=83=E3=83=89=E3=81=8B=E3=82=89=E3=83=97=E3=83=AD=E3=83=95?= =?UTF-8?q?=E3=82=A3=E3=83=BC=E3=83=AB=E7=94=BB=E5=83=8F=E3=81=AE=E6=8F=8F?= =?UTF-8?q?=E7=94=BB=E5=87=A6=E7=90=86=E3=82=92=E3=83=A1=E3=82=BD=E3=83=83?= =?UTF-8?q?=E3=83=89=E3=81=AB=E6=8A=BD=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- OpenTween/TimelineListViewDrawer.cs | 81 ++++++++++++++--------------- 1 file changed, 38 insertions(+), 43 deletions(-) diff --git a/OpenTween/TimelineListViewDrawer.cs b/OpenTween/TimelineListViewDrawer.cs index 44bcb9adc..2d8bdf4ae 100644 --- a/OpenTween/TimelineListViewDrawer.cs +++ b/OpenTween/TimelineListViewDrawer.cs @@ -147,19 +147,7 @@ private void DrawListViewItemIcon(DrawListViewItemEventArgs e) iconRect.Offset(0, Math.Max(0, (itemRect.Height - scaledIconSize.Height) / 2)); var post = this.tab[item.Index]; - var img = this.LoadListViewIconLazy(post, scaledIconSize.Width); - if (img != null) - { - e.Graphics.FillRectangle(Brushes.White, iconRect); - e.Graphics.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.High; - try - { - e.Graphics.DrawImage(img.Image, iconRect); - } - catch (ArgumentException) - { - } - } + this.DrawListViewItemProfileImage(e.Graphics, post, scaledIconSize, iconRect); if (post.StateIndex > -1) { @@ -167,39 +155,57 @@ private void DrawListViewItemIcon(DrawListViewItemEventArgs e) if (stateRect.Width > 0) e.Graphics.DrawIcon(this.GetPostStateIcon(post.StateIndex), stateRect); } - - // キャッシュにない画像の場合は読み込みが完了してから再描画する - _ = this.LoadProfileImage(post, scaledIconSize.Width); } - private MemoryImage? LoadListViewIconLazy(PostClass post, int scaledIconSize) + private void DrawListViewItemProfileImage(Graphics g, PostClass post, Size scaledIconSize, Rectangle iconRect) { - if (scaledIconSize <= 0) - return null; + if (scaledIconSize.Width <= 0) + return; var normalImageUrl = post.ImageUrl; if (MyCommon.IsNullOrEmpty(normalImageUrl)) - return null; + return; - var sizeName = Twitter.DecideProfileImageSize(scaledIconSize); + var sizeName = Twitter.DecideProfileImageSize(scaledIconSize.Width); var cachedImage = this.iconCache.TryGetLargerOrSameSizeFromCache(normalImageUrl, sizeName); + if (cachedImage != null) - return cachedImage; + { + g.FillRectangle(Brushes.White, iconRect); + g.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.High; + try + { + g.DrawImage(cachedImage.Image, iconRect); + } + catch (ArgumentException) + { + } + } + else + { + // キャッシュにない画像の場合は読み込みが完了してから再描画する + async Task RefreshProfileImageLazy() + { + await this.LoadProfileImage(normalImageUrl, sizeName); - return null; - } + if (this.listView.IsDisposed) + return; - private async Task LoadProfileImage(PostClass post, int scaledIconSize) - { - if (scaledIconSize <= 0) - return; + if (this.listView.VirtualListSize == 0) + return; - var normalImageUrl = post.ImageUrl; - if (MyCommon.IsNullOrEmpty(normalImageUrl)) - return; + // ロード中に index の指す行が変化している可能性がある + var newIndex = this.tab.IndexOf(post.StatusId); + if (newIndex != -1) + this.listView.RedrawItems(newIndex, newIndex, true); + } - var sizeName = Twitter.DecideProfileImageSize(scaledIconSize); + _ = RefreshProfileImageLazy(); + } + } + private async Task LoadProfileImage(string normalImageUrl, string sizeName) + { try { var imageUrl = Twitter.CreateProfileImageUrl(normalImageUrl, sizeName); @@ -217,17 +223,6 @@ private async Task LoadProfileImage(PostClass post, int scaledIconSize) { return; } - - if (this.listView.IsDisposed) - return; - - if (this.listView.VirtualListSize == 0) - return; - - // ロード中に index の指す行が変化している可能性がある - var newIndex = this.tab.IndexOf(post.StatusId); - if (newIndex != -1) - this.listView.RedrawItems(newIndex, newIndex, true); } private Icon GetPostStateIcon(int stateIndex) From e137069be02edaa4ae586ae933c9475f3ea03734 Mon Sep 17 00:00:00 2001 From: Kimura Youichi Date: Thu, 1 Dec 2022 03:16:48 +0900 Subject: [PATCH 18/29] =?UTF-8?q?DrawListViewItemIcon=E3=81=8B=E3=82=89Sta?= =?UTF-8?q?teIcon=E3=81=AE=E6=8F=8F=E7=94=BB=E5=87=A6=E7=90=86=E3=82=92?= =?UTF-8?q?=E3=83=A1=E3=82=BD=E3=83=83=E3=83=89=E3=81=AB=E6=8A=BD=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- OpenTween/TimelineListViewDrawer.cs | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/OpenTween/TimelineListViewDrawer.cs b/OpenTween/TimelineListViewDrawer.cs index 2d8bdf4ae..02b82be57 100644 --- a/OpenTween/TimelineListViewDrawer.cs +++ b/OpenTween/TimelineListViewDrawer.cs @@ -149,12 +149,19 @@ private void DrawListViewItemIcon(DrawListViewItemEventArgs e) var post = this.tab[item.Index]; this.DrawListViewItemProfileImage(e.Graphics, post, scaledIconSize, iconRect); - if (post.StateIndex > -1) - { - var stateRect = Rectangle.Intersect(new Rectangle(new Point(iconRect.X + scaledIconSize.Width + 2, iconRect.Y), scaledStateSize), itemRect); - if (stateRect.Width > 0) - e.Graphics.DrawIcon(this.GetPostStateIcon(post.StateIndex), stateRect); - } + var stateRect = Rectangle.Intersect(new Rectangle(new Point(iconRect.X + scaledIconSize.Width + 2, iconRect.Y), scaledStateSize), itemRect); + this.DrawListViewItemStateIcon(e.Graphics, post, stateRect); + } + + private void DrawListViewItemStateIcon(Graphics g, PostClass post, Rectangle stateRect) + { + if (post.StateIndex == -1) + return; + + if (stateRect.Width <= 0) + return; + + g.DrawIcon(this.GetPostStateIcon(post.StateIndex), stateRect); } private void DrawListViewItemProfileImage(Graphics g, PostClass post, Size scaledIconSize, Rectangle iconRect) From 2dd20ca449c3f52b777e72df8abd703ad22233ef Mon Sep 17 00:00:00 2001 From: Kimura Youichi Date: Thu, 1 Dec 2022 03:37:50 +0900 Subject: [PATCH 19/29] =?UTF-8?q?=E4=B8=8D=E8=A6=81=E3=81=AB=E3=81=AA?= =?UTF-8?q?=E3=81=A3=E3=81=9F=E3=83=95=E3=82=A1=E3=82=A4=E3=83=AB=E3=82=92?= =?UTF-8?q?=E5=89=8A=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .travis.yml | 17 -------- .tx/config | 99 --------------------------------------------- packages/.gitignore | 1 - 3 files changed, 117 deletions(-) delete mode 100644 .travis.yml delete mode 100644 .tx/config delete mode 100644 packages/.gitignore diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 149d75c3f..000000000 --- a/.travis.yml +++ /dev/null @@ -1,17 +0,0 @@ -language: csharp -solution: OpenTween.sln - -sudo: false - -cache: - directories: - - ./packages/ - -before_script: - - export DISPLAY=:99.0 - - sh -e /etc/init.d/xvfb start - -script: - - nuget restore -PackagesDirectory packages - - msbuild /p:Configuration=Debug /verbosity:quiet - - mono ./packages/xunit.runner.console/2.3.1/tools/net452/xunit.console.exe ./OpenTween.Tests/bin/Debug/net472/OpenTween.Tests.dll -appdomains denied -parallel none diff --git a/.tx/config b/.tx/config deleted file mode 100644 index c0c8599df..000000000 --- a/.tx/config +++ /dev/null @@ -1,99 +0,0 @@ -[main] -host = https://www.transifex.com -type = RESX - -[opentween.global] -file_filter = OpenTween/Properties/Resources..resx -source_file = OpenTween/Properties/Resources.resx -source_lang = ja - -[opentween.AppendSettingDialog] -file_filter = OpenTween/AppendSettingDialog..resx -source_file = OpenTween/AppendSettingDialog.resx -source_lang = ja - -[opentween.AtIdSupplement] -file_filter = OpenTween/AtIdSupplement..resx -source_file = OpenTween/AtIdSupplement.resx -source_lang = ja - -[opentween.AuthDialog] -file_filter = OpenTween/AuthDialog..resx -source_file = OpenTween/AuthDialog.resx -source_lang = ja - -[opentween.EventViewerDialog] -file_filter = OpenTween/EventViewerDialog..resx -source_file = OpenTween/EventViewerDialog.resx -source_lang = ja - -[opentween.FilterDialog] -file_filter = OpenTween/FilterDialog..resx -source_file = OpenTween/FilterDialog.resx -source_lang = ja - -[opentween.FormInfo] -file_filter = OpenTween/FormInfo..resx -source_file = OpenTween/FormInfo.resx -source_lang = ja - -[opentween.HashtagManage] -file_filter = OpenTween/HashtagManage..resx -source_file = OpenTween/HashtagManage.resx -source_lang = ja - -[opentween.InputTabName] -file_filter = OpenTween/InputTabName..resx -source_file = OpenTween/InputTabName.resx -source_lang = ja - -[opentween.ListAvailable] -file_filter = OpenTween/ListAvailable..resx -source_file = OpenTween/ListAvailable.resx -source_lang = ja - -[opentween.ListManage] -file_filter = OpenTween/ListManage..resx -source_file = OpenTween/ListManage.resx -source_lang = ja - -[opentween.MyLists] -file_filter = OpenTween/MyLists..resx -source_file = OpenTween/MyLists.resx -source_lang = ja - -[opentween.OpenURL] -file_filter = OpenTween/OpenURL..resx -source_file = OpenTween/OpenURL.resx -source_lang = ja - -[opentween.SearchWord] -file_filter = OpenTween/SearchWord..resx -source_file = OpenTween/SearchWord.resx -source_lang = ja - -[opentween.ShowUserInfo] -file_filter = OpenTween/ShowUserInfo..resx -source_file = OpenTween/ShowUserInfo.resx -source_lang = ja - -[opentween.TabsDialog] -file_filter = OpenTween/TabsDialog..resx -source_file = OpenTween/TabsDialog.resx -source_lang = ja - -[opentween.Tween] -file_filter = OpenTween/Tween..resx -source_file = OpenTween/Tween.resx -source_lang = ja - -[opentween.TweenAboutBox] -file_filter = OpenTween/TweenAboutBox..resx -source_file = OpenTween/TweenAboutBox.resx -source_lang = ja - -[opentween.UpdateDialog] -file_filter = OpenTween/UpdateDialog..resx -source_file = OpenTween/UpdateDialog.resx -source_lang = ja - diff --git a/packages/.gitignore b/packages/.gitignore deleted file mode 100644 index 72e8ffc0d..000000000 --- a/packages/.gitignore +++ /dev/null @@ -1 +0,0 @@ -* From f8abeda73d5cbf063645b6c4695524b09e836cf0 Mon Sep 17 00:00:00 2001 From: Kimura Youichi Date: Thu, 1 Dec 2022 04:33:09 +0900 Subject: [PATCH 20/29] =?UTF-8?q?=E3=83=93=E3=83=AB=E3=83=89=E6=99=82?= =?UTF-8?q?=E3=81=ABResXcueTask=E3=81=AB=E9=96=A2=E3=81=99=E3=82=8B?= =?UTF-8?q?=E8=A8=AD=E5=AE=9A=E3=81=8C=E9=81=A9=E7=94=A8=E3=81=95=E3=82=8C?= =?UTF-8?q?=E3=81=AA=E3=81=84=E5=95=8F=E9=A1=8C=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes: f9a20054 ("OpenTween.csprojを新しい形式に") --- OpenTween/OpenTween.csproj | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/OpenTween/OpenTween.csproj b/OpenTween/OpenTween.csproj index 414945b28..8582dfe3a 100644 --- a/OpenTween/OpenTween.csproj +++ b/OpenTween/OpenTween.csproj @@ -1,4 +1,5 @@ - + + WinExe true @@ -646,6 +647,7 @@ + From 6921345124fee34cc8920965566d8616fa4e5a56 Mon Sep 17 00:00:00 2001 From: kzrnm Date: Sun, 25 Sep 2022 00:55:46 +0900 Subject: [PATCH 21/29] =?UTF-8?q?=E7=94=BB=E5=83=8F=E3=82=92=E3=82=AF?= =?UTF-8?q?=E3=83=AA=E3=83=83=E3=83=97=E3=83=9C=E3=83=BC=E3=83=89=E3=81=AB?= =?UTF-8?q?=E3=82=B3=E3=83=94=E3=83=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- OpenTween/TweetThumbnail.Designer.cs | 9 +++++++++ OpenTween/TweetThumbnail.cs | 13 +++++++++++++ OpenTween/TweetThumbnail.en.resx | 2 ++ OpenTween/TweetThumbnail.resx | 4 ++++ 4 files changed, 28 insertions(+) diff --git a/OpenTween/TweetThumbnail.Designer.cs b/OpenTween/TweetThumbnail.Designer.cs index 702d66159..aa2d5e9c4 100644 --- a/OpenTween/TweetThumbnail.Designer.cs +++ b/OpenTween/TweetThumbnail.Designer.cs @@ -39,6 +39,7 @@ private void InitializeComponent() this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator(); this.searchImageGoogleMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.searchImageSauceNaoMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.copyToClipboardMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.contextMenuStrip.SuspendLayout(); this.SuspendLayout(); // @@ -63,6 +64,7 @@ private void InitializeComponent() this.contextMenuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.openMenuItem, this.copyUrlMenuItem, + this.copyToClipboardMenuItem, this.toolStripSeparator1, this.searchImageGoogleMenuItem, this.searchImageSauceNaoMenuItem}); @@ -99,6 +101,12 @@ private void InitializeComponent() this.searchImageSauceNaoMenuItem.Name = "searchImageSauceNaoMenuItem"; this.searchImageSauceNaoMenuItem.Click += new System.EventHandler(this.SearchImageSauceNaoMenuItem_Click); // + // copyToClipboardMenuItem + // + resources.ApplyResources(this.copyToClipboardMenuItem, "copyToClipboardMenuItem"); + this.copyToClipboardMenuItem.Name = "copyToClipboardMenuItem"; + this.copyToClipboardMenuItem.Click += new System.EventHandler(this.CopyToClipboardMenuItem_Click); + // // TweetThumbnail // resources.ApplyResources(this, "$this"); @@ -122,6 +130,7 @@ private void InitializeComponent() private System.Windows.Forms.ToolStripMenuItem searchImageSauceNaoMenuItem; private System.Windows.Forms.ToolStripMenuItem openMenuItem; private System.Windows.Forms.ToolStripMenuItem copyUrlMenuItem; + private System.Windows.Forms.ToolStripMenuItem copyToClipboardMenuItem; private System.Windows.Forms.ToolStripSeparator toolStripSeparator1; } } diff --git a/OpenTween/TweetThumbnail.cs b/OpenTween/TweetThumbnail.cs index c3b839918..96bc6f170 100644 --- a/OpenTween/TweetThumbnail.cs +++ b/OpenTween/TweetThumbnail.cs @@ -299,6 +299,19 @@ private void CopyUrlMenuItem_Click(object sender, EventArgs e) MessageBox.Show(ex.Message); } } + + private void CopyToClipboardMenuItem_Click(object sender, EventArgs e) + { + try + { + if (this.PictureBox[this.scrollBar.Value].Image is { } memoryImage) + Clipboard.SetImage(memoryImage.Image); + } + catch (ExternalException ex) + { + MessageBox.Show(ex.Message); + } + } } public class ThumbnailDoubleClickEventArgs : EventArgs diff --git a/OpenTween/TweetThumbnail.en.resx b/OpenTween/TweetThumbnail.en.resx index 33aefc088..43d6d93ac 100644 --- a/OpenTween/TweetThumbnail.en.resx +++ b/OpenTween/TweetThumbnail.en.resx @@ -10,6 +10,8 @@ 254, 22 &Copy URL + 254, 22 + Copy image to clipboard 254, 22 &Open diff --git a/OpenTween/TweetThumbnail.resx b/OpenTween/TweetThumbnail.resx index bbac2ffd1..96bcd4631 100644 --- a/OpenTween/TweetThumbnail.resx +++ b/OpenTween/TweetThumbnail.resx @@ -16,6 +16,8 @@ System.Windows.Forms.ContextMenuStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 copyUrlMenuItem System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + copyToClipboardMenuItem + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 openMenuItem System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 panelPictureBox @@ -39,6 +41,8 @@ 110, 17 223, 22 URLをコピー(&C) + 223, 22 + 画像をクリップボードにコピー 223, 22 開く(&O) Fill From 1c2dca1b90d69106c6912b3475e6703a34d1b544 Mon Sep 17 00:00:00 2001 From: Kimura Youichi Date: Thu, 1 Dec 2022 04:31:26 +0900 Subject: [PATCH 22/29] =?UTF-8?q?=E3=82=B5=E3=83=A0=E3=83=8D=E3=82=A4?= =?UTF-8?q?=E3=83=AB=E7=94=BB=E5=83=8F=E3=81=AE=E3=82=B3=E3=83=B3=E3=83=86?= =?UTF-8?q?=E3=82=AD=E3=82=B9=E3=83=88=E3=83=A1=E3=83=8B=E3=83=A5=E3=83=BC?= =?UTF-8?q?=E3=81=AE=E3=82=AD=E3=83=A3=E3=83=97=E3=82=B7=E3=83=A7=E3=83=B3?= =?UTF-8?q?=E3=82=92=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- OpenTween/TweetThumbnail.en.resx | 6 +++--- OpenTween/TweetThumbnail.resx | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/OpenTween/TweetThumbnail.en.resx b/OpenTween/TweetThumbnail.en.resx index 43d6d93ac..788138f7c 100644 --- a/OpenTween/TweetThumbnail.en.resx +++ b/OpenTween/TweetThumbnail.en.resx @@ -8,10 +8,10 @@ 255, 98 - 254, 22 - &Copy URL 254, 22 - Copy image to clipboard + Copy image + 254, 22 + &Copy image URL 254, 22 &Open diff --git a/OpenTween/TweetThumbnail.resx b/OpenTween/TweetThumbnail.resx index 96bcd4631..79421639b 100644 --- a/OpenTween/TweetThumbnail.resx +++ b/OpenTween/TweetThumbnail.resx @@ -14,10 +14,10 @@ System.Windows.Forms.UserControl, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 contextMenuStrip System.Windows.Forms.ContextMenuStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - copyUrlMenuItem - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 copyToClipboardMenuItem System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + copyUrlMenuItem + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 openMenuItem System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 panelPictureBox @@ -39,10 +39,10 @@ 224, 98 110, 17 - 223, 22 - URLをコピー(&C) 223, 22 - 画像をクリップボードにコピー + 画像をコピー + 223, 22 + 画像のURLをコピー(&C) 223, 22 開く(&O) Fill From a49d5fcaac2fab458cc2d572dc7ce9fc0f22b5b8 Mon Sep 17 00:00:00 2001 From: Kimura Youichi Date: Thu, 1 Dec 2022 04:48:01 +0900 Subject: [PATCH 23/29] =?UTF-8?q?ChangeLog=20=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 6921345124fee34cc8920965566d8616fa4e5a56 での変更を反映 --- OpenTween/Resources/ChangeLog.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/OpenTween/Resources/ChangeLog.txt b/OpenTween/Resources/ChangeLog.txt index 3c93aae43..b3a85ab2e 100644 --- a/OpenTween/Resources/ChangeLog.txt +++ b/OpenTween/Resources/ChangeLog.txt @@ -1,6 +1,7 @@ 更新履歴 ==== Unreleased + * NEW: サムネイル画像のコンテキストメニューに「画像をコピー」を追加 (thx @kzlogos!) ==== Ver 2.7.1(2022/09/03) * FIX: 発言一覧の選択位置を移動した際にデッドロックが発生する場合がある不具合を修正 (thx @Kazuki_Ashiya!) From a2b3a9bf44668cef5bd364400fb213620234982e Mon Sep 17 00:00:00 2001 From: Kimura Youichi Date: Thu, 1 Dec 2022 05:18:31 +0900 Subject: [PATCH 24/29] =?UTF-8?q?=E3=82=B5=E3=83=A0=E3=83=8D=E3=82=A4?= =?UTF-8?q?=E3=83=AB=E7=94=BB=E5=83=8F=E3=81=AE=E3=82=B3=E3=83=B3=E3=83=86?= =?UTF-8?q?=E3=82=AD=E3=82=B9=E3=83=88=E3=83=A1=E3=83=8B=E3=83=A5=E3=83=BC?= =?UTF-8?q?=E9=A0=85=E7=9B=AE=E3=81=AE=E9=A0=86=E5=BA=8F=E3=82=92=E5=A4=89?= =?UTF-8?q?=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- OpenTween/TweetThumbnail.Designer.cs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/OpenTween/TweetThumbnail.Designer.cs b/OpenTween/TweetThumbnail.Designer.cs index aa2d5e9c4..481575f9e 100644 --- a/OpenTween/TweetThumbnail.Designer.cs +++ b/OpenTween/TweetThumbnail.Designer.cs @@ -35,11 +35,11 @@ private void InitializeComponent() this.panelPictureBox = new System.Windows.Forms.Panel(); this.contextMenuStrip = new System.Windows.Forms.ContextMenuStrip(this.components); this.openMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.copyToClipboardMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.copyUrlMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator(); this.searchImageGoogleMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.searchImageSauceNaoMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.copyToClipboardMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.contextMenuStrip.SuspendLayout(); this.SuspendLayout(); // @@ -63,8 +63,8 @@ private void InitializeComponent() resources.ApplyResources(this.contextMenuStrip, "contextMenuStrip"); this.contextMenuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.openMenuItem, - this.copyUrlMenuItem, this.copyToClipboardMenuItem, + this.copyUrlMenuItem, this.toolStripSeparator1, this.searchImageGoogleMenuItem, this.searchImageSauceNaoMenuItem}); @@ -78,6 +78,12 @@ private void InitializeComponent() this.openMenuItem.Name = "openMenuItem"; this.openMenuItem.Click += new System.EventHandler(this.OpenMenuItem_Click); // + // copyToClipboardMenuItem + // + resources.ApplyResources(this.copyToClipboardMenuItem, "copyToClipboardMenuItem"); + this.copyToClipboardMenuItem.Name = "copyToClipboardMenuItem"; + this.copyToClipboardMenuItem.Click += new System.EventHandler(this.CopyToClipboardMenuItem_Click); + // // copyUrlMenuItem // resources.ApplyResources(this.copyUrlMenuItem, "copyUrlMenuItem"); @@ -101,12 +107,6 @@ private void InitializeComponent() this.searchImageSauceNaoMenuItem.Name = "searchImageSauceNaoMenuItem"; this.searchImageSauceNaoMenuItem.Click += new System.EventHandler(this.SearchImageSauceNaoMenuItem_Click); // - // copyToClipboardMenuItem - // - resources.ApplyResources(this.copyToClipboardMenuItem, "copyToClipboardMenuItem"); - this.copyToClipboardMenuItem.Name = "copyToClipboardMenuItem"; - this.copyToClipboardMenuItem.Click += new System.EventHandler(this.CopyToClipboardMenuItem_Click); - // // TweetThumbnail // resources.ApplyResources(this, "$this"); From ecdd09f89c989ff4dbae56224cb7e83eaa7522d9 Mon Sep 17 00:00:00 2001 From: Kimura Youichi Date: Fri, 2 Dec 2022 05:28:34 +0900 Subject: [PATCH 25/29] =?UTF-8?q?GitHub=20Actions=E3=81=A7=E3=83=86?= =?UTF-8?q?=E3=82=B9=E3=83=88=E5=A4=B1=E6=95=97=E6=99=82=E3=81=AE=E7=B5=82?= =?UTF-8?q?=E4=BA=86=E3=82=B3=E3=83=BC=E3=83=89=E3=81=8C=E3=82=B8=E3=83=A7?= =?UTF-8?q?=E3=83=96=E3=81=AE=E6=88=90=E5=90=A6=E3=81=AB=E5=8F=8D=E6=98=A0?= =?UTF-8?q?=E3=81=95=E3=82=8C=E3=81=AA=E3=81=84=E5=95=8F=E9=A1=8C=E3=82=92?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build.yml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a7de4ede0..ad475e3ad 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -89,7 +89,7 @@ jobs: $altCoverPath = "$($env:NUGET_PACKAGES)\altcover\$($altCoverVersion)\tools\$($targetFramework)\AltCover.exe" $xunitPath = "$($env:NUGET_PACKAGES)\xunit.runner.console\$($xunitVersion)\tools\$($targetFramework)\xunit.console.exe" - Start-Process ` + $p = Start-Process ` -FilePath $altCoverPath ` -ArgumentList ( '--inputDirectory', @@ -105,9 +105,14 @@ jobs: '--visibleBranches' ) ` -NoNewWindow ` + -PassThru ` -Wait - Start-Process ` + if ($p.ExitCode -ne 0) { + exit $p.ExitCode + } + + $p = Start-Process ` -FilePath $altCoverPath ` -ArgumentList ( 'runner', @@ -119,8 +124,13 @@ jobs: '.\__Instrumented\OpenTween.Tests.dll' ) ` -NoNewWindow ` + -PassThru ` -Wait + if ($p.ExitCode -ne 0) { + exit $p.ExitCode + } + - name: Upload test results to codecov shell: pwsh run: | From d2422c2b896c2dea0697d0b972219704ef1aaf62 Mon Sep 17 00:00:00 2001 From: niyari Date: Tue, 10 Jan 2023 04:59:17 +0900 Subject: [PATCH 26/29] =?UTF-8?q?twitter=20/=20twemoji=20=E3=81=AECDN?= =?UTF-8?q?=E3=82=92=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- OpenTween.Tests/TweetExtractorTest.cs | 28 +++++++++++++-------------- OpenTween.Tests/TweetFormatterTest.cs | 4 ++-- OpenTween/TweetExtractor.cs | 3 ++- 3 files changed, 18 insertions(+), 17 deletions(-) diff --git a/OpenTween.Tests/TweetExtractorTest.cs b/OpenTween.Tests/TweetExtractorTest.cs index 942440d46..29aa41ec0 100644 --- a/OpenTween.Tests/TweetExtractorTest.cs +++ b/OpenTween.Tests/TweetExtractorTest.cs @@ -191,7 +191,7 @@ public void ExtractEmojiEntities_Test() Assert.Equal(new[] { 5, 6 }, entity.Indices); Assert.Equal("✨", entity.Text); - Assert.Equal("https://twemoji.maxcdn.com/2/72x72/2728.png", entity.Url); + Assert.Equal("https://cdnjs.cloudflare.com/ajax/libs/twemoji/14.0.2/72x72/2728.png", entity.Url); } [Fact] @@ -202,7 +202,7 @@ public void ExtractEmojiEntities_SurrogatePairTest() // 「𠮷」「🍚」は UTF-16 でそれぞれ 2byte になるがインデックスはコードポイント単位で数えなければならない Assert.Equal(new[] { 4, 5 }, entity.Indices); Assert.Equal("🍚", entity.Text); - Assert.Equal("https://twemoji.maxcdn.com/2/72x72/1f35a.png", entity.Url); + Assert.Equal("https://cdnjs.cloudflare.com/ajax/libs/twemoji/14.0.2/72x72/1f35a.png", entity.Url); } [Fact] @@ -224,7 +224,7 @@ public void ExtractEmojiEntities_VariationSelector_EmojiStyleTest() Assert.Equal(new[] { 0, 2 }, entity.Indices); Assert.Equal("©", entity.Text); - Assert.Equal("https://twemoji.maxcdn.com/2/72x72/a9.png", entity.Url); + Assert.Equal("https://cdnjs.cloudflare.com/ajax/libs/twemoji/14.0.2/72x72/a9.png", entity.Url); } [Fact] @@ -238,7 +238,7 @@ public void ExtractEmojiEntities_VariationSelector_UnnecessaryEmojiStyleTest() Assert.Equal(new[] { 0, 1 }, entities[0].Indices); Assert.Equal("🍣", entities[0].Text); - Assert.Equal("https://twemoji.maxcdn.com/2/72x72/1f363.png", entities[0].Url); + Assert.Equal("https://cdnjs.cloudflare.com/ajax/libs/twemoji/14.0.2/72x72/1f363.png", entities[0].Url); Assert.Equal(new[] { 1, 2 }, entities[1].Indices); Assert.Equal("", entities[1].Text); @@ -253,7 +253,7 @@ public void ExtractEmojiEntities_CombiningCharacterTest() Assert.Equal(new[] { 0, 2 }, entity.Indices); Assert.Equal("#⃣", entity.Text); - Assert.Equal("https://twemoji.maxcdn.com/2/72x72/23-20e3.png", entity.Url); + Assert.Equal("https://cdnjs.cloudflare.com/ajax/libs/twemoji/14.0.2/72x72/23-20e3.png", entity.Url); } [Fact] @@ -265,7 +265,7 @@ public void ExtractEmojiEntities_Unicode10Test() Assert.Equal(new[] { 0, 1 }, entity.Indices); Assert.Equal("🦒", entity.Text); - Assert.Equal("https://twemoji.maxcdn.com/2/72x72/1f992.png", entity.Url); + Assert.Equal("https://cdnjs.cloudflare.com/ajax/libs/twemoji/14.0.2/72x72/1f992.png", entity.Url); } [Fact] @@ -277,7 +277,7 @@ public void ExtractEmojiEntities_Unicode11Test() Assert.Equal(new[] { 0, 1 }, entity.Indices); Assert.Equal("🦸", entity.Text); - Assert.Equal("https://twemoji.maxcdn.com/2/72x72/1f9b8.png", entity.Url); + Assert.Equal("https://cdnjs.cloudflare.com/ajax/libs/twemoji/14.0.2/72x72/1f9b8.png", entity.Url); } [Fact] @@ -289,7 +289,7 @@ public void ExtractEmojiEntities_Unicode12Test() Assert.Equal(new[] { 0, 1 }, entity.Indices); Assert.Equal("🧅", entity.Text); - Assert.Equal("https://twemoji.maxcdn.com/2/72x72/1f9c5.png", entity.Url); + Assert.Equal("https://cdnjs.cloudflare.com/ajax/libs/twemoji/14.0.2/72x72/1f9c5.png", entity.Url); } [Fact] @@ -301,7 +301,7 @@ public void ExtractEmojiEntities_Unicode13Test() Assert.Equal(new[] { 0, 1 }, entity.Indices); Assert.Equal("🥷", entity.Text); - Assert.Equal("https://twemoji.maxcdn.com/2/72x72/1f977.png", entity.Url); + Assert.Equal("https://cdnjs.cloudflare.com/ajax/libs/twemoji/14.0.2/72x72/1f977.png", entity.Url); } [Fact] @@ -313,7 +313,7 @@ public void ExtractEmojiEntities_Unicode14Test() Assert.Equal(new[] { 0, 1 }, entity.Indices); Assert.Equal("🫠", entity.Text); - Assert.Equal("https://twemoji.maxcdn.com/2/72x72/1fae0.png", entity.Url); + Assert.Equal("https://cdnjs.cloudflare.com/ajax/libs/twemoji/14.0.2/72x72/1fae0.png", entity.Url); } [Fact] @@ -325,7 +325,7 @@ public void ExtractEmojiEntities_EmojiModifiers_CombiningTest() Assert.Equal(new[] { 0, 2 }, entity.Indices); Assert.Equal("👦\U0001F3FF", entity.Text); - Assert.Equal("https://twemoji.maxcdn.com/2/72x72/1f466-1f3ff.png", entity.Url); + Assert.Equal("https://cdnjs.cloudflare.com/ajax/libs/twemoji/14.0.2/72x72/1f466-1f3ff.png", entity.Url); } [Fact] @@ -337,7 +337,7 @@ public void ExtractEmojiEntities_EmojiModifiers_SingleTest() Assert.Equal(new[] { 0, 1 }, entity.Indices); Assert.Equal("\U0001F3FF", entity.Text); - Assert.Equal("https://twemoji.maxcdn.com/2/72x72/1f3ff.png", entity.Url); + Assert.Equal("https://cdnjs.cloudflare.com/ajax/libs/twemoji/14.0.2/72x72/1f3ff.png", entity.Url); } [Fact] @@ -349,7 +349,7 @@ public void ExtractEmojiEntities_EmojiZWJSequenceTest() Assert.Equal(new[] { 0, 3 }, entity.Indices); Assert.Equal("👨\u200D🎨", entity.Text); - Assert.Equal("https://twemoji.maxcdn.com/2/72x72/1f468-200d-1f3a8.png", entity.Url); + Assert.Equal("https://cdnjs.cloudflare.com/ajax/libs/twemoji/14.0.2/72x72/1f468-200d-1f3a8.png", entity.Url); } [Fact] @@ -362,7 +362,7 @@ public void ExtractEmojiEntities_EmojiZWJSequenceWithVariationSelectorTest() Assert.Equal(new[] { 0, 4 }, entity.Indices); Assert.Equal("🏃\u200D♀\uFE0F", entity.Text); - Assert.Equal("https://twemoji.maxcdn.com/2/72x72/1f3c3-200d-2640-fe0f.png", entity.Url); + Assert.Equal("https://cdnjs.cloudflare.com/ajax/libs/twemoji/14.0.2/72x72/1f3c3-200d-2640-fe0f.png", entity.Url); } } } diff --git a/OpenTween.Tests/TweetFormatterTest.cs b/OpenTween.Tests/TweetFormatterTest.cs index c8c8ebaa9..8902c96a5 100644 --- a/OpenTween.Tests/TweetFormatterTest.cs +++ b/OpenTween.Tests/TweetFormatterTest.cs @@ -175,11 +175,11 @@ public void FormatEmojiEntity_Test() { Indices = new[] { 0, 1 }, Text = "🍣", - Url = "https://twemoji.maxcdn.com/2/72x72/1f363.png", + Url = "https://cdnjs.cloudflare.com/ajax/libs/twemoji/14.0.2/72x72/1f363.png", }, }; - var expected = "\"🍣\""; + var expected = "\"🍣\""; Assert.Equal(expected, TweetFormatter.AutoLinkHtml(text, entities)); } diff --git a/OpenTween/TweetExtractor.cs b/OpenTween/TweetExtractor.cs index da822153d..df1cf25ac 100644 --- a/OpenTween/TweetExtractor.cs +++ b/OpenTween/TweetExtractor.cs @@ -189,7 +189,8 @@ public static IEnumerable ExtractEmojiEntities(string text) { Indices = new[] { startPos, endPos }, Text = input, - Url = "https://twemoji.maxcdn.com/2/72x72/" + string.Join("-", codepointHex) + ".png", + // TODO: CDN(MaxCDN)の廃止のため一時的に変更。 https://twemoji.maxcdn.com/2/72x72/ + Url = "https://cdnjs.cloudflare.com/ajax/libs/twemoji/14.0.2/72x72/" + string.Join("-", codepointHex) + ".png", }; } else From 54f93a52b2ba2140802274fe9ef7a60c3e6c2bae Mon Sep 17 00:00:00 2001 From: Kimura Youichi Date: Wed, 11 Jan 2023 03:16:52 +0900 Subject: [PATCH 27/29] =?UTF-8?q?ChangeLog=20=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit d2422c2b896c2dea0697d0b972219704ef1aaf62 での変更を反映 --- OpenTween/Resources/ChangeLog.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/OpenTween/Resources/ChangeLog.txt b/OpenTween/Resources/ChangeLog.txt index b3a85ab2e..32333f557 100644 --- a/OpenTween/Resources/ChangeLog.txt +++ b/OpenTween/Resources/ChangeLog.txt @@ -2,6 +2,7 @@ ==== Unreleased * NEW: サムネイル画像のコンテキストメニューに「画像をコピー」を追加 (thx @kzlogos!) + * CHG: Twemojiの画像の取得元をMaxCDNからCloudflareに移行 (thx @sou_niyari!) ==== Ver 2.7.1(2022/09/03) * FIX: 発言一覧の選択位置を移動した際にデッドロックが発生する場合がある不具合を修正 (thx @Kazuki_Ashiya!) From f7dc599083a20e98a1acba0b392c5d233c20cb5b Mon Sep 17 00:00:00 2001 From: Kimura Youichi Date: Wed, 11 Jan 2023 03:59:47 +0900 Subject: [PATCH 28/29] =?UTF-8?q?WebBrowser=E3=82=B3=E3=83=B3=E3=83=9D?= =?UTF-8?q?=E3=83=BC=E3=83=8D=E3=83=B3=E3=83=88=E5=86=85=E3=81=A7=E3=81=AE?= =?UTF-8?q?=E3=82=AB=E3=83=A9=E3=83=BC=E7=B5=B5=E6=96=87=E5=AD=97=E3=81=AE?= =?UTF-8?q?=E6=8F=8F=E7=94=BB=E3=81=AB=E5=AF=BE=E5=BF=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- OpenTween/Resources/ChangeLog.txt | 1 + OpenTween/Tween.cs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/OpenTween/Resources/ChangeLog.txt b/OpenTween/Resources/ChangeLog.txt index 32333f557..c8bc34ac6 100644 --- a/OpenTween/Resources/ChangeLog.txt +++ b/OpenTween/Resources/ChangeLog.txt @@ -2,6 +2,7 @@ ==== Unreleased * NEW: サムネイル画像のコンテキストメニューに「画像をコピー」を追加 (thx @kzlogos!) + * NEW: Segoe UI Emoji によるカラー絵文字の描画に対応(発言詳細欄のみ) * CHG: Twemojiの画像の取得元をMaxCDNからCloudflareに移行 (thx @sou_niyari!) ==== Ver 2.7.1(2022/09/03) diff --git a/OpenTween/Tween.cs b/OpenTween/Tween.cs index 5cc1ace7e..5e65deaf5 100644 --- a/OpenTween/Tween.cs +++ b/OpenTween/Tween.cs @@ -101,7 +101,7 @@ public partial class TweenMain : OTBaseForm "" + "