Commit 1960c19a authored by Alexei Kartashov's avatar Alexei Kartashov

Initial commit

parents
MIT License
Copyright (c) 2024 Unknown
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
# de-installer
A description of this project.
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"><g color="#000" fill="#2e3436"><path d="M7.188 2.281c-.094.056-.192.125-.29.19L5.566 3.803a1.684 1.684 0 11-2.17 2.17L2.332 7.037c.506-.069 1.017-.136 1.2.026.242.214.139 1.031.155 1.656.213.088.427.171.657.219.04.008.085-.007.125 0 .337-.525.683-1.288 1-1.344.322-.057.905.562 1.406.937a3.67 3.67 0 00.656-.468c-.195-.595-.594-1.369-.437-1.657.158-.29 1.019-.37 1.625-.531.028-.183.062-.371.062-.562 0-.075-.027-.146-.031-.22-.587-.217-1.435-.385-1.562-.687-.128-.302.34-1.021.593-1.593a3.722 3.722 0 00-.593-.532zm3.875 3.25c-.165.475-.305 1.086-.47 1.563-.43.047-.84.14-1.218.312-.38-.322-.787-.773-1.156-1.093a5.562 5.562 0 00-.688.468c.177.46.453 1.001.625 1.469-.298.309-.531.67-.719 1.063-.494 0-1.102-.084-1.593-.094a5.68 5.68 0 00-.219.812c.435.24 1.006.468 1.438.72-.006.093-.032.185-.032.28 0 .333.049.66.125.97-.382.304-.898.63-1.28.937.015.044.04.083.058.127l.613.613c.417-.1.868-.223 1.266-.303.248.343.532.626.875.875-.027.135-.068.283-.104.428.174-.063.34-.155.482-.297l1.432-1.432a1.994 1.994 0 01.533-3.918c.919 0 1.684.623 1.918 1.467l1.338-1.338c.06-.06.11-.124.156-.191-.035-.062-.06-.13-.1-.188.096-.152.205-.31.315-.47.017-.348-.1-.7-.37-.971l-.177-.176c-.28.192-.561.387-.83.555-.345-.233-.746-.383-1.156-.5-.077-.507-.107-1.132-.187-1.625a5.44 5.44 0 00-.875-.063zm-9.247.608c-.087.068-.173.138-.254.205l.014.035z" style="marker:none" overflow="visible"/><path d="M8.707.293a1 1 0 00-1.415 0l-6.999 7a1 1 0 000 1.413l7 7.001a1 1 0 001.415 0l7-7a1 1 0 000-1.413zm-.708 2.121l5.587 5.587L8 13.586 2.414 7.999z" style="line-height:normal;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000;text-transform:none;text-orientation:mixed;shape-padding:0;isolation:auto;mix-blend-mode:normal;marker:none" font-weight="400" font-family="sans-serif" overflow="visible"/></g></svg>
\ No newline at end of file
application_id = 'ru.ximperlinux.DEinstaller'
scalable_dir = 'hicolor' / 'scalable' / 'apps'
install_data(
scalable_dir / ('@0@.svg').format(application_id),
install_dir: get_option('datadir') / 'icons' / scalable_dir
)
symbolic_dir = 'hicolor' / 'symbolic' / 'apps'
install_data(
symbolic_dir / ('@0@-symbolic.svg').format(application_id),
install_dir: get_option('datadir') / 'icons' / symbolic_dir
)
desktop_file = i18n.merge_file(
input: 'ru.ximperlinux.DEinstaller.desktop.in',
output: 'ru.ximperlinux.DEinstaller.desktop',
type: 'desktop',
po_dir: '../po',
install: true,
install_dir: get_option('datadir') / 'applications'
)
desktop_utils = find_program('desktop-file-validate', required: false)
if desktop_utils.found()
test('Validate desktop file', desktop_utils, args: [desktop_file])
endif
appstream_file = i18n.merge_file(
input: 'ru.ximperlinux.DEinstaller.metainfo.xml.in',
output: 'ru.ximperlinux.DEinstaller.metainfo.xml',
po_dir: '../po',
install: true,
install_dir: get_option('datadir') / 'metainfo'
)
appstreamcli = find_program('appstreamcli', required: false, disabler: true)
test('Validate appstream file', appstreamcli,
args: ['validate', '--no-net', '--explain', appstream_file])
install_data('ru.ximperlinux.DEinstaller.gschema.xml',
install_dir: get_option('datadir') / 'glib-2.0' / 'schemas'
)
compile_schemas = find_program('glib-compile-schemas', required: false, disabler: true)
test('Validate schema file',
compile_schemas,
args: ['--strict', '--dry-run', meson.current_source_dir()])
subdir('icons')
[Desktop Entry]
Name=DE installer
Exec=de-installer
Icon=ru.ximperlinux.DEinstaller
Terminal=false
Type=Application
Categories=GTK;
StartupNotify=true
<?xml version="1.0" encoding="UTF-8"?>
<schemalist gettext-domain="de-installer">
<schema id="ru.ximperlinux.DEinstaller" path="/ru/ximperlinux/DEinstaller/">
</schema>
</schemalist>
<?xml version="1.0" encoding="UTF-8"?>
<component type="desktop">
<id>ru.ximperlinux.DEinstaller.desktop</id>
<metadata_license>CC0-1.0</metadata_license>
<project_license>MIT</project_license>
<description>
<p>No description</p>
</description>
</component>
project('de-installer', ['c', 'vala'],
version: '0.1.0',
meson_version: '>= 0.62.0',
default_options: [ 'warning_level=2', 'werror=false', ],
)
i18n = import('i18n')
gnome = import('gnome')
subdir('data')
subdir('src')
subdir('po')
gnome.post_install(
glib_compile_schemas: true,
gtk_update_icon_cache: true,
update_desktop_database: true,
)
data/ru.ximperlinux.DEinstaller.desktop.in
data/ru.ximperlinux.DEinstaller.metainfo.xml.in
data/ru.ximperlinux.DEinstaller.gschema.xml
src/main.vala
src/window.vala
src/window.ui
i18n.gettext('de-installer', preset: 'glib')
{
"id" : "ru.ximperlinux.DEinstaller",
"runtime" : "org.gnome.Platform",
"runtime-version" : "46",
"sdk" : "org.gnome.Sdk",
"sdk-extensions" : [
"org.freedesktop.Sdk.Extension.vala"
],
"command" : "de-installer",
"finish-args" : [
"--share=network",
"--share=ipc",
"--socket=fallback-x11",
"--device=dri",
"--socket=wayland"
],
"build-options" : {
"append-path" : "/usr/lib/sdk/vala/bin",
"prepend-ld-library-path" : "/usr/lib/sdk/vala/lib"
},
"cleanup" : [
"/include",
"/lib/pkgconfig",
"/man",
"/share/doc",
"/share/gtk-doc",
"/share/man",
"/share/pkgconfig",
"/share/vala",
"*.la",
"*.a"
],
"modules" : [
{
"name" : "de-installer",
"builddir" : true,
"buildsystem" : "meson",
"sources" : [
{
"type" : "git",
"url" : "file:///home/alex/Projects/_etersoft_"
}
]
}
]
}
/* MIT License
*
* Copyright (c) 2024 Unknown
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* SPDX-License-Identifier: MIT
*/
namespace DeInstaller {
public class Application : Adw.Application {
public Application () {
Object (application_id: "ru.ximperlinux.DEinstaller", flags: ApplicationFlags.DEFAULT_FLAGS);
}
construct {
ActionEntry[] action_entries = {
{ "about", this.on_about_action },
{ "preferences", this.on_preferences_action },
{ "quit", this.quit }
};
this.add_action_entries (action_entries, this);
this.set_accels_for_action ("app.quit", {"<primary>q"});
}
public override void activate () {
base.activate ();
var win = this.active_window;
if (win == null) {
win = new DeInstaller.Window (this);
}
win.present ();
}
private void on_about_action () {
string[] developers = { "Alex Zebra" };
var about = new Adw.AboutWindow () {
transient_for = this.active_window,
application_name = "DE installer",
application_icon = "ru.ximperlinux.DEinstaller",
developer_name = "Ximperlinux",
version = "0.1.0",
developers = developers,
copyright = "© 2024 Unknown",
};
about.present ();
}
private void on_preferences_action () {
message ("app.preferences action activated");
}
}
}
<?xml version="1.0" encoding="UTF-8"?>
<gresources>
<gresource prefix="/ru/ximperlinux/DEinstaller">
<file>style.css</file>
<file preprocess="xml-stripblanks">de-row.ui</file>
<file preprocess="xml-stripblanks">window.ui</file>
<file preprocess="xml-stripblanks">gtk/help-overlay.ui</file>
</gresource>
</gresources>
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<template class="DeInstallerRow" parent="AdwExpanderRow">
<property name="enable-expansion">True</property>
<!--| Install switch |-->
<child type="suffix">
<object class="GtkSwitch" id="install_switch">
<property name="valign">center</property>
</object>
</child>
<!--| Arrow |-->
<child type="suffix">
<object class="GtkButton" id="arrow">
<property name="valign">center</property>
<property name="icon-name">go-next-symbolic</property>
<style>
<class name="flat"/>
</style>
</object>
</child>
<child>
<object class="GtkGrid">
<property name="row-spacing">15</property>
<property name="column-spacing">15</property>
<!--| Description label |-->
<child>
<object class="GtkLabel">
<property name="label" translatable="yes">Description</property>
<property name="xalign">0</property>
<property name="yalign">0</property>
<layout>
<property name="column">0</property>
<property name="row">0</property>
</layout>
<style>
<class name="dim-label"/>
</style>
</object>
</child>
<!--| Description text |-->
<child>
<object class="GtkLabel">
<property name="label" translatable="yes">text text text text text.
text text text.
text text text text text text
text text.</property>
<property name="xalign">0</property>
<property name="wrap-mode">word</property>
<property name="wrap">True</property>
<property name="selectable">True</property>
<layout>
<property name="column">1</property>
<property name="row">0</property>
</layout>
<style>
<class name="multiline"/>
</style>
</object>
</child>
<!--| Version label |-->
<child>
<object class="GtkLabel">
<property name="label" translatable="yes">Version</property>
<property name="xalign">0</property>
<property name="yalign">0</property>
<layout>
<property name="column">0</property>
<property name="row">1</property>
</layout>
<style>
<class name="dim-label"/>
</style>
</object>
</child>
<!--| Versoin text |-->
<child>
<object class="GtkLabel">
<property name="label" translatable="yes">0.0.0</property>
<property name="xalign">0</property>
<property name="wrap-mode">word</property>
<property name="wrap">True</property>
<property name="selectable">True</property>
<layout>
<property name="column">1</property>
<property name="row">1</property>
</layout>
</object>
</child>
<style>
<class name="row-content"/>
</style>
</object>
</child>
</template>
</interface>
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<object class="GtkShortcutsWindow" id="help_overlay">
<property name="modal">True</property>
<child>
<object class="GtkShortcutsSection">
<property name="section-name">shortcuts</property>
<property name="max-height">10</property>
<child>
<object class="GtkShortcutsGroup">
<property name="title" translatable="yes" context="shortcut window">General</property>
<child>
<object class="GtkShortcutsShortcut">
<property name="title" translatable="yes" context="shortcut window">Show Shortcuts</property>
<property name="action-name">win.show-help-overlay</property>
</object>
</child>
<child>
<object class="GtkShortcutsShortcut">
<property name="title" translatable="yes" context="shortcut window">Quit</property>
<property name="action-name">app.quit</property>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</interface>
/* MIT License
*
* Copyright (c) 2024 Unknown
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* SPDX-License-Identifier: MIT
*/
int main (string[] args) {
var app = new DeInstaller.Application ();
return app.run (args);
}
de_installer_sources = [
'main.vala',
'application.vala',
'window.vala',
]
de_installer_deps = [
dependency('gtk4'),
dependency('libadwaita-1', version: '>= 1.4'),
]
de_installer_sources += gnome.compile_resources('de-installer-resources',
'de-installer.gresource.xml',
c_name: 'de_installer'
)
executable('de-installer', de_installer_sources,
dependencies: de_installer_deps,
install: true,
)
.row-content {
padding: 10px;
}
.multiline {
line-height: 140%;
}
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<requires lib="gtk" version="4.0"/>
<requires lib="Adw" version="1.0"/>
<template class="DeInstallerWindow" parent="AdwApplicationWindow">
<property name="default-width">600</property>
<property name="default-height">600</property>
<property name="content">
<object class="AdwToolbarView">
<child type="top">
<object class="AdwHeaderBar" id="header_bar">
<property name="title-widget">
<object class="AdwWindowTitle">
<property name="title" translatable="yes">DE installer</property>
</object>
</property>
<child type="end">
<object class="GtkMenuButton">
<property name="primary">True</property>
<property name="icon-name">open-menu-symbolic</property>
<property name="tooltip-text" translatable="yes">Menu</property>
<property name="menu-model">primary_menu</property>
</object>
</child>
</object>
</child>
<property name="content">
<object class="AdwPreferencesPage">
<child>
<object class="AdwPreferencesGroup">
<child>
<object class="DeInstallerRow" id="gnome_row">
<property name="title" translatable="yes">Gnome</property>
<property name="subtitle" translatable="yes">Nice DE</property>
</object>
</child>
<child>
<object class="DeInstallerRow" id="xfce4_row">
<property name="title" translatable="yes">XFCE4</property>
<property name="subtitle" translatable="yes">Light weight DE</property>
</object>
</child>
<child>
<object class="DeInstallerRow" id="hyperland_row">
<property name="title" translatable="yes">Hyperland</property>
<property name="subtitle" translatable="yes">This is DE</property>
</object>
</child>
<child>
<object class="DeInstallerRow" id="fluxbox_row">
<property name="title" translatable="yes">Fluxbox</property>
<property name="subtitle" translatable="yes">text text</property>
</object>
</child>
<child>
<object class="DeInstallerRow" id="iceWM_row">
<property name="title" translatable="yes">IceWM</property>
<property name="subtitle" translatable="yes">This is IceWM</property>
</object>
</child>
<child>
<object class="DeInstallerRow" id="i3_row">
<property name="title" translatable="yes">I3</property>
<property name="subtitle" translatable="yes">This is i3</property>
</object>
</child>
</object>
</child>
</object>
</property>
<child type="bottom">
<object name="GtkButton">
<property name="label">Install</property>
<style>
<class name="suggested-action"/>
</style>
</object>
</child>
</object>
</property>
</template>
<menu id="primary_menu">
<section>
<item>
<attribute name="label" translatable="yes">_Preferences</attribute>
<attribute name="action">app.preferences</attribute>
</item>
<item>
<attribute name="label" translatable="yes">_Keyboard Shortcuts</attribute>
<attribute name="action">win.show-help-overlay</attribute>
</item>
<item>
<attribute name="label" translatable="yes">_About DE installer</attribute>
<attribute name="action">app.about</attribute>
</item>
</section>
</menu>
</interface>
/* MIT License
*
* Copyright (c) 2024 Unknown
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* SPDX-License-Identifier: MIT
*/
namespace DeInstaller {
[GtkTemplate (ui = "/ru/ximperlinux/DEinstaller/de-row.ui")]
public class Row : Adw.ExpanderRow {
[GtkChild]
private unowned Gtk.Switch install_switch;
[GtkChild]
private unowned Gtk.Button arrow;
}
[GtkTemplate (ui = "/ru/ximperlinux/DEinstaller/window.ui")]
public class Window : Adw.ApplicationWindow {
[GtkChild]
private unowned Row gnome_row;
[GtkChild]
private unowned Row xfce4_row;
public Window (Gtk.Application app) {
Object (application: app);
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment