• R/O
  • HTTP
  • SSH
  • HTTPS

提交

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Loweynet


Commit MetaInfo

修訂a18cfa2489906cd58981b7cbc328f157cfa250d5 (tree)
時間2017-03-20 14:13:38
作者s_kawamoto <s_kawamoto@user...>
Commiters_kawamoto

Log Message

Support proxy connection for automatic software update.
Show the path of the backup copy after automatic software update.

Change Summary

差異

Binary files a/FFFTP_Eng_Release/FFFTP.exe and b/FFFTP_Eng_Release/FFFTP.exe differ
Binary files a/FFFTP_Eng_Release_64/FFFTP.exe and b/FFFTP_Eng_Release_64/FFFTP.exe differ
Binary files a/Release/FFFTP.exe and b/Release/FFFTP.exe differ
Binary files a/Release_64/FFFTP.exe and b/Release_64/FFFTP.exe differ
--- a/Resource/FFFTP.rc
+++ b/Resource/FFFTP.rc
@@ -242,7 +242,7 @@ FONT 9, "MS Shell Dlg", 0, 0, 0x0
242242 BEGIN
243243 DEFPUSHBUTTON "OK",IDOK,133,294,50,14
244244 ICON ffftp,-1,7,4,20,20
245- CTEXT "FFFTP Ver 1.99a-20170217",-1,113,11,90,8
245+ CTEXT "FFFTP Ver 1.99a-20170320",-1,113,11,90,8
246246 CTEXT "FFFTP‚Ífreeware‚Å‚·",-1,7,279,305,8
247247 CTEXT "Copyright(C) 1997-2010 Sota & ‚²‹¦—Í‚¢‚½‚¾‚¢‚½•ûX\nCopyright (C) 2011-2017 FFFTP Project (Hiromichi Matsushima, Suguru Kawamoto, IWAMOTO Kouichi, vitamin0x, ‚¤‚ȁ[, Asami, fortran90, tomo1192, Yuji Tanaka, Moriguchi Hirokazu, ‚Ó‚¤‚¹‚ñ)",-1,7,25,305,44,SS_NOPREFIX
248248 CTEXT "",ABOUT_JRE,7,96,305,8
@@ -2213,8 +2213,8 @@ nodrop_csr CURSOR "nodrop_c.cur"
22132213 //
22142214
22152215 VS_VERSION_INFO VERSIONINFO
2216- FILEVERSION 1,99,1,11
2217- PRODUCTVERSION 1,99,1,11
2216+ FILEVERSION 1,99,1,12
2217+ PRODUCTVERSION 1,99,1,12
22182218 FILEFLAGSMASK 0x3fL
22192219 #ifdef _DEBUG
22202220 FILEFLAGS 0x1L
@@ -2232,12 +2232,12 @@ BEGIN
22322232 VALUE "Comments", "‚±‚ê‚̓tƒŠ[ƒ\ƒtƒgƒEƒGƒA‚Å‚·B"
22332233 VALUE "CompanyName", "Sota, FFFTP Project"
22342234 VALUE "FileDescription", "FFFTP"
2235- VALUE "FileVersion", "1, 99, 1, 11"
2235+ VALUE "FileVersion", "1, 99, 1, 12"
22362236 VALUE "InternalName", "FFFTP"
22372237 VALUE "LegalCopyright", "Copyright (C) 1997-2010 Sota & ‚²‹¦—Í‚¢‚½‚¾‚¢‚½•ûX\nCopyright (C) 2011-2017 FFFTP Project (Hiromichi Matsushima, Suguru Kawamoto, IWAMOTO Kouichi, vitamin0x, ‚¤‚ȁ[, Asami, fortran90, tomo1192, Yuji Tanaka, Moriguchi Hirokazu, ‚Ó‚¤‚¹‚ñ)."
22382238 VALUE "OriginalFilename", "FFFTP.exe"
22392239 VALUE "ProductName", "FFFTP"
2240- VALUE "ProductVersion", "1, 99, 1, 11"
2240+ VALUE "ProductVersion", "1, 99, 1, 12"
22412241 END
22422242 END
22432243 BLOCK "VarFileInfo"
--- a/Resource_eng/ffftp.rc
+++ b/Resource_eng/ffftp.rc
@@ -242,7 +242,7 @@ FONT 9, "MS Shell Dlg", 0, 0, 0x0
242242 BEGIN
243243 DEFPUSHBUTTON "OK",IDOK,132,296,50,14
244244 ICON ffftp,-1,7,4,20,20
245- CTEXT "FFFTP Ver 1.99a-20170217",-1,110,11,90,8
245+ CTEXT "FFFTP Ver 1.99a-20170320",-1,110,11,90,8
246246 CTEXT "FFFTP is freeware",-1,7,281,301,8
247247 CTEXT "Copyright(C) 1997-2010 Sota && cooperators\nCopyright (C) 2011-2017 FFFTP Project (Hiromichi Matsushima, Suguru Kawamoto, IWAMOTO Kouichi, vitamin0x, unarist, Asami, fortran90, tomo1192, Yuji Tanaka, Moriguchi Hirokazu, Fu-sen)",-1,7,25,301,44
248248 CTEXT "",ABOUT_JRE,7,93,301,8
@@ -2253,8 +2253,8 @@ nodrop_csr CURSOR "nodrop_c.cur"
22532253 //
22542254
22552255 VS_VERSION_INFO VERSIONINFO
2256- FILEVERSION 1,99,1,11
2257- PRODUCTVERSION 1,99,1,11
2256+ FILEVERSION 1,99,1,12
2257+ PRODUCTVERSION 1,99,1,12
22582258 FILEFLAGSMASK 0x3fL
22592259 #ifdef _DEBUG
22602260 FILEFLAGS 0x1L
@@ -2272,12 +2272,12 @@ BEGIN
22722272 VALUE "Comments", "This software is Free Software"
22732273 VALUE "CompanyName", "Sota, FFFTP Project"
22742274 VALUE "FileDescription", "FFFTP"
2275- VALUE "FileVersion", "1, 99, 1, 11"
2275+ VALUE "FileVersion", "1, 99, 1, 12"
22762276 VALUE "InternalName", "FFFTP"
22772277 VALUE "LegalCopyright", "Copyright (C) 1997-2010 Sota & cooperators\nCopyright (C) 2011-2017 FFFTP Project (Hiromichi Matsushima, Suguru Kawamoto, IWAMOTO Kouichi, vitamin0x, unarist, Asami, fortran90, tomo1192, Yuji Tanaka, Moriguchi Hirokazu, Fu-sen)."
22782278 VALUE "OriginalFilename", "FFFTP.exe"
22792279 VALUE "ProductName", "FFFTP"
2280- VALUE "ProductVersion", "1, 99, 1, 11"
2280+ VALUE "ProductVersion", "1, 99, 1, 12"
22812281 END
22822282 END
22832283 BLOCK "VarFileInfo"
--- a/common.h
+++ b/common.h
@@ -72,16 +72,16 @@
7272 //#define PROGRAM_VERSION_NUM 1972 /* バージョン */
7373 // 64ビット対応
7474 #ifdef _WIN64
75-#define VER_STR "1.99a-20170217 64bit"
75+#define VER_STR "1.99a-20170320 64bit"
7676 #else
77-#define VER_STR "1.99a-20170217"
77+#define VER_STR "1.99a-20170320"
7878 #endif
7979 #define VER_NUM 1990 /* 設定バージョン */
8080 #define PROGRAM_VERSION_NUM 1990 /* バージョン */
8181 // ソフトウェア自動更新
8282 // リリースバージョンはリリース予定年(10進数4桁)+月(2桁)+日(2桁)+通し番号(0スタート2桁)とする
8383 // 2014年7月31日中の30個目のリリースは2014073129
84-#define RELEASE_VERSION_NUM 2017021700 /* リリースバージョン */
84+#define RELEASE_VERSION_NUM 2017032000 /* リリースバージョン */
8585
8686
8787 // SourceForge.JPによるフォーク
--- a/main.c
+++ b/main.c
@@ -329,6 +329,7 @@ int PASCAL WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpszCmdLi
329329 char ListFile[FMAX_PATH+1];
330330 char Description[FMAX_PATH+1];
331331 char UpdateDir[FMAX_PATH+1];
332+ char Buf[FMAX_PATH+1];
332333 char Path[FMAX_PATH+1];
333334 char Command[FMAX_PATH+1];
334335 char* p;
@@ -464,7 +465,12 @@ int PASCAL WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpszCmdLi
464465 {
465466 Sleep(1000);
466467 if(ApplyUpdates(UpdateDir, "updatebackup"))
467- MessageBox(NULL, MSGJPN358, "FFFTP", MB_OK);
468+ {
469+ GetModuleFileName(NULL, Path, MAX_PATH);
470+ strcpy(GetFileName(Path), "updatebackup");
471+ sprintf(Buf, MSGJPN358, Path);
472+ MessageBox(NULL, Buf, "FFFTP", MB_OK);
473+ }
468474 else
469475 MessageBox(NULL, MSGJPN359, "FFFTP", MB_OK | MB_ICONERROR);
470476 }
--- a/mesg-eng.h
+++ b/mesg-eng.h
@@ -356,7 +356,7 @@
356356 #define MSGJPN355 _Tu8("Move to &parent folder...", "Move to &parent folder...")
357357 #define MSGJPN356 _Tu8("XML file\0*.xml\0All file\0*\0", "XML file\0*.xml\0All file\0*\0")
358358 #define MSGJPN357 _Tu8("Failed to export the settings.\nPlease change saving path or format.", "Failed to export the settings.\nPlease change saving path or format.")
359-#define MSGJPN358 _Tu8("Software update has been completed.", "Software update has been completed.")
359+#define MSGJPN358 _Tu8("Software update has been completed.\nA backup copy of the previous version is in the following location.\n%s", "Software update has been completed.\nA backup copy of the previous version is in the following location.\n%s")
360360 #define MSGJPN359 _Tu8("Failed to update the software.\nPlease get the latest version from our web site and update it manually.", "Failed to update the software.\nPlease get the latest version from our web site and update it manually.")
361361 #define MSGJPN360 _Tu8("Updates", "Updates")
362362 #define MSGJPN361 _Tu8("There is a new version.\n\nCurrent version: %s\nNew version: %s\n%s\n\nIt takes a few minutes to download the updates.\nDo you want to update now?\n", "There is a new version.\n\nCurrent version: %s\nNew version: %s\n%s\n\nIt takes a few minutes to download the updates.\nDo you want to update now?\n")
--- a/mesg-jpn.h
+++ b/mesg-jpn.h
@@ -356,7 +356,7 @@
356356 #define MSGJPN355 _Tu8("一つ上のフォルダへ移動(&P)...", "\xE4\xB8\x80\xE3\x81\xA4\xE4\xB8\x8A\xE3\x81\xAE\xE3\x83\x95\xE3\x82\xA9\xE3\x83\xAB\xE3\x83\x80\xE3\x81\xB8\xE7\xA7\xBB\xE5\x8B\x95(&P)...")
357357 #define MSGJPN356 _Tu8("XMLファイル\0*.xml\0全てのファイル\0*\0", "XML\xE3\x83\x95\xE3\x82\xA1\xE3\x82\xA4\xE3\x83\xAB\0*.xml\0\xE5\x85\xA8\xE3\x81\xA6\xE3\x81\xAE\xE3\x83\x95\xE3\x82\xA1\xE3\x82\xA4\xE3\x83\xAB\0*\0")
358358 #define MSGJPN357 _Tu8("設定のエクスポートに失敗しました.\n保存する場所や形式を変更してください.", "\xE8\xA8\xAD\xE5\xAE\x9A\xE3\x81\xAE\xE3\x82\xA8\xE3\x82\xAF\xE3\x82\xB9\xE3\x83\x9D\xE3\x83\xBC\xE3\x83\x88\xE3\x81\xAB\xE5\xA4\xB1\xE6\x95\x97\xE3\x81\x97\xE3\x81\xBE\xE3\x81\x97\xE3\x81\x9F.\n\xE4\xBF\x9D\xE5\xAD\x98\xE3\x81\x99\xE3\x82\x8B\xE5\xA0\xB4\xE6\x89\x80\xE3\x82\x84\xE5\xBD\xA2\xE5\xBC\x8F\xE3\x82\x92\xE5\xA4\x89\xE6\x9B\xB4\xE3\x81\x97\xE3\x81\xA6\xE3\x81\x8F\xE3\x81\xA0\xE3\x81\x95\xE3\x81\x84.")
359-#define MSGJPN358 _Tu8("ソフトウェアの更新が完了しました.", "\xE3\x82\xBD\xE3\x83\x95\xE3\x83\x88\xE3\x82\xA6\xE3\x82\xA7\xE3\x82\xA2\xE3\x81\xAE\xE6\x9B\xB4\xE6\x96\xB0\xE3\x81\x8C\xE5\xAE\x8C\xE4\xBA\x86\xE3\x81\x97\xE3\x81\xBE\xE3\x81\x97\xE3\x81\x9F.")
359+#define MSGJPN358 _Tu8("ソフトウェアの更新が完了しました.\n以前のバージョンのバックアップコピーは以下の場所にあります.\n%s", "\xE3\x82\xBD\xE3\x83\x95\xE3\x83\x88\xE3\x82\xA6\xE3\x82\xA7\xE3\x82\xA2\xE3\x81\xAE\xE6\x9B\xB4\xE6\x96\xB0\xE3\x81\x8C\xE5\xAE\x8C\xE4\xBA\x86\xE3\x81\x97\xE3\x81\xBE\xE3\x81\x97\xE3\x81\x9F.\n\xE4\xBB\xA5\xE5\x89\x8D\xE3\x81\xAE\xE3\x83\x90\xE3\x83\xBC\xE3\x82\xB8\xE3\x83\xA7\xE3\x83\xB3\xE3\x81\xAE\xE3\x83\x90\xE3\x83\x83\xE3\x82\xAF\xE3\x82\xA2\xE3\x83\x83\xE3\x83\x97\xE3\x82\xB3\xE3\x83\x94\xE3\x83\xBC\xE3\x81\xAF\xE4\xBB\xA5\xE4\xB8\x8B\xE3\x81\xAE\xE5\xA0\xB4\xE6\x89\x80\xE3\x81\xAB\xE3\x81\x82\xE3\x82\x8A\xE3\x81\xBE\xE3\x81\x99.\n%s")
360360 #define MSGJPN359 _Tu8("ソフトウェアの更新に失敗しました.\nWebサイトから最新版を入手して手動で更新してください.", "\xE3\x82\xBD\xE3\x83\x95\xE3\x83\x88\xE3\x82\xA6\xE3\x82\xA7\xE3\x82\xA2\xE3\x81\xAE\xE6\x9B\xB4\xE6\x96\xB0\xE3\x81\xAB\xE5\xA4\xB1\xE6\x95\x97\xE3\x81\x97\xE3\x81\xBE\xE3\x81\x97\xE3\x81\x9F.\nWeb\xE3\x82\xB5\xE3\x82\xA4\xE3\x83\x88\xE3\x81\x8B\xE3\x82\x89\xE6\x9C\x80\xE6\x96\xB0\xE7\x89\x88\xE3\x82\x92\xE5\x85\xA5\xE6\x89\x8B\xE3\x81\x97\xE3\x81\xA6\xE6\x89\x8B\xE5\x8B\x95\xE3\x81\xA7\xE6\x9B\xB4\xE6\x96\xB0\xE3\x81\x97\xE3\x81\xA6\xE3\x81\x8F\xE3\x81\xA0\xE3\x81\x95\xE3\x81\x84.")
361361 #define MSGJPN360 _Tu8("更新", "\xE6\x9B\xB4\xE6\x96\xB0")
362362 #define MSGJPN361 _Tu8("新しいバージョンがあります.\n\n現在のバージョン: %s\n新しいバージョン: %s\n%s\n\n更新のダウンロードには数分間かかります.\n今すぐ更新しますか.", "\xE6\x96\xB0\xE3\x81\x97\xE3\x81\x84\xE3\x83\x90\xE3\x83\xBC\xE3\x82\xB8\xE3\x83\xA7\xE3\x83\xB3\xE3\x81\x8C\xE3\x81\x82\xE3\x82\x8A\xE3\x81\xBE\xE3\x81\x99.\n\n\xE7\x8F\xBE\xE5\x9C\xA8\xE3\x81\xAE\xE3\x83\x90\xE3\x83\xBC\xE3\x82\xB8\xE3\x83\xA7\xE3\x83\xB3: %s\n\xE6\x96\xB0\xE3\x81\x97\xE3\x81\x84\xE3\x83\x90\xE3\x83\xBC\xE3\x82\xB8\xE3\x83\xA7\xE3\x83\xB3: %s\n%s\n\n\xE6\x9B\xB4\xE6\x96\xB0\xE3\x81\xAE\xE3\x83\x80\xE3\x82\xA6\xE3\x83\xB3\xE3\x83\xAD\xE3\x83\xBC\xE3\x83\x89\xE3\x81\xAB\xE3\x81\xAF\xE6\x95\xB0\xE5\x88\x86\xE9\x96\x93\xE3\x81\x8B\xE3\x81\x8B\xE3\x82\x8A\xE3\x81\xBE\xE3\x81\x99.\n\xE4\xBB\x8A\xE3\x81\x99\xE3\x81\x90\xE6\x9B\xB4\xE6\x96\xB0\xE3\x81\x97\xE3\x81\xBE\xE3\x81\x99\xE3\x81\x8B.")
--- a/updater.c
+++ b/updater.c
@@ -53,6 +53,10 @@ BOOL ReadFileViaHTTPW(void* pOut, DWORD Length, DWORD* pLength, LPCWSTR UserAgen
5353 DWORD Buffer;
5454 HINTERNET hConnect;
5555 HINTERNET hRequest;
56+ WCHAR* Url;
57+ WINHTTP_AUTOPROXY_OPTIONS AutoProxyOptions;
58+ WINHTTP_PROXY_INFO ProxyInfo;
59+ WINHTTP_CURRENT_USER_IE_PROXY_CONFIG ProxyConfig;
5660 bResult = FALSE;
5761 if(hSession = WinHttpOpen(UserAgent, WINHTTP_ACCESS_TYPE_NO_PROXY, WINHTTP_NO_PROXY_NAME, WINHTTP_NO_PROXY_BYPASS, 0))
5862 {
@@ -63,6 +67,64 @@ BOOL ReadFileViaHTTPW(void* pOut, DWORD Length, DWORD* pLength, LPCWSTR UserAgen
6367 {
6468 if(hRequest = WinHttpOpenRequest(hConnect, L"GET", ObjectName, NULL, WINHTTP_NO_REFERER, WINHTTP_DEFAULT_ACCEPT_TYPES, 0))
6569 {
70+ if(Url = (WCHAR*)malloc(sizeof(WCHAR) * (wcslen(L"http://") + wcslen(ServerName) + wcslen(ObjectName) + 1)))
71+ {
72+ wcscpy(Url, L"http://");
73+ wcscat(Url, ServerName);
74+ wcscat(Url, ObjectName);
75+ }
76+ memset(&AutoProxyOptions, 0, sizeof(WINHTTP_AUTOPROXY_OPTIONS));
77+ AutoProxyOptions.dwFlags = WINHTTP_AUTOPROXY_AUTO_DETECT;
78+ AutoProxyOptions.dwAutoDetectFlags = WINHTTP_AUTO_DETECT_TYPE_DHCP | WINHTTP_AUTO_DETECT_TYPE_DNS_A;
79+ AutoProxyOptions.fAutoLogonIfChallenged = TRUE;
80+ memset(&ProxyInfo, 0, sizeof(WINHTTP_PROXY_INFO));
81+ memset(&ProxyConfig, 0, sizeof(WINHTTP_CURRENT_USER_IE_PROXY_CONFIG));
82+ if(WinHttpGetProxyForUrl(hSession, Url, &AutoProxyOptions, &ProxyInfo))
83+ {
84+ WinHttpSetOption(hRequest, WINHTTP_OPTION_PROXY, &ProxyInfo, sizeof(WINHTTP_PROXY_INFO));
85+ if(ProxyInfo.lpszProxy)
86+ GlobalFree(ProxyInfo.lpszProxy);
87+ if(ProxyInfo.lpszProxyBypass)
88+ GlobalFree(ProxyInfo.lpszProxyBypass);
89+ }
90+ else if(WinHttpGetIEProxyConfigForCurrentUser(&ProxyConfig))
91+ {
92+ if(!ProxyConfig.fAutoDetect)
93+ {
94+ if(ProxyConfig.lpszAutoConfigUrl)
95+ {
96+ memset(&AutoProxyOptions, 0, sizeof(WINHTTP_AUTOPROXY_OPTIONS));
97+ AutoProxyOptions.dwFlags = WINHTTP_AUTOPROXY_CONFIG_URL;
98+ AutoProxyOptions.lpszAutoConfigUrl = ProxyConfig.lpszAutoConfigUrl;
99+ AutoProxyOptions.fAutoLogonIfChallenged = TRUE;
100+ memset(&ProxyInfo, 0, sizeof(WINHTTP_PROXY_INFO));
101+ if(WinHttpGetProxyForUrl(hSession, Url, &AutoProxyOptions, &ProxyInfo))
102+ {
103+ WinHttpSetOption(hRequest, WINHTTP_OPTION_PROXY, &ProxyInfo, sizeof(WINHTTP_PROXY_INFO));
104+ if(ProxyInfo.lpszProxy)
105+ GlobalFree(ProxyInfo.lpszProxy);
106+ if(ProxyInfo.lpszProxyBypass)
107+ GlobalFree(ProxyInfo.lpszProxyBypass);
108+ }
109+ }
110+ else
111+ {
112+ memset(&ProxyInfo, 0, sizeof(WINHTTP_PROXY_INFO));
113+ ProxyInfo.dwAccessType = WINHTTP_ACCESS_TYPE_NAMED_PROXY;
114+ ProxyInfo.lpszProxy = ProxyConfig.lpszProxy;
115+ ProxyInfo.lpszProxyBypass = ProxyConfig.lpszProxyBypass;
116+ WinHttpSetOption(hRequest, WINHTTP_OPTION_PROXY, &ProxyInfo, sizeof(WINHTTP_PROXY_INFO));
117+ }
118+ }
119+ if(ProxyConfig.lpszAutoConfigUrl)
120+ GlobalFree(ProxyConfig.lpszAutoConfigUrl);
121+ if(ProxyConfig.lpszProxy)
122+ GlobalFree(ProxyConfig.lpszProxy);
123+ if(ProxyConfig.lpszProxyBypass)
124+ GlobalFree(ProxyConfig.lpszProxyBypass);
125+ }
126+ if(Url)
127+ free(Url);
66128 if(WinHttpSendRequest(hRequest, WINHTTP_NO_ADDITIONAL_HEADERS, 0, WINHTTP_NO_REQUEST_DATA, 0, 0, 0))
67129 {
68130 if(WinHttpReceiveResponse(hRequest, NULL))