Open AutomationD opened 8 years ago
+1 thank you for suggestions. I hope someone can make it.
I think Nuitka might be worth looking into for this.
From what I've read, it can't do cross-platform compilation, so someone with a Windows PC would have to give it a shot.
The following command from the PlatformIO root dir should produce a completely portable .exe
which would work on a fresh Windows install, no external dependancies.
nuitka --recurse-all --standalone ./platformio
I've tried it on my Mac and can confirm that it does compile without errors. Don't mind the .exe
, Nuitka appends it to the generated executable on all operating systems.
git clone https://github.com/platformio/platformio
cd platformio
nuitka --recurse-all --standalone ./platformio
[compile output not shown]
cd platformio.dist
./platformio.exe --version
PlatformIO, version 2.7.2.dev0
Thanks @ZachMassia. I didn't know about Nuitka.
upgrade
process will be so difficult. The platformio upgrade
looks more interesting.Windows users don't like to play with console utilities. If user can download and install pre-compile platformio.exe
, then it will not have problems to pip install platformio
.
My propositions:
pip
or installer script http://docs.platformio.org/en/latest/installation.html#b-installer-script).I've released beta version PlatformIO IDE for Atom today. It contains built-in PlatformIO CLI tool and Terminal. Also, users have ability to install this built-in PlatformIO CLI tool globally using Menu: PlatformIO > Install Shell Commands
, then open system Terminal and platformio
and pio
should be available.
@ZachMassia I've tried what you described but I didn't get the same results.
First try:
nuitka --recurse-all --standalone ./platformio
When it start to compile shows me a lot of warnings like cannot find 'package_name' as relative or absolute import
When the compilation finished, I ran platformio.exe --version
and the output is ImportError: No module named _socket
Second try:
C:\Python27\Lib\site-packages\platformio
Same warning outputs
But when I run platformio.exe --version
It shows me the version I've installed
when I move the platformio.dist folder to other location I get the error ImportError: No module named _socket
again
I'm using Win10, Python 2.7.x - 3.5.x
You know what can I be doing wrong?
cx_Freeze (Download) Seems to be a better alternative because it doesn't "hide" the source files, so the upgrade option should work. (In theory) and it's cross-platform too
I've compile the code but I still have to know how to including all the platformio files (code).
With the basic setup.py configuration, are available the commands lib
, platforms
, upgrade
When I run __main__ --version
the output is: PlatformIO, version 2.8.3
(the name __main__
is easy to fix, only have to edit two files, but until now I'm trying to get work the whole code)
lib
seems to work fineplatforms
the command seems to work but isn't possible to search or install any platformupgrade
the output is Error: Can not retrieve the latest PlatformIO version
I think it's because the missing files, Is there someone with any experience using cx_Freeze?
Edit
Seems like doing some changes in the setup.py
and in some files of platformio is possible to have a portable version, I'm still testing all the options of platformio, but it could work fine
All Windows version in recent history have cmd.exe available very easily. Just Shift/Right click on a directory in Windows Explorer and click on Open Command Window Here.
As some Windows user might not have any console tools installed I would like to see platformio distributed as some self-contained archive/exe file for Windows users. It should contain python distribution and some nice colorful command line + GUI (which is in the works). This should be done side-by-side to existing pip installation or even on top of it.
Please let me know what you think