Skip to content

Commit

Permalink
ci: add inno setup build file
Browse files Browse the repository at this point in the history
- add inno setup build file
- align localizations definitions
- update .gitignore
  • Loading branch information
leafspark committed Aug 17, 2024
1 parent 52c789e commit f02fcb2
Show file tree
Hide file tree
Showing 3 changed files with 111 additions and 29 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ src/*
docs/*
!docs/*.py

# Allow assets folder, but only .svg, .png, .rc, .css and .ico files
# Allow assets folder, but only .svg, .png, .rc, .css, .iss and .ico files
!assets/
assets/*
!assets/*.svg
Expand All @@ -33,6 +33,7 @@ assets/*
!assets/*.rc
!assets/*.res
!assets/*.css
!assets/*.iss

# Allow .github folder and its contents
!.github/
Expand Down
81 changes: 81 additions & 0 deletions assets/autogguf.iss
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
#define MyAppName "AutoGGUF"
#define MyAppVersion "v1.7.1"
#define MyAppPublisher "leafspark"
#define MyAppURL "https://github.com/leafspark/AutoGGUF"
#define MyAppExeName "AutoGGUF-x64.exe"
#define MyAppAssocName MyAppName + " File"
#define MyAppAssocExt ".gguf"
#define MyAppAssocKey StringChange(MyAppAssocName, " ", "") + MyAppAssocExt

[Setup]
; NOTE: The value of AppId uniquely identifies this application. Do not use the same AppId value in installers for other applications.
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
AppId={{9753D5EB-05A8-489B-86A4-FCE6341FDE0E}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName={autopf}\{#MyAppName}
; "ArchitecturesAllowed=x64compatible" specifies that Setup cannot run
; on anything but x64 and Windows 11 on Arm.
ArchitecturesAllowed=x64compatible
; "ArchitecturesInstallIn64BitMode=x64compatible" requests that the
; install be done in "64-bit mode" on x64 or Windows 11 on Arm,
; meaning it should use the native 64-bit Program Files directory and
; the 64-bit view of the registry.
ArchitecturesInstallIn64BitMode=x64compatible
ChangesAssociations=yes
DisableProgramGroupPage=yes
LicenseFile=F:\autogguf-release\LICENSE.txt
; Remove the following line to run in administrative install mode (install for all users.)
PrivilegesRequired=lowest
PrivilegesRequiredOverridesAllowed=dialog
OutputDir=E:\Downloads\autogguf-inno
OutputBaseFilename=autogguf
Compression=lzma
SolidCompression=yes
WizardStyle=modern

[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"
Name: "brazilianportuguese"; MessagesFile: "compiler:Languages\BrazilianPortuguese.isl"
Name: "dutch"; MessagesFile: "compiler:Languages\Dutch.isl"
Name: "finnish"; MessagesFile: "compiler:Languages\Finnish.isl"
Name: "french"; MessagesFile: "compiler:Languages\French.isl"
Name: "german"; MessagesFile: "compiler:Languages\German.isl"
Name: "hungarian"; MessagesFile: "compiler:Languages\Hungarian.isl"
Name: "italian"; MessagesFile: "compiler:Languages\Italian.isl"
Name: "japanese"; MessagesFile: "compiler:Languages\Japanese.isl"
Name: "korean"; MessagesFile: "compiler:Languages\Korean.isl"
Name: "polish"; MessagesFile: "compiler:Languages\Polish.isl"
Name: "portuguese"; MessagesFile: "compiler:Languages\Portuguese.isl"
Name: "russian"; MessagesFile: "compiler:Languages\Russian.isl"
Name: "spanish"; MessagesFile: "compiler:Languages\Spanish.isl"
Name: "turkish"; MessagesFile: "compiler:Languages\Turkish.isl"
Name: "ukrainian"; MessagesFile: "compiler:Languages\Ukrainian.isl"

[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked

[Files]
Source: "F:\autogguf-release\AutoGGUF-v1.7.1-Windows-avx2-standard\{#MyAppExeName}"; DestDir: "{app}"; Flags: ignoreversion
Source: "F:\autogguf-release\AutoGGUF-v1.7.1-Windows-avx2-standard\src\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
; NOTE: Don't use "Flags: ignoreversion" on any shared system files

[Registry]
Root: HKA; Subkey: "Software\Classes\{#MyAppAssocExt}\OpenWithProgids"; ValueType: string; ValueName: "{#MyAppAssocKey}"; ValueData: ""; Flags: uninsdeletevalue
Root: HKA; Subkey: "Software\Classes\{#MyAppAssocKey}"; ValueType: string; ValueName: ""; ValueData: "{#MyAppAssocName}"; Flags: uninsdeletekey
Root: HKA; Subkey: "Software\Classes\{#MyAppAssocKey}\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\{#MyAppExeName},0"
Root: HKA; Subkey: "Software\Classes\{#MyAppAssocKey}\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\{#MyAppExeName}"" ""%1"""
Root: HKA; Subkey: "Software\Classes\Applications\{#MyAppExeName}\SupportedTypes"; ValueType: string; ValueName: ".myp"; ValueData: ""

[Icons]
Name: "{autoprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
Name: "{autodesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon

[Run]
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent

56 changes: 28 additions & 28 deletions src/Localizations.py
Original file line number Diff line number Diff line change
Expand Up @@ -6071,34 +6071,34 @@ def __init__(self):

# Dictionary to map language codes to classes
_languages = {
"en-US": _English, # American English
"fr-FR": _French, # Metropolitan French
"zh-CN": _SimplifiedChinese, # Simplified Chinese
"es-ES": _Spanish, # Spanish (Spain)
"hi-IN": _Hindi, # Hindi (India)
"ru-RU": _Russian, # Russian (Russia)
"uk-UA": _Ukrainian, # Ukrainian (Ukraine)
"ja-JP": _Japanese, # Japanese (Japan)
"de-DE": _German, # German (Germany)
"pt-BR": _Portuguese, # Portuguese (Brazil)
"ar-SA": _Arabic, # Arabic (Saudi Arabia)
"ko-KR": _Korean, # Korean (Korea)
"it-IT": _Italian, # Italian (Italy)
"tr-TR": _Turkish, # Turkish (Turkey)
"nl-NL": _Dutch, # Dutch (Netherlands)
"fi-FI": _Finnish, # Finnish (Finland)
"bn-BD": _Bengali, # Bengali (Bangladesh)
"cs-CZ": _Czech, # Czech (Czech Republic)
"pl-PL": _Polish, # Polish (Poland)
"ro-RO": _Romanian, # Romanian (Romania)
"el-GR": _Greek, # Greek (Greece)
"pt-PT": _Portuguese_PT, # Portuguese (Portugal)
"hu-HU": _Hungarian, # Hungarian (Hungary)
"en-GB": _BritishEnglish, # British English
"fr-CA": _CanadianFrench, # Canadian French
"en-IN": _IndianEnglish, # Indian English
"en-CA": _CanadianEnglish, # Canadian English
"zh-TW": _TraditionalChinese, # Traditional Chinese (Taiwan)
"en-US": _English, # American English
"fr-FR": _French, # Metropolitan French
"zh-CN": _SimplifiedChinese, # Simplified Chinese
"es-ES": _Spanish, # Spanish (Spain)
"hi-IN": _Hindi, # Hindi (India)
"ru-RU": _Russian, # Russian (Russia)
"uk-UA": _Ukrainian, # Ukrainian (Ukraine)
"ja-JP": _Japanese, # Japanese (Japan)
"de-DE": _German, # German (Germany)
"pt-BR": _Portuguese, # Portuguese (Brazil)
"ar-SA": _Arabic, # Arabic (Saudi Arabia)
"ko-KR": _Korean, # Korean (Korea)
"it-IT": _Italian, # Italian (Italy)
"tr-TR": _Turkish, # Turkish (Turkey)
"nl-NL": _Dutch, # Dutch (Netherlands)
"fi-FI": _Finnish, # Finnish (Finland)
"bn-BD": _Bengali, # Bengali (Bangladesh)
"cs-CZ": _Czech, # Czech (Czech Republic)
"pl-PL": _Polish, # Polish (Poland)
"ro-RO": _Romanian, # Romanian (Romania)
"el-GR": _Greek, # Greek (Greece)
"pt-PT": _Portuguese_PT, # Portuguese (Portugal)
"hu-HU": _Hungarian, # Hungarian (Hungary)
"en-GB": _BritishEnglish, # British English
"fr-CA": _CanadianFrench, # Canadian French
"en-IN": _IndianEnglish, # Indian English
"en-CA": _CanadianEnglish, # Canadian English
"zh-TW": _TraditionalChinese, # Traditional Chinese (Taiwan)
}


Expand Down

0 comments on commit f02fcb2

Please sign in to comment.