ikbendewilliam / flutter-puzzle-challenge

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Circluzzle

You can try it out on

Or build on your device from the public repo

Devpost: https://devpost.com/software/circular-puzzle

YouTube: https://www.youtube.com/watch?v=3xNA76mouM4

Credits

Desktop experiences

This was my first project that I've build on desktop. I wanted to explain a bit the experience and trouble I had. I've followed the guide from Flutter.dev

macOS

macOS worked right out of the box, I did not have any trouble building, uploading or making it available in the app store. Kudos to the Flutter team!

Windows

This was a bit more difficult, there was more configuration needed and just_audio doesn't support windows out of the box, you need to add just_audio_libwinmedia. This plugin caused other issues, but I was able to resolve them following this issue by deleting nuget.config file located in AppData\Roaming\nuget\ . and rebuilding.

The biggest trouble with Windows I encountered was actually the store. I added the app for review, but got rejected after a couple of days. According to the reviewer, my app is not a "game", even though they have Sliding puzzles in the Microsoft store. I contacted Microsoft through an email they provided on the rejected page, but didn't get any response. So I added it again in review and waited another few days. This time it did pass.

Linux

Linux was a whole other issue, first of all I don't have a Linux desktop available, so I tried using WSL 2. This doesn't support snap and you need to do some extra stuff for this, there's a great article you can follow. Even though building may work, creating a snap still fails. Again the issue is with just_audio_libwinmedia. This requires a cmake version > 3.15, but the supported cmake version for flutter-snap is 3.11. There is a PR open for this and the author was generous enough to provide a gist that shows how to build Flutter from git and with base20 (which resolves the issue with the cmake version).

Unfortunatly, the snap build is still failling, the issue is that cmake create a CMakeCache.txt file, this file contains the directory in which it was made, but we copy it to another place. By removing this file before flutter build, this issue is also resolved and the build processes fine! The override-build method of the app parts in snapcraft.yaml:

  circluzzle:
    after: [ flutter-git ]
    source: .
    plugin: nil
    override-build: |
      set -eux
      mkdir -p $SNAPCRAFT_PART_INSTALL/bin
      flutter upgrade
      flutter config --enable-linux-desktop
      flutter doctor
      flutter pub get
      rm build/linux/x64/release/CMakeCache.txt
      flutter build linux --release -v
      cp -r build/linux/*/release/bundle/* $SNAPCRAFT_PART_INSTALL/bin/

About

License:MIT License


Languages

Language:JavaScript 92.2%Language:C++ 2.6%Language:CMake 2.5%Language:Dart 2.0%Language:HTML 0.4%Language:Ruby 0.2%Language:Swift 0.1%Language:C 0.1%Language:Kotlin 0.0%Language:Objective-C 0.0%