diff --git a/packages/win_installer/fragment_spelling.iss b/packages/win_installer/fragment_spelling.iss index 331f3eb29..8e4168727 100644 --- a/packages/win_installer/fragment_spelling.iss +++ b/packages/win_installer/fragment_spelling.iss @@ -1,5 +1,5 @@ ; This file declares all installables related to spell checking and thesaurii in Aegisub [Files] -Source: {#DEPS_DIR}\dictionaries\en_US.aff; DestDir: {app}\dictionaries; Flags: skipifsourcedoesntexist ignoreversion -Source: {#DEPS_DIR}\dictionaries\en_US.dic; DestDir: {app}\dictionaries; Flags: skipifsourcedoesntexist ignoreversion +Source: {#DEPS_DIR}\dictionaries\en_US.aff; DestDir: {app}\dictionaries; Flags: ignoreversion; Components: dictionaries/en_US +Source: {#DEPS_DIR}\dictionaries\en_US.dic; DestDir: {app}\dictionaries; Flags: ignoreversion; Components: dictionaries/en_US diff --git a/packages/win_installer/portable/create-portable.ps1 b/packages/win_installer/portable/create-portable.ps1 index 4f4717bfe..83c956e95 100644 --- a/packages/win_installer/portable/create-portable.ps1 +++ b/packages/win_installer/portable/create-portable.ps1 @@ -51,6 +51,9 @@ Copy-New-Item $InstallerDir\bin\aegisub.exe $PortableOutputDir Write-Output 'Copying - translations' Copy-New-Items "$InstallerDir\share\locale\*" "$PortableOutputDir\locale" -Recurse +Write-Output 'Copying - dictionaries' +Copy-New-Item $InstallerDepsDir\dictionaries\en_US.aff $PortableOutputDir\dictionaries +Copy-New-Item $InstallerDepsDir\dictionaries\en_US.dic $PortableOutputDir\dictionaries Write-Output 'Copying - codecs' Write-Output 'Copying - codecs\Avisynth' Copy-New-Item $InstallerDepsDir\AvisynthPlus64\x64\system\DevIL.dll $PortableOutputDir diff --git a/tools/osx-bundle.sh b/tools/osx-bundle.sh index f8d4a682e..a1563a481 100755 --- a/tools/osx-bundle.sh +++ b/tools/osx-bundle.sh @@ -61,7 +61,12 @@ echo "---- Copying dictionaries ----" if test -f "${DICT_DIR}"; then cp -v "${DICT_DIR}/*" "${PKG_DIR}/Contents/SharedSupport/dictionaries" else - echo "Specified dictionary directory ${DICT_DIR} not found!" + echo "Specified dictionary directory ${DICT_DIR} not found. Downloading dictionaries:" + mkdir "${BUILD_DIR}/dictionaries" + curl -L "https://downloads.sourceforge.net/project/openofficeorg.mirror/contrib/dictionaries/en_US.zip" -o "${BUILD_DIR}/dictionaries/en_US.zip" + unzip "${BUILD_DIR}/dictionaries/en_US.zip" -d "${BUILD_DIR}/dictionaries" + cp -v "${BUILD_DIR}/dictionaries/en_US.aff" "${PKG_DIR}/Contents/SharedSupport/dictionaries" + cp -v "${BUILD_DIR}/dictionaries/en_US.dic" "${PKG_DIR}/Contents/SharedSupport/dictionaries" fi echo diff --git a/tools/win-installer-setup.ps1 b/tools/win-installer-setup.ps1 index 26c2a27ee..f2638ad4b 100644 --- a/tools/win-installer-setup.ps1 +++ b/tools/win-installer-setup.ps1 @@ -79,7 +79,14 @@ if (!(Test-Path VC_redist)) { Invoke-WebRequest https://aka.ms/vs/17/release/VC_redist.x64.exe -OutFile "$redistDir\VC_redist.x64.exe" -UseBasicParsing } -# TODO dictionaries +# dictionaries +if (!(Test-Path dictionaries)) { + New-Item -ItemType Directory dictionaries + [Net.ServicePointManager]::SecurityProtocol = "Tls12" # Needed since otherwise downloading fails in some places like on the GitHub CI: https://stackoverflow.com/a/66614041/4730656 + Invoke-WebRequest https://downloads.sourceforge.net/project/openofficeorg.mirror/contrib/dictionaries/en_US.zip -UserAgent "Wget" -OutFile en_US.zip -UseBasicParsing + Expand-Archive -LiteralPath en_US.zip -DestinationPath dictionaries + Remove-Item en_US.zip +} # localization Set-Location $BuildRoot