unimrcp.iss 4.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. [Setup]
  2. ; include either setup-win32.txt or setup-x64.txt
  3. #include "setup-win32.txt"
  4. ;#include "setup-x64.txt"
  5. [Types]
  6. Name: full; Description: Full installation
  7. Name: server; Description: Server installation
  8. Name: client; Description: Client installation
  9. Name: custom; Description: Custom installation; Flags: iscustom
  10. [Components]
  11. Name: server; Description: UniMRCP server; Types: full server
  12. Name: server\recorder; Description: Recorder plugin; Types: full server
  13. Name: server\demosynth; Description: Demo synthesizer plugin; Types: full server
  14. Name: server\demorecog; Description: Demo recognizer plugin; Types: full server
  15. Name: server\demoverifier; Description: Demo verifier plugin; Types: full server
  16. Name: client; Description: UniMRCP client (sample applications); Types: full client
  17. [Dirs]
  18. Name: {app}\data; Permissions: everyone-full
  19. Name: {app}\log; Permissions: everyone-full
  20. [Files]
  21. Source: {#= uni_outdir}\bin\unimrcpserver.exe; DestDir: {app}\bin; Components: server
  22. Source: {#= uni_outdir}\bin\unimrcpservice.exe; DestDir: {app}\bin; Components: server
  23. Source: {#= uni_outdir}\bin\unimrcpclient.exe; DestDir: {app}\bin; Components: client
  24. Source: {#= uni_outdir}\bin\umc.exe; DestDir: {app}\bin; Components: client
  25. Source: {#= uni_outdir}\bin\*.dll; DestDir: {app}\bin; Components: server client
  26. Source: {#= uni_outdir}\plugin\mrcprecorder.dll; DestDir: {app}\plugin; Components: server/recorder
  27. Source: {#= uni_outdir}\plugin\demosynth.dll; DestDir: {app}\plugin; Components: server/demosynth
  28. Source: {#= uni_outdir}\plugin\demorecog.dll; DestDir: {app}\plugin; Components: server/demorecog
  29. Source: {#= uni_outdir}\plugin\demoverifier.dll; DestDir: {app}\plugin; Components: server/demoverifier
  30. Source: {#= uni_outdir}\conf\unimrcpserver.xml; DestDir: {app}\conf; Components: server
  31. Source: {#= uni_outdir}\conf\unimrcpclient.xml; DestDir: {app}\conf; Components: client
  32. Source: {#= uni_outdir}\conf\client-profiles\*.xml; DestDir: {app}\conf\client-profiles; Components: client
  33. Source: {#= uni_outdir}\conf\umcscenarios.xml; DestDir: {app}\conf; Components: client
  34. Source: {#= uni_outdir}\data\*.pcm; DestDir: {app}\data; Components: server client
  35. Source: {#= uni_outdir}\data\*.xml; DestDir: {app}\data; Components: server client
  36. Source: {#= uni_outdir}\data\*.txt; DestDir: {app}\data; Components: server client
  37. [Icons]
  38. Name: {group}\UniMRCP Server Console; Filename: {app}\bin\unimrcpserver.exe; Parameters: "--root-dir ""{app}"""; Components: server
  39. Name: {group}\UniMRCP Client Console; Filename: {app}\bin\unimrcpclient.exe; Parameters: "--root-dir ""{app}"""; Components: client
  40. Name: {group}\UniMRCP Service\Start Server; Filename: {app}\bin\unimrcpservice.exe; Parameters: --start; Components: server
  41. Name: {group}\UniMRCP Service\Stop Server; Filename: {app}\bin\unimrcpservice.exe; Parameters: --stop; Components: server
  42. Name: {group}\Uninstall; Filename: {uninstallexe}
  43. [Run]
  44. Filename: {app}\bin\unimrcpservice.exe; Description: Register service; Parameters: "--register ""{app}"""; Components: server
  45. [UninstallRun]
  46. Filename: {app}\bin\unimrcpservice.exe; Parameters: --unregister; Components: server
  47. [Code]
  48. var
  49. Content: String;
  50. procedure ModifyPluginConf(PluginName: String; Enable: Boolean);
  51. var
  52. TextFrom: String;
  53. TextTo: String;
  54. begin
  55. if Enable = True then
  56. begin
  57. TextFrom := 'class="' + PluginName + '" enable="0"';
  58. TextTo := 'class="' + PluginName + '" enable="1"';
  59. end
  60. else
  61. begin
  62. TextFrom := 'class="' + PluginName + '" enable="1"';
  63. TextTo := 'class="' + PluginName + '" enable="0"';
  64. end
  65. StringChange (Content, TextFrom, TextTo);
  66. end;
  67. procedure CurStepChanged(CurStep: TSetupStep);
  68. var
  69. CfgFile: String;
  70. begin
  71. if CurStep = ssPostInstall then
  72. begin
  73. CfgFile := ExpandConstant('{app}\conf\unimrcpserver.xml');
  74. LoadStringFromFile (CfgFile, Content);
  75. ModifyPluginConf ('mrcprecorder', IsComponentSelected('server\recorder'));
  76. ModifyPluginConf ('demosynth', IsComponentSelected('server\demosynth'));
  77. ModifyPluginConf ('demorecog', IsComponentSelected('server\demorecog'));
  78. ModifyPluginConf ('demoverifier', IsComponentSelected('server\demoverifier'));
  79. SaveStringToFile (CfgFile, Content, False);
  80. end
  81. end;