fixup systemTray can't recoginize .ico file
This commit is contained in:
2
bin/builders/common.ts
vendored
2
bin/builders/common.ts
vendored
@@ -243,7 +243,7 @@ export async function mergeTauriConfig(
|
|||||||
if (icon_exists) {
|
if (icon_exists) {
|
||||||
// 需要判断图标格式,默认只支持ico和png两种
|
// 需要判断图标格式,默认只支持ico和png两种
|
||||||
let iconExt = path.extname(systemTrayIcon).toLowerCase();
|
let iconExt = path.extname(systemTrayIcon).toLowerCase();
|
||||||
if (iconExt == ".png" || iconExt == ".icon") {
|
if (iconExt == ".png" || iconExt == ".ico") {
|
||||||
useDefaultIcon = false;
|
useDefaultIcon = false;
|
||||||
const trayIcoPath = path.join(npmDirectory, `src-tauri/png/${name.toLowerCase()}${iconExt}`);
|
const trayIcoPath = path.join(npmDirectory, `src-tauri/png/${name.toLowerCase()}${iconExt}`);
|
||||||
tauriConf.tauri.systemTray.iconPath = `png/${name.toLowerCase()}${iconExt}`;
|
tauriConf.tauri.systemTray.iconPath = `png/${name.toLowerCase()}${iconExt}`;
|
||||||
|
|||||||
4
dist/cli.js
vendored
4
dist/cli.js
vendored
@@ -34,6 +34,8 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|||||||
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||||
PERFORMANCE OF THIS SOFTWARE.
|
PERFORMANCE OF THIS SOFTWARE.
|
||||||
***************************************************************************** */
|
***************************************************************************** */
|
||||||
|
/* global Reflect, Promise */
|
||||||
|
|
||||||
|
|
||||||
function __awaiter(thisArg, _arguments, P, generator) {
|
function __awaiter(thisArg, _arguments, P, generator) {
|
||||||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
||||||
@@ -1837,7 +1839,7 @@ function mergeTauriConfig(url, options, tauriConf) {
|
|||||||
if (icon_exists) {
|
if (icon_exists) {
|
||||||
// 需要判断图标格式,默认只支持ico和png两种
|
// 需要判断图标格式,默认只支持ico和png两种
|
||||||
let iconExt = path.extname(systemTrayIcon).toLowerCase();
|
let iconExt = path.extname(systemTrayIcon).toLowerCase();
|
||||||
if (iconExt == ".png" || iconExt == ".icon") {
|
if (iconExt == ".png" || iconExt == ".ico") {
|
||||||
useDefaultIcon = false;
|
useDefaultIcon = false;
|
||||||
const trayIcoPath = path.join(npmDirectory, `src-tauri/png/${name.toLowerCase()}${iconExt}`);
|
const trayIcoPath = path.join(npmDirectory, `src-tauri/png/${name.toLowerCase()}${iconExt}`);
|
||||||
tauriConf.tauri.systemTray.iconPath = `png/${name.toLowerCase()}${iconExt}`;
|
tauriConf.tauri.systemTray.iconPath = `png/${name.toLowerCase()}${iconExt}`;
|
||||||
|
|||||||
0
script/sd-linux-x86_64
vendored
Normal file → Executable file
0
script/sd-linux-x86_64
vendored
Normal file → Executable file
Reference in New Issue
Block a user