File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -703,6 +703,21 @@ pub async fn install(
703703 ) ;
704704 fs:: write ( & interface_path, lines. join ( "\n " ) ) ?;
705705
706+ #[ cfg( target_family = "windows" ) ]
707+ {
708+ println ! ( "Patching extended path issue in RAPT on Windows" ) ;
709+ // On Windows, the RAPT plat.py file has an issue with using extended paths by default.
710+ // This is a problem because Java's classpath does not support them.
711+ // This leads to it not finding the CheckJDK class, leading to an installation failure.
712+ // We crudely patch this by replacing the __file__ variable with a version that removes the extended path prefix.
713+ let plat_path = base_path. join ( "rapt/buildlib/rapt/plat.py" ) ;
714+ let content = fs:: read_to_string ( & plat_path) ?;
715+ fs:: write (
716+ & plat_path,
717+ content. replace ( "__file__" , "__file__.replace('\\ \\ ?\\ ', '')" ) ,
718+ ) ?;
719+ }
720+
706721 println ! ( "Installing RAPT" ) ;
707722 // in versions above 7.5.0, the RAPT installer tries to import renpy.compat
708723 // this is not in the path by default, and since PYTHONPATH is ignored, we
You can’t perform that action at this time.
0 commit comments