@@ -119,15 +119,16 @@ async function main() {
119119 console . log ( "Extracted ffmpeg" ) ;
120120 } else console . log ( "Using cached ffmpeg" ) ;
121121
122- // alternative to adding ffmpeg/bin to PATH
123- await fs . mkdir ( path . join ( targetDir , "debug" ) , { recursive : true } ) ;
124- for ( const name of await fs . readdir ( path . join ( ffmpegDir , "bin" ) ) ) {
125- await fs . copyFile (
126- path . join ( ffmpegDir , "bin" , name ) ,
127- path . join ( targetDir , "debug" , name ) ,
128- ) ;
122+ for ( const profile of [ "debug" , "release" ] ) {
123+ await fs . mkdir ( path . join ( targetDir , profile ) , { recursive : true } ) ;
124+ for ( const name of await fs . readdir ( path . join ( ffmpegDir , "bin" ) ) ) {
125+ await fs . copyFile (
126+ path . join ( ffmpegDir , "bin" , name ) ,
127+ path . join ( targetDir , profile , name ) ,
128+ ) ;
129+ }
129130 }
130- console . log ( "Copied ffmpeg dylibs to target/debug" ) ;
131+ console . log ( "Copied ffmpeg DLLs to target/debug and target/release " ) ;
131132
132133 if ( ! ( await fileExists ( path . join ( targetDir , "native-deps" ) ) ) )
133134 await fs . mkdir ( path . join ( targetDir , "native-deps" ) , { recursive : true } ) ;
0 commit comments