elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.

 

 


Tema destacado: Recuerda que debes registrarte en el foro para poder participar (preguntar y responder)


+  Foro de elhacker.net
|-+  Programación
| |-+  Scripting
| | |-+  [APORTE] [Inno Setup] Plantilla para usarla como script por defecto.
0 Usuarios y 1 Visitante están viendo este tema.
Páginas: [1] Ir Abajo Respuesta Imprimir
Autor Tema: [APORTE] [Inno Setup] Plantilla para usarla como script por defecto.  (Leído 7,227 veces)
Eleкtro
Ex-Staff
*
Desconectado Desconectado

Mensajes: 9.866



Ver Perfil
[APORTE] [Inno Setup] Plantilla para usarla como script por defecto.
« en: 17 Abril 2013, 13:21 pm »

A petición de un usuario aquí tienen la plantilla por defecto que uso para mis instaladores...


Setup.iss

Código
  1. ; = = = = = = = = = = = = = = = = = = =
  2. ; Default Template (by Elektro H@cker) |
  3. ;                                      |
  4. ;            InnoSetup 5.5.3           |
  5. ; = = = = = = = = = = = = = = = = = = =
  6.  
  7. [Setup]
  8.  
  9. ; Info
  10. ; ----
  11. #define Name "Application"
  12. #define Version "1.0"
  13. #define EXE "Application.exe"
  14. AppName={#Name}
  15. AppVersion={#Version}
  16. AppVerName={#Name} {#Version}
  17. AppCopyright=Elektro H@cker
  18. AppPublisher=Elektro H@cker
  19.  
  20. ; Paths
  21. ; -----
  22. DefaultDirName={pf}\{#Name}
  23. DefaultGroupName={#Name}
  24. OutputDir=.\Output\
  25. OutputBaseFilename={#Name}
  26. UninstallDisplayIcon={app}\{#EXE}
  27.  
  28. ; Resources
  29. ; ---------
  30. ;SetupIconFile=Icon.ico
  31. ;WizardImageFile=Icon.bmp
  32. ;WizardSmallImageFile=Icon.bmp
  33. ;InfoBeforeFile=Info.txt
  34.  
  35. ; Compression
  36. ; -----------
  37. Compression=lzma/ultra
  38. InternalCompressLevel=Ultra
  39. SolidCompression=True
  40.  
  41. ; Appearance
  42. ; ----------
  43. AlwaysShowComponentsList=False
  44. DisableDirPage=True
  45. DisableProgramGroupPage=True
  46. DisableReadyPage=True
  47. DisableStartupPrompt=True
  48. FlatComponentsList=False
  49. LanguageDetectionMethod=None
  50. PrivilegesRequired=PowerUser
  51. RestartIfNeededByRun=False
  52. ShowLanguageDialog=NO
  53. ShowTasksTreeLines=True
  54. Uninstallable=True
  55. ArchitecturesAllowed=x86 x64
  56. ;ArchitecturesInstallIn64BitMode=x64
  57.  
  58. [Languages]
  59. Name: spanish; MessagesFile: compiler:Languages\Spanish.isl
  60.  
  61. [Dirs]
  62. ;{sd}                  = C:\
  63. ;{commonappdata}       = C:\ProgramData
  64. ;{sd}\Users\{username} = C:\Users\UserName
  65. ;{userdesktop}         = C:\Users\UserName\Desktop
  66. ;{localappdata}        = C:\Users\UserName\AppData\Local
  67. ;{userappdata}         = C:\Users\UserName\AppData\Roaming
  68. ;{userstartmenu}       = C:\Users\UserName\AppData\Roaming\Microsoft\Windows\Start Menu
  69.  
  70. [Files]
  71. ;Source: {app}\*.*; DestDir: {app}; DestName:; Attribs:; Flags:;
  72. ;Attribs: ReadOnly Hidden System
  73. ;DestName: Example.exe
  74. ;Flags: 32bit 64bit Deleteafterinstall IgnoreVersion NoCompression Onlyifdoesntexist recursesubdirs uninsneveruninstall
  75.  
  76. [Registry]
  77. ;Root: HKCR; Subkey: SystemFileAssociations\.ext\Shell\OPTION; ValueName: Icon; ValueType: String; ValueData: {app}\{#Exe}; Flags: ;
  78. ;Root: HKCR; Subkey: SystemFileAssociations\.ext\Shell\OPTION\Command; ValueType: String; ValueData: """{app}\{#Exe}"" ""%1"""; Flags: ;
  79. ;Flags: uninsdeletevalue uninsdeletekey
  80.  
  81. [Tasks]
  82. ;Name: Identifier; Description: Title; GroupDescription: Group; Flags:;
  83. ;Flags: Unchecked
  84.  
  85. [Run]
  86. ;Filename: "{cmd}"; Parameters: "/C command"; StatusMsg: "Installing..."; Flags: RunHidden WaitUntilTerminated
  87. ;Filename: {app}\{#Exe}; Description: {cm:LaunchProgram,{#Nombre}}; Flags: NoWait PostInstall SkipIfSilent ShellExec Unchecked
  88. ;Flags: 32bit 64bit RunHidden WaitUntilTerminated NoWait PostInstall SkipIfSilent ShellExec Unchecked
  89.  
  90. [Icons]
  91. Name: {userstartmenu}\Programs\{#Name}; Filename: {app}\{#Exe}; Iconfilename: {app}\{#Exe}; WorkingDir: {app}
  92.  
  93. [Code]
  94.  
  95. const
  96.  Custom_Height = 440;
  97.  Custom_ProgressBar_Height = 20;
  98.  Page_Color = clwhite;
  99.  Page_Color_Alternative1 = clblack;
  100.  Page_Color_Alternative2 = clwhite;
  101.  Font_Color = clblack;
  102.  
  103.  
  104. var
  105.  DefaultTop,
  106.  DefaultLeft,
  107.  DefaultHeight,
  108.  DefaultBackTop,
  109.  DefaultNextTop,
  110.  DefaultCancelTop,
  111.  DefaultBevelTop,
  112.  DefaultOuterHeight: Integer;
  113.  
  114.  
  115. procedure InitializeWizard();
  116. begin
  117.  
  118.  DefaultTop := WizardForm.Top;
  119.  DefaultLeft := WizardForm.Left;
  120.  DefaultHeight := WizardForm.Height;
  121.  DefaultBackTop := WizardForm.BackButton.Top;
  122.  DefaultNextTop := WizardForm.NextButton.Top;
  123.  DefaultCancelTop := WizardForm.CancelButton.Top;
  124.  DefaultBevelTop := WizardForm.Bevel.Top;
  125.  DefaultOuterHeight := WizardForm.OuterNotebook.Height;
  126.  
  127.  
  128.  // Pages (Size)
  129.  WizardForm.Height := Custom_Height;
  130.  WizardForm.InnerPage.Height := WizardForm.InnerPage.Height + (Custom_Height - DefaultHeight);
  131.  WizardForm.LicensePage.Height := WizardForm.LicensePage.Height + (Custom_Height - DefaultHeight);
  132.  
  133.  
  134.  // Pages (Color)
  135.  WizardForm.color := Page_Color_Alternative1;
  136.  WizardForm.FinishedPage.Color  := Page_Color;
  137.  WizardForm.InfoAfterPage.Color := Page_Color;
  138.  WizardForm.InfoBeforePage.Color := Page_Color;
  139.  WizardForm.InnerPage.Color := Page_Color;
  140.  WizardForm.InstallingPage.color := Page_Color;
  141.  WizardForm.LicensePage.Color := Page_Color;
  142.  WizardForm.PasswordPage.color := Page_Color;
  143.  WizardForm.PreparingPage.color := Page_Color;
  144.  WizardForm.ReadyPage.Color := Page_Color;
  145.  WizardForm.SelectComponentsPage.Color  := Page_Color;
  146.  WizardForm.SelectDirPage.Color  := Page_Color;
  147.  WizardForm.SelectProgramGroupPage.color := Page_Color;
  148.  WizardForm.SelectTasksPage.color := Page_Color;
  149.  WizardForm.UserInfoPage.color := Page_Color;
  150.  WizardForm.WelcomePage.color := Page_Color;
  151.  
  152.  
  153.  // Controls (Size)
  154.  WizardForm.InfoAfterMemo.Height := (Custom_Height - (DefaultHeight / 2));
  155.  WizardForm.InfoBeforeMemo.Height := (Custom_Height - (DefaultHeight / 2));
  156.  WizardForm.InnerNotebook.Height :=  WizardForm.InnerNotebook.Height + (Custom_Height - DefaultHeight);
  157.  WizardForm.LicenseMemo.Height := WizardForm.LicenseMemo.Height + (Custom_Height - DefaultHeight);
  158.  WizardForm.OuterNotebook.Height := WizardForm.OuterNotebook.Height + (Custom_Height - DefaultHeight);
  159.  WizardForm.ProgressGauge.Height := Custom_ProgressBar_Height
  160.  WizardForm.ReadyMemo.Height := (Custom_Height - (DefaultHeight / 2));
  161.  WizardForm.Taskslist.Height := (Custom_Height - (DefaultHeight / 2));
  162.  WizardForm.WizardBitmapImage.Height := (Custom_Height - (DefaultHeight - DefaultBevelTop));
  163.  WizardForm.WizardBitmapImage2.Height  := (Custom_Height - (DefaultHeight - DefaultBevelTop));
  164.  
  165.  
  166.  // Controls (Location)
  167.  WizardForm.BackButton.Top := DefaultBackTop + (Custom_Height - DefaultHeight);
  168.  WizardForm.Bevel.Top := DefaultBevelTop + (Custom_Height - DefaultHeight);
  169.  WizardForm.CancelButton.Top := DefaultCancelTop + (Custom_Height - DefaultHeight);
  170.  WizardForm.LicenseAcceptedRadio.Top := WizardForm.LicenseAcceptedRadio.Top + (Custom_Height - DefaultHeight);
  171.  WizardForm.LicenseNotAcceptedRadio.Top := WizardForm.LicenseNotAcceptedRadio.Top + (Custom_Height - DefaultHeight);
  172.  WizardForm.NextButton.Top := DefaultNextTop + (Custom_Height - DefaultHeight);
  173.  WizardForm.Top := DefaultTop - (Custom_Height - DefaultHeight) div 2;
  174.  //WizardForm.ProgressGauge.Top := (DefaultHeight / 2)
  175.  
  176.  
  177.  // Controls (Back Color)
  178.  WizardForm.DirEdit.Color  := Page_Color_Alternative2;
  179.  WizardForm.GroupEdit.Color  := Page_Color_Alternative2;
  180.  WizardForm.InfoAfterMemo.Color := Page_Color_Alternative2;
  181.  WizardForm.InfoBeforeMemo.Color := Page_Color_Alternative2;
  182.  WizardForm.LicenseMemo.Color := Page_Color_Alternative2;
  183.  WizardForm.MainPanel.Color := Page_Color;
  184.  WizardForm.PasswordEdit.Color  := Page_Color_Alternative2;
  185.  WizardForm.ReadyMemo.Color := Page_Color_Alternative2;
  186.  WizardForm.Taskslist.Color := Page_Color;
  187.  WizardForm.UserInfoNameEdit.Color  := Page_Color_Alternative2;
  188.  WizardForm.UserInfoOrgEdit.Color  := Page_Color_Alternative2;
  189.  WizardForm.UserInfoSerialEdit.Color  := Page_Color_Alternative2;
  190.  
  191.  
  192.  // Controls (Font Color)
  193.  WizardForm.FinishedHeadingLabel.font.color  := Font_Color;
  194.  WizardForm.InfoafterMemo.font.Color  := Font_Color;
  195.  WizardForm.FinishedLabel.font.color  := Font_Color;
  196.  WizardForm.DirEdit.font.Color  := Page_Color_Alternative1;
  197.  WizardForm.Font.color := Font_Color;
  198.  WizardForm.GroupEdit.font.Color  := Page_Color_Alternative1;
  199.  WizardForm.InfoBeforeMemo.font.Color  := Page_Color_Alternative1;
  200.  WizardForm.LicenseMemo.font.Color  := Page_Color_Alternative1;
  201.  WizardForm.MainPanel.font.Color := Font_Color;
  202.  WizardForm.PageDescriptionLabel.font.color  := Font_Color;
  203.  WizardForm.PageNameLabel.font.color  := Font_Color;
  204.  WizardForm.PasswordEdit.font.Color  := Page_Color_Alternative1;
  205.  WizardForm.Taskslist.font.Color  := Font_Color;
  206.  WizardForm.UserInfoNameEdit.font.Color  := Page_Color_Alternative1;
  207.  WizardForm.UserInfoOrgEdit.font.Color  := Page_Color_Alternative1;
  208.  WizardForm.UserInfoSerialEdit.font.Color  := Page_Color_Alternative1;
  209.  WizardForm.WelcomeLabel1.font.color  := Font_Color;
  210.  WizardForm.WelcomeLabel2.font.color  := Font_Color;
  211.  WizardForm.ReadyMemo.font.Color := Page_Color_Alternative1;
  212.  
  213. end;


Este es el aspecto por defecto:




Y se puede customizar un poco el aspecto para conseguir algo parecido a esto, sólamente cambiando las variables de la plantilla...

[/code]


« Última modificación: 17 Abril 2013, 13:30 pm por EleKtro H@cker » En línea



Páginas: [1] Ir Arriba Respuesta Imprimir 

Ir a:  

Mensajes similares
Asunto Iniciado por Respuestas Vistas Último mensaje
Traduciendo Inno Setup
Programación Visual Basic
karmany 2 3,245 Último mensaje 16 Enero 2006, 19:23 pm
por Kizar
Tutorial de Inno Setup 5.1.8
Programación General
karmany 4 10,422 Último mensaje 19 Mayo 2014, 20:04 pm
por tom1260
Inno Setup Compiler + Visual Basic 6.0
Programación Visual Basic
renga73 2 4,279 Último mensaje 22 Febrero 2008, 16:25 pm
por karmany
[BATCH] (Aporte) Script para cortar videos MKV de forma masiva.
Scripting
Eleкtro 0 3,669 Último mensaje 14 Enero 2012, 18:05 pm
por Eleкtro
La app para presentar el IRPF,disponible a partir de este jueves:¿cómo usarla..
Noticias
wolfbcn 0 1,571 Último mensaje 14 Marzo 2018, 21:40 pm
por wolfbcn
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines