0 Members and 4 Guests are viewing this topic.
:: This is where PyInstaller is located on your computer. It should be the stable (1.5.x) version!:: Do NOT use the trunk version; it will NOT work.@set PYINSTALLER_PATH=C:\Users\arthur\Documents\pyinstaller-1.5.1:: This is where you want the build files to be. You should set this to the source dir\build directory, but you're free:: to choose any directory you wish - just make sure it exists.@set BUILD_DIR=C:\SourceCode\axeinterpreter\build:: File to compile (this should be the main one)@set TO_COMPILE=C:\SourceCode\axeinterpreter\source\main.py:: Basename of Python file that you're compiling - for example::: Compiling C:\bla\bla\bla\interesting.py:: The basename for this file is "interesting":: (do not specify quotes)@set BASENAME=main:: Final base file name@set FINALNAME=AxeInterpreterv0.0:: Uncomment if you haven't used PyInstaller before::C:\Python27\python %PYINSTALLER_PATH%\Configure.pyC:\Python27\python %PYINSTALLER_PATH%\MakeSpec.py --onefile --windowed -o %BUILD_DIR% %TO_COMPILE%C:\Python27\python %PYINSTALLER_PATH%\Build.py %BUILD_DIR%\%BASENAME%.specmove %BUILD_DIR%\dist\%BASENAME%.exe %BUILD_DIR%\dist\%FINALNAME%.exepause
Because I don't want people to play with broken exes, here are working ones!I made a few minor tweaks. Double-clicking the exe now starts the interpreter, you can drag and drop a text file over the exe to try and run it, and the program will drop into the interpreter mode after a text file finishes running (so that you can do a postmortem, dissect variables, etc.)For some inexplicable reason, you need to add a 'import pygame._views' while using pyinstaller in windows but exclude it for linux.
Nice project. One bug I noticed is that even if you don't use DispGraph, entering anything in the interactive mode will cause the display to update.
Some further suggestions...1) I suggest you look into threading (you'll be seeing that very soon in Croquette!) for Pygame event pumping. If you don't "process" the events sent to the Pygame window, Windows will think it died and ask to terminate it. The Pygame portion MUST remain in the main thread (unfortunately), but the CLI interpreter can be handled in the thread, making things work out nicely. (Even if it's odd to do graphics processing first )2) Add an option to hide/show the window? (As you've demoed, some commands do not need the screen shown.)3) CLI commands - like when I do Output(1,1,"Hello world!"), it shows it in the console instead. A flag must be toggled for this to work, of course. If you want to implement this, you need to use a mix of the ncurses module and the Windows Console module.Otherwise, it's pretty nice
Or what about Axecutor?