FFFTPのソースコードです。
Revisión | 03151a6ab14a8ba2d0c163d97e596ae093003712 (tree) |
---|---|
Tiempo | 2012-01-15 07:45:36 |
Autor | Moriguchi, Hirokazu <umorigu@gmai...> |
Commiter | Moriguchi, Hirokazu |
Enable to build by Visual C++ 2005 Express Edition
* Change link lib setting
* ReplaceAfxresh.js: Replace including "afxres.h" line to <windows.h> and IDC_STATIC definition in FFFTP.rc
* Remove PuTTY project in VS2005EE solution
* Note: There are VS2005EE files for the ease of development, not for production build. (So we enabled to remove PuTTY project.)
@@ -1,10 +1,8 @@ | ||
1 | 1 | Microsoft Visual Studio Solution File, Format Version 9.00 |
2 | -# Visual Studio 2005 | |
3 | -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FFFTP", "FFFTP.vcproj", "{5D9496DB-45AF-4389-8FEE-27C9A2FA207A}" | |
2 | +# Visual C++ Express 2005 | |
3 | +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FFFTP.vc80", "FFFTP.vc80ee.vcproj", "{5D9496DB-45AF-4389-8FEE-27C9A2FA207A}" | |
4 | 4 | EndProject |
5 | -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FFFTP_English", "FFFTP_English.vcproj", "{EE7CC1BD-92A9-46D5-8270-386BD7BEEA55}" | |
6 | -EndProject | |
7 | -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PuTTY", "putty\PuTTY.vcproj", "{AF1981EB-379B-43B8-BE66-298194297B5C}" | |
5 | +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FFFTP_English.vc80", "FFFTP_English.vc80ee.vcproj", "{EE7CC1BD-92A9-46D5-8270-386BD7BEEA55}" | |
8 | 6 | EndProject |
9 | 7 | Global |
10 | 8 | GlobalSection(SolutionConfigurationPlatforms) = preSolution |
@@ -30,14 +28,6 @@ Global | ||
30 | 28 | {EE7CC1BD-92A9-46D5-8270-386BD7BEEA55}.Release|Win32.Build.0 = Release|Win32 |
31 | 29 | {EE7CC1BD-92A9-46D5-8270-386BD7BEEA55}.Release|x64.ActiveCfg = Release|x64 |
32 | 30 | {EE7CC1BD-92A9-46D5-8270-386BD7BEEA55}.Release|x64.Build.0 = Release|x64 |
33 | - {AF1981EB-379B-43B8-BE66-298194297B5C}.Debug|Win32.ActiveCfg = Debug|Win32 | |
34 | - {AF1981EB-379B-43B8-BE66-298194297B5C}.Debug|Win32.Build.0 = Debug|Win32 | |
35 | - {AF1981EB-379B-43B8-BE66-298194297B5C}.Debug|x64.ActiveCfg = Debug|x64 | |
36 | - {AF1981EB-379B-43B8-BE66-298194297B5C}.Debug|x64.Build.0 = Debug|x64 | |
37 | - {AF1981EB-379B-43B8-BE66-298194297B5C}.Release|Win32.ActiveCfg = Release|Win32 | |
38 | - {AF1981EB-379B-43B8-BE66-298194297B5C}.Release|Win32.Build.0 = Release|Win32 | |
39 | - {AF1981EB-379B-43B8-BE66-298194297B5C}.Release|x64.ActiveCfg = Release|x64 | |
40 | - {AF1981EB-379B-43B8-BE66-298194297B5C}.Release|x64.Build.0 = Release|x64 | |
41 | 31 | EndGlobalSection |
42 | 32 | GlobalSection(SolutionProperties) = preSolution |
43 | 33 | HideSolutionNode = FALSE |
@@ -2,7 +2,7 @@ | ||
2 | 2 | <VisualStudioProject |
3 | 3 | ProjectType="Visual C++" |
4 | 4 | Version="8.00" |
5 | - Name="FFFTP" | |
5 | + Name="FFFTP.vc80" | |
6 | 6 | ProjectGUID="{5D9496DB-45AF-4389-8FEE-27C9A2FA207A}" |
7 | 7 | RootNamespace="FFFTP" |
8 | 8 | > |
@@ -28,6 +28,7 @@ | ||
28 | 28 | > |
29 | 29 | <Tool |
30 | 30 | Name="VCPreBuildEventTool" |
31 | + CommandLine="cscript //nologo Resource\ReplaceAfxresh.js Resource\FFFTP.rc Resource\FFFTP._replaced_.rc
" | |
31 | 32 | /> |
32 | 33 | <Tool |
33 | 34 | Name="VCCustomBuildTool" |
@@ -73,7 +74,7 @@ | ||
73 | 74 | /> |
74 | 75 | <Tool |
75 | 76 | Name="VCLinkerTool" |
76 | - AdditionalDependencies="comctl32.lib crypt32.lib htmlhelp.lib imagehlp.lib rasapi32.lib sfc.lib winmm.lib wintrust.lib wsock32.lib" | |
77 | + AdditionalDependencies="comctl32.lib crypt32.lib htmlhelp.lib imagehlp.lib rasapi32.lib sfc.lib winmm.lib wintrust.lib wsock32.lib user32.lib shell32.lib gdi32.lib ole32.lib comdlg32.lib advapi32.lib" | |
77 | 78 | OutputFile=".\Debug\FFFTP.exe" |
78 | 79 | LinkIncremental="2" |
79 | 80 | SuppressStartupBanner="true" |
@@ -120,6 +121,7 @@ | ||
120 | 121 | > |
121 | 122 | <Tool |
122 | 123 | Name="VCPreBuildEventTool" |
124 | + CommandLine="cscript //nologo Resource\ReplaceAfxresh.js Resource\FFFTP.rc Resource\FFFTP._replaced_.rc
" | |
123 | 125 | /> |
124 | 126 | <Tool |
125 | 127 | Name="VCCustomBuildTool" |
@@ -167,7 +169,7 @@ | ||
167 | 169 | /> |
168 | 170 | <Tool |
169 | 171 | Name="VCLinkerTool" |
170 | - AdditionalDependencies="comctl32.lib crypt32.lib htmlhelp.lib imagehlp.lib rasapi32.lib sfc.lib winmm.lib wintrust.lib wsock32.lib" | |
172 | + AdditionalDependencies="comctl32.lib crypt32.lib htmlhelp.lib imagehlp.lib rasapi32.lib sfc.lib winmm.lib wintrust.lib wsock32.lib user32.lib shell32.lib gdi32.lib ole32.lib comdlg32.lib advapi32.lib" | |
171 | 173 | OutputFile=".\Release\FFFTP.exe" |
172 | 174 | LinkIncremental="1" |
173 | 175 | SuppressStartupBanner="true" |
@@ -440,8 +442,28 @@ | ||
440 | 442 | > |
441 | 443 | </File> |
442 | 444 | <File |
445 | + RelativePath=".\Resource\FFFTP._replaced_.rc" | |
446 | + > | |
447 | + </File> | |
448 | + <File | |
443 | 449 | RelativePath=".\Resource\ffftp.rc" |
444 | 450 | > |
451 | + <FileConfiguration | |
452 | + Name="Debug|Win32" | |
453 | + ExcludedFromBuild="true" | |
454 | + > | |
455 | + <Tool | |
456 | + Name="VCResourceCompilerTool" | |
457 | + /> | |
458 | + </FileConfiguration> | |
459 | + <FileConfiguration | |
460 | + Name="Release|Win32" | |
461 | + ExcludedFromBuild="true" | |
462 | + > | |
463 | + <Tool | |
464 | + Name="VCResourceCompilerTool" | |
465 | + /> | |
466 | + </FileConfiguration> | |
445 | 467 | </File> |
446 | 468 | <File |
447 | 469 | RelativePath=".\filelist.c" |
@@ -2,7 +2,7 @@ | ||
2 | 2 | <VisualStudioProject |
3 | 3 | ProjectType="Visual C++" |
4 | 4 | Version="8.00" |
5 | - Name="FFFTP_English" | |
5 | + Name="FFFTP_English.vc80" | |
6 | 6 | ProjectGUID="{EE7CC1BD-92A9-46D5-8270-386BD7BEEA55}" |
7 | 7 | RootNamespace="FFFTP_English" |
8 | 8 | > |
@@ -28,6 +28,7 @@ | ||
28 | 28 | > |
29 | 29 | <Tool |
30 | 30 | Name="VCPreBuildEventTool" |
31 | + CommandLine="cscript //nologo Resource\ReplaceAfxresh.js Resource_eng\FFFTP-eng.rc Resource_eng\FFFTP-eng._replaced_.rc
" | |
31 | 32 | /> |
32 | 33 | <Tool |
33 | 34 | Name="VCCustomBuildTool" |
@@ -74,7 +75,7 @@ | ||
74 | 75 | /> |
75 | 76 | <Tool |
76 | 77 | Name="VCLinkerTool" |
77 | - AdditionalDependencies="comctl32.lib crypt32.lib htmlhelp.lib imagehlp.lib rasapi32.lib sfc.lib winmm.lib wintrust.lib wsock32.lib" | |
78 | + AdditionalDependencies="comctl32.lib crypt32.lib htmlhelp.lib imagehlp.lib rasapi32.lib sfc.lib winmm.lib wintrust.lib wsock32.lib user32.lib shell32.lib gdi32.lib ole32.lib comdlg32.lib advapi32.lib" | |
78 | 79 | OutputFile=".\FFFTP_Eng_Debug\FFFTP.exe" |
79 | 80 | LinkIncremental="2" |
80 | 81 | SuppressStartupBanner="true" |
@@ -121,6 +122,7 @@ | ||
121 | 122 | > |
122 | 123 | <Tool |
123 | 124 | Name="VCPreBuildEventTool" |
125 | + CommandLine="cscript //nologo Resource\ReplaceAfxresh.js Resource_eng\FFFTP-eng.rc Resource_eng\FFFTP-eng._replaced_.rc
" | |
124 | 126 | /> |
125 | 127 | <Tool |
126 | 128 | Name="VCCustomBuildTool" |
@@ -167,7 +169,7 @@ | ||
167 | 169 | /> |
168 | 170 | <Tool |
169 | 171 | Name="VCLinkerTool" |
170 | - AdditionalDependencies="comctl32.lib crypt32.lib htmlhelp.lib imagehlp.lib rasapi32.lib sfc.lib winmm.lib wintrust.lib wsock32.lib" | |
172 | + AdditionalDependencies="comctl32.lib crypt32.lib htmlhelp.lib imagehlp.lib rasapi32.lib sfc.lib winmm.lib wintrust.lib wsock32.lib user32.lib shell32.lib gdi32.lib ole32.lib comdlg32.lib advapi32.lib" | |
171 | 173 | OutputFile=".\FFFTP_Eng_Release\FFFTP.exe" |
172 | 174 | LinkIncremental="1" |
173 | 175 | SuppressStartupBanner="true" |
@@ -440,8 +442,28 @@ | ||
440 | 442 | > |
441 | 443 | </File> |
442 | 444 | <File |
445 | + RelativePath=".\Resource_eng\FFFTP-eng._replaced_.rc" | |
446 | + > | |
447 | + </File> | |
448 | + <File | |
443 | 449 | RelativePath=".\Resource_eng\FFFTP-eng.rc" |
444 | 450 | > |
451 | + <FileConfiguration | |
452 | + Name="Debug|Win32" | |
453 | + ExcludedFromBuild="true" | |
454 | + > | |
455 | + <Tool | |
456 | + Name="VCResourceCompilerTool" | |
457 | + /> | |
458 | + </FileConfiguration> | |
459 | + <FileConfiguration | |
460 | + Name="Release|Win32" | |
461 | + ExcludedFromBuild="true" | |
462 | + > | |
463 | + <Tool | |
464 | + Name="VCResourceCompilerTool" | |
465 | + /> | |
466 | + </FileConfiguration> | |
445 | 467 | </File> |
446 | 468 | <File |
447 | 469 | RelativePath=".\filelist.c" |
@@ -0,0 +1,32 @@ | ||
1 | +function replace_afxres_h_text(s) { | |
2 | + if (s.match(/^\s*#include\s*"afxres.h"\s*$/)) { | |
3 | + var replaced = "// " + s + "\r\n"; | |
4 | + replaced += "#include <windows.h>" + "\r\n"; | |
5 | + replaced += "#define IDC_STATIC -1"; | |
6 | + return replaced; | |
7 | + } | |
8 | + return s; | |
9 | +} | |
10 | +function main() { | |
11 | + var fromFileName = ""; | |
12 | + var toFileName = ""; | |
13 | + var args = WScript.Arguments; | |
14 | + if (args.length < 2) { | |
15 | + WScript.StdErr.WriteLine("usage: cscript ReplaceAfxresh.js <InResFile> <OutResFile>"); | |
16 | + return; | |
17 | + } | |
18 | + fromFileName = args(0); | |
19 | + toFileName = args(1); | |
20 | + WScript.StdOut.WriteLine("ReplaceAfxresh.js - in: " + fromFileName + ", out: " + toFileName); | |
21 | + var fso = new ActiveXObject("Scripting.FileSystemObject"); | |
22 | + var fi = fso.OpenTextFile(fromFileName, 1, false, -2); | |
23 | + var fo = fso.CreateTextFile(toFileName, true, false); | |
24 | + while (!fi.AtEndOfStream) { | |
25 | + var line = fi.ReadLine(); | |
26 | + var lineReplaced = replace_afxres_h_text(line); | |
27 | + fo.WriteLine(lineReplaced); | |
28 | + } | |
29 | + fo.Close(); | |
30 | + fi.Close(); | |
31 | +} | |
32 | +main(); |