From ff3e80589f4e50aecb2c3c54ae901b550c5dcd26 Mon Sep 17 00:00:00 2001 From: craftwar Date: Tue, 3 Jul 2018 09:15:42 +0800 Subject: [PATCH 1/4] Change VC optimization options --- Combo/Combo.vcxproj | 5 +++++ Lite/Lite.vcxproj | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/Combo/Combo.vcxproj b/Combo/Combo.vcxproj index 224572e..59592bb 100644 --- a/Combo/Combo.vcxproj +++ b/Combo/Combo.vcxproj @@ -23,6 +23,7 @@ v141_xp Static MultiByte + true Application @@ -137,6 +138,9 @@ true Default true + true + /Gw %(AdditionalOptions) + true NDEBUG;%(PreprocessorDefinitions) @@ -155,6 +159,7 @@ false MachineX86 + UseLinkTimeCodeGeneration ..\Resource\PCMan.exe.manifest %(AdditionalManifestFiles) diff --git a/Lite/Lite.vcxproj b/Lite/Lite.vcxproj index 68683bc..5017def 100644 --- a/Lite/Lite.vcxproj +++ b/Lite/Lite.vcxproj @@ -23,6 +23,7 @@ v141_xp Static MultiByte + true Application @@ -137,6 +138,9 @@ true Default true + true + true + /Gw %(AdditionalOptions) NDEBUG;%(PreprocessorDefinitions) @@ -155,6 +159,7 @@ false MachineX86 + UseLinkTimeCodeGeneration ..\Resource\PCMan.exe.manifest %(AdditionalManifestFiles) From 6b96af7310d9712d21dba74d412a8b901a46e2db Mon Sep 17 00:00:00 2001 From: craftwar Date: Tue, 3 Jul 2018 10:41:57 +0800 Subject: [PATCH 2/4] Fix AppVeyor build, use AppVeyor buildlogger --- appveyor.yml | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 564c208..7367eab 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,34 +1,38 @@ version: '{build}' image: Visual Studio 2017 -configuration: Release + init: - ps: Set-WinSystemLocale zh-TW -- ps: Start-Sleep -s 5 +- ps: Start-Sleep -s 10 - ps: Restart-Computer +- ps: Start-Sleep -s 5 + install: # update vcpkg - cd "C:\Tools\vcpkg" - git pull - .\bootstrap-vcpkg.bat -- cd "%APPVEYOR_BUILD_FOLDER%" - vcpkg remove --outdated --recurse - vcpkg install libwebsockets - +- cd "%APPVEYOR_BUILD_FOLDER%" - ps: .\Scripts\BeforeBuild.ps1 -clone_folder: C:\projects\pcman-windows -cache: c:\tools\vcpkg\installed\ -build: - project: PCMan.sln - parallel: true - verbosity: minimal + +build_script: +- call msbuild /m /p:Configuration=Release %APPVEYOR_BUILD_FOLDER%\PCMan.sln /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" + after_build: - ps: .\Scripts\DownloadNonFree.ps1 - ps: .\Scripts\AfterBuild.ps1 + artifacts: - path: Lite\Release\PCMan.zip - path: Combo\Release\PCManCB.zip - path: Release\PCMan.exe - path: Release\PCManCB.exe + +cache: +- c:\tools\vcpkg\installed\ + deploy: provider: GitHub auth_token: $(github_auth_token) From 7b9ed1a0a2a8b1cda0fc77f0a1b4a3bfd39a9b1f Mon Sep 17 00:00:00 2001 From: craftwar Date: Wed, 11 Jul 2018 09:39:35 +0800 Subject: [PATCH 3/4] Revert version.h creation to Big5 remove warning of codepage and possible error --- Version_Set_Combo.bat | 5 ++--- Version_Set_Lite.bat | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Version_Set_Combo.bat b/Version_Set_Combo.bat index e579c46..4421774 100644 --- a/Version_Set_Combo.bat +++ b/Version_Set_Combo.bat @@ -1,4 +1,3 @@ -chcp 65001 SET MajorVersion=9 SET MinorVersion=5 SET PatchLevel=0 @@ -13,5 +12,5 @@ SET ProductName="PCMan Combo\0" SET InternalName="PCMan Combo\0" SET OriginalFilename="PCMan.exe\0" SET FileDescription="PCMan\0" -SET LegalCopyright="Copyright (C) 2001 - 2009 由 洪任諭及 Open PCMan Team 共同製作\0" -SET Comments="本軟體由洪任諭及 Open PCMan Team 共同製作." +SET LegalCopyright="Copyright (C) 2001 - 2009 x٤ Open PCMan Team @Ps@\0" +SET Comments="nѬx٤ Open PCMan Team @Ps@." diff --git a/Version_Set_Lite.bat b/Version_Set_Lite.bat index 280a53d..ea5cf3c 100644 --- a/Version_Set_Lite.bat +++ b/Version_Set_Lite.bat @@ -13,5 +13,5 @@ SET ProductName="PCMan\0" SET InternalName="PCMan\0" SET OriginalFilename="PCMan.exe\0" SET FileDescription="PCMan\0" -SET LegalCopyright="Copyright (C) 2001 - 2009 由 洪任諭及 Open PCMan Team 共同製作\0" -SET Comments="本軟體由洪任諭及 Open PCMan Team 共同製作." +SET LegalCopyright="Copyright (C) 2001 - 2009 x٤ Open PCMan Team @Ps@\0" +SET Comments="nѬx٤ Open PCMan Team @Ps@." From 84ef6918d0ef7f96c78fe149bf65d782ef98aba7 Mon Sep 17 00:00:00 2001 From: craftwar Date: Wed, 11 Jul 2018 09:42:07 +0800 Subject: [PATCH 4/4] Fix link len caculation and copy link --- Lite/BBSHyperLink.cpp | 2 +- Lite/Clipboard.cpp | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Lite/BBSHyperLink.cpp b/Lite/BBSHyperLink.cpp index 133d8d3..c59e43a 100644 --- a/Lite/BBSHyperLink.cpp +++ b/Lite/BBSHyperLink.cpp @@ -147,7 +147,7 @@ const char* CBBSHyperLink::FindHyperLink(const char *src, int &len) const break; } } - len = int(pend) - int(plink); + len = int(pend - plink); return plink; } } diff --git a/Lite/Clipboard.cpp b/Lite/Clipboard.cpp index 4bad156..f40b273 100644 --- a/Lite/Clipboard.cpp +++ b/Lite/Clipboard.cpp @@ -74,7 +74,8 @@ BOOL CClipboard::SetText(HWND owner, LPCTSTR str, int len) { LPSTR buf = (LPSTR)GlobalLock(hmem); PLCID lcid = (PLCID)GlobalLock(hlocmem); - memcpy(buf, str, len + 1); + memcpy(buf, str, len); + buf[len] = '\0'; // FIXME: Big5 should not be hard-coded since we have GB2312 version. *lcid = MAKELCID(MAKELANGID(LANG_CHINESE, SUBLANG_CHINESE_TRADITIONAL), SORT_CHINESE_BIG5); GlobalUnlock(hmem);