Files for create build

This commit is contained in:
Данил 2022-12-16 23:18:29 +03:00
parent f52d082e60
commit 7190223458
6 changed files with 321 additions and 0 deletions

BIN
winres/icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

60
winres/winres.json Normal file
View file

@ -0,0 +1,60 @@
{
"RT_GROUP_ICON": {
"APP": {
"0000": [
"icon.png"
]
}
},
"RT_MANIFEST": {
"#1": {
"0409": {
"identity": {
"name": "EveryNasa",
"version": "2.0"
},
"description": "Automatic space wallpaper from Nasa",
"minimum-os": "win10",
"execution-level": "",
"ui-access": false,
"auto-elevate": false,
"dpi-awareness": "system",
"disable-theming": false,
"disable-window-filtering": false,
"high-resolution-scrolling-aware": false,
"ultra-high-resolution-scrolling-aware": false,
"long-path-aware": false,
"printer-driver-isolation": false,
"gdi-scaling": false,
"segment-heap": false,
"use-common-controls-v6": false
}
}
},
"RT_VERSION": {
"#1": {
"0000": {
"fixed": {
"file_version": "2.0",
"product_version": "2.0"
},
"info": {
"0409": {
"Comments": "",
"CompanyName": "Redume",
"FileDescription": "",
"FileVersion": "2.0",
"InternalName": "EveryNasa",
"LegalCopyright": "Redume",
"LegalTrademarks": "",
"OriginalFilename": "EveryNasa.exe",
"PrivateBuild": "",
"ProductName": "EveryNasa",
"ProductVersion": "2.0",
"SpecialBuild": ""
}
}
}
}
}
}

49
wix.json Normal file
View file

@ -0,0 +1,49 @@
{
"product": "EveryNasa",
"company": "Redume",
"license": "LICENSE",
"upgrade-code": "4165e562-ab60-4ac2-b27b-df2d62548dd9",
"files": {
"guid": "c68b679d-8199-4036-8ead-d509fad132c8",
"items": [
"EveryNasa.exe"
]
},
"directories": [
"api",
"web",
"functions"
],
"env": {
"guid": "24554370-7366-4725-8509-7aebb35da25a",
"vars": [
{
"name": "PATH",
"value": "[INSTALLDIR]",
"permanent": "no",
"system": "no",
"action": "set",
"part": "last"
}
]
},
"shortcuts": {
"guid": "f2fb0dac-ddda-4c8e-bba4-3eb377150cde",
"items": [
{
"name": "EveryNasa",
"description": "Automatic space wallpaper from Nasa",
"target": "[INSTALLDIR]EveryNasa.exe",
"wdir": "INSTALLDIR",
"arguments": "",
"icon": "web/static/image/icons/icon.ico"
}
]
},
"choco": {
"description": "Automatic space wallpaper from Nasa",
"project-url": "https://github.com/Redume/EveryNasa",
"tags": "Wallpaper, Nasa, go, auto-wallpaper",
"license-url": "https://github.com/Redume/EveryNasa/blob/main/LICENSE"
}
}

View file

@ -0,0 +1,35 @@
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Fragment>
<UI>
<Dialog Id="LicenseAgreementDlg_HK" Width="370" Height="270" Title="!(loc.LicenseAgreementDlg_Title)">
<Control Id="LicenseAcceptedCheckBox" Type="CheckBox" X="20" Y="207" Width="330" Height="18" CheckBoxValue="1" Property="LicenseAccepted" Text="!(loc.LicenseAgreementDlgLicenseAcceptedCheckBox)" />
<Control Id="Back" Type="PushButton" X="180" Y="243" Width="56" Height="17" Text="!(loc.WixUIBack)" />
<Control Id="Next" Type="PushButton" X="236" Y="243" Width="56" Height="17" Default="yes" Text="!(loc.WixUINext)">
<Publish Event="SpawnWaitDialog" Value="WaitForCostingDlg">CostingComplete = 1</Publish>
<Condition Action="disable">
<![CDATA[LicenseAccepted <> "1"]]>
</Condition>
<Condition Action="enable">LicenseAccepted = "1"</Condition>
</Control>
<Control Id="Cancel" Type="PushButton" X="304" Y="243" Width="56" Height="17" Cancel="yes" Text="!(loc.WixUICancel)">
<Publish Event="SpawnDialog" Value="CancelDlg">1</Publish>
</Control>
<Control Id="BannerBitmap" Type="Bitmap" X="0" Y="0" Width="370" Height="44" TabSkip="no" Text="!(loc.LicenseAgreementDlgBannerBitmap)" />
<Control Id="LicenseText" Type="ScrollableText" X="20" Y="60" Width="330" Height="140" Sunken="yes" TabSkip="no">
{{if gt (.License | len) 0}}
<Text SourceFile="{{.License}}" />
{{end}}
</Control>
<Control Id="Print" Type="PushButton" X="112" Y="243" Width="56" Height="17" Text="!(loc.WixUIPrint)">
<Publish Event="DoAction" Value="WixUIPrintEula">1</Publish>
</Control>
<Control Id="BannerLine" Type="Line" X="0" Y="44" Width="370" Height="0" />
<Control Id="BottomLine" Type="Line" X="0" Y="234" Width="370" Height="0" />
<Control Id="Description" Type="Text" X="25" Y="23" Width="340" Height="15" Transparent="yes" NoPrefix="yes" Text="!(loc.LicenseAgreementDlgDescription)" />
<Control Id="Title" Type="Text" X="15" Y="6" Width="200" Height="15" Transparent="yes" NoPrefix="yes" Text="!(loc.LicenseAgreementDlgTitle)" />
</Dialog>
</UI>
</Fragment>
</Wix>

62
wix/WixUI_HK.wxs Normal file
View file

@ -0,0 +1,62 @@
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Fragment>
<UI Id="WixUI_HK">
<TextStyle Id="WixUI_Font_Normal" FaceName="Tahoma" Size="8" />
<TextStyle Id="WixUI_Font_Bigger" FaceName="Tahoma" Size="12" />
<TextStyle Id="WixUI_Font_Title" FaceName="Tahoma" Size="9" Bold="yes" />
<Property Id="DefaultUIFont" Value="WixUI_Font_Normal" />
<Property Id="WixUI_Mode" Value="InstallDir" />
<DialogRef Id="BrowseDlg" />
<DialogRef Id="DiskCostDlg" />
<DialogRef Id="ErrorDlg" />
<DialogRef Id="FatalError" />
<DialogRef Id="FilesInUse" />
<DialogRef Id="MsiRMFilesInUse" />
<DialogRef Id="PrepareDlg" />
<DialogRef Id="ProgressDlg" />
<DialogRef Id="ResumeDlg" />
<DialogRef Id="UserExit" />
<!-- Make sure to include custom dialogs in the installer database via a DialogRef command,
especially if they are not included explicitly in the publish chain below -->
<DialogRef Id="LicenseAgreementDlg_HK" />
<Publish Dialog="BrowseDlg" Control="OK" Event="DoAction" Value="WixUIValidatePath" Order="3">1</Publish>
<Publish Dialog="BrowseDlg" Control="OK" Event="SpawnDialog" Value="InvalidDirDlg" Order="4">
<![CDATA[WIXUI_INSTALLDIR_VALID<>"1"]]>
</Publish>
<Publish Dialog="ExitDialog" Control="Finish" Event="EndDialog" Value="Return" Order="999">1</Publish>
<Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog" {{if gt (.License | len) 0}} Value="LicenseAgreementDlg_HK" {{else}} Value="InstallDirDlg" {{end}}>NOT Installed</Publish>
<Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog" Value="VerifyReadyDlg">Installed AND PATCH</Publish>
<Publish Dialog="LicenseAgreementDlg_HK" Control="Back" Event="NewDialog" Value="WelcomeDlg">1</Publish>
<Publish Dialog="LicenseAgreementDlg_HK" Control="Next" Event="NewDialog" Value="InstallDirDlg">LicenseAccepted = "1"</Publish>
<Publish Dialog="InstallDirDlg" Control="Back" Event="NewDialog" Value="LicenseAgreementDlg_HK">1</Publish>
<Publish Dialog="InstallDirDlg" Control="Next" Event="SetTargetPath" Value="[WIXUI_INSTALLDIR]" Order="1">1</Publish>
<Publish Dialog="InstallDirDlg" Control="Next" Event="DoAction" Value="WixUIValidatePath" Order="2">NOT WIXUI_DONTVALIDATEPATH</Publish>
<Publish Dialog="InstallDirDlg" Control="Next" Event="SpawnDialog" Value="InvalidDirDlg" Order="3">
<![CDATA[NOT WIXUI_DONTVALIDATEPATH AND WIXUI_INSTALLDIR_VALID<>"1"]]>
</Publish>
<Publish Dialog="InstallDirDlg" Control="Next" Event="NewDialog" Value="VerifyReadyDlg" Order="4">WIXUI_DONTVALIDATEPATH OR WIXUI_INSTALLDIR_VALID="1"</Publish>
<Publish Dialog="InstallDirDlg" Control="ChangeFolder" Property="_BrowseProperty" Value="[WIXUI_INSTALLDIR]" Order="1">1</Publish>
<Publish Dialog="InstallDirDlg" Control="ChangeFolder" Event="SpawnDialog" Value="BrowseDlg" Order="2">1</Publish>
<Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="MaintenanceTypeDlg" Order="2">Installed</Publish>
<Publish Dialog="MaintenanceWelcomeDlg" Control="Next" Event="NewDialog" Value="MaintenanceTypeDlg">1</Publish>
<Publish Dialog="MaintenanceTypeDlg" Control="RepairButton" Event="NewDialog" Value="VerifyReadyDlg">1</Publish>
<Publish Dialog="MaintenanceTypeDlg" Control="RemoveButton" Event="NewDialog" Value="VerifyReadyDlg">1</Publish>
<Publish Dialog="MaintenanceTypeDlg" Control="Back" Event="NewDialog" Value="MaintenanceWelcomeDlg">1</Publish>
</UI>
<UIRef Id="WixUI_Common" />
</Fragment>
</Wix>

115
wix/product.wxs Normal file
View file

@ -0,0 +1,115 @@
<?xml version="1.0"?>
<?if $(sys.BUILDARCH)="x86" ?>
<?define Program_Files="ProgramFilesFolder" ?>
<?elseif $(sys.BUILDARCH)="x64" ?>
<?define Program_Files="ProgramFiles64Folder" ?>
<?else ?>
<?error Unsupported value of sys.BUILDARCH=$(sys.BUILDARCH) ?>
<?endif ?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Id="*" UpgradeCode="{{.UpgradeCode}}" Name="{{.Product}}" Version="{{.VersionOk}}" Manufacturer="{{.Company}}" Language="1033">
<Package InstallerVersion="200" Compressed="yes" Comments="Windows Installer Package" InstallScope="perMachine" />
<Media Id="1" Cabinet="product.cab" EmbedCab="yes" />
<Upgrade Id="{{.UpgradeCode}}">
<UpgradeVersion Minimum="{{.VersionOk}}" OnlyDetect="yes" Property="NEWERVERSIONDETECTED" />
<UpgradeVersion Minimum="0.0.0" Maximum="{{.VersionOk}}" IncludeMinimum="yes" IncludeMaximum="no" Property="OLDERVERSIONBEINGUPGRADED" />
</Upgrade>
<Condition Message="A newer version of this software is already installed.">NOT NEWERVERSIONDETECTED</Condition>
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="$(var.Program_Files)">
<Directory Id="INSTALLDIR" Name="{{.Product}}">
{{if gt (.Files.Items | len) 0}}
<Component Id="ApplicationFiles" Guid="{{.Files.GUID}}">
{{range $i, $e := .Files.Items}}
<File Id="ApplicationFile{{$i}}" Source="{{$e}}" />
{{end}}
</Component>
{{end}}
{{if gt (.Directories | len) 0}}
{{range $i, $e := .Directories}}
<Directory Id="APPDIR{{$i}}" Name="{{$e}}" />
{{end}}
{{end}}
</Directory>
</Directory>
{{if gt (.Env.Vars | len) 0}}
<Component Id="ENVS" Guid="{{.Env.GUID}}">
{{range $i, $e := .Env.Vars}}
<Environment Id="ENV{{$i}}" Name="{{$e.Name}}" Value="{{$e.Value}}" Permanent="{{$e.Permanent}}" Part="{{$e.Part}}" Action="{{$e.Action}}" System="{{$e.System}}" />
{{end}}
</Component>
{{end}}
{{if gt (.Shortcuts.Items | len) 0}}
<Directory Id="ProgramMenuFolder">
<Directory Id="ProgramMenuSubfolder" Name="{{.Product}}">
<Component Id="ApplicationShortcuts" Guid="{{.Shortcuts.GUID}}">
{{range $i, $e := .Shortcuts.Items}}
<Shortcut Id="ApplicationShortcut{{$i}}" Name="{{$e.Name}}" Description="{{$e.Description}}" Target="{{$e.Target}}" WorkingDirectory="{{$e.WDir}}" {{if gt ($e.Arguments | len) 0}} Arguments="{{$e.Arguments}}" {{end}}>
{{if gt ($e.Icon | len) 0}}
<Icon Id="Icon{{$i}}" SourceFile="{{$e.Icon}}" />
{{end}}
</Shortcut>
<RegistryValue Root="HKCU" Key="Software\{{$.Company}}\{{$.Product}}" Name="installed{{$i}}" Type="integer" Value="1" KeyPath="yes" />
{{end}}
<RemoveFolder Id="ProgramMenuSubfolder" On="uninstall" />
</Component>
</Directory>
</Directory>
{{end}}
</Directory>
{{range $i, $e := .InstallHooks}}
<SetProperty Id="CustomInstallExec{{$i}}" Value="{{$e.CookedCommand}}" Before="CustomInstallExec{{$i}}" Sequence="execute" />
<CustomAction Id="CustomInstallExec{{$i}}" BinaryKey="WixCA" DllEntry="WixQuietExec" Execute="deferred" Return="check" Impersonate="no" />
{{end}}
{{range $i, $e := .UninstallHooks}}
<SetProperty Id="CustomUninstallExec{{$i}}" Value="{{$e.CookedCommand}}" Before="CustomUninstallExec{{$i}}" Sequence="execute" />
<CustomAction Id="CustomUninstallExec{{$i}}" BinaryKey="WixCA" DllEntry="WixQuietExec" Execute="deferred" Return="check" Impersonate="no" />
{{end}}
<InstallExecuteSequence>
<RemoveExistingProducts After="InstallValidate" />
{{range $i, $e := .InstallHooks}}
<Custom Action="CustomInstallExec{{$i}}" After="{{if eq $i 0}}InstallFiles{{else}}CustomInstallExec{{dec $i}}{{end}}">NOT Installed AND NOT REMOVE</Custom>
{{end}}
{{range $i, $e := .UninstallHooks}}
<Custom Action="CustomUninstallExec{{$i}}" After="{{if eq $i 0}}InstallInitialize{{else}}CustomUninstallExec{{dec $i}}{{end}}">REMOVE ~= "ALL"</Custom>
{{end}}
</InstallExecuteSequence>
<Feature Id="DefaultFeature" Level="1">
{{if gt (.Env.Vars | len) 0}}
<ComponentRef Id="ENVS" />
{{end}}
{{if gt (.Files.Items | len) 0}}
<ComponentRef Id="ApplicationFiles" />
{{end}}
{{if gt (.Shortcuts.Items | len) 0}}
<ComponentRef Id="ApplicationShortcuts" />
{{end}}
{{range $i, $e := .Directories}}
<ComponentGroupRef Id="AppFiles{{$i}}" />
{{end}}
</Feature>
<UI>
<!-- Define the installer UI -->
<UIRef Id="WixUI_HK" />
</UI>
<Property Id="WIXUI_INSTALLDIR" Value="INSTALLDIR" />
<!-- this should help to propagate env var changes -->
<CustomActionRef Id="WixBroadcastEnvironmentChange" />
</Product>
</Wix>