Initial commit: proyecto ContabilidadSaPolar completo
This commit is contained in:
@@ -0,0 +1,157 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
|
||||
|
||||
<!-- Product definition -->
|
||||
<Product
|
||||
Id="*"
|
||||
Name="Sa Polar"
|
||||
Language="1034"
|
||||
Version="$(var.ProductVersion)"
|
||||
Manufacturer="Sa Polar SL"
|
||||
UpgradeCode="A1B2C3D4-E5F6-7890-ABCD-EF1234567890">
|
||||
|
||||
<Package
|
||||
InstallerVersion="500"
|
||||
Compressed="yes"
|
||||
InstallScope="perMachine"
|
||||
Manufacturer="Sa Polar SL"
|
||||
Description="Sa Polar - Sistema de gestion de alquileres"
|
||||
Platform="x64"
|
||||
Comments="Sa Polar v$(var.ProductVersion)"
|
||||
Keywords="instalador,sapolar,alquileres"
|
||||
Languages="1034" />
|
||||
|
||||
<!-- Upgrade configuration -->
|
||||
<MajorUpgrade
|
||||
DowngradeErrorMessage="!(loc.DowngradeError)"
|
||||
AllowDowngrades="no"
|
||||
Schedule="afterInstallValidate" />
|
||||
|
||||
<!-- Media -->
|
||||
<Media Id="1" Cabinet="SaPolar.cab" EmbedCab="yes" CompressionLevel="high" />
|
||||
|
||||
<!-- Properties -->
|
||||
<Property Id="ARPPRODUCTICON" Value="SaPolarIcon.exe" />
|
||||
<Property Id="ARPCONTACT" Value="Soporte Sa Polar" />
|
||||
<Property Id="ARPURLINFOABOUT" Value="https://sapolar.example.com" />
|
||||
<Property Id="ARPHELPLINK" Value="https://sapolar.example.com/soporte" />
|
||||
<Property Id="ApplicationFolderName" Value="SaPolar" />
|
||||
<Property Id="WixAppFolder" Value="WixPerMachineFolder" />
|
||||
|
||||
<!-- Conditions -->
|
||||
<Condition Message="!(loc.Requires64Bit)">
|
||||
VersionNT64
|
||||
</Condition>
|
||||
<Condition Message="!(loc.RequiresWindows10OrLater)">
|
||||
(VersionNT >= 603)
|
||||
</Condition>
|
||||
|
||||
<!-- Directory structure -->
|
||||
<Directory Id="TARGETDIR" Name="SourceDir">
|
||||
<Directory Id="ProgramFiles64Folder">
|
||||
<Directory Id="INSTALLDIR" Name="SaPolar">
|
||||
<Directory Id="SCRIPTSDIR" Name="scripts" />
|
||||
</Directory>
|
||||
</Directory>
|
||||
|
||||
<!-- Start Menu -->
|
||||
<Directory Id="ProgramMenuFolder">
|
||||
<Directory Id="StartMenuDir" Name="Sa Polar" />
|
||||
</Directory>
|
||||
|
||||
<!-- Desktop -->
|
||||
<Directory Id="DesktopFolder" />
|
||||
</Directory>
|
||||
|
||||
<!-- Components in INSTALLDIR -->
|
||||
<DirectoryRef Id="INSTALLDIR">
|
||||
<Component Id="cmpDockerCompose" Guid="D4E5F6A7-B8C9-0123-DEF1-234567890123" Win64="yes">
|
||||
<File Id="fileDockerCompose" Source="..\docker-compose.yml" />
|
||||
</Component>
|
||||
|
||||
<Component Id="cmpEnvExample" Guid="E5F6A7B8-C9D0-1234-EF12-345678901234" Win64="yes">
|
||||
<File Id="fileEnvExample" Source="..\.env.example" />
|
||||
</Component>
|
||||
|
||||
<Component Id="cmpInitSql" Guid="F6A7B8C9-D0E1-2345-F123-456789012345" Win64="yes">
|
||||
<File Id="fileInitSql" Source="..\db\init.sql" />
|
||||
</Component>
|
||||
|
||||
<Component Id="cmpBackendDockerfile" Guid="A7B8C9D0-E1F2-3456-7890-123456789abc" Win64="yes">
|
||||
<File Id="fileBackendDockerfile" Source="..\Dockerfile.backend" />
|
||||
</Component>
|
||||
|
||||
<Component Id="cmpFrontendDockerfile" Guid="C9D0E1F2-A3B4-5678-9012-3456789abcde" Win64="yes">
|
||||
<File Id="fileFrontendDockerfile" Source="..\Dockerfile.frontend" />
|
||||
</Component>
|
||||
</DirectoryRef>
|
||||
|
||||
<!-- Components in SCRIPTSDIR -->
|
||||
<DirectoryRef Id="SCRIPTSDIR">
|
||||
<Component Id="cmpManageServices" Guid="B2C3D4E5-F6A7-8901-BCDE-F12345678901" Win64="yes">
|
||||
<File Id="fileManageServices" Source="..\installer\scripts\manage-services.ps1" />
|
||||
</Component>
|
||||
<Component Id="cmpUninstall" Guid="C3D4E5F6-A7B8-9012-CDEF-123456789013" Win64="yes">
|
||||
<File Id="fileUninstall" Source="..\installer\scripts\uninstall.ps1" />
|
||||
</Component>
|
||||
</DirectoryRef>
|
||||
|
||||
<!-- Start Menu shortcuts -->
|
||||
<DirectoryRef Id="StartMenuDir">
|
||||
<Component Id="cmpShortcutsStartMenu" Guid="D0E1F2A3-B4C5-6789-0123-456789abcdef" Win64="yes">
|
||||
<Shortcut Id="shortcutWebApp" Name="Sa Polar - Panel" Description="Abrir panel de administracion" Target="[System64Folder]cmd.exe" Arguments="/c start http://localhost:3000" WorkingDirectory="INSTALLDIR" />
|
||||
<Shortcut Id="shortcutServices" Name="Sa Polar - Gestor de Servicios" Description="Gestionar servicios Docker" Target="[System64Folder]WindowsPowerShell\v1.0\powershell.exe" Arguments="-NoExit -ExecutionPolicy Bypass -File "[SCRIPTSDIR]manage-services.ps1" -Action status" WorkingDirectory="INSTALLDIR" />
|
||||
<RemoveFolder Id="removeStartMenuDir" On="uninstall" />
|
||||
<RegistryValue Root="HKCU" Key="Software\SaPolar" Name="installed" Type="integer" Value="1" />
|
||||
</Component>
|
||||
</DirectoryRef>
|
||||
|
||||
<!-- Desktop shortcut -->
|
||||
<DirectoryRef Id="DesktopFolder">
|
||||
<Component Id="cmpShortcutDesktop" Guid="E1F2A3B4-C5D6-7890-1234-56789abcdef0" Win64="yes">
|
||||
<Shortcut Id="shortcutDesktop" Name="Sa Polar" Description="Abrir Sa Polar" Target="[System64Folder]cmd.exe" Arguments="/c start http://localhost:3000" WorkingDirectory="INSTALLDIR" />
|
||||
<RegistryValue Root="HKCU" Key="Software\SaPolar" Name="desktop_shortcut" Type="integer" Value="1" />
|
||||
</Component>
|
||||
</DirectoryRef>
|
||||
|
||||
<!-- Features -->
|
||||
<Feature Id="FeatureCore" Title="Sa Polar - Nucleo" Level="1" Description="Archivos principales del sistema">
|
||||
<ComponentRef Id="cmpDockerCompose" />
|
||||
<ComponentRef Id="cmpEnvExample" />
|
||||
<ComponentRef Id="cmpInitSql" />
|
||||
<ComponentRef Id="cmpBackendDockerfile" />
|
||||
<ComponentRef Id="cmpFrontendDockerfile" />
|
||||
<ComponentRef Id="cmpManageServices" />
|
||||
<ComponentRef Id="cmpUninstall" />
|
||||
</Feature>
|
||||
|
||||
<Feature Id="FeatureShortcuts" Title="Accesos directos" Level="1" Description="Accesos directos en Inicio y escritorio">
|
||||
<ComponentRef Id="cmpShortcutsStartMenu" />
|
||||
<ComponentRef Id="cmpShortcutDesktop" />
|
||||
</Feature>
|
||||
|
||||
<!-- UI -->
|
||||
<UI Id="SaPolarUI">
|
||||
<UIRef Id="WixUI_InstallDir" />
|
||||
<Publish Dialog="ExitDialog" Control="Finish" Event="SetProgress" Value="100">1</Publish>
|
||||
</UI>
|
||||
|
||||
<Property Id="WIXUI_INSTALLDIR" Value="INSTALLDIR" />
|
||||
|
||||
<!-- Custom actions -->
|
||||
<CustomAction Id="caDockerComposeUp" Directory="INSTALLDIR" Execute="deferred" Impersonate="no" Return="ignore"
|
||||
ExeCommand=""[System64Folder]WindowsPowerShell\v1.0\powershell.exe" -ExecutionPolicy Bypass -Command "docker compose up -d --remove-orphans 2>&1"" />
|
||||
|
||||
<CustomAction Id="caDockerComposeDown" Directory="INSTALLDIR" Execute="deferred" Impersonate="no" Return="ignore"
|
||||
ExeCommand=""[System64Folder]WindowsPowerShell\v1.0\powershell.exe" -ExecutionPolicy Bypass -Command "docker compose down -v 2>&1"" />
|
||||
|
||||
<InstallExecuteSequence>
|
||||
<Custom Action="caDockerComposeUp" After="InstallFiles">NOT Installed</Custom>
|
||||
<Custom Action="caDockerComposeDown" Before="RemoveFiles">(REMOVE = "ALL")</Custom>
|
||||
</InstallExecuteSequence>
|
||||
|
||||
<!-- Icon -->
|
||||
<Icon Id="SaPolarIcon.exe" SourceFile="..\installer\assets\sa-polar.ico" />
|
||||
|
||||
</Product>
|
||||
</Wix>
|
||||
Reference in New Issue
Block a user