[Ttssh2-commit] [4533] TTSSHのバージョンダイアログに、PuTTYバージョンを表記するようにした。

Back to archive index

svnno****@sourc***** svnno****@sourc*****
2011年 7月 27日 (水) 00:07:33 JST


Revision: 4533
          http://sourceforge.jp/projects/ttssh2/svn/view?view=rev&revision=4533
Author:   yutakapon
Date:     2011-07-27 00:07:33 +0900 (Wed, 27 Jul 2011)

Log Message:
-----------
TTSSHのバージョンダイアログに、PuTTYバージョンを表記するようにした。

Modified Paths:
--------------
    trunk/ttssh2/ttssh.sln
    trunk/ttssh2/ttxssh/resource.h
    trunk/ttssh2/ttxssh/ttxssh.c
    trunk/ttssh2/ttxssh/ttxssh.rc
    trunk/ttssh2/ttxssh/ttxssh.vcproj

Added Paths:
-----------
    trunk/ttssh2/puttyrev/
    trunk/ttssh2/puttyrev/ReadMe.txt
    trunk/ttssh2/puttyrev/Resource.h
    trunk/ttssh2/puttyrev/puttyrev.cpp
    trunk/ttssh2/puttyrev/puttyrev.h
    trunk/ttssh2/puttyrev/puttyrev.rc
    trunk/ttssh2/puttyrev/puttyrev.vcproj
    trunk/ttssh2/puttyrev/stdafx.cpp
    trunk/ttssh2/puttyrev/stdafx.h


-------------- next part --------------
Added: trunk/ttssh2/puttyrev/ReadMe.txt
===================================================================
--- trunk/ttssh2/puttyrev/ReadMe.txt	                        (rev 0)
+++ trunk/ttssh2/puttyrev/ReadMe.txt	2011-07-26 15:07:33 UTC (rev 4533)
@@ -0,0 +1,51 @@
+========================================================================
+    ƒRƒ“ƒ\[ƒ‹ ƒAƒvƒŠƒP[ƒVƒ‡ƒ“ : puttyrev ƒvƒƒWƒFƒNƒg‚ÌŠT—v
+========================================================================
+
+‚±‚Ì puttyrev ƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚́AAppWizard ‚É‚æ‚Á‚č쐬‚³‚ê‚Ü‚µ‚½B  
+
+‚±‚̃tƒ@ƒCƒ‹‚ɂ́Aputtyrev ƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚ð\¬‚·‚éŠeƒtƒ@ƒCƒ‹‚Ì
+“à—e‚ÌŠT—ª‚ª‹Lq‚³‚ê‚Ä‚¢‚Ü‚·B
+
+
+puttyrev.vcproj
+    ‚±‚ê‚́AƒAƒvƒŠƒP[ƒVƒ‡ƒ“ ƒEƒBƒU[ƒh‚Ő¶¬‚³‚ê‚é VC++ ƒvƒƒWƒFƒNƒg‚̃ƒCƒ“‚Ì
+    ƒvƒƒWƒFƒNƒg ƒtƒ@ƒCƒ‹‚Å‚·B 
+    ƒtƒ@ƒCƒ‹‚𐶐¬‚µ‚½ Visual C++ ‚̃o[ƒWƒ‡ƒ“î•ñ‚ƁAƒAƒvƒŠƒP[ƒVƒ‡ƒ“ 
+    ƒEƒBƒU[ƒh‚Å‘I‘ð‚µ‚½ƒvƒ‰ƒbƒgƒtƒH[ƒ€A\¬A‚¨‚æ‚уvƒƒWƒFƒNƒg‚Ì‹@”\‚ÉŠÖ‚·‚é
+    î•ñ‚ª‹Lq‚³‚ê‚Ä‚¢‚Ü‚·B
+
+puttyrev.cpp
+    ‚±‚ê‚́AƒƒCƒ“‚̃AƒvƒŠƒP[ƒVƒ‡ƒ“ ƒ\[ƒX ƒtƒ@ƒCƒ‹‚Å‚·B
+
+/////////////////////////////////////////////////////////////////////////////
+AppWizard ‚É‚æ‚Á‚āAŽŸ‚̃Šƒ\[ƒX‚ªì¬‚³‚ê‚Ü‚µ‚½B
+
+puttyrev.rc
+    ‚±‚ê‚́AƒvƒƒOƒ‰ƒ€‚ÅŽg—p‚·‚é Microsoft Windows ‚Ì‘SƒŠƒ\[ƒX‚̈ꗗ‚Å‚·B
+    RES ƒTƒuƒfƒBƒŒƒNƒgƒŠ‚É•Û‘¶‚³‚ê‚éƒAƒCƒRƒ“Aƒrƒbƒgƒ}ƒbƒvAƒJ[ƒ\ƒ‹‚È‚Ç‚ª
+    ŠÜ‚Ü‚ê‚Ü‚·B‚±‚̃tƒ@ƒCƒ‹‚́AMicrosoft Visual C++ ‚Å’¼Ú•ÒW‚Å‚«‚Ü‚·B
+
+Resource.h
+    ‚±‚ê‚́AV‚µ‚¢ƒŠƒ\[ƒX ID ‚ð’è‹`‚·‚é•W€‚̃wƒbƒ_[ ƒtƒ@ƒCƒ‹‚Å‚·B
+    ‚±‚̃tƒ@ƒCƒ‹‚̓ǂݍž‚Ý‚¨‚æ‚эXV‚́AMicrosoft Visual C++ ‚ōs‚¢‚Ü‚·B
+
+/////////////////////////////////////////////////////////////////////////////
+‚»‚Ì‘¼‚Ì•W€ƒtƒ@ƒCƒ‹ :
+
+StdAfx.h, StdAfx.cpp
+    ‚±‚ê‚ç‚̃tƒ@ƒCƒ‹‚́AƒRƒ“ƒpƒCƒ‹Ï‚݃wƒbƒ_[ (PCH) ƒtƒ@ƒCƒ‹ 
+    puttyrev.pch ‚ƃvƒŠƒRƒ“ƒpƒCƒ‹Ï‚ÝŒ^ƒtƒ@ƒCƒ‹ StdAfx.obj ‚ð
+    ƒrƒ‹ƒh‚·‚邽‚ß‚ÉŽg—p‚µ‚Ü‚·B
+
+/////////////////////////////////////////////////////////////////////////////
+‚»‚Ì‘¼‚̃ƒ‚ :
+
+AppWizard ‚Å‚Í "TODO:" ƒRƒƒ“ƒg‚ðŽg—p‚µ‚āAƒ†[ƒU[‚ª’ljÁ‚Ü‚½‚̓JƒXƒ^ƒ}ƒCƒY‚·‚é
+ƒ\[ƒX•”•ª‚ðŽ¦‚µ‚Ü‚·B
+
+/////////////////////////////////////////////////////////////////////////////
+
+
+
+

Added: trunk/ttssh2/puttyrev/Resource.h
===================================================================
--- trunk/ttssh2/puttyrev/Resource.h	                        (rev 0)
+++ trunk/ttssh2/puttyrev/Resource.h	2011-07-26 15:07:33 UTC (rev 4533)
@@ -0,0 +1,17 @@
+//{{NO_DEPENDENCIES}}
+// Microsoft Visual C++ generated include file.
+// Used by puttyrev.rc
+//
+
+#define IDS_APP_TITLE			103
+
+// V‚µ‚¢ƒIƒuƒWƒFƒNƒg‚ÌŽŸ‚ÌŠù’è’l
+// 
+#ifdef APSTUDIO_INVOKED
+#ifndef APSTUDIO_READONLY_SYMBOLS
+#define _APS_NEXT_RESOURCE_VALUE	101
+#define _APS_NEXT_COMMAND_VALUE		40001
+#define _APS_NEXT_CONTROL_VALUE		1000
+#define _APS_NEXT_SYMED_VALUE		101
+#endif
+#endif

Added: trunk/ttssh2/puttyrev/puttyrev.cpp
===================================================================
--- trunk/ttssh2/puttyrev/puttyrev.cpp	                        (rev 0)
+++ trunk/ttssh2/puttyrev/puttyrev.cpp	2011-07-26 15:07:33 UTC (rev 4533)
@@ -0,0 +1,113 @@
+// puttyrev.cpp : ƒRƒ“ƒ\[ƒ‹ ƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚̃Gƒ“ƒgƒŠ ƒ|ƒCƒ“ƒg‚ð’è‹`‚µ‚Ü‚·B
+//
+
+#include "stdafx.h"
+#include "puttyrev.h"
+
+#ifdef _DEBUG
+#define new DEBUG_NEW
+#endif
+
+
+// —Bˆê‚̃AƒvƒŠƒP[ƒVƒ‡ƒ“ ƒIƒuƒWƒFƒNƒg‚Å‚·B
+
+CWinApp theApp;
+
+using namespace std;
+
+void write_putty_version(char *path)
+{
+	BOOL ret;
+	CStdioFile csf;
+	char *keywords[] = {
+		//"AppVerName",
+		"AppVersion",
+		"VersionInfoTextVersion",
+		NULL,
+	};
+	int i;
+	CString filename, buf, cs;
+	char revision[64] = {0};
+
+	// PuTTY‚̃o[ƒWƒ‡ƒ“‚ðŽæ“¾‚·‚éB
+	filename = path;
+	filename += "\\libs\\putty\\windows\\putty.iss";
+
+	ret = csf.Open(filename, CFile::modeRead);
+	if (ret == FALSE) {
+		goto write;
+	}
+
+	while (csf.ReadString(cs) != NULL) {
+		CString tmp;
+		for (i = 0 ; keywords[i] ; i++) {
+			tmp = keywords[i];
+			tmp += "=%[^\n]s";
+			ret = sscanf_s(cs, tmp, revision, sizeof(revision));
+			if (ret != 1) 
+				continue;
+			printf("%s\n", revision);
+			goto close;
+		}
+	}
+
+close:
+	csf.Close();
+
+write:
+	// ƒo[ƒWƒ‡ƒ“‚ðƒwƒbƒ_‚ɏ‘‚«ž‚ށB
+	filename = path;
+	filename += "\\ttssh2\\ttxssh\\puttyversion.h";
+
+	ret = csf.Open(filename, CFile::modeWrite | CFile::modeCreate);
+	if (ret == FALSE) {
+		goto end;
+	}
+
+	if (revision[0] != '\0') {
+		cs.Format("#define PUTTYVERSION \"%s\"\n", revision);
+		csf.WriteString(cs);
+	}
+	else {
+		cs.Format("#undef PUTTYVERSION\n");
+		csf.WriteString(cs);
+	}
+
+	csf.Close();
+
+end:;
+}
+
+int _tmain(int argc, TCHAR* argv[], TCHAR* envp[])
+{
+	int nRetCode = 0;
+	char path[MAX_PATH * 2];
+	int i, len;
+
+	// MFC ‚ð‰Šú‰»‚µ‚āAƒGƒ‰[‚̏ꍇ‚ÍŒ‹‰Ê‚ðˆóü‚µ‚Ü‚·B
+	if (!AfxWinInit(::GetModuleHandle(NULL), NULL, ::GetCommandLine(), 0))
+	{
+		// TODO: •K—v‚ɉž‚¶‚ăGƒ‰[ ƒR[ƒh‚ð•ÏX‚µ‚Ä‚­‚¾‚³‚¢B
+		_tprintf(_T("’v–½“I‚ȃGƒ‰[: MFC ‚̏‰Šú‰»‚ª‚Å‚«‚Ü‚¹‚ñ‚Å‚µ‚½B\n"));
+		nRetCode = 1;
+	}
+	else
+	{
+		// TODO: ƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚Ì“®ì‚ð‹Lq‚·‚éƒR[ƒh‚ð‚±‚±‚É‘}“ü‚µ‚Ä‚­‚¾‚³‚¢B
+		GetModuleFileName(::GetModuleHandle(NULL), path, sizeof(path));
+		len = (int)strlen(path);
+		for (i=len; i>=0; i--) {
+			if (path[i] == '\\') {
+				break;
+			}
+			path[i] = '\0';
+		}
+		SetCurrentDirectory(path); // teraterm\debug or teraterm\release
+		SetCurrentDirectory("..\\..\\..\\"); // top of source tree
+		GetCurrentDirectory(sizeof(path), path);
+
+		write_putty_version(path);
+	}
+
+	return nRetCode;
+}

Added: trunk/ttssh2/puttyrev/puttyrev.h
===================================================================
--- trunk/ttssh2/puttyrev/puttyrev.h	                        (rev 0)
+++ trunk/ttssh2/puttyrev/puttyrev.h	2011-07-26 15:07:33 UTC (rev 4533)
@@ -0,0 +1,3 @@
+#pragma once
+
+#include "resource.h"

Added: trunk/ttssh2/puttyrev/puttyrev.rc
===================================================================
--- trunk/ttssh2/puttyrev/puttyrev.rc	                        (rev 0)
+++ trunk/ttssh2/puttyrev/puttyrev.rc	2011-07-26 15:07:33 UTC (rev 4533)
@@ -0,0 +1,69 @@
+//Microsoft Visual C++ ‚Ő¶¬‚³‚ꂽƒŠƒ\[ƒX ƒXƒNƒŠƒvƒg‚Å‚·B
+//
+#include "resource.h"
+
+#define APSTUDIO_READONLY_SYMBOLS
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE 2 ƒŠƒ\[ƒX‚©‚琶¬‚³‚ê‚Ü‚µ‚½B
+//
+#include "afxres.h"
+/////////////////////////////////////////////////////////////////////////////
+#undef APSTUDIO_READONLY_SYMBOLS
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_JPN)
+LANGUAGE 17, 1
+#pragma code_page(932)
+
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE  
+BEGIN
+    "resource.h\0"
+END
+
+2 TEXTINCLUDE  
+BEGIN
+    "#include ""afxres.h""\r\n"
+    "\0"
+END
+
+3 TEXTINCLUDE  
+BEGIN
+    "\r\n"
+    "\0"
+END
+
+#endif    // APSTUDIO_INVOKED
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// ƒXƒgƒŠƒ“ƒO ƒe[ƒuƒ‹
+//
+
+STRINGTABLE  
+BEGIN
+   IDS_APP_TITLE       "puttyrev"
+END
+
+#endif
+/////////////////////////////////////////////////////////////////////////////
+
+
+
+#ifndef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE 3 ƒŠƒ\[ƒX‚©‚琶¬‚³‚ê‚Ü‚µ‚½B
+//
+#ifndef _AFXDLL
+#include "afxres.rc"
+#endif
+
+/////////////////////////////////////////////////////////////////////////////
+#endif    // APSTUDIO_INVOKED ‚Å‚È‚¢ê‡

Added: trunk/ttssh2/puttyrev/puttyrev.vcproj
===================================================================
--- trunk/ttssh2/puttyrev/puttyrev.vcproj	                        (rev 0)
+++ trunk/ttssh2/puttyrev/puttyrev.vcproj	2011-07-26 15:07:33 UTC (rev 4533)
@@ -0,0 +1,239 @@
+<?xml version="1.0" encoding="shift_jis"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="puttyrev"
+	ProjectGUID="{61EB955F-2794-4607-860F-0AA296FA58BD}"
+	RootNamespace="puttyrev"
+	Keyword="Win32Proj"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory="$(SolutionDir)ttxssh\$(ConfigurationName)"
+			IntermediateDirectory="$(ConfigurationName)"
+			ConfigurationType="1"
+			UseOfMFC="2"
+			CharacterSet="0"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+				MinimalRebuild="true"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="3"
+				UsePrecompiledHeader="2"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="4"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				LinkIncremental="2"
+				GenerateDebugInformation="true"
+				SubSystem="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory="$(SolutionDir)ttxssh\$(ConfigurationName)"
+			IntermediateDirectory="$(ConfigurationName)"
+			ConfigurationType="1"
+			UseOfMFC="2"
+			CharacterSet="0"
+			WholeProgramOptimization="1"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+				RuntimeLibrary="2"
+				UsePrecompiledHeader="2"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				LinkIncremental="1"
+				GenerateDebugInformation="true"
+				SubSystem="1"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="ƒ\[ƒX ƒtƒ@ƒCƒ‹"
+			Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+			>
+			<File
+				RelativePath=".\puttyrev.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\stdafx.cpp"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+			</File>
+		</Filter>
+		<Filter
+			Name="ƒwƒbƒ_[ ƒtƒ@ƒCƒ‹"
+			Filter="h;hpp;hxx;hm;inl;inc;xsd"
+			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+			>
+			<File
+				RelativePath=".\puttyrev.h"
+				>
+			</File>
+			<File
+				RelativePath=".\Resource.h"
+				>
+			</File>
+			<File
+				RelativePath=".\stdafx.h"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="ƒŠƒ\[ƒX ƒtƒ@ƒCƒ‹"
+			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+			>
+			<File
+				RelativePath=".\puttyrev.rc"
+				>
+			</File>
+		</Filter>
+		<File
+			RelativePath=".\ReadMe.txt"
+			>
+		</File>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>

Added: trunk/ttssh2/puttyrev/stdafx.cpp
===================================================================
--- trunk/ttssh2/puttyrev/stdafx.cpp	                        (rev 0)
+++ trunk/ttssh2/puttyrev/stdafx.cpp	2011-07-26 15:07:33 UTC (rev 4533)
@@ -0,0 +1,8 @@
+// stdafx.cpp : •W€ƒCƒ“ƒNƒ‹[ƒh puttyrev.pch ‚Ì‚Ý‚ð
+// ŠÜ‚Þƒ\[ƒX ƒtƒ@ƒCƒ‹‚́AƒvƒŠƒRƒ“ƒpƒCƒ‹Ï‚݃wƒbƒ_[‚É‚È‚è‚Ü‚·B
+// stdafx.obj ‚ɂ̓vƒŠƒRƒ“ƒpƒCƒ‹Ï‚ÝŒ^î•ñ‚ªŠÜ‚Ü‚ê‚Ü‚·B
+
+#include "stdafx.h"
+
+// TODO: ‚±‚̃tƒ@ƒCƒ‹‚Å‚Í‚È‚­ASTDAFX.H ‚Å•K—v‚È
+// ’ljÁƒwƒbƒ_[‚ðŽQÆ‚µ‚Ä‚­‚¾‚³‚¢B

Added: trunk/ttssh2/puttyrev/stdafx.h
===================================================================
--- trunk/ttssh2/puttyrev/stdafx.h	                        (rev 0)
+++ trunk/ttssh2/puttyrev/stdafx.h	2011-07-26 15:07:33 UTC (rev 4533)
@@ -0,0 +1,48 @@
+// stdafx.h : •W€‚̃VƒXƒeƒ€ ƒCƒ“ƒNƒ‹[ƒh ƒtƒ@ƒCƒ‹‚̃Cƒ“ƒNƒ‹[ƒh ƒtƒ@ƒCƒ‹A‚Ü‚½‚Í
+// ŽQÆ‰ñ”‚ª‘½‚­A‚©‚‚ ‚Ü‚è•ÏX‚³‚ê‚È‚¢AƒvƒƒWƒFƒNƒgê—p‚̃Cƒ“ƒNƒ‹[ƒh ƒtƒ@ƒCƒ‹
+// ‚ð‹Lq‚µ‚Ü‚·B
+//
+
+#pragma once
+
+// ‰º‚ÅŽw’肳‚ꂽ’è‹`‚Ì‘O‚ɑΏۃvƒ‰ƒbƒgƒtƒH[ƒ€‚ðŽw’肵‚È‚¯‚ê‚΂Ȃç‚È‚¢ê‡AˆÈ‰º‚Ì’è‹`‚ð•ÏX‚µ‚Ä‚­‚¾‚³‚¢B
+// ˆÙ‚È‚éƒvƒ‰ƒbƒgƒtƒH[ƒ€‚ɑΉž‚·‚é’l‚ÉŠÖ‚·‚éÅVî•ñ‚ɂ‚¢‚ẮAMSDN ‚ðŽQÆ‚µ‚Ä‚­‚¾‚³‚¢B
+#ifndef WINVER				// Windows XP ˆÈ~‚̃o[ƒWƒ‡ƒ“‚ɌŗL‚Ì‹@”\‚ÌŽg—p‚ð‹–‰Â‚µ‚Ü‚·B
+#define WINVER 0x0501		// ‚±‚ê‚ð Windows ‚Ì‘¼‚̃o[ƒWƒ‡ƒ“Œü‚¯‚É“KØ‚È’l‚ɕύX‚µ‚Ä‚­‚¾‚³‚¢B
+#endif
+
+#ifndef _WIN32_WINNT		// Windows XP ˆÈ~‚̃o[ƒWƒ‡ƒ“‚ɌŗL‚Ì‹@”\‚ÌŽg—p‚ð‹–‰Â‚µ‚Ü‚·B                   
+#define _WIN32_WINNT 0x0501	// ‚±‚ê‚ð Windows ‚Ì‘¼‚̃o[ƒWƒ‡ƒ“Œü‚¯‚É“KØ‚È’l‚ɕύX‚µ‚Ä‚­‚¾‚³‚¢B
+#endif						
+
+#ifndef _WIN32_WINDOWS		// Windows 98 ˆÈ~‚̃o[ƒWƒ‡ƒ“‚ɌŗL‚Ì‹@”\‚ÌŽg—p‚ð‹–‰Â‚µ‚Ü‚·B
+#define _WIN32_WINDOWS 0x0410 // ‚±‚ê‚ð Windows Me ‚Ü‚½‚Í‚»‚êˆÈ~‚̃o[ƒWƒ‡ƒ“Œü‚¯‚É“KØ‚È’l‚ɕύX‚µ‚Ä‚­‚¾‚³‚¢B
+#endif
+
+#ifndef _WIN32_IE			// IE 6.0 ˆÈ~‚̃o[ƒWƒ‡ƒ“‚ɌŗL‚Ì‹@”\‚ÌŽg—p‚ð‹–‰Â‚µ‚Ü‚·B
+#define _WIN32_IE 0x0600	// ‚±‚ê‚ð IE. ‚Ì‘¼‚̃o[ƒWƒ‡ƒ“Œü‚¯‚É“KØ‚È’l‚ɕύX‚µ‚Ä‚­‚¾‚³‚¢B
+#endif
+
+#include <stdio.h>
+#include <tchar.h>
+#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS	// ˆê•”‚Ì CString ƒRƒ“ƒXƒgƒ‰ƒNƒ^‚Í–¾Ž¦“I‚Å‚·B
+
+#ifndef VC_EXTRALEAN
+#define VC_EXTRALEAN		// Windows ƒwƒbƒ_[‚©‚çŽg—p‚³‚ê‚Ä‚¢‚È‚¢•”•ª‚ðœŠO‚µ‚Ü‚·B
+#endif
+
+#include <afx.h>
+#include <afxwin.h>         // MFC ‚̃RƒA‚¨‚æ‚Ñ•W€ƒRƒ“ƒ|[ƒlƒ“ƒg
+#include <afxext.h>         // MFC ‚ÌŠg’£•”•ª
+#ifndef _AFX_NO_OLE_SUPPORT
+#include <afxdtctl.h>		// MFC ‚Ì Internet Explorer 4 ƒRƒ‚ƒ“ ƒRƒ“ƒgƒ[ƒ‹ ƒTƒ|[ƒg
+#endif
+#ifndef _AFX_NO_AFXCMN_SUPPORT
+#include <afxcmn.h>			// MFC ‚Ì Windows ƒRƒ‚ƒ“ ƒRƒ“ƒgƒ[ƒ‹ ƒTƒ|[ƒg
+#endif // _AFX_NO_AFXCMN_SUPPORT
+
+#include <iostream>
+
+
+
+// TODO: ƒvƒƒOƒ‰ƒ€‚É•K—v‚ȒljÁƒwƒbƒ_[‚ð‚±‚±‚ÅŽQÆ‚µ‚Ä‚­‚¾‚³‚¢B

Modified: trunk/ttssh2/ttssh.sln
===================================================================
--- trunk/ttssh2/ttssh.sln	2011-07-26 14:59:34 UTC (rev 4532)
+++ trunk/ttssh2/ttssh.sln	2011-07-26 15:07:33 UTC (rev 4533)
@@ -6,11 +6,14 @@
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ttxssh", "ttxssh\ttxssh.vcproj", "{5638BB89-44E3-4D55-BA98-A01142B4223E}"
 	ProjectSection(ProjectDependencies) = postProject
+		{61EB955F-2794-4607-860F-0AA296FA58BD} = {61EB955F-2794-4607-860F-0AA296FA58BD}
 		{98CA1284-8F6C-4791-BF57-7E5FAD33744E} = {98CA1284-8F6C-4791-BF57-7E5FAD33744E}
 	EndProjectSection
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "putty", "putty\putty.vcproj", "{98CA1284-8F6C-4791-BF57-7E5FAD33744E}"
 EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "puttyrev", "puttyrev\puttyrev.vcproj", "{61EB955F-2794-4607-860F-0AA296FA58BD}"
+EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		Debug|Win32 = Debug|Win32
@@ -33,6 +36,10 @@
 		{98CA1284-8F6C-4791-BF57-7E5FAD33744E}.Debug|Win32.Build.0 = Debug|Win32
 		{98CA1284-8F6C-4791-BF57-7E5FAD33744E}.Release|Win32.ActiveCfg = Release|Win32
 		{98CA1284-8F6C-4791-BF57-7E5FAD33744E}.Release|Win32.Build.0 = Release|Win32
+		{61EB955F-2794-4607-860F-0AA296FA58BD}.Debug|Win32.ActiveCfg = Debug|Win32
+		{61EB955F-2794-4607-860F-0AA296FA58BD}.Debug|Win32.Build.0 = Debug|Win32
+		{61EB955F-2794-4607-860F-0AA296FA58BD}.Release|Win32.ActiveCfg = Release|Win32
+		{61EB955F-2794-4607-860F-0AA296FA58BD}.Release|Win32.Build.0 = Release|Win32
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE

Modified: trunk/ttssh2/ttxssh/resource.h
===================================================================
--- trunk/ttssh2/ttxssh/resource.h	2011-07-26 14:59:34 UTC (rev 4532)
+++ trunk/ttssh2/ttxssh/resource.h	2011-07-26 15:07:33 UTC (rev 4533)
@@ -188,6 +188,7 @@
 #define IDC_REMEMBERPASSWORD            1207
 #define IDC_EDIT2                       1208
 #define IDC_NEW_PASSWD                  1208
+#define IDC_PUTTY_VERSION               1209
 
 // Next default values for new objects
 // 
@@ -195,7 +196,7 @@
 #ifndef APSTUDIO_READONLY_SYMBOLS
 #define _APS_NEXT_RESOURCE_VALUE        109
 #define _APS_NEXT_COMMAND_VALUE         40001
-#define _APS_NEXT_CONTROL_VALUE         1209
+#define _APS_NEXT_CONTROL_VALUE         1210
 #define _APS_NEXT_SYMED_VALUE           101
 #endif
 #endif

Modified: trunk/ttssh2/ttxssh/ttxssh.c
===================================================================
--- trunk/ttssh2/ttxssh/ttxssh.c	2011-07-26 14:59:34 UTC (rev 4532)
+++ trunk/ttssh2/ttxssh/ttxssh.c	2011-07-26 15:07:33 UTC (rev 4533)
@@ -82,6 +82,8 @@
 
 #include "compat_w95.h"
 
+#include "puttyversion.h"
+
 #define MATCH_STR(s, o) strncmp((s), (o), NUM_ELEM(o) - 1)
 #define MATCH_STR_I(s, o) _strnicmp((s), (o), NUM_ELEM(o) - 1)
 
@@ -2375,6 +2377,13 @@
 #endif
 	SendMessage(GetDlgItem(dlg, IDC_ZLIB_VERSION), WM_SETTEXT, 0, (LPARAM)buf);
 
+	// PuTTY‚̃o[ƒWƒ‡ƒ“‚ðÝ’è‚·‚é (2011.7.26 yutaka)
+#ifdef PUTTYVERSION
+	_snprintf_s(buf, sizeof(buf), _TRUNCATE, "PuTTY %s", PUTTYVERSION);
+#else
+	_snprintf(buf, sizeof(buf), "PuTTY Unknown");
+#endif
+	SendMessage(GetDlgItem(dlg, IDC_PUTTY_VERSION), WM_SETTEXT, 0, (LPARAM)buf);
 
 	// TTSSHƒ_ƒCƒAƒƒO‚É•\Ž¦‚·‚éSSH‚ÉŠÖ‚·‚éî•ñ (2004.10.30 yutaka)
 	if (pvar->socket != INVALID_SOCKET) {

Modified: trunk/ttssh2/ttxssh/ttxssh.rc
===================================================================
--- trunk/ttssh2/ttxssh/ttxssh.rc	2011-07-26 14:59:34 UTC (rev 4532)
+++ trunk/ttssh2/ttxssh/ttxssh.rc	2011-07-26 15:07:33 UTC (rev 4533)
@@ -52,22 +52,23 @@
 // Dialog
 //
 
-IDD_ABOUTDIALOG DIALOGEX 0, 0, 263, 276
+IDD_ABOUTDIALOG DIALOGEX 0, 0, 263, 285
 STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
 CAPTION "About TTSSH"
 FONT 8, "Tahoma", 0, 0, 0x0
 BEGIN
-    LTEXT           "This extension uses OpenSSH code by OpenBSD Project. Thanks also to Ian Goldberg for his Pilot SSH code, which was a very handy reference. Special thanks to Takashi Teranishi for his cooperation.",IDC_CREDIT,6,132,248,27
-    DEFPUSHBUTTON   "OK",IDOK,106,254,50,14
+    LTEXT           "This extension uses OpenSSH code by OpenBSD Project. Thanks also to Ian Goldberg for his Pilot SSH code, which was a very handy reference. Special thanks to Takashi Teranishi for his cooperation.",IDC_CREDIT,6,140,248,27
+    DEFPUSHBUTTON   "OK",IDOK,106,263,50,14
     LTEXT           "Includes:\r\nTTSSH 1.5.4 (Robert O'Callahan roc+t****@cs*****), 1998-1999\r\nIPv6 extention version 0.81 (kato****@win6*****), 2000-2003\r\nSSH2 support (Tera Term Project), 2004-2011",IDC_INCLUDES,6,36,248,34
-    LTEXT           "THIS EXTENSION INCORPORATES STRONG CRYPTOGRAPHY. POSESSION, USE, AND/OR EXPORT OF THIS EXTENSION MAY BE ILLEGAL IN YOUR COUNTRY.",IDC_CRYPTOGRAPHY,6,106,248,26
-    ICON            "",IDC_TTSSH_ICON,234,7,20,20
-    EDITTEXT        IDC_ABOUTTEXT,6,161,248,87,ES_MULTILINE | ES_AUTOVSCROLL | ES_AUTOHSCROLL | ES_READONLY
-    LTEXT           "Tera Term Project:     http://ttssh2.sourceforge.jp/",IDC_WEBSITES,6,88,248,13,SS_SUNKEN
+    LTEXT           "THIS EXTENSION INCORPORATES STRONG CRYPTOGRAPHY. POSESSION, USE, AND/OR EXPORT OF THIS EXTENSION MAY BE ILLEGAL IN YOUR COUNTRY.",IDC_CRYPTOGRAPHY,6,116,248,26
+    ICON            "",IDC_TTSSH_ICON,234,7,21,20
+    EDITTEXT        IDC_ABOUTTEXT,6,171,248,87,ES_MULTILINE | ES_AUTOVSCROLL | ES_AUTOHSCROLL | ES_READONLY
+    LTEXT           "Tera Term Project:     http://ttssh2.sourceforge.jp/",IDC_WEBSITES,6,99,248,13,SS_SUNKEN
     LTEXT           "OpenSSL:",IDC_OPENSSL_VERSION,6,69,175,8
     LTEXT           "Compatible with SSH protocol version 1.5 and 2.0",IDC_SSHVERSIONS,6,23,206,11
     LTEXT           "Tera Term Secure Shell extension, ",IDC_TTSSH_VERSION,6,7,220,15
     LTEXT           "zlib:",IDC_ZLIB_VERSION,6,78,181,8
+    LTEXT           "PuTTY:",IDC_PUTTY_VERSION,6,88,207,8
 END
 
 IDD_SSHAUTH DIALOGEX 0, 0, 309, 262
@@ -412,7 +413,7 @@
         LEFTMARGIN, 6
         RIGHTMARGIN, 254
         TOPMARGIN, 7
-        BOTTOMMARGIN, 268
+        BOTTOMMARGIN, 277
     END
 
     IDD_SSHAUTH, DIALOG

Modified: trunk/ttssh2/ttxssh/ttxssh.vcproj
===================================================================
--- trunk/ttssh2/ttxssh/ttxssh.vcproj	2011-07-26 14:59:34 UTC (rev 4532)
+++ trunk/ttssh2/ttxssh/ttxssh.vcproj	2011-07-26 15:07:33 UTC (rev 4533)
@@ -25,6 +25,7 @@
 			>
 			<Tool
 				Name="VCPreBuildEventTool"
+				CommandLine="$(OutDir)\puttyrev.exe"
 			/>
 			<Tool
 				Name="VCCustomBuildTool"
@@ -83,8 +84,8 @@
 				LinkIncremental="2"
 				SuppressStartupBanner="true"
 				AdditionalLibraryDirectories="..\..\libs\openssl\out32.dbg;..\..\libs\zlib;..\..\teraterm\Debug"
+				ModuleDefinitionFile="ttxssh.def"
 				DelayLoadDLLs="dnsapi.dll"
-				ModuleDefinitionFile="ttxssh.def"
 				GenerateDebugInformation="true"
 				ProgramDatabaseFile=".\Debug/ttxssh.pdb"
 				GenerateMapFile="true"
@@ -129,6 +130,7 @@
 			>
 			<Tool
 				Name="VCPreBuildEventTool"
+				CommandLine="$(OutDir)\puttyrev.exe"
 			/>
 			<Tool
 				Name="VCCustomBuildTool"
@@ -188,8 +190,8 @@
 				LinkIncremental="1"
 				SuppressStartupBanner="true"
 				AdditionalLibraryDirectories="..\..\libs\openssl\out32;..\..\libs\zlib;..\..\teraterm\Release"
+				ModuleDefinitionFile="ttxssh.def"
 				DelayLoadDLLs="dnsapi.dll"
-				ModuleDefinitionFile="ttxssh.def"
 				GenerateDebugInformation="true"
 				ProgramDatabaseFile=".\Release/ttxssh.pdb"
 				SubSystem="2"



Ttssh2-commit メーリングリストの案内
Back to archive index