printers-tray.iss 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. #define MyAppName "Printers Tray"
  2. #define MyAppVersion "0.0.1"
  3. #define MyAppPublisher "Eiru Software"
  4. #define MyAppURL "http://www.eiru.com.py/"
  5. #define MyAppExeName "printers-tray.bat"
  6. [Setup]
  7. AppId={{3E5917E1-53C8-4930-A5BD-ADA89B7841F9}
  8. AppName={#MyAppName}
  9. AppVersion={#MyAppVersion}
  10. ;AppVerName={#MyAppName} {#MyAppVersion}
  11. AppPublisher={#MyAppPublisher}
  12. AppPublisherURL={#MyAppURL}
  13. AppSupportURL={#MyAppURL}
  14. AppUpdatesURL={#MyAppURL}
  15. DefaultDirName={pf}\{#MyAppName}
  16. DefaultGroupName={#MyAppName}
  17. OutputDir=C:\Users\Robert\Documents\printers-tray
  18. OutputBaseFilename=printers-tray
  19. Compression=lzma
  20. SolidCompression=yes
  21. ArchitecturesInstallIn64BitMode=x64
  22. PrivilegesRequired=admin
  23. RestartApplications=yes
  24. AlwaysRestart=yes
  25. [Languages]
  26. Name: "spanish"; MessagesFile: "compiler:Languages\Spanish.isl"
  27. [Files]
  28. Source: "C:\Users\Robert\Documents\printers-tray\printers-tray*.jar"; DestDir: "{app}"; Flags: ignoreversion
  29. Source: "C:\Users\Robert\Documents\printers-tray\lib\*"; DestDir: "{app}\lib"; Flags: ignoreversion recursesubdirs createallsubdirs
  30. Source: "C:\Users\Robert\Documents\printers-tray\printers-tray.bat"; DestDir: "{app}"; Flags: ignoreversion
  31. Source: "C:\Users\Robert\Documents\printers-tray\printers-tray.ico"; DestDir: "{app}"; Flags: ignoreversion
  32. [Icons]
  33. Name: "{commonstartup}\{#MyAppName}"; Filename: "{app}\printers-tray.bat"; IconFilename: "{app}\printers-tray.ico"
  34. [Code]
  35. const
  36. REQUIRED_JAVA_VERSION = '1.8';
  37. function InitializeSetup(): Boolean;
  38. var
  39. JavaVersion: String;
  40. ErrorCode: Integer;
  41. begin
  42. if RegQueryStringValue(HKLM, 'SOFTWARE\JavaSoft\Java Runtime Environment', 'CurrentVersion', JavaVersion) then
  43. begin
  44. Result := CompareStr(JavaVersion, REQUIRED_JAVA_VERSION) >= 0;
  45. end;
  46. if Result = False then
  47. begin
  48. if MsgBox('Este programa requiere Java 1.8 o superior. Desea descargarlo ahora?', mbConfirmation, MB_YESNO) = IDYES then
  49. begin
  50. ShellExec('open', 'https://java.com/download', '', '', SW_SHOWNORMAL, ewNoWait, ErrorCode);
  51. end;
  52. end;
  53. end;