Skip to content

Commit

Permalink
fixed overwrite .desktop file of linux platform and update deps
Browse files Browse the repository at this point in the history
  • Loading branch information
mrrhak committed Nov 12, 2022
1 parent 6062aa6 commit 11e2f83
Show file tree
Hide file tree
Showing 5 changed files with 147 additions and 114 deletions.
219 changes: 124 additions & 95 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,142 +1,171 @@
# Changelog

## 2.0.6

- Fixed always overwrite `.desktop` file of Linux platform ([#23](https://github.com/mrrhak/icons_launcher/issues/23))
- Update a dependency to the latest release

## 2.0.5
- Flutter 3.3
- Improve pub analytic

- Flutter 3.3
- Improve pub analytic

## 2.0.4
- Fixed android config validation ([#22](https://github.com/mrrhak/icons_launcher/issues/22))

- Fixed android config validation ([#22](https://github.com/mrrhak/icons_launcher/issues/22))

## 2.0.3
- Fixed missing generate Contents.json for ios and macos ([#20](https://github.com/mrrhak/icons_launcher/issues/20))

- Fixed missing generate Contents.json for ios and macos ([#20](https://github.com/mrrhak/icons_launcher/issues/20))

## 2.0.2
- Fixed generate playstore icon wrong location ([#19](https://github.com/mrrhak/icons_launcher/issues/19))
- Fixed android adaptive round icon not remove ([#18](https://github.com/mrrhak/icons_launcher/issues/18))

- Fixed generate playstore icon wrong location ([#19](https://github.com/mrrhak/icons_launcher/issues/19))
- Fixed android adaptive round icon not remove ([#18](https://github.com/mrrhak/icons_launcher/issues/18))

## 2.0.1
- Fixed bug with `adaptive_background_color` and `adaptive_round_image` on android thanks to [Carapacik](https://github.com/mrrhak/icons_launcher/pull/17)
- Improve config validation

- Fixed bug with `adaptive_background_color` and `adaptive_round_image` on android thanks to [Carapacik](https://github.com/mrrhak/icons_launcher/pull/17)
- Improve config validation

## 2.0.0
- Add web custom favicon support
- ## Config breaking changes:

```yaml
icons_launcher:
image_path: 'assets/ic_logo_border.png'
platforms:
android:
enable: true
image_path: 'assets/ic_logo_border.png'
# adaptive_background_color: '#ffffff'
adaptive_background_image: 'assets/ic_background.png'
adaptive_foreground_image: 'assets/ic_foreground.png'
adaptive_round_image: 'assets/ic_logo_round.png'
ios:
enable: true
image_path: 'assets/ic_logo_rectangle.png'
web:
enable: true
image_path: 'assets/ic_logo_border.png'
favicon_path: 'assets/ic_logo_round.png'
macos:
enable: false
image_path: 'assets/ic_logo_border.png'
windows:
enable: false
image_path: 'assets/ic_logo_border.png'
linux:
enable: false
image_path: 'assets/ic_logo_border.png'
```
- Add web custom favicon support
- ## Config breaking changes:

```yaml
icons_launcher:
image_path: "assets/ic_logo_border.png"
platforms:
android:
enable: true
image_path: "assets/ic_logo_border.png"
# adaptive_background_color: '#ffffff'
adaptive_background_image: "assets/ic_background.png"
adaptive_foreground_image: "assets/ic_foreground.png"
adaptive_round_image: "assets/ic_logo_round.png"
ios:
enable: true
image_path: "assets/ic_logo_rectangle.png"
web:
enable: true
image_path: "assets/ic_logo_border.png"
favicon_path: "assets/ic_logo_round.png"
macos:
enable: false
image_path: "assets/ic_logo_border.png"
windows:
enable: false
image_path: "assets/ic_logo_border.png"
linux:
enable: false
image_path: "assets/ic_logo_border.png"
```

## 2.0.0-beta.2
- Fixed auto remove image alpha channel for iOS platform to follow AppStore guideline
- Fixed iOS flavor
- Improved pub score
- Improved log

- Fixed auto remove image alpha channel for iOS platform to follow AppStore guideline
- Fixed iOS flavor
- Improved pub score
- Improved log

## 2.0.0-beta.1
- Rewrite and improve flavor support
- New flavor script (E.g. `icons_launcher-dev.yaml`)
```sh
flutter pub run icons_launcher:create --flavor dev
```
- Add new config
- `color_adaptive_background`
- ## Breaking changes:
- Rename runner from `icons_launcher:main` to `icons_launcher:create`

```sh
flutter pub run icons_launcher:create
```
- Rename config from `flutter_icons:` to `icons_launcher:`

```yaml
icons_launcher:
image_path: 'icon.png'
android: true
```
- Rename config option:
- from `adaptive_icon_background` to `image_adaptive_background`
- from `adaptive_icon_foreground` to `image_adaptive_foreground`
- from `adaptive_icon_round` to `image_adaptive_round`
- Config option removed
- `remove_alpha_ios`
- `remove_alpha_macos`

- Rewrite and improve flavor support
- New flavor script (E.g. `icons_launcher-dev.yaml`)
```sh
flutter pub run icons_launcher:create --flavor dev
```
- Add new config
- `color_adaptive_background`
- ## Breaking changes:

- Rename runner from `icons_launcher:main` to `icons_launcher:create`

```sh
flutter pub run icons_launcher:create
```

- Rename config from `flutter_icons:` to `icons_launcher:`

```yaml
icons_launcher:
image_path: "icon.png"
android: true
```

- Rename config option:
- from `adaptive_icon_background` to `image_adaptive_background`
- from `adaptive_icon_foreground` to `image_adaptive_foreground`
- from `adaptive_icon_round` to `image_adaptive_round`
- Config option removed
- `remove_alpha_ios`
- `remove_alpha_macos`

## 1.2.1
- Fixed bug windows platform icon list embedded

- Fixed bug windows platform icon list embedded

## 1.2.0
- Improve windows platform to highest quality icon with multiple sizes embedded ([Feature request](https://github.com/mrrhak/icons_launcher/issues/8))

- Improve windows platform to highest quality icon with multiple sizes embedded ([Feature request](https://github.com/mrrhak/icons_launcher/issues/8))

## 1.1.9
- Fixed platform config checking ([#7](https://github.com/mrrhak/icons_launcher/issues/7))
- Update example app

- Fixed platform config checking ([#7](https://github.com/mrrhak/icons_launcher/issues/7))
- Update example app

## 1.1.8
- Fixed generate windows launcher icon from linux system ([#5](https://github.com/mrrhak/icons_launcher/issues/5))
- Deprecated `icons_launcher:main`. Use `icons_launcher:create` instead.
- Update README.md

- Fixed generate windows launcher icon from linux system ([#5](https://github.com/mrrhak/icons_launcher/issues/5))
- Deprecated `icons_launcher:main`. Use `icons_launcher:create` instead.
- Update README.md

## 1.1.7
- Fixed image preview path

- Fixed image preview path

## 1.1.6
- Fixed generate incorrect android xml file when use background color ([#4](https://github.com/mrrhak/icons_launcher/issues/4))
- Fixed create android `ic_launcher.xml` and `ic_launcher_round.xml`
- Update README.md

- Fixed generate incorrect android xml file when use background color ([#4](https://github.com/mrrhak/icons_launcher/issues/4))
- Fixed create android `ic_launcher.xml` and `ic_launcher_round.xml`
- Update README.md

## 1.1.5
- Fixed issue with pub.dev analysis

- Fixed issue with pub.dev analysis

## 1.1.4
- Fixed android adaptive icon ([#3](https://github.com/mrrhak/icons_launcher/issues/3))
- Android files are generated to `mipmap` instead of `drawable` follow Android Studio
- New android config `image_adaptive_round`
- New `ic_launcher-playstore.png` is generated in main folder
- Update example app
- Update README.md

- Fixed android adaptive icon ([#3](https://github.com/mrrhak/icons_launcher/issues/3))
- Android files are generated to `mipmap` instead of `drawable` follow Android Studio
- New android config `image_adaptive_round`
- New `ic_launcher-playstore.png` is generated in main folder
- Update example app
- Update README.md

## 1.1.3
- Fixed linux
- Improve grammar and formatting ([#1](https://github.com/mrrhak/icons_launcher/pull/1))
- Update README.md

- Fixed linux
- Improve grammar and formatting ([#1](https://github.com/mrrhak/icons_launcher/pull/1))
- Update README.md

## 1.1.2
- Update README.md

- Update README.md

## 1.1.1
- Fixed web support
- Replace `'dart:io'` with `universal_io`

- Fixed web support
- Replace `'dart:io'` with `universal_io`

## 1.1.0
- Add web support

- Add web support

## 1.0.1
- Provide documentation

- Provide documentation

## 1.0.0

Expand Down
22 changes: 11 additions & 11 deletions example/simple_app/icons_launcher.yaml
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
# flutter pub run icons_launcher:create

icons_launcher:
image_path: 'assets/ic_logo_border.png'
image_path: "assets/ic_logo_border.png"
platforms:
android:
enable: true
image_path: 'assets/ic_logo_border.png'
image_path: "assets/ic_logo_border.png"
# adaptive_background_color: '#ffffff'
adaptive_background_image: 'assets/ic_background.png'
adaptive_foreground_image: 'assets/ic_foreground.png'
adaptive_round_image: 'assets/ic_logo_round.png'
adaptive_background_image: "assets/ic_background.png"
adaptive_foreground_image: "assets/ic_foreground.png"
adaptive_round_image: "assets/ic_logo_round.png"
ios:
enable: true
image_path: 'assets/ic_logo_rectangle.png'
image_path: "assets/ic_logo_rectangle.png"
web:
enable: true
image_path: 'assets/ic_logo_border.png'
favicon_path: 'assets/ic_logo_round.png'
image_path: "assets/ic_logo_border.png"
favicon_path: "assets/ic_logo_round.png"
macos:
enable: true
image_path: 'assets/ic_logo_border.png'
image_path: "assets/ic_logo_border.png"
windows:
enable: false
image_path: 'assets/ic_logo_border.png'
image_path: "assets/ic_logo_border.png"
linux:
enable: false
image_path: 'assets/ic_logo_border.png'
image_path: "assets/ic_logo_border.png"
10 changes: 7 additions & 3 deletions lib/src/linux.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,13 @@ void _createLinuxIcons({required String imagePath}) {
_saveImageLinux(template, image, LINUX_DEFAULT_ICON_FILE_NAME);

CliLogger.success('Generated app icon image', level: CliLoggerLevel.two);

_createLinuxDesktopFile();
CliLogger.success('Created desktop entry file', level: CliLoggerLevel.two);
// If not existed => Create new once
// Otherwise not do anything just update icon file above
final file = File('$LINUX_DEFAULT_ICON_DIR$LINUX_DEFAULT_ICON_NAME.desktop');
if (!file.existsSync()) {
_createLinuxDesktopFile();
CliLogger.success('Created desktop entry file', level: CliLoggerLevel.two);
}
}

/// Save linux image
Expand Down
2 changes: 1 addition & 1 deletion lib/src/version.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ description: A command-line tool that simplifies the task of updating your Flutt
maintainer: Mrr Hak
homepage: https://mrrhak.com
repository: https://github.com/mrrhak/icons_launcher
version: 2.0.5
version: 2.0.6

dependencies:
args: ^2.3.1
image: ^3.2.0
image: ^3.2.2
path: ^1.8.2
universal_io: ^2.0.4
yaml: ^3.1.1
Expand All @@ -16,7 +16,7 @@ environment:
sdk: ">=2.17.1 <3.0.0"

dev_dependencies:
build_runner: ^2.2.0
build_runner: ^2.3.2
# dart run build_runner build --delete-conflicting-outputs
build_version: ^2.1.1
test: ^1.21.5
test: ^1.22.0

0 comments on commit 11e2f83

Please sign in to comment.