Package Flutter windows app

更新於 發佈於 閱讀時間約 4 分鐘

msix

After comparing different methods, I think the most stable way is using msix to package the windows desktop app.

Installation

flutter pub add --dev msix

self-signed certificate

To create an installer for your desktop app project, you need a certificate for your app. Let’s use OpenSSL to create one.

download

After downloading and installing OpenSSL, add path-to-OpenSSL-Win64\bin to your environment variable.

create certificate

Run the following commands step by step then you can obtain the certificate.
$ openssl genrsa -out mykeyname.key 2048
$ openssl req -new -key mykeyname.key -out mycsrname.csr
$ openssl x509 -in mycsrname.csr -out mycrtname.crt -req -signkey mykeyname.key
$ openssl pkcs12 -export -out CERTIFICATE.pfx -inkey mykeyname.key -in mycrtname.crt

msix_config

Let’s add the msix settings in pubspec.yaml .
The most important part are the certificate_path and certificate_password .

Pakage app

flutter pub run msix:create
It would take a while to package the project. Then you would obtain a msix file, this is the installer of the app.

Trusted Root Certification Authorities

Before using this installer to install your app, you need to add the certificate of this installer into the Trusted Root Certification Authorities of your pc. Since you use a self-signed certificate, windows don’t trust it by default.
choose Properties
choose Digital Signatures
choose your certificate then choose Details
click Install Certificate… to install
choose Local Machine
choose Trusted Root Certification Authorities
Finally, click ok and ok. Then you should be able to use this installer.
為什麼會看到廣告
avatar-img
9會員
49內容數
比起詳細教學單一技能,網路上或者市面上整合多項技能的教學相對少很多,但要真的完成一項專案往往不是只靠一項技能便能做到。 而且教科書式的完整教學也比較枯燥乏味,因此我想以自身的經驗為例,以全端開發各項技能中最常用到的部分進行講解,讓讀者能夠快速上手掌握全端技能。
留言0
查看全部
avatar-img
發表第一個留言支持創作者!
張哲嘉的沙龍 的其他內容
Introduction Set DDNS on Google Domains To set your DDNS record on Google Domains, just follow this document. ddclient installation ddclient.conf
Introduction Set DDNS on Google Domains To set your DDNS record on Google Domains, just follow this document. ddclient installation ddclient.conf
你可能也想看
Google News 追蹤
Thumbnail
/ 大家現在出門買東西還會帶錢包嗎 鴨鴨發現自己好像快一個禮拜沒帶錢包出門 還是可以天天買滿買好回家(? 因此為了記錄手機消費跟各種紅利優惠 鴨鴨都會特別注意銀行的App好不好用! 像是介面設計就是會很在意的地方 很多銀行通常會為了要滿足不同客群 會推出很多App讓使用者下載 每次
Thumbnail
介紹在 Windows 上安裝 Flutter SDK 的三種主要方法。第一種是從 Flutter 官方網站手動下載並安裝。第二種方法是通過 Visual Studio Code 整合式開發環境安裝。第三種方法則是使用命令列工具,如 Chocolatey 。讀者可根據需求選擇合適的安裝方式。
安裝官方 nginx 先在/etc/yum.repos.d新增一個nginx.repo的檔案 並加入以下內容 [nginx] name=nginx repo baseurl=http://nginx.org/packages/centos/$releasever/$basearch/ gpgc
在今日數位化的世界中,保護資料的安全性尤為重要。加密憑證(SSL/TLS Certificates)扮演著確保網站和用戶之間資料傳輸安全的重要角色。本文將深入探討加密憑證的原理、作用以及如何選擇適合的加密憑證來保護您的網站。 1. 加密憑證的基本概念 加密憑證是一種數位檔案,用於證明網站身份的真
Thumbnail
下載處: 安裝msi  https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html 或單獨使用 https://the.earth.li/~sgtatham/putty/latest/w64/pscp.exe  安裝好可以
Windows : 下載Git (git-scm.com)並按照指示安裝。 安裝完成後,你可以通過運行以下命令來確認安裝是否成功: git --version 初次設定GIT 接下來就是按照初次設定git,會需要配置你的用戶名和電子郵件地址,這些信息將被記錄在您提交的每個變更中。 git
Thumbnail
# 簡介 身為一位專注於 Vue.js 的前端開發者,這是我第一次嘗試構建 Flutter 網頁應用。讓我們開始吧! ## 第一次嘗試 ### 第一步:創建一個 Flutter 應用 首先,通過運行以下命令來創建一個新的 Flutter 項目: ```sh flutter
Thumbnail
這篇文章將會提供在伺服器上安裝憑證的步驟,包括下載憑證,設定php.ini以及重新啟動Web Server等。
Thumbnail
本文將介紹如何在ESXI 8上安裝vCenter Server以及相關設定步驟,包括ISO光碟檔下載、掛載ISO、填入安裝目標、設定網域以及管理者密碼等。
Thumbnail
/ 大家現在出門買東西還會帶錢包嗎 鴨鴨發現自己好像快一個禮拜沒帶錢包出門 還是可以天天買滿買好回家(? 因此為了記錄手機消費跟各種紅利優惠 鴨鴨都會特別注意銀行的App好不好用! 像是介面設計就是會很在意的地方 很多銀行通常會為了要滿足不同客群 會推出很多App讓使用者下載 每次
Thumbnail
介紹在 Windows 上安裝 Flutter SDK 的三種主要方法。第一種是從 Flutter 官方網站手動下載並安裝。第二種方法是通過 Visual Studio Code 整合式開發環境安裝。第三種方法則是使用命令列工具,如 Chocolatey 。讀者可根據需求選擇合適的安裝方式。
安裝官方 nginx 先在/etc/yum.repos.d新增一個nginx.repo的檔案 並加入以下內容 [nginx] name=nginx repo baseurl=http://nginx.org/packages/centos/$releasever/$basearch/ gpgc
在今日數位化的世界中,保護資料的安全性尤為重要。加密憑證(SSL/TLS Certificates)扮演著確保網站和用戶之間資料傳輸安全的重要角色。本文將深入探討加密憑證的原理、作用以及如何選擇適合的加密憑證來保護您的網站。 1. 加密憑證的基本概念 加密憑證是一種數位檔案,用於證明網站身份的真
Thumbnail
下載處: 安裝msi  https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html 或單獨使用 https://the.earth.li/~sgtatham/putty/latest/w64/pscp.exe  安裝好可以
Windows : 下載Git (git-scm.com)並按照指示安裝。 安裝完成後,你可以通過運行以下命令來確認安裝是否成功: git --version 初次設定GIT 接下來就是按照初次設定git,會需要配置你的用戶名和電子郵件地址,這些信息將被記錄在您提交的每個變更中。 git
Thumbnail
# 簡介 身為一位專注於 Vue.js 的前端開發者,這是我第一次嘗試構建 Flutter 網頁應用。讓我們開始吧! ## 第一次嘗試 ### 第一步:創建一個 Flutter 應用 首先,通過運行以下命令來創建一個新的 Flutter 項目: ```sh flutter
Thumbnail
這篇文章將會提供在伺服器上安裝憑證的步驟,包括下載憑證,設定php.ini以及重新啟動Web Server等。
Thumbnail
本文將介紹如何在ESXI 8上安裝vCenter Server以及相關設定步驟,包括ISO光碟檔下載、掛載ISO、填入安裝目標、設定網域以及管理者密碼等。