Saputra
修订版 | 3563717ced0f7e75eb9cec96c254de7a52145ea5 (tree) |
---|---|
时间 | 2012-02-22 13:44:58 |
作者 | s_kawamoto <s_kawamoto@user...> |
Commiter | s_kawamoto |
Add portable version checks.
Modify documents.
Modify installer settings.
@@ -17,6 +17,7 @@ set ENG_INST=EXEpress\eng\ffftp.exe | ||
17 | 17 | set HTMLHELP=..\htmlhelp\FFFTP.CHM |
18 | 18 | set BIN_JPN=..\Release\FFFTP.exe |
19 | 19 | set BIN_ENG=..\FFFTP_Eng_Release\FFFTP.exe |
20 | +set PORTABLE_FILE=portable | |
20 | 21 | |
21 | 22 | set DIR_JPN_DOC=..\doc\jpn |
22 | 23 | set DIR_ENG_DOC=..\doc\eng |
@@ -27,4 +27,8 @@ REM; copy to installer working directory | ||
27 | 27 | copy /Y %DIR_JPN%\*.* %DIR_JPN_INST% |
28 | 28 | copy /Y %DIR_ENG%\*.* %DIR_ENG_INST% |
29 | 29 | |
30 | +REM; copy a portable indicator file | |
31 | +copy /Y %PORTABLE_FILE% %DIR_JPN% | |
32 | +copy /Y %PORTABLE_FILE% %DIR_ENG% | |
33 | + | |
30 | 34 | pause |
@@ -0,0 +1 @@ | ||
1 | +This file indicates that FFFTP is portable. | |
\ No newline at end of file |
@@ -1308,6 +1308,9 @@ BOOL LoadSSLRootCAFile(); | ||
1308 | 1308 | BOOL IsMainThread(); |
1309 | 1309 | // ファイルアイコン表示対応 |
1310 | 1310 | int AskDispFileIcon(void); |
1311 | +// ポータブル版判定 | |
1312 | +void CheckPortableVersion(); | |
1313 | +int AskPortableVersion(void); | |
1311 | 1314 | |
1312 | 1315 | /*===== filelist.c =====*/ |
1313 | 1316 |
@@ -69,6 +69,9 @@ Changes in Ver.1.98e | ||
69 | 69 | Name resolution and connection will be performed at same time on IPv4 and |
70 | 70 | IPv6, and whichever finished earlier will be used. |
71 | 71 | |
72 | +-- Disabled saving settings in the registry about ZIP version copies. | |
73 | + To save in the registry, please remove "portable" the file. | |
74 | + | |
72 | 75 | |
73 | 76 | Outline |
74 | 77 | ------- |
@@ -41,6 +41,9 @@ Changes in Ver.1.98e | ||
41 | 41 | Name resolution and connection will be performed at same time on IPv4 and |
42 | 42 | IPv6, and whichever finished earlier will be used. |
43 | 43 | |
44 | +-- Disabled saving settings in the registry about ZIP version copies. | |
45 | + To save in the registry, please remove "portable" the file. | |
46 | + | |
44 | 47 | Changes in Ver.1.98d |
45 | 48 | -------------------- |
46 | 49 |
@@ -61,7 +61,7 @@ Ver 1.98e | ||
61 | 61 | @iÈOÌÝ誶ݵA¯Ú±ª1æèå«¢êÍ»ÌÝèªKp |
62 | 62 | @³êÜ·jB |
63 | 63 | |
64 | -EAbv[hÉzXgª¼Oðt¯½êÉ·Åɶݷét@CÌ | |
64 | +EAbv[hÉzXgª¼Oðt¯½êɳÌt@C¼Ìt@CÌ | |
65 | 65 | @®«ªÏX³êéoOðC³µÜµ½B |
66 | 66 | |
67 | 67 | EI¹Ét[Y·é±Æª éoOðC³µÜµ½B |
@@ -73,6 +73,9 @@ Ver 1.98e | ||
73 | 73 | @IPv4ÆIPv6̼ûżOðÆÚ±ð¯És¢AæÉÚ±ª®¹µ½ûð |
74 | 74 | @gpµÜ·B |
75 | 75 | |
76 | +EZIPÅÅÍWXgÉÝèðêØÛ¶µÈ¢æ¤ÉÏXµÜµ½B | |
77 | +@WXgðgp·éÉÍt@C"portable"ðíµÄ¾³¢B | |
78 | + | |
76 | 79 | |
77 | 80 | Ver 1.96dÈOÖß·ê |
78 | 81 | ----------------------- |
@@ -45,6 +45,9 @@ FFFTP | ||
45 | 45 | @IPv4ÆIPv6̼ûżOðÆÚ±ð¯És¢AæÉÚ±ª®¹µ½ûð |
46 | 46 | @gpµÜ·B |
47 | 47 | |
48 | +EZIPÅÅÍWXgÉÝèðêØÛ¶µÈ¢æ¤ÉÏXµÜµ½B | |
49 | +@WXgðgp·éÉÍt@C"portable"ðíµÄ¾³¢B | |
50 | + | |
48 | 51 | ¡Ver 1.98d |
49 | 52 | |
50 | 53 | EMLSDR}hÉε½zXgÅÍMLSDR}hðp¢Ät@Cêð |
@@ -335,6 +335,8 @@ void DownloadProc(int ChName, int ForceFile, int All) | ||
335 | 335 | void DirectDownloadProc(char *Fname) |
336 | 336 | { |
337 | 337 | TRANSPACKET Pkt; |
338 | + // ディレクトリ自動作成 | |
339 | + char Tmp[FMAX_PATH+1]; | |
338 | 340 | |
339 | 341 | // 同時接続対応 |
340 | 342 | CancelFlg = NO; |
@@ -400,9 +402,17 @@ void DirectDownloadProc(char *Fname) | ||
400 | 402 | Pkt.KanjiCodeDesired = AskLocalKanjiCode(); |
401 | 403 | Pkt.KanaCnv = AskHostKanaCnv(); |
402 | 404 | |
405 | + // ディレクトリ自動作成 | |
406 | + strcpy(Tmp, Pkt.LocalFile); | |
403 | 407 | Pkt.Mode = CheckLocalFile(&Pkt); /* Pkt.ExistSize がセットされる */ |
404 | 408 | if((Pkt.Mode != EXIST_ABORT) && (Pkt.Mode != EXIST_IGNORE)) |
409 | + // ディレクトリ自動作成 | |
410 | +// AddTransFileList(&Pkt); | |
411 | + { | |
412 | + if(MakeAllDir == YES) | |
413 | + MakeDirFromLocalPath(Pkt.LocalFile, Tmp); | |
405 | 414 | AddTransFileList(&Pkt); |
415 | + } | |
406 | 416 | } |
407 | 417 | } |
408 | 418 |
@@ -136,6 +136,9 @@ static DWORD dwCookie; | ||
136 | 136 | static char SSLRootCAFilePath[FMAX_PATH+1]; |
137 | 137 | // マルチコアCPUの特定環境下でファイル通信中にクラッシュするバグ対策 |
138 | 138 | static DWORD MainThreadId; |
139 | +// ポータブル版判定 | |
140 | +static char PortableFilePath[FMAX_PATH+1]; | |
141 | +int PortableVersion; | |
139 | 142 | |
140 | 143 | |
141 | 144 | /*===== グローバルなワーク =====*/ |
@@ -441,6 +444,15 @@ static int InitApp(LPSTR lpszCmdLine, int cmdShow) | ||
441 | 444 | ForceIni = YES; |
442 | 445 | RegType = REGTYPE_INI; |
443 | 446 | } |
447 | + // ポータブル版判定 | |
448 | + GetModuleFileName(NULL, PortableFilePath, FMAX_PATH); | |
449 | + strcpy(GetFileName(PortableFilePath), "portable"); | |
450 | + CheckPortableVersion(); | |
451 | + if(PortableVersion == YES) | |
452 | + { | |
453 | + ForceIni = YES; | |
454 | + RegType = REGTYPE_INI; | |
455 | + } | |
444 | 456 | |
445 | 457 | // AllocConsole(); |
446 | 458 |
@@ -3122,3 +3134,21 @@ int AskDispFileIcon(void) | ||
3122 | 3134 | return(DispFileIcon); |
3123 | 3135 | } |
3124 | 3136 | |
3137 | +// ポータブル版判定 | |
3138 | +void CheckPortableVersion() | |
3139 | +{ | |
3140 | + HANDLE hFile; | |
3141 | + if((hFile = CreateFile(PortableFilePath, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL)) != INVALID_HANDLE_VALUE) | |
3142 | + { | |
3143 | + PortableVersion = YES; | |
3144 | + CloseHandle(hFile); | |
3145 | + } | |
3146 | + else | |
3147 | + PortableVersion = NO; | |
3148 | +} | |
3149 | + | |
3150 | +int AskPortableVersion(void) | |
3151 | +{ | |
3152 | + return(PortableVersion); | |
3153 | +} | |
3154 | + |
@@ -1481,6 +1481,9 @@ static INT_PTR CALLBACK MiscSettingProc(HWND hDlg, UINT message, WPARAM wParam, | ||
1481 | 1481 | SendDlgItemMessage(hDlg, MISC_WINPOS, BM_SETCHECK, SaveWinPos, 0); |
1482 | 1482 | SendDlgItemMessage(hDlg, MISC_DEBUG, BM_SETCHECK, DebugConsole, 0); |
1483 | 1483 | SendDlgItemMessage(hDlg, MISC_REGTYPE, BM_SETCHECK, RegType, 0); |
1484 | + // ポータブル版判定 | |
1485 | + if(AskForceIni() == YES) | |
1486 | + EnableWindow(GetDlgItem(hDlg, MISC_REGTYPE), FALSE); | |
1484 | 1487 | |
1485 | 1488 | SendDlgItemMessage(hDlg, MISC_CACHE_SAVE, BM_SETCHECK, CacheSave, 0); |
1486 | 1489 | SendDlgItemMessage(hDlg, MISC_BUFNUM, EM_LIMITTEXT, (WPARAM)2, 0); |
@@ -1510,7 +1513,10 @@ static INT_PTR CALLBACK MiscSettingProc(HWND hDlg, UINT message, WPARAM wParam, | ||
1510 | 1513 | case PSN_APPLY : |
1511 | 1514 | SaveWinPos = SendDlgItemMessage(hDlg, MISC_WINPOS, BM_GETCHECK, 0, 0); |
1512 | 1515 | DebugConsole = SendDlgItemMessage(hDlg, MISC_DEBUG, BM_GETCHECK, 0, 0); |
1513 | - RegType = SendDlgItemMessage(hDlg, MISC_REGTYPE, BM_GETCHECK, 0, 0); | |
1516 | + // ポータブル版判定 | |
1517 | +// RegType = SendDlgItemMessage(hDlg, MISC_REGTYPE, BM_GETCHECK, 0, 0); | |
1518 | + if(AskForceIni() == NO) | |
1519 | + RegType = SendDlgItemMessage(hDlg, MISC_REGTYPE, BM_GETCHECK, 0, 0); | |
1514 | 1520 | |
1515 | 1521 | CacheSave = SendDlgItemMessage(hDlg, MISC_CACHE_SAVE, BM_GETCHECK, 0, 0); |
1516 | 1522 | CacheEntry = GetDecimalText(hDlg, MISC_BUFNUM); |