1212# See the License for the specific language governing permissions and
1313# limitations under the License.
1414
15+ import os
1516import mimetypes
1617import socket
1718
1819import click
1920
2021from platformio .compat import IS_WINDOWS
2122from platformio .home .run import run_server
22- from platformio .package . manager . core import get_core_package_dir
23+ from platformio .project . config import ProjectConfig
2324
2425
25- @click .command ("home" , short_help = "GUI to manage PlatformIO " )
26+ @click .command ("home" , short_help = "GUI to manage PIO " )
2627@click .option ("--port" , type = int , default = 8008 , help = "HTTP port, default=8008" )
2728@click .option (
2829 "--host" ,
@@ -53,7 +54,7 @@ def cli(port, host, no_open, shutdown_timeout, session_id):
5354 # hook for `platformio-node-helpers`
5455 if host == "__do_not_start__" :
5556 # download all dependent packages
56- get_core_package_dir ( "contrib-piohome" )
57+ os . path . join ( ProjectConfig . get_instance (). get ( "platformio" , "packages_dir" ), "contrib-piohome" )
5758 return
5859
5960 # Ensure PIO Home mimetypes are known
@@ -71,19 +72,19 @@ def cli(port, host, no_open, shutdown_timeout, session_id):
7172 [
7273 "" ,
7374 " ___I_" ,
74- " /\\ -_--\\ PlatformIO Home" ,
75+ " /\\ -_--\\ PIO Home" ,
7576 "/ \\ _-__\\ " ,
7677 "|[]| [] | %s" % home_url ,
7778 "|__|____|__%s" % ("_" * len (home_url )),
7879 ]
7980 )
8081 )
8182 click .echo ("" )
82- click .echo ("Open PlatformIO Home in your browser by this URL => %s" % home_url )
83+ click .echo ("Open PIO Home in your browser by this URL => %s" % home_url )
8384
8485 if is_port_used (host , port ):
8586 click .secho (
86- "PlatformIO Home server is already started in another process." , fg = "yellow"
87+ "PIO Home server is already started in another process." , fg = "yellow"
8788 )
8889 if not no_open :
8990 click .launch (home_url )
0 commit comments