Search
Search titles only
By:
Search titles only
By:
Log in
Register
Search
Search titles only
By:
Search titles only
By:
Menu
Install the app
Install
Forums
New posts
All threads
Latest threads
New posts
Trending threads
Trending
Search forums
What's new
New posts
New ads
New profile posts
Latest activity
Free Ads
Latest reviews
Search ads
Members
Current visitors
New profile posts
Search profile posts
Contact us
Latest ads
ඕනම රටකට සෙට් වෙන CV එකක්
ErMurazor
Updated:
Saturday at 9:50 AM
Hambantota
7 Acres Beachfront Land For Sell DownSouth , PerPerch Price 420 000
1024 Digital
Updated:
Wednesday at 11:57 AM
Baseus PI LITE INDOOR CAMERA
ErMurazor
Updated:
Oct 12, 2026
Ad icon
Colombo
Hard Disk For Sale
mazza
Updated:
Oct 10, 2026
land for sale
justasking
Updated:
Oct 10, 2026
Electronics
Vehicles
Property
Search
Reply to thread
Forums
General
ElaKiri Talk!
Webapp to .exe (Help!)
Get the App
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Message
<blockquote data-quote="miyuru4u" data-source="post: 31663887" data-attributes="member: 16167"><p> <ul> <li data-xf-list-type="ul">pywebview + PyInstaller<br /> React project එක ඇතුළේ npm run build ගහලා build එක ගන්න.</li> <li data-xf-list-type="ul">ඒ build output එක Flask project එක ඇතුළේ web කියලා folder එකකට copy කරන්න.</li> <li data-xf-list-type="ul">Flask එකේ React එක serve කරන්න: static_folder එකට web folder එක දාලා, API නැති ඕනෑම route එකකට index.html return කරන්න.</li> <li data-xf-list-type="ul">React එකේ backend calls තියෙනවා නම් <a href="http://localhost:5000" target="_blank">http://localhost:5000</a> කියලා hardcode කරලා තියෙන ඒවා /api/... විදිහට relative කරන්න.</li> <li data-xf-list-type="ul">Flask එකේ app.run() අයින් කරන්න. Database එක තියෙනවා නම් ඒකේ path එක install වෙන folder එකේ නැතිව %APPDATA%\MyApp\ වලට දාන්න.</li> <li data-xf-list-type="ul">මේ packages ටික install කරන්න:<br /> pip install flask pywebview pyinstaller</li> <li data-xf-list-type="ul">desktop.py කියලා file එකක් හදන්න. ඒකෙන් කරන්න ඕනේ: free port එකක් auto අරගෙන Flask එක වෙනම thread එකක start කරන එක, Flask ready වුණාම pywebview window එකෙන් <a href="http://127.0.0.1" target="_blank">http://127.0.0.1</a>:<port> open කරන එක, window එක වැහුවාම Flask එකත් shutdown කරන එක.</li> <li data-xf-list-type="ul">Test කරන්න: python desktop.py — window එකක් ඇවිත් app එක පෙන්නන්න ඕනේ.</li> <li data-xf-list-type="ul">Exe එක හදන්න මේ command එක ගහන්න:<br /> pyinstaller --noconsole --onedir --name MyApp --add-data "web;web" desktop.py</li> <li data-xf-list-type="ul">dist\MyApp\MyApp.exe එක test කරන්න. වැඩ නම් ඒ dist\MyApp folder එකම යාළුවාට යවන්න පුළුවන්.</li> <li data-xf-list-type="ul">ඕනේ නම් විතරක්: ඒ folder එක Inno Setup වලින් Setup.exe එකක් කරන්න</li> </ul></blockquote><p></p>
[QUOTE="miyuru4u, post: 31663887, member: 16167"] [LIST] [*]pywebview + PyInstaller React project එක ඇතුළේ npm run build ගහලා build එක ගන්න. [*]ඒ build output එක Flask project එක ඇතුළේ web කියලා folder එකකට copy කරන්න. [*]Flask එකේ React එක serve කරන්න: static_folder එකට web folder එක දාලා, API නැති ඕනෑම route එකකට index.html return කරන්න. [*]React එකේ backend calls තියෙනවා නම් [URL]http://localhost:5000[/URL] කියලා hardcode කරලා තියෙන ඒවා /api/... විදිහට relative කරන්න. [*]Flask එකේ app.run() අයින් කරන්න. Database එක තියෙනවා නම් ඒකේ path එක install වෙන folder එකේ නැතිව %APPDATA%\MyApp\ වලට දාන්න. [*]මේ packages ටික install කරන්න: pip install flask pywebview pyinstaller [*]desktop.py කියලා file එකක් හදන්න. ඒකෙන් කරන්න ඕනේ: free port එකක් auto අරගෙන Flask එක වෙනම thread එකක start කරන එක, Flask ready වුණාම pywebview window එකෙන් [URL]http://127.0.0.1[/URL]:<port> open කරන එක, window එක වැහුවාම Flask එකත් shutdown කරන එක. [*]Test කරන්න: python desktop.py — window එකක් ඇවිත් app එක පෙන්නන්න ඕනේ. [*]Exe එක හදන්න මේ command එක ගහන්න: pyinstaller --noconsole --onedir --name MyApp --add-data "web;web" desktop.py [*]dist\MyApp\MyApp.exe එක test කරන්න. වැඩ නම් ඒ dist\MyApp folder එකම යාළුවාට යවන්න පුළුවන්. [*]ඕනේ නම් විතරක්: ඒ folder එක Inno Setup වලින් Setup.exe එකක් කරන්න [/LIST] [/QUOTE]
Insert quotes…
Verification
Winadiyakata thappara keeyak tibeda?
Post reply
Top
Bottom