diff --git a/packages/win_installer/fragment_spelling.iss b/packages/win_installer/fragment_spelling.iss index 331f3eb296..8a5bca5e15 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: skipifsourcedoesntexist ignoreversion; Components: dictionaries/en_US +Source: {#DEPS_DIR}\dictionaries\en_US.dic; DestDir: {app}\dictionaries; Flags: skipifsourcedoesntexist ignoreversion; Components: dictionaries/en_US diff --git a/packages/win_installer/portable/create-portable.ps1 b/packages/win_installer/portable/create-portable.ps1 index 1bb045bed9..0a23ceb223 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\Output\system\DevIL.dll $PortableOutputDir diff --git a/tools/osx-bundle.sh b/tools/osx-bundle.sh index f8d4a682ed..29e0fbfd97 100755 --- a/tools/osx-bundle.sh +++ b/tools/osx-bundle.sh @@ -61,7 +61,14 @@ 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!" + mkdir -p "${BUILD_DIR}/dictionaries" + if ! test -f "${BUILD_DIR}/dictionaries/en_US.aff"; then + echo "Specified dictionary directory ${DICT_DIR} not found. Downloading 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" + fi + 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 ae1457e960..ca46d88863 100644 --- a/tools/win-installer-setup.ps1 +++ b/tools/win-installer-setup.ps1 @@ -81,7 +81,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