以前编写的inno setup脚本,涵盖了自定义安装界面,调用dll等等应用 (转)

  1. ; Script generated by the Inno Setup 脚本向导.
  2. ; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
  3. ; 为1的时候表示定义成试用版本
  4. #define VERSION_TYPE ReadIni('Setup.ini', 'SetupType', 'type', '0')
  5. #if VERSION_TYPE == "2"
  6. #define LIVE_VERSION
  7. #define MyAppName "流媒体系统(PMS)"
  8. #define MyAppId "1954A698-2322-46F1-B732-8DDF96693DA5"
  9. #define MyOutputBaseFilename "live_server_setup"
  10. #elif VERSION_TYPE == "1"
  11. #define VOD_VERSION
  12. #define MyAppName "流媒体系统(PMS)"
  13. #define MyAppId "DA255679-F103-4170-8B75-B9A7EF4CBC1B"
  14. #define MyOutputBaseFilename "vod_server_setup"
  15. #else
  16. #define FULL_VERSION
  17. #define MyAppName "流媒体系统(PMS)"
  18. #define MyAppId "4AC618B5-8C69-4D47-918A-261AA895B6D7"
  19. #define MyOutputBaseFilename "full_server_setup"
  20. #endif
  21. #define RegUrl "http://www.xxx.net"
  22. #define MyAppVersion "1.0"
  23. #define MyAppPublisher "XXX科技有限公司"
  24. #define MyAppURL "http://www.xxx.net"
  25. #define MyAppExeName "InstanceConfig.exe"
  26. [Setup]
  27. ; NOTE: The value of AppId uniquely identifies this application.
  28. ; Do not use the same AppId value in installers for other applications.
  29. ; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
  30. AppId={{{#MyAppId}}
  31. AppMutex={{{#MyAppId}}
  32. AppName={#MyAppName}
  33. AppVersion={#MyAppVersion}
  34. AppPublisher={#MyAppPublisher}
  35. AppPublisherURL={#MyAppURL}
  36. AppSupportURL={#MyAppURL}
  37. AppUpdatesURL={#MyAppURL}
  38. DefaultDirName={pf}\xxx\media server
  39. DefaultGroupName={#MyAppName}
  40. AllowNoIcons=yes
  41. LicenseFile=license.txt
  42. OutputDir=output
  43. OutputBaseFilename={#MyOutputBaseFilename}
  44. SetupIconFile=setup.ico
  45. Compression=lzma
  46. SolidCompression=yes
  47. VersionInfoVersion={#MyAppVersion}
  48. VersionInfoCompany={#MyAppPublisher}
  49. VersionInfoCopyright=Copyright (C) 2010-2013
  50. VersionInfoProductName={#MyAppName}
  51. VersionInfoProductVersion={#MyAppVersion}
  52. [Languages]
  53. Name: cn; MessagesFile: compiler:Languages\chinese.isl
  54. [Files]
  55. ; NOTE: Don't use "Flags: ignoreversion" on any shared system files
  56. ; 用来检测安装程序中输入的注册码是否有效
  57. Source: ..\build\register_help.dll; Flags: dontcopy
  58. Source: ..\build\libeay32.dll; Flags: dontcopy
  59. Source: ..\build\vcredist2008_x86.exe; Flags: dontcopy
  60. #ifdef FULL_VERSION
  61. Source: ..\build\server.conf; DestDir: {app}
  62. Source: ..\build\media_service.exe; DestDir: {app}
  63. Source: ..\build\libmysql.dll; DestDir: {app}
  64. Source: ..\build\libeay32.dll; DestDir: {app}
  65. Source: ..\build\zlib1.dll; DestDir: {app}
  66. Source: ..\build\register_check.exe; DestDir: {app}
  67. Source: ..\build\QtCore4.dll; DestDir: {app}
  68. Source: ..\build\QtGui4.dll; DestDir: {app}
  69. Source: ..\build\mglobal.dll; DestDir: {app}
  70. Source: ..\build\msvcp100.dll; DestDir: {app}
  71. Source: ..\build\msvcr100.dll; DestDir: {app}
  72. Source: ..\build\initconfig.exe; DestDir: {app}
  73. Source: ..\build\InstanceConfig.exe; DestDir: {app}
  74. ;Source: ..\build\php-fpm.exe; DestDir: {app}
  75. Source: ..\build\管理统计页面.url; DestDir: {app}
  76. Source: ..\build\示例页面.url; DestDir: {app}
  77. Source: ..\build\launchlist; DestDir: {app}
  78. ;Source: ..\build\phpcgi; DestDir: {app}
  79. Source: ..\build\lighttpd.conf; DestDir: {app}\lmp\lighttpd\conf; Flags: ignoreversion
  80. Source: ..\build\my.ini; DestDir: {app}\lmp\mysql; Flags: ignoreversion
  81. ; web服务器整套目录
  82. Source: ..\build\lmp\*; DestDir: {app}\lmp; Flags: recursesubdirs createallsubdirs
  83. ; doc文档目录
  84. Source: ..\doc\*; DestDir: {app}\help; Flags: recursesubdirs createallsubdirs
  85. ; 播放器相关目录
  86. Source: ..\build\swfs\*; DestDir: {app}\swfs; Flags: recursesubdirs createallsubdirs
  87. ; 播放器SDK相关目录
  88. Source: ..\build\scriptlib\*; DestDir: {app}\scriptlib; Flags: recursesubdirs createallsubdirs
  89. #endif
  90. [Dirs]
  91. Name: {app}\videos
  92. [Tasks]
  93. Name: desktopicon; Description: {cm:CreateDesktopIcon}; GroupDescription: {cm:AdditionalIcons}
  94. [Icons]
  95. Name: {group}\sample\示例页面; Filename: {app}\示例页面.url
  96. Name: {group}\help\安装说明; Filename: {app}\help\安装说明.pdf
  97. Name: {group}\help\功能说明; Filename: {app}\help\功能说明.pdf
  98. Name: {group}\help\开发说明; Filename: {app}\help\开发说明.pdf
  99. Name: {group}\help\配置说明; Filename: {app}\help\配置说明.pdf
  100. Name: {group}\help\统计模块; Filename: {app}\help\统计模块.pdf
  101. Name: {group}\流媒体系统(PMS)系统配置; Filename: {app}\{#MyAppExeName}
  102. Name: {group}\{cm:UninstallProgram, PMS系统配置}; Filename: {uninstallexe}
  103. Name: {group}\流媒体系统(PMS)统计管理; Filename: {app}\管理统计页面.url; IconFilename: {app}\{#MyAppExeName};
  104. Name: {commondesktop}\流媒体系统(PMS)统计管理; Filename: {app}\管理统计页面.url; Tasks: desktopicon; IconFilename: {app}\{#MyAppExeName};
  105. Name: {commondesktop}\流媒体系统(PMS)系统配置; Filename: {app}\{#MyAppExeName}; Tasks: desktopicon
  106. Name: {commondesktop}\ 开启PMS服 务; Filename: {app}\media_service.exe; Parameters: -r; IconFilename: {app}\{#MyAppExeName}; Tasks: desktopicon
  107. Name: {commondesktop}\ 停止PMS服 务; Filename: {app}\media_service.exe; Parameters: -s; IconFilename: {app}\{#MyAppExeName}; Tasks: desktopicon
  108. [Run]
  109. ; 删除服务
  110. Filename: {app}\media_service.exe; Parameters: -u; Flags: runhidden
  111. ; 安装服务
  112. Filename: {app}\media_service.exe; Parameters: -i; Flags: runhidden
  113. [UninstallRun]
  114. ; 停止服务
  115. Filename: {app}\media_service.exe; Parameters: -s; Flags: runhidden
  116. ; 删除服务
  117. Filename: {app}\media_service.exe; Parameters: -u; Flags: runhidden
  118. [CustomMessages]
  119. Key_Form_Caption=注册向导
  120. Key_Form_Description=将序列号提交给xxx以获取注册码
  121. Key_Form_codeLabel_Caption0=序列号:
  122. Key_Form_keyLabel_Caption0=注册码:
  123. Domain_Form_Caption=域名设置
  124. Domain_Form_Description=配置当前服务器域名
  125. [Messages]
  126. BeveledLabel=xxx网络科技
  127. [Code]
  128. var
  129. codeLabel: TLabel;
  130. keyLabel: TLabel;
  131. key: TMemo;
  132. code: TMemo;
  133. keyPage: TWizardPage;
  134. domainEdit: TNewEdit;
  135. domainPage: TWizardPage;
  136. // 获取序列号
  137. function getCode(szCode: PChar; inLen: Integer): Integer;
  138. external 'getCode@files:register_help.dll,libeay32.dll,msvcr100.dll stdcall setuponly delayload loadwithalteredsearchpath';
  139. // 进行检查
  140. function regCheck(const regKey: PChar): Boolean;
  141. external 'regCheck@files:register_help.dll,libeay32.dll,msvcr100.dll stdcall setuponly delayload loadwithalteredsearchpath';
  142. // 进行注册
  143. function regSave(const regKey, regPath: PChar): Boolean;
  144. external 'regSave@files:register_help.dll,libeay32.dll,msvcr100.dll stdcall setuponly delayload loadwithalteredsearchpath';
  145. // 清理注册
  146. procedure regClear(const regPath: PChar);
  147. external 'regClear@files:register_help.dll,libeay32.dll,msvcr100.dll stdcall setuponly delayload loadwithalteredsearchpath';
  148. function OpenSCManager(const machine: LongInt; const dbName: LongInt;  access: Dword):LongInt;
  149. external 'OpenSCManagerA@Advapi32.dll stdcall';
  150. function OpenService(svcMgr: LongInt; const svcName: pchar;  access: Dword):LongInt;
  151. external 'OpenServiceA@Advapi32.dll stdcall';
  152. function CloseServiceHandle(svc: LongInt):Boolean;
  153. external 'CloseServiceHandle@Advapi32.dll stdcall';
  154. ///判定服务是否存在
  155. function  serviceExists(name: string): boolean;
  156. var
  157. SvcMgr, Svc: LongInt;
  158. begin
  159. Result := False;
  160. SvcMgr := OpenSCManager(0,0,1);
  161. if SvcMgr = 0 then Exit;
  162. Svc := OpenService(SvcMgr, PChar(name), 4);
  163. if Svc = 0 then
  164. begin
  165. CloseServiceHandle(SvcMgr);
  166. Exit;
  167. end;
  168. CloseServiceHandle(Svc);
  169. CloseServiceHandle(SvcMgr);
  170. Result := true;
  171. end;
  172. ///停止服务
  173. procedure stopService;
  174. var
  175. ResultCode: Integer;
  176. begin
  177. Exec(ExpandConstant('{tmp}\media_service.exe'), '-s', '', SW_HIDE, ewWaitUntilTerminated, ResultCode);
  178. end;
  179. { Key_Form_ShouldSkipPage }
  180. function Key_Form_ShouldSkipPage(Page: TWizardPage): Boolean;
  181. var
  182. codeStr: String;
  183. begin
  184. SetLength(codeStr, 1024);
  185. getCode(PChar(codeStr), 1024);
  186. code.Text := codeStr;
  187. Result := False;
  188. end;
  189. // 注册码编辑框改变事件
  190. procedure Key_Form_KeyChange(Sender: TObject);
  191. begin
  192. // 检测注册码
  193. if regCheck(PChar(key.Text)) then
  194. WizardForm.NextButton.Enabled := True
  195. else
  196. WizardForm.NextButton.Enabled := False;
  197. end;
  198. procedure RegURLLabelOnClick(Sender: TObject);
  199. var
  200. ErrorCode: Integer;
  201. begin
  202. ShellExec('open', ExpandConstant('{#RegURL}'), '', '', SW_SHOWNORMAL, ewNoWait, ErrorCode);
  203. end;
  204. { Key_Form_CreatePage }
  205. function Key_Form_CreatePage(PreviousPageId: Integer): Integer;
  206. var
  207. URLLabel: TNewStaticText;
  208. begin
  209. keyPage := CreateCustomPage(
  210. PreviousPageId,
  211. ExpandConstant('{cm:Key_Form_Caption}'),
  212. ExpandConstant('{cm:Key_Form_Description}')
  213. );
  214. { codeLabel }
  215. codeLabel := TLabel.Create(keyPage);
  216. with codeLabel do
  217. begin
  218. Parent := keyPage.Surface;
  219. Caption := ExpandConstant('{cm:Key_Form_codeLabel_Caption0}');
  220. Left := ScaleX(0);
  221. Top := ScaleY(0);
  222. Width := ScaleX(40);
  223. Height := ScaleY(13);
  224. end;
  225. { keyLabel }
  226. keyLabel := TLabel.Create(keyPage);
  227. with keyLabel do
  228. begin
  229. Parent := keyPage.Surface;
  230. Caption := ExpandConstant('{cm:Key_Form_keyLabel_Caption0}');
  231. Left := ScaleX(0);
  232. Top := ScaleY(82);
  233. Width := ScaleX(40);
  234. Height := ScaleY(13);
  235. end;
  236. { key }
  237. key := TMemo.Create(keyPage);
  238. with key do
  239. begin
  240. Parent := keyPage.Surface;
  241. Left := ScaleX(0);
  242. Top := ScaleY(98);
  243. Width := ScaleX(410);
  244. Height := ScaleY(106);
  245. ScrollBars := ssVertical;
  246. TabOrder := 0;
  247. OnChange := @Key_Form_KeyChange;
  248. end;
  249. { code }
  250. code := TMemo.Create(keyPage);
  251. with code do
  252. begin
  253. Parent := keyPage.Surface;
  254. Left := ScaleX(0);
  255. Top := ScaleY(16);
  256. Width := ScaleX(410);
  257. Height := ScaleY(60);
  258. ReadOnly := True;
  259. ScrollBars := ssVertical;
  260. TabOrder := 1;
  261. end;
  262. with keyPage do
  263. begin
  264. OnShouldSkipPage := @Key_Form_ShouldSkipPage;
  265. end;
  266. Result := keyPage.ID;
  267. URLLabel := TNewStaticText.Create(keyPage);
  268. with URLLabel do
  269. begin
  270. Caption := '获取注册码';
  271. Cursor := crHand;
  272. OnClick := @RegURLLabelOnClick;
  273. Parent := keyPage.Surface;
  274. Font.Style := URLLabel.Font.Style + [fsUnderline];
  275. Font.Color := clBlue;
  276. Left := ScaleX(350);
  277. Top := ScaleY(210);
  278. end;
  279. end;
  280. { 设置域名页面相关代码 }
  281. procedure Domain_Form_EditChange(sender: TObject);
  282. begin
  283. if domainEdit.Text = '' then
  284. WizardForm.NextButton.Enabled := False
  285. else
  286. WizardForm.NextButton.Enabled := True;
  287. end;
  288. function Domain_Form_CreatePage(PreviousPageId: Integer): Integer;
  289. var
  290. domainLabel: TNewStaticText;
  291. begin
  292. domainPage := CreateCustomPage(
  293. PreviousPageId,
  294. ExpandConstant('{cm:Domain_Form_Caption}'),
  295. ExpandConstant('{cm:Domain_Form_Description}')
  296. );
  297. domainLabel := TNewStaticText.Create(domainPage);
  298. with domainLabel do
  299. begin
  300. Parent := domainPage.Surface;
  301. Caption := '请确保输入的域名是有效的,并指向当前服务器IP,否则可以直接填写本机' + #13#10 + 'IP地址,或者保持默认值不变';
  302. Left := ScaleX(0);
  303. Top := ScaleY(60);
  304. Width := ScaleX(400);
  305. Height := ScaleY(28);
  306. end;
  307. domainEdit := TNewEdit.Create(domainPage);
  308. with domainEdit do
  309. begin
  310. Parent := domainPage.Surface;
  311. Text := GetComputerNameString;
  312. Left := ScaleX(0);
  313. Top := ScaleY(90);
  314. Width := ScaleX(400);
  315. Height := ScaleY(13);
  316. OnChange := @Domain_Form_EditChange;
  317. end;
  318. end;
  319. procedure URLLabelOnClick(Sender: TObject);
  320. var
  321. ErrorCode: Integer;
  322. begin
  323. ShellExec('open', ExpandConstant('{#MyAppURL}'), '', '', SW_SHOWNORMAL, ewNoWait, ErrorCode);
  324. end;
  325. // 安装初始化
  326. function InitializeSetup(): Boolean;
  327. begin
  328. if serviceExists('MediaSrv') then
  329. begin //服务存在,先停止它
  330. if MsgBox('服务已经存在,要继续吗?', mbConfirmation, MB_YESNO) = IDNO then
  331. begin
  332. Result := False;
  333. Exit;
  334. end;
  335. ExtractTemporaryFile('media_service.exe');
  336. ExtractTemporaryFile('msvcr100.dll');
  337. ExtractTemporaryFile('msvcp100.dll');
  338. stopService;
  339. end;
  340. result := True;
  341. end;
  342. procedure InitializeWizard();
  343. var
  344. URLLabel: TNewStaticText;
  345. begin
  346. Key_Form_CreatePage(wpSelectDir);
  347. Domain_Form_CreatePage(keyPage.ID);
  348. URLLabel := TNewStaticText.Create(WizardForm);
  349. with URLLabel do
  350. begin
  351. Caption := ExpandConstant('{#MyAppURL}');
  352. Cursor := crHand;
  353. OnClick := @URLLabelOnClick;
  354. Parent := WizardForm;
  355. Font.Style := URLLabel.Font.Style + [fsUnderline];
  356. Font.Color := clBlue;
  357. Left := ScaleX(20);
  358. Top := WizardForm.ClientHeight - ScaleY(30);
  359. end;
  360. end;
  361. // 页面切换事件
  362. procedure CurPageChanged(CurPageID: Integer);
  363. var
  364. ResultCode: Integer;
  365. file: String;
  366. buf: String;
  367. begin
  368. WizardForm.BackButton.Enabled := True;
  369. if CurPageID = keyPage.ID then
  370. WizardForm.NextButton.Enabled := False
  371. else if CurPageID = wpFinished then
  372. begin
  373. ///////////////////////////////////////////////////////////
  374. // 帮助设置HOST_NAME为用户设置的域名
  375. file := ExpandConstant('{app}\lmp\htdocs\sample\config.php');
  376. if LoadStringFromFile(file, buf) then
  377. begin
  378. StringChangeEx(buf, '%HOST_NAME%', domainEdit.Text, False);
  379. SaveStringToFile(file, buf, False);
  380. end;
  381. file := ExpandConstant('{app}\管理统计页面.url');
  382. if LoadStringFromFile(file, buf) then
  383. begin
  384. StringChangeEx(buf, '%HOST_NAME%', domainEdit.Text, False);
  385. SaveStringToFile(file, buf, False);
  386. end;
  387. file := ExpandConstant('{app}\示例页面.url');
  388. if LoadStringFromFile(file, buf) then
  389. begin
  390. StringChangeEx(buf, '%HOST_NAME%', domainEdit.Text, False);
  391. SaveStringToFile(file, buf, False);
  392. end;
  393. ///////////////////////////////////////////////////////////
  394. // 禁用完成按钮
  395. WizardForm.NextButton.Enabled := False;
  396. // 正式写入注册文件
  397. regSave(PChar(key.Text), WizardDirValue);
  398. // 执行自动初始化
  399. Exec(ExpandConstant('{app}\initconfig.exe'), '', '', SW_HIDE, ewWaitUntilTerminated, ResultCode);
  400. // 执行配置设置
  401. Exec(ExpandConstant('{app}\InstanceConfig.exe'), '-r', '', SW_SHOW, ewWaitUntilTerminated, ResultCode);
  402. // 启动服务
  403. Exec(ExpandConstant('{app}\media_service.exe'), '-r', '', SW_HIDE, ewWaitUntilTerminated, ResultCode);
  404. // 启用完成按钮
  405. WizardForm.NextButton.Enabled := True;
  406. end
  407. else if CurPageID = wpInstalling then
  408. begin
  409. // 安装运行时库
  410. ExtractTemporaryFile('vcredist2008_x86.exe');
  411. // 执行2008库安装
  412. Exec(ExpandConstant('{tmp}\vcredist2008_x86.exe'), '/q', '', SW_HIDE, ewWaitUntilTerminated, ResultCode);
  413. end
  414. else if CurPageID = domainPage.ID then
  415. begin
  416. WizardForm.BackButton.Enabled := False;
  417. end;
  418. end;
  419. // 卸载
  420. procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep);
  421. begin
  422. if CurUninstallStep = usUninstall then
  423. begin
  424. DeleteFile(ExpandConstant('{app}\lsc'));
  425. end;
  426. end;
  427. // 检查重启逻辑
  428. function UninstallNeedRestart(): Boolean;
  429. begin
  430. if serviceExists('MediaSrv') then
  431. result := True
  432. else
  433. result := False;
  434. end;

以前编写的inno setup脚本,涵盖了自定义安装界面,调用dll等等应用 (转)的更多相关文章

  1. inno setup脚本,涵盖了自定义安装界面,调用dll等等应用

    ; Script generated by the Inno Setup 脚本向导. ; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETU ...

  2. Inno Setup脚本语法大全

    Inno Setup脚本语法大全 ResourceShare Bruce 11个月前 (10-28) 6136浏览 0评论   Inno Setup 是什么?Inno Setup 是一个免费的 Win ...

  3. Inno Setup 脚本

    给你个我用的例子: Delphi/Pascal code   ? 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 2 ...

  4. Inno Setup自定义安装界面脚本

    ; 脚本由 Inno Setup 脚本向导 生成! ; 有关创建 Inno Setup 脚本文件的详细资料请查阅帮助文档! #define MyAppName "RemoteCard&quo ...

  5. Inno Setup脚本

    某天夜晚一场狂风暴雨,由于办公室座位旁的窗户没关,笔记本电脑泡了一夜水,无法开机,无奈送修,里面的大量资料也不知道会不会丢失. is的脚本只有重新写了,重新研究了一下检测程序是否正在运行的判断方法,另 ...

  6. INNO SETUP脚本向导创建的基本脚本

    脚本范例分析:先来看看一段用INNO SETUP脚本向导创建的基本脚本的[Setup]段: [Setup]   AppName=Premiere 6.5 汉化补丁-----------------(程 ...

  7. 在Unicode版Inno Setup中使用ISSkin给安装程序添加皮肤

    原文 http://www.cnblogs.com/2356/archive/2009/10/27/1590565.html 在Unicode版Inno Setup中使用ISSkin给安装程序添加皮肤 ...

  8. 【转载】inno setup 水波纹效果,检测安装vcredist_x86.exe等

    以下inno setup脚本,实现了:1.水波纹效果 2.安装时检测是否安装其他版本,并在欢迎页面添加文字提示 4.检测安装vcredist_x86.exe  3.卸载时添加提示 ; 脚本由 Inno ...

  9. 使用Inno SetUp脚本打包Winform程序

    在开发桌面程序时,往往需要用到打包工具将程序打包为exe可执行文件. 之前在项目中用了下 InstallShield Limited Edition for Visual Studio  2015,它 ...

随机推荐

  1. nginx配置文件重写url不带index.php

    如题: 代码 location / { root /项目目录/; index index.php; if (-f $request_filename/index.php){ rewrite (.*) ...

  2. Bean

    1. Bean配置项 1.1. ID 在整个IOC容器中Bean的唯一标识 1.2. Class 具体要实例化的类 1.3. Scope 范围,作用域 1.4. Constructor argumen ...

  3. Unity Shader——Writing Surface Shaders(3)——Surface Shader Lighting Examples

    Surface Shader 光照例子 这里有一些自定义光照模型和Surface Shaders的例子.通常的Surface Shader例子在这里. 由于延迟光照在某些自定义的逐材质光照模型中表现得 ...

  4. UIProgressView和UISlider

    UIProgressView和UISlider两个控件长的很像,区别在于UISlider有一个可以改变进度的滑块.虽然样子差不多,提供的属性的功能也差不多,但是属性的名字差别比较大. UIProgre ...

  5. 基于MATLAB的GUI(Graphical User Interface)音频实时显示设计

    摘要:本文章的设计主要讲基于matlab的gui音频实时显示设计,此次设计的gui相当于一个简洁的音乐播放器,界面只有”录音“和”播放“两个控件,哈哈,够简洁吧.通过”录音“按钮可以实现声音从电脑的声 ...

  6. SQL Server 2008 数据库镜像部署实例之三 配置见证服务器

    SQL Server 2008 数据库镜像部署实例之三 配置见证服务器 前面已经完成了镜像数据库的配置,并进行那个了故障转移测试.接下来将部署见证服务器,实现自动故障转移. 一.关于见证服务器 1.若 ...

  7. HttpURLConnection 直接发送soap消息调用webservice

    httpConn = (HttpURLConnection) new URL(urlString).openConnection();    httpConn.setRequestProperty(& ...

  8. linux命令行与shell脚本编程大全---更多bash shell命令

    进程状态:0代表正在运行:S代表在休眠:R代表可运行,正等待运行:Z代表僵化,进程已经结束但父进程已不存在:T代表停止. 查看有那些进程运行:ps  -ef 基本的linux文件系统: 1.ext文件 ...

  9. NGUI之UILabel

    重要属性说明 overflow: Shrink Content: 意味着内容会自动被缩小以便适应区域.它在你使用动态字体的同时使用Keep      Crisp设置时有效,让字体变小,而不是缩放内容. ...

  10. BMP图片格式

    BMP图片 BMP采用位映射存储格式,除了图像深度可选以外,不采用其他任何压缩,因此,BMP文件所占用的空间很大.BMP文件的图像深度可选lbit.4bit.8bit及24bit和32bit.BMP文 ...