diff --git a/modules/default/welcome.nix b/modules/default/welcome.nix index 2ae78d3b..cfa9fa69 100644 --- a/modules/default/welcome.nix +++ b/modules/default/welcome.nix @@ -6,11 +6,11 @@ }: let - nix-disk-manager = pkgs.callPackage ../../pkgs/glfos-welcome-screen {}; + nix-disk-manager = pkgs.callPackage ../../pkgs/welcome-screen {}; in { environment.systemPackages = with pkgs; [ - glfos-welcome-screen + welcome-screen ]; } diff --git a/pkgs/welcome-screen/LICENSE b/pkgs/welcome-screen/LICENSE new file mode 100644 index 00000000..8000a6fa --- /dev/null +++ b/pkgs/welcome-screen/LICENSE @@ -0,0 +1,504 @@ + GNU LESSER GENERAL PUBLIC LICENSE + Version 2.1, February 1999 + + Copyright (C) 1991, 1999 Free Software Foundation, Inc. + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +[This is the first released version of the Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence + the version number 2.1.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Lesser General Public License, applies to some +specially designated software packages--typically libraries--of the +Free Software Foundation and other authors who decide to use it. You +can use it too, but we suggest you first think carefully about whether +this license or the ordinary General Public License is the better +strategy to use in any particular case, based on the explanations below. + + When we speak of free software, we are referring to freedom of use, +not price. Our General Public Licenses are designed to make sure that +you have the freedom to distribute copies of free software (and charge +for this service if you wish); that you receive source code or can get +it if you want it; that you can change the software and use pieces of +it in new free programs; and that you are informed that you can do +these things. + + To protect your rights, we need to make restrictions that forbid +distributors to deny you these rights or to ask you to surrender these +rights. These restrictions translate to certain responsibilities for +you if you distribute copies of the library or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link other code with the library, you must provide +complete object files to the recipients, so that they can relink them +with the library after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + We protect your rights with a two-step method: (1) we copyright the +library, and (2) we offer you this license, which gives you legal +permission to copy, distribute and/or modify the library. + + To protect each distributor, we want to make it very clear that +there is no warranty for the free library. Also, if the library is +modified by someone else and passed on, the recipients should know +that what they have is not the original version, so that the original +author's reputation will not be affected by problems that might be +introduced by others. + + Finally, software patents pose a constant threat to the existence of +any free program. We wish to make sure that a company cannot +effectively restrict the users of a free program by obtaining a +restrictive license from a patent holder. Therefore, we insist that +any patent license obtained for a version of the library must be +consistent with the full freedom of use specified in this license. + + Most GNU software, including some libraries, is covered by the +ordinary GNU General Public License. This license, the GNU Lesser +General Public License, applies to certain designated libraries, and +is quite different from the ordinary General Public License. We use +this license for certain libraries in order to permit linking those +libraries into non-free programs. + + When a program is linked with a library, whether statically or using +a shared library, the combination of the two is legally speaking a +combined work, a derivative of the original library. The ordinary +General Public License therefore permits such linking only if the +entire combination fits its criteria of freedom. The Lesser General +Public License permits more lax criteria for linking other code with +the library. + + We call this license the "Lesser" General Public License because it +does Less to protect the user's freedom than the ordinary General +Public License. It also provides other free software developers Less +of an advantage over competing non-free programs. These disadvantages +are the reason we use the ordinary General Public License for many +libraries. However, the Lesser license provides advantages in certain +special circumstances. + + For example, on rare occasions, there may be a special need to +encourage the widest possible use of a certain library, so that it becomes +a de-facto standard. To achieve this, non-free programs must be +allowed to use the library. A more frequent case is that a free +library does the same job as widely used non-free libraries. In this +case, there is little to gain by limiting the free library to free +software only, so we use the Lesser General Public License. + + In other cases, permission to use a particular library in non-free +programs enables a greater number of people to use a large body of +free software. For example, permission to use the GNU C Library in +non-free programs enables many more people to use the whole GNU +operating system, as well as its variant, the GNU/Linux operating +system. + + Although the Lesser General Public License is Less protective of the +users' freedom, it does ensure that the user of a program that is +linked with the Library has the freedom and the wherewithal to run +that program using a modified version of the Library. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, whereas the latter must +be combined with the library in order to run. + + GNU LESSER GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library or other +program which contains a notice placed by the copyright holder or +other authorized party saying it may be distributed under the terms of +this Lesser General Public License (also called "this License"). +Each licensee is addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control compilation +and installation of the library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. + + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. + + 6. As an exception to the Sections above, you may also combine or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (1) uses at run time a + copy of the library already present on the user's computer system, + rather than copying library functions into the executable, and (2) + will operate properly with a modified version of the library, if + the user installs one, as long as the modified version is + interface-compatible with the version that the work was made with. + + c) Accompany the work with a written offer, valid for at + least three years, to give the same user the materials + specified in Subsection 6a, above, for a charge no more + than the cost of performing this distribution. + + d) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + e) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the materials to be distributed need not include anything that is +normally distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. + + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties with +this License. + + 11. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply, +and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License may add +an explicit geographical distribution limitation excluding those countries, +so that distribution is permitted only in or among countries not thus +excluded. In such case, this License incorporates the limitation as if +written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Lesser General Public License from time to time. +Such new versions will be similar in spirit to the present version, +but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. + + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Libraries + + If you develop a new library, and you want it to be of the greatest +possible use to the public, we recommend making it free software that +everyone can redistribute and change. You can do so by permitting +redistribution under these terms (or, alternatively, under the terms of the +ordinary General Public License). + + To apply these terms, attach the following notices to the library. It is +safest to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least the +"copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + USA + +Also add information on how to contact you by electronic and paper mail. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the library, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the + library `Frob' (a library for tweaking knobs) written by James Random + Hacker. + + , 1 April 1990 + Ty Coon, President of Vice + +That's all there is to it! diff --git a/pkgs/welcome-screen/README.md b/pkgs/welcome-screen/README.md new file mode 100644 index 00000000..0698514b --- /dev/null +++ b/pkgs/welcome-screen/README.md @@ -0,0 +1,9 @@ +# glfos-welcome-screen +Welcome screen for glf os (a linux distribution, based on nixos) + +## Build the derivation and test it + +```bash +nix-shell -p appimage-run +appimage-run Welcome_screen-x86_64.AppImage +``` diff --git a/pkgs/welcome-screen/analysis_options.yaml b/pkgs/welcome-screen/analysis_options.yaml new file mode 100644 index 00000000..0d290213 --- /dev/null +++ b/pkgs/welcome-screen/analysis_options.yaml @@ -0,0 +1,28 @@ +# This file configures the analyzer, which statically analyzes Dart code to +# check for errors, warnings, and lints. +# +# The issues identified by the analyzer are surfaced in the UI of Dart-enabled +# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be +# invoked from the command line by running `flutter analyze`. + +# The following line activates a set of recommended lints for Flutter apps, +# packages, and plugins designed to encourage good coding practices. +include: package:flutter_lints/flutter.yaml + +linter: + # The lint rules applied to this project can be customized in the + # section below to disable rules from the `package:flutter_lints/flutter.yaml` + # included above or to enable additional rules. A list of all available lints + # and their documentation is published at https://dart.dev/lints. + # + # Instead of disabling a lint rule for the entire project in the + # section below, it can also be suppressed for a single line of code + # or a specific dart file by using the `// ignore: name_of_lint` and + # `// ignore_for_file: name_of_lint` syntax on the line or in the file + # producing the lint. + rules: + # avoid_print: false # Uncomment to disable the `avoid_print` rule + # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule + +# Additional information about this file can be found at +# https://dart.dev/guides/language/analysis-options diff --git a/pkgs/welcome-screen/appImage/AppRun b/pkgs/welcome-screen/appImage/AppRun new file mode 100644 index 00000000..2ea4f981 --- /dev/null +++ b/pkgs/welcome-screen/appImage/AppRun @@ -0,0 +1,4 @@ +#!/bin/sh +HERE="$(dirname "$(readlink -f "$0")")" +export LD_LIBRARY_PATH="$HERE/lib:$HERE/usr/lib:$LD_LIBRARY_PATH" +exec "$HERE/glfos_welcome_screen" \ No newline at end of file diff --git a/pkgs/welcome-screen/appImage/glfosWelcomeScreen.desktop b/pkgs/welcome-screen/appImage/glfosWelcomeScreen.desktop new file mode 100644 index 00000000..67d4966f --- /dev/null +++ b/pkgs/welcome-screen/appImage/glfosWelcomeScreen.desktop @@ -0,0 +1,8 @@ +[Desktop Entry] +Version=1.0 +Type=Application +Terminal=false +Name=Welcome screen +Exec=glfos_welcome_screen %u +Icon=glfosWelcomeScreen +Categories=Utility; \ No newline at end of file diff --git a/pkgs/welcome-screen/assets/images/512x512.png b/pkgs/welcome-screen/assets/images/512x512.png new file mode 100644 index 00000000..74df13fd Binary files /dev/null and b/pkgs/welcome-screen/assets/images/512x512.png differ diff --git a/pkgs/welcome-screen/assets/images/diskmanager_128.png b/pkgs/welcome-screen/assets/images/diskmanager_128.png new file mode 100644 index 00000000..bb2a0e5a Binary files /dev/null and b/pkgs/welcome-screen/assets/images/diskmanager_128.png differ diff --git a/pkgs/welcome-screen/assets/images/diskmanager_menu.png b/pkgs/welcome-screen/assets/images/diskmanager_menu.png new file mode 100644 index 00000000..9b05708a Binary files /dev/null and b/pkgs/welcome-screen/assets/images/diskmanager_menu.png differ diff --git a/pkgs/welcome-screen/assets/images/easyflatpak_128.png b/pkgs/welcome-screen/assets/images/easyflatpak_128.png new file mode 100644 index 00000000..ac6d34b2 Binary files /dev/null and b/pkgs/welcome-screen/assets/images/easyflatpak_128.png differ diff --git a/pkgs/welcome-screen/assets/images/easyflatpak_menu.png b/pkgs/welcome-screen/assets/images/easyflatpak_menu.png new file mode 100644 index 00000000..4c5167e6 Binary files /dev/null and b/pkgs/welcome-screen/assets/images/easyflatpak_menu.png differ diff --git a/pkgs/welcome-screen/assets/images/gaming.png b/pkgs/welcome-screen/assets/images/gaming.png new file mode 100644 index 00000000..cc0fce35 Binary files /dev/null and b/pkgs/welcome-screen/assets/images/gaming.png differ diff --git a/pkgs/welcome-screen/assets/images/gaming_menu.png b/pkgs/welcome-screen/assets/images/gaming_menu.png new file mode 100644 index 00000000..a5fc8043 Binary files /dev/null and b/pkgs/welcome-screen/assets/images/gaming_menu.png differ diff --git a/pkgs/welcome-screen/assets/images/glf-logo-128.png b/pkgs/welcome-screen/assets/images/glf-logo-128.png new file mode 100644 index 00000000..424aed3e Binary files /dev/null and b/pkgs/welcome-screen/assets/images/glf-logo-128.png differ diff --git a/pkgs/welcome-screen/assets/images/glf-logo-128_dark.png b/pkgs/welcome-screen/assets/images/glf-logo-128_dark.png new file mode 100644 index 00000000..55c55aeb Binary files /dev/null and b/pkgs/welcome-screen/assets/images/glf-logo-128_dark.png differ diff --git a/pkgs/welcome-screen/assets/images/glf-logo-256.png b/pkgs/welcome-screen/assets/images/glf-logo-256.png new file mode 100644 index 00000000..349a28e3 Binary files /dev/null and b/pkgs/welcome-screen/assets/images/glf-logo-256.png differ diff --git a/pkgs/welcome-screen/assets/images/glf-logo-256_dark.png b/pkgs/welcome-screen/assets/images/glf-logo-256_dark.png new file mode 100644 index 00000000..ef005133 Binary files /dev/null and b/pkgs/welcome-screen/assets/images/glf-logo-256_dark.png differ diff --git a/pkgs/welcome-screen/assets/images/glf-logo_menu.png b/pkgs/welcome-screen/assets/images/glf-logo_menu.png new file mode 100644 index 00000000..e728b3fc Binary files /dev/null and b/pkgs/welcome-screen/assets/images/glf-logo_menu.png differ diff --git a/pkgs/welcome-screen/assets/images/glf-logo_menu_dark.png b/pkgs/welcome-screen/assets/images/glf-logo_menu_dark.png new file mode 100644 index 00000000..cd904d28 Binary files /dev/null and b/pkgs/welcome-screen/assets/images/glf-logo_menu_dark.png differ diff --git a/pkgs/welcome-screen/assets/images/help.png b/pkgs/welcome-screen/assets/images/help.png new file mode 100644 index 00000000..a1fc4edd Binary files /dev/null and b/pkgs/welcome-screen/assets/images/help.png differ diff --git a/pkgs/welcome-screen/assets/images/help_dark.png b/pkgs/welcome-screen/assets/images/help_dark.png new file mode 100644 index 00000000..50c605b5 Binary files /dev/null and b/pkgs/welcome-screen/assets/images/help_dark.png differ diff --git a/pkgs/welcome-screen/assets/images/help_menu.png b/pkgs/welcome-screen/assets/images/help_menu.png new file mode 100644 index 00000000..0d63c58b Binary files /dev/null and b/pkgs/welcome-screen/assets/images/help_menu.png differ diff --git a/pkgs/welcome-screen/assets/images/help_menu_dark.png b/pkgs/welcome-screen/assets/images/help_menu_dark.png new file mode 100644 index 00000000..90e43228 Binary files /dev/null and b/pkgs/welcome-screen/assets/images/help_menu_dark.png differ diff --git a/pkgs/welcome-screen/assets/images/studio_128.png b/pkgs/welcome-screen/assets/images/studio_128.png new file mode 100644 index 00000000..f7960951 Binary files /dev/null and b/pkgs/welcome-screen/assets/images/studio_128.png differ diff --git a/pkgs/welcome-screen/assets/images/studio_128_menu.png b/pkgs/welcome-screen/assets/images/studio_128_menu.png new file mode 100644 index 00000000..1baed75f Binary files /dev/null and b/pkgs/welcome-screen/assets/images/studio_128_menu.png differ diff --git a/pkgs/welcome-screen/assets/images/updates.png b/pkgs/welcome-screen/assets/images/updates.png new file mode 100644 index 00000000..6428b550 Binary files /dev/null and b/pkgs/welcome-screen/assets/images/updates.png differ diff --git a/pkgs/welcome-screen/assets/images/updates_menu.png b/pkgs/welcome-screen/assets/images/updates_menu.png new file mode 100644 index 00000000..ac82dd7a Binary files /dev/null and b/pkgs/welcome-screen/assets/images/updates_menu.png differ diff --git a/pkgs/welcome-screen/assets/localizations/en.json b/pkgs/welcome-screen/assets/localizations/en.json new file mode 100644 index 00000000..ac8b8c94 --- /dev/null +++ b/pkgs/welcome-screen/assets/localizations/en.json @@ -0,0 +1,21 @@ +{ + "lang_en": "English", + "lang_fr": "French", + "app_title": "Welcome", + "menu_home": "Home", + "menu_gaming": "Gaming", + "menu_studio": "Studio", + "menu_updates": "Updates", + "menu_diskManager": "Disk Management", + "menu_easyflatpak": "Software Center", + "menu_powerusers": "Advanced Users", + "menu_help": "Need help?", + "page_home_title": "Home", + "page_gaming_title": "Gaming-Oriented", + "page_studio_title": "Studio", + "page_updates_title": "Updates", + "page_diskmanager_title": "Disk Management", + "page_easyflatpak_title": "Software Center", + "page_help_title": "Need help?", + "bottom_show_window_next_time": "Show this window next time?" +} \ No newline at end of file diff --git a/pkgs/welcome-screen/assets/localizations/fr.json b/pkgs/welcome-screen/assets/localizations/fr.json new file mode 100644 index 00000000..8193c57f --- /dev/null +++ b/pkgs/welcome-screen/assets/localizations/fr.json @@ -0,0 +1,21 @@ +{ + "lang_en": "English", + "lang_fr": "Français", + "app_title": "Bienvenue", + "menu_home": "Accueil", + "menu_gaming": "Gaming", + "menu_studio": "Studio", + "menu_updates": "Mises à jour", + "menu_diskManager": "Gestion des disques", + "menu_easyflatpak": "Logithèque", + "menu_powerusers": "Utilisateurs avancés", + "menu_help": "Besoin d'aide ?", + "page_home_title": "Accueil", + "page_gaming_title": "Orientée Gaming", + "page_studio_title": "Studio", + "page_updates_title": "Mises à jour", + "page_diskmanager_title": "Gestion des disques", + "page_easyflatpak_title": "Logithèque", + "page_help_title": "Besoin d'aide ?", + "bottom_show_window_next_time": "Afficher au démarrage" +} \ No newline at end of file diff --git a/pkgs/welcome-screen/assets/localizations/markdowns/en/page_diskmanager_body.md b/pkgs/welcome-screen/assets/localizations/markdowns/en/page_diskmanager_body.md new file mode 100644 index 00000000..0f857175 --- /dev/null +++ b/pkgs/welcome-screen/assets/localizations/markdowns/en/page_diskmanager_body.md @@ -0,0 +1,3 @@ +GLF OS comes with a disk management tool. +You can mount your secondary drives using a graphical interface. +They will then be automatically mounted and accessible each time you restart. diff --git a/pkgs/welcome-screen/assets/localizations/markdowns/en/page_easyflatpak_body.md b/pkgs/welcome-screen/assets/localizations/markdowns/en/page_easyflatpak_body.md new file mode 100644 index 00000000..a9cd1046 --- /dev/null +++ b/pkgs/welcome-screen/assets/localizations/markdowns/en/page_easyflatpak_body.md @@ -0,0 +1,4 @@ +GLF OS includes the EasyFlatpak software center, which lets you install flatpak applications in just a few clicks. + +You can also install multiple applications at once. +We’ve also created app groups organized by theme: Gaming, Graphic Design, and Software Development. diff --git a/pkgs/welcome-screen/assets/localizations/markdowns/en/page_gaming_body.md b/pkgs/welcome-screen/assets/localizations/markdowns/en/page_gaming_body.md new file mode 100644 index 00000000..68f0f791 --- /dev/null +++ b/pkgs/welcome-screen/assets/localizations/markdowns/en/page_gaming_body.md @@ -0,0 +1,3 @@ +Compatible with any x86_64 PC, GLF OS comes with everything you need to game on Linux: Steam, Lutris, Heroic Games Launcher, and MangoHud—preinstalled and configurable using our custom tool, GLF-OS MangoHud Configuration. + +GLF OS also includes specific configurations to support your hardware, such as your PS5 DualSense™, Xbox™, or 8bitdo® controller, and your racing wheels. diff --git a/pkgs/welcome-screen/assets/localizations/markdowns/en/page_help_body.md b/pkgs/welcome-screen/assets/localizations/markdowns/en/page_help_body.md new file mode 100644 index 00000000..f3608f16 --- /dev/null +++ b/pkgs/welcome-screen/assets/localizations/markdowns/en/page_help_body.md @@ -0,0 +1,6 @@ +Here are some useful links to find help with GLF OS: + +* [GLF OS Page](https://www.gaminglinux.fr/glf-os/) +* [Our Documentation](https://gaming-linux-fr.github.io/GLF-OS/) +* [Our GitHub](https://github.com/Gaming-Linux-FR/GLF-OS/) +* [Our Discord](https://discord.gg/tqXyUMEwq3) diff --git a/pkgs/welcome-screen/assets/localizations/markdowns/en/page_home_body.md b/pkgs/welcome-screen/assets/localizations/markdowns/en/page_home_body.md new file mode 100644 index 00000000..d950bc88 --- /dev/null +++ b/pkgs/welcome-screen/assets/localizations/markdowns/en/page_home_body.md @@ -0,0 +1,5 @@ +Welcome to GLF OS! + +This tool is designed to introduce you to the main features of your new system so you can quickly get your bearings. + +If you don't find the answers to your questions, use the "Need help" section to contact us! diff --git a/pkgs/welcome-screen/assets/localizations/markdowns/en/page_studio_body.md b/pkgs/welcome-screen/assets/localizations/markdowns/en/page_studio_body.md new file mode 100644 index 00000000..5d424fd5 --- /dev/null +++ b/pkgs/welcome-screen/assets/localizations/markdowns/en/page_studio_body.md @@ -0,0 +1,4 @@ +While GLF OS is primarily focused on Gaming, it also offers tools for content creators with its Studio edition! + +This edition includes tools like OBS, Kdenlive, GIMP, Audacity, and especially DaVinci Resolve (free or Studio version). +To use this edition, you can select it during the installation of GLF OS or later using the GLF-OS Environment Selection tool, which allows you to switch desktop environments and editions. diff --git a/pkgs/welcome-screen/assets/localizations/markdowns/en/page_updates_body.md b/pkgs/welcome-screen/assets/localizations/markdowns/en/page_updates_body.md new file mode 100644 index 00000000..1973fee4 --- /dev/null +++ b/pkgs/welcome-screen/assets/localizations/markdowns/en/page_updates_body.md @@ -0,0 +1,5 @@ +GLF OS will check for new updates (glf-update) 5 minutes after your PC starts, and then every 12 hours if the PC remains on. + +If updates are available, they will be applied in the background. +You’ll be notified via a notification once the update is complete. +At the next reboot, the system will switch to a new image with the latest updates. diff --git a/pkgs/welcome-screen/assets/localizations/markdowns/fr/page_diskmanager_body.md b/pkgs/welcome-screen/assets/localizations/markdowns/fr/page_diskmanager_body.md new file mode 100644 index 00000000..2d46e041 --- /dev/null +++ b/pkgs/welcome-screen/assets/localizations/markdowns/fr/page_diskmanager_body.md @@ -0,0 +1,3 @@ +GLF OS est fournit avec un outil de gestion de disques. +Vous pourrez monter vos disques secondaires via une interface graphique. +Vous les retrouverez ainsi automatiquement montés et accessibles à chaque redémarrage. diff --git a/pkgs/welcome-screen/assets/localizations/markdowns/fr/page_easyflatpak_body.md b/pkgs/welcome-screen/assets/localizations/markdowns/fr/page_easyflatpak_body.md new file mode 100644 index 00000000..f1831be9 --- /dev/null +++ b/pkgs/welcome-screen/assets/localizations/markdowns/fr/page_easyflatpak_body.md @@ -0,0 +1,4 @@ +GLF OS possède la logithèque EasyFlatpak qui vous permet d'installer vos logiciels au format flatpak en quelques clics. + +Il est également possible d'installer plusieurs applications en une seule fois. +Nous avons aussi créé des groupes d'application classés par thème : Gaming, Créations graphiques et Développement logiciel. diff --git a/pkgs/welcome-screen/assets/localizations/markdowns/fr/page_gaming_body.md b/pkgs/welcome-screen/assets/localizations/markdowns/fr/page_gaming_body.md new file mode 100644 index 00000000..b9ae243e --- /dev/null +++ b/pkgs/welcome-screen/assets/localizations/markdowns/fr/page_gaming_body.md @@ -0,0 +1,3 @@ +Compatible avec tout PC x86_64, GLF OS embarque tout ce qu’il faut pour jouer sous Linux : Steam, Lutris, Heroic Games Launcher, Mangohud préinstallé et configurable grâce à notre outil maison "GLF-OS MongoHud Configuration". + +GLF OS arrive également avec des configurations spécifiques pour prendre en charge votre matériel, comme votre manette PS5 DualSense™, Xbox™ ou 8bitdo® ou vos volants. diff --git a/pkgs/welcome-screen/assets/localizations/markdowns/fr/page_help_body.md b/pkgs/welcome-screen/assets/localizations/markdowns/fr/page_help_body.md new file mode 100644 index 00000000..96418ef9 --- /dev/null +++ b/pkgs/welcome-screen/assets/localizations/markdowns/fr/page_help_body.md @@ -0,0 +1,6 @@ +Voici quelques liens utiles pour trouver de l'aide sur GLF OS : + +- [Page GLF OS](https://www.gaminglinux.fr/glf-os/) +- [Notre documentation](https://gaming-linux-fr.github.io/GLF-OS/) +- [Notre Github](https://github.com/Gaming-Linux-FR/GLF-OS/) +- [Notre Discord](https://discord.gg/tqXyUMEwq3) \ No newline at end of file diff --git a/pkgs/welcome-screen/assets/localizations/markdowns/fr/page_home_body.md b/pkgs/welcome-screen/assets/localizations/markdowns/fr/page_home_body.md new file mode 100644 index 00000000..806b5dc2 --- /dev/null +++ b/pkgs/welcome-screen/assets/localizations/markdowns/fr/page_home_body.md @@ -0,0 +1,5 @@ +Bienvenue sur GLF OS ! + +Cet outil a pour but de vous présenter les principales fonctionnalités de votre nouveau système afin que vous puissiez prendre vos repères rapidement. + +Si vous ne trouvez pas les réponses à vos questions, utilisez la section "Besoin d'aide" pour nous contacter ! diff --git a/pkgs/welcome-screen/assets/localizations/markdowns/fr/page_studio_body.md b/pkgs/welcome-screen/assets/localizations/markdowns/fr/page_studio_body.md new file mode 100644 index 00000000..18ae759a --- /dev/null +++ b/pkgs/welcome-screen/assets/localizations/markdowns/fr/page_studio_body.md @@ -0,0 +1,4 @@ +Si GLF OS est principalement axée sur le Gaming, elle offre aussi des outils pour les créateurs de contenus avec son édition Studio ! + +Cette édition embarque les outils OBS, Kdenlive, GIMP, Audacity et surtout Davinci Resolve (version gratuite ou studio). +Pour profiter de cette édition, vous pouvez faire ce choix directement à l'installation de GLF OS ou plus tard graĉe à l'outil "GLF-OS Environment Selection" qui permet de changer d'environnement de bureau et d'édition. diff --git a/pkgs/welcome-screen/assets/localizations/markdowns/fr/page_updates_body.md b/pkgs/welcome-screen/assets/localizations/markdowns/fr/page_updates_body.md new file mode 100644 index 00000000..44b6d007 --- /dev/null +++ b/pkgs/welcome-screen/assets/localizations/markdowns/fr/page_updates_body.md @@ -0,0 +1,5 @@ +GLF OS vérifiera si de nouvelles mises à jour sont disponibles (glf-update) 5 minutes après le démarrage de votre PC, puis toutes les 12 heures si le PC reste allumé. + +Si des mises à jour sont disponibles, elles seront appliquées en tâche de fond. +Vous serez informé via une notification lorsque la mise à jour sera terminée. +Au prochain redémarrage, le système basculera sur une nouvelle image avec les dernières mises à jour. diff --git a/pkgs/welcome-screen/assets/logo.png b/pkgs/welcome-screen/assets/logo.png new file mode 100644 index 00000000..74df13fd Binary files /dev/null and b/pkgs/welcome-screen/assets/logo.png differ diff --git a/pkgs/welcome-screen/buildAppImage.sh b/pkgs/welcome-screen/buildAppImage.sh new file mode 100755 index 00000000..1844416d --- /dev/null +++ b/pkgs/welcome-screen/buildAppImage.sh @@ -0,0 +1,89 @@ +#!/usr/bin/env bash + +# Clean up previous build +rm -rf /tmp/glfosWelcomeScreen.AppDir + +# Build Flutter app for Linux +flutter build linux --release + +# Create AppDir structure +mkdir -p /tmp/glfosWelcomeScreen.AppDir/usr/lib + +set -euo pipefail +SEEN_LIBS=() # <--- FIX: initialize this array + +APP_BIN="build/linux/x64/release/bundle/glfos_welcome_screen" +DEST_DIR="/tmp/glfosWelcomeScreen.AppDir/usr/lib" + +copy_lib() { + local lib_path="$1" + + [[ "$lib_path" != /* || ! -f "$lib_path" ]] && return + + local lib_name + lib_name=$(basename "$lib_path") + local dest_path="$DEST_DIR/$lib_name" + + # Only include libraries that match your whitelist + case "$lib_name" in + libepoxy.so.*| \ + libgtk-3.so.*| \ + libadwaita-1.so.*| \ + libgraphite2.so.*| \ + libpangocairo-1.0.so.*| \ + libpango-1.0.so.*| \ + libatk-1.0.so.*| \ + libgdk-3.so.*| \ + libcairo.so.*| \ + libatk-bridge-2.0.so.*| \ + libpangoft2-1.0.so.*| \ + libpng16.so.*) + ;; + *) + #echo "Skipping (not whitelisted): $lib_name" + return + ;; + esac + + if [[ ! " ${SEEN_LIBS[*]} " =~ " ${lib_name} " ]]; then + SEEN_LIBS+=("$lib_name") + #echo "Copying $lib_name" + cp "$lib_path" "$dest_path" + + # Recursively resolve whitelisted dependencies + ldd "$lib_path" | while read -r line; do + subdep=$(echo "$line" | grep -o '/[^ ]*' || true) + if [[ -n "$subdep" && -f "$subdep" ]]; then + copy_lib "$subdep" + fi + done + fi +} + + + + +# Start with main binary +# Start with main binary: extract all valid absolute paths +ldd "$APP_BIN" | while read -r line; do + lib_path=$(echo "$line" | grep -o '/[^ ]*' || true) + if [[ -n "$lib_path" && -f "$lib_path" ]]; then + copy_lib "$lib_path" + fi +done + + + +# Copy main bundle contents and AppImage metadata +cp -r build/linux/x64/release/bundle/* /tmp/glfosWelcomeScreen.AppDir/ +cp assets/logo.png /tmp/glfosWelcomeScreen.AppDir/glfosWelcomeScreen.png +cp appImage/AppRun /tmp/glfosWelcomeScreen.AppDir/AppRun +chmod +x /tmp/glfosWelcomeScreen.AppDir/AppRun +cp appImage/glfosWelcomeScreen.desktop /tmp/glfosWelcomeScreen.AppDir/ +mkdir -p /tmp/glfosWelcomeScreen.AppDir/usr/lib/flutter_assets +cp -r assets /tmp/glfosWelcomeScreen.AppDir/usr/lib/flutter_assets/ + +# Build the AppImage +appimagetool-x86_64.AppImage /tmp/glfosWelcomeScreen.AppDir +rm -f dist/Welcome_screen-x86_64.AppImage +mv Welcome_screen-x86_64.AppImage dist/ diff --git a/pkgs/welcome-screen/buildAppImageWithDebug.sh b/pkgs/welcome-screen/buildAppImageWithDebug.sh new file mode 100755 index 00000000..e6975e67 --- /dev/null +++ b/pkgs/welcome-screen/buildAppImageWithDebug.sh @@ -0,0 +1,89 @@ +#!/usr/bin/env bash + +# Clean up previous build +rm -rf /tmp/glfosWelcomeScreen.AppDir + +# Build Flutter app for Linux +flutter build linux --debug + +# Create AppDir structure +mkdir -p /tmp/glfosWelcomeScreen.AppDir/usr/lib + +set -euo pipefail +SEEN_LIBS=() # <--- FIX: initialize this array + +APP_BIN="build/linux/x64/release/bundle/glfos_welcome_screen" +DEST_DIR="/tmp/glfosWelcomeScreen.AppDir/usr/lib" + +copy_lib() { + local lib_path="$1" + + [[ "$lib_path" != /* || ! -f "$lib_path" ]] && return + + local lib_name + lib_name=$(basename "$lib_path") + local dest_path="$DEST_DIR/$lib_name" + + # Only include libraries that match your whitelist + case "$lib_name" in + libepoxy.so.*| \ + libgtk-3.so.*| \ + libadwaita-1.so.*| \ + libgraphite2.so.*| \ + libpangocairo-1.0.so.*| \ + libpango-1.0.so.*| \ + libatk-1.0.so.*| \ + libgdk-3.so.*| \ + libcairo.so.*| \ + libatk-bridge-2.0.so.*| \ + libpangoft2-1.0.so.*| \ + libpng16.so.*) + ;; + *) + #echo "Skipping (not whitelisted): $lib_name" + return + ;; + esac + + if [[ ! " ${SEEN_LIBS[*]} " =~ " ${lib_name} " ]]; then + SEEN_LIBS+=("$lib_name") + echo "Copying $lib_name" + cp "$lib_path" "$dest_path" + + # Recursively resolve whitelisted dependencies + ldd "$lib_path" | while read -r line; do + subdep=$(echo "$line" | grep -o '/[^ ]*' || true) + if [[ -n "$subdep" && -f "$subdep" ]]; then + copy_lib "$subdep" + fi + done + fi +} + + + + +# Start with main binary +# Start with main binary: extract all valid absolute paths +ldd "$APP_BIN" | while read -r line; do + lib_path=$(echo "$line" | grep -o '/[^ ]*' || true) + if [[ -n "$lib_path" && -f "$lib_path" ]]; then + copy_lib "$lib_path" + fi +done + + + +# Copy main bundle contents and AppImage metadata +cp -r build/linux/x64/release/bundle/* /tmp/glfosWelcomeScreen.AppDir/ +cp assets/logo.png /tmp/glfosWelcomeScreen.AppDir/glfosWelcomeScreen.png +cp appImage/AppRun /tmp/glfosWelcomeScreen.AppDir/AppRun +chmod +x /tmp/glfosWelcomeScreen.AppDir/AppRun +cp appImage/glfosWelcomeScreen.desktop /tmp/glfosWelcomeScreen.AppDir/ +mkdir -p /tmp/glfosWelcomeScreen.AppDir/usr/lib/flutter_assets +cp -r assets /tmp/glfosWelcomeScreen.AppDir/usr/lib/flutter_assets/ + +# Build the AppImage +appimagetool-x86_64.AppImage /tmp/glfosWelcomeScreen.AppDir +rm -f dist/Welcome_screen-x86_64.AppImage +mv Welcome_screen-x86_64.AppImage dist/Welcome_screen-x86_64_withDebug.AppImage diff --git a/pkgs/welcome-screen/buildNixDerivation.sh b/pkgs/welcome-screen/buildNixDerivation.sh new file mode 100755 index 00000000..b35a6444 --- /dev/null +++ b/pkgs/welcome-screen/buildNixDerivation.sh @@ -0,0 +1 @@ +nix-build -A glfos_welcome_screen --show-trace \ No newline at end of file diff --git a/pkgs/welcome-screen/default.nix b/pkgs/welcome-screen/default.nix new file mode 100644 index 00000000..b76c9231 --- /dev/null +++ b/pkgs/welcome-screen/default.nix @@ -0,0 +1,10 @@ +# default.nix + +let + nixpkgs = fetchTarball "https://github.com/NixOS/nixpkgs/archive/refs/tags/25.11-pre.tar.gz"; + pkgs = import nixpkgs { config = { }; overlays = [ ]; }; +in +# Export glfos_welcome_screen as an attribute at the top level +{ + glfos_welcome_screen = pkgs.callPackage ./glfos_welcome_screen.nix { }; +} \ No newline at end of file diff --git a/pkgs/welcome-screen/flake.nix b/pkgs/welcome-screen/flake.nix new file mode 100644 index 00000000..4ac2c1b3 --- /dev/null +++ b/pkgs/welcome-screen/flake.nix @@ -0,0 +1,52 @@ +{ + description = "GLF OS Welcome Screen using Flutter 3.2.7"; + + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11"; + flake-utils.url = "github:numtide/flake-utils"; + }; + + outputs = { self, nixpkgs, flake-utils, ... }: + flake-utils.lib.eachDefaultSystem (system: + let + pkgs = import nixpkgs { + inherit system; + overlays = [ + # Overlay to expose flutter327 + (final: prev: { + flutter327 = prev.callPackage "${nixpkgs}/pkgs/development/compilers/flutter/versions/flutter_3_2_7" {}; + }) + ]; + }; + + flutter327 = pkgs.flutter327; + in { + packages.default = flutter327.buildFlutterApplication { + pname = "glfos-welcome-screen"; + version = "1.0.11"; + # Fetch your project source + src = pkgs.fetchFromGitHub { + owner = "imikado"; + repo = "glfos-welcome-screen"; + rev = "1.0.12"; + sha256 = "0piqdp1rswv6b4bqfp7475kd5z96kvx5kwhiqdjgh4r0q4xzn30a"; # Get via nix-prefetch-url or nix build error + }; + + flutterBuildArgs = [ "linux" ]; + + nativeBuildInputs = with pkgs; [ + pkg-config + libadwaita + glib + gtk3 + ]; + + meta = with pkgs.lib; { + description = "GLF OS Welcome screen built with Flutter 3.2.7"; + homepage = "https://github.com/imikado/glfos-welcome-screen"; + license = licenses.mit; + platforms = platforms.linux; + }; + }; + }); +} diff --git a/pkgs/welcome-screen/glfos_welcome_screen.nix b/pkgs/welcome-screen/glfos_welcome_screen.nix new file mode 100644 index 00000000..aea38e0d --- /dev/null +++ b/pkgs/welcome-screen/glfos_welcome_screen.nix @@ -0,0 +1,77 @@ +{ pkgs ? import {} }: + +let + baseApp = pkgs.flutter.buildFlutterApplication { + pname = "glfos_welcome_screen"; + version = "0.0.3"; + + # Fetch your project source + src = pkgs.fetchFromGitHub { + owner = "imikado"; + repo = "glfos-welcome-screen"; + rev = "1.0.12"; + sha256 = "0piqdp1rswv6b4bqfp7475kd5z96kvx5kwhiqdjgh4r0q4xzn30a"; # Get via nix-prefetch-url or nix build error + }; + + flutterChannel = "stable"; # Can be "beta", "master", etc. + + nativeBuildInputs = with pkgs; [ + pkg-config + ]; + + buildInputs = with pkgs; [ + gtk4 + libadwaita + libepoxy + libxkbcommon + glib + cairo + pango + atk + ]; + + buildPhase = '' + rm -rf build + + # Try to override RPATH in Flutter's cmake phase + export CMAKE_BUILD_RPATH_USE_ORIGIN=ON + export CMAKE_SKIP_BUILD_RPATH=OFF + export CMAKE_INSTALL_RPATH="$out/lib" + export CMAKE_BUILD_RPATH="$out/lib" + export CMAKE_INSTALL_RPATH_USE_LINK_PATH=FALSE + export CMAKE_INSTALL_RPATH_USE_ORIGIN=ON + + flutter build linux --release + ''; + + installPhase = '' + mkdir -p $out/bin + cp -r build/linux/x64/release/bundle/* $out/ + + ln -s $out/glfos_welcome_screen $out/bin/glfos_welcome_screen + + # Remove bad /build RPATHs in shared libs + for lib in $out/lib/*.so; do + if patchelf --print-rpath "$lib" | grep -q "/build"; then + echo "Fixing RPATH in $lib" + patchelf --set-rpath "$out/lib" "$lib" + fi + done +''; + + strictDeps = true; + + + autoPubspecLock = ./pubspec.lock; + + meta = with pkgs.lib; { + description = "Welcome screen"; + license = licenses.mit; + platforms = platforms.linux; + }; + }; +in +# Override outputs to disable 'debug' output that causes build failure +baseApp.overrideAttrs (_: { + outputs = [ "out" ]; +}) diff --git a/pkgs/welcome-screen/lib/Api/localization_api.dart b/pkgs/welcome-screen/lib/Api/localization_api.dart new file mode 100644 index 00000000..1972d09a --- /dev/null +++ b/pkgs/welcome-screen/lib/Api/localization_api.dart @@ -0,0 +1,55 @@ +import 'dart:convert'; + +import 'package:flutter/services.dart'; + +class LocalizationApi { + static final LocalizationApi _singleton = LocalizationApi._internal(); + String languageCode = 'fr'; + + factory LocalizationApi({String newLanguageCode = ''}) { + if (newLanguageCode.isNotEmpty && + _localizedValues.containsKey(newLanguageCode)) { + _singleton.languageCode = newLanguageCode; + } + return _singleton; + } + + static final _localizedValues = >{ + 'en': {}, + 'fr': {}, + }; + + LocalizationApi._internal(); + + setLanguageCode(String newLanguageCode) { + languageCode = newLanguageCode; + } + + static List languages() => ['fr']; // _localizedValues.keys.toList(); + + Future load(String locale) async { + for (String languageLoop in languages()) { + String recipiesString = await rootBundle + .loadString("assets/localizations/$languageLoop.json"); + _localizedValues[languageLoop] = + Map.from(json.decode(recipiesString)); + } + } + + Future markdown(String key) async { + return rootBundle + .loadString('assets/localizations/markdowns/$languageCode/$key.md'); + } + + String tr(String key, [Map? params]) { + String text = _localizedValues[languageCode]![key] ?? key; + + if (params != null) { + params.forEach((key, value) { + text = text.replaceAll('{$key}', value); + }); + } + + return text; + } +} diff --git a/pkgs/welcome-screen/lib/View/Shared/sharedmarkdown_view.dart b/pkgs/welcome-screen/lib/View/Shared/sharedmarkdown_view.dart new file mode 100644 index 00000000..bd15daf0 --- /dev/null +++ b/pkgs/welcome-screen/lib/View/Shared/sharedmarkdown_view.dart @@ -0,0 +1,168 @@ +import 'dart:io'; + +import 'package:flutter/material.dart'; +import 'package:flutter_markdown/flutter_markdown.dart'; +import 'package:glfos_welcome_screen/Api/localization_api.dart'; +import 'package:url_launcher/url_launcher.dart'; +import 'package:markdown/markdown.dart' as md; + +class SharedMarkdownView extends StatefulWidget { + const SharedMarkdownView( + {super.key, + required this.titleKey, + required this.bodyKey, + required this.image, + required this.command}); + + final String titleKey; + final String bodyKey; + final String image; + final String command; + + @override + State createState() => _SharedMarkdownViewState(); +} + +class _SharedMarkdownViewState extends State { + String? bodyText; + + @override + void initState() { + super.initState(); + _loadMarkdown(); + } + + Future _loadMarkdown() async { + final newBodyText = await LocalizationApi().markdown(widget.bodyKey); + if (mounted) { + setState(() => bodyText = newBodyText); + } + } + + Future _onTapLink(String text, String? href, String title) async { + if (href != null) { + if (href.startsWith('flatpak://')) { + String command = href.replaceAll('flatpak://', ''); + await Process.run('flatpak', ['run', command]); + return; + } else if (href.startsWith('bash://')) { + String command = href.replaceAll('bash://', ''); + await Process.run(command, []); + return; + } + + final uri = Uri.parse(href); + if (await canLaunchUrl(uri)) { + await launchUrl(uri); + } else { + debugPrint('Could not launch $href'); + } + } + } + + Future launchCommand(String commandName) async { + print('ask to launch ' + commandName); + if (commandName.startsWith('flatpak://')) { + String command = commandName.replaceAll('flatpak://', ''); + await Process.run('flatpak', ['run', command]); + return; + } else if (commandName.startsWith('bash://')) { + String command = commandName.replaceAll('bash://', ''); + print('try to launch "$command"'); + + var result = + await Process.run('bash', ['-lc', 'env -u LD_LIBRARY_PATH $command']); + print(result.stdout); + print(result.stderr); + + return; + } else { + print('unexpected command : ' + commandName); + } + } + + @override + Widget build(BuildContext context) { + return LayoutBuilder( + builder: (context, constraints) { + if (bodyText == null) { + return const Center(child: CircularProgressIndicator()); + } + + return SingleChildScrollView( + padding: const EdgeInsets.all(16.0), + child: ConstrainedBox( + constraints: BoxConstraints( + minHeight: constraints.maxHeight, + maxWidth: constraints.maxWidth, + ), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + if (widget.image != '') + const SizedBox( + height: 30, + ), + if (widget.image != '') + Center( + child: InkWell( + onTap: widget.command != '' + ? () { + launchCommand(widget.command); + } + : null, + child: Image.asset(widget.image)), + ), + if (widget.titleKey != '') const SizedBox(height: 30), + if (widget.titleKey != '') + Center( + child: Text( + LocalizationApi().tr(widget.titleKey), + style: Theme.of(context).textTheme.headlineSmall, + textAlign: TextAlign.center, + ), + ), + if (widget.titleKey != '') const SizedBox(height: 20), + Center( + child: MarkdownBody( + fitContent: true, + shrinkWrap: true, + //imageDirectory: 'assets/images/', + data: bodyText!, + styleSheet: + MarkdownStyleSheet.fromTheme(Theme.of(context)).copyWith( + p: Theme.of(context) + .textTheme + .bodyMedium + ?.copyWith(overflow: TextOverflow.visible), + ), + onTapLink: _onTapLink, + builders: { + 'img': MarkdownElementBuilderImageDebug(), + }, + )) + ], + ), + ), + ); + }, + ); + } +} + +class MarkdownElementBuilderImageDebug extends MarkdownElementBuilder { + @override + Widget visitElementAfter(md.Element element, TextStyle? preferredStyle) { + final imageUrl = element.attributes['src'] ?? ''; + debugPrint('🔍 Attempting to load: $imageUrl'); + + return Center( + child: Image.asset( + 'assets/images/$imageUrl', + errorBuilder: (context, error, stackTrace) { + debugPrint('❌ Failed to load image: $imageUrl'); + return const Text('🚫 Image failed'); + }, + )); + } +} diff --git a/pkgs/welcome-screen/lib/View/diskmanger_view.dart b/pkgs/welcome-screen/lib/View/diskmanger_view.dart new file mode 100644 index 00000000..48c45249 --- /dev/null +++ b/pkgs/welcome-screen/lib/View/diskmanger_view.dart @@ -0,0 +1,23 @@ +import 'package:flutter/material.dart'; +import 'package:glfos_welcome_screen/View/Shared/sharedmarkdown_view.dart'; + +class DiskmanagerView extends StatefulWidget { + const DiskmanagerView({super.key}); + + final String titleKey = 'page_diskmanager_title'; + final String bodyKey = 'page_diskmanager_body'; + + @override + State createState() => _DiskmanagerViewState(); +} + +class _DiskmanagerViewState extends State { + @override + Widget build(BuildContext context) { + return SharedMarkdownView( + titleKey: widget.titleKey, + bodyKey: widget.bodyKey, + image: 'assets/images/diskmanager_128.png', + command: ''); //'bash:///run/current-system/sw/bin/nix-disk-manager'); + } +} diff --git a/pkgs/welcome-screen/lib/View/easyflatpak_view.dart b/pkgs/welcome-screen/lib/View/easyflatpak_view.dart new file mode 100644 index 00000000..d34057b7 --- /dev/null +++ b/pkgs/welcome-screen/lib/View/easyflatpak_view.dart @@ -0,0 +1,25 @@ +import 'package:flutter/material.dart'; +import 'package:glfos_welcome_screen/View/Shared/sharedmarkdown_view.dart'; + +class EasyflatpakView extends StatefulWidget { + const EasyflatpakView({ + super.key, + }); + + final String titleKey = 'page_easyflatpak_title'; + final String bodyKey = 'page_easyflatpak_body'; + + @override + State createState() => _EasyflatpakViewState(); +} + +class _EasyflatpakViewState extends State { + @override + Widget build(BuildContext context) { + return SharedMarkdownView( + titleKey: widget.titleKey, + bodyKey: widget.bodyKey, + image: 'assets/images/easyflatpak_128.png', + command: 'flatpak://org.dupot.easyflatpak'); + } +} diff --git a/pkgs/welcome-screen/lib/View/gaming_view.dart b/pkgs/welcome-screen/lib/View/gaming_view.dart new file mode 100644 index 00000000..16970449 --- /dev/null +++ b/pkgs/welcome-screen/lib/View/gaming_view.dart @@ -0,0 +1,23 @@ +import 'package:flutter/material.dart'; +import 'package:glfos_welcome_screen/View/Shared/sharedmarkdown_view.dart'; + +class GamingView extends StatefulWidget { + const GamingView({super.key}); + + final String titleKey = 'page_gaming_title'; + final String bodyKey = 'page_gaming_body'; + + @override + State createState() => _GamingViewState(); +} + +class _GamingViewState extends State { + @override + Widget build(BuildContext context) { + return SharedMarkdownView( + titleKey: widget.titleKey, + bodyKey: widget.bodyKey, + image: 'assets/images/gaming.png', + command: ''); + } +} diff --git a/pkgs/welcome-screen/lib/View/help_view.dart b/pkgs/welcome-screen/lib/View/help_view.dart new file mode 100644 index 00000000..455f12cb --- /dev/null +++ b/pkgs/welcome-screen/lib/View/help_view.dart @@ -0,0 +1,27 @@ +import 'package:flutter/material.dart'; +import 'package:glfos_welcome_screen/View/Shared/sharedmarkdown_view.dart'; + +class HelpView extends StatefulWidget { + const HelpView({ + super.key, + }); + + final String titleKey = 'page_help_title'; + final String bodyKey = 'page_help_body'; + + @override + State createState() => _HelpViewState(); +} + +class _HelpViewState extends State { + @override + Widget build(BuildContext context) { + return SharedMarkdownView( + titleKey: widget.titleKey, + bodyKey: widget.bodyKey, + image: Theme.of(context).brightness == Brightness.dark + ? 'assets/images/help.png' + : 'assets/images/help_dark.png', + command: ''); + } +} diff --git a/pkgs/welcome-screen/lib/View/home_view.dart b/pkgs/welcome-screen/lib/View/home_view.dart new file mode 100644 index 00000000..d256399b --- /dev/null +++ b/pkgs/welcome-screen/lib/View/home_view.dart @@ -0,0 +1,27 @@ +import 'package:flutter/material.dart'; +import 'package:glfos_welcome_screen/View/Shared/sharedmarkdown_view.dart'; + +class HomeView extends StatefulWidget { + const HomeView({ + super.key, + }); + + final String titleKey = 'page_home_title'; + final String bodyKey = 'page_home_body'; + + @override + State createState() => _HomeViewState(); +} + +class _HomeViewState extends State { + @override + Widget build(BuildContext context) { + return SharedMarkdownView( + titleKey: widget.titleKey, + bodyKey: widget.bodyKey, + image: Theme.of(context).brightness == Brightness.dark + ? 'assets/images/glf-logo-128_dark.png' + : 'assets/images/glf-logo-128.png', + command: ''); + } +} diff --git a/pkgs/welcome-screen/lib/View/powerusers_view.dart b/pkgs/welcome-screen/lib/View/powerusers_view.dart new file mode 100644 index 00000000..af93a872 --- /dev/null +++ b/pkgs/welcome-screen/lib/View/powerusers_view.dart @@ -0,0 +1,23 @@ +import 'package:flutter/material.dart'; +import 'package:glfos_welcome_screen/View/Shared/sharedmarkdown_view.dart'; + +class PowerusersView extends StatefulWidget { + const PowerusersView({super.key}); + + final String titleKey = 'page_powerusers_title'; + final String bodyKey = 'page_powerusers_body'; + + @override + State createState() => _PowerusersViewState(); +} + +class _PowerusersViewState extends State { + @override + Widget build(BuildContext context) { + return SharedMarkdownView( + titleKey: widget.titleKey, + bodyKey: widget.bodyKey, + image: '', + command: ''); + } +} diff --git a/pkgs/welcome-screen/lib/View/studio_view.dart b/pkgs/welcome-screen/lib/View/studio_view.dart new file mode 100644 index 00000000..190b95e4 --- /dev/null +++ b/pkgs/welcome-screen/lib/View/studio_view.dart @@ -0,0 +1,23 @@ +import 'package:flutter/material.dart'; +import 'package:glfos_welcome_screen/View/Shared/sharedmarkdown_view.dart'; + +class StudioView extends StatefulWidget { + const StudioView({super.key}); + + final String titleKey = 'page_studio_title'; + final String bodyKey = 'page_studio_body'; + + @override + State createState() => _StudioViewState(); +} + +class _StudioViewState extends State { + @override + Widget build(BuildContext context) { + return SharedMarkdownView( + titleKey: widget.titleKey, + bodyKey: widget.bodyKey, + image: 'assets/images/studio_128.png', + command: ''); + } +} diff --git a/pkgs/welcome-screen/lib/View/updates_view.dart b/pkgs/welcome-screen/lib/View/updates_view.dart new file mode 100644 index 00000000..7887ffcb --- /dev/null +++ b/pkgs/welcome-screen/lib/View/updates_view.dart @@ -0,0 +1,23 @@ +import 'package:flutter/material.dart'; +import 'package:glfos_welcome_screen/View/Shared/sharedmarkdown_view.dart'; + +class UpdatesView extends StatefulWidget { + const UpdatesView({super.key}); + + final String titleKey = 'page_updates_title'; + final String bodyKey = 'page_updates_body'; + + @override + State createState() => _UpdatesViewState(); +} + +class _UpdatesViewState extends State { + @override + Widget build(BuildContext context) { + return SharedMarkdownView( + titleKey: widget.titleKey, + bodyKey: widget.bodyKey, + image: 'assets/images/updates.png', + command: ''); + } +} diff --git a/pkgs/welcome-screen/lib/main.dart b/pkgs/welcome-screen/lib/main.dart new file mode 100644 index 00000000..a672e7e1 --- /dev/null +++ b/pkgs/welcome-screen/lib/main.dart @@ -0,0 +1,63 @@ +import 'dart:async'; + +import 'package:adwaita/adwaita.dart'; +import 'package:flutter/material.dart'; +import 'package:glfos_welcome_screen/Api/localization_api.dart'; +import 'package:glfos_welcome_screen/welcome_screen.dart'; +import 'package:window_manager/window_manager.dart'; + +void main() async { + WidgetsFlutterBinding.ensureInitialized(); + await windowManager.ensureInitialized(); + await windowManager.hide(); + + await LocalizationApi().load('fr'); + + const windowOptions = WindowOptions( + size: Size(1000, 600), + minimumSize: Size(800, 350), + skipTaskbar: false, + backgroundColor: Colors.transparent, + titleBarStyle: TitleBarStyle.hidden, + title: 'Welcome screen', + ); + + unawaited( + windowManager.waitUntilReadyToShow(windowOptions, () async { + await windowManager.setAsFrameless(); + + await windowManager.show(); + await windowManager.focus(); + }), + ); + + runApp(MyApp()); +} + +class MyApp extends StatelessWidget { + MyApp({super.key}); + + final ValueNotifier themeNotifier = + ValueNotifier(ThemeMode.system); + + @override + Widget build(BuildContext context) { + return ValueListenableBuilder( + valueListenable: themeNotifier, + builder: (_, ThemeMode currentMode, __) { + return MaterialApp( + builder: (context, child) { + final virtualWindowFrame = VirtualWindowFrameInit(); + + return virtualWindowFrame(context, child); + }, + theme: AdwaitaThemeData.light(), + darkTheme: AdwaitaThemeData.dark(), + debugShowCheckedModeBanner: false, + home: WelcomeScreen(themeNotifier: themeNotifier), + themeMode: currentMode, + ); + }, + ); + } +} diff --git a/pkgs/welcome-screen/lib/welcome_screen.dart b/pkgs/welcome-screen/lib/welcome_screen.dart new file mode 100644 index 00000000..9951a3c9 --- /dev/null +++ b/pkgs/welcome-screen/lib/welcome_screen.dart @@ -0,0 +1,181 @@ +import 'dart:io'; + +import 'package:flutter/foundation.dart'; +import 'package:flutter/material.dart'; +import 'package:glfos_welcome_screen/Api/localization_api.dart'; +import 'package:glfos_welcome_screen/View/gaming_view.dart'; +import 'package:glfos_welcome_screen/View/diskmanger_view.dart'; +import 'package:glfos_welcome_screen/View/easyflatpak_view.dart'; +import 'package:glfos_welcome_screen/View/home_view.dart'; +import 'package:glfos_welcome_screen/View/studio_view.dart'; +import 'package:glfos_welcome_screen/View/updates_view.dart'; +import 'package:glfos_welcome_screen/View/help_view.dart'; +import 'package:launch_at_startup/launch_at_startup.dart'; +import 'package:libadwaita/libadwaita.dart'; +import 'package:libadwaita_window_manager/libadwaita_window_manager.dart'; +import 'package:package_info_plus/package_info_plus.dart'; + +class WelcomeScreen extends StatefulWidget { + const WelcomeScreen({super.key, required this.themeNotifier}); + + final ValueNotifier themeNotifier; + + @override + WelcomeScreenState createState() => WelcomeScreenState(); +} + +class WelcomeScreenState extends State { + String stateLanguageSelected = LocalizationApi().languageCode; + + bool stateIsDebug = true; + + int? _currentIndex = 0; + + bool _showNextTime = true; + + @override + void initState() { + super.initState(); + + if (kReleaseMode) { + setState(() => stateIsDebug = false); + } + + listController = ScrollController(); + settingsController = ScrollController(); + _flapController = FlapController(); + + _flapController.addListener(() => setState(() {})); + + load(); + } + + void load() async { + PackageInfo packageInfo = await PackageInfo.fromPlatform(); + + launchAtStartup.setup( + appName: packageInfo.appName, + appPath: + Platform.environment['HOME']! + '/bin/Welcome_screen-x86_64.AppImage', + + // Set packageName parameter to support MSIX. + packageName: 'org.dupot.glfos_welcome_screen', + ); + + bool shouldLaunchAtStartup = await launchAtStartup.isEnabled(); + + setState(() { + _showNextTime = shouldLaunchAtStartup; + }); + } + + late ScrollController listController; + late ScrollController settingsController; + late FlapController _flapController; + + @override + void dispose() { + listController.dispose(); + settingsController.dispose(); + super.dispose(); + } + + void changeTheme() => + widget.themeNotifier.value = widget.themeNotifier.value == ThemeMode.dark + ? ThemeMode.light + : ThemeMode.dark; + + final List options = LocalizationApi.languages(); + + @override + Widget build(BuildContext context) { + return AdwScaffold( + //flapController: _flapController, + actions: AdwActions().windowManager, + start: [ + AdwHeaderButton( + icon: const Icon(Icons.nightlight_round, size: 15), + onPressed: changeTheme, + ), + ], + title: Text(LocalizationApi().tr('app_title')), + flap: (isDrawer) => AdwSidebar( + currentIndex: _currentIndex, + isDrawer: false, + children: [ + AdwSidebarItem( + leading: Image.asset( + Theme.of(context).brightness == Brightness.dark + ? 'assets/images/glf-logo_menu_dark.png' + : 'assets/images/glf-logo_menu.png'), + label: LocalizationApi().tr('menu_home'), + ), + AdwSidebarItem( + leading: Image.asset('assets/images/gaming_menu.png'), + label: LocalizationApi().tr('menu_gaming'), + ), + AdwSidebarItem( + leading: Image.asset('assets/images/studio_128_menu.png'), + label: LocalizationApi().tr('menu_studio'), + ), + AdwSidebarItem( + leading: Image.asset('assets/images/updates_menu.png'), + label: LocalizationApi().tr('menu_updates'), + ), + AdwSidebarItem( + leading: Image.asset('assets/images/diskmanager_menu.png'), + label: LocalizationApi().tr('menu_diskManager'), + ), + AdwSidebarItem( + leading: Image.asset('assets/images/easyflatpak_menu.png'), + label: LocalizationApi().tr('menu_easyflatpak'), + ), + AdwSidebarItem( + leading: Image.asset( + Theme.of(context).brightness == Brightness.dark + ? 'assets/images/help_menu_dark.png' + : 'assets/images/help_menu.png'), + label: LocalizationApi().tr('menu_help'), + ), + ], + onSelected: (index) => setState(() => _currentIndex = index), + ), + body: Column(children: [ + Expanded( + child: AdwViewStack( + animationDuration: const Duration(milliseconds: 100), + index: _currentIndex, + children: [ + const HomeView(), + const GamingView(), + const StudioView(), + const UpdatesView(), + const DiskmanagerView(), + const EasyflatpakView(), + const HelpView(), + ], + )), + const Divider(height: 1), + Padding( + padding: + const EdgeInsets.symmetric(horizontal: 12.0, vertical: 8.0), + child: CheckboxListTile( + controlAffinity: ListTileControlAffinity.leading, + value: _showNextTime, + onChanged: (value) async { + if (value!) { + await launchAtStartup.enable(); + } else { + await launchAtStartup.disable(); + } + + setState(() { + _showNextTime = value; + }); + }, + title: Text(LocalizationApi().tr('bottom_show_window_next_time')), + ), + ), + ])); + } +} diff --git a/pkgs/welcome-screen/linux/.gitignore b/pkgs/welcome-screen/linux/.gitignore new file mode 100644 index 00000000..d3896c98 --- /dev/null +++ b/pkgs/welcome-screen/linux/.gitignore @@ -0,0 +1 @@ +flutter/ephemeral diff --git a/pkgs/welcome-screen/linux/CMakeLists.txt b/pkgs/welcome-screen/linux/CMakeLists.txt new file mode 100644 index 00000000..9a15c6fd --- /dev/null +++ b/pkgs/welcome-screen/linux/CMakeLists.txt @@ -0,0 +1,128 @@ +# Project-level configuration. +cmake_minimum_required(VERSION 3.13) +project(runner LANGUAGES CXX) + +# The name of the executable created for the application. Change this to change +# the on-disk name of your application. +set(BINARY_NAME "glfos_welcome_screen") +# The unique GTK application identifier for this application. See: +# https://wiki.gnome.org/HowDoI/ChooseApplicationID +set(APPLICATION_ID "org.dupot.glfos_welcome_screen") + +# Explicitly opt in to modern CMake behaviors to avoid warnings with recent +# versions of CMake. +cmake_policy(SET CMP0063 NEW) + +# Load bundled libraries from the lib/ directory relative to the binary. +set(CMAKE_INSTALL_RPATH "$ORIGIN/lib") + +# Root filesystem for cross-building. +if(FLUTTER_TARGET_PLATFORM_SYSROOT) + set(CMAKE_SYSROOT ${FLUTTER_TARGET_PLATFORM_SYSROOT}) + set(CMAKE_FIND_ROOT_PATH ${CMAKE_SYSROOT}) + set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) + set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY) + set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) + set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) +endif() + +# Define build configuration options. +if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) + set(CMAKE_BUILD_TYPE "Debug" CACHE + STRING "Flutter build mode" FORCE) + set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS + "Debug" "Profile" "Release") +endif() + +# Compilation settings that should be applied to most targets. +# +# Be cautious about adding new options here, as plugins use this function by +# default. In most cases, you should add new options to specific targets instead +# of modifying this function. +function(APPLY_STANDARD_SETTINGS TARGET) + target_compile_features(${TARGET} PUBLIC cxx_std_14) + target_compile_options(${TARGET} PRIVATE -Wall -Werror) + target_compile_options(${TARGET} PRIVATE "$<$>:-O3>") + target_compile_definitions(${TARGET} PRIVATE "$<$>:NDEBUG>") +endfunction() + +# Flutter library and tool build rules. +set(FLUTTER_MANAGED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/flutter") +add_subdirectory(${FLUTTER_MANAGED_DIR}) + +# System-level dependencies. +find_package(PkgConfig REQUIRED) +pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0) + +# Application build; see runner/CMakeLists.txt. +add_subdirectory("runner") + +# Run the Flutter tool portions of the build. This must not be removed. +add_dependencies(${BINARY_NAME} flutter_assemble) + +# Only the install-generated bundle's copy of the executable will launch +# correctly, since the resources must in the right relative locations. To avoid +# people trying to run the unbundled copy, put it in a subdirectory instead of +# the default top-level location. +set_target_properties(${BINARY_NAME} + PROPERTIES + RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/intermediates_do_not_run" +) + + +# Generated plugin build rules, which manage building the plugins and adding +# them to the application. +include(flutter/generated_plugins.cmake) + + +# === Installation === +# By default, "installing" just makes a relocatable bundle in the build +# directory. +set(BUILD_BUNDLE_DIR "${PROJECT_BINARY_DIR}/bundle") +if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) + set(CMAKE_INSTALL_PREFIX "${BUILD_BUNDLE_DIR}" CACHE PATH "..." FORCE) +endif() + +# Start with a clean build bundle directory every time. +install(CODE " + file(REMOVE_RECURSE \"${BUILD_BUNDLE_DIR}/\") + " COMPONENT Runtime) + +set(INSTALL_BUNDLE_DATA_DIR "${CMAKE_INSTALL_PREFIX}/data") +set(INSTALL_BUNDLE_LIB_DIR "${CMAKE_INSTALL_PREFIX}/lib") + +install(TARGETS ${BINARY_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}" + COMPONENT Runtime) + +install(FILES "${FLUTTER_ICU_DATA_FILE}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" + COMPONENT Runtime) + +install(FILES "${FLUTTER_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" + COMPONENT Runtime) + +foreach(bundled_library ${PLUGIN_BUNDLED_LIBRARIES}) + install(FILES "${bundled_library}" + DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" + COMPONENT Runtime) +endforeach(bundled_library) + +# Copy the native assets provided by the build.dart from all packages. +set(NATIVE_ASSETS_DIR "${PROJECT_BUILD_DIR}native_assets/linux/") +install(DIRECTORY "${NATIVE_ASSETS_DIR}" + DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" + COMPONENT Runtime) + +# Fully re-copy the assets directory on each build to avoid having stale files +# from a previous install. +set(FLUTTER_ASSET_DIR_NAME "flutter_assets") +install(CODE " + file(REMOVE_RECURSE \"${INSTALL_BUNDLE_DATA_DIR}/${FLUTTER_ASSET_DIR_NAME}\") + " COMPONENT Runtime) +install(DIRECTORY "${PROJECT_BUILD_DIR}/${FLUTTER_ASSET_DIR_NAME}" + DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" COMPONENT Runtime) + +# Install the AOT library on non-Debug builds only. +if(NOT CMAKE_BUILD_TYPE MATCHES "Debug") + install(FILES "${AOT_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" + COMPONENT Runtime) +endif() diff --git a/pkgs/welcome-screen/linux/flutter/CMakeLists.txt b/pkgs/welcome-screen/linux/flutter/CMakeLists.txt new file mode 100644 index 00000000..d5bd0164 --- /dev/null +++ b/pkgs/welcome-screen/linux/flutter/CMakeLists.txt @@ -0,0 +1,88 @@ +# This file controls Flutter-level build steps. It should not be edited. +cmake_minimum_required(VERSION 3.10) + +set(EPHEMERAL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ephemeral") + +# Configuration provided via flutter tool. +include(${EPHEMERAL_DIR}/generated_config.cmake) + +# TODO: Move the rest of this into files in ephemeral. See +# https://github.com/flutter/flutter/issues/57146. + +# Serves the same purpose as list(TRANSFORM ... PREPEND ...), +# which isn't available in 3.10. +function(list_prepend LIST_NAME PREFIX) + set(NEW_LIST "") + foreach(element ${${LIST_NAME}}) + list(APPEND NEW_LIST "${PREFIX}${element}") + endforeach(element) + set(${LIST_NAME} "${NEW_LIST}" PARENT_SCOPE) +endfunction() + +# === Flutter Library === +# System-level dependencies. +find_package(PkgConfig REQUIRED) +pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0) +pkg_check_modules(GLIB REQUIRED IMPORTED_TARGET glib-2.0) +pkg_check_modules(GIO REQUIRED IMPORTED_TARGET gio-2.0) + +set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/libflutter_linux_gtk.so") + +# Published to parent scope for install step. +set(FLUTTER_LIBRARY ${FLUTTER_LIBRARY} PARENT_SCOPE) +set(FLUTTER_ICU_DATA_FILE "${EPHEMERAL_DIR}/icudtl.dat" PARENT_SCOPE) +set(PROJECT_BUILD_DIR "${PROJECT_DIR}/build/" PARENT_SCOPE) +set(AOT_LIBRARY "${PROJECT_DIR}/build/lib/libapp.so" PARENT_SCOPE) + +list(APPEND FLUTTER_LIBRARY_HEADERS + "fl_basic_message_channel.h" + "fl_binary_codec.h" + "fl_binary_messenger.h" + "fl_dart_project.h" + "fl_engine.h" + "fl_json_message_codec.h" + "fl_json_method_codec.h" + "fl_message_codec.h" + "fl_method_call.h" + "fl_method_channel.h" + "fl_method_codec.h" + "fl_method_response.h" + "fl_plugin_registrar.h" + "fl_plugin_registry.h" + "fl_standard_message_codec.h" + "fl_standard_method_codec.h" + "fl_string_codec.h" + "fl_value.h" + "fl_view.h" + "flutter_linux.h" +) +list_prepend(FLUTTER_LIBRARY_HEADERS "${EPHEMERAL_DIR}/flutter_linux/") +add_library(flutter INTERFACE) +target_include_directories(flutter INTERFACE + "${EPHEMERAL_DIR}" +) +target_link_libraries(flutter INTERFACE "${FLUTTER_LIBRARY}") +target_link_libraries(flutter INTERFACE + PkgConfig::GTK + PkgConfig::GLIB + PkgConfig::GIO +) +add_dependencies(flutter flutter_assemble) + +# === Flutter tool backend === +# _phony_ is a non-existent file to force this command to run every time, +# since currently there's no way to get a full input/output list from the +# flutter tool. +add_custom_command( + OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS} + ${CMAKE_CURRENT_BINARY_DIR}/_phony_ + COMMAND ${CMAKE_COMMAND} -E env + ${FLUTTER_TOOL_ENVIRONMENT} + "${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.sh" + ${FLUTTER_TARGET_PLATFORM} ${CMAKE_BUILD_TYPE} + VERBATIM +) +add_custom_target(flutter_assemble DEPENDS + "${FLUTTER_LIBRARY}" + ${FLUTTER_LIBRARY_HEADERS} +) diff --git a/pkgs/welcome-screen/linux/flutter/generated_plugin_registrant.cc b/pkgs/welcome-screen/linux/flutter/generated_plugin_registrant.cc new file mode 100644 index 00000000..faea87d4 --- /dev/null +++ b/pkgs/welcome-screen/linux/flutter/generated_plugin_registrant.cc @@ -0,0 +1,23 @@ +// +// Generated file. Do not edit. +// + +// clang-format off + +#include "generated_plugin_registrant.h" + +#include +#include +#include + +void fl_register_plugins(FlPluginRegistry* registry) { + g_autoptr(FlPluginRegistrar) screen_retriever_linux_registrar = + fl_plugin_registry_get_registrar_for_plugin(registry, "ScreenRetrieverLinuxPlugin"); + screen_retriever_linux_plugin_register_with_registrar(screen_retriever_linux_registrar); + g_autoptr(FlPluginRegistrar) url_launcher_linux_registrar = + fl_plugin_registry_get_registrar_for_plugin(registry, "UrlLauncherPlugin"); + url_launcher_plugin_register_with_registrar(url_launcher_linux_registrar); + g_autoptr(FlPluginRegistrar) window_manager_registrar = + fl_plugin_registry_get_registrar_for_plugin(registry, "WindowManagerPlugin"); + window_manager_plugin_register_with_registrar(window_manager_registrar); +} diff --git a/pkgs/welcome-screen/linux/flutter/generated_plugin_registrant.h b/pkgs/welcome-screen/linux/flutter/generated_plugin_registrant.h new file mode 100644 index 00000000..e0f0a47b --- /dev/null +++ b/pkgs/welcome-screen/linux/flutter/generated_plugin_registrant.h @@ -0,0 +1,15 @@ +// +// Generated file. Do not edit. +// + +// clang-format off + +#ifndef GENERATED_PLUGIN_REGISTRANT_ +#define GENERATED_PLUGIN_REGISTRANT_ + +#include + +// Registers Flutter plugins. +void fl_register_plugins(FlPluginRegistry* registry); + +#endif // GENERATED_PLUGIN_REGISTRANT_ diff --git a/pkgs/welcome-screen/linux/flutter/generated_plugins.cmake b/pkgs/welcome-screen/linux/flutter/generated_plugins.cmake new file mode 100644 index 00000000..4f427dd2 --- /dev/null +++ b/pkgs/welcome-screen/linux/flutter/generated_plugins.cmake @@ -0,0 +1,26 @@ +# +# Generated file, do not edit. +# + +list(APPEND FLUTTER_PLUGIN_LIST + screen_retriever_linux + url_launcher_linux + window_manager +) + +list(APPEND FLUTTER_FFI_PLUGIN_LIST +) + +set(PLUGIN_BUNDLED_LIBRARIES) + +foreach(plugin ${FLUTTER_PLUGIN_LIST}) + add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/linux plugins/${plugin}) + target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin) + list(APPEND PLUGIN_BUNDLED_LIBRARIES $) + list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) +endforeach(plugin) + +foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) + add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/linux plugins/${ffi_plugin}) + list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) +endforeach(ffi_plugin) diff --git a/pkgs/welcome-screen/linux/runner/CMakeLists.txt b/pkgs/welcome-screen/linux/runner/CMakeLists.txt new file mode 100644 index 00000000..e97dabc7 --- /dev/null +++ b/pkgs/welcome-screen/linux/runner/CMakeLists.txt @@ -0,0 +1,26 @@ +cmake_minimum_required(VERSION 3.13) +project(runner LANGUAGES CXX) + +# Define the application target. To change its name, change BINARY_NAME in the +# top-level CMakeLists.txt, not the value here, or `flutter run` will no longer +# work. +# +# Any new source files that you add to the application should be added here. +add_executable(${BINARY_NAME} + "main.cc" + "my_application.cc" + "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc" +) + +# Apply the standard set of build settings. This can be removed for applications +# that need different build settings. +apply_standard_settings(${BINARY_NAME}) + +# Add preprocessor definitions for the application ID. +add_definitions(-DAPPLICATION_ID="${APPLICATION_ID}") + +# Add dependency libraries. Add any application-specific dependencies here. +target_link_libraries(${BINARY_NAME} PRIVATE flutter) +target_link_libraries(${BINARY_NAME} PRIVATE PkgConfig::GTK) + +target_include_directories(${BINARY_NAME} PRIVATE "${CMAKE_SOURCE_DIR}") diff --git a/pkgs/welcome-screen/linux/runner/main.cc b/pkgs/welcome-screen/linux/runner/main.cc new file mode 100644 index 00000000..e7c5c543 --- /dev/null +++ b/pkgs/welcome-screen/linux/runner/main.cc @@ -0,0 +1,6 @@ +#include "my_application.h" + +int main(int argc, char** argv) { + g_autoptr(MyApplication) app = my_application_new(); + return g_application_run(G_APPLICATION(app), argc, argv); +} diff --git a/pkgs/welcome-screen/linux/runner/my_application.cc b/pkgs/welcome-screen/linux/runner/my_application.cc new file mode 100644 index 00000000..4e80e5fa --- /dev/null +++ b/pkgs/welcome-screen/linux/runner/my_application.cc @@ -0,0 +1,130 @@ +#include "my_application.h" + +#include +#ifdef GDK_WINDOWING_X11 +#include +#endif + +#include "flutter/generated_plugin_registrant.h" + +struct _MyApplication { + GtkApplication parent_instance; + char** dart_entrypoint_arguments; +}; + +G_DEFINE_TYPE(MyApplication, my_application, GTK_TYPE_APPLICATION) + +// Implements GApplication::activate. +static void my_application_activate(GApplication* application) { + MyApplication* self = MY_APPLICATION(application); + GtkWindow* window = + GTK_WINDOW(gtk_application_window_new(GTK_APPLICATION(application))); + + // Use a header bar when running in GNOME as this is the common style used + // by applications and is the setup most users will be using (e.g. Ubuntu + // desktop). + // If running on X and not using GNOME then just use a traditional title bar + // in case the window manager does more exotic layout, e.g. tiling. + // If running on Wayland assume the header bar will work (may need changing + // if future cases occur). + gboolean use_header_bar = TRUE; +#ifdef GDK_WINDOWING_X11 + GdkScreen* screen = gtk_window_get_screen(window); + if (GDK_IS_X11_SCREEN(screen)) { + const gchar* wm_name = gdk_x11_screen_get_window_manager_name(screen); + if (g_strcmp0(wm_name, "GNOME Shell") != 0) { + use_header_bar = FALSE; + } + } +#endif + if (use_header_bar) { + GtkHeaderBar* header_bar = GTK_HEADER_BAR(gtk_header_bar_new()); + gtk_widget_show(GTK_WIDGET(header_bar)); + gtk_header_bar_set_title(header_bar, "glfos_welcome_screen"); + gtk_header_bar_set_show_close_button(header_bar, TRUE); + gtk_window_set_titlebar(window, GTK_WIDGET(header_bar)); + } else { + gtk_window_set_title(window, "glfos_welcome_screen"); + } + + gtk_window_set_default_size(window, 1280, 720); + gtk_widget_show(GTK_WIDGET(window)); + + g_autoptr(FlDartProject) project = fl_dart_project_new(); + fl_dart_project_set_dart_entrypoint_arguments(project, self->dart_entrypoint_arguments); + + FlView* view = fl_view_new(project); + gtk_widget_show(GTK_WIDGET(view)); + gtk_container_add(GTK_CONTAINER(window), GTK_WIDGET(view)); + + fl_register_plugins(FL_PLUGIN_REGISTRY(view)); + + gtk_widget_grab_focus(GTK_WIDGET(view)); +} + +// Implements GApplication::local_command_line. +static gboolean my_application_local_command_line(GApplication* application, gchar*** arguments, int* exit_status) { + MyApplication* self = MY_APPLICATION(application); + // Strip out the first argument as it is the binary name. + self->dart_entrypoint_arguments = g_strdupv(*arguments + 1); + + g_autoptr(GError) error = nullptr; + if (!g_application_register(application, nullptr, &error)) { + g_warning("Failed to register: %s", error->message); + *exit_status = 1; + return TRUE; + } + + g_application_activate(application); + *exit_status = 0; + + return TRUE; +} + +// Implements GApplication::startup. +static void my_application_startup(GApplication* application) { + //MyApplication* self = MY_APPLICATION(object); + + // Perform any actions required at application startup. + + G_APPLICATION_CLASS(my_application_parent_class)->startup(application); +} + +// Implements GApplication::shutdown. +static void my_application_shutdown(GApplication* application) { + //MyApplication* self = MY_APPLICATION(object); + + // Perform any actions required at application shutdown. + + G_APPLICATION_CLASS(my_application_parent_class)->shutdown(application); +} + +// Implements GObject::dispose. +static void my_application_dispose(GObject* object) { + MyApplication* self = MY_APPLICATION(object); + g_clear_pointer(&self->dart_entrypoint_arguments, g_strfreev); + G_OBJECT_CLASS(my_application_parent_class)->dispose(object); +} + +static void my_application_class_init(MyApplicationClass* klass) { + G_APPLICATION_CLASS(klass)->activate = my_application_activate; + G_APPLICATION_CLASS(klass)->local_command_line = my_application_local_command_line; + G_APPLICATION_CLASS(klass)->startup = my_application_startup; + G_APPLICATION_CLASS(klass)->shutdown = my_application_shutdown; + G_OBJECT_CLASS(klass)->dispose = my_application_dispose; +} + +static void my_application_init(MyApplication* self) {} + +MyApplication* my_application_new() { + // Set the program name to the application ID, which helps various systems + // like GTK and desktop environments map this running application to its + // corresponding .desktop file. This ensures better integration by allowing + // the application to be recognized beyond its binary name. + g_set_prgname(APPLICATION_ID); + + return MY_APPLICATION(g_object_new(my_application_get_type(), + "application-id", APPLICATION_ID, + "flags", G_APPLICATION_NON_UNIQUE, + nullptr)); +} diff --git a/pkgs/welcome-screen/linux/runner/my_application.h b/pkgs/welcome-screen/linux/runner/my_application.h new file mode 100644 index 00000000..72271d5e --- /dev/null +++ b/pkgs/welcome-screen/linux/runner/my_application.h @@ -0,0 +1,18 @@ +#ifndef FLUTTER_MY_APPLICATION_H_ +#define FLUTTER_MY_APPLICATION_H_ + +#include + +G_DECLARE_FINAL_TYPE(MyApplication, my_application, MY, APPLICATION, + GtkApplication) + +/** + * my_application_new: + * + * Creates a new Flutter-based application. + * + * Returns: a new #MyApplication. + */ +MyApplication* my_application_new(); + +#endif // FLUTTER_MY_APPLICATION_H_ diff --git a/pkgs/welcome-screen/pubspec.lock b/pkgs/welcome-screen/pubspec.lock new file mode 100644 index 00000000..e19cd621 --- /dev/null +++ b/pkgs/welcome-screen/pubspec.lock @@ -0,0 +1,567 @@ +# Generated by pub +# See https://dart.dev/tools/pub/glossary#lockfile +packages: + adwaita: + dependency: "direct main" + description: + name: adwaita + sha256: "91be996e0e3a88c5cc42251af5559707a712f847995240a27fdf71e1dc44630e" + url: "https://pub.dev" + source: hosted + version: "1.1.0" + args: + dependency: transitive + description: + name: args + sha256: d0481093c50b1da8910eb0bb301626d4d8eb7284aa739614d2b394ee09e3ea04 + url: "https://pub.dev" + source: hosted + version: "2.7.0" + async: + dependency: transitive + description: + name: async + sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" + url: "https://pub.dev" + source: hosted + version: "2.11.0" + boolean_selector: + dependency: transitive + description: + name: boolean_selector + sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" + url: "https://pub.dev" + source: hosted + version: "2.1.1" + characters: + dependency: transitive + description: + name: characters + sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605" + url: "https://pub.dev" + source: hosted + version: "1.3.0" + clock: + dependency: transitive + description: + name: clock + sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf + url: "https://pub.dev" + source: hosted + version: "1.1.1" + collection: + dependency: transitive + description: + name: collection + sha256: a1ace0a119f20aabc852d165077c036cd864315bd99b7eaa10a60100341941bf + url: "https://pub.dev" + source: hosted + version: "1.19.0" + dbus: + dependency: transitive + description: + name: dbus + sha256: "79e0c23480ff85dc68de79e2cd6334add97e48f7f4865d17686dd6ea81a47e8c" + url: "https://pub.dev" + source: hosted + version: "0.7.11" + fake_async: + dependency: transitive + description: + name: fake_async + sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78" + url: "https://pub.dev" + source: hosted + version: "1.3.1" + ffi: + dependency: transitive + description: + name: ffi + sha256: "16ed7b077ef01ad6170a3d0c57caa4a112a38d7a2ed5602e0aca9ca6f3d98da6" + url: "https://pub.dev" + source: hosted + version: "2.1.3" + flutter: + dependency: "direct main" + description: flutter + source: sdk + version: "0.0.0" + flutter_localizations: + dependency: "direct main" + description: flutter + source: sdk + version: "0.0.0" + flutter_markdown: + dependency: "direct main" + description: + name: flutter_markdown + sha256: "08fb8315236099ff8e90cb87bb2b935e0a724a3af1623000a9cec930468e0f27" + url: "https://pub.dev" + source: hosted + version: "0.7.7+1" + flutter_svg: + dependency: transitive + description: + name: flutter_svg + sha256: d44bf546b13025ec7353091516f6881f1d4c633993cb109c3916c3a0159dadf1 + url: "https://pub.dev" + source: hosted + version: "2.1.0" + flutter_test: + dependency: "direct dev" + description: flutter + source: sdk + version: "0.0.0" + flutter_web_plugins: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" + gsettings: + dependency: transitive + description: + name: gsettings + sha256: "1b0ce661f5436d2db1e51f3c4295a49849f03d304003a7ba177d01e3a858249c" + url: "https://pub.dev" + source: hosted + version: "0.2.8" + http: + dependency: transitive + description: + name: http + sha256: "2c11f3f94c687ee9bad77c171151672986360b2b001d109814ee7140b2cf261b" + url: "https://pub.dev" + source: hosted + version: "1.4.0" + http_parser: + dependency: transitive + description: + name: http_parser + sha256: "178d74305e7866013777bab2c3d8726205dc5a4dd935297175b19a23a2e66571" + url: "https://pub.dev" + source: hosted + version: "4.1.2" + intl: + dependency: transitive + description: + name: intl + sha256: d6f56758b7d3014a48af9701c085700aac781a92a87a62b1333b46d8879661cf + url: "https://pub.dev" + source: hosted + version: "0.19.0" + json_annotation: + dependency: transitive + description: + name: json_annotation + sha256: "1ce844379ca14835a50d2f019a3099f419082cfdd231cd86a142af94dd5c6bb1" + url: "https://pub.dev" + source: hosted + version: "4.9.0" + launch_at_startup: + dependency: "direct main" + description: + name: launch_at_startup + sha256: "1f8a75520913d1038630049e6c44a2575a23ffd28cc8b14fdf37401d1d21de84" + url: "https://pub.dev" + source: hosted + version: "0.3.1" + leak_tracker: + dependency: transitive + description: + name: leak_tracker + sha256: "7bb2830ebd849694d1ec25bf1f44582d6ac531a57a365a803a6034ff751d2d06" + url: "https://pub.dev" + source: hosted + version: "10.0.7" + leak_tracker_flutter_testing: + dependency: transitive + description: + name: leak_tracker_flutter_testing + sha256: "9491a714cca3667b60b5c420da8217e6de0d1ba7a5ec322fab01758f6998f379" + url: "https://pub.dev" + source: hosted + version: "3.0.8" + leak_tracker_testing: + dependency: transitive + description: + name: leak_tracker_testing + sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" + url: "https://pub.dev" + source: hosted + version: "3.0.1" + libadwaita: + dependency: "direct main" + description: + name: libadwaita + sha256: "1c1079587b21018e71173f0a0682797c255d166ef79fd470c636eedbd69f7fa3" + url: "https://pub.dev" + source: hosted + version: "2.0.2" + libadwaita_core: + dependency: transitive + description: + name: libadwaita_core + sha256: "1a7689e4130e96be4b0ec615863fded25cd86c2b95a682e7cec9659d420de37c" + url: "https://pub.dev" + source: hosted + version: "0.5.4" + libadwaita_window_manager: + dependency: "direct main" + description: + name: libadwaita_window_manager + sha256: "196b705b9683d2979740e9bfd46bbe1ce69fc16af217215d80df7c84ff8fe30f" + url: "https://pub.dev" + source: hosted + version: "0.5.4+1" + logging: + dependency: "direct main" + description: + name: logging + sha256: c8245ada5f1717ed44271ed1c26b8ce85ca3228fd2ffdb75468ab01979309d61 + url: "https://pub.dev" + source: hosted + version: "1.3.0" + markdown: + dependency: transitive + description: + name: markdown + sha256: "935e23e1ff3bc02d390bad4d4be001208ee92cc217cb5b5a6c19bc14aaa318c1" + url: "https://pub.dev" + source: hosted + version: "7.3.0" + matcher: + dependency: transitive + description: + name: matcher + sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb + url: "https://pub.dev" + source: hosted + version: "0.12.16+1" + material_color_utilities: + dependency: transitive + description: + name: material_color_utilities + sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec + url: "https://pub.dev" + source: hosted + version: "0.11.1" + meta: + dependency: transitive + description: + name: meta + sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7 + url: "https://pub.dev" + source: hosted + version: "1.15.0" + package_info_plus: + dependency: "direct main" + description: + name: package_info_plus + sha256: "7e76fad405b3e4016cd39d08f455a4eb5199723cf594cd1b8916d47140d93017" + url: "https://pub.dev" + source: hosted + version: "4.2.0" + package_info_plus_platform_interface: + dependency: transitive + description: + name: package_info_plus_platform_interface + sha256: "9bc8ba46813a4cc42c66ab781470711781940780fd8beddd0c3da62506d3a6c6" + url: "https://pub.dev" + source: hosted + version: "2.0.1" + path: + dependency: transitive + description: + name: path + sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" + url: "https://pub.dev" + source: hosted + version: "1.9.0" + path_parsing: + dependency: transitive + description: + name: path_parsing + sha256: "883402936929eac138ee0a45da5b0f2c80f89913e6dc3bf77eb65b84b409c6ca" + url: "https://pub.dev" + source: hosted + version: "1.1.0" + petitparser: + dependency: transitive + description: + name: petitparser + sha256: c15605cd28af66339f8eb6fbe0e541bfe2d1b72d5825efc6598f3e0a31b9ad27 + url: "https://pub.dev" + source: hosted + version: "6.0.2" + plugin_platform_interface: + dependency: transitive + description: + name: plugin_platform_interface + sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02" + url: "https://pub.dev" + source: hosted + version: "2.1.8" + popover_gtk: + dependency: transitive + description: + name: popover_gtk + sha256: c293bfa3bcb9436fe189f20f6397199ce996ba40d4b081e26793adcf3ceac45b + url: "https://pub.dev" + source: hosted + version: "0.2.6+3" + screen_retriever: + dependency: transitive + description: + name: screen_retriever + sha256: "570dbc8e4f70bac451e0efc9c9bb19fa2d6799a11e6ef04f946d7886d2e23d0c" + url: "https://pub.dev" + source: hosted + version: "0.2.0" + screen_retriever_linux: + dependency: transitive + description: + name: screen_retriever_linux + sha256: f7f8120c92ef0784e58491ab664d01efda79a922b025ff286e29aa123ea3dd18 + url: "https://pub.dev" + source: hosted + version: "0.2.0" + screen_retriever_macos: + dependency: transitive + description: + name: screen_retriever_macos + sha256: "71f956e65c97315dd661d71f828708bd97b6d358e776f1a30d5aa7d22d78a149" + url: "https://pub.dev" + source: hosted + version: "0.2.0" + screen_retriever_platform_interface: + dependency: transitive + description: + name: screen_retriever_platform_interface + sha256: ee197f4581ff0d5608587819af40490748e1e39e648d7680ecf95c05197240c0 + url: "https://pub.dev" + source: hosted + version: "0.2.0" + screen_retriever_windows: + dependency: transitive + description: + name: screen_retriever_windows + sha256: "449ee257f03ca98a57288ee526a301a430a344a161f9202b4fcc38576716fe13" + url: "https://pub.dev" + source: hosted + version: "0.2.0" + sky_engine: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" + source_span: + dependency: transitive + description: + name: source_span + sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" + url: "https://pub.dev" + source: hosted + version: "1.10.0" + stack_trace: + dependency: transitive + description: + name: stack_trace + sha256: "9f47fd3630d76be3ab26f0ee06d213679aa425996925ff3feffdec504931c377" + url: "https://pub.dev" + source: hosted + version: "1.12.0" + stream_channel: + dependency: transitive + description: + name: stream_channel + sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 + url: "https://pub.dev" + source: hosted + version: "2.1.2" + string_scanner: + dependency: transitive + description: + name: string_scanner + sha256: "688af5ed3402a4bde5b3a6c15fd768dbf2621a614950b17f04626c431ab3c4c3" + url: "https://pub.dev" + source: hosted + version: "1.3.0" + term_glyph: + dependency: transitive + description: + name: term_glyph + sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 + url: "https://pub.dev" + source: hosted + version: "1.2.1" + test_api: + dependency: transitive + description: + name: test_api + sha256: "664d3a9a64782fcdeb83ce9c6b39e78fd2971d4e37827b9b06c3aa1edc5e760c" + url: "https://pub.dev" + source: hosted + version: "0.7.3" + typed_data: + dependency: transitive + description: + name: typed_data + sha256: f9049c039ebfeb4cf7a7104a675823cd72dba8297f264b6637062516699fa006 + url: "https://pub.dev" + source: hosted + version: "1.4.0" + url_launcher: + dependency: "direct main" + description: + name: url_launcher + sha256: "9d06212b1362abc2f0f0d78e6f09f726608c74e3b9462e8368bb03314aa8d603" + url: "https://pub.dev" + source: hosted + version: "6.3.1" + url_launcher_android: + dependency: transitive + description: + name: url_launcher_android + sha256: "8582d7f6fe14d2652b4c45c9b6c14c0b678c2af2d083a11b604caeba51930d79" + url: "https://pub.dev" + source: hosted + version: "6.3.16" + url_launcher_ios: + dependency: transitive + description: + name: url_launcher_ios + sha256: "7f2022359d4c099eea7df3fdf739f7d3d3b9faf3166fb1dd390775176e0b76cb" + url: "https://pub.dev" + source: hosted + version: "6.3.3" + url_launcher_linux: + dependency: transitive + description: + name: url_launcher_linux + sha256: "4e9ba368772369e3e08f231d2301b4ef72b9ff87c31192ef471b380ef29a4935" + url: "https://pub.dev" + source: hosted + version: "3.2.1" + url_launcher_macos: + dependency: transitive + description: + name: url_launcher_macos + sha256: "17ba2000b847f334f16626a574c702b196723af2a289e7a93ffcb79acff855c2" + url: "https://pub.dev" + source: hosted + version: "3.2.2" + url_launcher_platform_interface: + dependency: transitive + description: + name: url_launcher_platform_interface + sha256: "552f8a1e663569be95a8190206a38187b531910283c3e982193e4f2733f01029" + url: "https://pub.dev" + source: hosted + version: "2.3.2" + url_launcher_web: + dependency: transitive + description: + name: url_launcher_web + sha256: "4bd2b7b4dc4d4d0b94e5babfffbca8eac1a126c7f3d6ecbc1a11013faa3abba2" + url: "https://pub.dev" + source: hosted + version: "2.4.1" + url_launcher_windows: + dependency: transitive + description: + name: url_launcher_windows + sha256: "3284b6d2ac454cf34f114e1d3319866fdd1e19cdc329999057e44ffe936cfa77" + url: "https://pub.dev" + source: hosted + version: "3.1.4" + vector_graphics: + dependency: transitive + description: + name: vector_graphics + sha256: a4f059dc26fc8295b5921376600a194c4ec7d55e72f2fe4c7d2831e103d461e6 + url: "https://pub.dev" + source: hosted + version: "1.1.19" + vector_graphics_codec: + dependency: transitive + description: + name: vector_graphics_codec + sha256: "99fd9fbd34d9f9a32efd7b6a6aae14125d8237b10403b422a6a6dfeac2806146" + url: "https://pub.dev" + source: hosted + version: "1.1.13" + vector_graphics_compiler: + dependency: transitive + description: + name: vector_graphics_compiler + sha256: "557a315b7d2a6dbb0aaaff84d857967ce6bdc96a63dc6ee2a57ce5a6ee5d3331" + url: "https://pub.dev" + source: hosted + version: "1.1.17" + vector_math: + dependency: transitive + description: + name: vector_math + sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" + url: "https://pub.dev" + source: hosted + version: "2.1.4" + vm_service: + dependency: transitive + description: + name: vm_service + sha256: f6be3ed8bd01289b34d679c2b62226f63c0e69f9fd2e50a6b3c1c729a961041b + url: "https://pub.dev" + source: hosted + version: "14.3.0" + web: + dependency: transitive + description: + name: web + sha256: "868d88a33d8a87b18ffc05f9f030ba328ffefba92d6c127917a2ba740f9cfe4a" + url: "https://pub.dev" + source: hosted + version: "1.1.1" + win32: + dependency: transitive + description: + name: win32 + sha256: daf97c9d80197ed7b619040e86c8ab9a9dad285e7671ee7390f9180cc828a51e + url: "https://pub.dev" + source: hosted + version: "5.10.1" + win32_registry: + dependency: transitive + description: + name: win32_registry + sha256: "21ec76dfc731550fd3e2ce7a33a9ea90b828fdf19a5c3bcf556fa992cfa99852" + url: "https://pub.dev" + source: hosted + version: "1.1.5" + window_manager: + dependency: "direct main" + description: + name: window_manager + sha256: "51d50168ab267d344b975b15390426b1243600d436770d3f13de67e55b05ec16" + url: "https://pub.dev" + source: hosted + version: "0.5.0" + xdg_directories: + dependency: transitive + description: + name: xdg_directories + sha256: "7a3f37b05d989967cdddcbb571f1ea834867ae2faa29725fd085180e0883aa15" + url: "https://pub.dev" + source: hosted + version: "1.1.0" + xml: + dependency: transitive + description: + name: xml + sha256: b015a8ad1c488f66851d762d3090a21c600e479dc75e68328c52774040cf9226 + url: "https://pub.dev" + source: hosted + version: "6.5.0" +sdks: + dart: ">=3.6.0 <4.0.0" + flutter: ">=3.27.0" diff --git a/pkgs/welcome-screen/pubspec.yaml b/pkgs/welcome-screen/pubspec.yaml new file mode 100644 index 00000000..775f27ad --- /dev/null +++ b/pkgs/welcome-screen/pubspec.yaml @@ -0,0 +1,105 @@ +name: glfos_welcome_screen +description: "A new Flutter project." +# The following line prevents the package from being accidentally published to +# pub.dev using `flutter pub publish`. This is preferred for private packages. +publish_to: 'none' # Remove this line if you wish to publish to pub.dev + +# The following defines the version and build number for your application. +# A version number is three numbers separated by dots, like 1.2.43 +# followed by an optional build number separated by a +. +# Both the version and the builder number may be overridden in flutter +# build by specifying --build-name and --build-number, respectively. +# In Android, build-name is used as versionName while build-number used as versionCode. +# Read more about Android versioning at https://developer.android.com/studio/publish/versioning +# In iOS, build-name is used as CFBundleShortVersionString while build-number is used as CFBundleVersion. +# Read more about iOS versioning at +# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html +# In Windows, build-name is used as the major, minor, and patch parts +# of the product and file versions while build-number is used as the build suffix. +version: 0.0.1 + +environment: + sdk: ">=3.6.0 <4.0.0" + +# Dependencies specify other packages that your package needs in order to work. +# To automatically upgrade your package dependencies to the latest versions +# consider running `flutter pub upgrade --major-versions`. Alternatively, +# dependencies can be manually updated by changing the version numbers below to +# the latest version available on pub.dev. To see which dependencies have newer +# versions available, run `flutter pub outdated`. +dependencies: + flutter: + sdk: flutter + logging: any + + # The following adds the Cupertino Icons font to your application. + # Use with the CupertinoIcons class for iOS style icons. + flutter_localizations: + sdk: flutter + adwaita: any + libadwaita: any + libadwaita_window_manager: any + window_manager: any + url_launcher: any + flutter_markdown: any + launch_at_startup: ^0.3.1 + package_info_plus: any + +dev_dependencies: + flutter_test: + sdk: flutter + + + + # The "flutter_lints" package below contains a set of recommended lints to + # encourage good coding practices. The lint set provided by the package is + # activated in the `analysis_options.yaml` file located at the root of your + # package. See that file for information about deactivating specific lint + # rules and activating additional ones. + +# For information on the generic Dart part of this file, see the +# following page: https://dart.dev/tools/pub/pubspec + +# The following section is specific to Flutter packages. +flutter: + + # The following line ensures that the Material Icons font is + # included with your application, so that you can use the icons in + # the material Icons class. + uses-material-design: true + + # To add assets to your application, add an assets section, like this: + assets: + - assets/images/ + - assets/localizations/ + - assets/localizations/markdowns/ + - assets/localizations/markdowns/en/ + - assets/localizations/markdowns/fr/ + # - images/a_dot_burr.jpeg + # - images/a_dot_ham.jpeg + + # An image asset can refer to one or more resolution-specific "variants", see + # https://flutter.dev/to/resolution-aware-images + + # For details regarding adding assets from package dependencies, see + # https://flutter.dev/to/asset-from-package + + # To add custom fonts to your application, add a fonts section here, + # in this "flutter" section. Each entry in this list should have a + # "family" key with the font family name, and a "fonts" key with a + # list giving the asset and other descriptors for the font. For + # example: + # fonts: + # - family: Schyler + # fonts: + # - asset: fonts/Schyler-Regular.ttf + # - asset: fonts/Schyler-Italic.ttf + # style: italic + # - family: Trajan Pro + # fonts: + # - asset: fonts/TrajanPro.ttf + # - asset: fonts/TrajanPro_Bold.ttf + # weight: 700 + # + # For details regarding fonts from package dependencies, + # see https://flutter.dev/to/font-from-package