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/DlgLayout/DlgLayout.cpp b/DlgLayout/DlgLayout.cpp
index e52d06f..c230324 100644
--- a/DlgLayout/DlgLayout.cpp
+++ b/DlgLayout/DlgLayout.cpp
@@ -94,7 +94,7 @@ void CDlgLayout::OnSize(int cx, int cy)
{
if (ptab->layout & DLA_LEFT) //left anchor
{
- l = l;
+ //l = l;
r = l + w;
}
else // no horizontal anchors
@@ -113,7 +113,7 @@ void CDlgLayout::OnSize(int cx, int cy)
{
if (ptab->layout & DLA_TOP) //top anchor
{
- t = t;
+ //t = t;
b = t + h;
}
else // no vertical anchors
diff --git a/Lite/AutoUpdate.cpp b/Lite/AutoUpdate.cpp
index c875a9a..9e0f5cd 100644
--- a/Lite/AutoUpdate.cpp
+++ b/Lite/AutoUpdate.cpp
@@ -128,8 +128,9 @@ CAutoUpdater::ErrorType CAutoUpdater::CheckForUpdate()
download_update_dlg->DoModal();
//download_update_dlg->OnCancel();
- LPDWORD lpExitCode = new unsigned long;
- *lpExitCode = STILL_ACTIVE;
+ //LPDWORD lpExitCode = new unsigned long;
+ //*lpExitCode = STILL_ACTIVE;
+ //DWORD ExitCode = STILL_ACTIVE;
//while(*lpExitCode==STILL_ACTIVE)
//{
// GetExitCodeThread(controlThread->m_hThread,lpExitCode);
@@ -301,7 +302,7 @@ CString CAutoUpdater::GetFileVersion(LPCTSTR file)
version.Format(_T("%d.%d"), ver[0], ver[1]);
}
- delete pData;
+ delete[] pData;
return version;
}
catch(...) {
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);
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)
diff --git a/Lite/TermView.cpp b/Lite/TermView.cpp
index 05e45ea..156e842 100644
--- a/Lite/TermView.cpp
+++ b/Lite/TermView.cpp
@@ -1429,7 +1429,7 @@ void CTermView::OnEditPastefile()
data[len] = 0;
file.Abort();
telnet->SendString(data);
- delete data;
+ delete[] data;
}
}
}
diff --git a/Lite/TriggerList.cpp b/Lite/TriggerList.cpp
index e8113da..dbd474d 100644
--- a/Lite/TriggerList.cpp
+++ b/Lite/TriggerList.cpp
@@ -108,7 +108,7 @@ static void SetTriggerItem(CTriggerItem& item, char* line, CAES& crypto)
char* dec_buf = new char[enc_len + 2];
memset(dec_buf, 0, enc_len + 2);
crypto.Decrypt(enc_buf, dec_buf, enc_len);
- delete enc_buf;
+ delete[] enc_buf;
int dec_len = strlen(dec_buf);
char* ppasswd = dec_buf + dec_len + 1;
if (memcmp(LPCTSTR(AppConfig.passwd), ppasswd, AppConfig.passwd.GetLength()))
@@ -203,16 +203,16 @@ void CTriggerList::Save(CString& section)
char* enc_buf = new char[ dec_len ];
memset(enc_buf, 0, dec_len);
crypto.Encrypt(dec_buf, enc_buf, dec_len);
- delete []dec_buf;
+ delete[] dec_buf;
int base64_len = Base64Encode((BYTE*)enc_buf, dec_len, NULL, 0);
char* base64 = new char[ base64_len + 1 ];
base64_len = Base64Encode((BYTE*)enc_buf, dec_len, (BYTE*)base64, base64_len);
base64[ base64_len ] = '\0';
- delete []enc_buf;
+ delete[] enc_buf;
section += base64;
- delete base64;
+ delete[] base64;
}
else
{
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@."
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)