File tree Expand file tree Collapse file tree 2 files changed +27
-2
lines changed
local-cli/generator-ubuntu/templates Expand file tree Collapse file tree 2 files changed +27
-2
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,10 @@ ReactNetExecutor::ReactNetExecutor(QObject* parent)
1414 : ReactExecutor(parent)
1515 , m_socket(new QTcpSocket(this ))
1616{
17- m_socket->connectToHost (" localhost" , 5000 );
17+ QString serverHost = qgetenv (" REACT_SERVER_HOST" );
18+ if (serverHost.isEmpty ())
19+ serverHost = " localhost" ;
20+ m_socket->connectToHost (serverHost, 5000 );
1821 // connect(m_socket, SIGNAL(connected()), SLOT(connected()));
1922 // connect(m_socket, SIGNAL(disconnected()), SLOT(disconnected()));
2023 connect (m_socket, SIGNAL (readyRead ()), SLOT (readReply ()));
Original file line number Diff line number Diff line change 11#! /bin/bash
22
3+ args=" "
4+ ondevice=0
5+
6+ for arg in " $@ "
7+ do
8+ if [ $arg == " --on-device" ]
9+ then
10+ ondevice=1
11+ else
12+ args=$args " $arg "
13+ fi
14+ done
15+
316(node ${CMAKE_SOURCE_DIR} /../node_modules/react-native/ubuntu-server.js 2>&1 > /dev/null) &
4- ${CMAKE_BINARY_DIR} /bin/${APP_NAME} $*
17+
18+ if [[ $ondevice = 1 ]]
19+ then
20+ react_host=` hostname -I`
21+ adb push ${CMAKE_BINARY_DIR} /bin/${APP_NAME} /home/phablet
22+ # adb reverse --no-rebind tcp:8081 tcp:8081
23+ adb shell REACT_SERVER_HOST=$react_host /home/phablet/${APP_NAME} --host $react_host $args -- --desktop_file_hint=/usr/share/applications/webbrowser-app.desktop
24+ else
25+ ${CMAKE_BINARY_DIR} /bin/${APP_NAME} $args
26+ fi
527
You can’t perform that action at this time.
0 commit comments