Build - add beta build support for windows (and linux maybe)#245
Open
broken-droid wants to merge 8 commits into
Open
Build - add beta build support for windows (and linux maybe)#245broken-droid wants to merge 8 commits into
broken-droid wants to merge 8 commits into
Conversation
|
Hero! |
…explicitly passed vars in --dart-define Updated a hardcoded path in database_connection_impl_io.dart to use the StoragePathService static helper
6e5b0ae to
39fc56e
Compare
Contributor
Author
|
macos and ios should be able to have a setup like android with flavors. I can give it a shot if you want, but I can't try it out. |
Contributor
Author
|
also, maybe paths should change for windows getApplicationCacheDirectory - local profile, includes application name does the db path need to be visible, or are other files going in there too? Probably doesn't matter that much and I'm not sure what other platforms need, just a thought |
…ss dart-define for flutter
… so we'll just check for that. Also runtime may not have the env set anymore which wouldn't make sense. Windows can't see dart-define in the cmake process, linux might be able to. Changed getImageCacheDir path for windows, since it includes the app name already
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
add beta build support for windows, and probably linux since it's similar
add an env var in your launch config for MOONFIN_BETA_BUILD to true - this is needed for cmake changes
also pass it in command line with --dart-define - this is for flutter constants in the app for changing paths
added build-windows-beta.ps1 script to handle setting the env and passing --dart-define for building if you want something that runs on command line.
Beta builds will now have separate path locations for their data if you set env and pass the dart-define.
Using build flavors with 'beta' will use these path changes too.
example launch.json for vscode
Windows wasn't able to get dart-define at the cmake level, only in flutter compilation. So you need to do both steps for windows.
Linux may be able to get them during cmake, but safer to just match windows and use both the env and pass --dart-define to make sure until someone can try.
Type of Change
Changes Made
Platform
Some hardcoded paths were changed, this will affect all platforms if the env var is used in your build configuration.
Testing
only windows was tested, linux might work if someone tries
Test Steps
Checklist