| 1 |
#!/bin/bash |
| 2 |
############################################################################### |
| 3 |
# BRLTTY - A background process providing access to the console screen (when in |
| 4 |
# text mode) for a blind person using a refreshable braille display. |
| 5 |
# |
| 6 |
# Copyright (C) 1995-2026 by The BRLTTY Developers. |
| 7 |
# |
| 8 |
# BRLTTY comes with ABSOLUTELY NO WARRANTY. |
| 9 |
# |
| 10 |
# This is free software, placed under the terms of the |
| 11 |
# GNU Lesser General Public License, as published by the Free Software |
| 12 |
# Foundation; either version 2.1 of the License, or (at your option) any |
| 13 |
# later version. Please see the file LICENSE-LGPL for details. |
| 14 |
# |
| 15 |
# Web Page: http://brltty.app/ |
| 16 |
# |
| 17 |
# This software is maintained by Dave Mielke <[email protected]>. |
| 18 |
############################################################################### |
| 19 |
|
| 20 |
. "`dirname "${0}"`/mk-prologue.sh" |
| 21 |
windowsDirectory="${sourceRoot}/Windows" |
| 22 |
. "${windowsDirectory}/mingw64.sh" |
| 23 |
|
| 24 |
readonly defaultUsbPackageNames=( libusb libusb-1.0 ) |
| 25 |
|
| 26 |
showProgramUsageNotes() { |
| 27 |
cat <<END_OF_PROGRAM_USAGE_NOTES |
| 28 |
The positional parameters are the names of USB packages. If none are |
| 29 |
specified, the default is: ${defaultUsbPackageNames[*]} |
| 30 |
END_OF_PROGRAM_USAGE_NOTES |
| 31 |
} |
| 32 |
|
| 33 |
processExtraProgramParameters() { |
| 34 |
[ "${#}" -gt 0 ] || set -- "${defaultUsbPackageNames[@]}" |
| 35 |
usbPackageNames=( "${@}" ) |
| 36 |
} |
| 37 |
|
| 38 |
optionalProgramParameters |
| 39 |
parseProgramArguments "${@}" |
| 40 |
|
| 41 |
mkIgnoreMismatch "^mkwin64: revision identifier: " |
| 42 |
mkIgnoreMismatch "^ *Creating library " |
| 43 |
mkIgnoreMismatch "^Successfully compiled: " |
| 44 |
|
| 45 |
read <"${windowsDirectory}/python-location" pythonLocation || exit "${?}" |
| 46 |
[ -e "${pythonLocation}" ] || logError "Python not found: ${pythonLocation}" |
| 47 |
[ -d "${pythonLocation}" ] || logError "not a directory: ${pythonLocation}" |
| 48 |
|
| 49 |
for usbPackage in "${usbPackageNames[@]}" |
| 50 |
do |
| 51 |
mkPlatformName="win64[${usbPackage}]" |
| 52 |
mkOldLogName="Windows64-${usbPackage}" |
| 53 |
mkNewLogName="${programName}-${usbPackage}" |
| 54 |
mkBuild "${windowsDirectory}/mkwin64" -P "${pythonLocation}" -u "${usbPackage}" -- "${sourceRoot}" |
| 55 |
done |
| 56 |
|
| 57 |
exit 0 |