OSDN Git Service

Enable to build by Visual C++ 2005 Express Edition
authorMoriguchi, Hirokazu <umorigu@gmail.com>
Sat, 14 Jan 2012 19:58:30 +0000 (04:58 +0900)
committerMoriguchi, Hirokazu <umorigu@gmail.com>
Sat, 14 Jan 2012 22:45:36 +0000 (07:45 +0900)
* 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.)

FFFTP.vc80ee.sln
FFFTP.vc80ee.vcproj
FFFTP_English.vc80ee.vcproj
Resource/ReplaceAfxresh.js [new file with mode: 0644]

index 2f4502d..bb8ba33 100644 (file)
@@ -1,10 +1,8 @@
 Microsoft Visual Studio Solution File, Format Version 9.00\r
 Microsoft Visual Studio Solution File, Format Version 9.00\r
-# Visual Studio 2005\r
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FFFTP", "FFFTP.vcproj", "{5D9496DB-45AF-4389-8FEE-27C9A2FA207A}"\r
+# Visual C++ Express 2005\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FFFTP.vc80", "FFFTP.vc80ee.vcproj", "{5D9496DB-45AF-4389-8FEE-27C9A2FA207A}"\r
 EndProject\r
 EndProject\r
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FFFTP_English", "FFFTP_English.vcproj", "{EE7CC1BD-92A9-46D5-8270-386BD7BEEA55}"\r
-EndProject\r
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PuTTY", "putty\PuTTY.vcproj", "{AF1981EB-379B-43B8-BE66-298194297B5C}"\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FFFTP_English.vc80", "FFFTP_English.vc80ee.vcproj", "{EE7CC1BD-92A9-46D5-8270-386BD7BEEA55}"\r
 EndProject\r
 Global\r
        GlobalSection(SolutionConfigurationPlatforms) = preSolution\r
 EndProject\r
 Global\r
        GlobalSection(SolutionConfigurationPlatforms) = preSolution\r
@@ -30,14 +28,6 @@ Global
                {EE7CC1BD-92A9-46D5-8270-386BD7BEEA55}.Release|Win32.Build.0 = Release|Win32\r
                {EE7CC1BD-92A9-46D5-8270-386BD7BEEA55}.Release|x64.ActiveCfg = Release|x64\r
                {EE7CC1BD-92A9-46D5-8270-386BD7BEEA55}.Release|x64.Build.0 = Release|x64\r
                {EE7CC1BD-92A9-46D5-8270-386BD7BEEA55}.Release|Win32.Build.0 = Release|Win32\r
                {EE7CC1BD-92A9-46D5-8270-386BD7BEEA55}.Release|x64.ActiveCfg = Release|x64\r
                {EE7CC1BD-92A9-46D5-8270-386BD7BEEA55}.Release|x64.Build.0 = Release|x64\r
-               {AF1981EB-379B-43B8-BE66-298194297B5C}.Debug|Win32.ActiveCfg = Debug|Win32\r
-               {AF1981EB-379B-43B8-BE66-298194297B5C}.Debug|Win32.Build.0 = Debug|Win32\r
-               {AF1981EB-379B-43B8-BE66-298194297B5C}.Debug|x64.ActiveCfg = Debug|x64\r
-               {AF1981EB-379B-43B8-BE66-298194297B5C}.Debug|x64.Build.0 = Debug|x64\r
-               {AF1981EB-379B-43B8-BE66-298194297B5C}.Release|Win32.ActiveCfg = Release|Win32\r
-               {AF1981EB-379B-43B8-BE66-298194297B5C}.Release|Win32.Build.0 = Release|Win32\r
-               {AF1981EB-379B-43B8-BE66-298194297B5C}.Release|x64.ActiveCfg = Release|x64\r
-               {AF1981EB-379B-43B8-BE66-298194297B5C}.Release|x64.Build.0 = Release|x64\r
        EndGlobalSection\r
        GlobalSection(SolutionProperties) = preSolution\r
                HideSolutionNode = FALSE\r
        EndGlobalSection\r
        GlobalSection(SolutionProperties) = preSolution\r
                HideSolutionNode = FALSE\r
index f05f4c0..03b7224 100644 (file)
@@ -2,7 +2,7 @@
 <VisualStudioProject\r
        ProjectType="Visual C++"\r
        Version="8.00"\r
 <VisualStudioProject\r
        ProjectType="Visual C++"\r
        Version="8.00"\r
-       Name="FFFTP"\r
+       Name="FFFTP.vc80"\r
        ProjectGUID="{5D9496DB-45AF-4389-8FEE-27C9A2FA207A}"\r
        RootNamespace="FFFTP"\r
        >\r
        ProjectGUID="{5D9496DB-45AF-4389-8FEE-27C9A2FA207A}"\r
        RootNamespace="FFFTP"\r
        >\r
@@ -28,6 +28,7 @@
                        >\r
                        <Tool\r
                                Name="VCPreBuildEventTool"\r
                        >\r
                        <Tool\r
                                Name="VCPreBuildEventTool"\r
+                               CommandLine="cscript //nologo Resource\ReplaceAfxresh.js Resource\FFFTP.rc Resource\FFFTP._replaced_.rc&#x0D;&#x0A;"\r
                        />\r
                        <Tool\r
                                Name="VCCustomBuildTool"\r
                        />\r
                        <Tool\r
                                Name="VCCustomBuildTool"\r
@@ -73,7 +74,7 @@
                        />\r
                        <Tool\r
                                Name="VCLinkerTool"\r
                        />\r
                        <Tool\r
                                Name="VCLinkerTool"\r
-                               AdditionalDependencies="comctl32.lib crypt32.lib htmlhelp.lib imagehlp.lib rasapi32.lib sfc.lib winmm.lib wintrust.lib wsock32.lib"\r
+                               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"\r
                                OutputFile=".\Debug\FFFTP.exe"\r
                                LinkIncremental="2"\r
                                SuppressStartupBanner="true"\r
                                OutputFile=".\Debug\FFFTP.exe"\r
                                LinkIncremental="2"\r
                                SuppressStartupBanner="true"\r
                        >\r
                        <Tool\r
                                Name="VCPreBuildEventTool"\r
                        >\r
                        <Tool\r
                                Name="VCPreBuildEventTool"\r
+                               CommandLine="cscript //nologo Resource\ReplaceAfxresh.js Resource\FFFTP.rc Resource\FFFTP._replaced_.rc&#x0D;&#x0A;"\r
                        />\r
                        <Tool\r
                                Name="VCCustomBuildTool"\r
                        />\r
                        <Tool\r
                                Name="VCCustomBuildTool"\r
                        />\r
                        <Tool\r
                                Name="VCLinkerTool"\r
                        />\r
                        <Tool\r
                                Name="VCLinkerTool"\r
-                               AdditionalDependencies="comctl32.lib crypt32.lib htmlhelp.lib imagehlp.lib rasapi32.lib sfc.lib winmm.lib wintrust.lib wsock32.lib"\r
+                               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"\r
                                OutputFile=".\Release\FFFTP.exe"\r
                                LinkIncremental="1"\r
                                SuppressStartupBanner="true"\r
                                OutputFile=".\Release\FFFTP.exe"\r
                                LinkIncremental="1"\r
                                SuppressStartupBanner="true"\r
                                >\r
                        </File>\r
                        <File\r
                                >\r
                        </File>\r
                        <File\r
+                               RelativePath=".\Resource\FFFTP._replaced_.rc"\r
+                               >\r
+                       </File>\r
+                       <File\r
                                RelativePath=".\Resource\ffftp.rc"\r
                                >\r
                                RelativePath=".\Resource\ffftp.rc"\r
                                >\r
+                               <FileConfiguration\r
+                                       Name="Debug|Win32"\r
+                                       ExcludedFromBuild="true"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCResourceCompilerTool"\r
+                                       />\r
+                               </FileConfiguration>\r
+                               <FileConfiguration\r
+                                       Name="Release|Win32"\r
+                                       ExcludedFromBuild="true"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCResourceCompilerTool"\r
+                                       />\r
+                               </FileConfiguration>\r
                        </File>\r
                        <File\r
                                RelativePath=".\filelist.c"\r
                        </File>\r
                        <File\r
                                RelativePath=".\filelist.c"\r
index 40788d2..5c35c0b 100644 (file)
@@ -2,7 +2,7 @@
 <VisualStudioProject\r
        ProjectType="Visual C++"\r
        Version="8.00"\r
 <VisualStudioProject\r
        ProjectType="Visual C++"\r
        Version="8.00"\r
-       Name="FFFTP_English"\r
+       Name="FFFTP_English.vc80"\r
        ProjectGUID="{EE7CC1BD-92A9-46D5-8270-386BD7BEEA55}"\r
        RootNamespace="FFFTP_English"\r
        >\r
        ProjectGUID="{EE7CC1BD-92A9-46D5-8270-386BD7BEEA55}"\r
        RootNamespace="FFFTP_English"\r
        >\r
@@ -28,6 +28,7 @@
                        >\r
                        <Tool\r
                                Name="VCPreBuildEventTool"\r
                        >\r
                        <Tool\r
                                Name="VCPreBuildEventTool"\r
+                               CommandLine="cscript //nologo Resource\ReplaceAfxresh.js Resource_eng\FFFTP-eng.rc Resource_eng\FFFTP-eng._replaced_.rc&#x0D;&#x0A;"\r
                        />\r
                        <Tool\r
                                Name="VCCustomBuildTool"\r
                        />\r
                        <Tool\r
                                Name="VCCustomBuildTool"\r
@@ -74,7 +75,7 @@
                        />\r
                        <Tool\r
                                Name="VCLinkerTool"\r
                        />\r
                        <Tool\r
                                Name="VCLinkerTool"\r
-                               AdditionalDependencies="comctl32.lib crypt32.lib htmlhelp.lib imagehlp.lib rasapi32.lib sfc.lib winmm.lib wintrust.lib wsock32.lib"\r
+                               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"\r
                                OutputFile=".\FFFTP_Eng_Debug\FFFTP.exe"\r
                                LinkIncremental="2"\r
                                SuppressStartupBanner="true"\r
                                OutputFile=".\FFFTP_Eng_Debug\FFFTP.exe"\r
                                LinkIncremental="2"\r
                                SuppressStartupBanner="true"\r
                        >\r
                        <Tool\r
                                Name="VCPreBuildEventTool"\r
                        >\r
                        <Tool\r
                                Name="VCPreBuildEventTool"\r
+                               CommandLine="cscript //nologo Resource\ReplaceAfxresh.js Resource_eng\FFFTP-eng.rc Resource_eng\FFFTP-eng._replaced_.rc&#x0D;&#x0A;"\r
                        />\r
                        <Tool\r
                                Name="VCCustomBuildTool"\r
                        />\r
                        <Tool\r
                                Name="VCCustomBuildTool"\r
                        />\r
                        <Tool\r
                                Name="VCLinkerTool"\r
                        />\r
                        <Tool\r
                                Name="VCLinkerTool"\r
-                               AdditionalDependencies="comctl32.lib crypt32.lib htmlhelp.lib imagehlp.lib rasapi32.lib sfc.lib winmm.lib wintrust.lib wsock32.lib"\r
+                               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"\r
                                OutputFile=".\FFFTP_Eng_Release\FFFTP.exe"\r
                                LinkIncremental="1"\r
                                SuppressStartupBanner="true"\r
                                OutputFile=".\FFFTP_Eng_Release\FFFTP.exe"\r
                                LinkIncremental="1"\r
                                SuppressStartupBanner="true"\r
                                >\r
                        </File>\r
                        <File\r
                                >\r
                        </File>\r
                        <File\r
+                               RelativePath=".\Resource_eng\FFFTP-eng._replaced_.rc"\r
+                               >\r
+                       </File>\r
+                       <File\r
                                RelativePath=".\Resource_eng\FFFTP-eng.rc"\r
                                >\r
                                RelativePath=".\Resource_eng\FFFTP-eng.rc"\r
                                >\r
+                               <FileConfiguration\r
+                                       Name="Debug|Win32"\r
+                                       ExcludedFromBuild="true"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCResourceCompilerTool"\r
+                                       />\r
+                               </FileConfiguration>\r
+                               <FileConfiguration\r
+                                       Name="Release|Win32"\r
+                                       ExcludedFromBuild="true"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCResourceCompilerTool"\r
+                                       />\r
+                               </FileConfiguration>\r
                        </File>\r
                        <File\r
                                RelativePath=".\filelist.c"\r
                        </File>\r
                        <File\r
                                RelativePath=".\filelist.c"\r
diff --git a/Resource/ReplaceAfxresh.js b/Resource/ReplaceAfxresh.js
new file mode 100644 (file)
index 0000000..18ac8e9
--- /dev/null
@@ -0,0 +1,32 @@
+function replace_afxres_h_text(s) {\r
+    if (s.match(/^\s*#include\s*"afxres.h"\s*$/)) {\r
+        var replaced = "// " + s + "\r\n";\r
+        replaced += "#include <windows.h>" + "\r\n";\r
+        replaced += "#define IDC_STATIC -1";\r
+        return replaced; \r
+    }\r
+    return s;\r
+}\r
+function main() {\r
+    var fromFileName = "";\r
+    var toFileName = "";\r
+    var args = WScript.Arguments;\r
+    if (args.length < 2) {\r
+        WScript.StdErr.WriteLine("usage: cscript ReplaceAfxresh.js <InResFile> <OutResFile>");\r
+        return;\r
+    }\r
+    fromFileName = args(0);\r
+    toFileName = args(1);\r
+    WScript.StdOut.WriteLine("ReplaceAfxresh.js - in: " + fromFileName + ", out: " + toFileName);\r
+    var fso = new ActiveXObject("Scripting.FileSystemObject");\r
+    var fi = fso.OpenTextFile(fromFileName, 1, false, -2);\r
+    var fo = fso.CreateTextFile(toFileName, true, false);\r
+    while (!fi.AtEndOfStream) {\r
+        var line = fi.ReadLine();\r
+        var lineReplaced = replace_afxres_h_text(line);\r
+        fo.WriteLine(lineReplaced);\r
+    }\r
+    fo.Close();\r
+    fi.Close();\r
+}\r
+main();\r