File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- #! /bin/csh
2- # RUN THIS FILE to build the NVDA addon
1+ #! /bin/bash
2+ (set -o igncr) 2> /dev/null && set -o igncr; # comment is needed
3+ PYO3_PYTHON_64=C:/Software/Python/Python313
4+ PYO3_PYTHON_32=C:/Software/Python/Python311-32
5+ STFLAGS=' -C linker=lld'
6+ PYO3_PYTHON=$YO3_PYTHON_32 /python.exe STFLAGS=" $STFLAGS " cargo build --target i686-pc-windows-msvc --release
7+
38
4- rm -rf addon/globalPlugins/MathCAT/Rules
5- # NVDA currently uses 32 bit python 3.7
6- # We need to tell PYO3 that
7- set PYO3_PYTHON_64=C:/Software/Python311
8- set PYO3_PYTHON_32=C:/Software/Python311-32
9- env PYO3_PYTHON=$PYO3_PYTHON_32 /python.exe cargo build --target i686-pc-windows-msvc --release
109cp target/i686-pc-windows-msvc/release/libmathcat_py.dll addon/globalPlugins/MathCAT/libmathcat_py.pyd
10+
1111# for testing
1212cp target/i686-pc-windows-msvc/release/libmathcat_py.dll Example/libmathcat_py.pyd
1313cp -r addon/globalPlugins/MathCAT/Rules Example
1414sed ' s/^import wx\.xrc/# import wx.xrc/' --in-place " addon/globalPlugins/MathCAT/MathCATgui.py"
15- rm MathCAT-* .nvda-addon
15+ rm -f MathCAT-* .nvda-addon
1616
1717# use "pip install SCons" to add scons to the python env
18- $PYO3_PYTHON_32 /Scripts/scons
18+ echo ${PYO3_PYTHON_32}
19+ ${PYO3_PYTHON_32} /Scripts/scons
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ (set -o igncr) 2> /dev/null && set -o igncr; # comment is needed
3+ PYO3_PYTHON_64=C:/Users/neils/AppData/Local/Python/pythoncore-3.13-64
4+ PYO3_PYTHON_32=C:/Software/Python/Python311-32
5+ export PYO3_PYTHON_64 PYO3_PYTHON_32
6+ STFLAGS=' -C linker=lld'
7+ echo " before cargo build"
8+ PYO3_PYTHON=${PYO3_PYTHON_64} /python.exe STFLAGS=" $STFLAGS " cargo build --target x86_64-pc-windows-msvc --release
9+ echo " after cargo build"
10+
11+ echo " before cp target/x86_64-pc-windows-msvc/release/libmathcat_py.dll addon/globalPlugins/MathCAT/libmathcat_py.pyd"
12+
13+ cp target/x86_64-pc-windows-msvc/release/libmathcat_py.dll addon/globalPlugins/MathCAT/libmathcat_py.pyd
14+
15+ # for testing
16+ cp target/x86_64-pc-windows-msvc/release/libmathcat_py.dll Example/libmathcat_py.pyd
17+ cp -r addon/globalPlugins/MathCAT/Rules Example
18+ sed ' s/^import wx\.xrc/# import wx.xrc/' --in-place " addon/globalPlugins/MathCAT/MathCATgui.py"
19+ rm -f MathCAT-* .nvda-addon
20+
21+ # use "pip install SCons" to add scons to the python env
22+ ${PYO3_PYTHON_64} /Scripts/scons
You can’t perform that action at this time.
0 commit comments