Skip to content

Commit

Permalink
Fix coding ISS file
Browse files Browse the repository at this point in the history
  • Loading branch information
panther7 committed Dec 27, 2022
1 parent 8188601 commit f20cb99
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
4 changes: 2 additions & 2 deletions WingetUI.iss
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
; Script generated by the Inno Setup Script Wizard.
; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!

#define MyAppName "WingetUI"
#define MyAppVersion "1.5.2"
#define MyAppPublisher "Martí Climent"
#define MyAppPublisher "Martí Climent"
#define MyAppURL "https://github.com/marticliment/WingetUI"
#define MyAppExeName "WingetUI.exe"

Expand Down
11 changes: 6 additions & 5 deletions apply_versions.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
import sys,os
import sys

try:

sys.path.append("wingetui")

from versions import *


def fileReplaceLinesWith(filename: str, list: dict[str, str]):
f = open(filename, "r+", encoding="utf-8", errors="ignore")
def fileReplaceLinesWith(filename: str, list: dict[str, str], encoding="utf-8"):
f = open(filename, "r+", encoding=encoding, errors="ignore")
data = ""
for line in f.readlines():
match = False
Expand All @@ -27,12 +28,12 @@ def fileReplaceLinesWith(filename: str, list: dict[str, str]):
fileReplaceLinesWith("WingetUI.iss", {
"#define MyAppVersion": f" \"{versionName}\"\n",
"VersionInfoVersion=": f"{versionISS}\n",
})
}, encoding = "utf-8-sig")

fileReplaceLinesWith("wingetui-version-file", {
" StringStruct(u'FileVersion'": f", u'{versionName}'),\n",
" StringStruct(u'ProductVersion'": f", u'{versionName}'),\n",
})
print("donwe!")
print("done!")
except Exception as e:
print(e)

0 comments on commit f20cb99

Please sign in to comment.