[Scons-users] how to change into a diretroy?

冰冻牡蛎 laserjungle at qq.com
Thu Jul 25 01:08:00 EDT 2019


There is the simplified situation: I want to release an application based on wxPython via pyinstaller, at the same time this app needs a DLL. So there is 3 files: main.py, myapp.ico and mydll.dll


In MSYS2/MingW 64, the processing is 
```
cd my_app


gcc --share mydll.c -o mydll.dll


mkdir for_release
cp myapp.ico for_release
cp mydll.dll for_release
cp main.py for_release


cd for_release                  # how to implement this in scons
pyinstaller main.py


cp myapp.ico dist/main

```
As you may note, I copy all the file into diretory `for_release` where `pyinstaller` runs, so the original diretory of my project will not be in a messy. The final diretory for_release/dist/main contains the bundled exe files for release; then `for_release` directory can be deleted


I have read the scons manual and have known SharedLibrary/Command/Copy. 


But my question is how can I do `cd for_release` in SConstruct? Diretory `for_release` does not exist at the beginning so I can't put a SConstruct in it in advance.



Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20190725/d1c7b97a/attachment.html>


More information about the Scons-users mailing list