diff --git a/.github/build-canary-v3 b/.github/build-canary-v3 new file mode 100644 index 0000000..56a6051 --- /dev/null +++ b/.github/build-canary-v3 @@ -0,0 +1 @@ +1 \ No newline at end of file diff --git a/.github/build-nest-v3 b/.github/build-nest-v3 new file mode 100644 index 0000000..45a4fb7 --- /dev/null +++ b/.github/build-nest-v3 @@ -0,0 +1 @@ +8 diff --git a/.github/github_pushback.sh b/.github/github_pushback.sh new file mode 100755 index 0000000..ece0584 --- /dev/null +++ b/.github/github_pushback.sh @@ -0,0 +1,31 @@ +#! /bin/bash + +mkdir -p ~/.ssh +ssh-keyscan -H pika-os.com >> ~/.ssh/known_hosts +ssh-keyscan -H git.pika-os.com >> ~/.ssh/known_hosts +#echo -e "Host git.pika-os.com\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config +#echo -e "Host git.pika-os.com\n\tIdentityFile ~/.ssh/id_rsa\n\tStrictHostKeyChecking no\n" > ~/.ssh/config +#ssh-agent -a $SSH_AUTH_SOCK > /dev/null +#ssh-add - <<< "$1" + +#export GIT_SSH_COMMAND="ssh -F ~/.ssh/config" + +#ssh -o StrictHostKeyChecking=no -vT git@git.pika-os.com +#ssh -vT git@git.pika-os.com + +# Commit changes to git +git config --global user.name 'Github Gitea Push Back Key - Cosmo' +git config --global user.email 'cosmo@pika-os.com' +#git config --global --add safe.directory /__w/gitea-pika-first-setup/gitea-pika-first-setup + +git clone git@git.pika-os.com:custom-gui-packages/pika-first-setup + +rm -rfv ./gitea-pika-first-setup/.git +cp -rfv ./pika-first-setup/.git ./gitea-pika-first-setup/ + +cd ./gitea-pika-first-setup +git add . +git commit -am"Github Mirror Push Back" +#git config pull.rebase true +#git pull +git push diff --git a/.github/release-canary-v3 b/.github/release-canary-v3 new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/.github/release-canary-v3 @@ -0,0 +1 @@ +1 diff --git a/.github/release-nest-v3 b/.github/release-nest-v3 new file mode 100644 index 0000000..301160a --- /dev/null +++ b/.github/release-nest-v3 @@ -0,0 +1 @@ +8 \ No newline at end of file diff --git a/.github/workflows/build-canaryv3.yml b/.github/workflows/build-canaryv3.yml new file mode 100644 index 0000000..255a0c8 --- /dev/null +++ b/.github/workflows/build-canaryv3.yml @@ -0,0 +1,48 @@ +name: PikaOS Package Build Only (Canary) (amd64-v3) + +on: + push: + branches: + - main + paths: + - '.github/build-canary-v3' + +jobs: + build: + runs-on: ubuntu-latest + container: + image: ghcr.io/pikaos-linux/pikaos-builder:canaryv3 + volumes: + - /proc:/proc + options: --privileged -it + + steps: + + - name: Runner Origin Check + run: | + if [ "${{ secrets.RUNNER_ORIGIN }}" = "github" ]; then + exit 1 + else + true + fi + env: + RUNNER_ORIGIN: ${{ secrets.RUNNER_ORIGIN }} + + - uses: actions/checkout@v3 + + - name: Install SSH key + uses: shimataro/ssh-key-action@v2 + with: + key: ${{ secrets.SSH_KEY }} + name: id_rsa + known_hosts: ${{ secrets.KNOWN_HOSTS }} + if_key_exists: replace + + - name: Update APT Cache + run: apt-get update -y + + - name: Set Build Config + run: cp -vf ./pika-build-config/amd64-v3.sh ./pika-build-config.sh + + - name: Build Package + run: ./main.sh diff --git a/.github/workflows/build-nestv3.yml b/.github/workflows/build-nestv3.yml new file mode 100644 index 0000000..f051808 --- /dev/null +++ b/.github/workflows/build-nestv3.yml @@ -0,0 +1,48 @@ +name: PikaOS Package Build Only (amd64-v3) + +on: + push: + branches: + - main + paths: + - '.github/build-nest-v3' + +jobs: + build: + runs-on: ubuntu-latest + container: + image: ghcr.io/pikaos-linux/pikaos-builder:nestv3 + volumes: + - /proc:/proc + options: --privileged -it + + steps: + + - name: Runner Origin Check + run: | + if [ "${{ secrets.RUNNER_ORIGIN }}" = "github" ]; then + exit 1 + else + true + fi + env: + RUNNER_ORIGIN: ${{ secrets.RUNNER_ORIGIN }} + + - uses: actions/checkout@v3 + + - name: Install SSH key + uses: shimataro/ssh-key-action@v2 + with: + key: ${{ secrets.SSH_KEY }} + name: id_rsa + known_hosts: ${{ secrets.KNOWN_HOSTS }} + if_key_exists: replace + + - name: Update APT Cache + run: apt-get update -y + + - name: Set Build Config + run: cp -vf ./pika-build-config/amd64-v3.sh ./pika-build-config.sh + + - name: Build Package + run: ./main.sh diff --git a/.github/workflows/github-pushback.yml b/.github/workflows/github-pushback.yml new file mode 100644 index 0000000..edfdde6 --- /dev/null +++ b/.github/workflows/github-pushback.yml @@ -0,0 +1,41 @@ +name: Github Push back to gitea + +on: + push: + branches: + - main + +jobs: + Push: + runs-on: ubuntu-latest + container: + image: ghcr.io/pikaos-linux/pikaos-builder:nestv3 + volumes: + - /proc:/proc + options: --privileged -it + + steps: + + - name: Runner Origin Check + run: | + if [ "${{ secrets.RUNNER_ORIGIN }}" = "github" ]; then + true + else + exit 1 + fi + env: + RUNNER_ORIGIN: ${{ secrets.RUNNER_ORIGIN }} + + - name: Install SSH key + uses: shimataro/ssh-key-action@v2 + with: + key: ${{ secrets.GITEA_SSH_KEY }} + name: id_rsa + known_hosts: ${{ secrets.KNOWN_HOSTS }} + if_key_exists: replace + + - name: Run + run: git clone https://github.com/PikaOS-Linux/gitea-pika-first-setup + + - name: Run + run: ./gitea-pika-first-setup/.github/github_pushback.sh diff --git a/.github/workflows/release-canaryv3.yml b/.github/workflows/release-canaryv3.yml new file mode 100644 index 0000000..fa53734 --- /dev/null +++ b/.github/workflows/release-canaryv3.yml @@ -0,0 +1,51 @@ +name: PikaOS Package Build & Release (Canary) (amd64-v3) + +on: + push: + branches: + - main + paths: + - '.github/release-canary-v3' + +jobs: + build: + runs-on: ubuntu-latest + container: + image: ghcr.io/pikaos-linux/pikaos-builder:canaryv3 + volumes: + - /proc:/proc + options: --privileged -it + + steps: + + - name: Runner Origin Check + run: | + if [ "${{ secrets.RUNNER_ORIGIN }}" = "github" ]; then + exit 1 + else + true + fi + env: + RUNNER_ORIGIN: ${{ secrets.RUNNER_ORIGIN }} + + - uses: actions/checkout@v3 + + - name: Install SSH key + uses: shimataro/ssh-key-action@v2 + with: + key: ${{ secrets.SSH_KEY }} + name: id_rsa + known_hosts: ${{ secrets.KNOWN_HOSTS }} + if_key_exists: replace + + - name: Update APT Cache + run: apt-get update -y + + - name: Set Build Config + run: cp -vf ./pika-build-config/amd64-v3.sh ./pika-build-config.sh + + - name: Build Package + run: ./main.sh + + - name: Release Package + run: ./release.sh diff --git a/.github/workflows/release-nestv3.yml b/.github/workflows/release-nestv3.yml new file mode 100644 index 0000000..05ed7ce --- /dev/null +++ b/.github/workflows/release-nestv3.yml @@ -0,0 +1,51 @@ +name: PikaOS Package Build & Release (amd64-v3) + +on: + push: + branches: + - main + paths: + - '.github/release-nest-v3' + +jobs: + build: + runs-on: ubuntu-latest + container: + image: ghcr.io/pikaos-linux/pikaos-builder:nestv3 + volumes: + - /proc:/proc + options: --privileged -it + + steps: + + - name: Runner Origin Check + run: | + if [ "${{ secrets.RUNNER_ORIGIN }}" = "github" ]; then + exit 1 + else + true + fi + env: + RUNNER_ORIGIN: ${{ secrets.RUNNER_ORIGIN }} + + - uses: actions/checkout@v3 + + - name: Install SSH key + uses: shimataro/ssh-key-action@v2 + with: + key: ${{ secrets.SSH_KEY }} + name: id_rsa + known_hosts: ${{ secrets.KNOWN_HOSTS }} + if_key_exists: replace + + - name: Update APT Cache + run: apt-get update -y + + - name: Set Build Config + run: cp -vf ./pika-build-config/amd64-v3.sh ./pika-build-config.sh + + - name: Build Package + run: ./main.sh + + - name: Release Package + run: ./release.sh diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index 8d34d97..0000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,47 +0,0 @@ -name: PikaOS Package Release - -on: - workflow_dispatch - -jobs: - build: - runs-on: self-hosted - container: - image: ghcr.io/pikaos-linux/pika-package-container:latest - volumes: - - /proc:/proc - options: --privileged -it - - steps: - - uses: actions/checkout@v3 - - - name: Import GPG key - id: import_gpg - uses: crazy-max/ghaction-import-gpg@v5 - with: - gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} - passphrase: ${{ secrets.PASSPHRASE }} - - - name: Install SSH key - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SSH_KEY }} - name: id_rsa - known_hosts: ${{ secrets.KNOWN_HOSTS }} - if_key_exists: replace - - - name: Build Package - run: chmod +x ./main.sh && ./main.sh - - - name: Release Package - run: chmod +x ./release.sh && ./release.sh - - - name: Purge cache - uses: strrife/cloudflare-chunked-purge-action@master - env: - # Zone is required by both authentication methods - CLOUDFLARE_ZONE: ${{ secrets.CLOUDFLARE_ZONE }} - - CLOUDFLARE_TOKEN: ${{ secrets.CLOUDFLARE_TOKEN }} - PURGE_URLS: ${{ vars.PURGE_URLS }} - \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1de5659 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +target \ No newline at end of file diff --git a/Cargo.lock b/Cargo.lock index 51b4af7..a66b888 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -816,7 +816,7 @@ checksum = "bb813b8af86854136c6922af0598d719255ecb2179515e6e7730d468f05c9cae" [[package]] name = "pika-first-setup-gtk4" -version = "1.0.1" +version = "1.0.4" dependencies = [ "async-channel", "duct", diff --git a/Cargo.toml b/Cargo.toml index 1fe57d4..bc37d28 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pika-first-setup-gtk4" -version = "1.0.1" +version = "1.0.4" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/README.md b/README.md index 43dbcda..24d4033 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -### PikaOS initial user setup +## PikaOS initial user setup A Rust based GTK4 + Libadwaita App for handling initial user setup on PikaOS. diff --git a/debian/changelog b/debian/changelog index ad1348d..21931f4 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +pika-first-setup (1.0.4-101pika3) pika; urgency=low + + * Just rebuild for OS4 + + -- Ward Nakchbandi Thu, 20 Sep 2022 22:01:00 +0000 + pika-first-setup (1.0.1-100pika5) pikauwu; urgency=low * First release diff --git a/debian/control b/debian/control index aa97a26..d3da2a6 100644 --- a/debian/control +++ b/debian/control @@ -14,5 +14,5 @@ Rules-Requires-Root: no Package: pika-first-setup-gtk4 Architecture: any -Depends: ${shlibs:Depends} +Depends: ${shlibs:Depends}, nm-connection-editor Description: A frontend in GTK 4 and Libadwaita for initial user setup in pika. diff --git a/debian/rules b/debian/rules index aa23fea..00c25af 100755 --- a/debian/rules +++ b/debian/rules @@ -4,7 +4,16 @@ ## Output every command that modifies files on the build system. export DH_VERBOSE = 1 -export PATH := "/root/.cargo/bin:$(PWD):$(PATH)" +export PIKA_BUILD_ARCH = $(shell cat ../pika-build-arch) +export PATH := $(PATH):/root/.cargo/bin + +override_dh_prep: +# amd64 build prep +ifeq (amd64-v3,$(PIKA_BUILD_ARCH)) +# Does not support LTO due to dylib-lto +#export RUSTFLAGS = -C target-cpu=x86-64-v3 -C lto=fat -C embed-bitcode -C codegen-units=1 -C opt-level=3 -Zdylib-lto +export RUSTFLAGS = -C target-cpu=x86-64-v3 -C opt-level=3 +endif %: dh $@ diff --git a/debian/source/format b/debian/source/format index 89ae9db..163aaf8 100644 --- a/debian/source/format +++ b/debian/source/format @@ -1 +1 @@ -3.0 (native) +3.0 (quilt) diff --git a/locales/bg_BG.json b/locales/bg_BG.json index f37eedc..c5934ca 100644 --- a/locales/bg_BG.json +++ b/locales/bg_BG.json @@ -13,7 +13,7 @@ "first_setup_internet_skip_dialog_heading": "Пропусни Мрежова Настройка?", "first_setup_internet_skip_dialog_body": "Пропускайки Мрежовата Настройка, много от следващите стъпки ще са недостъпни!\nТова НЕ Е препоръчително.", "first_setup_internet_skip_dialog_skip_cancel_label": "Обратно към Мрежови Настройки", - "first-setup-internet-skip-dialog-skip-confirm-labe": "Просто Пропусни!", + "first_setup_internet_skip_dialog_skip_confirm_label": "Просто Пропусни!", "first_setup_internet_box_text_description_true": "Устройството се свърза с Интернет успешно!", "first_setup_internet_box_text_description_false": "Няма връзка с Интернет!", "first_setup_update_box_text_title": "Системни Актуализации", @@ -32,7 +32,7 @@ "user_info_password_verify_title": "Напишете Потребителска парола отново:", "error_label_is_root_label": "Потребителското име не може да е root.", "error_label_is_pikaos_label": "Потребителското име не може да е pikaos.", - "error_label_username_is_special_label": "Потребителското име не може да съдържа специални символи.", + "error_label_username_is_invalid_label": "Потребителското име не може да съдържа специални символи.", "error_label_hostname_is_special_label": "Името на хоста не може да съдържа специални символи или интервали.", "error_label_password_mismatch_label": "Паролите не съвпадат!", "first_setup_gameutils_box_text_title": "PikaOS Геймърски МЕТА Пакет", diff --git a/locales/cs_CZ.json b/locales/cs_CZ.json index 04ee399..a5ced7e 100644 --- a/locales/cs_CZ.json +++ b/locales/cs_CZ.json @@ -12,7 +12,7 @@ "first_setup_internet_skip_dialog_heading": "Přeskočit nastavení sítě?", "first_setup_internet_skip_dialog_body": "Pokud-li přeskočíš nastavení sítě, mnoho dalších kroku nebude možné provést! Tento krok NEDOPORUČUJEME přeskakovat.", "first_setup_internet_skip_dialog_skip_cancel_label": "Zpátky na nastavení sítě", - "first-setup-internet-skip-dialog-skip-confirm-labe": "Chci přeskočit!", + "first_setup_internet_skip_dialog_skip_confirm_label": "Chci přeskočit!", "first_setup_internet_box_text_description_true": "Zařízení se připojilo k internetu úspěšně!", "first_setup_internet_box_text_description_false": "Žádné připojení k internetu!", "first_setup_update_box_text_title": "Aktualizace systému", @@ -32,7 +32,7 @@ "user_info_password_verify_title": "Ověření uživatelského hesla:", "error_label_is_root_label": "Uživatelské jméno nemůže být root.", "error_label_is_pikaos_label": "Uživatelské jméno nemůže být pikaos.", - "error_label_username_is_special_label": "Uživatelské jméno nemůže obsahovat mezery či speciální znaky.", + "error_label_username_is_invalid_label": "Uživatelské jméno nemůže obsahovat mezery či speciální znaky.", "error_label_hostname_is_special_label": "Hostitel nemůže obsahovat mezery či speciální znaky.", "error_label_password_mismatch_label": "Hesla se neshodují!", "first_setup_gameutils_box_text_title": "PikaOS Gaming Meta Package", diff --git a/locales/de_DE.json b/locales/de_DE.json index 43012aa..4397652 100644 --- a/locales/de_DE.json +++ b/locales/de_DE.json @@ -13,7 +13,7 @@ "first_setup_internet_skip_dialog_heading": "Netzwerkeinrichtung überspringen?", "first_setup_internet_skip_dialog_body": "Wenn du die Netzwerkeinrichtung überspringst, sind viele der nächsten Schritte nicht verfügbar!\nDies wird NICHT empfohlen.", "first_setup_internet_skip_dialog_skip_cancel_label": "Zurück zur Netzwerkeinrichtung", - "first-setup-internet-skip-dialog-skip-confirm-labe": "Ja überspringen!", + "first_setup_internet_skip_dialog_skip_confirm_label": "Ja überspringen!", "first_setup_internet_box_text_description_true": "Gerät hat sich erfolgfreich mit dem Internet verbunden!", "first_setup_internet_box_text_description_false": "Keine Internetverbindung!", "first_setup_update_box_text_title": "System Aktualisierungen", @@ -32,7 +32,7 @@ "user_info_password_verify_title": "Gib das Benutzerpasswort erneut ein:", "error_label_is_root_label": "Der Benutzername darf nicht root sein.", "error_label_is_pikaos_label": "Der Benutzername darf nicht pikaos sein.", - "error_label_username_is_special_label": "Der Benutzername darf keine Sonderzeichen oder Leerzeichen enthalten.", + "error_label_username_is_invalid_label": "Der Benutzername darf keine Sonderzeichen oder Leerzeichen enthalten.", "error_label_hostname_is_special_label": "Der Hostname darf keine Sonderzeichen oder Leerzeichen enthalten.", "error_label_password_mismatch_label": "Passwörter stimmen nicht überein!", "first_setup_gameutils_box_text_title": "PikaOS Gaming Meta-Paket", diff --git a/locales/en_US.json b/locales/en_US.json index 8b5ecdb..5232081 100644 --- a/locales/en_US.json +++ b/locales/en_US.json @@ -13,7 +13,7 @@ "first_setup_internet_skip_dialog_heading": "Skip Network Setup?", "first_setup_internet_skip_dialog_body": "Skipping Network Setup will make many of the next steps unavailable!\nThis is NOT recommended.", "first_setup_internet_skip_dialog_skip_cancel_label": "Return to Network Setup", - "first-setup-internet-skip-dialog-skip-confirm-labe": "Just Skip!", + "first_setup_internet_skip_dialog_skip_confirm_label": "Just Skip!", "first_setup_internet_box_text_description_true": "Device connected to Internet Successfully!", "first_setup_internet_box_text_description_false": "No internet Connection!", "first_setup_update_box_text_title": "System Updates", @@ -33,7 +33,7 @@ "user_info_password_verify_title": "Enter User password again:", "error_label_is_root_label": "Username can not be root.", "error_label_is_pikaos_label": "Username can not be pikaos.", - "error_label_username_is_special_label": "Username can not contain special characters or spaces.", + "error_label_username_is_invalid_label": "Username is can only contain:\nlowercase letters\n \"-\" and \"_\"\n and must start with a lowercase letter.", "error_label_hostname_is_special_label": "Hostname can not contain special characters or spaces.", "error_label_password_mismatch_label": "Passwords do not match!", "first_setup_gameutils_box_text_title": "PikaOS Gaming Meta Package", diff --git a/locales/fr_FR.json b/locales/fr_FR.json index 80d514a..688b9d5 100644 --- a/locales/fr_FR.json +++ b/locales/fr_FR.json @@ -1,5 +1,5 @@ { - "app_name": "", + "app_name": "PikaOS Bienvenue", "first_setup_initial_box_text_title": "Bienvenue", "first_setup_initial_box_text_description": "Cet assistant vous aidera à terminer l'installation de PikaOS", "first_setup_start_button_label": "Commençons-nous", @@ -13,7 +13,7 @@ "first_setup_internet_skip_dialog_heading": "Passer la configuration du réseau ?", "first_setup_internet_skip_dialog_body": "Si vous sautez l'étape de l'installation du réseau, la plupart des étapes suivantes ne seront pas disponibles !\nCeci n'est PAS recommandé", "first_setup_internet_skip_dialog_skip_cancel_label": "Retour à la configuration du réseau", - "first-setup-internet-skip-dialog-skip-confirm-labe": "", + "first_setup_internet_skip_dialog_skip_confirm_label": "", "first_setup_internet_box_text_description_true": "L'appareil s'est connecté à Internet avec succès !", "first_setup_internet_box_text_description_false": "Pas de connexion internet !", "first_setup_update_box_text_title": "Mises à jour du système", @@ -32,7 +32,7 @@ "user_info_password_verify_title": "Saisir à nouveau le mot de passe de l'utilisateur:", "error_label_is_root_label": "Le nom d'utilisateur ne peut pas être \"root\".", "error_label_is_pikaos_label": "Le nom d'utilisateur ne peut pas être \"pikaos\".", - "error_label_username_is_special_label": "Le nom d'utilisateur ne peut pas contenir de caractère spécial ou d'espace.", + "error_label_username_is_invalid_label": "Le nom d'utilisateur ne peut pas contenir de caractère spécial ou d'espace.", "error_label_hostname_is_special_label": "Le nom d'hôte ne peut pas contenir de caractère spécial ou d'espace.", "error_label_password_mismatch_label": "Les mots de passe ne correspondent pas !", "first_setup_gameutils_box_text_title": "PikaOS Gaming Meta Package", diff --git a/locales/it_IT.json b/locales/it_IT.json index bbca459..1d28284 100644 --- a/locales/it_IT.json +++ b/locales/it_IT.json @@ -13,7 +13,7 @@ "first_setup_internet_skip_dialog_heading": "Vuoi saltare la configurazione di Internet?", "first_setup_internet_skip_dialog_body": "Saltare la configurazione della rete renderà molti dei prossimi passaggi impossibili!\\nQuesto non è raccomandato.", "first_setup_internet_skip_dialog_skip_cancel_label": "Ritorna alla configurazione della rete", - "first-setup-internet-skip-dialog-skip-confirm-labe": "Si voglio saltarla!", + "first_setup_internet_skip_dialog_skip_confirm_label": "Si voglio saltarla!", "first_setup_internet_box_text_description_true": "Il dispositivo è stato connesso a Internet con successo!", "first_setup_internet_box_text_description_false": "Non c'è alcuna connessione a Internet!", "first_setup_update_box_text_title": "Aggiornamenti di sistema", @@ -32,7 +32,7 @@ "user_info_password_verify_title": "Inserisci la password dell'utente un altra volta:", "error_label_is_root_label": "L'username non può essere root.", "error_label_is_pikaos_label": "L'username non può essere pikaos.", - "error_label_username_is_special_label": "", + "error_label_username_is_invalid_label": "", "error_label_hostname_is_special_label": "", "error_label_password_mismatch_label": "Le password non corrispondono!", "first_setup_gameutils_box_text_title": "PikaOS Pacchetto per il Gaming", diff --git a/locales/kab.json b/locales/kab.json new file mode 100644 index 0000000..f5d4844 --- /dev/null +++ b/locales/kab.json @@ -0,0 +1,60 @@ +{ + "app_name": "", + "first_setup_initial_box_text_title": "", + "first_setup_initial_box_text_description": "", + "first_setup_start_button_label": "", + "first_setup_window_headerbar_back_button_label": "", + "first_setup_internet_box_text_title": "", + "first_setup_internet_box_text_description": "", + "internet_skip_button_label": "", + "internet_next_button_label": "", + "first_setup_internet_button_content_text_label": "", + "first_setup_internet_button_content_label": "", + "first_setup_internet_skip_dialog_heading": "", + "first_setup_internet_skip_dialog_body": "", + "first_setup_internet_skip_dialog_skip_cancel_label": "", + "first_setup_internet_skip_dialog_skip_confirm_label": "", + "first_setup_internet_box_text_description_true": "", + "first_setup_internet_box_text_description_false": "", + "first_setup_update_box_text_title": "", + "first_setup_update_button_label": "", + "first_setup_update_skip_button_label": "", + "system_update_dialog_heading": "", + "system_update_dialog_ok_label": "", + "internet_network_disabled": "", + "system_update_dialog_success_true": "", + "system_update_dialog_success_false": "", + "first_setup_user_box_text_title": "", + "first_setup_user_box_text_description": "", + "user_info_username_title": "", + "user_info_full_name_title": "", + "user_info_hostname_title": "", + "user_info_password_title": "", + "user_info_password_verify_title": "", + "error_label_is_root_label": "", + "error_label_is_pikaos_label": "", + "error_label_username_is_invalid_label": "", + "error_label_hostname_is_special_label": "", + "error_label_password_mismatch_label": "", + "first_setup_gameutils_box_text_title": "", + "first_setup_gameutils_box_text_description": "", + "first_setup_gameutils_button_label": "", + "first_setup_gameutils_skip_button_label": "", + "gameutils_install_dialog_heading": "", + "gameutils_install_dialog_success_true": "", + "gameutils_install_dialog_success_false": "", + "first_setup_codec_box_text_title": "", + "first_setup_codec_box_text_description": "", + "first_setup_codec_button_label": "", + "first_setup_codec_skip_button_label": "", + "codec_install_dialog_heading": "", + "codec_install_dialog_success_true": "", + "codec_install_dialog_success_false": "", + "first_setup_driver_box_text_title": "", + "first_setup_driver_box_text_description": "", + "first_setup_driver_button_label": "", + "first_setup_driver_skip_button_label": "", + "first_setup_final_box_text_title": "", + "first_setup_final_box_text_description": "", + "first_setup_reboot_button_label": "" +} diff --git a/locales/nl_NL.json b/locales/nl_NL.json index e7f41c0..3342f23 100644 --- a/locales/nl_NL.json +++ b/locales/nl_NL.json @@ -13,7 +13,7 @@ "first_setup_internet_skip_dialog_heading": "Netwerkconfiguratie overslaan?", "first_setup_internet_skip_dialog_body": "Als u Netwerkinstellingen overslaat, zijn veel van de volgende stappen niet beschikbaar!\nDit wordt NIET aanbevolen.", "first_setup_internet_skip_dialog_skip_cancel_label": "Terug naar netwerkinstellingen", - "first-setup-internet-skip-dialog-skip-confirm-labe": "Gewoon overslaan!", + "first_setup_internet_skip_dialog_skip_confirm_label": "Gewoon overslaan!", "first_setup_internet_box_text_description_true": "Apparaat is succesvol verbonden met internet!", "first_setup_internet_box_text_description_false": "Geen internetverbinding!", "first_setup_update_box_text_title": "Systeemupdates", @@ -33,7 +33,7 @@ "user_info_password_verify_title": "Voer het gebruikerswachtwoord opnieuw in:", "error_label_is_root_label": "Gebruikersnaam mag geen root zijn.", "error_label_is_pikaos_label": "Gebruikersnaam mag geen pikaos zijn.", - "error_label_username_is_special_label": "De gebruikersnaam mag geen speciale tekens of spaties bevatten.", + "error_label_username_is_invalid_label": "De gebruikersnaam mag geen speciale tekens of spaties bevatten.", "error_label_hostname_is_special_label": "Hostnaam mag geen speciale tekens of spaties bevatten.", "error_label_password_mismatch_label": "Wachtwoorden komen niet overeen!", "first_setup_gameutils_box_text_title": "PikaOS Gaming metapakket", diff --git a/locales/sv_SE.json b/locales/sv_SE.json index abf41a6..cf3072b 100644 --- a/locales/sv_SE.json +++ b/locales/sv_SE.json @@ -13,7 +13,7 @@ "first_setup_internet_skip_dialog_heading": "Hoppa över Nätverkskonfiguration?", "first_setup_internet_skip_dialog_body": "Om du hoppar över Nätverkskonfiguration blir många av de följande stegen otillgängliga!\nDetta rekommenderas INTE.", "first_setup_internet_skip_dialog_skip_cancel_label": "Återgå till Nätverkskonfiguration", - "first-setup-internet-skip-dialog-skip-confirm-labe": "Hoppa över!", + "first_setup_internet_skip_dialog_skip_confirm_label": "Hoppa över!", "first_setup_internet_box_text_description_true": "Enheten har anslutits till Internet!", "first_setup_internet_box_text_description_false": "Ingen internetanslutning!", "first_setup_update_box_text_title": "Systemuppdateringar", @@ -32,7 +32,7 @@ "user_info_password_verify_title": "Ange Användarlösenord igen:", "error_label_is_root_label": "Användarnamn kan inte vara root.", "error_label_is_pikaos_label": "Användarnamn kan inte vara pikaos.", - "error_label_username_is_special_label": "Användarnamnet får inte innehålla specialtecken eller mellanslag.", + "error_label_username_is_invalid_label": "Användarnamnet får inte innehålla specialtecken eller mellanslag.", "error_label_hostname_is_special_label": "Hostname får inte innehålla specialtecken eller mellanslag.", "error_label_password_mismatch_label": "Lösenorden matchar inte varandra!", "first_setup_gameutils_box_text_title": "PikaOS Gaming Meta Package", diff --git a/locales/tr_TR.json b/locales/tr_TR.json index 51ea017..fcfacbe 100644 --- a/locales/tr_TR.json +++ b/locales/tr_TR.json @@ -13,7 +13,7 @@ "first_setup_internet_skip_dialog_heading": "Ağ Kurulumunu atla?", "first_setup_internet_skip_dialog_body": "Ağ Bağlantısı Kurulumunu atlamak sonraki birçok adımı erişilemez yapacaktır!\nBu tavsiye EDİLMEZ.", "first_setup_internet_skip_dialog_skip_cancel_label": "Ağ Bağlantısı Kurulumuna Geri Dön", - "first-setup-internet-skip-dialog-skip-confirm-labe": "Sadece Atla!", + "first_setup_internet_skip_dialog_skip_confirm_label": "Sadece Atla!", "first_setup_internet_box_text_description_true": "Cihaz İnternete başarıyla bağlandı!", "first_setup_internet_box_text_description_false": "İnternet Bağlantısı yok!", "first_setup_update_box_text_title": "Sistem Güncellemeleri", @@ -33,7 +33,7 @@ "user_info_password_verify_title": "Kullanıcı şifresini tekrar girin:", "error_label_is_root_label": "Kullanıcı adı root olamaz.", "error_label_is_pikaos_label": "Kullanıcı adı pikaos olamaz.", - "error_label_username_is_special_label": "Kullanıcı adı boşlut yahut özel karakter içeremez.", + "error_label_username_is_invalid_label": "Kullanıcı adı boşlut yahut özel karakter içeremez.", "error_label_hostname_is_special_label": "Makine adı boşluk yahut özel karakter içeremez.", "error_label_password_mismatch_label": "Şifreler eşleşmiyor!", "first_setup_gameutils_box_text_title": "PikaOS Oyun Meta Paketi", diff --git a/main.sh b/main.sh old mode 100644 new mode 100755 index 5b4d267..1deb0b7 --- a/main.sh +++ b/main.sh @@ -1,7 +1,17 @@ +#! /bin/bash + +set -e + +VERSION="1.0.4" + +source ./pika-build-config.sh + +echo "$PIKA_BUILD_ARCH" > pika-build-arch + # Clone Upstream -mkdir -p ./pika-first-setup -rsync -av --progress ./* ./pika-first-setup --exclude ./pika-first-setup -cd ./pika-first-setup +mkdir -p pika-first-setup +cp -rvf ./* ./pika-first-setup/ || true +cd ./pika-first-setup/ # Get build deps apt-get build-dep ./ -y @@ -9,6 +19,7 @@ apt-get install curl -y curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | CARGO_HOME=/root/.cargo sh -s -- -y # Build package +LOGNAME=root dh_make --createorig -y -l -p pika-first-setup_"$VERSION" || echo "dh-make: Ignoring Last Error" dpkg-buildpackage --no-sign # Move the debs to output diff --git a/pika-build-config/amd64-v3.sh b/pika-build-config/amd64-v3.sh new file mode 100755 index 0000000..cd674a1 --- /dev/null +++ b/pika-build-config/amd64-v3.sh @@ -0,0 +1,10 @@ +#! /bin/bash +export PIKA_BUILD_ARCH="amd64-v3" +export DEBIAN_FRONTEND="noninteractive" +export DEB_BUILD_MAINT_OPTIONS="optimize=+lto -march=x86-64-v3 -O3 -flto=auto" +export DEB_CFLAGS_MAINT_APPEND="-march=x86-64-v3 -O3 -flto=auto" +export DEB_CPPFLAGS_MAINT_APPEND="-march=x86-64-v3 -O3 -flto=auto" +export DEB_CXXFLAGS_MAINT_APPEND="-march=x86-64-v3 -O3 -flto=auto" +export DEB_LDFLAGS_MAINT_APPEND="-march=x86-64-v3 -O3 -flto=auto" +export DEB_BUILD_OPTIONS="nocheck notest terse" +export DPKG_GENSYMBOLS_CHECK_LEVEL=0 diff --git a/pika-build-config/i386.sh b/pika-build-config/i386.sh new file mode 100755 index 0000000..7629d66 --- /dev/null +++ b/pika-build-config/i386.sh @@ -0,0 +1,5 @@ +#! /bin/bash +export PIKA_BUILD_ARCH="i386" +export DEBIAN_FRONTEND="noninteractive" +export DEB_BUILD_OPTIONS="nocheck notest terse" +export DPKG_GENSYMBOLS_CHECK_LEVEL=0 diff --git a/release.sh b/release.sh old mode 100644 new mode 100755 index 1575255..660f48f --- a/release.sh +++ b/release.sh @@ -1,8 +1,2 @@ # send debs to server -rsync -azP --include './' --include '*.deb' --exclude '*' ./output/ ferreo@direct.pika-os.com:/srv/www/incoming/ - -# add debs to repo -ssh ferreo@direct.pika-os.com 'aptly repo add -force-replace -remove-files pikauwu-main /srv/www/incoming/' - -# publish the repo -ssh ferreo@direct.pika-os.com 'aptly publish update -batch -skip-contents -force-overwrite pikauwu filesystem:pikarepo:' \ No newline at end of file +rsync -azP --include './' --include '*.deb' --exclude '*' ./output/ ferreo@direct.pika-os.com:/srv/www/cockatiel-incoming/ diff --git a/src/first_setup/codec_carousel/mod.rs b/src/first_setup/codec_carousel/mod.rs index 8375626..5867734 100644 --- a/src/first_setup/codec_carousel/mod.rs +++ b/src/first_setup/codec_carousel/mod.rs @@ -83,7 +83,6 @@ pub fn codec_carousel( .title(t!("first_setup_codec_box_text_title")) .description(t!("first_setup_codec_box_text_description")) .build(); - first_setup_codec_box_text.add_css_class("compact"); let first_setup_codec_button = gtk::Button::builder() .label(t!("first_setup_codec_button_label")) diff --git a/src/first_setup/driver_carousel/mod.rs b/src/first_setup/driver_carousel/mod.rs index c515ca5..d541a95 100644 --- a/src/first_setup/driver_carousel/mod.rs +++ b/src/first_setup/driver_carousel/mod.rs @@ -45,7 +45,6 @@ pub fn driver_carousel( .title(t!("first_setup_driver_box_text_title")) .description(t!("first_setup_driver_box_text_description")) .build(); - first_setup_driver_box_text.add_css_class("compact"); let first_setup_driver_button = gtk::Button::builder() .label(t!("first_setup_driver_button_label")) diff --git a/src/first_setup/final_carousel/mod.rs b/src/first_setup/final_carousel/mod.rs index 40b9064..e7c5d91 100644 --- a/src/first_setup/final_carousel/mod.rs +++ b/src/first_setup/final_carousel/mod.rs @@ -30,7 +30,6 @@ pub fn final_carousel(first_setup_carousel: &adw::Carousel) { .title(t!("first_setup_final_box_text_title")) .description(t!("first_setup_final_box_text_description")) .build(); - first_setup_final_box_text.add_css_class("compact"); let first_setup_start_button = gtk::Button::builder() .label(t!("first_setup_reboot_button_label")) diff --git a/src/first_setup/gameutils_carousel/mod.rs b/src/first_setup/gameutils_carousel/mod.rs index e153af5..09427bc 100644 --- a/src/first_setup/gameutils_carousel/mod.rs +++ b/src/first_setup/gameutils_carousel/mod.rs @@ -83,7 +83,6 @@ pub fn gameutils_carousel( .title(t!("first_setup_gameutils_box_text_title")) .description(t!("first_setup_gameutils_box_text_description")) .build(); - first_setup_gameutils_box_text.add_css_class("compact"); let first_setup_gameutils_button = gtk::Button::builder() .label(t!("first_setup_gameutils_button_label")) diff --git a/src/first_setup/initial_carousel/mod.rs b/src/first_setup/initial_carousel/mod.rs index 44f7cdd..815da0e 100644 --- a/src/first_setup/initial_carousel/mod.rs +++ b/src/first_setup/initial_carousel/mod.rs @@ -24,7 +24,6 @@ pub fn initial_carousel(first_setup_carousel: &adw::Carousel) { .title(t!("first_setup_initial_box_text_title")) .description(t!("first_setup_initial_box_text_description")) .build(); - first_setup_initial_box_text.add_css_class("compact"); let first_setup_start_button = gtk::Button::builder() .label(t!("first_setup_start_button_label")) diff --git a/src/first_setup/internet_carousel/mod.rs b/src/first_setup/internet_carousel/mod.rs index 6c0e1be..a244ce3 100644 --- a/src/first_setup/internet_carousel/mod.rs +++ b/src/first_setup/internet_carousel/mod.rs @@ -65,10 +65,9 @@ pub fn internet_carousel( .title(t!("first_setup_internet_box_text_title")) .description(t!("first_setup_internet_box_text_description")) .hexpand(true) - .vexpand(true) - .valign(Align::Start) + .vexpand(true) .build(); - first_setup_internet_box_text.add_css_class("compact"); + let internet_skip_button = gtk::Button::builder() .label(t!("internet_skip_button_label")) @@ -167,16 +166,18 @@ pub fn internet_carousel( })); first_setup_internet_button.connect_clicked(move |_| { - let env_xdg_session_desktop = env::var("XDG_SESSION_DESKTOP").unwrap(); + let env_xdg_session_desktop = env::var("XDG_SESSION_DESKTOP").unwrap().to_lowercase(); if env_xdg_session_desktop.contains("gnome") || env_xdg_session_desktop.contains("ubuntu") { - Command::new("gnome-control-center") + let _ = Command::new("gnome-control-center") .arg("network") - .spawn() - .expect("gnome-control-center failed to start"); + .spawn(); + } else if env_xdg_session_desktop.contains("plasma") || env_xdg_session_desktop.contains("kde") { + let _ = Command::new("systemsettings") + .arg("kcm_networkmanagement") + .spawn(); } else { - Command::new("nm-connection-editor") - .spawn() - .expect("nm-connection-editor failed to start"); + let _ = Command::new("nm-connection-editor") + .spawn(); } }); diff --git a/src/first_setup/mod.rs b/src/first_setup/mod.rs index 1925732..485406e 100644 --- a/src/first_setup/mod.rs +++ b/src/first_setup/mod.rs @@ -15,19 +15,19 @@ use std::rc::Rc; mod initial_carousel; mod internet_carousel; mod user_carousel; -mod update_carousel; +/*mod update_carousel; mod driver_carousel; mod codec_carousel; -mod gameutils_carousel; +mod gameutils_carousel;*/ mod final_carousel; use initial_carousel::*; use internet_carousel::*; use user_carousel::*; -use update_carousel::*; +/*use update_carousel::*; use driver_carousel::*; use codec_carousel::*; -use gameutils_carousel::*; +use gameutils_carousel::*;*/ use final_carousel::*; pub fn first_setup(window: &adw::ApplicationWindow) { @@ -72,10 +72,10 @@ pub fn first_setup(window: &adw::ApplicationWindow) { initial_carousel(&first_setup_carousel); internet_carousel(&first_setup_carousel, &internet_connected, &window); user_carousel(&first_setup_carousel); - update_carousel(&first_setup_carousel, &internet_connected, &window); + /*update_carousel(&first_setup_carousel, &internet_connected, &window); driver_carousel(&first_setup_carousel, &internet_connected); codec_carousel(&first_setup_carousel, &internet_connected, &window); - gameutils_carousel(&first_setup_carousel, &internet_connected, &window); + gameutils_carousel(&first_setup_carousel, &internet_connected, &window);*/ final_carousel(&first_setup_carousel); // Add file to window diff --git a/src/first_setup/update_carousel/mod.rs b/src/first_setup/update_carousel/mod.rs index ed419e1..b2a7cc3 100644 --- a/src/first_setup/update_carousel/mod.rs +++ b/src/first_setup/update_carousel/mod.rs @@ -83,7 +83,7 @@ pub fn update_carousel( .title(t!("first_setup_update_box_text_title")) .description("We recommend updating your PikaOS install before proceeding\nWould you like to Update your system?") .build(); - first_setup_update_box_text.add_css_class("compact"); + let first_setup_update_button = gtk::Button::builder() .label(t!("first_setup_update_button_label")) diff --git a/src/first_setup/user_carousel/mod.rs b/src/first_setup/user_carousel/mod.rs index 20a763e..8c6f84a 100644 --- a/src/first_setup/user_carousel/mod.rs +++ b/src/first_setup/user_carousel/mod.rs @@ -19,7 +19,8 @@ USERNAME="$0" PASSWORD="$1" FULLNAME="$2" HOSTNAME="$3" -adduser --quiet --disabled-password --shell /bin/bash --gecos "${FULLNAME}" "${USERNAME}" +groupadd -g 1000 "${USERNAME}" +adduser --uid 1000 --gid 1000 --quiet --disabled-password --shell /bin/bash --gecos "${FULLNAME}" "${USERNAME}" echo "${USERNAME}":"${PASSWORD}" | chpasswd usermod -a -G sudo "${USERNAME}" mkdir -p /home/"${USERNAME}" @@ -28,13 +29,10 @@ chown -R "${USERNAME}":"${USERNAME}" /home/"${USERNAME}" usermod -a -G adm,cdrom,sudo,render,dip,video,plugdev,input,render,lpadmin "${USERNAME}" rm -rf /etc/sddm.conf.d/zautologin.conf || true hostnamectl set-hostname "${HOSTNAME}" -echo "127.0.0.1 ${HOSTNAME}" >> /etc/hosts +echo "" >> /etc/hosts +echo "127.0.1.1 ${HOSTNAME}" >> /etc/hosts "###; -fn only_alphanumeric(input: &str) -> bool { - return input.chars().all(|c| c.is_alphanumeric()); -} - fn uppercase_first_letter(s: &str) -> String { let mut c = s.chars(); match c.next() { @@ -70,13 +68,35 @@ pub fn user_carousel(first_setup_carousel: &adw::Carousel) { .margin_top(15) .build(); - let first_setup_user_box_text = adw::StatusPage::builder() + let first_user_text0 = gtk::Label::builder() + .margin_end(15) + .margin_start(15) + .margin_bottom(5) + .margin_top(15) + .label(t!("first_setup_user_box_text_title")) + .halign(Align::Center) + .build(); + first_user_text0.add_css_class("title-1"); + + let first_user_text1 = gtk::Label::builder() + .margin_end(15) + .margin_start(15) + .margin_bottom(15) + .margin_top(5) + .label(t!("first_setup_user_box_text_description")) + .halign(Align::Center) + .build(); + + /*let first_setup_user_box_text = adw::StatusPage::builder() .title(t!("first_setup_user_box_text_title")) .description(t!("first_setup_user_box_text_description")) - .hexpand(true) - .valign(Align::Start) - .build(); - first_setup_user_box_text.add_css_class("compact"); + .vexpand(true) + .hexpand(true) + .build();*/ + + let first_setup_user_box_text = gtk::Box::new(Orientation::Vertical, 0); + first_setup_user_box_text.append(&first_user_text0); + first_setup_user_box_text.append(&first_user_text1); let user_info_box = gtk::Box::builder() .orientation(Orientation::Vertical) @@ -146,15 +166,50 @@ pub fn user_carousel(first_setup_carousel: &adw::Carousel) { .build(); user_info_listbox.add_css_class("boxed-list"); - let error_label = gtk::Label::builder() - .margin_top(15) - .margin_bottom(15) - .margin_start(15) - .margin_end(15) + let error_label_is_root = gtk::Label::builder() + .margin_top(2) + .margin_end(2) + .label(t!("error_label_is_root_label")) + .visible(false) + .build(); + + error_label_is_root.add_css_class("red-text"); + + let error_label_is_pikaos = gtk::Label::builder() + .margin_top(2) + .margin_end(2) + .label(t!("error_label_is_pikaos_label")) + .visible(false) + .build(); + + error_label_is_pikaos.add_css_class("red-text"); + + let error_label_username_is_invalid = gtk::Label::builder() + .margin_top(2) + .margin_end(2) + .label(t!("error_label_username_is_invalid_label")) .visible(false) .build(); - error_label.add_css_class("red-text"); + error_label_username_is_invalid.add_css_class("red-text"); + + let error_label_hostname_is_special = gtk::Label::builder() + .margin_top(2) + .margin_end(2) + .label(t!("error_label_hostname_is_special_label")) + .visible(false) + .build(); + + error_label_hostname_is_special.add_css_class("red-text"); + + let error_label_password_mismatch = gtk::Label::builder() + .margin_top(2) + .margin_end(2) + .label(t!("error_label_password_mismatch_label")) + .visible(false) + .build(); + + error_label_password_mismatch.add_css_class("red-text"); let user_next_button = gtk::Button::builder() .label(t!("internet_next_button_label")) @@ -181,7 +236,11 @@ pub fn user_carousel(first_setup_carousel: &adw::Carousel) { first_setup_user_box.append(&first_setup_user_box_text); first_setup_user_box.append(&user_info_box_clamp); - first_setup_user_box.append(&error_label); + first_setup_user_box.append(&error_label_is_root); + first_setup_user_box.append(&error_label_is_pikaos); + first_setup_user_box.append(&error_label_username_is_invalid); + first_setup_user_box.append(&error_label_hostname_is_special); + first_setup_user_box.append(&error_label_password_mismatch); first_setup_user_box.append(&user_next_button); // The main loop executes the asynchronous block @@ -196,7 +255,7 @@ pub fn user_carousel(first_setup_carousel: &adw::Carousel) { } })); - user_info_username.connect_changed(clone!(@strong user_info_username_valid, @weak user_info_username, @weak user_info_full_name, @weak error_label => move |_| { + user_info_username.connect_changed(clone!(@strong user_info_username_valid, @weak user_info_username, @weak user_info_full_name, @weak error_label_username_is_invalid, @weak error_label_is_pikaos, @weak error_label_is_root => move |_| { let user_info_username_string = user_info_username.text().to_string(); user_info_full_name.set_text(&uppercase_first_letter(&user_info_username_string)); @@ -206,48 +265,44 @@ pub fn user_carousel(first_setup_carousel: &adw::Carousel) { user_info_username.set_position(-1); } - if Regex::new(r"[A-Z]").unwrap().is_match(&user_info_username_string) { - user_info_username.set_text(&user_info_username_string.to_lowercase()); - user_info_username.set_position(-1); - } - let mut _username_is_root = false; let mut _username_is_pikaos = false; - let mut _username_is_special = false; + let mut _user_name_is_invalid = false; if user_info_username_string != "root" { + error_label_is_root.set_visible(false); _username_is_root=false; } else { - error_label.set_label(&t!("error_label_is_root_label")); + error_label_is_root.set_visible(true); _username_is_root=true; } if user_info_username_string != "pikaos" { + error_label_is_pikaos.set_visible(false); _username_is_pikaos=false; } else { - error_label.set_label(&t!("error_label_is_pikaos_label")); + error_label_is_pikaos.set_visible(true); _username_is_pikaos=true; } - if only_alphanumeric(&user_info_username_string) { - _username_is_special=false; + if Regex::new(r"^[a-z_][-a-z0-9_]*\$?$").unwrap().is_match(&user_info_username_string) || user_info_username_string.is_empty() { + error_label_username_is_invalid.set_visible(false); + _user_name_is_invalid=false; } else { - error_label.set_label(&t!("error_label_username_is_special_label")); - _username_is_special=true; + error_label_username_is_invalid.set_visible(true); + _user_name_is_invalid=true; } - if _username_is_root == false && _username_is_pikaos == false && _username_is_special == false { - error_label.set_visible(false); + if _username_is_root == false && _username_is_pikaos == false && _user_name_is_invalid == false { if !user_info_username.text().is_empty() { *user_info_username_valid.borrow_mut()=true; } } else { *user_info_username_valid.borrow_mut()=false; - error_label.set_visible(true); } })); - user_info_full_name.connect_changed(clone!(@strong user_info_full_name_valid, @weak user_info_full_name, @weak error_label => move |_| { + user_info_full_name.connect_changed(clone!(@strong user_info_full_name_valid, @weak user_info_full_name => move |_| { let user_info_full_name_string = user_info_full_name.text().to_string(); if user_info_full_name_string.len() > 32 { @@ -262,7 +317,7 @@ pub fn user_carousel(first_setup_carousel: &adw::Carousel) { } })); - user_info_hostname.connect_changed(clone!(@strong user_info_hostname_valid, @weak user_info_hostname, @weak user_info_full_name, @weak error_label => move |_| { + user_info_hostname.connect_changed(clone!(@strong user_info_hostname_valid, @weak user_info_hostname, @weak user_info_full_name, @weak error_label_hostname_is_special => move |_| { let user_info_hostname_string = user_info_hostname.text().to_string(); if user_info_hostname_string.len() > 32 { @@ -273,24 +328,23 @@ pub fn user_carousel(first_setup_carousel: &adw::Carousel) { let mut _hostname_is_special = false; if Regex::new(r"^[A-Za-z0-9\.]*$").unwrap().is_match(&user_info_hostname_string) { + error_label_hostname_is_special.set_visible(false); _hostname_is_special=false; } else { - error_label.set_label(&t!("error_label_hostname_is_special_label")); + error_label_hostname_is_special.set_visible(true); _hostname_is_special=true; } if _hostname_is_special == false { - error_label.set_visible(false); if !user_info_hostname.text().is_empty() { *user_info_hostname_valid.borrow_mut()=true; } } else { *user_info_hostname_valid.borrow_mut()=false; - error_label.set_visible(true); } })); - user_info_password.connect_changed(clone!(@strong user_info_passwords_valid,@weak user_info_password_verify_revealer, @weak user_info_password, @weak user_info_password_verify, @weak error_label => move |_| { + user_info_password.connect_changed(clone!(@strong user_info_passwords_valid,@weak user_info_password_verify_revealer, @weak user_info_password, @weak user_info_password_verify, @weak error_label_password_mismatch => move |_| { if user_info_password.text().is_empty() { user_info_password_verify_revealer.set_reveal_child(false) } else { @@ -298,20 +352,20 @@ pub fn user_carousel(first_setup_carousel: &adw::Carousel) { } if user_info_password.text() == user_info_password_verify.text() { - error_label.set_visible(false); + error_label_password_mismatch.set_visible(false); *user_info_passwords_valid.borrow_mut()=true; } else { + error_label_password_mismatch.set_visible(true); *user_info_passwords_valid.borrow_mut()=false; } })); - user_info_password_verify.connect_changed(clone!(@strong user_info_passwords_valid, @weak user_info_password, @weak user_info_password_verify, @weak error_label => move |_| { + user_info_password_verify.connect_changed(clone!(@strong user_info_passwords_valid, @weak user_info_password, @weak user_info_password_verify, @weak error_label_password_mismatch => move |_| { if user_info_password.text() == user_info_password_verify.text() { - error_label.set_visible(false); + error_label_password_mismatch.set_visible(false); *user_info_passwords_valid.borrow_mut()=true; } else { - error_label.set_visible(true); - error_label.set_label(&t!("error_label_password_mismatch_label")); + error_label_password_mismatch.set_visible(true); *user_info_passwords_valid.borrow_mut()=false; } }));