fix: msi, custom client, license (#7834)

Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
fufesou 2024-04-26 13:49:53 +08:00 committed by GitHub
parent 9d3c823603
commit 2b3f87d6f2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 16 additions and 1 deletions

View File

@ -16,7 +16,7 @@
<Icon Id="AppIcon" SourceFile="Resources\icon.ico" />
<!-- User Interface -->
<WixVariable Id="WixUILicenseRtf" Value="RustDesk License.rtf" />
<WixVariable Id="WixUILicenseRtf" Value="License.rtf" />
<ui:WixUI Id="WixUI_InstallDir" InstallDirectory="INSTALLFOLDER" />
<UIRef Id="WixUI_ErrorProgressText" />

View File

@ -437,6 +437,19 @@ def init_global_vars(dist_dir, app_name, args):
return True
def update_license_file(app_name):
if app_name == "RustDesk":
return
license_file = Path(sys.argv[0]).parent.joinpath("Package/License.rtf")
with open(license_file, "r") as f:
license_content = f.read()
license_content = license_content.replace("website rustdesk.com and other ", "")
license_content = license_content.replace("RustDesk", app_name)
license_content = re.sub("Purslane Ltd", app_name, license_content, flags=re.IGNORECASE)
with open(license_file, "w") as f:
f.write(license_content)
def replace_component_guids_in_wxs():
langs_dir = Path(sys.argv[0]).parent.joinpath("Package")
for file_path in langs_dir.glob("**/*.wxs"):
@ -466,6 +479,8 @@ if __name__ == "__main__":
if not init_global_vars(dist_dir, app_name, args):
sys.exit(-1)
update_license_file(app_name)
if not gen_pre_vars(args, dist_dir):
sys.exit(-1)