File tree Expand file tree Collapse file tree 5 files changed +11
-14
lines changed
NVDA-addon/addon/globalPlugins/MathCAT Expand file tree Collapse file tree 5 files changed +11
-14
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 11{
22 "cSpell.words" : [
33 " libmathcat" ,
4+ " Nemeth" ,
45 " Placemarker" ,
6+ " prefs" ,
57 " pyfunction" ,
68 " pymodule" ,
9+ " sconstruct" ,
710 " SSML"
811 ]
912}
Original file line number Diff line number Diff line change 88###########################################################################
99
1010import wx
11- #import wx.xrc
11+ # import wx.xrc
1212
1313import gettext
1414_ = gettext .gettext
Original file line number Diff line number Diff line change 11#! /bin/csh
22# RUN THIS FILE to build the NVDA addon
33
4+ rm -rf NVDA-addon/addon/globalPlugins/MathCAT/Rules
45cargo build --target i686-pc-windows-msvc --release
56
67cp target/i686-pc-windows-msvc/release/libmathcat_py.dll NVDA-addon/addon/globalPlugins/MathCAT/libmathcat.pyd
78cd NVDA-addon
9+ sed ' s/^import wx\.xrc/# import wx.xrc/' --in-place " addon/globalPlugins/MathCAT/MathCATgui.py"
810rm MathCAT-* .nvda-addon
911scons
10-
Original file line number Diff line number Diff line change 11//! The build.rs file is necessary to unzip the rules.
22//! rules.zip are needed so there is a way to get the rules dir into the build since you can't get it from the crate.
33//!
4- //! Note: this only creates the Rules dir. Run build-addon.sh to actually build the addon.
4+ //! Note: this only creates the Rules dir. Run build-addon.sh to actually build the NVDA addon.
55
66use std:: path:: PathBuf ;
77use zip:: ZipArchive ;
88
99fn main ( ) {
10- // first remove the Rules directory
11- std:: fs:: remove_dir_all ( "NVDA-addon/addon/globalPlugins/MathCAT/Rules" )
12- . expect ( "Failed to remove directory 'NVDA-addon/addon/globalPlugins/MathCAT/Rules'" ) ;
1310 let archive = libmathcat:: ZIPPED_RULE_FILES ;
1411 let archive = std:: io:: Cursor :: new ( archive) ;
1512 let location = PathBuf :: from ( "NVDA-addon/addon/globalPlugins/MathCAT" ) ;
@@ -18,6 +15,8 @@ fn main() {
1815 zip_archive. extract ( & location) . expect ( "Zip extraction failed" ) ;
1916
2017 // the test dir 'zz' doesn't need to be part of the addon
21- std:: fs:: remove_dir_all ( "NVDA-addon/addon/globalPlugins/MathCAT/Rules/Languages/zz" )
22- . expect ( "Failed to remove directory 'NVDA-addon/addon/globalPlugins/MathCAT/Rules/zz'" ) ;
18+ let mut zz_dir = location. clone ( ) ;
19+ zz_dir. push ( "Rules/Languages/zz" ) ;
20+ std:: fs:: remove_dir_all ( & zz_dir)
21+ . expect ( & format ! ( "Failed to remove directory {}" , zz_dir. to_str( ) . unwrap( ) ) ) ;
2322}
You can’t perform that action at this time.
0 commit comments