日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > 数据库 >内容正文

数据库

inno setup 打包mysql_使用Inno Setup 打包jdk、mysql、tomcat、webapp等为一个exe安装包

發布時間:2025/3/11 数据库 31 豆豆
生活随笔 收集整理的這篇文章主要介紹了 inno setup 打包mysql_使用Inno Setup 打包jdk、mysql、tomcat、webapp等为一个exe安装包 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

1 ; 腳本由 Inno Setup 腳本向導 生成!2 ; 有關創建 Inno Setup 腳本文件的詳細資料請查閱幫助文檔!3

4 #define MyAppName "abc"5 #define MyAppVersion "1.0"6 #define MyAppPublisher "aaa"7 #define MyAppURL "http://www.abc.com/"8

9 [Setup]10 ; 注: AppId的值為單獨標識該應用程序。11 ; 不要為其他安裝程序使用相同的AppId值。12 ; (生成新的GUID,點擊 工具|在IDE中生成GUID。)13 AppId={{9E044575-9CD9-4751-B0BE-F6758BA94548}

14 AppName={#MyAppName}

15 AppVersion={#MyAppVersion}

16 ;AppVerName={#MyAppName} {#MyAppVersion}

17 AppPublisher={#MyAppPublisher}

18 AppPublisherURL={#MyAppURL}

19 AppSupportURL={#MyAppURL}

20 AppUpdatesURL={#MyAppURL}

21 DefaultDirName={pf}\{#MyAppName}

22 DefaultGroupName=XX管理軟件(abc)23 AllowNoIcons=yes24 OutputBaseFilename=setup25 Compression=lzma26 SolidCompression=yes27 [Files]28 ;拷貝tomcat29 Source:"Source\apache-tomcat-6.0.41\*";DestDir:"{app}\tomcat6.0";Flags:igNoreversion recursesubdirs createallsubdirs30 ;拷貝jdk31 Source:"Source\jdk1.6.0_43\*";DestDir:"{app}\jdk1.6";Flags:igNoreversion recursesubdirs createallsubdirs32 ;拷貝mysql33 Source:"Source\MySql5.5\*";DestDir:"{app}\MySql5.5";Flags:igNoreversion recursesubdirs createallsubdirs34 ;拷貝源代碼35 Source:"Source\abc\*";DestDir:"{app}\tomcat6.0\webapps\ROOT";Flags:igNoreversion recursesubdirs createallsubdirs36 ;拷貝sdk37 Source:"Source\Sdk\*";DestDir:"{app}\Sdk";Flags:igNoreversion recursesubdirs createallsubdirs38 ;拷貝服務器39 Source:"Source\Server\*";DestDir:"{app}\Server";Flags:igNoreversion recursesubdirs createallsubdirs40 ;拷貝ftp41 Source:"Source\FtpServer\*";DestDir:"{app}\FtpServer";Flags:igNoreversion recursesubdirs createallsubdirs42 ;拷貝bat43 Source:"Source\*";DestDir:"{app}\";44 ;拷貝桌面快捷方式45 Source:"Source\xx系統.url";DestDir:"{userdesktop}\xx系統";46 [Languages]47 Name: "chinesesimp"; MessagesFile: "compiler:Default.isl"48 [Icons]49 Name: "{group}\{cm:ProgramOnTheWeb,{#MyAppName}}"; Filename: "{#MyAppURL}"50 Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}"51 [INI]52 ;修改數據庫配置文件53 Filename:"{app}\MySql5.5\my.ini";Section:"mysqld";Key:"basedir"; String:"{app}\MySql5.5"54 Filename:"{app}\MySql5.5\my.ini";Section:"mysqld";Key:"datadir"; String:"{app}\MySql5.5\data"55 Filename:"{app}\MySql5.5\my.ini";Section:"mysqld";Key:"port"; String:"3308"56 Filename:"{app}\MySql5.5\my.ini";Section:"client";Key:"port"; String:"3308"57 ;修改服務器配置文件58 Filename:"{app}\Server\init.ini";Section:"RegAddr";Key:"port"; String:"5556"59 Filename:"{userdesktop}\xx系統.url";Section:"InternetShortcut";Key:"URL"; String:"http://127.0.0.1:7070/"60 [Run]61 ;修改tomcat配置文件62 Filename:"{app}\loading.bat";AfterInstall:ConfigXml(ExpandConstant('{app}\tomcat6.0\conf\server.xml'),'/Server/Service/Connector','port','7070')63 ;修改web數據庫連接配置文件64 Filename:"{app}\loading.bat";AfterInstall:ConfigXml(ExpandConstant('{app}\tomcat6.0\webapps\ROOT\META-INF\Context.xml'),'/Context/Resource','password','123456')65 Filename:"{app}\loading.bat";AfterInstall:ConfigXml(ExpandConstant('{app}\tomcat6.0\webapps\ROOT\META-INF\Context.xml'),'/Context/Resource','url','jdbc:mysql://127.0.0.1:3308/abc?characterEncoding=UTF-8')66 ;修改FTP配置文件67 Filename:"{app}\loading.bat";AfterInstall:ConfigXml(ExpandConstant('{app}\FtpServer\FileZilla Server.xml'),'/FileZillaServer/Users/User','Name','admin')68 Filename:"{app}\loading.bat";AfterInstall:ConfigXml2(ExpandConstant('{app}\FtpServer\FileZilla Server.xml'),'/FileZillaServer/Users/User/Option[0]','e10adc3949ba59abbe56e057f20f883e')69 Filename:"{app}\loading.bat";AfterInstall:ConfigXml(ExpandConstant('{app}\FtpServer\FileZilla Server.xml'),'/FileZillaServer/Users/User/Permissions/Permission','Dir',ExpandConstant('{app}\tomcat6.0\webapps\ROOT\SystemFile'))70 ;修改服務配置文件71 Filename:"{app}\loading.bat";AfterInstall:ConfigXml(ExpandConstant('{app}\Sdk\abc.config'),'/configuration/appSettings/add[1]','value','127.0.0.1')72 Filename:"{app}\loading.bat";AfterInstall:ConfigXml(ExpandConstant('{app}\Sdk\abc.config'),'/configuration/appSettings/add[2]','value','5556')73 Filename:"{app}\loading.bat";AfterInstall:ConfigXml(ExpandConstant('{app}\Sdk\abc.config'),'/configuration/appSettings/add[3]','value','127.0.0.1')74 Filename:"{app}\loading.bat";AfterInstall:ConfigXml(ExpandConstant('{app}\Sdk\abc.config'),'/configuration/appSettings/add[4]','value','7070')75 Filename:"{app}\install.bat";Description:"正在啟動或配置相關程序";76 [UninstallRun]77 Filename:"{app}\uninstall.bat";78 [UninstallDelete]79 Type:filesandordirs;Name:"{app}\Server"80 Type:filesandordirs;Name:"{app}\MySql5.5"81 Type:filesandordirs;Name:"{app}\Sdk"82 Type:filesandordirs;Name:"{app}\tomcat6.0"83 Type:files;Name:"{app}\InstallUtil.InstallLog"84 [Code]85 procedureConfigXml2(xmlPath:String;xPath:String;innerText:String);86 var

87 XMLDocument,XMLRoot,XMLNode:Variant;88 begin

89 try90 XMLDocument := CreateOleObject('MSXML2.DOMDocument');91 XMLDocument.async :=False;92 XMLDocument.resolveExternals :=False;93 XMLDocument.load(xmlPath);94 XMLRoot :=XMLDocument.documentElement;95

96 XMLNode:=XMLRoot.SelectSingleNode(xPath);97 XMLNode.Text:=innerText;98 XMLDocument.Save(xmlPath);99 except100 MsgBox('xml error', mbInformation, mb_Ok);101 end;102 end;103 procedureConfigXml(xmlPath:String;xPath:String;attrName:String;attrValue:String);104 var

105 XMLDocument,XMLRoot,XMLNode:Variant;106 begin

107 try108 XMLDocument := CreateOleObject('MSXML2.DOMDocument');109 XMLDocument.async :=False;110 XMLDocument.resolveExternals :=False;111 XMLDocument.load(xmlPath);112 XMLRoot :=XMLDocument.documentElement;113

114 XMLNode:=XMLRoot.SelectSingleNode(xPath);115 XMLNode.Attributes.GetNamedItem(attrName).Value:=attrValue;116 XMLDocument.Save(xmlPath);117 except118 MsgBox('xml error', mbInformation, mb_Ok);119 end;120 end;

總結

以上是生活随笔為你收集整理的inno setup 打包mysql_使用Inno Setup 打包jdk、mysql、tomcat、webapp等为一个exe安装包的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。