Closed dlcarrier closed 7 years ago
@dcarrier-parallax What flavor/version of Linux is this happening on? The self.appdir construct appears in a number of places in the source. My understanding is that there is only one place in the code where we are reading a file and that is when when we are launching the propeller-load to program the device. Where are you seeing this?
@dcarrier-parallax told me yesterday that's its Ubuntu.
The error happens when 1) selecting About > About to see the about.txt file... where it tries to find it a /about.txt, and 2) downloading, where it tries /propeller-tools/propeller-load.
The output that led us to realize this was on the terminal output, I think, and not in the log file... but I can't remember that for sure.
@zfi - I see the same thing happening on the Development VM. How are you starting the BlocklyPropClient on the Development VM? Maybe we're both doing it differently than you.
I've changed the code slightly to work in my case, but am pouring through the plethora of solutions to this problem before settling it.
On a Linux system, one should compile the application with this command line
$ pyinstaller BlocklyPropClient.linux.spec
This will create a distribution in the ./dist/BlocklyPropClient.linux/ folder. One can then run the compiled client
$ ./dist/BlocklyPropClient.linux/BlocklyPropClient
The about.txt file does not appear in the distribution file set. This needs to be corrected before the Abount menu item can work.
Thanks @zfi - I have a fix completed for the about.txt issue and the run-from-source working folder not found issue. Both will be in a PR this morning after I verify that they don't cause problems with Win and Mac builds/runs.
Fix for this is PR #83.
Tested on Win 32 (run from source, run from dist, run from installer), Mac (run from source, run from dist, run from installer) and Ubuntu (run from source and run from dist).
@dcarrier-parallax - Can you pull from the demo branch again on your system and re-run the experiment we did before to verify good behavior?
Once the new tip of demo is pulled down to your machine try:
$ python BlocklyPropClient.py
Build the app
Run the following
$ pyinstaller BlocklyPropClient.linux.spec
Navigate to the dist/BlocklyPropClient subfolder and run the BlocklyPropClient executable
Perform the same "About" and "Download" tests from above.
Closing this because I've verified this myself.
When running BlocklyPropClient on Linux, the self.appdir call returns empty, and all attempts to read a file from the working directory, or a subdirectory of the working directory, result in a read from the root directory, or a subdirectory of the root directory.
This appears to be the same as this issue: https://github.com/parallaxinc/BlocklyProp/issues/929, except on Linux instead of OS X.