论坛风格切换
正版合作和侵权请联系 sd173@foxmail.com
 
  • 帖子
  • 日志
  • 用户
  • 版块
  • 群组
帖子
购买邀请后未收到邀请联系sdbeta@qq.com
  • 3767阅读
  • 9回复

[求助-软件问题]安装delphi 7启动灰鸽子源码文件说找不到 [复制链接]

上一主题 下一主题
离线Rapamune
 
发帖
*
今日发帖
最后登录
1970-01-01
只看楼主 倒序阅读 使用道具 楼主  发表于: 2009-02-19 15:04:11
— 本帖被 kardel 执行锁定操作(2009-05-03) —
安装delphi 7
启动灰鸽子源码文件说找不到
看图吧。我也说不太清楚。
[attachment=27440]


[attachment=27441]
离线梁王
发帖
*
今日发帖
最后登录
1970-01-01
只看该作者 沙发  发表于: 2009-02-19 15:18:06
从工程文件开始分析: 一起解剖灰鸽子源码
program H_Client;

uses
Forms,
windows,
messages,
Classes,
Main in 'Main.pas' {HgzVip},
AboutUnit in 'AboutUnit.pas' {AboutForm},
UpIp in 'UpIp.pas' {UpIpDate},
SysInf in 'SysInf.pas' {SysShezhi},
ShowPic in 'ShowPic.pas' {ShowPm},
Scanover in 'Scanover.pas' {Sjiegou},
Splash in 'Splash.pas' {启动时的logo窗口},
RegEditUnit in 'RegEditUnit.pas' {RegEdit},
RegHexEdit in 'RegHexEdit.pas' {RegHex},
ConfigServerUnit in 'ConfigServerUnit.pas' {ConfigServer},
NewxpSer in 'NewxpSer.pas' {NewxpServer},
FtpUpUnit1 in 'FtpUpUnit1.pas' {FtpUp},
FtpDownUnit in 'FtpDownUnit.pas' {FTPDown},
ExeToolUnit in 'ExeToolUnit.pas' {ExeToolForm},
IconLibrary in 'icotool\IconLibrary.pas',
IconTools in 'icotool\IconTools.pas',
IconTypes in 'icotool\Icontypes.pas',
unitExIcon in 'icotool\unitExIcon.pas',
unitPEFile in 'icotool\unitPEFile.pas',
unitResourceDetails in 'icotool\unitResourceDetails.pas',
unitResourceGraphics in 'icotool\unitResourceGraphics.pas',
BmpToAviUnit in 'BmpToAviUnit.pas' {BmpToAviForm},
FTPServerUnit in 'FTPServerUnit.pas' {FTPServerForm},
DESCrypt in 'DESCrypt.pas',
LangFrm in 'Langmgr\LangFrm.pas',
LangMgr in 'Langmgr\LangMgr.pas',
LangObj in 'Langmgr\LangObj.pas';

{$R *.RES}


var
I:integer;

begin


Application.Initialize;

SplashForm:=TSplashForm.Create(Application);
SplashForm.Show;
ShowWindow(Application.Handle, SW_HIDE);  //隐藏窗体
SplashForm.Update;

Application.Title := '小乐修改版 Vip 1.2';
SplashForm.Gauge1.Progress:=5;
SplashForm.Update;

Application.CreateForm(THgzVip, HgzVip);
SplashForm.Gauge1.Progress:=25;
SplashForm.Update;
Application.CreateForm(TConfigServer, ConfigServer);
SplashForm.Gauge1.Progress:=30;
SplashForm.Update;
Application.CreateForm(TNewxpServer, NewxpServer);
SplashForm.Gauge1.Progress:=40;
SplashForm.Update;
Application.CreateForm(TFtpUp, FtpUp);
SplashForm.Gauge1.Progress:=50;
SplashForm.Update;
Application.CreateForm(TFTPDown, FTPDown);
SplashForm.Gauge1.Progress:=60;
SplashForm.Update;
Application.CreateForm(TExeToolForm, ExeToolForm);
SplashForm.Gauge1.Progress:=70;
SplashForm.Update;
Application.CreateForm(TBmpToAviForm, BmpToAviForm);
Application.CreateForm(TFTPServerForm, FTPServerForm);
SplashForm.Gauge1.Progress:=80;//'加载登陆窗口...';
SplashForm.Update;


Application.CreateForm(TShowPm, ShowPm);
Application.CreateForm(TSjiegou, Sjiegou);
Application.CreateForm(TUpIpDate, UpIpDate);
Application.CreateForm(TSysShezhi, SysShezhi);
SplashForm.Gauge1.Progress:=95;//'加载登陆窗口...';
SplashForm.Update;
Application.CreateForm(TRegEdit, RegEdit);
Application.CreateForm(TRegHex, RegHex);
SplashForm.Gauge1.Progress:=100;//'加载登陆窗口...';
SplashForm.Update;

Application.ProcessMessages;
HgzVip.NoisReg:=True;
SplashForm.Free;
//Application.ShowMainForm :=true;
Application.Run;
end.


一看就明白了,USES这一块,引用了很多源码(.pas)有的是窗体的有的没有窗体的,

然后beigin到end中间的内容
就创建logo窗口,就是运行鸽子的时候那个显示版本的界面,什么版权所有葛军之类的内容的那个界面。然后就是生成各个窗体,中间每完成一个都让LOGO窗口的进度条变化一下。

最后释放logo窗体,显示主窗体。
实际上主窗体就是 Application.CreateForm(THgzVip, HgzVip);生成的 窗体HgzVip
--------------------------------------
整个过程看起来非常清晰。中间有一句

ShowWindow(Application.Handle, SW_HIDE);

使用这句 一定要在前面 USES WINDOWS才可以

从英文的意义上来看应该是隐藏这个工程的窗体,但实际上新建了一个工程加上这句测试过,似乎不能隐藏工程的主窗体,也许是工程总是要打开一个窗体的吧。

---------------------------------------
实际上我 删了这句ShowWindow(Application.Handle, SW_HIDE); 程序也能正常运行。
因为非主窗体生成的时候默认是关闭的。

unit Splash;

interface

uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, jpeg, ExtCtrls, StdCtrls, LangFrm, Gauges;

type
TSplashForm = class(TForm)
  Image1: TImage;
  Gauge1: TGauge;
  procedure FormKeyDown(Sender: TObject; var Key: Word;
   Shift: TShiftState);
private
  { Private declarations }
public
  { Public declarations }
end;

var
SplashForm: TSplashForm;

implementation

{$R *.dfm}

procedure TSplashForm.FormKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
begin
if (Key = VK_F4) and (ssAlt in Shift) then Key := 0;
end;

end.


---------------------------


疑惑点:

if (Key = VK_F4) and (ssAlt in Shift) then Key := 0; 是干什么的呢?


FormKeyDown 是窗体事件,表示按下键盘触发的事件,估计这个是某个功能,触发按键盘的事件,

搜索了一下 原来这句的作用是:

if (Key=VK_F4)and(ssAlt in shift) then {使系统键Alt+F4失效}

呵呵 又学会了一点吧。。。。。




unit AboutUnit;

interface

uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls, Main, DynamicSkinForm, Buttons, SkinCtrls, SkinBoxCtrls,
SkinGrids, ExtCtrls,shellapi,DESCrypt, jpeg, IdGlobal, LangFrm;

type
TAboutForm = class(TLangForm)
  Bevel1: TBevel;
  Image1: TImage;
  Label4: TspSkinStdLabel;
  Label1: TLabel;
  Label2: TLabel;
  Label3: TLabel;
  Button1: TspSkinButton;
  DSF: TspDynamicSkinForm;
//皮肤控件
//主要是 皮肤控件 DSF: TspDynamicSkinForm
//属性DSF.SkinHint 是指向HgzVip.spSkinHint1
//属性DSF.SkinData是指向HgzVip.spSkinData1

  Image2: TImage;
  procedure Button1Click(Sender: TObject);
  procedure Label2Click(Sender: TObject);
  procedure Label3Click(Sender: TObject);
  procedure Label2MouseMove(Sender: TObject; Shift: TShiftState; X,
   Y: Integer);
  procedure Label3MouseMove(Sender: TObject; Shift: TShiftState; X,
   Y: Integer);
  procedure FormMouseMove(Sender: TObject; Shift: TShiftState; X,
   Y: Integer);
  procedure FormKeyDown(Sender: TObject; var Key: Word;
   Shift: TShiftState);
private
  { Private declarations }
public
  { Public declarations }
end;

var
AboutForm: TAboutForm;
keytp:string;
implementation


{$R *.DFM}

procedure TAboutForm.Button1Click(Sender: TObject);
begin
Close;
end;

//这两句是点击两个连接会打开IE,字符串是用DeCryptStr 解密的,我测试过用百度直接也能打开
//解密函数 在前面的引用的 DESCrypt 里。
//一开始,我不太明白他为什么要做成加密字串然后再做成解密呢 ,不是很多余么?后来想想忽然恍然大悟,哦原来是为了过滤掉 他自己的网址,这样的话别人搜索字符串就替换不掉他的网址和邮箱信息咯。真是太聪明了


procedure TAboutForm.Label2Click(Sender: TObject);
begin
ShellExecute(0, 'open', pchar(DeCryptStr('487D6CB4BADFCCE3314D70B78C37E4A19967A11A0A8FAA17',Head)), nil, nil, SW_SHOWMAXIMIZED);
//ShellExecute(0, 'open', pchar('http://www.baidu.com'), nil, nil, SW_SHOWMAXIMIZED);
end;
procedure TAboutForm.Label3Click(Sender: TObject);
begin
ShellExecute(0, 'open', pchar(DeCryptStr('BB47B76BEF00F0D316AF0B736236860EC89101DF0482D0975C7F285763EE94F9F56C1B69A1956EE040232466768FCAB4',Head)), nil, nil, SW_SHOW);
end;

//这段是设置鼠标 放上去后字体颜色变换的


procedure TAboutForm.Label2MouseMove(Sender: TObject; Shift: TShiftState;
X, Y: Integer);
begin
Label2.Font.Color:=clRed;
end;
procedure TAboutForm.Label3MouseMove(Sender: TObject; Shift: TShiftState;
X, Y: Integer);
begin
Label3.Font.Color :=clRed;
end;

procedure TAboutForm.FormMouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
begin
Label2.Font.Color :=clWindowText;
Label3.Font.Color :=clWindowText;
end;

//这段是葛军用来做藏记号用的,只要 按住 ALT键 输入 “HUIGEZI” 或者 “LOVE” 就会出现葛军自己的图片和提示消息框 藏在Image2里,Image2属性是设置为隐藏的。


procedure TAboutForm.FormKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
begin
//是否按下ALT键,只接收字符
if (shift=[ssALT]) and (key>=$41) and (key<=$5A) then
begin
keytp:=keytp+chr(key);
if keytp='HUIGEZI' then
  begin
   Image2.Visible:=True;
   //Close;
  end;
if keytp='LOVE' then
  begin
   Showmessage(EOL+'慧到永远!'+EOL+
         EOL+'     葛军');
  keytp:='';
  Close;
  end;
end;
end;
end.

1。从元服务端(预先编译好的服务端,没有加上一些配置信息的服务端)复制一个 到:c:\123\服务端.exe。

2。利用文件流方法 把要自启动的文件(根据listview1中的项目取出要合并的文件路径信息) 合并到 c:\123\服务端.exe文件中(添加在结尾)。---如果你没有列出要自启动的文件,这不就没合并其他文件,这里有点文件捆绑机的感觉。

3。(重点!)利用无类型文件的操作方法,写块的方式,继续把配置的一些参数信息形成一块一块,相继附加到c:\123\服务端.exe文件中(也是末尾),最终生成目标文件。


看完了这个过程,你应该就明白了,灰鸽子的服务端生成,并不是什么多么高深的技术,只是把配置信息附加到了文件的后面,运行的时候,元服务端估计就会解读这些配置信息并根据这些信息来运行的。
//另外 ,您还可以学习一下 listview的一些用法,比如删除行
//消息弹窗口的用法Application.MessageBox,可以看到随机生成不同类型图标的消息弹窗的方法
离线Rapamune
发帖
*
今日发帖
最后登录
1970-01-01
只看该作者 板凳  发表于: 2009-02-20 08:41:12
貌似没有楼上说的这复杂。
我找问题的原因了,是电脑系统设置的问题。但是到底是哪里设置的问题。不清楚。
我安装的是原版的那种系统。
我在虚拟机里的GHOST系统就可以。没有这样的问题。
希望高手帮解决下
离线bug
发帖
*
今日发帖
最后登录
1970-01-01
只看该作者 地板  发表于: 2009-02-20 10:33:14
如果真实系统安装了杀软一类的监控软件,关闭掉重装下delphi。
离线love飘逸

发帖
273
今日发帖
最后登录
2018-10-25
只看该作者 地下室  发表于: 2009-02-21 14:52:18
我下过这个源码,可以打开的,估计是你自己的D7设置的问题
离线168hxm
发帖
*
今日发帖
最后登录
1970-01-01
只看该作者 5 发表于: 2009-02-22 18:29:19
是不是楼主开了杀软之类的给隔离的
建议关闭所有杀软、防火墙、360等,重新安装一次试试看
离线Rapamune
发帖
*
今日发帖
最后登录
1970-01-01
只看该作者 6 发表于: 2009-02-22 18:37:19
不知是真么回事。在虚拟机离得系统安装完。非常好。
离线love飘逸

发帖
273
今日发帖
最后登录
2018-10-25
只看该作者 7 发表于: 2009-02-22 19:27:34
你还是把D7卸了重装一遍吧.
离线foreverbxy
发帖
*
今日发帖
最后登录
1970-01-01
只看该作者 8 发表于: 2009-03-17 13:18:49
建议卸载以后重启电脑,然后重新安装一次,
离线小m
发帖
*
今日发帖
最后登录
1970-01-01
只看该作者 9 发表于: 2009-03-17 14:55:59
我觉得跟杀毒软件关系最大。。。