Compare commits
14 Commits
v3.2.37
...
1.1.x-stab
Author | SHA1 | Date | |
---|---|---|---|
![]() |
4c3d634df0 | ||
![]() |
7c1d193234 | ||
![]() |
5456ed3b53 | ||
![]() |
198d5d5c4a | ||
![]() |
9f4b8c16b6 | ||
![]() |
27b5fa4d5b | ||
![]() |
2f2a55a359 | ||
![]() |
07b6b1265b | ||
![]() |
973f6935e4 | ||
![]() |
825f657bc6 | ||
![]() |
70ddfa25dd | ||
![]() |
eabe0c68d6 | ||
![]() |
2ac1b29401 | ||
![]() |
34e686decb |
@@ -1,35 +0,0 @@
|
||||
# SPDX-FileCopyrightText: no
|
||||
# SPDX-License-Identifier: CC0-1.0
|
||||
---
|
||||
BasedOnStyle: WebKit
|
||||
|
||||
AlignAfterOpenBracket: Align
|
||||
AlignEscapedNewlines: DontAlign
|
||||
AllowAllParametersOfDeclarationOnNextLine: "false"
|
||||
AllowShortFunctionsOnASingleLine: Inline
|
||||
AllowShortIfStatementsOnASingleLine: "false"
|
||||
AllowShortLoopsOnASingleLine: "false"
|
||||
AlwaysBreakAfterReturnType: TopLevelDefinitions
|
||||
AlwaysBreakTemplateDeclarations: Yes
|
||||
BinPackArguments: "false"
|
||||
BinPackParameters: "false"
|
||||
BreakBeforeBraces: Allman
|
||||
BreakBeforeTernaryOperators: "true"
|
||||
BreakConstructorInitializers: BeforeComma
|
||||
ColumnLimit: 120
|
||||
Cpp11BracedListStyle: "false"
|
||||
FixNamespaceComments: "true"
|
||||
IncludeBlocks: Preserve
|
||||
IndentWidth: "4"
|
||||
MaxEmptyLinesToKeep: "2"
|
||||
NamespaceIndentation: None
|
||||
PointerAlignment: Left
|
||||
ReflowComments: "false"
|
||||
SortIncludes: "true"
|
||||
SpaceAfterCStyleCast: "false"
|
||||
SpacesBeforeTrailingComments: "2"
|
||||
# SpaceInEmptyBlock: "true"
|
||||
SpacesInAngles: "true"
|
||||
SpacesInParentheses: "true"
|
||||
SpacesInSquareBrackets: "true"
|
||||
Standard: Cpp11
|
@@ -1,5 +1,4 @@
|
||||
# SPDX-FileCopyrightText: no
|
||||
# SPDX-License-Identifier: CC0-1.0
|
||||
# http://EditorConfig.org
|
||||
|
||||
root = true
|
||||
|
||||
@@ -8,22 +7,7 @@ charset = utf-8
|
||||
end_of_line = lf
|
||||
trim_trailing_whitespace = true
|
||||
|
||||
[CMakeLists.txt]
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
insert_final_newline = true
|
||||
|
||||
[*.cmake]
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
insert_final_newline = true
|
||||
|
||||
[*.{py,cpp,h}]
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
insert_final_newline = true
|
||||
|
||||
[*.sh]
|
||||
indent_style = tab
|
||||
insert_final_newline = true
|
||||
|
||||
|
18
.gitattributes
vendored
18
.gitattributes
vendored
@@ -1,14 +1,6 @@
|
||||
# SPDX-FileCopyrightText: no
|
||||
# SPDX-License-Identifier: CC0-1.0
|
||||
|
||||
.editorconfig export-ignore
|
||||
.gitattributes export-ignore
|
||||
.github export-ignore
|
||||
.gitignore export-ignore
|
||||
.gitmodules export-ignore
|
||||
.travis.yml export-ignore
|
||||
.tx export-ignore
|
||||
|
||||
src/modules/testmodule.py export-ignore
|
||||
.tx/* export-ignore
|
||||
hacking/* export-ignore
|
||||
HACKING.md export-ignore
|
||||
.editorconfig export-ignore
|
||||
src/modules/testmodule.py export-ignore
|
||||
src/modules/globalStorage.yaml export-ignore
|
||||
|
||||
|
26
.github/ISSUE_TEMPLATE/bug_report.md
vendored
26
.github/ISSUE_TEMPLATE/bug_report.md
vendored
@@ -1,26 +0,0 @@
|
||||
---
|
||||
name: Bug report
|
||||
about: Create a report to help us improve
|
||||
|
||||
---
|
||||
|
||||
> Hi! Thank you for helping improve Calamares. If you are seeing a problem in installing a specific distribution, you should **probably** report the problem in the distribution's bug tracker, first. That helps filter out issues with packaging, mis-configuration, etc. that Calamares has no control over. If you are a distribution packager or maintainer, this page is for you.
|
||||
|
||||
**Describe the bug**
|
||||
A clear and concise description of what the bug is. Please include 32/64 bit machine details, EFI/BIOS details, and disk setup.
|
||||
|
||||
**To Reproduce**
|
||||
Steps to reproduce the behavior:
|
||||
1. Go to '...'
|
||||
2. Click on '....'
|
||||
3. Scroll down to '....'
|
||||
4. See error
|
||||
|
||||
**Expected behavior**
|
||||
A clear and concise description of what you expected to happen.
|
||||
|
||||
**Screenshots and Logs**
|
||||
If applicable, add screenshots to help explain your problem. Calamares has an installation log (usually `~/.cache/calamares/session.log`), please check it for confidential information and attach it if possible.
|
||||
|
||||
**Additional context**
|
||||
Add any other context about the problem here.
|
17
.github/ISSUE_TEMPLATE/feature_request.md
vendored
17
.github/ISSUE_TEMPLATE/feature_request.md
vendored
@@ -1,17 +0,0 @@
|
||||
---
|
||||
name: Feature request
|
||||
about: Suggest an idea for this project
|
||||
|
||||
---
|
||||
|
||||
**Is your feature request related to a problem? Please describe.**
|
||||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
||||
|
||||
**Describe the solution you'd like**
|
||||
A clear and concise description of what you want to happen.
|
||||
|
||||
**Describe alternatives you've considered**
|
||||
A clear and concise description of any alternative solutions or features you've considered.
|
||||
|
||||
**Additional context**
|
||||
Add any other context or screenshots about the feature request here.
|
63
.github/ISSUE_TEMPLATE/usability_test.md
vendored
63
.github/ISSUE_TEMPLATE/usability_test.md
vendored
@@ -1,63 +0,0 @@
|
||||
---
|
||||
name: Usability testing
|
||||
about: Propose a usability test to help us
|
||||
---
|
||||
# Objective
|
||||
The test goals. e.g.: Evaluate the language selection and the partitioning configurations.
|
||||
|
||||
# Requirements
|
||||
|
||||
## Environment
|
||||
What is the environment that should be tested and how it should be prepared. e.g.: The test needs to run in the release 3.32.34 installing Manjaro.
|
||||
|
||||
## User profile
|
||||
Describe the target users you are looking for the test. e.g.: A user that has already used a system-installer.
|
||||
|
||||
## Facilitator
|
||||
What the facilitator should be familiar with to run the tests. e.g.: The facilitator needs to know how to build Calamares to be able to run the tests.
|
||||
|
||||
# Test design
|
||||
## Tasks
|
||||
A list of tasks that the user has to perform. e.g.:
|
||||
|
||||
* Use another language.
|
||||
* Change partitioning configurations.
|
||||
|
||||
## Scenarios
|
||||
A list of scenarios for the user to perform the tasks. They should put the user in a context and not give specific hints about what you want the user to do. e.g.:
|
||||
|
||||
1. You want to change the installer language to English. Please, look for this option in the application.
|
||||
2. You are a big fan of a lot of distributions and want to have some space left to install other distributions in your disk after this installation. Please, resize your disk to have 35GB of space left.
|
||||
|
||||
<!--
|
||||
|
||||
## Results
|
||||
|
||||
Uncomment this session once you have your results.
|
||||
|
||||
### Summary
|
||||
|
||||
| - | User 1 | User 2 | User 3 | User 4 | User 5 |
|
||||
|:------:|:------:|:--------:|:------------------:|:------:|:------:|
|
||||
| Task 1 | :x: | :question: | :heavy_check_mark: | :x: | :heavy_check_mark: |
|
||||
| Task 2 | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
|
||||
| Task 3 | :heavy_check_mark: | :heavy_check_mark: | :x: | :heavy_check_mark: | :heavy_check_mark: |
|
||||
| Task 4 | :heavy_check_mark: | :question: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
|
||||
|
||||
### Task 1
|
||||
|
||||
#### What went well?
|
||||
Describe what happened as expected. e.g.: Most users intuitively found the language selector for changing the installer language.
|
||||
|
||||
#### What were the challenges?
|
||||
Describe where the users had issues and why. Try to write the details to ensure a good understanding of what happened. You can also attach videos, GIFs, or screenshots to illustrate. e.g.: Two of the users had issues searching for English on the language selector because they didn't realize they could scroll down to find it.
|
||||
|
||||
### Task 2
|
||||
|
||||
#### What went well?
|
||||
Describe what happened as expected. e.g.: Most users intuitively found the language selector for changing the installer language.
|
||||
|
||||
#### What were the challenges?
|
||||
Describe where the users had issues and why. Try to write the details to ensure a good understanding of what happened. You can also attach videos, GIFs, or screenshots to illustrate. e.g.: Two of the users had issues searching for English on the language selector because they didn't realize they could scroll down to find it.
|
||||
|
||||
-->
|
26
.github/workflows/issues.yml
vendored
26
.github/workflows/issues.yml
vendored
@@ -1,26 +0,0 @@
|
||||
name: issues
|
||||
|
||||
on:
|
||||
issues:
|
||||
types: [opened, reopened, closed]
|
||||
|
||||
jobs:
|
||||
irc:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: "notify: new"
|
||||
uses: rectalogic/notify-irc@v1
|
||||
if: github.event.issue.state == 'open'
|
||||
with:
|
||||
server: chat.freenode.net
|
||||
nickname: cala-issues
|
||||
channel: "#calamares"
|
||||
message: "OPENED ${{ github.event.issue.html_url }} by ${{ github.actor }} ${{ github.event.issue.title }}"
|
||||
- name: "notify: closed"
|
||||
uses: rectalogic/notify-irc@v1
|
||||
if: github.event.issue.state != 'open'
|
||||
with:
|
||||
server: chat.freenode.net
|
||||
nickname: cala-issues
|
||||
channel: "#calamares"
|
||||
message: "CLOSED ${{ github.event.issue.html_url }} by ${{ github.actor }} ${{ github.event.issue.title }}"
|
100
.github/workflows/nightly-debian.yml
vendored
100
.github/workflows/nightly-debian.yml
vendored
@@ -1,100 +0,0 @@
|
||||
name: nightly-debian-10
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: "12 23 * * *"
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
BUILDDIR: /build
|
||||
SRCDIR: ${{ github.workspace }}
|
||||
CMAKE_ARGS: |
|
||||
-DWEBVIEW_FORCE_WEBKIT=1
|
||||
-DKDE_INSTALL_USE_QT_SYS_PATHS=ON
|
||||
-DWITH_PYTHONQT=OFF"
|
||||
-DCMAKE_BUILD_TYPE=Debug
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: docker://debian:10
|
||||
options: --tmpfs /build:rw --user 0:0
|
||||
steps:
|
||||
- name: "prepare env"
|
||||
run: |
|
||||
apt-get update
|
||||
apt-get -y install git-core
|
||||
apt-get -y install \
|
||||
build-essential \
|
||||
cmake \
|
||||
extra-cmake-modules \
|
||||
gettext \
|
||||
kio-dev \
|
||||
libatasmart-dev \
|
||||
libboost-python-dev \
|
||||
libkf5config-dev \
|
||||
libkf5coreaddons-dev \
|
||||
libkf5i18n-dev \
|
||||
libkf5iconthemes-dev \
|
||||
libkf5parts-dev \
|
||||
libkf5service-dev \
|
||||
libkf5solid-dev \
|
||||
libparted-dev \
|
||||
libpolkit-qt5-1-dev \
|
||||
libqt5svg5-dev \
|
||||
libqt5webkit5-dev \
|
||||
libyaml-cpp-dev \
|
||||
os-prober \
|
||||
pkg-config \
|
||||
python3-dev \
|
||||
qtbase5-dev \
|
||||
qtdeclarative5-dev \
|
||||
qttools5-dev \
|
||||
qttools5-dev-tools
|
||||
# Same name as on KDE neon, different version
|
||||
apt-get -y install libkpmcore-dev
|
||||
# Additional dependencies
|
||||
apt-get -y install \
|
||||
libappstreamqt-dev \
|
||||
libicu-dev \
|
||||
libkf5crash-dev \
|
||||
libkf5package-dev \
|
||||
libkf5plasma-dev \
|
||||
libpwquality-dev \
|
||||
libqt5webenginewidgets5 \
|
||||
qtwebengine5-dev
|
||||
- name: "prepare source"
|
||||
uses: actions/checkout@v2
|
||||
- name: "prepare build"
|
||||
id: pre_build
|
||||
run: |
|
||||
test -n "$BUILDDIR" || { echo "! \$BUILDDIR not set" ; exit 1 ; }
|
||||
mkdir -p $BUILDDIR
|
||||
test -f $SRCDIR/CMakeLists.txt || { echo "! Missing $SRCDIR/CMakeLists.txt" ; exit 1 ; }
|
||||
echo "::set-output name=message::"`git log -1 --abbrev-commit --pretty=oneline --no-decorate ${{ github.event.head_commit.id }}`
|
||||
- name: "Calamares: cmake"
|
||||
working-directory: ${{ env.BUILDDIR }}
|
||||
run: cmake $CMAKE_ARGS $SRCDIR
|
||||
- name: "Calamares: make"
|
||||
working-directory: ${{ env.BUILDDIR }}
|
||||
run: make -j2 VERBOSE=1
|
||||
- name: "Calamares: install"
|
||||
working-directory: ${{ env.BUILDDIR }}
|
||||
run: make install VERBOSE=1
|
||||
- name: "notify: ok"
|
||||
uses: rectalogic/notify-irc@v1
|
||||
if: ${{ success() && github.repository == 'calamares/calamares' }}
|
||||
with:
|
||||
server: chat.freenode.net
|
||||
nickname: cala-ci
|
||||
channel: "#calamares"
|
||||
message: "OK ${{ github.workflow }} in ${{ github.repository }} ${{ steps.pre_build.outputs.message }}"
|
||||
- name: "notify: fail"
|
||||
uses: rectalogic/notify-irc@v1
|
||||
if: ${{ failure() && github.repository == 'calamares/calamares' }}
|
||||
with:
|
||||
server: chat.freenode.net
|
||||
nickname: cala-ci
|
||||
channel: "#calamares"
|
||||
message: "FAIL ${{ github.workflow }} in ${{ github.repository }} ${{ steps.pre_build.outputs.message }}"
|
99
.github/workflows/nightly-neon.yml
vendored
99
.github/workflows/nightly-neon.yml
vendored
@@ -1,99 +0,0 @@
|
||||
name: nightly-neon
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: "52 23 * * *"
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
BUILDDIR: /build
|
||||
SRCDIR: ${{ github.workspace }}
|
||||
CMAKE_ARGS: |
|
||||
-DWEBVIEW_FORCE_WEBKIT=1
|
||||
-DKDE_INSTALL_USE_QT_SYS_PATHS=ON
|
||||
-DWITH_PYTHONQT=OFF"
|
||||
-DCMAKE_BUILD_TYPE=Debug
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: docker://kdeneon/plasma:user
|
||||
options: --tmpfs /build:rw --user 0:0
|
||||
steps:
|
||||
- name: "prepare env"
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get -y install git-core
|
||||
sudo apt-get -y install \
|
||||
build-essential \
|
||||
cmake \
|
||||
extra-cmake-modules \
|
||||
gettext \
|
||||
kio-dev \
|
||||
libatasmart-dev \
|
||||
libboost-python-dev \
|
||||
libkf5config-dev \
|
||||
libkf5coreaddons-dev \
|
||||
libkf5i18n-dev \
|
||||
libkf5iconthemes-dev \
|
||||
libkf5parts-dev \
|
||||
libkf5service-dev \
|
||||
libkf5solid-dev \
|
||||
libkpmcore-dev \
|
||||
libparted-dev \
|
||||
libpolkit-qt5-1-dev \
|
||||
libqt5svg5-dev \
|
||||
libqt5webkit5-dev \
|
||||
libyaml-cpp-dev \
|
||||
os-prober \
|
||||
pkg-config \
|
||||
python3-dev \
|
||||
qtbase5-dev \
|
||||
qtdeclarative5-dev \
|
||||
qttools5-dev \
|
||||
qttools5-dev-tools
|
||||
- name: "prepare source"
|
||||
uses: actions/checkout@v2
|
||||
- name: "prepare build"
|
||||
id: pre_build
|
||||
run: |
|
||||
test -n "$BUILDDIR" || { echo "! \$BUILDDIR not set" ; exit 1 ; }
|
||||
mkdir -p $BUILDDIR
|
||||
test -f $SRCDIR/CMakeLists.txt || { echo "! Missing $SRCDIR/CMakeLists.txt" ; exit 1 ; }
|
||||
echo "::set-output name=message::"`git log -1 --abbrev-commit --pretty=oneline --no-decorate ${{ github.event.head_commit.id }}`
|
||||
- name: "Calamares: cmake"
|
||||
working-directory: ${{ env.BUILDDIR }}
|
||||
run: cmake $CMAKE_ARGS $SRCDIR
|
||||
- name: "Calamares: make"
|
||||
working-directory: ${{ env.BUILDDIR }}
|
||||
run: make -j2 VERBOSE=1
|
||||
- name: "Calamares: install"
|
||||
working-directory: ${{ env.BUILDDIR }}
|
||||
run: make install VERBOSE=1 DESTDIR=${{ env.BUILDDIR }}/stage
|
||||
- name: "Calamares: archive"
|
||||
working-directory: ${{ env.BUILDDIR }}
|
||||
run: tar czf calamares.tar.gz stage
|
||||
- name: "upload"
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: calamares-tarball
|
||||
path: ${{ env.BUILDDIR }}/calamares.tar.gz
|
||||
if-no-files-found: error
|
||||
retention-days: 3
|
||||
- name: "notify: ok"
|
||||
uses: rectalogic/notify-irc@v1
|
||||
if: ${{ success() && github.repository == 'calamares/calamares' }}
|
||||
with:
|
||||
server: chat.freenode.net
|
||||
nickname: cala-ci
|
||||
channel: "#calamares"
|
||||
message: "OK ${{ github.workflow }} in ${{ github.repository }} ${{ steps.pre_build.outputs.message }}"
|
||||
- name: "notify: fail"
|
||||
uses: rectalogic/notify-irc@v1
|
||||
if: ${{ failure() && github.repository == 'calamares/calamares' }}
|
||||
with:
|
||||
server: chat.freenode.net
|
||||
nickname: cala-ci
|
||||
channel: "#calamares"
|
||||
message: "FAIL ${{ github.workflow }} in ${{ github.repository }} ${{ steps.pre_build.outputs.message }}"
|
98
.github/workflows/nightly-opensuse.yml
vendored
98
.github/workflows/nightly-opensuse.yml
vendored
@@ -1,98 +0,0 @@
|
||||
name: nightly-opensuse
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: "32 23 * * *"
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
BUILDDIR: /build
|
||||
SRCDIR: ${{ github.workspace }}
|
||||
CMAKE_ARGS: |
|
||||
-DWEBVIEW_FORCE_WEBKIT=1
|
||||
-DKDE_INSTALL_USE_QT_SYS_PATHS=ON
|
||||
-DWITH_PYTHONQT=OFF"
|
||||
-DCMAKE_BUILD_TYPE=Debug
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: docker://opensuse/leap
|
||||
options: --tmpfs /build:rw --user 0:0
|
||||
steps:
|
||||
- name: "prepare env"
|
||||
run: |
|
||||
zypper --non-interactive up
|
||||
zypper --non-interactive in git-core
|
||||
# From deploycala.py
|
||||
zypper --non-interactive in \
|
||||
"autoconf" \
|
||||
"automake" \
|
||||
"bison" \
|
||||
"flex" \
|
||||
"git" \
|
||||
"libtool" \
|
||||
"m4" \
|
||||
"make" \
|
||||
"cmake" \
|
||||
"extra-cmake-modules" \
|
||||
"gcc-c++" \
|
||||
"libqt5-qtbase-devel" \
|
||||
"libqt5-linguist-devel" \
|
||||
"libqt5-qtsvg-devel" \
|
||||
"libqt5-qtdeclarative-devel" \
|
||||
"libqt5-qtwebengine-devel" \
|
||||
"yaml-cpp-devel" \
|
||||
"libpolkit-qt5-1-devel" \
|
||||
"kservice-devel" \
|
||||
"kpackage-devel" \
|
||||
"kparts-devel" \
|
||||
"kcrash-devel" \
|
||||
"kpmcore-devel" \
|
||||
"plasma5-workspace-devel" \
|
||||
"plasma-framework-devel" \
|
||||
"libpwquality-devel" \
|
||||
"parted-devel" \
|
||||
"python3-devel" \
|
||||
"boost-devel" \
|
||||
"libboost_python-py3-*-devel"
|
||||
# Additional dependencies
|
||||
zypper --non-interactive in \
|
||||
libicu-devel \
|
||||
libAppStreamQt-devel \
|
||||
libatasmart-devel
|
||||
- name: "prepare source"
|
||||
uses: actions/checkout@v2
|
||||
- name: "prepare build"
|
||||
id: pre_build
|
||||
run: |
|
||||
test -n "$BUILDDIR" || { echo "! \$BUILDDIR not set" ; exit 1 ; }
|
||||
mkdir -p $BUILDDIR
|
||||
test -f $SRCDIR/CMakeLists.txt || { echo "! Missing $SRCDIR/CMakeLists.txt" ; exit 1 ; }
|
||||
echo "::set-output name=message::"`git log -1 --abbrev-commit --pretty=oneline --no-decorate ${{ github.event.head_commit.id }}`
|
||||
- name: "Calamares: cmake"
|
||||
working-directory: ${{ env.BUILDDIR }}
|
||||
run: cmake $CMAKE_ARGS $SRCDIR
|
||||
- name: "Calamares: make"
|
||||
working-directory: ${{ env.BUILDDIR }}
|
||||
run: make -j2 VERBOSE=1
|
||||
- name: "Calamares: install"
|
||||
working-directory: ${{ env.BUILDDIR }}
|
||||
run: make install VERBOSE=1
|
||||
- name: "notify: ok"
|
||||
uses: rectalogic/notify-irc@v1
|
||||
if: ${{ success() && github.repository == 'calamares/calamares' }}
|
||||
with:
|
||||
server: chat.freenode.net
|
||||
nickname: cala-ci
|
||||
channel: "#calamares"
|
||||
message: "OK ${{ github.workflow }} in ${{ github.repository }} ${{ steps.pre_build.outputs.message }}"
|
||||
- name: "notify: fail"
|
||||
uses: rectalogic/notify-irc@v1
|
||||
if: ${{ failure() && github.repository == 'calamares/calamares' }}
|
||||
with:
|
||||
server: chat.freenode.net
|
||||
nickname: cala-ci
|
||||
channel: "#calamares"
|
||||
message: "FAIL ${{ github.workflow }} in ${{ github.repository }} ${{ steps.pre_build.outputs.message }}"
|
95
.github/workflows/push.yml
vendored
95
.github/workflows/push.yml
vendored
@@ -1,95 +0,0 @@
|
||||
name: ci-push
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- calamares
|
||||
pull_request:
|
||||
types:
|
||||
- opened
|
||||
- reopened
|
||||
- synchronize
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
BUILDDIR: /build
|
||||
SRCDIR: ${{ github.workspace }}
|
||||
CMAKE_ARGS: |
|
||||
-DWEBVIEW_FORCE_WEBKIT=1
|
||||
-DKDE_INSTALL_USE_QT_SYS_PATHS=ON
|
||||
-DWITH_PYTHONQT=OFF"
|
||||
-DCMAKE_BUILD_TYPE=Debug
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: docker://kdeneon/plasma:user
|
||||
options: --tmpfs /build:rw --user 0:0
|
||||
steps:
|
||||
- name: "prepare env"
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get -y install git-core
|
||||
sudo apt-get -y install \
|
||||
build-essential \
|
||||
cmake \
|
||||
extra-cmake-modules \
|
||||
gettext \
|
||||
kio-dev \
|
||||
libatasmart-dev \
|
||||
libboost-python-dev \
|
||||
libkf5config-dev \
|
||||
libkf5coreaddons-dev \
|
||||
libkf5i18n-dev \
|
||||
libkf5iconthemes-dev \
|
||||
libkf5parts-dev \
|
||||
libkf5service-dev \
|
||||
libkf5solid-dev \
|
||||
libkpmcore-dev \
|
||||
libparted-dev \
|
||||
libpolkit-qt5-1-dev \
|
||||
libqt5svg5-dev \
|
||||
libqt5webkit5-dev \
|
||||
libyaml-cpp-dev \
|
||||
os-prober \
|
||||
pkg-config \
|
||||
python3-dev \
|
||||
qtbase5-dev \
|
||||
qtdeclarative5-dev \
|
||||
qttools5-dev \
|
||||
qttools5-dev-tools
|
||||
- name: "prepare source"
|
||||
uses: actions/checkout@v2
|
||||
- name: "prepare build"
|
||||
id: pre_build
|
||||
run: |
|
||||
test -n "$BUILDDIR" || { echo "! \$BUILDDIR not set" ; exit 1 ; }
|
||||
mkdir -p $BUILDDIR
|
||||
test -f $SRCDIR/CMakeLists.txt || { echo "! Missing $SRCDIR/CMakeLists.txt" ; exit 1 ; }
|
||||
echo "::set-output name=message::"`git log -1 --abbrev-commit --pretty=oneline --no-decorate ${{ github.event.head_commit.id }}`
|
||||
- name: "Calamares: cmake"
|
||||
working-directory: ${{ env.BUILDDIR }}
|
||||
run: cmake $CMAKE_ARGS $SRCDIR
|
||||
- name: "Calamares: make"
|
||||
working-directory: ${{ env.BUILDDIR }}
|
||||
run: make -j2 VERBOSE=1
|
||||
- name: "Calamares: install"
|
||||
working-directory: ${{ env.BUILDDIR }}
|
||||
run: make install VERBOSE=1
|
||||
- name: "notify: ok"
|
||||
uses: rectalogic/notify-irc@v1
|
||||
if: ${{ success() && github.repository == 'calamares/calamares' }}
|
||||
with:
|
||||
server: chat.freenode.net
|
||||
nickname: cala-ci
|
||||
channel: "#calamares"
|
||||
message: "OK ${{ github.workflow }} in ${{ github.repository }} ${{ github.actor }} on ${{ github.event.ref }}\n.. ${{ steps.pre_build.outputs.message }}"
|
||||
- name: "notify: fail"
|
||||
uses: rectalogic/notify-irc@v1
|
||||
if: ${{ failure() && github.repository == 'calamares/calamares' }}
|
||||
with:
|
||||
server: chat.freenode.net
|
||||
nickname: cala-ci
|
||||
channel: "#calamares"
|
||||
message: "FAIL ${{ github.workflow }} in ${{ github.repository }} ${{ github.actor }} on ${{ github.event.ref }}\n.. ${{ steps.pre_build.outputs.message }}\n.. DIFF ${{ github.event.compare }}"
|
15
.gitignore
vendored
15
.gitignore
vendored
@@ -1,6 +1,3 @@
|
||||
# SPDX-FileCopyrightText: no
|
||||
# SPDX-License-Identifier: CC0-1.0
|
||||
#
|
||||
# C++ objects and libs
|
||||
|
||||
*.slo
|
||||
@@ -24,7 +21,6 @@ __pycache__
|
||||
*.pro.user
|
||||
*.pro.user.*
|
||||
*.moc
|
||||
*.qmlc
|
||||
moc_*.cpp
|
||||
qrc_*.cpp
|
||||
ui_*.h
|
||||
@@ -39,19 +35,8 @@ Makefile*
|
||||
qtcreator-build
|
||||
CMakeLists.txt.user
|
||||
|
||||
# KDevelop
|
||||
*.kdev4
|
||||
|
||||
# PyCharm
|
||||
.idea
|
||||
|
||||
# Visual Studio Code
|
||||
.vscode
|
||||
|
||||
# Backup files
|
||||
*~
|
||||
*.bak
|
||||
|
||||
# Kate
|
||||
*.kate-swp
|
||||
tags
|
||||
|
4
.gitmodules
vendored
4
.gitmodules
vendored
@@ -0,0 +1,4 @@
|
||||
[submodule "src/libcalamares/partitionmanager"]
|
||||
path = src/modules/partition/partitionmanager
|
||||
url = https://github.com/calamares/partitionmanager.git
|
||||
branch = calamares
|
||||
|
85
.reuse/dep5
85
.reuse/dep5
@@ -1,85 +0,0 @@
|
||||
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
||||
Upstream-Name: Calamares
|
||||
Source: https://github.com/calamares/calamares.git
|
||||
|
||||
### ACTUAL LICENSES
|
||||
#
|
||||
# Images in the locale module are a bit unclear; they were added
|
||||
# by Teo in 2014 but I suspect they came from somewhere else.
|
||||
#
|
||||
Files: src/modules/locale/images/timezone*.png
|
||||
License: GPL-3.0-or-later
|
||||
Copyright: 2014 Teo Mrnjavac <teo@kde.org>
|
||||
|
||||
Files: man/calamares.8
|
||||
License: GPL-3.0-or-later
|
||||
Copyright: 2017 Jonathan Carter <jcarter@linux.com>
|
||||
|
||||
### BUILD ARTIFACTS / NOT SOURCE
|
||||
#
|
||||
# QRC Files are basically build artifacts
|
||||
#
|
||||
FILES: src/modules/*/*.qrc
|
||||
License: CC0-1.0
|
||||
Copyright: no
|
||||
|
||||
# GitHub issue templates are not part of the source
|
||||
#
|
||||
Files: .github/ISSUE_TEMPLATE/*
|
||||
License: CC0-1.0
|
||||
Copyright: no
|
||||
|
||||
# Packaging information
|
||||
#
|
||||
Files: data/FreeBSD/distinfo data/FreeBSD/pkg-descr data/FreeBSD/pkg-plist
|
||||
License: CC0-1.0
|
||||
Copyright: no
|
||||
|
||||
# Example data for timezones, which is copied out of zoneinfo,
|
||||
# which has this notice:
|
||||
#
|
||||
# This file is in the public domain, so clarified as of
|
||||
# 2009-05-17 by Arthur David Olson.
|
||||
#
|
||||
Files: data/example-root/usr/share/zoneinfo/Zulu data/example-root/usr/share/zoneinfo/UTC data/example-root/usr/share/zoneinfo/America/New_York
|
||||
License: CC0-1.0
|
||||
Copyright: no
|
||||
|
||||
### TRANSLATIONS
|
||||
#
|
||||
# .desktop files and template change only with translation
|
||||
#
|
||||
FILES: calamares.desktop*
|
||||
License: CC0-1.0
|
||||
Copyright: no
|
||||
|
||||
# Transifex translations derive from the source, and have no
|
||||
# embedded copyright information.
|
||||
#
|
||||
Files: lang/*.ts
|
||||
License: GPL-3.0-or-later
|
||||
Copyright: 2020 Calamares authors and translators
|
||||
|
||||
# Translations of branding slideshow are the same
|
||||
Files: src/branding/default/lang/*.ts
|
||||
License: GPL-3.0-or-later
|
||||
Copyright: 2020 Calamares authors and translators
|
||||
|
||||
# Python translation files have some copyright information, but
|
||||
# it's generally very sketchy.
|
||||
#
|
||||
Files: lang/python.pot
|
||||
License: GPL-3.0-or-later
|
||||
Copyright: 2020 Calamares authors and translators
|
||||
|
||||
Files: lang/python/*/LC_MESSAGES/python.po
|
||||
License: GPL-3.0-or-later
|
||||
Copyright: 2020 Calamares authors and translators
|
||||
|
||||
Files: src/modules/dummypythonqt/lang/dummypythonqt.pot
|
||||
License: GPL-3.0-or-later
|
||||
Copyright: 2020 Calamares authors and translators
|
||||
|
||||
Files: src/modules/dummypythonqt/lang/*/LC_MESSAGES/dummypythonqt.po
|
||||
License: GPL-3.0-or-later
|
||||
Copyright: 2020 Calamares authors and translators
|
17
.tx/config
17
.tx/config
@@ -1,24 +1,9 @@
|
||||
# SPDX-FileCopyrightText: no
|
||||
# SPDX-License-Identifier: CC0-1.0
|
||||
|
||||
[main]
|
||||
host = https://www.transifex.com
|
||||
|
||||
[calamares.calamares]
|
||||
[calamares.calamares-master]
|
||||
file_filter = lang/calamares_<lang>.ts
|
||||
source_file = lang/calamares_en.ts
|
||||
source_lang = en
|
||||
type = QT
|
||||
|
||||
[calamares.fdo]
|
||||
file_filter = lang/desktop_<lang>.desktop
|
||||
source_file = calamares.desktop
|
||||
source_lang = en
|
||||
type = DESKTOP
|
||||
|
||||
[calamares.python]
|
||||
file_filter = lang/python/<lang>/LC_MESSAGES/python.po
|
||||
source_file = lang/python.pot
|
||||
source_lang = en
|
||||
type = PO
|
||||
|
||||
|
284
3rdparty/waitingspinnerwidget.cpp
vendored
284
3rdparty/waitingspinnerwidget.cpp
vendored
@@ -1,284 +0,0 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2012-2014 Alexander Turkin
|
||||
* SPDX-FileCopyrightText: 2014 William Hallatt
|
||||
* SPDX-FileCopyrightText: 2015 Jacob Dawid
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
/* Original Work Copyright (c) 2012-2014 Alexander Turkin
|
||||
Modified 2014 by William Hallatt
|
||||
Modified 2015 by Jacob Dawid
|
||||
|
||||
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.
|
||||
*/
|
||||
|
||||
// Own includes
|
||||
#include "waitingspinnerwidget.h"
|
||||
|
||||
// Standard includes
|
||||
#include <cmath>
|
||||
#include <algorithm>
|
||||
|
||||
// Qt includes
|
||||
#include <QPainter>
|
||||
#include <QTimer>
|
||||
|
||||
WaitingSpinnerWidget::WaitingSpinnerWidget(QWidget *parent,
|
||||
bool centerOnParent,
|
||||
bool disableParentWhenSpinning)
|
||||
: QWidget(parent),
|
||||
_centerOnParent(centerOnParent),
|
||||
_disableParentWhenSpinning(disableParentWhenSpinning) {
|
||||
initialize();
|
||||
}
|
||||
|
||||
WaitingSpinnerWidget::WaitingSpinnerWidget(Qt::WindowModality modality,
|
||||
QWidget *parent,
|
||||
bool centerOnParent,
|
||||
bool disableParentWhenSpinning)
|
||||
: QWidget(parent, Qt::Dialog | Qt::FramelessWindowHint),
|
||||
_centerOnParent(centerOnParent),
|
||||
_disableParentWhenSpinning(disableParentWhenSpinning){
|
||||
initialize();
|
||||
|
||||
// We need to set the window modality AFTER we've hidden the
|
||||
// widget for the first time since changing this property while
|
||||
// the widget is visible has no effect.
|
||||
setWindowModality(modality);
|
||||
setAttribute(Qt::WA_TranslucentBackground);
|
||||
}
|
||||
|
||||
void WaitingSpinnerWidget::initialize() {
|
||||
_color = Qt::black;
|
||||
_roundness = 100.0;
|
||||
_minimumTrailOpacity = 3.14159265358979323846;
|
||||
_trailFadePercentage = 80.0;
|
||||
_revolutionsPerSecond = 1.57079632679489661923;
|
||||
_numberOfLines = 20;
|
||||
_lineLength = 10;
|
||||
_lineWidth = 2;
|
||||
_innerRadius = 10;
|
||||
_currentCounter = 0;
|
||||
_isSpinning = false;
|
||||
|
||||
_timer = new QTimer(this);
|
||||
connect(_timer, SIGNAL(timeout()), this, SLOT(rotate()));
|
||||
updateSize();
|
||||
updateTimer();
|
||||
hide();
|
||||
}
|
||||
|
||||
void WaitingSpinnerWidget::paintEvent(QPaintEvent *) {
|
||||
updatePosition();
|
||||
QPainter painter(this);
|
||||
painter.fillRect(this->rect(), Qt::transparent);
|
||||
painter.setRenderHint(QPainter::Antialiasing, true);
|
||||
|
||||
if (_currentCounter >= _numberOfLines) {
|
||||
_currentCounter = 0;
|
||||
}
|
||||
|
||||
painter.setPen(Qt::NoPen);
|
||||
for (int i = 0; i < _numberOfLines; ++i) {
|
||||
painter.save();
|
||||
painter.translate(_innerRadius + _lineLength,
|
||||
_innerRadius + _lineLength);
|
||||
qreal rotateAngle =
|
||||
static_cast<qreal>(360 * i) / static_cast<qreal>(_numberOfLines);
|
||||
painter.rotate(rotateAngle);
|
||||
painter.translate(_innerRadius, 0);
|
||||
int distance =
|
||||
lineCountDistanceFromPrimary(i, _currentCounter, _numberOfLines);
|
||||
QColor color =
|
||||
currentLineColor(distance, _numberOfLines, _trailFadePercentage,
|
||||
_minimumTrailOpacity, _color);
|
||||
painter.setBrush(color);
|
||||
// TODO improve the way rounded rect is painted
|
||||
painter.drawRoundedRect(
|
||||
QRect(0, -_lineWidth / 2, _lineLength, _lineWidth), _roundness,
|
||||
_roundness, Qt::RelativeSize);
|
||||
painter.restore();
|
||||
}
|
||||
}
|
||||
|
||||
void WaitingSpinnerWidget::start() {
|
||||
updatePosition();
|
||||
_isSpinning = true;
|
||||
show();
|
||||
|
||||
if(parentWidget() && _disableParentWhenSpinning) {
|
||||
parentWidget()->setEnabled(false);
|
||||
}
|
||||
|
||||
if (!_timer->isActive()) {
|
||||
_timer->start();
|
||||
_currentCounter = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void WaitingSpinnerWidget::stop() {
|
||||
_isSpinning = false;
|
||||
hide();
|
||||
|
||||
if(parentWidget() && _disableParentWhenSpinning) {
|
||||
parentWidget()->setEnabled(true);
|
||||
}
|
||||
|
||||
if (_timer->isActive()) {
|
||||
_timer->stop();
|
||||
_currentCounter = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void WaitingSpinnerWidget::setNumberOfLines(int lines) {
|
||||
_numberOfLines = lines;
|
||||
_currentCounter = 0;
|
||||
updateTimer();
|
||||
}
|
||||
|
||||
void WaitingSpinnerWidget::setLineLength(int length) {
|
||||
_lineLength = length;
|
||||
updateSize();
|
||||
}
|
||||
|
||||
void WaitingSpinnerWidget::setLineWidth(int width) {
|
||||
_lineWidth = width;
|
||||
updateSize();
|
||||
}
|
||||
|
||||
void WaitingSpinnerWidget::setInnerRadius(int radius) {
|
||||
_innerRadius = radius;
|
||||
updateSize();
|
||||
}
|
||||
|
||||
QColor WaitingSpinnerWidget::color() {
|
||||
return _color;
|
||||
}
|
||||
|
||||
qreal WaitingSpinnerWidget::roundness() {
|
||||
return _roundness;
|
||||
}
|
||||
|
||||
qreal WaitingSpinnerWidget::minimumTrailOpacity() {
|
||||
return _minimumTrailOpacity;
|
||||
}
|
||||
|
||||
qreal WaitingSpinnerWidget::trailFadePercentage() {
|
||||
return _trailFadePercentage;
|
||||
}
|
||||
|
||||
qreal WaitingSpinnerWidget::revolutionsPersSecond() {
|
||||
return _revolutionsPerSecond;
|
||||
}
|
||||
|
||||
int WaitingSpinnerWidget::numberOfLines() {
|
||||
return _numberOfLines;
|
||||
}
|
||||
|
||||
int WaitingSpinnerWidget::lineLength() {
|
||||
return _lineLength;
|
||||
}
|
||||
|
||||
int WaitingSpinnerWidget::lineWidth() {
|
||||
return _lineWidth;
|
||||
}
|
||||
|
||||
int WaitingSpinnerWidget::innerRadius() {
|
||||
return _innerRadius;
|
||||
}
|
||||
|
||||
bool WaitingSpinnerWidget::isSpinning() const {
|
||||
return _isSpinning;
|
||||
}
|
||||
|
||||
void WaitingSpinnerWidget::setRoundness(qreal roundness) {
|
||||
_roundness = std::max(0.0, std::min(100.0, roundness));
|
||||
}
|
||||
|
||||
void WaitingSpinnerWidget::setColor(QColor color) {
|
||||
_color = color;
|
||||
}
|
||||
|
||||
void WaitingSpinnerWidget::setRevolutionsPerSecond(qreal revolutionsPerSecond) {
|
||||
_revolutionsPerSecond = revolutionsPerSecond;
|
||||
updateTimer();
|
||||
}
|
||||
|
||||
void WaitingSpinnerWidget::setTrailFadePercentage(qreal trail) {
|
||||
_trailFadePercentage = trail;
|
||||
}
|
||||
|
||||
void WaitingSpinnerWidget::setMinimumTrailOpacity(qreal minimumTrailOpacity) {
|
||||
_minimumTrailOpacity = minimumTrailOpacity;
|
||||
}
|
||||
|
||||
void WaitingSpinnerWidget::rotate() {
|
||||
++_currentCounter;
|
||||
if (_currentCounter >= _numberOfLines) {
|
||||
_currentCounter = 0;
|
||||
}
|
||||
update();
|
||||
}
|
||||
|
||||
void WaitingSpinnerWidget::updateSize() {
|
||||
int size = (_innerRadius + _lineLength) * 2;
|
||||
setFixedSize(size, size);
|
||||
}
|
||||
|
||||
void WaitingSpinnerWidget::updateTimer() {
|
||||
_timer->setInterval(1000 / (_numberOfLines * _revolutionsPerSecond));
|
||||
}
|
||||
|
||||
void WaitingSpinnerWidget::updatePosition() {
|
||||
if (parentWidget() && _centerOnParent) {
|
||||
move(parentWidget()->width() / 2 - width() / 2,
|
||||
parentWidget()->height() / 2 - height() / 2);
|
||||
}
|
||||
}
|
||||
|
||||
int WaitingSpinnerWidget::lineCountDistanceFromPrimary(int current, int primary,
|
||||
int totalNrOfLines) {
|
||||
int distance = primary - current;
|
||||
if (distance < 0) {
|
||||
distance += totalNrOfLines;
|
||||
}
|
||||
return distance;
|
||||
}
|
||||
|
||||
QColor WaitingSpinnerWidget::currentLineColor(int countDistance, int totalNrOfLines,
|
||||
qreal trailFadePerc, qreal minOpacity,
|
||||
QColor color) {
|
||||
if (countDistance == 0) {
|
||||
return color;
|
||||
}
|
||||
const qreal minAlphaF = minOpacity / 100.0;
|
||||
int distanceThreshold =
|
||||
static_cast<int>(ceil((totalNrOfLines - 1) * trailFadePerc / 100.0));
|
||||
if (countDistance > distanceThreshold) {
|
||||
color.setAlphaF(minAlphaF);
|
||||
} else {
|
||||
qreal alphaDiff = color.alphaF() - minAlphaF;
|
||||
qreal gradient = alphaDiff / static_cast<qreal>(distanceThreshold + 1);
|
||||
qreal resultAlpha = color.alphaF() - gradient * countDistance;
|
||||
|
||||
// If alpha is out of bounds, clip it.
|
||||
resultAlpha = std::min(1.0, std::max(0.0, resultAlpha));
|
||||
color.setAlphaF(resultAlpha);
|
||||
}
|
||||
return color;
|
||||
}
|
122
3rdparty/waitingspinnerwidget.h
vendored
122
3rdparty/waitingspinnerwidget.h
vendored
@@ -1,122 +0,0 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2012-2014 Alexander Turkin
|
||||
* SPDX-FileCopyrightText: 2014 William Hallatt
|
||||
* SPDX-FileCopyrightText: 2015 Jacob Dawid
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
/* Original Work Copyright (c) 2012-2014 Alexander Turkin
|
||||
Modified 2014 by William Hallatt
|
||||
Modified 2015 by Jacob Dawid
|
||||
|
||||
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.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
// Qt includes
|
||||
#include <QWidget>
|
||||
#include <QTimer>
|
||||
#include <QColor>
|
||||
|
||||
class WaitingSpinnerWidget : public QWidget {
|
||||
Q_OBJECT
|
||||
public:
|
||||
/*! Constructor for "standard" widget behaviour - use this
|
||||
* constructor if you wish to, e.g. embed your widget in another. */
|
||||
WaitingSpinnerWidget(QWidget *parent = nullptr,
|
||||
bool centerOnParent = true,
|
||||
bool disableParentWhenSpinning = true);
|
||||
|
||||
/*! Constructor - use this constructor to automatically create a modal
|
||||
* ("blocking") spinner on top of the calling widget/window. If a valid
|
||||
* parent widget is provided, "centreOnParent" will ensure that
|
||||
* QtWaitingSpinner automatically centres itself on it, if not,
|
||||
* "centreOnParent" is ignored. */
|
||||
WaitingSpinnerWidget(Qt::WindowModality modality,
|
||||
QWidget *parent = nullptr,
|
||||
bool centerOnParent = true,
|
||||
bool disableParentWhenSpinning = true);
|
||||
|
||||
public slots:
|
||||
void start();
|
||||
void stop();
|
||||
|
||||
public:
|
||||
void setColor(QColor color);
|
||||
void setRoundness(qreal roundness);
|
||||
void setMinimumTrailOpacity(qreal minimumTrailOpacity);
|
||||
void setTrailFadePercentage(qreal trail);
|
||||
void setRevolutionsPerSecond(qreal revolutionsPerSecond);
|
||||
void setNumberOfLines(int lines);
|
||||
void setLineLength(int length);
|
||||
void setLineWidth(int width);
|
||||
void setInnerRadius(int radius);
|
||||
void setText(QString text);
|
||||
|
||||
QColor color();
|
||||
qreal roundness();
|
||||
qreal minimumTrailOpacity();
|
||||
qreal trailFadePercentage();
|
||||
qreal revolutionsPersSecond();
|
||||
int numberOfLines();
|
||||
int lineLength();
|
||||
int lineWidth();
|
||||
int innerRadius();
|
||||
|
||||
bool isSpinning() const;
|
||||
|
||||
private slots:
|
||||
void rotate();
|
||||
|
||||
protected:
|
||||
void paintEvent(QPaintEvent *paintEvent) override;
|
||||
|
||||
private:
|
||||
static int lineCountDistanceFromPrimary(int current, int primary,
|
||||
int totalNrOfLines);
|
||||
static QColor currentLineColor(int distance, int totalNrOfLines,
|
||||
qreal trailFadePerc, qreal minOpacity,
|
||||
QColor color);
|
||||
|
||||
void initialize();
|
||||
void updateSize();
|
||||
void updateTimer();
|
||||
void updatePosition();
|
||||
|
||||
private:
|
||||
QColor _color;
|
||||
qreal _roundness; // 0..100
|
||||
qreal _minimumTrailOpacity;
|
||||
qreal _trailFadePercentage;
|
||||
qreal _revolutionsPerSecond;
|
||||
int _numberOfLines;
|
||||
int _lineLength;
|
||||
int _lineWidth;
|
||||
int _innerRadius;
|
||||
|
||||
private:
|
||||
WaitingSpinnerWidget(const WaitingSpinnerWidget&);
|
||||
WaitingSpinnerWidget& operator=(const WaitingSpinnerWidget&);
|
||||
|
||||
QTimer *_timer;
|
||||
bool _centerOnParent;
|
||||
bool _disableParentWhenSpinning;
|
||||
int _currentCounter;
|
||||
bool _isSpinning;
|
||||
};
|
50
AUTHORS
50
AUTHORS
@@ -1,49 +1 @@
|
||||
<!-- SPDX-FileCopyrightText: no
|
||||
SPDX-License-Identifier: CC0-1.0
|
||||
-->
|
||||
|
||||
# MAINTAINER
|
||||
|
||||
Calamares development is sponsored by Blue Systems GmbH - Liberating Software.
|
||||
|
||||
Calamares maintainers through the years:
|
||||
* Teo Mrnjavac <teo@kde.org> (maintainer -2017)
|
||||
* Adriaan de Groot <groot@kde.org> (maintainer 2017-)
|
||||
|
||||
# CONTRIBUTORS
|
||||
|
||||
Calamares has received contributions of code, documentation, artwork
|
||||
and moral support from (alphabetically by first name or nickname):
|
||||
|
||||
- Alf Gaida
|
||||
- aliveafter1000
|
||||
- Allen Welkie
|
||||
- AlmAck
|
||||
- Andrius Štikonas
|
||||
- Arnaud Ferraris
|
||||
- artoo@cromnix.org
|
||||
- Bernhard Landauer
|
||||
- Bezzy1999
|
||||
- Bill Auger
|
||||
- Caio Jordão Carvalho
|
||||
- Collabora LTD
|
||||
- crispg72
|
||||
- Dan Simmons
|
||||
- demmm
|
||||
- Dominic Hayes
|
||||
- Frede H
|
||||
- Gabriel Craciunescu
|
||||
- Harald Sitter
|
||||
- Kai Dohmen
|
||||
- Kevin Kofler
|
||||
- Kyle Robertze
|
||||
- Lisa Vitolo
|
||||
- Neal Gompa
|
||||
- n3rdopolis
|
||||
- Philip Müller
|
||||
- Ramon Buldó
|
||||
- Raul Rodrigo Segura
|
||||
- Rohan Garg
|
||||
- Scott Harvey
|
||||
- Simon Quigley
|
||||
- Walter Lapchynski
|
||||
Teo Mrnjavac <teo@kde.org>
|
||||
|
736
CMakeLists.txt
736
CMakeLists.txt
@@ -1,263 +1,35 @@
|
||||
# === This file is part of Calamares - <https://calamares.io> ===
|
||||
#
|
||||
# SPDX-FileCopyrightText: 2017 Adriaan de Groot <groot@kde.org>
|
||||
# SPDX-License-Identifier: BSD-2-Clause
|
||||
#
|
||||
###
|
||||
#
|
||||
# Calamares is Free Software: see the License-Identifier above.
|
||||
#
|
||||
# Individual files may have different licenses (like the CMake
|
||||
# infrastructure, which is BSD-2-Clause licensed). Check the SPDX
|
||||
# identifiers in each file.
|
||||
#
|
||||
###
|
||||
#
|
||||
# Generally, this CMakeLists.txt will find all the dependencies for Calamares
|
||||
# and complain appropriately. See below (later in this file) for CMake-level
|
||||
# options. There are some "secret" options as well:
|
||||
#
|
||||
# SKIP_MODULES : a space or semicolon-separated list of directory names
|
||||
# under src/modules that should not be built.
|
||||
# USE_<foo> : fills in SKIP_MODULES for modules called <foo>-<something>
|
||||
# WITH_<foo> : try to enable <foo> (these usually default to ON). For
|
||||
# a list of WITH_<foo> grep CMakeCache.txt after running
|
||||
# CMake once. These affect the ABI offered by Calamares.
|
||||
# - PYTHON (enable Python Job modules)
|
||||
# - QML (enable QML UI View modules)
|
||||
# - PYTHONQT # TODO:3.3: remove
|
||||
# BUILD_<foo> : choose additional things to build
|
||||
# - TESTING (standard CMake option)
|
||||
# - SCHEMA_TESTING (requires Python, see ci/configvalidator.py)
|
||||
# DEBUG_<foo> : special developer flags for debugging
|
||||
#
|
||||
# Example usage:
|
||||
#
|
||||
# cmake . -DSKIP_MODULES="partition luksbootkeycfg"
|
||||
#
|
||||
# One special target is "show-version", which can be built
|
||||
# to obtain the version number from here.
|
||||
project( calamares CXX )
|
||||
|
||||
# TODO:3.3: Require CMake 3.12
|
||||
cmake_minimum_required( VERSION 3.3 FATAL_ERROR )
|
||||
project( CALAMARES
|
||||
VERSION 3.2.37
|
||||
LANGUAGES C CXX
|
||||
)
|
||||
# The partition manager uses ECM but ECMConfig.cmake
|
||||
# will complain if we require CMake less than 2.8.13,
|
||||
# so never change this.
|
||||
cmake_minimum_required( VERSION 2.8.12 )
|
||||
|
||||
set( CALAMARES_VERSION_RC 0 ) # Set to 0 during release cycle, 1 during development
|
||||
|
||||
### OPTIONS
|
||||
#
|
||||
option( INSTALL_CONFIG "Install configuration files" OFF )
|
||||
option( INSTALL_POLKIT "Install Polkit configuration" ON )
|
||||
option( INSTALL_COMPLETION "Install shell completions" OFF )
|
||||
# Options for the calamares executable
|
||||
option( WITH_KF5Crash "Enable crash reporting with KCrash." ON ) # TODO:3.3: WITH->BUILD (this isn't an ABI thing)
|
||||
option( WITH_KF5DBus "Use DBus service for unique-application." OFF ) # TODO:3.3: WITH->BUILD
|
||||
# When adding WITH_* that affects the ABI offered by libcalamares,
|
||||
# also update libcalamares/CalamaresConfig.h.in
|
||||
option( WITH_PYTHON "Enable Python modules API (requires Boost.Python)." ON )
|
||||
option( WITH_PYTHONQT "Enable Python view modules API (deprecated, requires PythonQt)." OFF ) # TODO:3.3: remove
|
||||
option( WITH_QML "Enable QML UI options." ON )
|
||||
#
|
||||
# Additional parts to build
|
||||
option( BUILD_SCHEMA_TESTING "Enable schema-validation-tests" ON )
|
||||
|
||||
|
||||
# Possible debugging flags are:
|
||||
# - DEBUG_TIMEZONES draws latitude and longitude lines on the timezone
|
||||
# widget and enables chatty debug logging, for dealing with the timezone
|
||||
# location database.
|
||||
# - DEBUG_FILESYSTEMS does extra logging and checking when looking at
|
||||
# partition configuration. Lists known KPMCore FS types.
|
||||
# - DEBUG_PARTITION_UNSAFE (see partition/CMakeLists.txt)
|
||||
# - DEBUG_PARTITION_LAME (see partition/CMakeLists.txt)
|
||||
|
||||
|
||||
### USE_*
|
||||
#
|
||||
# By convention, when there are multiple modules that implement similar
|
||||
# functionality, and it only makes sense to have **at most one** of them
|
||||
# enabled at any time, those modules are named <foo>-<implementation>.
|
||||
# For example, services-systemd and services-openrc.
|
||||
#
|
||||
# Setting up SKIP_MODULES to ignore "the ones you don't want" can be
|
||||
# annoying and error-prone (e.g. if a new module shows up). The USE_*
|
||||
# modules provide a way to do automatic selection. To pick exactly
|
||||
# one of the implementations from group <foo>, set USE_<foo> to the
|
||||
# name of the implementation. If USE_<foo> is unset, or empty, then
|
||||
# all the implementations are enabled (this just means they are
|
||||
# **available** to `settings.conf`, not that they are used).
|
||||
#
|
||||
# To explicitly disable a set of modules, set USE_<foo>=none
|
||||
# (e.g. the literal string none), which won't match any of the
|
||||
# modules but is handled specially. This is the default for
|
||||
# USE_os, which are modules for specialty non-Linux distributions.
|
||||
#
|
||||
# The following USE_* functionalities are available:
|
||||
# - *services* picks one of the two service-configuration modules,
|
||||
# for either systemd or openrc. This defaults to empty so that
|
||||
# **both** modules are available.
|
||||
# - *os* picks an OS-specific module for things-that-are-not-Linux.
|
||||
# It is generally discouraged to use this unless your distro is
|
||||
# completely unable to use standard Linux tools for configuration.
|
||||
# This defaults to *none* so that nothing gets picked up and nothing
|
||||
# is packaged -- you must explicitly set it to empty to get all of
|
||||
# the modules, but that hardly makes sense. Note, too that there
|
||||
# are currently no os-* modules shipped with Calamares.
|
||||
set( USE_services "" CACHE STRING "Select the services module to use" )
|
||||
set( USE_os "none" CACHE STRING "Select the OS-specific module to include" )
|
||||
|
||||
### Calamares application info
|
||||
#
|
||||
set( CALAMARES_ORGANIZATION_NAME "Calamares" )
|
||||
set( CALAMARES_ORGANIZATION_DOMAIN "github.com/calamares" )
|
||||
set( CALAMARES_APPLICATION_NAME "Calamares" )
|
||||
set( CALAMARES_DESCRIPTION_SUMMARY
|
||||
"The distribution-independent installer framework" )
|
||||
|
||||
### Transifex (languages) info
|
||||
#
|
||||
# complete = 100% translated,
|
||||
# good = nearly complete (use own judgement, right now >= 75%)
|
||||
# ok = incomplete (more than 25% untranslated, at least 5% translated),
|
||||
# incomplete = <5% translated, placeholder in tx; these are not included.
|
||||
#
|
||||
# Language en (source language) is added later. It isn't listed in
|
||||
# Transifex either. Get the list of languages and their status
|
||||
# from https://transifex.com/calamares/calamares/ , or (preferably)
|
||||
# use ci/txstats.py to automatically check.
|
||||
#
|
||||
# When adding a new language, take care that it is properly loaded
|
||||
# by the translation framework. Languages with alternate scripts
|
||||
# (sr@latin in particular) may need special handling in CalamaresUtils.cpp.
|
||||
#
|
||||
# TODO: drop the es_ES translation from Transifex
|
||||
#
|
||||
# NOTE: move eo (Esperanto) to _ok once Qt can actually create a
|
||||
# locale for it. (Qt 5.12.2 can, see Translation Status section).
|
||||
# NOTE: move ie (Interlingue) to _ok once Qt supports it.
|
||||
# NOTE: update these lines by running `txstats.py`, or for full automation
|
||||
# `txstats.py -e`. See also
|
||||
#
|
||||
# Total 71 languages
|
||||
set( _tx_complete az ca fi_FI fur he hr ja lt sq uk zh_CN zh_TW )
|
||||
set( _tx_good as ast az_AZ be cs_CZ da de es fa fr hi hu it_IT ko
|
||||
ml nl pt_BR pt_PT ru sk sv tg tr_TR vi )
|
||||
set( _tx_ok ar bg bn el en_GB es_MX es_PR et eu gl id is mr nb pl
|
||||
ro sl sr sr@latin th )
|
||||
set( _tx_incomplete ca@valencia eo fr_CH gu ie kk kn lo lv mk ne_NP
|
||||
te ur uz )
|
||||
|
||||
### Required versions
|
||||
#
|
||||
# See DEPENDENCIES section below.
|
||||
set( QT_VERSION 5.9.0 )
|
||||
set( YAMLCPP_VERSION 0.5.1 )
|
||||
set( ECM_VERSION 5.18 )
|
||||
set( PYTHONLIBS_VERSION 3.3 )
|
||||
set( BOOSTPYTHON_VERSION 1.55.0 )
|
||||
|
||||
|
||||
### CMAKE SETUP
|
||||
#
|
||||
set( CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/CMakeModules" )
|
||||
|
||||
# Enable IN_LIST
|
||||
if( POLICY CMP0057 )
|
||||
cmake_policy( SET CMP0057 NEW )
|
||||
endif()
|
||||
# Let ``AUTOMOC`` and ``AUTOUIC`` process ``GENERATED`` files.
|
||||
if( POLICY CMP0071 )
|
||||
cmake_policy( SET CMP0071 NEW )
|
||||
endif()
|
||||
# Recognize more macros to trigger automoc
|
||||
if(NOT CMAKE_VERSION VERSION_LESS "3.10.0")
|
||||
list(APPEND CMAKE_AUTOMOC_MACRO_NAMES
|
||||
"K_PLUGIN_FACTORY_WITH_JSON"
|
||||
"K_EXPORT_PLASMA_DATAENGINE_WITH_JSON"
|
||||
"K_EXPORT_PLASMA_RUNNER"
|
||||
)
|
||||
endif()
|
||||
|
||||
# CMake Modules
|
||||
include( CMakePackageConfigHelpers )
|
||||
include( CTest )
|
||||
include( FeatureSummary )
|
||||
|
||||
# Calamares Modules
|
||||
include( CMakeColors )
|
||||
|
||||
### C++ SETUP
|
||||
#
|
||||
set( CMAKE_CXX_STANDARD 17 )
|
||||
set( CMAKE_CXX_STANDARD_REQUIRED ON )
|
||||
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Werror=return-type" )
|
||||
set( CMAKE_CXX_FLAGS_DEBUG "-g ${CMAKE_CXX_FLAGS_DEBUG}" )
|
||||
set( CMAKE_CXX_FLAGS_MINSIZEREL "-Os -DNDEBUG" )
|
||||
set( CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG" )
|
||||
set( CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g" )
|
||||
|
||||
set( CMAKE_C_STANDARD 99 )
|
||||
set( CMAKE_C_STANDARD_REQUIRED ON )
|
||||
set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall" )
|
||||
set( CMAKE_C_FLAGS_DEBUG "-g" )
|
||||
set( CMAKE_C_FLAGS_MINSIZEREL "-Os -DNDEBUG" )
|
||||
set( CMAKE_C_FLAGS_RELEASE "-O4 -DNDEBUG" )
|
||||
set( CMAKE_C_FLAGS_RELWITHDEBINFO "-O2 -g" )
|
||||
|
||||
set( CMAKE_SHARED_LINKER_FLAGS "-Wl,--no-undefined -Wl,--fatal-warnings" )
|
||||
set( CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules" )
|
||||
|
||||
if( CMAKE_CXX_COMPILER_ID MATCHES "Clang" )
|
||||
message( STATUS "Found Clang ${CMAKE_CXX_COMPILER_VERSION}, setting up Clang-specific compiler flags." )
|
||||
set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -std=c99" )
|
||||
set( CMAKE_C_FLAGS_DEBUG "-g" )
|
||||
set( CMAKE_C_FLAGS_MINSIZEREL "-Os -DNDEBUG" )
|
||||
set( CMAKE_C_FLAGS_RELEASE "-O4 -DNDEBUG" )
|
||||
set( CMAKE_C_FLAGS_RELWITHDEBINFO "-O2 -g" )
|
||||
|
||||
# Clang warnings: doing *everything* is counter-productive, since it warns
|
||||
# about things which we can't fix (e.g. C++98 incompatibilities, but
|
||||
# Calamares is C++17).
|
||||
foreach( CLANG_WARNINGS
|
||||
-Weverything
|
||||
-Wno-c++98-compat
|
||||
-Wno-c++98-compat-pedantic
|
||||
-Wno-padded
|
||||
-Wno-undefined-reinterpret-cast
|
||||
-Wno-global-constructors
|
||||
-Wno-exit-time-destructors
|
||||
-Wno-missing-prototypes
|
||||
-Wno-documentation-unknown-command
|
||||
-Wno-unknown-warning-option
|
||||
)
|
||||
string( APPEND CMAKE_CXX_FLAGS " ${CLANG_WARNINGS}" )
|
||||
endforeach()
|
||||
|
||||
# Third-party code where we don't care so much about compiler warnings
|
||||
# (because it's uncomfortable to patch) get different flags; use
|
||||
# mark_thirdparty_code( <file> [<file>...] )
|
||||
# to switch off warnings for those sources.
|
||||
set( SUPPRESS_3RDPARTY_WARNINGS "-Wno-everything" )
|
||||
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Weverything -std=c++11" )
|
||||
set( CMAKE_CXX_FLAGS_DEBUG "-g" )
|
||||
set( CMAKE_CXX_FLAGS_MINSIZEREL "-Os -DNDEBUG" )
|
||||
set( CMAKE_CXX_FLAGS_RELEASE "-O4 -DNDEBUG" )
|
||||
set( CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g" )
|
||||
|
||||
set( CMAKE_TOOLCHAIN_PREFIX "llvm-" )
|
||||
|
||||
# The path prefix is only relevant for CMake 3.16 and later, fixes #1286
|
||||
set( CMAKE_AUTOMOC_PATH_PREFIX OFF )
|
||||
set( CALAMARES_AUTOMOC_OPTIONS "-butils/moc-warnings.h" )
|
||||
set( CALAMARES_AUTOUIC_OPTIONS --include utils/moc-warnings.h )
|
||||
set( CMAKE_SHARED_LINKER_FLAGS "-Wl,--no-undefined" )
|
||||
else()
|
||||
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wnon-virtual-dtor -Woverloaded-virtual" )
|
||||
|
||||
set( SUPPRESS_3RDPARTY_WARNINGS "" )
|
||||
set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99" )
|
||||
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wl,--no-undefined" )
|
||||
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wl,--fatal-warnings -Wnon-virtual-dtor -Woverloaded-virtual -Werror=return-type" )
|
||||
endif()
|
||||
|
||||
# Use mark_thirdparty_code() to reduce warnings from the compiler
|
||||
# on code that we're not going to fix. Call this with a list of files.
|
||||
macro(mark_thirdparty_code)
|
||||
set_source_files_properties( ${ARGV}
|
||||
PROPERTIES
|
||||
COMPILE_FLAGS "${SUPPRESS_3RDPARTY_WARNINGS}"
|
||||
COMPILE_DEFINITIONS "THIRDPARTY"
|
||||
)
|
||||
endmacro()
|
||||
|
||||
if( CMAKE_COMPILER_IS_GNUCXX )
|
||||
if( CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 4.9 OR
|
||||
CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 4.9 )
|
||||
@@ -266,253 +38,72 @@ if( CMAKE_COMPILER_IS_GNUCXX )
|
||||
endif()
|
||||
endif()
|
||||
|
||||
cmake_policy( SET CMP0023 OLD )
|
||||
|
||||
### DEPENDENCIES
|
||||
#
|
||||
find_package( Qt5 ${QT_VERSION} CONFIG REQUIRED Concurrent Core Gui LinguistTools Network Svg Widgets )
|
||||
if( WITH_QML )
|
||||
find_package( Qt5 ${QT_VERSION} CONFIG REQUIRED Quick QuickWidgets )
|
||||
endif()
|
||||
# Optional Qt parts
|
||||
find_package( Qt5DBus CONFIG )
|
||||
|
||||
find_package( YAMLCPP ${YAMLCPP_VERSION} REQUIRED )
|
||||
if( INSTALL_POLKIT )
|
||||
find_package( PolkitQt5-1 REQUIRED )
|
||||
else()
|
||||
# Find it anyway, for dependencies-reporting
|
||||
find_package( PolkitQt5-1 )
|
||||
endif()
|
||||
set_package_properties(
|
||||
PolkitQt5-1 PROPERTIES
|
||||
DESCRIPTION "Qt5 support for Polkit"
|
||||
URL "https://cgit.kde.org/polkit-qt-1.git"
|
||||
PURPOSE "PolkitQt5-1 helps with installing Polkit configuration"
|
||||
)
|
||||
|
||||
# Find ECM once, and add it to the module search path; Calamares
|
||||
# modules that need ECM can do
|
||||
# find_package(ECM ${ECM_VERSION} REQUIRED NO_MODULE),
|
||||
# no need to mess with the module path after.
|
||||
find_package(ECM ${ECM_VERSION} NO_MODULE)
|
||||
if( ECM_FOUND )
|
||||
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${CMAKE_MODULE_PATH})
|
||||
if ( BUILD_TESTING )
|
||||
# ECM implies that we can build the tests, too
|
||||
find_package( Qt5 COMPONENTS Test REQUIRED )
|
||||
include( ECMAddTests )
|
||||
endif()
|
||||
include(KDEInstallDirs)
|
||||
# Keep cmake 3.0 quiet
|
||||
if( POLICY CMP0043 )
|
||||
cmake_policy( SET CMP0043 OLD )
|
||||
endif()
|
||||
|
||||
find_package( KF5 QUIET COMPONENTS CoreAddons Crash DBusAddons )
|
||||
set_package_properties(
|
||||
KF5::CoreAddons PROPERTIES
|
||||
TYPE REQUIRED
|
||||
DESCRIPTION "Classes built on QtCore for About Data"
|
||||
URL "https://api.kde.org/frameworks/kcoreaddons/"
|
||||
PURPOSE "About Calamares"
|
||||
)
|
||||
if( NOT KF5Crash_FOUND )
|
||||
if( WITH_KF5Crash )
|
||||
message(WARNING "WITH_KF5Crash is set, but KF5::Crash is not available.")
|
||||
endif()
|
||||
set( WITH_KF5Crash OFF )
|
||||
endif()
|
||||
if( NOT KF5DBusAddons_FOUND )
|
||||
if( WITH_KF5DBus )
|
||||
message(WARNING "WITH_KF5DBus is set, but KF5::DBusAddons is not available.")
|
||||
endif()
|
||||
set( WITH_KF5DBus OFF )
|
||||
endif()
|
||||
include( MacroOptionalFindPackage )
|
||||
include( MacroLogFeature )
|
||||
|
||||
# TODO:3.3: Use FindPython3 instead
|
||||
find_package( PythonInterp ${PYTHONLIBS_VERSION} )
|
||||
set_package_properties(
|
||||
PythonInterp PROPERTIES
|
||||
DESCRIPTION "Python 3 interpreter."
|
||||
URL "https://python.org"
|
||||
PURPOSE "Python 3 interpreter for certain tests."
|
||||
)
|
||||
set( QT_VERSION 5.3.0 )
|
||||
|
||||
set( _schema_explanation "" )
|
||||
if ( PYTHONINTERP_FOUND )
|
||||
if ( BUILD_SCHEMA_TESTING )
|
||||
# The configuration validator script has some dependencies,
|
||||
# and if they are not installed, don't run. If errors out
|
||||
# with exit(1) on missing dependencies.
|
||||
if ( CALAMARES_CONFIGVALIDATOR_CHECKED )
|
||||
set( _validator_deps ${CALAMARES_CONFIGVALIDATOR_RESULT} )
|
||||
else()
|
||||
exec_program( ${PYTHON_EXECUTABLE} ARGS "${CMAKE_SOURCE_DIR}/ci/configvalidator.py" -x RETURN_VALUE _validator_deps )
|
||||
set( CALAMARES_CONFIGVALIDATOR_CHECKED TRUE CACHE INTERNAL "Dependencies for configvalidator checked" )
|
||||
set( CALAMARES_CONFIGVALIDATOR_RESULT ${_validator_deps} CACHE INTERNAL "Result of configvalidator dependency check" )
|
||||
endif()
|
||||
# It should never succeed, but only returns 1 when the imports fail
|
||||
if ( _validator_deps EQUAL 1 )
|
||||
set( _schema_explanation " Missing dependencies for configvalidator.py." )
|
||||
set( BUILD_SCHEMA_TESTING OFF )
|
||||
endif()
|
||||
endif()
|
||||
else()
|
||||
# Can't run schema tests without Python3.
|
||||
set( _schema_explanation " Missing Python3." )
|
||||
set( BUILD_SCHEMA_TESTING OFF )
|
||||
endif()
|
||||
add_feature_info( yaml-schema BUILD_SCHEMA_TESTING "Validate YAML (config files) with schema.${_schema_explanation}" )
|
||||
find_package( Qt5 ${QT_VERSION} CONFIG REQUIRED Core Gui Widgets LinguistTools Svg Quick QuickWidgets )
|
||||
find_package( YamlCpp 0.5.1 REQUIRED )
|
||||
find_package( PolkitQt5-1 REQUIRED )
|
||||
|
||||
find_package( PythonLibs ${PYTHONLIBS_VERSION} )
|
||||
set_package_properties(
|
||||
PythonLibs PROPERTIES
|
||||
DESCRIPTION "C interface libraries for the Python 3 interpreter."
|
||||
URL "https://python.org"
|
||||
PURPOSE "Python 3 is used for Python job modules."
|
||||
option( WITH_PYTHON "Enable Python modules support." ON )
|
||||
|
||||
macro_optional_find_package( PythonLibs 3.3 )
|
||||
macro_log_feature(
|
||||
PYTHONLIBS_FOUND
|
||||
"Python"
|
||||
"C interface libraries for the Python 3 interpreter."
|
||||
"http://python.org"
|
||||
FALSE "3.3"
|
||||
"Python 3 is used for some Calamares job modules."
|
||||
)
|
||||
|
||||
if ( PYTHONLIBS_FOUND )
|
||||
# TODO:3.3: Require Boost + CMake; sort out Boost::Python
|
||||
# Since Boost provides CMake config files (starting with Boost 1.70.
|
||||
# or so) the mess that is the Calamares find code picks the wrong
|
||||
# bits. Suppress those CMake config files, as suggested by @jmrcpn
|
||||
set(Boost_NO_BOOST_CMAKE ON)
|
||||
include( BoostPython3 )
|
||||
find_boost_python3( ${BOOSTPYTHON_VERSION} ${PYTHONLIBS_VERSION_STRING} CALAMARES_BOOST_PYTHON3_FOUND )
|
||||
set_package_properties(
|
||||
Boost PROPERTIES
|
||||
PURPOSE "Boost.Python is used for Python job modules."
|
||||
)
|
||||
# TODO:3.3: Remove PythonQt support
|
||||
find_package( PythonQt )
|
||||
set_package_properties( PythonQt PROPERTIES
|
||||
DESCRIPTION "A Python embedding solution for Qt applications."
|
||||
URL "http://pythonqt.sourceforge.net"
|
||||
PURPOSE "PythonQt is used for Python view modules."
|
||||
find_boost_python3( 1.54.0 ${PYTHONLIBS_VERSION_STRING} CALAMARES_BOOST_PYTHON3_FOUND )
|
||||
macro_log_feature(
|
||||
CALAMARES_BOOST_PYTHON3_FOUND
|
||||
"Boost.Python"
|
||||
"A C++ library which enables seamless interoperability between C++ and Python 3."
|
||||
"http://www.boost.org"
|
||||
FALSE "1.54.0"
|
||||
"Boost.Python is used for interfacing with Calamares job modules written in Python 3."
|
||||
)
|
||||
endif()
|
||||
|
||||
if( NOT PYTHONLIBS_FOUND OR NOT CALAMARES_BOOST_PYTHON3_FOUND )
|
||||
message(STATUS "Disabling Boost::Python modules")
|
||||
if ( PYTHONLIBS_NOTFOUND OR NOT CALAMARES_BOOST_PYTHON3_FOUND )
|
||||
set( WITH_PYTHON OFF )
|
||||
endif()
|
||||
if( NOT PYTHONLIBS_FOUND OR NOT PYTHONQT_FOUND )
|
||||
message(STATUS "Disabling PythonQt modules")
|
||||
set( WITH_PYTHONQT OFF )
|
||||
endif()
|
||||
|
||||
# Now we know the state of the ABI-options, copy them into "Calamares_"
|
||||
# prefixed variables, to match how the variables would-be-named
|
||||
# when building out-of-tree.
|
||||
set(Calamares_WITH_PYTHON ${WITH_PYTHON})
|
||||
set(Calamares_WITH_PYTHONQT ${WITH_PYTHONQT})
|
||||
set(Calamares_WITH_QML ${WITH_QML})
|
||||
###
|
||||
### Calamares application info
|
||||
###
|
||||
set( CALAMARES_ORGANIZATION_NAME "Calamares" )
|
||||
set( CALAMARES_ORGANIZATION_DOMAIN "github.com/calamares" )
|
||||
set( CALAMARES_APPLICATION_NAME "Calamares" )
|
||||
set( CALAMARES_DESCRIPTION_SUMMARY "The distribution-independent installer framework" )
|
||||
set( CALAMARES_TRANSLATION_LANGUAGES ar ast ca cs_CZ da de en en_GB es_MX es fi_FI fr hr hu id it_IT ja lt nl pl pt_BR pt_PT ro ru sk sl sv th tr_TR zh_CN zh_TW )
|
||||
|
||||
### Transifex Translation status
|
||||
#
|
||||
# Construct language lists for use.
|
||||
#
|
||||
if( Qt5_VERSION VERSION_GREATER 5.12.1 )
|
||||
# At least Qt 5.12.2 seems to support Esperanto in QLocale
|
||||
if( "eo" IN_LIST _tx_incomplete )
|
||||
message(STATUS "Esperanto support since Qt 5.12.2, enabling Esperanto locale")
|
||||
list( REMOVE_ITEM _tx_incomplete "eo" )
|
||||
list( APPEND _tx_ok "eo" )
|
||||
endif()
|
||||
endif()
|
||||
set( CALAMARES_VERSION_MAJOR 1 )
|
||||
set( CALAMARES_VERSION_MINOR 1 )
|
||||
set( CALAMARES_VERSION_PATCH 4 )
|
||||
set( CALAMARES_VERSION_RC 0 )
|
||||
|
||||
set( curr_tx ${_tx_complete} ${_tx_good} ${_tx_ok} ${_tx_incomplete} )
|
||||
set( tx_errors OFF )
|
||||
if ( curr_tx )
|
||||
# New in list
|
||||
foreach( l ${curr_tx} )
|
||||
set( p_l "lang/calamares_${l}.ts" )
|
||||
if( NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${p_l} )
|
||||
message(WARNING "Language ${l} has no .ts file yet.")
|
||||
set( tx_errors ON )
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
unset( p_l )
|
||||
unset( l )
|
||||
endif()
|
||||
unset( curr_tx )
|
||||
if( tx_errors )
|
||||
message( FATAL_ERROR "Translation warnings, see above." )
|
||||
endif()
|
||||
|
||||
set( CALAMARES_TRANSLATION_LANGUAGES en ${_tx_complete} ${_tx_good} ${_tx_ok} )
|
||||
list( SORT CALAMARES_TRANSLATION_LANGUAGES )
|
||||
|
||||
add_subdirectory( lang ) # i18n tools
|
||||
|
||||
### Example Distro
|
||||
#
|
||||
# For testing purposes Calamares includes a very, very, limited sample
|
||||
# distro called "Generic". The root filesystem of "Generic" lives in
|
||||
# data/example-root and can be squashed up as part of the build, so
|
||||
# that a pure-upstream run of ./calamares -d from the build directory
|
||||
# (with all the default settings and configurations) can actually
|
||||
# do an complete example run.
|
||||
#
|
||||
# Some binaries from the build host (e.g. /bin and /lib) are also
|
||||
# squashed into the example filesystem.
|
||||
#
|
||||
# To build the example distro (for use by the default, example,
|
||||
# unsquashfs module), build the target 'example-distro', eg.:
|
||||
#
|
||||
# make example-distro
|
||||
#
|
||||
find_program( mksquashfs_PROGRAM mksquashfs )
|
||||
if( mksquashfs_PROGRAM )
|
||||
set( mksquashfs_FOUND ON )
|
||||
set( src_fs ${CMAKE_SOURCE_DIR}/data/example-root/ )
|
||||
set( dst_fs ${CMAKE_BINARY_DIR}/example.sqfs )
|
||||
if( EXISTS ${src_fs} )
|
||||
# based on the build host. If /lib64 exists, assume it is needed.
|
||||
# Collect directories needed for a minimal binary distro,
|
||||
# Note that the last path component is added to the root, so
|
||||
# if you add /usr/sbin here, it will be put into /sbin_1.
|
||||
# Add such paths to /etc/profile under ${src_fs}.
|
||||
set( candidate_fs /sbin /bin /lib /lib64 )
|
||||
set( host_fs "" )
|
||||
foreach( c_fs ${candidate_fs} )
|
||||
if( EXISTS ${c_fs} )
|
||||
list( APPEND host_fs ${c_fs} )
|
||||
endif()
|
||||
endforeach()
|
||||
add_custom_command(
|
||||
OUTPUT ${dst_fs}
|
||||
COMMAND ${mksquashfs_PROGRAM} ${src_fs} ${dst_fs} -all-root
|
||||
COMMAND ${mksquashfs_PROGRAM} ${host_fs} ${dst_fs} -all-root
|
||||
)
|
||||
add_custom_target(example-distro DEPENDS ${dst_fs})
|
||||
endif()
|
||||
else()
|
||||
set( mksquashfs_FOUND OFF )
|
||||
endif()
|
||||
# Doesn't list mksquashfs as an optional dep, though, because it
|
||||
# hasn't been sent through the find_package() scheme.
|
||||
#
|
||||
# "http://tldp.org/HOWTO/SquashFS-HOWTO/creatingandusing.html"
|
||||
add_feature_info( ExampleDistro ${mksquashfs_FOUND} "Create example-distro target.")
|
||||
|
||||
|
||||
### CALAMARES PROPER
|
||||
#
|
||||
set( CALAMARES_VERSION ${CALAMARES_VERSION_MAJOR}.${CALAMARES_VERSION_MINOR}.${CALAMARES_VERSION_PATCH} )
|
||||
# In rare cases we have hotfix-releases with a tweak
|
||||
if( CALAMARES_VERSION_TWEAK )
|
||||
set( CALAMARES_VERSION "${CALAMARES_VERSION}.${CALAMARES_VERSION_TWEAK}" )
|
||||
endif()
|
||||
set( CALAMARES_VERSION_SHORT "${CALAMARES_VERSION}" )
|
||||
if( CALAMARES_VERSION_RC )
|
||||
set( CALAMARES_VERSION ${CALAMARES_VERSION}rc${CALAMARES_VERSION_RC} )
|
||||
endif()
|
||||
|
||||
# Additional info for non-release builds. The "extended" version information
|
||||
# with date and git information (commit, dirty status) is used only
|
||||
# by CalamaresVersionX.h, which is included by consumers that need a full
|
||||
# version number with all that information; normal consumers can include
|
||||
# CalamaresVersion.h with more stable numbers.
|
||||
# additional info for non-release builds
|
||||
if( NOT BUILD_RELEASE AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/.git/" )
|
||||
include( CMakeDateStamp )
|
||||
set( CALAMARES_VERSION_DATE "${CMAKE_DATESTAMP_YEAR}${CMAKE_DATESTAMP_MONTH}${CMAKE_DATESTAMP_DAY}" )
|
||||
@@ -526,21 +117,8 @@ if( NOT BUILD_RELEASE AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/.git/" )
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Special target for not-RC (e.g. might-be-release) builds.
|
||||
# This is used by the release script to get the version.
|
||||
if ( CALAMARES_VERSION_RC EQUAL 0 )
|
||||
add_custom_target(show-version
|
||||
${CMAKE_COMMAND} -E echo CALAMARES_VERSION=${CALAMARES_VERSION_SHORT}
|
||||
USES_TERMINAL
|
||||
)
|
||||
endif()
|
||||
|
||||
# enforce using constBegin, constEnd for const-iterators
|
||||
add_definitions(
|
||||
-DQT_STRICT_ITERATORS
|
||||
-DQT_SHARED
|
||||
-DQT_SHAREDPOINTER_TRACK_POINTERS
|
||||
)
|
||||
add_definitions( "-DQT_STRICT_ITERATORS" )
|
||||
|
||||
# set paths
|
||||
set( CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}" )
|
||||
@@ -557,132 +135,88 @@ endif()
|
||||
# make predefined install dirs available everywhere
|
||||
include( GNUInstallDirs )
|
||||
|
||||
# This is used by CalamaresAddLibrary; once Calamares is installed,
|
||||
# the CalamaresConfig.cmake module sets this variable to the IMPORTED
|
||||
# libraries for Calamares.
|
||||
set( Calamares_LIBRARIES calamares )
|
||||
|
||||
add_subdirectory( src )
|
||||
|
||||
add_feature_info(Python ${WITH_PYTHON} "Python job modules")
|
||||
add_feature_info(PythonQt ${WITH_PYTHONQT} "Python view modules")
|
||||
add_feature_info(Config ${INSTALL_CONFIG} "Install Calamares configuration")
|
||||
add_feature_info(KCrash ${WITH_KF5Crash} "Crash dumps via KCrash")
|
||||
add_feature_info(KDBusAddons ${WITH_KF5DBus} "Unique-application via DBus")
|
||||
|
||||
### CMake infrastructure installation
|
||||
#
|
||||
#
|
||||
set( CMAKE_INSTALL_CMAKEDIR "${CMAKE_INSTALL_LIBDIR}/cmake/Calamares" CACHE PATH "Installation directory for CMake files" )
|
||||
set( CMAKE_INSTALL_FULL_CMAKEDIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_CMAKEDIR}" )
|
||||
|
||||
export( PACKAGE Calamares )
|
||||
configure_package_config_file(
|
||||
"CalamaresConfig.cmake.in"
|
||||
"${PROJECT_BINARY_DIR}/CalamaresConfig.cmake"
|
||||
INSTALL_DESTINATION "${CMAKE_INSTALL_CMAKEDIR}"
|
||||
PATH_VARS
|
||||
CMAKE_INSTALL_INCLUDEDIR
|
||||
CMAKE_INSTALL_LIBDIR
|
||||
CMAKE_INSTALL_DATADIR
|
||||
)
|
||||
write_basic_package_version_file(
|
||||
${PROJECT_BINARY_DIR}/CalamaresConfigVersion.cmake
|
||||
VERSION ${PROJECT_VERSION}
|
||||
COMPATIBILITY SameMajorVersion
|
||||
)
|
||||
install(
|
||||
EXPORT Calamares
|
||||
DESTINATION "${CMAKE_INSTALL_CMAKEDIR}"
|
||||
FILE "CalamaresTargets.cmake"
|
||||
NAMESPACE Calamares::
|
||||
)
|
||||
|
||||
# Install the cmake files
|
||||
install(
|
||||
FILES
|
||||
"${PROJECT_BINARY_DIR}/CalamaresConfig.cmake"
|
||||
"${PROJECT_BINARY_DIR}/CalamaresConfigVersion.cmake"
|
||||
"CMakeModules/CalamaresAddBrandingSubdirectory.cmake"
|
||||
"CMakeModules/CalamaresAddLibrary.cmake"
|
||||
"CMakeModules/CalamaresAddModuleSubdirectory.cmake"
|
||||
"CMakeModules/CalamaresAddPlugin.cmake"
|
||||
"CMakeModules/CalamaresAddTest.cmake"
|
||||
"CMakeModules/CalamaresAddTranslations.cmake"
|
||||
"CMakeModules/CalamaresAutomoc.cmake"
|
||||
"CMakeModules/CMakeColors.cmake"
|
||||
"CMakeModules/FindYAMLCPP.cmake"
|
||||
DESTINATION
|
||||
"${CMAKE_INSTALL_CMAKEDIR}"
|
||||
)
|
||||
|
||||
### Miscellaneous installs
|
||||
#
|
||||
#
|
||||
if( INSTALL_CONFIG )
|
||||
install(
|
||||
FILES settings.conf
|
||||
DESTINATION share/calamares
|
||||
)
|
||||
endif()
|
||||
|
||||
if( INSTALL_POLKIT )
|
||||
install(
|
||||
FILES com.github.calamares.calamares.policy
|
||||
DESTINATION "${POLKITQT-1_POLICY_FILES_INSTALL_DIR}"
|
||||
)
|
||||
endif()
|
||||
|
||||
if ( INSTALL_COMPLETION )
|
||||
if( NOT CMAKE_INSTALL_BASHCOMPLETIONDIR )
|
||||
set( CMAKE_INSTALL_BASHCOMPLETIONDIR "${CMAKE_INSTALL_DATADIR}/bash-completion/completions" )
|
||||
endif()
|
||||
|
||||
install( FILES ${CMAKE_SOURCE_DIR}/data/completion/bash/calamares DESTINATION "${CMAKE_INSTALL_BASHCOMPLETIONDIR}" )
|
||||
endif()
|
||||
|
||||
install(
|
||||
FILES calamares.desktop
|
||||
DESTINATION ${CMAKE_INSTALL_DATADIR}/applications
|
||||
)
|
||||
|
||||
install(
|
||||
FILES man/calamares.8
|
||||
DESTINATION ${CMAKE_INSTALL_MANDIR}/man8/
|
||||
)
|
||||
|
||||
# uninstall target
|
||||
# make uninstall support
|
||||
configure_file(
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
|
||||
IMMEDIATE @ONLY
|
||||
)
|
||||
|
||||
add_custom_target( uninstall
|
||||
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake
|
||||
# Early configure these files as we need them later on
|
||||
configure_file( CalamaresUse.cmake.in "${PROJECT_BINARY_DIR}/CalamaresUse.cmake" @ONLY )
|
||||
file( COPY CalamaresAddLibrary.cmake DESTINATION "${PROJECT_BINARY_DIR}" )
|
||||
file( COPY CalamaresAddModuleSubdirectory.cmake DESTINATION "${PROJECT_BINARY_DIR}" )
|
||||
file( COPY CalamaresAddPlugin.cmake DESTINATION "${PROJECT_BINARY_DIR}" )
|
||||
file( COPY CalamaresAddBrandingSubdirectory.cmake DESTINATION "${PROJECT_BINARY_DIR}" )
|
||||
|
||||
set( CALAMARES_LIBRARIES calamares )
|
||||
|
||||
add_subdirectory( src )
|
||||
|
||||
macro_display_feature_log()
|
||||
|
||||
if ( NOT WITH_PYTHON )
|
||||
message( "-- WARNING: Building Calamares without Python support. Python modules will not work.\n" )
|
||||
endif()
|
||||
|
||||
# Add all targets to the build-tree export set
|
||||
set( CMAKE_INSTALL_CMAKEDIR "${CMAKE_INSTALL_LIBDIR}/cmake/Calamares" CACHE PATH "Installation directory for CMake files" )
|
||||
set( CMAKE_INSTALL_FULL_CMAKEDIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_CMAKEDIR}" )
|
||||
export( TARGETS calamares
|
||||
FILE "${PROJECT_BINARY_DIR}/CalamaresLibraryDepends.cmake" )
|
||||
|
||||
# Export the package for use from the build-tree
|
||||
# (this registers the build-tree with a global CMake-registry)
|
||||
export( PACKAGE Calamares )
|
||||
|
||||
# Create a CalamaresBuildTreeSettings.cmake file for the use from the build tree
|
||||
configure_file( CalamaresBuildTreeSettings.cmake.in "${PROJECT_BINARY_DIR}/CalamaresBuildTreeSettings.cmake" @ONLY )
|
||||
|
||||
# Create the CalamaresConfig.cmake and CalamaresConfigVersion files
|
||||
file( RELATIVE_PATH CONF_REL_INCLUDE_DIR "${CMAKE_INSTALL_FULL_CMAKEDIR}" "${CMAKE_INSTALL_FULL_INCLUDEDIR}" )
|
||||
|
||||
configure_file( CalamaresConfig.cmake.in "${PROJECT_BINARY_DIR}/CalamaresConfig.cmake" @ONLY )
|
||||
configure_file( CalamaresConfigVersion.cmake.in "${PROJECT_BINARY_DIR}/CalamaresConfigVersion.cmake" @ONLY )
|
||||
|
||||
# Install the cmake files
|
||||
install(
|
||||
FILES
|
||||
"${PROJECT_BINARY_DIR}/CalamaresConfig.cmake"
|
||||
"${PROJECT_BINARY_DIR}/CalamaresConfigVersion.cmake"
|
||||
"${PROJECT_BINARY_DIR}/CalamaresUse.cmake"
|
||||
"${PROJECT_BINARY_DIR}/CalamaresAddPlugin.cmake"
|
||||
"${PROJECT_BINARY_DIR}/CalamaresAddModuleSubdirectory.cmake"
|
||||
"${PROJECT_BINARY_DIR}/CalamaresAddLibrary.cmake"
|
||||
"${PROJECT_BINARY_DIR}/CalamaresAddBrandingSubdirectory.cmake"
|
||||
DESTINATION
|
||||
"${CMAKE_INSTALL_CMAKEDIR}"
|
||||
)
|
||||
|
||||
### CMAKE SUMMARY REPORT
|
||||
#
|
||||
get_directory_property( SKIPPED_MODULES
|
||||
DIRECTORY src/modules
|
||||
DEFINITION LIST_SKIPPED_MODULES
|
||||
# Install the export set for use with the install-tree
|
||||
install(
|
||||
EXPORT
|
||||
CalamaresLibraryDepends
|
||||
DESTINATION
|
||||
"${CMAKE_INSTALL_CMAKEDIR}"
|
||||
)
|
||||
calamares_explain_skipped_modules( ${SKIPPED_MODULES} )
|
||||
|
||||
feature_summary(
|
||||
WHAT DISABLED_FEATURES
|
||||
DESCRIPTION "The following features have been disabled:"
|
||||
QUIET_ON_EMPTY
|
||||
install(
|
||||
FILES
|
||||
settings.conf
|
||||
DESTINATION
|
||||
share/calamares
|
||||
)
|
||||
feature_summary(
|
||||
WHAT OPTIONAL_PACKAGES_NOT_FOUND
|
||||
DESCRIPTION "The following OPTIONAL packages were not found:"
|
||||
QUIET_ON_EMPTY
|
||||
|
||||
install(
|
||||
FILES
|
||||
com.github.calamares.calamares.policy
|
||||
DESTINATION
|
||||
"${POLKITQT-1_POLICY_FILES_INSTALL_DIR}"
|
||||
)
|
||||
feature_summary(
|
||||
WHAT REQUIRED_PACKAGES_NOT_FOUND
|
||||
FATAL_ON_MISSING_REQUIRED_PACKAGES
|
||||
DESCRIPTION "The following REQUIRED packages were not found:"
|
||||
QUIET_ON_EMPTY
|
||||
|
||||
install(
|
||||
FILES
|
||||
calamares.desktop
|
||||
DESTINATION
|
||||
${CMAKE_INSTALL_DATADIR}/applications
|
||||
)
|
||||
|
@@ -1,17 +1,3 @@
|
||||
# === This file is part of Calamares - <https://calamares.io> ===
|
||||
#
|
||||
# SPDX-FileCopyrightText: 2014 Aurélien Gâteau <agateau@kde.org>
|
||||
# SPDX-FileCopyrightText: 2017 Adriaan de Groot <groot@kde.org>
|
||||
# SPDX-FileCopyrightText: 2019 Kevin Kofler <kevin.kofler@chello.at>
|
||||
# SPDX-License-Identifier: BSD-2-Clause
|
||||
#
|
||||
###
|
||||
#
|
||||
# Handles the mess that Boost::Python is before CMake 3.16 and
|
||||
# Boost 1.70 or so.
|
||||
#
|
||||
###
|
||||
#
|
||||
# On Ubuntu 14.04, the libboost-python1.54-dev package comes with one library
|
||||
# for each Python version:
|
||||
# libboost_python-py27.so
|
||||
@@ -29,69 +15,43 @@
|
||||
# libboost_python-3.4.so
|
||||
# depending on what python's targets you selected during install
|
||||
#
|
||||
# On Fedora >= 30 instead, the boost-python3-devel provides boost library with a
|
||||
# name like:
|
||||
# libboost_python37.so
|
||||
# depending on what python's targets you selected during install
|
||||
#
|
||||
# find_boost_python3() tries to find the package with different component
|
||||
# names. By default it tries "python3", "python-py$suffix" and
|
||||
# "python-$dotsuffix", where suffix is based on the `python_version` argument.
|
||||
# One can supply a custom component name by setting the
|
||||
# `CALAMARES_BOOST_PYTHON3_COMPONENT` variable at CMake time.
|
||||
|
||||
set( CALAMARES_BOOST_PYTHON3_COMPONENT python3 CACHE STRING
|
||||
"Name of the Boost.Python component. If Boost.Python is installed as
|
||||
libboost_python-foo.so then this variable should be set to 'python-foo'."
|
||||
)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
macro( _find_boost_python3_int boost_version componentname found_var )
|
||||
foreach( _fbp_name ${CALAMARES_BOOST_PYTHON3_COMPONENT} ${componentname} )
|
||||
find_package( Boost ${boost_version} QUIET COMPONENTS ${_fbp_name} )
|
||||
string( TOUPPER ${_fbp_name} _fbp_uc_name )
|
||||
if( Boost_${_fbp_uc_name}_FOUND )
|
||||
if( CMAKE_SYSTEM_NAME MATCHES "FreeBSD" )
|
||||
# No upcasing
|
||||
set( ${found_var} ${_fbp_name} )
|
||||
else()
|
||||
set( ${found_var} ${_fbp_uc_name} )
|
||||
endif()
|
||||
break()
|
||||
endif()
|
||||
endforeach()
|
||||
endmacro()
|
||||
|
||||
macro( find_boost_python3 boost_version python_version found_var )
|
||||
set( ${found_var} OFF )
|
||||
set( _fbp_found OFF )
|
||||
|
||||
# turns "3.4.123abc" into "34"
|
||||
string( REGEX REPLACE "([0-9]+)\\.([0-9]+)\\..*" "\\1\\2" _fbp_python_short_version ${python_version} )
|
||||
_find_boost_python3_int( ${boost_version} python-py${_fbp_python_short_version} _fbp_found )
|
||||
|
||||
if (NOT _fbp_found)
|
||||
_find_boost_python3_int( ${boost_version} python${_fbp_python_short_version} _fbp_found )
|
||||
endif()
|
||||
foreach( _fbp_name ${CALAMARES_BOOST_PYTHON3_COMPONENT} python-py${_fbp_python_short_version} )
|
||||
find_package( Boost ${boost_version} QUIET COMPONENTS ${_fbp_name} )
|
||||
string( TOUPPER ${_fbp_name} _fbp_uc_name )
|
||||
if( Boost_${_fbp_uc_name}_FOUND )
|
||||
set( ${found_var} ON )
|
||||
break()
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
if (NOT _fbp_found)
|
||||
if (NOT ${found_var})
|
||||
# The following loop changes the searched name for Gentoo based distributions
|
||||
# turns "3.4.123abc" into "3.4"
|
||||
string( REGEX REPLACE "([0-9]+)\\.([0-9]+)\\..*" "\\1.\\2" _fbp_python_short_version ${python_version} )
|
||||
_find_boost_python3_int( ${boost_version} python-${_fbp_python_short_version} _fbp_found )
|
||||
foreach( _fbp_name ${CALAMARES_BOOST_PYTHON3_COMPONENT} python-${_fbp_python_short_version} )
|
||||
find_package( Boost ${boost_version} QUIET COMPONENTS ${_fbp_name} )
|
||||
string( TOUPPER ${_fbp_name} _fbp_uc_name )
|
||||
if( Boost_${_fbp_uc_name}_FOUND )
|
||||
set( ${found_var} ON )
|
||||
break()
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
set( ${found_var} ${_fbp_found} )
|
||||
|
||||
# This is superfluous, but allows proper reporting in the features list
|
||||
if ( _fbp_found )
|
||||
find_package( Boost ${boost_version} COMPONENTS ${_fbp_found} )
|
||||
else()
|
||||
find_package( Boost ${boost_version} COMPONENTS Python )
|
||||
endif()
|
||||
set_package_properties(
|
||||
Boost PROPERTIES
|
||||
DESCRIPTION "A C++ library which enables seamless interoperability between C++ and Python 3."
|
||||
URL "http://www.boost.org"
|
||||
)
|
||||
endmacro()
|
||||
|
@@ -1,27 +1,8 @@
|
||||
# === This file is part of Calamares - <https://calamares.io> ===
|
||||
#
|
||||
# SPDX-FileCopyrightText: 2014 Teo Mrnjavac <teo@kde.org>
|
||||
# SPDX-FileCopyrightText: 2014 Kevin Kofler <kevin.kofler@chello.at>
|
||||
# SPDX-FileCopyrightText: 2017 Adriaan de Groot <groot@kde.org>
|
||||
# SPDX-License-Identifier: BSD-2-Clause
|
||||
#
|
||||
###
|
||||
#
|
||||
# Defines a handful of strings that, with normal xterm handling,
|
||||
# will change colors in the output, so it's nicer to read.
|
||||
if(NOT WIN32)
|
||||
set(_use_color ON)
|
||||
if("0" STREQUAL "$ENV{CLICOLOR}")
|
||||
set(_use_color OFF)
|
||||
endif()
|
||||
if("0" STREQUAL "$ENV{CLICOLOR_FORCE}")
|
||||
set(_use_color OFF)
|
||||
endif()
|
||||
if(NOT CMAKE_COLOR_MAKEFILE)
|
||||
set(_use_color OFF)
|
||||
endif()
|
||||
|
||||
if(_use_color)
|
||||
# [ -t 2 ] tests whether stderr is interactive.
|
||||
# The negation '!' is because for POSIX shells, 0 is true and 1 is false.
|
||||
execute_process(COMMAND test ! -t 2 RESULT_VARIABLE IS_STDERR_INTERACTIVE)
|
||||
if(IS_STDERR_INTERACTIVE)
|
||||
string(ASCII 27 Esc)
|
||||
set(ColorReset "${Esc}[m")
|
||||
set(ColorBold "${Esc}[1m")
|
||||
@@ -39,5 +20,5 @@ if(NOT WIN32)
|
||||
set(BoldMagenta "${Esc}[1;35m")
|
||||
set(BoldCyan "${Esc}[1;36m")
|
||||
set(BoldWhite "${Esc}[1;37m")
|
||||
endif()
|
||||
endif(IS_STDERR_INTERACTIVE)
|
||||
endif()
|
||||
|
@@ -1,11 +1,3 @@
|
||||
# === This file is part of Calamares - <https://calamares.io> ===
|
||||
#
|
||||
# SPDX-FileCopyrightText: 2014 Teo Mrnjavac <teo@kde.org>
|
||||
# SPDX-License-Identifier: BSD-2-Clause
|
||||
#
|
||||
###
|
||||
#
|
||||
# Find today's date, for versioning purposes.
|
||||
find_program(DATE_EXECUTABLE NAMES date)
|
||||
mark_as_advanced(DATE_EXECUTABLE)
|
||||
|
||||
|
@@ -1,10 +1,3 @@
|
||||
# === This file is part of Calamares - <https://calamares.io> ===
|
||||
#
|
||||
# SPDX-FileCopyrightText: 2014 Teo Mrnjavac <teo@kde.org>
|
||||
# SPDX-License-Identifier: BSD-2-Clause
|
||||
#
|
||||
###
|
||||
#
|
||||
# Try to identify the current development source version.
|
||||
set(CMAKE_VERSION_SOURCE "")
|
||||
if(EXISTS ${CMAKE_SOURCE_DIR}/.git/HEAD)
|
||||
|
@@ -1,147 +0,0 @@
|
||||
# === This file is part of Calamares - <https://calamares.io> ===
|
||||
#
|
||||
# SPDX-FileCopyrightText: 2014 Teo Mrnjavac <teo@kde.org>
|
||||
# SPDX-FileCopyrightText: 2017 Adriaan de Groot <groot@kde.org>
|
||||
# SPDX-License-Identifier: BSD-2-Clause
|
||||
#
|
||||
# Calamares is Free Software: see the License-Identifier above.
|
||||
#
|
||||
#
|
||||
###
|
||||
#
|
||||
# Support macros for creating Calamares branding components.
|
||||
#
|
||||
# Calamares branding components have two parts:
|
||||
# - a branding.desc file that tells Calamares how to describe the product
|
||||
# (e.g. strings like "Generic GNU/Linux") and the name of a QML file
|
||||
# (the "slideshow") that is displayed during installation.
|
||||
# - the QML files themselves, plus supporting images etc.
|
||||
#
|
||||
# Branding components can be created inside the Calamares source tree
|
||||
# (there is one example the `default/` branding, which is also connected
|
||||
# to the default configuration shipped with Calamares), but they can be
|
||||
# built outside of, and largely independently of, Calamares by using
|
||||
# these CMake macros.
|
||||
#
|
||||
# See the calamares-examples repository for more examples.
|
||||
#
|
||||
include( CMakeParseArguments)
|
||||
|
||||
include( CMakeColors )
|
||||
|
||||
# Usage calamares_add_branding( <name> [DIRECTORY <dir>] [SUBDIRECTORIES <dir> ...])
|
||||
#
|
||||
# Adds a branding component to the build:
|
||||
# - the component's top-level files are copied into the build-dir;
|
||||
# CMakeLists.txt is excluded from the glob.
|
||||
# - the component's top-level files are installed into the component branding dir
|
||||
#
|
||||
# The branding component lives in <dir> if given, otherwise the
|
||||
# current source directory. The branding component is installed
|
||||
# with the given <name>, which is usually the name of the
|
||||
# directory containing the component, and which must match the
|
||||
# *componentName* in `branding.desc`.
|
||||
#
|
||||
# If SUBDIRECTORIES are given, then those are copied (each one level deep)
|
||||
# to the installation location as well, preserving the subdirectory name.
|
||||
function( calamares_add_branding NAME )
|
||||
cmake_parse_arguments( _CABT "" "DIRECTORY" "SUBDIRECTORIES" ${ARGN} )
|
||||
if (NOT _CABT_DIRECTORY)
|
||||
set(_CABT_DIRECTORY ".")
|
||||
endif()
|
||||
|
||||
set( SUBDIRECTORY ${_CABT_DIRECTORY} )
|
||||
set( _brand_dir ${_CABT_DIRECTORY} )
|
||||
|
||||
set( BRANDING_DIR share/calamares/branding )
|
||||
set( BRANDING_COMPONENT_DESTINATION ${BRANDING_DIR}/${NAME} )
|
||||
|
||||
foreach( _subdir "" ${_CABT_SUBDIRECTORIES} )
|
||||
file( GLOB BRANDING_COMPONENT_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}/${_brand_dir} "${_brand_dir}/${_subdir}/*" )
|
||||
foreach( BRANDING_COMPONENT_FILE ${BRANDING_COMPONENT_FILES} )
|
||||
set( _subpath ${_brand_dir}/${BRANDING_COMPONENT_FILE} )
|
||||
if( NOT IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/${_subpath} )
|
||||
set( _src ${CMAKE_CURRENT_SOURCE_DIR}/${_subpath} )
|
||||
set( _dst ${CMAKE_CURRENT_BINARY_DIR}/${_subpath} )
|
||||
if( ${_src} IS_NEWER_THAN ${_dst} )
|
||||
configure_file( ${_src} ${_dst} COPYONLY )
|
||||
endif()
|
||||
|
||||
install( FILES ${CMAKE_CURRENT_BINARY_DIR}/${_subpath}
|
||||
DESTINATION ${BRANDING_COMPONENT_DESTINATION}/${_subdir}/ )
|
||||
endif()
|
||||
endforeach()
|
||||
endforeach()
|
||||
|
||||
message( "-- ${BoldYellow}Found ${CALAMARES_APPLICATION_NAME} branding component: ${BoldRed}${NAME}${ColorReset}" )
|
||||
message( " ${Green}TYPE:${ColorReset} branding component" )
|
||||
message( " ${Green}BRANDING_COMPONENT_DESTINATION:${ColorReset} ${BRANDING_COMPONENT_DESTINATION}" )
|
||||
endfunction()
|
||||
|
||||
# Usage calamares_add_branding_translations( <name> [DIRECTORY <dir>])
|
||||
#
|
||||
# Adds the translations for a branding component to the build:
|
||||
# - the component's lang/ directory is scanned for .ts files
|
||||
# - the component's translations are installed into the component branding dir
|
||||
#
|
||||
# Translation files must be called calamares-<name>_<lang>.ts . Optionally
|
||||
# the lang/ dir is found in the given <dir> instead of the current source
|
||||
# directory.
|
||||
function( calamares_add_branding_translations NAME )
|
||||
cmake_parse_arguments( _CABT "" "DIRECTORY" "" ${ARGN} )
|
||||
if (NOT _CABT_DIRECTORY)
|
||||
set(_CABT_DIRECTORY ".")
|
||||
endif()
|
||||
|
||||
set( SUBDIRECTORY ${_CABT_DIRECTORY} )
|
||||
set( _brand_dir ${_CABT_DIRECTORY} )
|
||||
|
||||
set( BRANDING_DIR share/calamares/branding )
|
||||
set( BRANDING_COMPONENT_DESTINATION ${BRANDING_DIR}/${NAME} )
|
||||
|
||||
file( GLOB BRANDING_TRANSLATION_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "${SUBDIRECTORY}/lang/calamares-${NAME}_*.ts" )
|
||||
if ( BRANDING_TRANSLATION_FILES )
|
||||
qt5_add_translation( QM_FILES ${BRANDING_TRANSLATION_FILES} )
|
||||
add_custom_target( branding-translation-${NAME} ALL DEPENDS ${QM_FILES}
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/${SUBDIRECTORY}/lang/
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${QM_FILES} ${CMAKE_CURRENT_BINARY_DIR}/${SUBDIRECTORY}/lang/
|
||||
)
|
||||
install( FILES ${QM_FILES} DESTINATION ${BRANDING_COMPONENT_DESTINATION}/lang/ )
|
||||
list( LENGTH BRANDING_TRANSLATION_FILES _branding_count )
|
||||
message( " ${Green}BRANDING_TRANSLATIONS:${ColorReset} ${_branding_count} language(s)" )
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
# Usage calamares_add_branding_subdirectory( <dir> [NAME <name>] [SUBDIRECTORIES <dir> ...])
|
||||
#
|
||||
# Adds a branding component from a subdirectory:
|
||||
# - if there is a CMakeLists.txt, use that (that CMakeLists.txt should
|
||||
# call suitable calamares_add_branding() and other macros to install
|
||||
# the branding component).
|
||||
# - otherwise assume a "standard" setup with top-level files and a lang/
|
||||
# subdirectory for translations.
|
||||
#
|
||||
# If NAME is given, this is used instead of <dir> as the name of
|
||||
# the branding component. This is needed if <dir> is more than
|
||||
# one level deep, or to rename a component as it gets installed.
|
||||
#
|
||||
# If SUBDIRECTORIES are given, they are relative to <dir>, and are
|
||||
# copied (one level deep) to the install location as well.
|
||||
function( calamares_add_branding_subdirectory SUBDIRECTORY )
|
||||
cmake_parse_arguments( _CABS "" "NAME" "SUBDIRECTORIES" ${ARGN} )
|
||||
if (NOT _CABS_NAME)
|
||||
set(_CABS_NAME "${SUBDIRECTORY}")
|
||||
endif()
|
||||
|
||||
if( EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${SUBDIRECTORY}/CMakeLists.txt" )
|
||||
add_subdirectory( ${SUBDIRECTORY} )
|
||||
elseif( EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${SUBDIRECTORY}/branding.desc" )
|
||||
calamares_add_branding( ${_CABS_NAME} DIRECTORY ${SUBDIRECTORY} SUBDIRECTORIES ${_CABS_SUBDIRECTORIES} )
|
||||
if( IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/${SUBDIRECTORY}/lang" )
|
||||
calamares_add_branding_translations( ${_CABS_NAME} DIRECTORY ${SUBDIRECTORY} )
|
||||
endif()
|
||||
else()
|
||||
message( "-- ${BoldYellow}Warning:${ColorReset} tried to add branding component subdirectory ${BoldRed}${SUBDIRECTORY}${ColorReset} which has no branding.desc." )
|
||||
endif()
|
||||
message( "" )
|
||||
endfunction()
|
@@ -1,205 +0,0 @@
|
||||
# === This file is part of Calamares - <https://calamares.io> ===
|
||||
#
|
||||
# SPDX-FileCopyrightText: 2014 Teo Mrnjavac <teo@kde.org>
|
||||
# SPDX-FileCopyrightText: 2017 Adriaan de Groot <groot@kde.org>
|
||||
# SPDX-License-Identifier: BSD-2-Clause
|
||||
#
|
||||
# Calamares is Free Software: see the License-Identifier above.
|
||||
#
|
||||
#
|
||||
###
|
||||
#
|
||||
# Function and support code for adding a Calamares module (either a Qt / C++ plugin,
|
||||
# or a Python module, or whatever) to the build.
|
||||
#
|
||||
include( CalamaresAddTranslations )
|
||||
|
||||
set( MODULE_DATA_DESTINATION share/calamares/modules )
|
||||
|
||||
# Convenience function to indicate that a module has been skipped
|
||||
# (optionally also why). Call this in the module's CMakeLists.txt
|
||||
macro( calamares_skip_module )
|
||||
set( SKIPPED_MODULES ${SKIPPED_MODULES} ${ARGV} PARENT_SCOPE )
|
||||
endmacro()
|
||||
|
||||
function( calamares_explain_skipped_modules )
|
||||
if ( ARGN )
|
||||
message( "${ColorReset}-- Skipped modules:" )
|
||||
foreach( SUBDIRECTORY ${ARGN} )
|
||||
message( "${ColorReset}-- Skipped ${BoldRed}${SUBDIRECTORY}${ColorReset}." )
|
||||
endforeach()
|
||||
message( "" )
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
function( calamares_add_module_subdirectory )
|
||||
set( SUBDIRECTORY ${ARGV0} )
|
||||
|
||||
set( SKIPPED_MODULES )
|
||||
set( MODULE_CONFIG_FILES "" )
|
||||
|
||||
set( _mod_dir "${CMAKE_CURRENT_SOURCE_DIR}/${SUBDIRECTORY}" )
|
||||
# If this subdirectory has a CMakeLists.txt, we add_subdirectory it...
|
||||
if( EXISTS "${_mod_dir}/CMakeLists.txt" )
|
||||
add_subdirectory( ${SUBDIRECTORY} )
|
||||
file( GLOB MODULE_CONFIG_FILES RELATIVE ${_mod_dir} "${SUBDIRECTORY}/*.conf" )
|
||||
# Module has indicated it should be skipped, show that in
|
||||
# the calling CMakeLists (which is src/modules/CMakeLists.txt normally).
|
||||
if ( SKIPPED_MODULES )
|
||||
set( SKIPPED_MODULES ${SKIPPED_MODULES} PARENT_SCOPE )
|
||||
set( MODULE_CONFIG_FILES "" )
|
||||
endif()
|
||||
# ...otherwise, we look for a module.desc.
|
||||
elseif( EXISTS "${_mod_dir}/module.desc" )
|
||||
set( MODULES_DIR ${CMAKE_INSTALL_LIBDIR}/calamares/modules )
|
||||
# The module subdirectory may be given as a/b/c, but the module
|
||||
# needs to be installed as "c", so we split off any intermediate
|
||||
# directories.
|
||||
get_filename_component(_dirname "${SUBDIRECTORY}" DIRECTORY)
|
||||
if( _dirname )
|
||||
# Remove the dirname and any leftover leading /s
|
||||
string( REGEX REPLACE "^${_dirname}/*" "" _modulename "${SUBDIRECTORY}" )
|
||||
set( MODULE_DESTINATION ${MODULES_DIR}/${_modulename} )
|
||||
else()
|
||||
set( MODULE_DESTINATION ${MODULES_DIR}/${SUBDIRECTORY} )
|
||||
endif()
|
||||
|
||||
# Read module.desc, check that the interface type is supported.
|
||||
#
|
||||
# _mod_enabled boolean if the module should be built (only if the interface is supported)
|
||||
# _mod_reason is a human-readable explanation why it isn't built
|
||||
# _mod_testing boolean if the module should be added to the loadmodule tests
|
||||
file(STRINGS "${_mod_dir}/module.desc" MODULE_INTERFACE REGEX "^interface")
|
||||
if ( MODULE_INTERFACE MATCHES "pythonqt" )
|
||||
set( _mod_enabled ${Calamares_WITH_PYTHONQT} )
|
||||
set( _mod_reason "No PythonQt support" )
|
||||
set( _mod_testing OFF )
|
||||
elseif ( MODULE_INTERFACE MATCHES "python" )
|
||||
set( _mod_enabled ${Calamares_WITH_PYTHON} )
|
||||
set( _mod_reason "No Python support" )
|
||||
set( _mod_testing ON ) # Will check syntax and imports, at least
|
||||
elseif ( MODULE_INTERFACE MATCHES "qtplugin" )
|
||||
set( _mod_enabled OFF )
|
||||
set( _mod_reason "C++ modules must have a CMakeLists.txt instead" )
|
||||
set( _mod_testing OFF )
|
||||
elseif ( MODULE_INTERFACE MATCHES "process" )
|
||||
set( _mod_enabled ON )
|
||||
set( _mod_reason "" )
|
||||
set( _mod_testing OFF )
|
||||
else()
|
||||
set( _mod_enabled OFF )
|
||||
set( _mod_reason "Unknown module interface '${MODULE_INTERFACE}'" )
|
||||
set( _mod_testing OFF )
|
||||
endif()
|
||||
|
||||
if ( _mod_enabled )
|
||||
# We glob all the files inside the subdirectory, and we make sure they are
|
||||
# synced with the bindir structure and installed.
|
||||
file( GLOB MODULE_FILES RELATIVE ${_mod_dir} "${SUBDIRECTORY}/*" )
|
||||
foreach( MODULE_FILE ${MODULE_FILES} )
|
||||
if( NOT IS_DIRECTORY ${_mod_dir}/${MODULE_FILE} )
|
||||
configure_file( ${SUBDIRECTORY}/${MODULE_FILE} ${SUBDIRECTORY}/${MODULE_FILE} COPYONLY )
|
||||
|
||||
get_filename_component( FLEXT ${MODULE_FILE} EXT )
|
||||
if( "${FLEXT}" STREQUAL ".conf" )
|
||||
if( INSTALL_CONFIG )
|
||||
install( FILES ${CMAKE_CURRENT_BINARY_DIR}/${SUBDIRECTORY}/${MODULE_FILE}
|
||||
DESTINATION ${MODULE_DATA_DESTINATION} )
|
||||
endif()
|
||||
list( APPEND MODULE_CONFIG_FILES ${MODULE_FILE} )
|
||||
else()
|
||||
install( FILES ${CMAKE_CURRENT_BINARY_DIR}/${SUBDIRECTORY}/${MODULE_FILE}
|
||||
DESTINATION ${MODULE_DESTINATION} )
|
||||
endif()
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
message( "-- ${BoldYellow}Found ${CALAMARES_APPLICATION_NAME} module: ${BoldRed}${SUBDIRECTORY}${ColorReset}" )
|
||||
message( " ${Green}TYPE:${ColorReset} jobmodule" )
|
||||
message( " ${Green}MODULE_DESTINATION:${ColorReset} ${MODULE_DESTINATION}" )
|
||||
if( MODULE_CONFIG_FILES )
|
||||
if ( INSTALL_CONFIG )
|
||||
set( _destination "${MODULE_DATA_DESTINATION}" )
|
||||
else()
|
||||
set( _destination "[Build directory only]" )
|
||||
endif()
|
||||
message( " ${Green}CONFIGURATION_FILES:${ColorReset} ${MODULE_CONFIG_FILES} => ${_destination}" )
|
||||
endif()
|
||||
message( "" )
|
||||
# We copy over the lang directory, if any
|
||||
if( IS_DIRECTORY "${_mod_dir}/lang" )
|
||||
install_calamares_gettext_translations(
|
||||
${SUBDIRECTORY}
|
||||
SOURCE_DIR "${_mod_dir}/lang"
|
||||
FILENAME ${SUBDIRECTORY}.mo
|
||||
RENAME calamares-${SUBDIRECTORY}.mo
|
||||
)
|
||||
endif()
|
||||
else()
|
||||
# Module disabled due to missing dependencies / unsupported interface
|
||||
set( SKIPPED_MODULES "${SUBDIRECTORY} (${_mod_reason})" PARENT_SCOPE )
|
||||
endif()
|
||||
else()
|
||||
message( "-- ${BoldYellow}Warning:${ColorReset} tried to add module subdirectory ${BoldRed}${SUBDIRECTORY}${ColorReset} which has no CMakeLists.txt or module.desc." )
|
||||
message( "" )
|
||||
endif()
|
||||
|
||||
# Check any config files for basic correctness
|
||||
if ( BUILD_TESTING AND MODULE_CONFIG_FILES )
|
||||
set( _count 0 )
|
||||
foreach( _config_file ${MODULE_CONFIG_FILES} )
|
||||
set( _count_str "-${_count}" )
|
||||
if ( _count EQUAL 0 )
|
||||
set( _count_str "" )
|
||||
endif()
|
||||
add_test(
|
||||
NAME config-${SUBDIRECTORY}${_count_str}
|
||||
COMMAND test_conf ${CMAKE_CURRENT_BINARY_DIR}/${SUBDIRECTORY}/${_config_file} )
|
||||
math( EXPR _count "${_count} + 1" )
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
# Check that the module can be loaded. Since this calls exec(), the module
|
||||
# may try to do things to the running system. Needs work to make that a
|
||||
# safe thing to do.
|
||||
#
|
||||
# If the module has a tests/ subdirectory with *.global and *.job
|
||||
# files (YAML files holding global and job-configurations for
|
||||
# testing purposes) then those files are used to drive additional
|
||||
# tests. The files must be numbered (starting from 1) for this to work;
|
||||
# 1.global and 1.job together make the configuration for test 1.
|
||||
#
|
||||
# If the module has a tests/CMakeLists.txt while it doesn't have its
|
||||
# own CMakeLists.txt (e.g. a Python module), then the subdirectory
|
||||
# for tests/ is added on its own.
|
||||
#
|
||||
if ( BUILD_TESTING AND _mod_enabled AND _mod_testing )
|
||||
add_test(
|
||||
NAME load-${SUBDIRECTORY}
|
||||
COMMAND loadmodule ${SUBDIRECTORY}
|
||||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
|
||||
)
|
||||
# Try it with the tests/ configurations shipped with the module
|
||||
set( _count 1 )
|
||||
set( _testdir ${_mod_dir}/tests )
|
||||
while ( EXISTS "${_testdir}/${_count}.global" OR EXISTS "${_testdir}/${_count}.job" )
|
||||
set( _dash_g "" )
|
||||
set( _dash_j "" )
|
||||
if ( EXISTS "${_testdir}/${_count}.global" )
|
||||
set( _dash_g -g ${_testdir}/${_count}.global )
|
||||
endif()
|
||||
if ( EXISTS "${_testdir}/${_count}.job" )
|
||||
set( _dash_j -j ${_testdir}/${_count}.job )
|
||||
endif()
|
||||
add_test(
|
||||
NAME load-${SUBDIRECTORY}-${_count}
|
||||
COMMAND loadmodule ${_dash_g} ${_dash_j} ${SUBDIRECTORY}
|
||||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
|
||||
)
|
||||
math( EXPR _count "${_count} + 1" )
|
||||
endwhile()
|
||||
if ( EXISTS ${_testdir}/CMakeTests.txt AND NOT EXISTS ${_mod_dir}/CMakeLists.txt )
|
||||
include( ${_testdir}/CMakeTests.txt )
|
||||
endif()
|
||||
endif()
|
||||
endfunction()
|
@@ -1,206 +0,0 @@
|
||||
# === This file is part of Calamares - <https://calamares.io> ===
|
||||
#
|
||||
# SPDX-FileCopyrightText: 2014 Teo Mrnjavac <teo@kde.org>
|
||||
# SPDX-FileCopyrightText: 2019 Adriaan de Groot <groot@kde.org>
|
||||
# SPDX-License-Identifier: BSD-2-Clause
|
||||
#
|
||||
# Calamares is Free Software: see the License-Identifier above.
|
||||
#
|
||||
#
|
||||
###
|
||||
#
|
||||
# Convenience function for creating a C++ (qtplugin) module for Calamares.
|
||||
# This function provides cmake-time feedback about the plugin, adds
|
||||
# targets for compilation and boilerplate information, and creates
|
||||
# a module.desc with standard values (if the module.desc file exists,
|
||||
# that one is used instead, which happens only for unusual plugins).
|
||||
#
|
||||
# Usage:
|
||||
#
|
||||
# calamares_add_plugin(
|
||||
# module-name
|
||||
# TYPE <view|job>
|
||||
# EXPORT_MACRO macro-name
|
||||
# SOURCES source-file...
|
||||
# UI ui-file...
|
||||
# LINK_LIBRARIES lib...
|
||||
# LINK_PRIVATE_LIBRARIES lib...
|
||||
# [COMPILE_DEFINITIONS def...]
|
||||
# [RESOURCES resource-file]
|
||||
# [REQUIRES module-name...]
|
||||
# [NO_INSTALL]
|
||||
# [NO_CONFIG]
|
||||
# [SHARED_LIB]
|
||||
# [EMERGENCY]
|
||||
# [WEIGHT w]
|
||||
# )
|
||||
#
|
||||
# Function parameters:
|
||||
# - COMPILE_DEFINITIONS
|
||||
# Definitions are set on the resulting module with a suitable
|
||||
# flag (i.e. `-D`) so only state the name (optionally, also the value)
|
||||
# without a `-D` prefixed to it.
|
||||
# - RESOURCES
|
||||
# One (single!) filename for the RCC file for the plugin.
|
||||
# - REQUIRES
|
||||
# One or more names of modules which are added to the *requiredModules*
|
||||
# key in the descriptor. See *Module Requirements* in the module
|
||||
# documentation.
|
||||
# - NO_INSTALL
|
||||
# If this is set, the module is not installed by default; use this to
|
||||
# build testing modules or unit-testing modules.
|
||||
# - SHARED_LIB
|
||||
# In unusual circumstances, this function is used to add a library
|
||||
# rather than a normal Calamares module / plugin.
|
||||
# - EMERGENCY
|
||||
# If this is set, the module is marked as an *emergency* module in the
|
||||
# descriptor. See *Emergency Modules* in the module documentation.
|
||||
# - WEIGHT
|
||||
# If this is set, writes an explicit weight into the module.desc;
|
||||
# module weights are used in progress reporting.
|
||||
#
|
||||
|
||||
include( CMakeParseArguments )
|
||||
include( CalamaresAddLibrary )
|
||||
include( CMakeColors )
|
||||
|
||||
function( calamares_add_plugin )
|
||||
# parse arguments ( name needs to be saved before passing ARGN into the macro )
|
||||
set( NAME ${ARGV0} )
|
||||
set( options NO_CONFIG NO_INSTALL SHARED_LIB EMERGENCY )
|
||||
set( oneValueArgs NAME TYPE EXPORT_MACRO RESOURCES WEIGHT )
|
||||
set( multiValueArgs SOURCES UI LINK_LIBRARIES LINK_PRIVATE_LIBRARIES COMPILE_DEFINITIONS REQUIRES )
|
||||
cmake_parse_arguments( PLUGIN "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN} )
|
||||
set( PLUGIN_NAME ${NAME} )
|
||||
set( PLUGIN_DESTINATION ${CMAKE_INSTALL_LIBDIR}/calamares/modules/${PLUGIN_NAME} )
|
||||
set( PLUGIN_DESC_FILE module.desc )
|
||||
file( GLOB PLUGIN_CONFIG_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*.conf" )
|
||||
set( PLUGIN_DATA_DESTINATION share/calamares/modules )
|
||||
set( CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}" )
|
||||
set( CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}" )
|
||||
set( CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}" )
|
||||
|
||||
message( "-- ${BoldYellow}Found ${CALAMARES_APPLICATION_NAME} module: ${BoldRed}${PLUGIN_NAME}${ColorReset}" )
|
||||
message( " ${Green}TYPE:${ColorReset} ${PLUGIN_TYPE}" )
|
||||
message( " ${Green}LINK_LIBRARIES:${ColorReset} ${PLUGIN_LINK_LIBRARIES}" )
|
||||
message( " ${Green}LINK_PRIVATE_LIBRARIES:${ColorReset} ${PLUGIN_LINK_PRIVATE_LIBRARIES}" )
|
||||
message( " ${Green}PLUGIN_DESTINATION:${ColorReset} ${PLUGIN_DESTINATION}" )
|
||||
if( PLUGIN_CONFIG_FILES )
|
||||
if( PLUGIN_NO_CONFIG )
|
||||
message( FATAL_ERROR "${Red}NO_CONFIG${ColorReset} is set, with configuration ${Red}${PLUGIN_CONFIG_FILES}${ColorReset}" )
|
||||
endif()
|
||||
set( _destination "(unknown)" )
|
||||
if ( INSTALL_CONFIG AND NOT PLUGIN_NO_INSTALL )
|
||||
set( _destination "${PLUGIN_DATA_DESTINATION}" )
|
||||
elseif( NOT PLUGIN_NO_INSTALL )
|
||||
# Not INSTALL_CONFIG
|
||||
set( _destination "[Build directory only]" )
|
||||
else()
|
||||
set( _destination "[Skipping installation]" )
|
||||
endif()
|
||||
message( " ${Green}CONFIGURATION_FILES:${ColorReset} ${PLUGIN_CONFIG_FILES} => ${_destination}" )
|
||||
else()
|
||||
if( NOT PLUGIN_NO_CONFIG )
|
||||
message( " ${Red}NO_CONFIG${ColorReset} should be set." )
|
||||
endif()
|
||||
endif()
|
||||
if( PLUGIN_RESOURCES )
|
||||
message( " ${Green}RESOURCES:${ColorReset} ${PLUGIN_RESOURCES}" )
|
||||
endif()
|
||||
message( "" )
|
||||
|
||||
# create target name once for convenience
|
||||
set( target "calamares_${PLUGIN_TYPE}_${PLUGIN_NAME}" )
|
||||
|
||||
# determine target type
|
||||
if( NOT ${PLUGIN_SHARED_LIB} )
|
||||
set( target_type "MODULE" )
|
||||
else()
|
||||
set( target_type "SHARED" )
|
||||
endif()
|
||||
|
||||
set( calamares_add_library_args
|
||||
"${target}"
|
||||
"EXPORT_MACRO" "${PLUGIN_EXPORT_MACRO}"
|
||||
"TARGET_TYPE" "${target_type}"
|
||||
"SOURCES" "${PLUGIN_SOURCES}"
|
||||
)
|
||||
|
||||
if( PLUGIN_UI )
|
||||
list( APPEND calamares_add_library_args "UI" "${PLUGIN_UI}" )
|
||||
endif()
|
||||
|
||||
if( PLUGIN_LINK_LIBRARIES )
|
||||
list( APPEND calamares_add_library_args "LINK_LIBRARIES" "${PLUGIN_LINK_LIBRARIES}" )
|
||||
endif()
|
||||
|
||||
if( PLUGIN_LINK_PRIVATE_LIBRARIES )
|
||||
list( APPEND calamares_add_library_args "LINK_PRIVATE_LIBRARIES" "${PLUGIN_LINK_PRIVATE_LIBRARIES}" )
|
||||
endif()
|
||||
|
||||
if( PLUGIN_COMPILE_DEFINITIONS )
|
||||
list( APPEND calamares_add_library_args "COMPILE_DEFINITIONS" ${PLUGIN_COMPILE_DEFINITIONS} )
|
||||
endif()
|
||||
|
||||
if ( PLUGIN_NO_INSTALL )
|
||||
list( APPEND calamares_add_library_args "NO_INSTALL" )
|
||||
endif()
|
||||
|
||||
list( APPEND calamares_add_library_args
|
||||
"NO_VERSION"
|
||||
"INSTALL_BINDIR" "${PLUGIN_DESTINATION}"
|
||||
)
|
||||
|
||||
if( PLUGIN_RESOURCES )
|
||||
list( APPEND calamares_add_library_args "RESOURCES" "${PLUGIN_RESOURCES}" )
|
||||
endif()
|
||||
|
||||
calamares_add_library( ${calamares_add_library_args} )
|
||||
|
||||
if ( EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${PLUGIN_DESC_FILE} )
|
||||
configure_file( ${PLUGIN_DESC_FILE} ${PLUGIN_DESC_FILE} COPYONLY )
|
||||
else()
|
||||
set( _file ${CMAKE_CURRENT_BINARY_DIR}/${PLUGIN_DESC_FILE} )
|
||||
set( _type ${PLUGIN_TYPE} )
|
||||
file( WRITE ${_file} "# AUTO-GENERATED metadata file\n# Syntax is YAML 1.2\n---\n" )
|
||||
file( APPEND ${_file} "type: \"${_type}\"\nname: \"${PLUGIN_NAME}\"\ninterface: \"qtplugin\"\nload: \"lib${target}.so\"\n" )
|
||||
if ( PLUGIN_REQUIRES )
|
||||
file( APPEND ${_file} "requiredModules:\n" )
|
||||
foreach( _r ${PLUGIN_REQUIRES} )
|
||||
file( APPEND ${_file} " - ${_r}\n" )
|
||||
endforeach()
|
||||
endif()
|
||||
if ( PLUGIN_EMERGENCY )
|
||||
file( APPEND ${_file} "emergency: true\n" )
|
||||
endif()
|
||||
if ( PLUGIN_NO_CONFIG )
|
||||
file( APPEND ${_file} "noconfig: true\n" )
|
||||
endif()
|
||||
if ( PLUGIN_WEIGHT )
|
||||
file( APPEND ${_file} "weight: ${PLUGIN_WEIGHT}\n" )
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if ( NOT PLUGIN_NO_INSTALL )
|
||||
install( FILES ${CMAKE_CURRENT_BINARY_DIR}/${PLUGIN_DESC_FILE}
|
||||
DESTINATION ${PLUGIN_DESTINATION} )
|
||||
|
||||
set( _warned_config OFF )
|
||||
foreach( PLUGIN_CONFIG_FILE ${PLUGIN_CONFIG_FILES} )
|
||||
if( ${CMAKE_CURRENT_SOURCE_DIR}/${PLUGIN_CONFIG_FILE} IS_NEWER_THAN ${CMAKE_CURRENT_BINARY_DIR}/${PLUGIN_CONFIG_FILE} OR INSTALL_CONFIG )
|
||||
configure_file( ${PLUGIN_CONFIG_FILE} ${PLUGIN_CONFIG_FILE} COPYONLY )
|
||||
else()
|
||||
message( " ${BoldYellow}Not updating${ColorReset} ${PLUGIN_CONFIG_FILE}" )
|
||||
set( _warned_config ON )
|
||||
endif()
|
||||
if ( INSTALL_CONFIG )
|
||||
install(
|
||||
FILES ${CMAKE_CURRENT_BINARY_DIR}/${PLUGIN_CONFIG_FILE}
|
||||
DESTINATION ${PLUGIN_DATA_DESTINATION} )
|
||||
endif()
|
||||
endforeach()
|
||||
if ( _warned_config )
|
||||
message( "" )
|
||||
endif()
|
||||
endif()
|
||||
endfunction()
|
@@ -1,55 +0,0 @@
|
||||
# === This file is part of Calamares - <https://calamares.io> ===
|
||||
#
|
||||
# SPDX-FileCopyrightText: 2020 Adriaan de Groot <groot@kde.org>
|
||||
# SPDX-License-Identifier: BSD-2-Clause
|
||||
#
|
||||
# Calamares is Free Software: see the License-Identifier above.
|
||||
#
|
||||
#
|
||||
###
|
||||
#
|
||||
# Support functions for building Calamares tests.
|
||||
# This extends KDE's ECM tests with some custom patterns.
|
||||
#
|
||||
# calamares_add_test(
|
||||
# <NAME>
|
||||
# [GUI]
|
||||
# [RESOURCES FILE]
|
||||
# SOURCES <FILE..>
|
||||
# )
|
||||
|
||||
include( CMakeParseArguments )
|
||||
include( CalamaresAutomoc )
|
||||
|
||||
function( calamares_add_test )
|
||||
# parse arguments (name needs to be saved before passing ARGN into the macro)
|
||||
set( NAME ${ARGV0} )
|
||||
set( options GUI )
|
||||
set( oneValueArgs NAME RESOURCES )
|
||||
set( multiValueArgs SOURCES LIBRARIES DEFINITIONS )
|
||||
cmake_parse_arguments( TEST "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN} )
|
||||
set( TEST_NAME ${NAME} )
|
||||
|
||||
if( ECM_FOUND AND BUILD_TESTING )
|
||||
ecm_add_test(
|
||||
${TEST_SOURCES} ${TEST_RESOURCES}
|
||||
TEST_NAME
|
||||
${TEST_NAME}
|
||||
LINK_LIBRARIES
|
||||
calamares
|
||||
${TEST_LIBRARIES}
|
||||
Qt5::Core
|
||||
Qt5::Test
|
||||
)
|
||||
calamares_automoc( ${TEST_NAME} )
|
||||
# We specifically pass in the source directory of the test-being-
|
||||
# compiled, so that it can find test-files in that source dir.
|
||||
target_compile_definitions( ${TEST_NAME} PRIVATE -DBUILD_AS_TEST="${CMAKE_CURRENT_SOURCE_DIR}" ${TEST_DEFINITIONS} )
|
||||
if( TEST_GUI )
|
||||
target_link_libraries( ${TEST_NAME} calamaresui Qt5::Gui )
|
||||
endif()
|
||||
if( TEST_RESOURCES )
|
||||
calamares_autorcc( ${TEST_NAME} ${TEST_RESOURCES} )
|
||||
endif()
|
||||
endif()
|
||||
endfunction()
|
@@ -1,102 +0,0 @@
|
||||
# === This file is part of Calamares - <https://calamares.io> ===
|
||||
#
|
||||
# SPDX-FileCopyrightText: 2017 Adriaan de Groot <groot@kde.org>
|
||||
# SPDX-License-Identifier: BSD-2-Clause
|
||||
#
|
||||
# Calamares is Free Software: see the License-Identifier above.
|
||||
#
|
||||
#
|
||||
###
|
||||
#
|
||||
# This file has not yet been documented for use outside of Calamares itself.
|
||||
|
||||
include( CMakeParseArguments )
|
||||
|
||||
# The Gettext module is still old-fashioned, ALLCAPS variables
|
||||
find_package( Gettext )
|
||||
set_package_properties( GETTEXT PROPERTIES
|
||||
DESCRIPTION "GNU gettext (translation) tools."
|
||||
URL "https://www.gnu.org/software/gettext/"
|
||||
PURPOSE "Gettext is used in the translation of Python modules."
|
||||
TYPE REQUIRED
|
||||
)
|
||||
|
||||
# Installs a directory containing language-code-labeled subdirectories with
|
||||
# gettext data into the appropriate system directory. Allows renaming the
|
||||
# .mo files during install to avoid namespace clashes.
|
||||
#
|
||||
# install_calamares_gettext_translations(
|
||||
# NAME <name of module, for human use>
|
||||
# SOURCE_DIR path/to/lang
|
||||
# FILENAME <name of file.mo>
|
||||
# [RENAME <new-name of.mo>]
|
||||
# )
|
||||
#
|
||||
# For all of the (global) translation languages enabled for Calamares,
|
||||
# try installing $SOURCE_DIR/$lang/LC_MESSAGES/<filename>.mo into the
|
||||
# system gettext data directory (e.g. share/locale/), possibly renaming
|
||||
# filename.mo to renamed.mo in the process.
|
||||
function( install_calamares_gettext_translations )
|
||||
# parse arguments ( name needs to be saved before passing ARGN into the macro )
|
||||
set( NAME ${ARGV0} )
|
||||
set( oneValueArgs NAME SOURCE_DIR FILENAME RENAME )
|
||||
cmake_parse_arguments( TRANSLATION "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN} )
|
||||
|
||||
if( NOT TRANSLATION_NAME )
|
||||
set( TRANSLATION_NAME ${NAME} )
|
||||
endif()
|
||||
if( NOT TRANSLATION_FILENAME )
|
||||
set( TRANSLATION_FILENAME "${TRANSLATION_NAME}.mo" )
|
||||
endif()
|
||||
if( NOT TRANSLATION_RENAME )
|
||||
set( TRANSLATION_RENAME "${TRANSLATION_FILENAME}" )
|
||||
endif()
|
||||
string( REGEX REPLACE ".mo$" ".po" TRANSLATION_SOURCE_FILENAME "${TRANSLATION_FILENAME}" )
|
||||
|
||||
if ( GETTEXT_FOUND AND GETTEXT_MSGFMT_EXECUTABLE )
|
||||
message( STATUS "Installing gettext translations for ${TRANSLATION_NAME}")
|
||||
message( STATUS " Installing ${TRANSLATION_FILENAME} from ${TRANSLATION_SOURCE_DIR}")
|
||||
else()
|
||||
message( WARNING "Gettext translations requested for ${TRANSLATION_NAME}, but gettext was not found." )
|
||||
return()
|
||||
endif()
|
||||
|
||||
set( TARGET_NAME calamares-gettext-translations-${NAME} )
|
||||
if( NOT TARGET "${TARGET_NAME}" )
|
||||
add_custom_target( "${TARGET_NAME}" ALL )
|
||||
endif()
|
||||
|
||||
set( TRANSLATION_NAME "${NAME}" )
|
||||
foreach( lang ${CALAMARES_TRANSLATION_LANGUAGES} ) # Global
|
||||
string( MAKE_C_IDENTIFIER "${TARGET_NAME}-${lang}" TARGET_SUBNAME )
|
||||
|
||||
set( lang_po "${TRANSLATION_SOURCE_DIR}/${lang}/LC_MESSAGES/${TRANSLATION_SOURCE_FILENAME}" )
|
||||
set( lang_mo_dir "${CMAKE_BINARY_DIR}/lang/${lang}/LC_MESSAGES" )
|
||||
set( lang_mo "${lang_mo_dir}/${TRANSLATION_RENAME}" )
|
||||
if( lang STREQUAL "en" )
|
||||
message( STATUS " Skipping ${TRANSLATION_NAME} translations for en_US" )
|
||||
else()
|
||||
# We **don't** use the gettext macro's here because the source
|
||||
# structure doesn't match: we are calling this once per language
|
||||
# for all of Calamares's languages, while the gettext module
|
||||
# expects it to be called once, for a given language source-dir.
|
||||
#
|
||||
# Using any of the gettext macros just gets us multiple rules
|
||||
# for python.gmo, and it wants to use msgmerge, besides, which
|
||||
# doesn't fit our Transifex workflow.
|
||||
make_directory( ${lang_mo_dir} )
|
||||
add_custom_command(
|
||||
OUTPUT ${lang_mo}
|
||||
COMMAND ${GETTEXT_MSGFMT_EXECUTABLE}
|
||||
ARGS -o ${lang_mo} ${lang_po}
|
||||
MAIN_DEPENDENCY ${lang_po}
|
||||
)
|
||||
add_custom_target( "${TARGET_SUBNAME}" DEPENDS ${lang_mo} )
|
||||
add_dependencies( "${TARGET_NAME}" "${TARGET_SUBNAME}" )
|
||||
install(
|
||||
FILES ${lang_mo}
|
||||
DESTINATION ${CMAKE_INSTALL_LOCALEDIR}/${lang}/LC_MESSAGES/
|
||||
)
|
||||
endif()
|
||||
endforeach()
|
||||
endfunction()
|
@@ -1,57 +0,0 @@
|
||||
# === This file is part of Calamares - <https://calamares.io> ===
|
||||
#
|
||||
# SPDX-FileCopyrightText: 2019 Adriaan de Groot <groot@kde.org>
|
||||
# SPDX-License-Identifier: BSD-2-Clause
|
||||
#
|
||||
# Calamares is Free Software: see the License-Identifier above.
|
||||
#
|
||||
#
|
||||
###
|
||||
#
|
||||
# Helper function for doing automoc, autouic, autorcc on targets,
|
||||
# and on the corresponding .ui or .rcc files.
|
||||
#
|
||||
# calamares_automoc(target)
|
||||
# Sets AUTOMOC TRUE for a target.
|
||||
#
|
||||
# If the global variable CALAMARES_AUTOMOC_OPTIONS is set, uses that
|
||||
# as well to set options passed to MOC. This can be used to add
|
||||
# libcalamares/utils/moc-warnings.h file to the moc, which in turn
|
||||
# reduces compiler warnings in generated MOC code.
|
||||
#
|
||||
# calamares_autouic(target [uifile ..])
|
||||
# Sets AUTOUIC TRUE for a target.
|
||||
#
|
||||
# If the global variable CALAMARES_AUTOUIC_OPTIONS is set, adds that
|
||||
# to the options passed to uic for each of the named uifiles.
|
||||
#
|
||||
# calamares_autorcc(target [rcfile ..])
|
||||
# Sets AUTOUIC TRUE for a target.
|
||||
#
|
||||
# If the global variable CALAMARES_AUTORCC_OPTIONS is set, adds that
|
||||
# to the options passed to rcc for each of the named rcfiles.
|
||||
|
||||
function(calamares_automoc TARGET)
|
||||
set_target_properties( ${TARGET} PROPERTIES AUTOMOC TRUE )
|
||||
if ( CALAMARES_AUTOMOC_OPTIONS )
|
||||
set_target_properties( ${TARGET} PROPERTIES AUTOMOC_MOC_OPTIONS "${CALAMARES_AUTOMOC_OPTIONS}" )
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
function(calamares_autouic TARGET)
|
||||
set_target_properties( ${TARGET} PROPERTIES AUTOUIC TRUE )
|
||||
if ( CALAMARES_AUTOUIC_OPTIONS )
|
||||
foreach(S ${ARGN})
|
||||
set_property(SOURCE ${S} PROPERTY AUTOUIC_OPTIONS "${CALAMARES_AUTOUIC_OPTIONS}")
|
||||
endforeach()
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
function(calamares_autorcc TARGET)
|
||||
set_target_properties( ${TARGET} PROPERTIES AUTORCC TRUE )
|
||||
if ( CALAMARES_AUTORCC_OPTIONS )
|
||||
foreach(S ${ARGN})
|
||||
set_property(SOURCE ${S} PROPERTY AUTORCC_OPTIONS "${CALAMARES_AUTORCC_OPTIONS}")
|
||||
endforeach()
|
||||
endif()
|
||||
endfunction()
|
@@ -1,42 +0,0 @@
|
||||
# === This file is part of Calamares - <https://calamares.io> ===
|
||||
#
|
||||
# SPDX-FileCopyrightText: 2014 Teo Mrnjavac <teo@kde.org>
|
||||
# SPDX-FileCopyrightText: 2017 Adriaan de Groot <groot@kde.org>
|
||||
# SPDX-License-Identifier: BSD-2-Clause
|
||||
#
|
||||
###
|
||||
#
|
||||
# - Find libcrypt
|
||||
# Find the libcrypt includes and the libcrypt libraries
|
||||
# This module defines
|
||||
# LIBCRYPT_INCLUDE_DIR, root crypt include dir. Include crypt with crypt.h
|
||||
# LIBCRYPT_LIBRARY, the path to libcrypt
|
||||
# LIBCRYPT_FOUND, whether libcrypt was found
|
||||
|
||||
if( CMAKE_SYSTEM MATCHES "FreeBSD" )
|
||||
# FreeBSD has crypt(3) declared in unistd.h, which lives in
|
||||
# libc; the libcrypt found here is not used.
|
||||
find_path( CRYPT_INCLUDE_DIR NAMES unistd.h )
|
||||
add_definitions( -DNO_CRYPT_H )
|
||||
else()
|
||||
find_path( CRYPT_INCLUDE_DIR
|
||||
NAMES crypt.h
|
||||
HINTS
|
||||
${CMAKE_INSTALL_INCLUDEDIR}
|
||||
NO_CACHE
|
||||
)
|
||||
endif()
|
||||
|
||||
find_library( CRYPT_LIBRARIES
|
||||
NAMES crypt
|
||||
HINTS
|
||||
${CMAKE_INSTALL_LIBDIR}
|
||||
)
|
||||
|
||||
include( FindPackageHandleStandardArgs )
|
||||
find_package_handle_standard_args(
|
||||
Crypt
|
||||
REQUIRED_VARS CRYPT_LIBRARIES CRYPT_INCLUDE_DIR
|
||||
)
|
||||
|
||||
mark_as_advanced( CRYPT_INCLUDE_DIR CRYPT_LIBRARIES )
|
@@ -1,50 +0,0 @@
|
||||
# === This file is part of Calamares - <https://calamares.io> ===
|
||||
#
|
||||
# SPDX-FileCopyrightText: 2018 Adriaan de Groot <groot@kde.org>
|
||||
# SPDX-License-Identifier: BSD-2-Clause
|
||||
#
|
||||
###
|
||||
#
|
||||
# Locate libpwquality
|
||||
# https://github.com/libpwquality/libpwquality
|
||||
#
|
||||
# This module defines
|
||||
# LibPWQuality_FOUND
|
||||
# LibPWQuality_LIBRARIES, where to find the library
|
||||
# LibPWQuality_INCLUDE_DIRS, where to find pwquality.h
|
||||
#
|
||||
find_package(PkgConfig)
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
if(PkgConfig_FOUND)
|
||||
pkg_search_module(pc_pwquality QUIET pwquality)
|
||||
else()
|
||||
# It's just possible that the find_path and find_library will
|
||||
# find it **anyway**, so let's pretend it was there.
|
||||
set(pc_pwquality_FOUND ON)
|
||||
endif()
|
||||
|
||||
find_path(LibPWQuality_INCLUDE_DIR
|
||||
NAMES pwquality.h
|
||||
PATHS ${pc_pwquality_INCLUDE_DIRS}
|
||||
)
|
||||
find_library(LibPWQuality_LIBRARY
|
||||
NAMES pwquality
|
||||
PATHS ${pc_pwquality_LIBRARY_DIRS}
|
||||
)
|
||||
if(pc_pwquality_FOUND)
|
||||
set(LibPWQuality_LIBRARIES ${LibPWQuality_LIBRARY})
|
||||
set(LibPWQuality_INCLUDE_DIRS ${LibPWQuality_INCLUDE_DIR} ${pc_pwquality_INCLUDE_DIRS})
|
||||
endif()
|
||||
|
||||
find_package_handle_standard_args(LibPWQuality DEFAULT_MSG
|
||||
LibPWQuality_INCLUDE_DIRS
|
||||
LibPWQuality_LIBRARIES
|
||||
)
|
||||
mark_as_advanced(LibPWQuality_INCLUDE_DIRS LibPWQuality_LIBRARIES)
|
||||
|
||||
set_package_properties(
|
||||
LibPWQuality PROPERTIES
|
||||
DESCRIPTION "Password quality checking library"
|
||||
URL "https://github.com/libpwquality/libpwquality"
|
||||
)
|
@@ -1,185 +0,0 @@
|
||||
# === This file is part of Calamares - <https://calamares.io> ===
|
||||
#
|
||||
# SPDX-FileCopyrightText: 2016 Teo Mrnjavac <teo@kde.org>
|
||||
# SPDX-FileCopyrightText: 2017 Adriaan de Groot <groot@kde.org>
|
||||
# SPDX-License-Identifier: BSD-2-Clause
|
||||
#
|
||||
###
|
||||
#
|
||||
# Find PythonQt
|
||||
#
|
||||
# Sets PYTHONQT_FOUND, PYTHONQT_INCLUDE_DIR, PYTHONQT_LIBRARY, PYTHONQT_LIBRARIES
|
||||
#
|
||||
# Also sets PYTHONQT_INCLUDE_DIRS to add whatever directories
|
||||
# that are needed for extensions.
|
||||
#
|
||||
|
||||
# Python is required
|
||||
find_package(PythonLibs)
|
||||
if(NOT PYTHONLIBS_FOUND)
|
||||
message(FATAL_ERROR "error: Python is required to build PythonQt")
|
||||
endif()
|
||||
|
||||
# Cut X.Y[.Z] down to just X.Y
|
||||
string(REGEX REPLACE
|
||||
"^([0-9][0-9]*)\.([0-9][0-9]*)"
|
||||
"\\1.\\2@"
|
||||
_PYTHONLIBS_MAJMIN
|
||||
${PYTHONLIBS_VERSION_STRING}
|
||||
)
|
||||
string(REGEX REPLACE
|
||||
"@.*"
|
||||
""
|
||||
PYTHONLIBS_MAJMIN
|
||||
${_PYTHONLIBS_MAJMIN}
|
||||
)
|
||||
|
||||
if(NOT EXISTS "${PYTHONQT_INSTALL_DIR}")
|
||||
find_path(PYTHONQT_INSTALL_DIR
|
||||
NAMES
|
||||
include/PythonQt/PythonQt.h
|
||||
include/PythonQt5/PythonQt.h
|
||||
DOC "Directory where PythonQt was installed.")
|
||||
endif()
|
||||
|
||||
# XXX Since PythonQt 3.0 is not yet cmakeified, depending
|
||||
# on how PythonQt is built, headers will not always be
|
||||
# installed in "include/PythonQt". That is why "src"
|
||||
# is added as an option. See [1] for more details.
|
||||
# [1] https://github.com/commontk/CTK/pull/538#issuecomment-86106367
|
||||
find_path(PYTHONQT_INCLUDE_DIR PythonQt.h
|
||||
PATHS
|
||||
"${PYTHONQT_INSTALL_DIR}/include/PythonQt"
|
||||
"${PYTHONQT_INSTALL_DIR}/include/PythonQt5"
|
||||
"${PYTHONQT_INSTALL_DIR}/src"
|
||||
DOC "Path to the PythonQt include directory")
|
||||
find_path(PYTHONQT_ALL_INCLUDE_DIR PythonQt_QtAll.h
|
||||
PATHS
|
||||
"${PYTHONQT_INCLUDE_DIR}"
|
||||
"${PYTHONQT_INSTALL_DIR}"
|
||||
PATH_SUFFIXES
|
||||
"extensions/PythonQt_QtAll"
|
||||
"src"
|
||||
DOC "Path to the PythonQt 'all' header")
|
||||
|
||||
if ( NOT PythonQt_FIND_QUIETLY )
|
||||
message( STATUS "Searching for PythonQt (PythonLibs ${PYTHONLIBS_MAJMIN}) .." )
|
||||
if ( PYTHONQT_INCLUDE_DIR )
|
||||
message( STATUS " .. found include ${PYTHONQT_INCLUDE_DIR}" )
|
||||
message( STATUS " .. found all include ${PYTHONQT_ALL_INCLUDE_DIR}" )
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Minimum v3.1 is needed
|
||||
find_library(PYTHONQT_LIBRARY_RELEASE
|
||||
NAMES
|
||||
PythonQt-Qt5-Python${PYTHONLIBS_MAJMIN}
|
||||
PythonQt-Qt5-Python3
|
||||
PythonQt
|
||||
PATHS "${PYTHONQT_INSTALL_DIR}/lib"
|
||||
DOC "The PythonQt library."
|
||||
)
|
||||
find_library(PYTHONQT_LIBRARY_DEBUG
|
||||
NAMES
|
||||
PythonQt-Qt5-Python${PYTHONLIBS_MAJMIN}JMIN${CTK_CMAKE_DEBUG_POSTFIX}
|
||||
PythonQt-Qt5-Python${PYTHONLIBS_MAJMIN}${CMAKE_DEBUG_POSTFIX}
|
||||
PythonQt-Qt5-Python${PYTHONLIBS_MAJMIN}
|
||||
PythonQt-Qt5-Python3${CTK_CMAKE_DEBUG_POSTFIX}
|
||||
PythonQt-Qt5-Python3${CMAKE_DEBUG_POSTFIX}
|
||||
PythonQt-Qt5-Python3
|
||||
PythonQt${CTK_CMAKE_DEBUG_POSTFIX}
|
||||
PythonQt${CMAKE_DEBUG_POSTFIX}
|
||||
PythonQt
|
||||
PATHS "${PYTHONQT_INSTALL_DIR}/lib"
|
||||
DOC "The PythonQt library (debug build)."
|
||||
)
|
||||
find_library(PYTHONQT_QTALL_LIBRARY_RELEASE
|
||||
NAMES
|
||||
PythonQt_QtAll-Qt5-Python${PYTHONLIBS_MAJMIN}
|
||||
PythonQt_QtAll-Qt5-Python3
|
||||
PythonQt_QtAll
|
||||
PATHS "${PYTHONQT_INSTALL_DIR}/lib"
|
||||
DOC "Full Qt bindings for the PythonQt library."
|
||||
)
|
||||
find_library(PYTHONQT_QTALL_LIBRARY_DEBUG
|
||||
NAMES
|
||||
PythonQt_QtAll-Qt5-Python${PYTHONLIBS_MAJMIN}${CTK_CMAKE_DEBUG_POSTFIX}
|
||||
PythonQt_QtAll-Qt5-Python${PYTHONLIBS_MAJMIN}${CMAKE_DEBUG_POSTFIX}
|
||||
PythonQt_QtAll-Qt5-Python${PYTHONLIBS_MAJMIN}
|
||||
PythonQt_QtAll-Qt5-Python3${CTK_CMAKE_DEBUG_POSTFIX}
|
||||
PythonQt_QtAll-Qt5-Python3${CMAKE_DEBUG_POSTFIX}
|
||||
PythonQt_QtAll-Qt5-Python3
|
||||
PythonQt_QtAll${CTK_CMAKE_DEBUG_POSTFIX}
|
||||
PythonQt_QtAll${CMAKE_DEBUG_POSTFIX}
|
||||
PythonQt_QtAll
|
||||
PATHS "${PYTHONQT_INSTALL_DIR}/lib"
|
||||
DOC "Full Qt bindings for the PythonQt library (debug build)."
|
||||
)
|
||||
|
||||
set(PYTHONQT_LIBRARY)
|
||||
if(PYTHONQT_LIBRARY_RELEASE)
|
||||
list(APPEND PYTHONQT_LIBRARY optimized ${PYTHONQT_LIBRARY_RELEASE})
|
||||
endif()
|
||||
if(PYTHONQT_LIBRARY_DEBUG)
|
||||
list(APPEND PYTHONQT_LIBRARY debug ${PYTHONQT_LIBRARY_DEBUG})
|
||||
endif()
|
||||
|
||||
set(PYTHONQT_QTALL_LIBRARY)
|
||||
if(PYTHONQT_QTALL_LIBRARY_RELEASE)
|
||||
list(APPEND PYTHONQT_QTALL_LIBRARY optimized ${PYTHONQT_QTALL_LIBRARY_RELEASE})
|
||||
endif()
|
||||
if(PYTHONQT_QTALL_LIBRARY_DEBUG)
|
||||
list(APPEND PYTHONQT_QTALL_LIBRARY debug ${PYTHONQT_QTALL_LIBRARY_DEBUG})
|
||||
endif()
|
||||
|
||||
if ( NOT PythonQt_FIND_QUIETLY )
|
||||
if ( PYTHONQT_LIBRARY )
|
||||
message( STATUS " .. found library ${PYTHONQT_LIBRARY}" )
|
||||
endif()
|
||||
if ( PYTHONQT_QTALL_LIBRARY )
|
||||
message( STATUS " .. found qtall ${PYTHONQT_QTALL_LIBRARY}" )
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
mark_as_advanced(PYTHONQT_INSTALL_DIR)
|
||||
mark_as_advanced(PYTHONQT_INCLUDE_DIR)
|
||||
mark_as_advanced(PYTHONQT_LIBRARY_RELEASE)
|
||||
mark_as_advanced(PYTHONQT_LIBRARY_DEBUG)
|
||||
mark_as_advanced(PYTHONQT_QTALL_LIBRARY_RELEASE)
|
||||
mark_as_advanced(PYTHONQT_QTALL_LIBRARY_DEBUG)
|
||||
|
||||
# On linux, also find libutil
|
||||
if(UNIX AND NOT APPLE)
|
||||
find_library(PYTHONQT_LIBUTIL util)
|
||||
mark_as_advanced(PYTHONQT_LIBUTIL)
|
||||
endif()
|
||||
|
||||
# All upper case _FOUND variable is maintained for backwards compatibility.
|
||||
set(PYTHONQT_FOUND 0)
|
||||
set(PythonQt_FOUND 0)
|
||||
|
||||
if(PYTHONQT_INCLUDE_DIR AND PYTHONQT_LIBRARY AND PYTHONQT_QTALL_LIBRARY)
|
||||
# Currently CMake'ified PythonQt only supports building against a python Release build.
|
||||
# This applies independently of CTK build type (Release, Debug, ...)
|
||||
add_definitions(-DPYTHONQT_USE_RELEASE_PYTHON_FALLBACK)
|
||||
set(PYTHONQT_FOUND 1)
|
||||
set(PythonQt_FOUND ${PYTHONQT_FOUND})
|
||||
set(PYTHONQT_LIBRARIES ${PYTHONQT_LIBRARY} ${PYTHONQT_LIBUTIL} ${PYTHONQT_QTALL_LIBRARY})
|
||||
set(PYTHONQT_INCLUDE_DIRS ${PYTHONQT_INCLUDE_DIR})
|
||||
if(PYTHONQT_ALL_INCLUDE_DIR)
|
||||
list(APPEND PYTHONQT_INCLUDE_DIRS ${PYTHONQT_ALL_INCLUDE_DIR})
|
||||
endif()
|
||||
elseif(NOT PythonQt_FIND_QUIETLY)
|
||||
set(_missing "")
|
||||
if (NOT PYTHONQT_INCLUDE_DIR)
|
||||
list(APPEND _missing "includes")
|
||||
endif()
|
||||
if (NOT PYTHONQT_LIBRARY)
|
||||
list(APPEND _missing "library")
|
||||
endif()
|
||||
if (NOT PYTHONQT_QTALL_LIBRARY)
|
||||
list(APPEND _missing "qtall")
|
||||
endif()
|
||||
message(STATUS "PythonQt not found, missing components ${_missing}")
|
||||
endif()
|
@@ -1,19 +1,9 @@
|
||||
# === This file is part of Calamares - <https://calamares.io> ===
|
||||
#
|
||||
# SPDX-FileCopyrightText: 2014 Teo Mrnjavac <teo@kde.org>
|
||||
# SPDX-FileCopyrightText: 2020 Adriaan de Groot <groot@kde.org>
|
||||
# SPDX-License-Identifier: BSD-2-Clause
|
||||
#
|
||||
###
|
||||
#
|
||||
# Locate yaml-cpp
|
||||
#
|
||||
# This module defines
|
||||
# YAMLCPP_FOUND, if false, do not try to link to yaml-cpp
|
||||
# YAMLCPP_LIBRARY, where to find yaml-cpp
|
||||
# YAMLCPP_INCLUDE_DIR, where to find yaml.h
|
||||
# There is also one IMPORTED library target,
|
||||
# yamlcpp
|
||||
# YAMLCPP_FOUND, if false, do not try to link to yaml-cpp
|
||||
# YAMLCPP_LIBRARY, where to find yaml-cpp
|
||||
# YAMLCPP_INCLUDE_DIR, where to find yaml.h
|
||||
#
|
||||
# By default, the dynamic libraries of yaml-cpp will be found. To find the static ones instead,
|
||||
# you must set the YAMLCPP_STATIC_LIBRARY variable to TRUE before calling find_package(YamlCpp ...).
|
||||
@@ -58,12 +48,3 @@ find_library(YAMLCPP_LIBRARY
|
||||
include(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(YAMLCPP DEFAULT_MSG YAMLCPP_INCLUDE_DIR YAMLCPP_LIBRARY)
|
||||
mark_as_advanced(YAMLCPP_INCLUDE_DIR YAMLCPP_LIBRARY)
|
||||
|
||||
# Add an imported target
|
||||
if( YAMLCPP_LIBRARY )
|
||||
add_library( yamlcpp UNKNOWN IMPORTED )
|
||||
set_property( TARGET yamlcpp PROPERTY IMPORTED_LOCATION ${YAMLCPP_LIBRARY} )
|
||||
if ( YAMLCPP_INCLUDE_DIR )
|
||||
set_property( TARGET yamlcpp PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${YAMLCPP_INCLUDE_DIR} )
|
||||
endif()
|
||||
endif()
|
182
CMakeModules/GNUInstallDirs.cmake
Normal file
182
CMakeModules/GNUInstallDirs.cmake
Normal file
@@ -0,0 +1,182 @@
|
||||
# - Define GNU standard installation directories
|
||||
# Provides install directory variables as defined for GNU software:
|
||||
# http://www.gnu.org/prep/standards/html_node/Directory-Variables.html
|
||||
# Inclusion of this module defines the following variables:
|
||||
# CMAKE_INSTALL_<dir> - destination for files of a given type
|
||||
# CMAKE_INSTALL_FULL_<dir> - corresponding absolute path
|
||||
# where <dir> is one of:
|
||||
# BINDIR - user executables (bin)
|
||||
# SBINDIR - system admin executables (sbin)
|
||||
# LIBEXECDIR - program executables (libexec)
|
||||
# SYSCONFDIR - read-only single-machine data (etc)
|
||||
# SHAREDSTATEDIR - modifiable architecture-independent data (com)
|
||||
# LOCALSTATEDIR - modifiable single-machine data (var)
|
||||
# LIBDIR - object code libraries (lib or lib64)
|
||||
# INCLUDEDIR - C header files (include)
|
||||
# OLDINCLUDEDIR - C header files for non-gcc (/usr/include)
|
||||
# DATAROOTDIR - read-only architecture-independent data root (share)
|
||||
# DATADIR - read-only architecture-independent data (DATAROOTDIR)
|
||||
# INFODIR - info documentation (DATAROOTDIR/info)
|
||||
# LOCALEDIR - locale-dependent data (DATAROOTDIR/locale)
|
||||
# MANDIR - man documentation (DATAROOTDIR/man)
|
||||
# DOCDIR - documentation root (DATAROOTDIR/doc/PROJECT_NAME)
|
||||
# Each CMAKE_INSTALL_<dir> value may be passed to the DESTINATION options of
|
||||
# install() commands for the corresponding file type. If the includer does
|
||||
# not define a value the above-shown default will be used and the value will
|
||||
# appear in the cache for editing by the user.
|
||||
# Each CMAKE_INSTALL_FULL_<dir> value contains an absolute path constructed
|
||||
# from the corresponding destination by prepending (if necessary) the value
|
||||
# of CMAKE_INSTALL_PREFIX.
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2011 Nikita Krupen'ko <krnekit@gmail.com>
|
||||
# Copyright 2011 Kitware, Inc.
|
||||
#
|
||||
# Distributed under the OSI-approved BSD License (the "License");
|
||||
# see accompanying file Copyright.txt for details.
|
||||
#
|
||||
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the License for more information.
|
||||
#=============================================================================
|
||||
# (To distribute this file outside of CMake, substitute the full
|
||||
# License text for the above reference.)
|
||||
|
||||
# Installation directories
|
||||
#
|
||||
if(NOT DEFINED CMAKE_INSTALL_BINDIR)
|
||||
set(CMAKE_INSTALL_BINDIR "bin" CACHE PATH "user executables (bin)")
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED CMAKE_INSTALL_SBINDIR)
|
||||
set(CMAKE_INSTALL_SBINDIR "sbin" CACHE PATH "system admin executables (sbin)")
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED CMAKE_INSTALL_LIBEXECDIR)
|
||||
set(CMAKE_INSTALL_LIBEXECDIR "libexec" CACHE PATH "program executables (libexec)")
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED CMAKE_INSTALL_SYSCONFDIR)
|
||||
set(CMAKE_INSTALL_SYSCONFDIR "etc" CACHE PATH "read-only single-machine data (etc)")
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED CMAKE_INSTALL_SHAREDSTATEDIR)
|
||||
set(CMAKE_INSTALL_SHAREDSTATEDIR "com" CACHE PATH "modifiable architecture-independent data (com)")
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED CMAKE_INSTALL_LOCALSTATEDIR)
|
||||
set(CMAKE_INSTALL_LOCALSTATEDIR "var" CACHE PATH "modifiable single-machine data (var)")
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED CMAKE_INSTALL_LIBDIR)
|
||||
set(_LIBDIR_DEFAULT "lib")
|
||||
# Override this default 'lib' with 'lib64' iff:
|
||||
# - we are on Linux system but NOT cross-compiling
|
||||
# - we are NOT on debian
|
||||
# - we are on a 64 bits system
|
||||
# reason is: amd64 ABI: http://www.x86-64.org/documentation/abi.pdf
|
||||
# Note that the future of multi-arch handling may be even
|
||||
# more complicated than that: http://wiki.debian.org/Multiarch
|
||||
if(CMAKE_SYSTEM_NAME MATCHES "Linux"
|
||||
AND NOT CMAKE_CROSSCOMPILING
|
||||
AND NOT EXISTS "/etc/debian_version")
|
||||
if(NOT DEFINED CMAKE_SIZEOF_VOID_P)
|
||||
message(AUTHOR_WARNING
|
||||
"Unable to determine default CMAKE_INSTALL_LIBDIR directory because no target architecture is known. "
|
||||
"Please enable at least one language before including GNUInstallDirs.")
|
||||
else()
|
||||
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
|
||||
set(_LIBDIR_DEFAULT "lib64")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
set(CMAKE_INSTALL_LIBDIR "${_LIBDIR_DEFAULT}" CACHE PATH "object code libraries (${_LIBDIR_DEFAULT})")
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED CMAKE_INSTALL_INCLUDEDIR)
|
||||
set(CMAKE_INSTALL_INCLUDEDIR "include" CACHE PATH "C header files (include)")
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED CMAKE_INSTALL_OLDINCLUDEDIR)
|
||||
set(CMAKE_INSTALL_OLDINCLUDEDIR "/usr/include" CACHE PATH "C header files for non-gcc (/usr/include)")
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED CMAKE_INSTALL_DATAROOTDIR)
|
||||
set(CMAKE_INSTALL_DATAROOTDIR "share" CACHE PATH "read-only architecture-independent data root (share)")
|
||||
endif()
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Values whose defaults are relative to DATAROOTDIR. Store empty values in
|
||||
# the cache and store the defaults in local variables if the cache values are
|
||||
# not set explicitly. This auto-updates the defaults as DATAROOTDIR changes.
|
||||
|
||||
if(NOT CMAKE_INSTALL_DATADIR)
|
||||
set(CMAKE_INSTALL_DATADIR "" CACHE PATH "read-only architecture-independent data (DATAROOTDIR)")
|
||||
set(CMAKE_INSTALL_DATADIR "${CMAKE_INSTALL_DATAROOTDIR}")
|
||||
endif()
|
||||
|
||||
if(NOT CMAKE_INSTALL_INFODIR)
|
||||
set(CMAKE_INSTALL_INFODIR "" CACHE PATH "info documentation (DATAROOTDIR/info)")
|
||||
set(CMAKE_INSTALL_INFODIR "${CMAKE_INSTALL_DATAROOTDIR}/info")
|
||||
endif()
|
||||
|
||||
if(NOT CMAKE_INSTALL_LOCALEDIR)
|
||||
set(CMAKE_INSTALL_LOCALEDIR "" CACHE PATH "locale-dependent data (DATAROOTDIR/locale)")
|
||||
set(CMAKE_INSTALL_LOCALEDIR "${CMAKE_INSTALL_DATAROOTDIR}/locale")
|
||||
endif()
|
||||
|
||||
if(NOT CMAKE_INSTALL_MANDIR)
|
||||
set(CMAKE_INSTALL_MANDIR "" CACHE PATH "man documentation (DATAROOTDIR/man)")
|
||||
set(CMAKE_INSTALL_MANDIR "${CMAKE_INSTALL_DATAROOTDIR}/man")
|
||||
endif()
|
||||
|
||||
if(NOT CMAKE_INSTALL_DOCDIR)
|
||||
set(CMAKE_INSTALL_DOCDIR "" CACHE PATH "documentation root (DATAROOTDIR/doc/PROJECT_NAME)")
|
||||
set(CMAKE_INSTALL_DOCDIR "${CMAKE_INSTALL_DATAROOTDIR}/doc/${PROJECT_NAME}")
|
||||
endif()
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
mark_as_advanced(
|
||||
CMAKE_INSTALL_BINDIR
|
||||
CMAKE_INSTALL_SBINDIR
|
||||
CMAKE_INSTALL_LIBEXECDIR
|
||||
CMAKE_INSTALL_SYSCONFDIR
|
||||
CMAKE_INSTALL_SHAREDSTATEDIR
|
||||
CMAKE_INSTALL_LOCALSTATEDIR
|
||||
CMAKE_INSTALL_LIBDIR
|
||||
CMAKE_INSTALL_INCLUDEDIR
|
||||
CMAKE_INSTALL_OLDINCLUDEDIR
|
||||
CMAKE_INSTALL_DATAROOTDIR
|
||||
CMAKE_INSTALL_DATADIR
|
||||
CMAKE_INSTALL_INFODIR
|
||||
CMAKE_INSTALL_LOCALEDIR
|
||||
CMAKE_INSTALL_MANDIR
|
||||
CMAKE_INSTALL_DOCDIR
|
||||
)
|
||||
|
||||
# Result directories
|
||||
#
|
||||
foreach(dir
|
||||
BINDIR
|
||||
SBINDIR
|
||||
LIBEXECDIR
|
||||
SYSCONFDIR
|
||||
SHAREDSTATEDIR
|
||||
LOCALSTATEDIR
|
||||
LIBDIR
|
||||
INCLUDEDIR
|
||||
OLDINCLUDEDIR
|
||||
DATAROOTDIR
|
||||
DATADIR
|
||||
INFODIR
|
||||
LOCALEDIR
|
||||
MANDIR
|
||||
DOCDIR
|
||||
)
|
||||
if(NOT IS_ABSOLUTE ${CMAKE_INSTALL_${dir}})
|
||||
set(CMAKE_INSTALL_FULL_${dir} "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_${dir}}")
|
||||
else()
|
||||
set(CMAKE_INSTALL_FULL_${dir} "${CMAKE_INSTALL_${dir}}")
|
||||
endif()
|
||||
endforeach()
|
@@ -1,39 +0,0 @@
|
||||
# === This file is part of Calamares - <https://calamares.io> ===
|
||||
#
|
||||
# SPDX-FileCopyrightText: 2020 Adriaan de Groot <groot@kde.org>
|
||||
# SPDX-License-Identifier: BSD-2-Clause
|
||||
#
|
||||
###
|
||||
#
|
||||
# Finds KPMcore and consistently sets API flags based on the version.
|
||||
#
|
||||
if ( NOT KPMcore_searched_for )
|
||||
set( KPMcore_searched_for TRUE )
|
||||
|
||||
find_package( KPMcore 3.3 )
|
||||
set_package_properties(
|
||||
KPMcore PROPERTIES
|
||||
URL "https://invent.kde.org/kde/kpmcore"
|
||||
DESCRIPTION "KDE Partitioning library"
|
||||
TYPE RECOMMENDED
|
||||
PURPOSE "For disk partitioning support"
|
||||
)
|
||||
|
||||
if( KPMcore_FOUND )
|
||||
set( KPMcore_API_DEFINITIONS "" )
|
||||
if( KPMcore_VERSION VERSION_GREATER "3.3.70" AND KPMcore_VERSION VERSION_LESS "4.0" )
|
||||
message( FATAL_ERROR "KPMCore beta versions ${KPMcore_VERSION} not supported" )
|
||||
endif()
|
||||
if ( KPMcore_VERSION VERSION_GREATER "3.3.0")
|
||||
list( APPEND KPMcore_API_DEFINITIONS WITH_KPMCORE331API) # kpmcore > 3.3.0 with deprecations
|
||||
endif()
|
||||
if ( KPMcore_VERSION VERSION_GREATER_EQUAL "4.0")
|
||||
list( APPEND KPMcore_API_DEFINITIONS WITH_KPMCORE4API) # kpmcore 4 with new API
|
||||
endif()
|
||||
if( KPMcore_VERSION VERSION_GREATER_EQUAL "4.2" )
|
||||
list( APPEND KPMcore_API_DEFINITIONS WITH_KPMCORE42API) # kpmcore 4.2 with new API
|
||||
endif()
|
||||
else()
|
||||
set( KPMcore_API_DEFINITIONS WITHOUT_KPMcore )
|
||||
endif()
|
||||
endif()
|
157
CMakeModules/MacroLogFeature.cmake
Normal file
157
CMakeModules/MacroLogFeature.cmake
Normal file
@@ -0,0 +1,157 @@
|
||||
# This file defines the Feature Logging macros.
|
||||
#
|
||||
# MACRO_LOG_FEATURE(VAR FEATURE DESCRIPTION URL [REQUIRED [MIN_VERSION [COMMENTS]]])
|
||||
# Logs the information so that it can be displayed at the end
|
||||
# of the configure run
|
||||
# VAR : TRUE or FALSE, indicating whether the feature is supported
|
||||
# FEATURE: name of the feature, e.g. "libjpeg"
|
||||
# DESCRIPTION: description what this feature provides
|
||||
# URL: home page
|
||||
# REQUIRED: TRUE or FALSE, indicating whether the featue is required
|
||||
# MIN_VERSION: minimum version number. empty string if unneeded
|
||||
# COMMENTS: More info you may want to provide. empty string if unnecessary
|
||||
#
|
||||
# MACRO_DISPLAY_FEATURE_LOG()
|
||||
# Call this to display the collected results.
|
||||
# Exits CMake with a FATAL error message if a required feature is missing
|
||||
#
|
||||
# Example:
|
||||
#
|
||||
# INCLUDE(MacroLogFeature)
|
||||
#
|
||||
# FIND_PACKAGE(JPEG)
|
||||
# MACRO_LOG_FEATURE(JPEG_FOUND "libjpeg" "Support JPEG images" "http://www.ijg.org" TRUE "3.2a" "")
|
||||
# ...
|
||||
# MACRO_DISPLAY_FEATURE_LOG()
|
||||
|
||||
# Copyright (c) 2006, Alexander Neundorf, <neundorf@kde.org>
|
||||
# Copyright (c) 2006, Allen Winter, <winter@kde.org>
|
||||
# Copyright (c) 2009, Sebastian Trueg, <trueg@kde.org>
|
||||
#
|
||||
# Redistribution and use is allowed according to the terms of the BSD license.
|
||||
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
|
||||
|
||||
IF (NOT _macroLogFeatureAlreadyIncluded)
|
||||
SET(_file ${CMAKE_BINARY_DIR}/MissingRequirements.txt)
|
||||
IF (EXISTS ${_file})
|
||||
FILE(REMOVE ${_file})
|
||||
ENDIF (EXISTS ${_file})
|
||||
|
||||
SET(_file ${CMAKE_BINARY_DIR}/EnabledFeatures.txt)
|
||||
IF (EXISTS ${_file})
|
||||
FILE(REMOVE ${_file})
|
||||
ENDIF (EXISTS ${_file})
|
||||
|
||||
SET(_file ${CMAKE_BINARY_DIR}/DisabledFeatures.txt)
|
||||
IF (EXISTS ${_file})
|
||||
FILE(REMOVE ${_file})
|
||||
ENDIF (EXISTS ${_file})
|
||||
|
||||
SET(_macroLogFeatureAlreadyIncluded TRUE)
|
||||
|
||||
INCLUDE(FeatureSummary)
|
||||
|
||||
ENDIF (NOT _macroLogFeatureAlreadyIncluded)
|
||||
|
||||
|
||||
MACRO(MACRO_LOG_FEATURE _var _package _description _url ) # _required _minvers _comments)
|
||||
|
||||
STRING(TOUPPER "${ARGV4}" _required)
|
||||
SET(_minvers "${ARGV5}")
|
||||
SET(_comments "${ARGV6}")
|
||||
|
||||
IF (${_var})
|
||||
SET(_LOGFILENAME ${CMAKE_BINARY_DIR}/EnabledFeatures.txt)
|
||||
ELSE (${_var})
|
||||
IF ("${_required}" STREQUAL "TRUE")
|
||||
SET(_LOGFILENAME ${CMAKE_BINARY_DIR}/MissingRequirements.txt)
|
||||
ELSE ("${_required}" STREQUAL "TRUE")
|
||||
SET(_LOGFILENAME ${CMAKE_BINARY_DIR}/DisabledFeatures.txt)
|
||||
ENDIF ("${_required}" STREQUAL "TRUE")
|
||||
ENDIF (${_var})
|
||||
|
||||
SET(_logtext " * ${_package}")
|
||||
|
||||
IF (NOT ${_var})
|
||||
IF (${_minvers} MATCHES ".*")
|
||||
SET(_logtext "${_logtext} (${_minvers} or higher)")
|
||||
ENDIF (${_minvers} MATCHES ".*")
|
||||
SET(_logtext "${_logtext} <${_url}>\n ")
|
||||
ELSE (NOT ${_var})
|
||||
SET(_logtext "${_logtext} - ")
|
||||
ENDIF (NOT ${_var})
|
||||
|
||||
SET(_logtext "${_logtext}${_description}")
|
||||
|
||||
IF (NOT ${_var})
|
||||
IF (${_comments} MATCHES ".*")
|
||||
SET(_logtext "${_logtext}\n ${_comments}")
|
||||
ENDIF (${_comments} MATCHES ".*")
|
||||
# SET(_logtext "${_logtext}\n") #double-space missing features?
|
||||
ENDIF (NOT ${_var})
|
||||
|
||||
FILE(APPEND "${_LOGFILENAME}" "${_logtext}\n")
|
||||
|
||||
IF(COMMAND SET_PACKAGE_INFO) # in FeatureSummary.cmake since CMake 2.8.3
|
||||
SET_PACKAGE_INFO("${_package}" "\"${_description}\"" "${_url}" "\"${_comments}\"")
|
||||
ENDIF(COMMAND SET_PACKAGE_INFO)
|
||||
|
||||
ENDMACRO(MACRO_LOG_FEATURE)
|
||||
|
||||
|
||||
MACRO(MACRO_DISPLAY_FEATURE_LOG)
|
||||
IF(COMMAND FEATURE_SUMMARY) # in FeatureSummary.cmake since CMake 2.8.3
|
||||
FEATURE_SUMMARY(FILENAME ${CMAKE_CURRENT_BINARY_DIR}/FindPackageLog.txt
|
||||
WHAT ALL)
|
||||
ENDIF(COMMAND FEATURE_SUMMARY)
|
||||
|
||||
SET(_missingFile ${CMAKE_BINARY_DIR}/MissingRequirements.txt)
|
||||
SET(_enabledFile ${CMAKE_BINARY_DIR}/EnabledFeatures.txt)
|
||||
SET(_disabledFile ${CMAKE_BINARY_DIR}/DisabledFeatures.txt)
|
||||
|
||||
IF (EXISTS ${_missingFile} OR EXISTS ${_enabledFile} OR EXISTS ${_disabledFile})
|
||||
SET(_printSummary TRUE)
|
||||
ENDIF (EXISTS ${_missingFile} OR EXISTS ${_enabledFile} OR EXISTS ${_disabledFile})
|
||||
|
||||
IF(_printSummary)
|
||||
SET(_missingDeps 0)
|
||||
IF (EXISTS ${_enabledFile})
|
||||
FILE(READ ${_enabledFile} _enabled)
|
||||
FILE(REMOVE ${_enabledFile})
|
||||
SET(_summary "${_summary}\n-----------------------------------------------------------------------------\n-- The following external packages were located on your system.\n-- This installation will have the extra features provided by these packages.\n-----------------------------------------------------------------------------\n${_enabled}")
|
||||
ENDIF (EXISTS ${_enabledFile})
|
||||
|
||||
|
||||
IF (EXISTS ${_disabledFile})
|
||||
SET(_missingDeps 1)
|
||||
FILE(READ ${_disabledFile} _disabled)
|
||||
FILE(REMOVE ${_disabledFile})
|
||||
SET(_summary "${_summary}\n-----------------------------------------------------------------------------\n-- The following OPTIONAL packages could NOT be located on your system.\n-- Consider installing them to enable more features from this software.\n-----------------------------------------------------------------------------\n${_disabled}")
|
||||
ENDIF (EXISTS ${_disabledFile})
|
||||
|
||||
|
||||
IF (EXISTS ${_missingFile})
|
||||
SET(_missingDeps 1)
|
||||
FILE(READ ${_missingFile} _requirements)
|
||||
SET(_summary "${_summary}\n-----------------------------------------------------------------------------\n-- The following REQUIRED packages could NOT be located on your system.\n-- You must install these packages before continuing.\n-----------------------------------------------------------------------------\n${_requirements}")
|
||||
FILE(REMOVE ${_missingFile})
|
||||
SET(_haveMissingReq 1)
|
||||
ENDIF (EXISTS ${_missingFile})
|
||||
|
||||
|
||||
IF (NOT ${_missingDeps})
|
||||
SET(_summary "${_summary}\n-----------------------------------------------------------------------------\n-- Congratulations! All external packages have been found.")
|
||||
ENDIF (NOT ${_missingDeps})
|
||||
|
||||
|
||||
MESSAGE(${_summary})
|
||||
MESSAGE("-----------------------------------------------------------------------------\n")
|
||||
|
||||
|
||||
IF(_haveMissingReq)
|
||||
MESSAGE(FATAL_ERROR "Exiting: Missing Requirements")
|
||||
ENDIF(_haveMissingReq)
|
||||
|
||||
ENDIF(_printSummary)
|
||||
|
||||
ENDMACRO(MACRO_DISPLAY_FEATURE_LOG)
|
48
CMakeModules/MacroOptionalFindPackage.cmake
Normal file
48
CMakeModules/MacroOptionalFindPackage.cmake
Normal file
@@ -0,0 +1,48 @@
|
||||
# - MACRO_OPTIONAL_FIND_PACKAGE() combines FIND_PACKAGE() with an OPTION()
|
||||
# MACRO_OPTIONAL_FIND_PACKAGE( <name> [QUIT] )
|
||||
# This macro is a combination of OPTION() and FIND_PACKAGE(), it
|
||||
# works like FIND_PACKAGE(), but additionally it automatically creates
|
||||
# an option name WITH_<name>, which can be disabled via the cmake GUI.
|
||||
# or via -DWITH_<name>=OFF
|
||||
# The standard <name>_FOUND variables can be used in the same way
|
||||
# as when using the normal FIND_PACKAGE()
|
||||
|
||||
# Copyright (c) 2006-2010 Alexander Neundorf, <neundorf@kde.org>
|
||||
#
|
||||
# Redistribution and use is allowed according to the terms of the BSD license.
|
||||
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
|
||||
|
||||
# This is just a helper macro to set a bunch of variables empty.
|
||||
# We don't know whether the package uses UPPERCASENAME or CamelCaseName, so we try both:
|
||||
macro(_MOFP_SET_EMPTY_IF_DEFINED _name _var)
|
||||
if(DEFINED ${_name}_${_var})
|
||||
set(${_name}_${_var} "")
|
||||
endif(DEFINED ${_name}_${_var})
|
||||
|
||||
string(TOUPPER ${_name} _nameUpper)
|
||||
if(DEFINED ${_nameUpper}_${_var})
|
||||
set(${_nameUpper}_${_var} "")
|
||||
endif(DEFINED ${_nameUpper}_${_var})
|
||||
endmacro(_MOFP_SET_EMPTY_IF_DEFINED _package _var)
|
||||
|
||||
|
||||
macro (MACRO_OPTIONAL_FIND_PACKAGE _name )
|
||||
option(WITH_${_name} "Search for ${_name} package" ON)
|
||||
if (WITH_${_name})
|
||||
find_package(${_name} ${ARGN})
|
||||
else (WITH_${_name})
|
||||
string(TOUPPER ${_name} _nameUpper)
|
||||
set(${_name}_FOUND FALSE)
|
||||
set(${_nameUpper}_FOUND FALSE)
|
||||
|
||||
_mofp_set_empty_if_defined(${_name} INCLUDE_DIRS)
|
||||
_mofp_set_empty_if_defined(${_name} INCLUDE_DIR)
|
||||
_mofp_set_empty_if_defined(${_name} INCLUDES)
|
||||
_mofp_set_empty_if_defined(${_name} LIBRARY)
|
||||
_mofp_set_empty_if_defined(${_name} LIBRARIES)
|
||||
_mofp_set_empty_if_defined(${_name} LIBS)
|
||||
_mofp_set_empty_if_defined(${_name} FLAGS)
|
||||
_mofp_set_empty_if_defined(${_name} DEFINITIONS)
|
||||
endif (WITH_${_name})
|
||||
endmacro (MACRO_OPTIONAL_FIND_PACKAGE)
|
||||
|
117
CONTRIBUTING.md
117
CONTRIBUTING.md
@@ -1,117 +0,0 @@
|
||||
<!-- SPDX-FileCopyrightText: no
|
||||
SPDX-License-Identifier: CC0-1.0
|
||||
-->
|
||||
|
||||
# Contributing to Calamares
|
||||
|
||||
Welcome to Calamares! We're happy that you would like to add
|
||||
something to Calamares. This contribution guide should help you
|
||||
get started. The guide is not exhaustive: most of it points
|
||||
to other documents that you will need.
|
||||
|
||||
|
||||
## Code of Conduct
|
||||
|
||||
The Calamares community -- of developers, translators, and downstream (distro) users --
|
||||
aims to be courteous, professional, and inclusive. Harrassment, discriminatory
|
||||
statements and abuse are not tolerated. In general, we apply the
|
||||
[KDE Code of Conduct](https://www.kde.org/code-of-conduct/) and the
|
||||
[GNOME Code of Conduct](https://wiki.gnome.org/Foundation/CodeOfConduct) (the
|
||||
rules of decent behavior in both communities are pretty much the same).
|
||||
|
||||
> See the [CoC section on the wiki](https://github.com/calamares/calamares/wiki#code-of-conduct)
|
||||
> for a longer text. To report a problem, please contact the maintainer,
|
||||
> Adriaan de Groot, or the KDE Community Working Group.
|
||||
|
||||
|
||||
## Join the Conversation
|
||||
|
||||
GitHub Issues are **one** place for discussing Calamares if there are concrete
|
||||
problems or a new feature to discuss.
|
||||
|
||||
Regular Calamares development chit-chat happens on old-school IRC
|
||||
(no registration required). Responsiveness is best during the day
|
||||
in Europe, but feel free to idle. **DO NOT** ask-and-leave. Keep
|
||||
that chat window open because it can easily take a few hours for
|
||||
someone to notice a message.
|
||||
|
||||
[](https://webchat.freenode.net/?channel=#calamares?nick=guest)
|
||||
|
||||
|
||||
## General Guidelines
|
||||
|
||||
Pull Requests are welcome!
|
||||
|
||||
It is often a good idea to start a Pull Request early, with just work-in-progress,
|
||||
so that the overall approach can be discussed before you put a lot of work
|
||||
into something. Or file an issue describing what you would like to do.
|
||||
|
||||
If you are writing code, stick to the existing coding style and apply
|
||||
the coding-style tool before you commit. It's not my favorite style,
|
||||
but at least all of Calamares is consistent and the tool helps it
|
||||
stay that way.
|
||||
|
||||
If you are writing documentation, use *en_US* spelling.
|
||||
|
||||
If you are doing cool stuff, let us know (on IRC or through issues).
|
||||
|
||||
**Do** fork Calamares to try new things, **don't** keep your fork to
|
||||
yourself, **do** upstream things as much as you can. When you make cool
|
||||
new things, it's best for the whole Calamares-using-community
|
||||
to build new things that are configurable and applicable to other
|
||||
distributions than your own. So keep other folk in mind. There is
|
||||
also the [extensions](https://github.com/calamares/calamares-extensions)
|
||||
repository for somewhat-more-specialized modules and examples.
|
||||
|
||||
|
||||
## Building Calamares
|
||||
|
||||
Up to date
|
||||
[building-Calamares](https://github.com/calamares/calamares/wiki/Develop-Guide)
|
||||
instructions are on the wiki.
|
||||
|
||||
### Dependencies
|
||||
|
||||
Main:
|
||||
* Compiler with C++17 support: GCC >= 7 or Clang >= 5
|
||||
* CMake >= 3.3
|
||||
* Qt >= 5.9
|
||||
* yaml-cpp >= 0.5.1
|
||||
* Python >= 3.3 (required for some modules)
|
||||
* Boost.Python >= 1.55.0 (required for some modules)
|
||||
* KDE extra-cmake-modules >= 5.18 (recommended; required for some modules;
|
||||
required for some tests)
|
||||
* KDE Frameworks KCoreAddons (>= 5.58 recommended)
|
||||
* PythonQt (optional, deprecated)
|
||||
|
||||
Individual modules may have their own requirements;
|
||||
these are listed in CMake output.
|
||||
Particular requirements (not complete):
|
||||
|
||||
* *fsresizer* KPMCore >= 3.3 (>= 4.2 recommended)
|
||||
* *partition* KPMCore >= 3.3 (>= 4.2 recommended)
|
||||
* *users* LibPWQuality (optional)
|
||||
|
||||
|
||||
## Configuring and Deploying Calamares
|
||||
|
||||
[Deployment](https://github.com/calamares/calamares/wiki/Deploy-Guide)
|
||||
instructions are on the wiki.
|
||||
|
||||
|
||||
## Translating Calamares
|
||||
|
||||
Calamares translations are done on Transifex.
|
||||
The [translator's guide](https://github.com/calamares/calamares/wiki/Translate-Guide)
|
||||
on the wiki explains how to get involved there.
|
||||
|
||||
|
||||
## Testing Calamares
|
||||
|
||||
There is a [testing guide](https://github.com/calamares/calamares/wiki/Test-Guide)
|
||||
on the wiki. It is possible to test most parts of Calamares in isolation,
|
||||
but the real proof of the pudding comes with an actual installation
|
||||
of *some* distro using Calamares.
|
||||
|
||||
The UI components should get some specific usability testing instructions soon.
|
||||
|
43
CalamaresAddBrandingSubdirectory.cmake
Normal file
43
CalamaresAddBrandingSubdirectory.cmake
Normal file
@@ -0,0 +1,43 @@
|
||||
include( CMakeColors )
|
||||
|
||||
function( calamares_add_branding_subdirectory )
|
||||
set( SUBDIRECTORY ${ARGV0} )
|
||||
|
||||
if( EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${SUBDIRECTORY}/CMakeLists.txt" )
|
||||
add_subdirectory( $SUBDIRECTORY )
|
||||
message( "-- ${BoldYellow}Found ${CALAMARES_APPLICATION_NAME} branding component: ${BoldRed}${SUBDIRECTORY}${ColorReset}" )
|
||||
|
||||
elseif( EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${SUBDIRECTORY}/branding.desc" )
|
||||
set( BRANDING_DIR share/calamares/branding )
|
||||
set( BRANDING_COMPONENT_DESTINATION ${BRANDING_DIR}/${SUBDIRECTORY} )
|
||||
|
||||
if( IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/${SUBDIRECTORY}/lang" )
|
||||
message( "-- ${BoldYellow}Warning:${ColorReset} branding component ${BoldRed}${SUBDIRECTORY}${ColorReset} has a translations subdirectory but no CMakeLists.txt." )
|
||||
message( "" )
|
||||
return()
|
||||
endif()
|
||||
|
||||
# We glob all the files inside the subdirectory, and we make sure they are
|
||||
# synced with the bindir structure and installed.
|
||||
file( GLOB BRANDING_COMPONENT_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}/${SUBDIRECTORY} "${SUBDIRECTORY}/*" )
|
||||
foreach( BRANDING_COMPONENT_FILE ${BRANDING_COMPONENT_FILES} )
|
||||
if( NOT IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/${SUBDIRECTORY}/${BRANDING_COMPONENT_FILE} )
|
||||
configure_file( ${SUBDIRECTORY}/${BRANDING_COMPONENT_FILE} ${SUBDIRECTORY}/${BRANDING_COMPONENT_FILE} COPYONLY )
|
||||
|
||||
install( FILES ${CMAKE_CURRENT_BINARY_DIR}/${SUBDIRECTORY}/${BRANDING_COMPONENT_FILE}
|
||||
DESTINATION ${BRANDING_COMPONENT_DESTINATION} )
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
message( "-- ${BoldYellow}Found ${CALAMARES_APPLICATION_NAME} branding component: ${BoldRed}${SUBDIRECTORY}${ColorReset}" )
|
||||
if( NOT CMAKE_BUILD_TYPE STREQUAL "Release" )
|
||||
message( " ${Green}TYPE:${ColorReset} branding component" )
|
||||
# message( " ${Green}FILES:${ColorReset} ${BRANDING_COMPONENT_FILES}" )
|
||||
message( " ${Green}BRANDING_COMPONENT_DESTINATION:${ColorReset} ${BRANDING_COMPONENT_DESTINATION}" )
|
||||
message( "" )
|
||||
endif()
|
||||
else()
|
||||
message( "-- ${BoldYellow}Warning:${ColorReset} tried to add branding component subdirectory ${BoldRed}${SUBDIRECTORY}${ColorReset} which has no branding.desc." )
|
||||
message( "" )
|
||||
endif()
|
||||
endfunction()
|
@@ -1,60 +1,39 @@
|
||||
# === This file is part of Calamares - <https://calamares.io> ===
|
||||
#
|
||||
# SPDX-FileCopyrightText: 2014 Teo Mrnjavac <teo@kde.org>
|
||||
# SPDX-FileCopyrightText: 2017 Adriaan de Groot <groot@kde.org>
|
||||
# SPDX-License-Identifier: BSD-2-Clause
|
||||
#
|
||||
# Calamares is Free Software: see the License-Identifier above.
|
||||
#
|
||||
#
|
||||
###
|
||||
#
|
||||
# Support functions for building plugins.
|
||||
#
|
||||
# Usage:
|
||||
#
|
||||
# calamares_add_library(
|
||||
# library-name
|
||||
# EXPORT_MACRO macro-name
|
||||
# TARGET_TYPE <STATIC|MODULE|...>
|
||||
# EXPORT export-name
|
||||
# VERSION version
|
||||
# SOVERSION version
|
||||
# INSTALL_BINDIR dir
|
||||
# RESOURCES resource-file
|
||||
# SOURCES source-file...
|
||||
# UI ui-file...
|
||||
# LINK_LIBRARIES lib...
|
||||
# LINK_PRIVATE_LIBRARIES lib...
|
||||
# COMPILE_DEFINITIONS def...
|
||||
# [NO_INSTALL]
|
||||
# [NO_VERSION]
|
||||
# )
|
||||
#
|
||||
# The COMPILE_DEFINITIONS are set on the resulting module with a suitable
|
||||
# flag (i.e. `-D`) so only state the name (optionally, also the value)
|
||||
# without a `-D` prefixed to it. Pass in a CMake list as needed.
|
||||
include( CMakeParseArguments )
|
||||
include( CalamaresAutomoc )
|
||||
|
||||
function(calamares_add_library)
|
||||
# parse arguments (name needs to be saved before passing ARGN into the macro)
|
||||
set(NAME ${ARGV0})
|
||||
set(options NO_INSTALL NO_VERSION)
|
||||
set(oneValueArgs NAME EXPORT_MACRO TARGET_TYPE EXPORT VERSION SOVERSION INSTALL_BINDIR RESOURCES)
|
||||
set(multiValueArgs SOURCES UI LINK_LIBRARIES LINK_PRIVATE_LIBRARIES COMPILE_DEFINITIONS)
|
||||
set(oneValueArgs NAME TYPE EXPORT_MACRO TARGET TARGET_TYPE EXPORT VERSION SOVERSION INSTALL_BINDIR RESOURCES)
|
||||
set(multiValueArgs SOURCES UI LINK_LIBRARIES LINK_PRIVATE_LIBRARIES COMPILE_DEFINITIONS QT5_MODULES)
|
||||
cmake_parse_arguments(LIBRARY "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
|
||||
set(LIBRARY_NAME ${NAME})
|
||||
|
||||
|
||||
# message("*** Arguments for ${LIBRARY_NAME}")
|
||||
# message("Sources: ${LIBRARY_SOURCES}")
|
||||
# message("Link libraries: ${LIBRARY_LINK_LIBRARIES}")
|
||||
# message("UI: ${LIBRARY_UI}")
|
||||
# message("TARGET_TYPE: ${LIBRARY_TARGET_TYPE}")
|
||||
# message("EXPORT_MACRO: ${LIBRARY_EXPORT_MACRO}")
|
||||
# message("NO_INSTALL: ${LIBRARY_NO_INSTALL}")
|
||||
|
||||
set(target ${LIBRARY_NAME})
|
||||
|
||||
# qt stuff
|
||||
include_directories(${CMAKE_CURRENT_LIST_DIR})
|
||||
include_directories(${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
if(LIBRARY_UI)
|
||||
qt5_wrap_ui(LIBRARY_UI_SOURCES ${LIBRARY_UI})
|
||||
list(APPEND LIBRARY_SOURCES ${LIBRARY_UI_SOURCES})
|
||||
endif()
|
||||
|
||||
# add resources from current dir
|
||||
if(LIBRARY_RESOURCES)
|
||||
list(APPEND LIBRARY_SOURCES ${LIBRARY_RESOURCES})
|
||||
if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/${LIBRARY_RESOURCES}")
|
||||
qt5_add_resources(LIBRARY_RC_SOURCES "${LIBRARY_RESOURCES}")
|
||||
list(APPEND LIBRARY_SOURCES ${LIBRARY_RC_SOURCES})
|
||||
unset(LIBRARY_RC_SOURCES)
|
||||
endif()
|
||||
|
||||
# add target
|
||||
@@ -66,32 +45,31 @@ function(calamares_add_library)
|
||||
add_library(${target} SHARED ${LIBRARY_SOURCES})
|
||||
endif()
|
||||
|
||||
calamares_automoc(${target})
|
||||
if(LIBRARY_UI)
|
||||
calamares_autouic(${target} ${LIBRARY_UI})
|
||||
endif()
|
||||
if(LIBRARY_RESOURCES)
|
||||
calamares_autorcc(${target} ${LIBRARY_RESOURCES})
|
||||
endif()
|
||||
# HACK: add qt modules - every lib should define its own set of modules
|
||||
qt5_use_modules(${target} Core Gui Widgets ${LIBRARY_QT5_MODULES})
|
||||
|
||||
# definitions - can this be moved into set_target_properties below?
|
||||
add_definitions(${QT_DEFINITIONS})
|
||||
set_target_properties(${target} PROPERTIES AUTOMOC TRUE)
|
||||
|
||||
if(LIBRARY_EXPORT_MACRO)
|
||||
set_target_properties(${target} PROPERTIES COMPILE_DEFINITIONS ${LIBRARY_EXPORT_MACRO})
|
||||
endif()
|
||||
|
||||
if(LIBRARY_COMPILE_DEFINITIONS)
|
||||
set( _lib_definitions "${LIBRARY_EXPORT_MACRO}" ${LIBRARY_COMPILE_DEFINITIONS} )
|
||||
set_target_properties(${target} PROPERTIES COMPILE_DEFINITIONS "${_lib_definitions}")
|
||||
# Dear CMake, i hate you! Sincerely, domme
|
||||
# At least in CMake 2.8.8, you CANNOT set more than one COMPILE_DEFINITIONS value
|
||||
# only takes the first one if called multiple times or bails out with wrong number of arguments
|
||||
# when passing in a list, thus i redefine the export macro here in hope it won't mess up other targets
|
||||
add_definitions( "-D${LIBRARY_EXPORT_MACRO}" )
|
||||
|
||||
set_target_properties(${target} PROPERTIES COMPILE_DEFINITIONS ${LIBRARY_COMPILE_DEFINITIONS})
|
||||
endif()
|
||||
|
||||
# add link targets
|
||||
target_link_libraries(${target}
|
||||
LINK_PUBLIC ${Calamares_LIBRARIES}
|
||||
Qt5::Core
|
||||
Qt5::Gui
|
||||
Qt5::Widgets
|
||||
)
|
||||
target_link_libraries(${target} ${CALAMARES_LIBRARIES})
|
||||
if(LIBRARY_LINK_LIBRARIES)
|
||||
target_link_libraries(${target} LINK_PUBLIC ${LIBRARY_LINK_LIBRARIES})
|
||||
target_link_libraries(${target} ${LIBRARY_LINK_LIBRARIES})
|
||||
endif()
|
||||
if(LIBRARY_LINK_PRIVATE_LIBRARIES)
|
||||
target_link_libraries(${target} LINK_PRIVATE ${LIBRARY_LINK_PRIVATE_LIBRARIES})
|
||||
@@ -116,6 +94,9 @@ function(calamares_add_library)
|
||||
set(LIBRARY_INSTALL_LIBDIR "${LIBRARY_INSTALL_BINDIR}")
|
||||
endif()
|
||||
|
||||
#message("INSTALL_BINDIR: ${LIBRARY_INSTALL_BINDIR}")
|
||||
#message("INSTALL_LIBDIR: ${LIBRARY_INSTALL_LIBDIR}")
|
||||
|
||||
# make installation optional, maybe useful for dummy plugins one day
|
||||
if(NOT LIBRARY_NO_INSTALL)
|
||||
include(GNUInstallDirs)
|
43
CalamaresAddModuleSubdirectory.cmake
Normal file
43
CalamaresAddModuleSubdirectory.cmake
Normal file
@@ -0,0 +1,43 @@
|
||||
include( CMakeColors )
|
||||
|
||||
function( calamares_add_module_subdirectory )
|
||||
set( SUBDIRECTORY ${ARGV0} )
|
||||
|
||||
# If this subdirectory has a CMakeLists.txt, we add_subdirectory it...
|
||||
if( EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${SUBDIRECTORY}/CMakeLists.txt" )
|
||||
add_subdirectory( ${SUBDIRECTORY} )
|
||||
# ...otherwise, we look for a module.desc.
|
||||
elseif( EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${SUBDIRECTORY}/module.desc" )
|
||||
set( MODULES_DIR ${CMAKE_INSTALL_LIBDIR}/calamares/modules )
|
||||
set( MODULE_DESTINATION ${MODULES_DIR}/${SUBDIRECTORY} )
|
||||
set( MODULE_CONFIG_FILE ${SUBDIRECTORY}.conf )
|
||||
|
||||
# We glob all the files inside the subdirectory, and we make sure they are
|
||||
# synced with the bindir structure and installed.
|
||||
file( GLOB MODULE_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}/${SUBDIRECTORY} "${SUBDIRECTORY}/*" )
|
||||
foreach( MODULE_FILE ${MODULE_FILES} )
|
||||
if( NOT IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/${SUBDIRECTORY}/${MODULE_FILE} )
|
||||
configure_file( ${SUBDIRECTORY}/${MODULE_FILE} ${SUBDIRECTORY}/${MODULE_FILE} COPYONLY )
|
||||
|
||||
if( "${MODULE_FILE}" STREQUAL "${MODULE_CONFIG_FILE}" )
|
||||
install( FILES ${CMAKE_CURRENT_BINARY_DIR}/${SUBDIRECTORY}/${MODULE_FILE}
|
||||
DESTINATION share/calamares/modules )
|
||||
else()
|
||||
install( FILES ${CMAKE_CURRENT_BINARY_DIR}/${SUBDIRECTORY}/${MODULE_FILE}
|
||||
DESTINATION ${MODULE_DESTINATION} )
|
||||
endif()
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
message( "-- ${BoldYellow}Found ${CALAMARES_APPLICATION_NAME} module: ${BoldRed}${SUBDIRECTORY}${ColorReset}" )
|
||||
if( NOT CMAKE_BUILD_TYPE STREQUAL "Release" )
|
||||
message( " ${Green}TYPE:${ColorReset} jobmodule" )
|
||||
# message( " ${Green}FILES:${ColorReset} ${MODULE_FILES}" )
|
||||
message( " ${Green}MODULE_DESTINATION:${ColorReset} ${MODULE_DESTINATION}" )
|
||||
message( "" )
|
||||
endif()
|
||||
else()
|
||||
message( "-- ${BoldYellow}Warning:${ColorReset} tried to add module subdirectory ${BoldRed}${SUBDIRECTORY}${ColorReset} which has no CMakeLists.txt or module.desc." )
|
||||
message( "" )
|
||||
endif()
|
||||
endfunction()
|
86
CalamaresAddPlugin.cmake
Normal file
86
CalamaresAddPlugin.cmake
Normal file
@@ -0,0 +1,86 @@
|
||||
include( CMakeParseArguments )
|
||||
include( ${CALAMARES_CMAKE_DIR}/CalamaresAddLibrary.cmake )
|
||||
|
||||
function( calamares_add_plugin )
|
||||
# parse arguments ( name needs to be saved before passing ARGN into the macro )
|
||||
set( NAME ${ARGV0} )
|
||||
set( options NO_INSTALL SHARED_LIB )
|
||||
set( oneValueArgs NAME TYPE EXPORT_MACRO RESOURCES )
|
||||
set( multiValueArgs SOURCES UI LINK_LIBRARIES COMPILE_DEFINITIONS )
|
||||
cmake_parse_arguments( PLUGIN "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN} )
|
||||
set( PLUGIN_NAME ${NAME} )
|
||||
set( PLUGIN_DESTINATION ${CMAKE_INSTALL_LIBDIR}/calamares/modules/${PLUGIN_NAME} )
|
||||
set( PLUGIN_DESC_FILE module.desc )
|
||||
set( PLUGIN_CONFIG_FILE ${NAME}.conf )
|
||||
set( PLUGIN_DATA_DESTINATION share/calamares/modules )
|
||||
set( CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}" )
|
||||
set( CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}" )
|
||||
set( CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}" )
|
||||
|
||||
include( CMakeColors )
|
||||
message( "-- ${BoldYellow}Found ${CALAMARES_APPLICATION_NAME} module: ${BoldRed}${PLUGIN_NAME}${ColorReset}" )
|
||||
if( NOT CMAKE_BUILD_TYPE STREQUAL "Release" )
|
||||
message( " ${Green}TYPE:${ColorReset} ${PLUGIN_TYPE}" )
|
||||
message( " ${Green}LINK_LIBRARIES:${ColorReset} ${PLUGIN_LINK_LIBRARIES}" )
|
||||
# message( " ${Green}SOURCES:${ColorReset} ${PLUGIN_SOURCES}" )
|
||||
# message( " ${Green}UI:${ColorReset} ${PLUGIN_UI}" )
|
||||
# message( " ${Green}EXPORT_MACRO:${ColorReset} ${PLUGIN_EXPORT_MACRO}" )
|
||||
# message( " ${Green}NO_INSTALL:${ColorReset} ${PLUGIN_NO_INSTALL}" )
|
||||
message( " ${Green}PLUGIN_DESTINATION:${ColorReset} ${PLUGIN_DESTINATION}" )
|
||||
if( EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${PLUGIN_CONFIG_FILE}" )
|
||||
message( " ${Green}CONFIGURATION_FILE:${ColorReset} ${PLUGIN_CONFIG_FILE} => ${PLUGIN_DATA_DESTINATION}" )
|
||||
endif()
|
||||
if( PLUGIN_RESOURCES )
|
||||
message( " ${Green}RESOURCES:${ColorReset} ${PLUGIN_RESOURCES}" )
|
||||
endif()
|
||||
message( "" )
|
||||
endif()
|
||||
# create target name once for convenience
|
||||
set( target "calamares_${PLUGIN_TYPE}_${PLUGIN_NAME}" )
|
||||
|
||||
# determine target type
|
||||
if( NOT ${PLUGIN_SHARED_LIB} )
|
||||
set( target_type "MODULE" )
|
||||
else()
|
||||
set( target_type "SHARED" )
|
||||
endif()
|
||||
|
||||
list( APPEND calamares_add_library_args
|
||||
"${target}"
|
||||
"EXPORT_MACRO" "${PLUGIN_EXPORT_MACRO}"
|
||||
"TARGET_TYPE" "${target_type}"
|
||||
"SOURCES" "${PLUGIN_SOURCES}"
|
||||
)
|
||||
|
||||
if( PLUGIN_UI )
|
||||
list( APPEND calamares_add_library_args "UI" "${PLUGIN_UI}" )
|
||||
endif()
|
||||
|
||||
if( PLUGIN_LINK_LIBRARIES )
|
||||
list( APPEND calamares_add_library_args "LINK_LIBRARIES" "${PLUGIN_LINK_LIBRARIES}" )
|
||||
endif()
|
||||
|
||||
if( PLUGIN_COMPILE_DEFINITIONS )
|
||||
list( APPEND calamares_add_library_args "COMPILE_DEFINITIONS" ${PLUGIN_COMPILE_DEFINITIONS} )
|
||||
endif()
|
||||
|
||||
list( APPEND calamares_add_library_args "NO_VERSION" )
|
||||
|
||||
list( APPEND calamares_add_library_args "INSTALL_BINDIR" "${PLUGIN_DESTINATION}" )
|
||||
|
||||
if( PLUGIN_RESOURCES )
|
||||
list( APPEND calamares_add_library_args "RESOURCES" "${PLUGIN_RESOURCES}" )
|
||||
endif()
|
||||
|
||||
calamares_add_library( ${calamares_add_library_args} )
|
||||
|
||||
configure_file( ${PLUGIN_DESC_FILE} ${PLUGIN_DESC_FILE} COPYONLY )
|
||||
install( FILES ${CMAKE_CURRENT_BINARY_DIR}/${PLUGIN_DESC_FILE}
|
||||
DESTINATION ${PLUGIN_DESTINATION} )
|
||||
|
||||
if( EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${PLUGIN_CONFIG_FILE}" )
|
||||
configure_file( ${PLUGIN_CONFIG_FILE} ${PLUGIN_CONFIG_FILE} COPYONLY )
|
||||
install( FILES ${CMAKE_CURRENT_BINARY_DIR}/${PLUGIN_CONFIG_FILE}
|
||||
DESTINATION ${PLUGIN_DATA_DESTINATION} )
|
||||
endif()
|
||||
endfunction()
|
4
CalamaresBuildTreeSettings.cmake.in
Normal file
4
CalamaresBuildTreeSettings.cmake.in
Normal file
@@ -0,0 +1,4 @@
|
||||
set(CALAMARES_INCLUDE_DIRS
|
||||
"@PROJECT_SOURCE_DIR@/src/libcalamares"
|
||||
"@PROJECT_BINARY_DIR@/src/libcalamares"
|
||||
)
|
@@ -1,85 +1,21 @@
|
||||
# SPDX-FileCopyrightText: 2014 Teo Mrnjavac <teo@kde.org>
|
||||
# SPDX-FileCopyrightText: 2020 Adriaan de Groot <groot@kde.org>
|
||||
# SPDX-License-Identifier: BSD-2-Clause
|
||||
#
|
||||
# Note that Calamares itself is GPL-3.0-or-later: the above license
|
||||
# applies to **this** CMake file.
|
||||
#
|
||||
# Config file for the Calamares package
|
||||
#
|
||||
# The following IMPORTED targets are defined:
|
||||
# - Calamares::calamares - the core library
|
||||
# - Calamares::calamaresui - the UI (and QML) library
|
||||
#
|
||||
# For legacy use it defines the following variables:
|
||||
# - Calamares_INCLUDE_DIRS - include directories for Calamares
|
||||
# - Calamares_LIB_DIRS - library directories
|
||||
# - Calamares_LIBRARIES - libraries to link against
|
||||
# - Config file for the Calamares package
|
||||
# It defines the following variables
|
||||
# CALAMARES_INCLUDE_DIRS - include directories for Calamares
|
||||
# CALAMARES_LIBRARIES - libraries to link against
|
||||
# CALAMARES_EXECUTABLE - the bar executable
|
||||
|
||||
@PACKAGE_INIT@
|
||||
|
||||
### Versioning and IMPORTED targets
|
||||
#
|
||||
#
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/CalamaresConfigVersion.cmake)
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/CalamaresTargets.cmake)
|
||||
|
||||
### Dependencies
|
||||
#
|
||||
# The libraries can depend on a variety of Qt and KDE Frameworks
|
||||
# components, so accumulate them and find (just once).
|
||||
#
|
||||
macro(accumulate_deps outvar target namespace)
|
||||
string(LENGTH ${namespace} _nslen)
|
||||
get_target_property(_libs ${target} INTERFACE_LINK_LIBRARIES)
|
||||
foreach(_lib ${_libs})
|
||||
if (_lib MATCHES ^${namespace})
|
||||
string(SUBSTRING ${_lib} ${_nslen} -1 _component)
|
||||
list(APPEND ${outvar} ${_component})
|
||||
endif()
|
||||
endforeach()
|
||||
endmacro()
|
||||
|
||||
# Qt5 infrastructure for translations is required
|
||||
set(qt5_required Core Widgets LinguistTools)
|
||||
accumulate_deps(qt5_required Calamares::calamares Qt5::)
|
||||
accumulate_deps(qt5_required Calamares::calamaresui Qt5::)
|
||||
find_package(Qt5 CONFIG REQUIRED ${qt5_required})
|
||||
|
||||
set(kf5_required "")
|
||||
accumulate_deps(kf5_required Calamares::calamares KF5::)
|
||||
accumulate_deps(kf5_required Calamares::calamaresui KF5::)
|
||||
if(kf5_required)
|
||||
find_package(ECM ${ECM_VERSION} NO_MODULE)
|
||||
if( ECM_FOUND )
|
||||
list(INSERT CMAKE_MODULE_PATH 0 ${ECM_MODULE_PATH})
|
||||
find_package(KF5 REQUIRED COMPONENTS ${kf5_required})
|
||||
endif()
|
||||
# Compute paths
|
||||
get_filename_component(CALAMARES_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
|
||||
if(EXISTS "${CALAMARES_CMAKE_DIR}/CMakeCache.txt")
|
||||
# In build tree
|
||||
include("${CALAMARES_CMAKE_DIR}/CalamaresBuildTreeSettings.cmake")
|
||||
else()
|
||||
set(CALAMARES_INCLUDE_DIRS "${CALAMARES_CMAKE_DIR}/@CONF_REL_INCLUDE_DIR@/libcalamares")
|
||||
endif()
|
||||
|
||||
### Legacy support
|
||||
#
|
||||
#
|
||||
set(Calamares_LIB_DIRS "@PACKAGE_CMAKE_INSTALL_LIBDIR@")
|
||||
set(Calamares_INCLUDE_DIRS "@PACKAGE_CMAKE_INSTALL_INCLUDEDIR@")
|
||||
set(Calamares_LIBRARIES Calamares::calamares)
|
||||
# Our library dependencies (contains definitions for IMPORTED targets)
|
||||
include("${CALAMARES_CMAKE_DIR}/CalamaresLibraryDepends.cmake")
|
||||
|
||||
### CMake support
|
||||
#
|
||||
#
|
||||
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR})
|
||||
|
||||
include(CalamaresAddBrandingSubdirectory)
|
||||
include(CalamaresAddLibrary)
|
||||
include(CalamaresAddModuleSubdirectory)
|
||||
include(CalamaresAddPlugin)
|
||||
|
||||
# These are feature-settings that affect consumers of Calamares
|
||||
# libraries as well; without Python-support in the libs, for instance,
|
||||
# there's no point in having a Python plugin.
|
||||
#
|
||||
# This list should match the one in libcalamares/CalamaresConfig.h,
|
||||
# which is the C++-language side of the same configuration.
|
||||
set(Calamares_WITH_PYTHON @WITH_PYTHON@)
|
||||
set(Calamares_WITH_PYTHONQT @WITH_PYTHONQT@)
|
||||
set(Calamares_WITH_QML @WITH_QML@)
|
||||
# These are IMPORTED targets created by CalamaresLibraryDepends.cmake
|
||||
set(CALAMARES_LIBRARIES calamares)
|
||||
set(CALAMARES_USE_FILE "${CALAMARES_CMAKE_DIR}/CalamaresUse.cmake")
|
||||
|
12
CalamaresConfigVersion.cmake.in
Normal file
12
CalamaresConfigVersion.cmake.in
Normal file
@@ -0,0 +1,12 @@
|
||||
set(PACKAGE_VERSION "@CALAMARES_VERSION@")
|
||||
|
||||
# Check whether the requested PACKAGE_FIND_VERSION is compatible
|
||||
if("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}")
|
||||
set(PACKAGE_VERSION_COMPATIBLE FALSE)
|
||||
else()
|
||||
set(PACKAGE_VERSION_COMPATIBLE TRUE)
|
||||
if ("${PACKAGE_VERSION}" VERSION_EQUAL "${PACKAGE_FIND_VERSION}")
|
||||
set(PACKAGE_VERSION_EXACT TRUE)
|
||||
endif()
|
||||
endif()
|
||||
|
12
CalamaresUse.cmake.in
Normal file
12
CalamaresUse.cmake.in
Normal file
@@ -0,0 +1,12 @@
|
||||
#FIXME: this duplicates top level cmakelists: how can we reduce code duplication?
|
||||
|
||||
find_package( Qt5 5.3.0 CONFIG REQUIRED Core Gui Widgets LinguistTools )
|
||||
|
||||
if(NOT CALAMARES_CMAKE_DIR)
|
||||
set(CALAMARES_CMAKE_DIR ${CMAKE_CURRENT_LIST_DIR})
|
||||
endif()
|
||||
|
||||
include( "${CALAMARES_CMAKE_DIR}/CalamaresAddLibrary.cmake" )
|
||||
include( "${CALAMARES_CMAKE_DIR}/CalamaresAddModuleSubdirectory.cmake" )
|
||||
include( "${CALAMARES_CMAKE_DIR}/CalamaresAddPlugin.cmake" )
|
||||
include( "${CALAMARES_CMAKE_DIR}/CalamaresAddBrandingSubdirectory.cmake" )
|
156
HACKING.md
Normal file
156
HACKING.md
Normal file
@@ -0,0 +1,156 @@
|
||||
Hacking on Calamares
|
||||
====================
|
||||
|
||||
Licensing
|
||||
---------
|
||||
Calamares is released under the terms of the GNU GPL, version 3 or later. Every source file must have a license header, with a list of copyright holders and years.
|
||||
|
||||
Example:
|
||||
```
|
||||
/* === This file is part of Calamares - <http://github.com/calamares> ===
|
||||
*
|
||||
* Copyright 2013-2014, Random Person <name@example.com>
|
||||
* Copyright 2010, Someone Else <someone@example.com>
|
||||
*
|
||||
* Calamares is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Calamares 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 General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Calamares. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
```
|
||||
Copyright holders must be physical or legal personalities. A statement such as `Copyright 2014, The FooBarQuux project` has no legal value if "The FooBarQuux project" is not the legal name of a person, company, incorporated organization, etc.
|
||||
|
||||
Formatting
|
||||
----------
|
||||
* Spaces, not tabs.
|
||||
* Indentation is 4 spaces.
|
||||
* Lines should be limited to 90 characters.
|
||||
* Spaces between brackets and argument functions, including for template arguments
|
||||
* No space before brackets, except for keywords, for example `function( argument )` but
|
||||
`if ( condition )`.
|
||||
* For pointer and reference variable declarations, put a space before the variable name
|
||||
and no space between the type and the `*` or `&`.
|
||||
* `for`, `if`, `else`, `while` and similar statements put the brackets on the next line,
|
||||
although brackets are not needed for single statements.
|
||||
* Function and class definitions have their brackets on separate lines.
|
||||
* A function implementation's return type is on its own line.
|
||||
* `CamelCase.{cpp,h}` style file names.
|
||||
|
||||
Example:
|
||||
```
|
||||
bool
|
||||
MyClass::myMethod( QStringList list, const QString& name )
|
||||
{
|
||||
if ( list.isEmpty() )
|
||||
return false;
|
||||
|
||||
foreach ( const QString& string, list )
|
||||
cDebug() << "Current string is " << string;
|
||||
|
||||
switch ( m_enumValue )
|
||||
{
|
||||
case Something:
|
||||
return true;
|
||||
case SomethingElse:
|
||||
doSomething();
|
||||
break;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
You can use the `hacking/calamaresstyle` script to run
|
||||
[astyle](http://astyle.sf.net) on your code and have it formatted the right
|
||||
way.
|
||||
|
||||
**NOTE:** An .editorconfig file is included to assist with formatting. In order to take advantage of this functionality you will need to acquire the [EditorConfig](http://editorconfig.org/#download) plug-in for your editor.
|
||||
|
||||
Naming
|
||||
------
|
||||
* Use CamelCase for everything.
|
||||
* Local variables should start out with a lowercase letter.
|
||||
* Class names are capitalized
|
||||
* Prefix class member variables with `m_`, e.g. `m_queue`.
|
||||
* Prefix static member variables with `s_`, e.g. `s_instance`.
|
||||
* Functions are named in the Qt style, like Java's, without the 'get' prefix.
|
||||
* A getter is `variable()`.
|
||||
* If it's a getter for a boolean, prefix with 'is', so `isCondition()`.
|
||||
* A setter is `setVariable( arg )`.
|
||||
|
||||
Includes
|
||||
--------
|
||||
Header includes should be listed in the following order:
|
||||
|
||||
* own header,
|
||||
* Calamares includes,
|
||||
* includes for Qt-based libraries,
|
||||
* Qt includes,
|
||||
* other includes.
|
||||
|
||||
They should also be sorted alphabetically for ease of locating them.
|
||||
|
||||
Includes in a header file should be kept to the absolute minimum, as to keep compile times short. This can be achieved by using forward declarations instead of includes,
|
||||
like `class QListView;`.
|
||||
|
||||
Example:
|
||||
```
|
||||
#include "Settings.h"
|
||||
|
||||
#include "CalamaresApplication.h"
|
||||
#include "utils/CalamaresUtils.h"
|
||||
#include "utils/Logger.h"
|
||||
#include "YamlUtils.h"
|
||||
|
||||
#include <QDir>
|
||||
#include <QFile>
|
||||
|
||||
#include <yaml-cpp/yaml.h>
|
||||
```
|
||||
|
||||
Use include guards, not `#pragma once`.
|
||||
|
||||
C++ tips
|
||||
--------
|
||||
All C++11 features are acceptable, and the use of new C++11 features is encouraged when
|
||||
it makes the code easier to understand and more maintainable.
|
||||
|
||||
The use of `nullptr` is preferred over the use of `0` or `NULL`.
|
||||
|
||||
For Qt containers it is better to use Qt's own `foreach`. For all other containers, the
|
||||
range-based `for` syntax introduced with C++11 is preferred ([see this blog post][1]).
|
||||
|
||||
When re-implementing a virtual method, always add the `override` keyword.
|
||||
|
||||
Try to keep your code const correct. Declare methods const if they don't mutate the
|
||||
object, and use const variables. It improves safety, and also makes it easier to
|
||||
understand the code.
|
||||
|
||||
For the Qt signal-slot system, the new (Qt5) syntax is to be preferred because it allows
|
||||
the compiler to check for the existence of signals and slots. As an added benefit, the
|
||||
new syntax can also be used with `tr1::bind` and C++11 lambdas. For more information, see
|
||||
the [Qt wiki][2].
|
||||
|
||||
Example:
|
||||
```
|
||||
connect( m_next, &QPushButton::clicked, this, &ViewManager::next );
|
||||
|
||||
connect( m_moduleManager, &Calamares::ModuleManager::modulesLoaded, [this]
|
||||
{
|
||||
m_mainwindow->show();
|
||||
});
|
||||
```
|
||||
|
||||
Debugging
|
||||
---------
|
||||
Use `cDebug()` and `cLog()` from `utils/Logger.h`.
|
||||
|
||||
|
||||
[1]: http://blog.qt.digia.com/blog/2011/05/26/cpp0x-in-qt/
|
||||
[2]: http://qt-project.org/wiki/New_Signal_Slot_Syntax
|
@@ -1,24 +0,0 @@
|
||||
|
||||
Copyright 2019 Adriaan de Groot <groot@kde.org>
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGE.
|
@@ -1,324 +0,0 @@
|
||||
Creative Commons Attribution 4.0 International Creative Commons Corporation
|
||||
("Creative Commons") is not a law firm and does not provide legal services
|
||||
or legal advice. Distribution of Creative Commons public licenses does not
|
||||
create a lawyer-client or other relationship. Creative Commons makes its licenses
|
||||
and related information available on an "as-is" basis. Creative Commons gives
|
||||
no warranties regarding its licenses, any material licensed under their terms
|
||||
and conditions, or any related information. Creative Commons disclaims all
|
||||
liability for damages resulting from their use to the fullest extent possible.
|
||||
|
||||
Using Creative Commons Public Licenses
|
||||
|
||||
Creative Commons public licenses provide a standard set of terms and conditions
|
||||
that creators and other rights holders may use to share original works of
|
||||
authorship and other material subject to copyright and certain other rights
|
||||
specified in the public license below. The following considerations are for
|
||||
informational purposes only, are not exhaustive, and do not form part of our
|
||||
licenses.
|
||||
|
||||
Considerations for licensors: Our public licenses are intended for use by
|
||||
those authorized to give the public permission to use material in ways otherwise
|
||||
restricted by copyright and certain other rights. Our licenses are irrevocable.
|
||||
Licensors should read and understand the terms and conditions of the license
|
||||
they choose before applying it. Licensors should also secure all rights necessary
|
||||
before applying our licenses so that the public can reuse the material as
|
||||
expected. Licensors should clearly mark any material not subject to the license.
|
||||
This includes other CC-licensed material, or material used under an exception
|
||||
or limitation to copyright. More considerations for licensors : wiki.creativecommons.org/Considerations_for_licensors
|
||||
|
||||
Considerations for the public: By using one of our public licenses, a licensor
|
||||
grants the public permission to use the licensed material under specified
|
||||
terms and conditions. If the licensor's permission is not necessary for any
|
||||
reason–for example, because of any applicable exception or limitation to copyright–then
|
||||
that use is not regulated by the license. Our licenses grant only permissions
|
||||
under copyright and certain other rights that a licensor has authority to
|
||||
grant. Use of the licensed material may still be restricted for other reasons,
|
||||
including because others have copyright or other rights in the material. A
|
||||
licensor may make special requests, such as asking that all changes be marked
|
||||
or described. Although not required by our licenses, you are encouraged to
|
||||
respect those requests where reasonable. More considerations for the public
|
||||
: wiki.creativecommons.org/Considerations_for_licensees Creative Commons Attribution
|
||||
4.0 International Public License
|
||||
|
||||
By exercising the Licensed Rights (defined below), You accept and agree to
|
||||
be bound by the terms and conditions of this Creative Commons Attribution
|
||||
4.0 International Public License ("Public License"). To the extent this Public
|
||||
License may be interpreted as a contract, You are granted the Licensed Rights
|
||||
in consideration of Your acceptance of these terms and conditions, and the
|
||||
Licensor grants You such rights in consideration of benefits the Licensor
|
||||
receives from making the Licensed Material available under these terms and
|
||||
conditions.
|
||||
|
||||
Section 1 – Definitions.
|
||||
|
||||
a. Adapted Material means material subject to Copyright and Similar Rights
|
||||
that is derived from or based upon the Licensed Material and in which the
|
||||
Licensed Material is translated, altered, arranged, transformed, or otherwise
|
||||
modified in a manner requiring permission under the Copyright and Similar
|
||||
Rights held by the Licensor. For purposes of this Public License, where the
|
||||
Licensed Material is a musical work, performance, or sound recording, Adapted
|
||||
Material is always produced where the Licensed Material is synched in timed
|
||||
relation with a moving image.
|
||||
|
||||
b. Adapter's License means the license You apply to Your Copyright and Similar
|
||||
Rights in Your contributions to Adapted Material in accordance with the terms
|
||||
and conditions of this Public License.
|
||||
|
||||
c. Copyright and Similar Rights means copyright and/or similar rights closely
|
||||
related to copyright including, without limitation, performance, broadcast,
|
||||
sound recording, and Sui Generis Database Rights, without regard to how the
|
||||
rights are labeled or categorized. For purposes of this Public License, the
|
||||
rights specified in Section 2(b)(1)-(2) are not Copyright and Similar Rights.
|
||||
|
||||
d. Effective Technological Measures means those measures that, in the absence
|
||||
of proper authority, may not be circumvented under laws fulfilling obligations
|
||||
under Article 11 of the WIPO Copyright Treaty adopted on December 20, 1996,
|
||||
and/or similar international agreements.
|
||||
|
||||
e. Exceptions and Limitations means fair use, fair dealing, and/or any other
|
||||
exception or limitation to Copyright and Similar Rights that applies to Your
|
||||
use of the Licensed Material.
|
||||
|
||||
f. Licensed Material means the artistic or literary work, database, or other
|
||||
material to which the Licensor applied this Public License.
|
||||
|
||||
g. Licensed Rights means the rights granted to You subject to the terms and
|
||||
conditions of this Public License, which are limited to all Copyright and
|
||||
Similar Rights that apply to Your use of the Licensed Material and that the
|
||||
Licensor has authority to license.
|
||||
|
||||
h. Licensor means the individual(s) or entity(ies) granting rights under this
|
||||
Public License.
|
||||
|
||||
i. Share means to provide material to the public by any means or process that
|
||||
requires permission under the Licensed Rights, such as reproduction, public
|
||||
display, public performance, distribution, dissemination, communication, or
|
||||
importation, and to make material available to the public including in ways
|
||||
that members of the public may access the material from a place and at a time
|
||||
individually chosen by them.
|
||||
|
||||
j. Sui Generis Database Rights means rights other than copyright resulting
|
||||
from Directive 96/9/EC of the European Parliament and of the Council of 11
|
||||
March 1996 on the legal protection of databases, as amended and/or succeeded,
|
||||
as well as other essentially equivalent rights anywhere in the world.
|
||||
|
||||
k. You means the individual or entity exercising the Licensed Rights under
|
||||
this Public License. Your has a corresponding meaning.
|
||||
|
||||
Section 2 – Scope.
|
||||
|
||||
a. License grant.
|
||||
|
||||
1. Subject to the terms and conditions of this Public License, the Licensor
|
||||
hereby grants You a worldwide, royalty-free, non-sublicensable, non-exclusive,
|
||||
irrevocable license to exercise the Licensed Rights in the Licensed Material
|
||||
to:
|
||||
|
||||
A. reproduce and Share the Licensed Material, in whole or in part; and
|
||||
|
||||
B. produce, reproduce, and Share Adapted Material.
|
||||
|
||||
2. Exceptions and Limitations. For the avoidance of doubt, where Exceptions
|
||||
and Limitations apply to Your use, this Public License does not apply, and
|
||||
You do not need to comply with its terms and conditions.
|
||||
|
||||
3. Term. The term of this Public License is specified in Section 6(a).
|
||||
|
||||
4. Media and formats; technical modifications allowed. The Licensor authorizes
|
||||
You to exercise the Licensed Rights in all media and formats whether now known
|
||||
or hereafter created, and to make technical modifications necessary to do
|
||||
so. The Licensor waives and/or agrees not to assert any right or authority
|
||||
to forbid You from making technical modifications necessary to exercise the
|
||||
Licensed Rights, including technical modifications necessary to circumvent
|
||||
Effective Technological Measures. For purposes of this Public License, simply
|
||||
making modifications authorized by this Section 2(a)(4) never produces Adapted
|
||||
Material.
|
||||
|
||||
5. Downstream recipients.
|
||||
|
||||
A. Offer from the Licensor – Licensed Material. Every recipient of the Licensed
|
||||
Material automatically receives an offer from the Licensor to exercise the
|
||||
Licensed Rights under the terms and conditions of this Public License.
|
||||
|
||||
B. No downstream restrictions. You may not offer or impose any additional
|
||||
or different terms or conditions on, or apply any Effective Technological
|
||||
Measures to, the Licensed Material if doing so restricts exercise of the Licensed
|
||||
Rights by any recipient of the Licensed Material.
|
||||
|
||||
6. No endorsement. Nothing in this Public License constitutes or may be construed
|
||||
as permission to assert or imply that You are, or that Your use of the Licensed
|
||||
Material is, connected with, or sponsored, endorsed, or granted official status
|
||||
by, the Licensor or others designated to receive attribution as provided in
|
||||
Section 3(a)(1)(A)(i).
|
||||
|
||||
b. Other rights.
|
||||
|
||||
1. Moral rights, such as the right of integrity, are not licensed under this
|
||||
Public License, nor are publicity, privacy, and/or other similar personality
|
||||
rights; however, to the extent possible, the Licensor waives and/or agrees
|
||||
not to assert any such rights held by the Licensor to the limited extent necessary
|
||||
to allow You to exercise the Licensed Rights, but not otherwise.
|
||||
|
||||
2. Patent and trademark rights are not licensed under this Public License.
|
||||
|
||||
3. To the extent possible, the Licensor waives any right to collect royalties
|
||||
from You for the exercise of the Licensed Rights, whether directly or through
|
||||
a collecting society under any voluntary or waivable statutory or compulsory
|
||||
licensing scheme. In all other cases the Licensor expressly reserves any right
|
||||
to collect such royalties.
|
||||
|
||||
Section 3 – License Conditions.
|
||||
|
||||
Your exercise of the Licensed Rights is expressly made subject to the following
|
||||
conditions.
|
||||
|
||||
a. Attribution.
|
||||
|
||||
1. If You Share the Licensed Material (including in modified form), You must:
|
||||
|
||||
A. retain the following if it is supplied by the Licensor with the Licensed
|
||||
Material:
|
||||
|
||||
i. identification of the creator(s) of the Licensed Material and any others
|
||||
designated to receive attribution, in any reasonable manner requested by the
|
||||
Licensor (including by pseudonym if designated);
|
||||
|
||||
ii. a copyright notice;
|
||||
|
||||
iii. a notice that refers to this Public License;
|
||||
|
||||
iv. a notice that refers to the disclaimer of warranties;
|
||||
|
||||
v. a URI or hyperlink to the Licensed Material to the extent reasonably practicable;
|
||||
|
||||
B. indicate if You modified the Licensed Material and retain an indication
|
||||
of any previous modifications; and
|
||||
|
||||
C. indicate the Licensed Material is licensed under this Public License, and
|
||||
include the text of, or the URI or hyperlink to, this Public License.
|
||||
|
||||
2. You may satisfy the conditions in Section 3(a)(1) in any reasonable manner
|
||||
based on the medium, means, and context in which You Share the Licensed Material.
|
||||
For example, it may be reasonable to satisfy the conditions by providing a
|
||||
URI or hyperlink to a resource that includes the required information.
|
||||
|
||||
3. If requested by the Licensor, You must remove any of the information required
|
||||
by Section 3(a)(1)(A) to the extent reasonably practicable.
|
||||
|
||||
4. If You Share Adapted Material You produce, the Adapter's License You apply
|
||||
must not prevent recipients of the Adapted Material from complying with this
|
||||
Public License.
|
||||
|
||||
Section 4 – Sui Generis Database Rights.
|
||||
|
||||
Where the Licensed Rights include Sui Generis Database Rights that apply to
|
||||
Your use of the Licensed Material:
|
||||
|
||||
a. for the avoidance of doubt, Section 2(a)(1) grants You the right to extract,
|
||||
reuse, reproduce, and Share all or a substantial portion of the contents of
|
||||
the database;
|
||||
|
||||
b. if You include all or a substantial portion of the database contents in
|
||||
a database in which You have Sui Generis Database Rights, then the database
|
||||
in which You have Sui Generis Database Rights (but not its individual contents)
|
||||
is Adapted Material; and
|
||||
|
||||
c. You must comply with the conditions in Section 3(a) if You Share all or
|
||||
a substantial portion of the contents of the database.
|
||||
|
||||
For the avoidance of doubt, this Section 4 supplements and does not replace
|
||||
Your obligations under this Public License where the Licensed Rights include
|
||||
other Copyright and Similar Rights.
|
||||
|
||||
Section 5 – Disclaimer of Warranties and Limitation of Liability.
|
||||
|
||||
a. Unless otherwise separately undertaken by the Licensor, to the extent possible,
|
||||
the Licensor offers the Licensed Material as-is and as-available, and makes
|
||||
no representations or warranties of any kind concerning the Licensed Material,
|
||||
whether express, implied, statutory, or other. This includes, without limitation,
|
||||
warranties of title, merchantability, fitness for a particular purpose, non-infringement,
|
||||
absence of latent or other defects, accuracy, or the presence or absence of
|
||||
errors, whether or not known or discoverable. Where disclaimers of warranties
|
||||
are not allowed in full or in part, this disclaimer may not apply to You.
|
||||
|
||||
b. To the extent possible, in no event will the Licensor be liable to You
|
||||
on any legal theory (including, without limitation, negligence) or otherwise
|
||||
for any direct, special, indirect, incidental, consequential, punitive, exemplary,
|
||||
or other losses, costs, expenses, or damages arising out of this Public License
|
||||
or use of the Licensed Material, even if the Licensor has been advised of
|
||||
the possibility of such losses, costs, expenses, or damages. Where a limitation
|
||||
of liability is not allowed in full or in part, this limitation may not apply
|
||||
to You.
|
||||
|
||||
c. The disclaimer of warranties and limitation of liability provided above
|
||||
shall be interpreted in a manner that, to the extent possible, most closely
|
||||
approximates an absolute disclaimer and waiver of all liability.
|
||||
|
||||
Section 6 – Term and Termination.
|
||||
|
||||
a. This Public License applies for the term of the Copyright and Similar Rights
|
||||
licensed here. However, if You fail to comply with this Public License, then
|
||||
Your rights under this Public License terminate automatically.
|
||||
|
||||
b. Where Your right to use the Licensed Material has terminated under Section
|
||||
6(a), it reinstates:
|
||||
|
||||
1. automatically as of the date the violation is cured, provided it is cured
|
||||
within 30 days of Your discovery of the violation; or
|
||||
|
||||
2. upon express reinstatement by the Licensor.
|
||||
|
||||
c. For the avoidance of doubt, this Section 6(b) does not affect any right
|
||||
the Licensor may have to seek remedies for Your violations of this Public
|
||||
License.
|
||||
|
||||
d. For the avoidance of doubt, the Licensor may also offer the Licensed Material
|
||||
under separate terms or conditions or stop distributing the Licensed Material
|
||||
at any time; however, doing so will not terminate this Public License.
|
||||
|
||||
e. Sections 1, 5, 6, 7, and 8 survive termination of this Public License.
|
||||
|
||||
Section 7 – Other Terms and Conditions.
|
||||
|
||||
a. The Licensor shall not be bound by any additional or different terms or
|
||||
conditions communicated by You unless expressly agreed.
|
||||
|
||||
b. Any arrangements, understandings, or agreements regarding the Licensed
|
||||
Material not stated herein are separate from and independent of the terms
|
||||
and conditions of this Public License.
|
||||
|
||||
Section 8 – Interpretation.
|
||||
|
||||
a. For the avoidance of doubt, this Public License does not, and shall not
|
||||
be interpreted to, reduce, limit, restrict, or impose conditions on any use
|
||||
of the Licensed Material that could lawfully be made without permission under
|
||||
this Public License.
|
||||
|
||||
b. To the extent possible, if any provision of this Public License is deemed
|
||||
unenforceable, it shall be automatically reformed to the minimum extent necessary
|
||||
to make it enforceable. If the provision cannot be reformed, it shall be severed
|
||||
from this Public License without affecting the enforceability of the remaining
|
||||
terms and conditions.
|
||||
|
||||
c. No term or condition of this Public License will be waived and no failure
|
||||
to comply consented to unless expressly agreed to by the Licensor.
|
||||
|
||||
d. Nothing in this Public License constitutes or may be interpreted as a limitation
|
||||
upon, or waiver of, any privileges and immunities that apply to the Licensor
|
||||
or You, including from the legal processes of any jurisdiction or authority.
|
||||
|
||||
Creative Commons is not a party to its public licenses. Notwithstanding, Creative
|
||||
Commons may elect to apply one of its public licenses to material it publishes
|
||||
and in those instances will be considered the "Licensor." The text of the
|
||||
Creative Commons public licenses is dedicated to the public domain under the
|
||||
CC0 Public Domain Dedication. Except for the limited purpose of indicating
|
||||
that material is shared under a Creative Commons public license or as otherwise
|
||||
permitted by the Creative Commons policies published at creativecommons.org/policies,
|
||||
Creative Commons does not authorize the use of the trademark "Creative Commons"
|
||||
or any other trademark or logo of Creative Commons without its prior written
|
||||
consent including, without limitation, in connection with any unauthorized
|
||||
modifications to any of its public licenses or any other arrangements, understandings,
|
||||
or agreements concerning use of licensed material. For the avoidance of doubt,
|
||||
this paragraph does not form part of the public licenses.
|
||||
|
||||
Creative Commons may be contacted at creativecommons.org.
|
@@ -1,119 +0,0 @@
|
||||
Creative Commons Legal Code
|
||||
|
||||
CC0 1.0 Universal CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES
|
||||
NOT PROVIDE LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE
|
||||
AN ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS INFORMATION
|
||||
ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES REGARDING THE USE
|
||||
OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED HEREUNDER, AND DISCLAIMS
|
||||
LIABILITY FOR DAMAGES RESULTING FROM THE USE OF THIS DOCUMENT OR THE INFORMATION
|
||||
OR WORKS PROVIDED HEREUNDER.
|
||||
|
||||
Statement of Purpose
|
||||
|
||||
The laws of most jurisdictions throughout the world automatically confer exclusive
|
||||
Copyright and Related Rights (defined below) upon the creator and subsequent
|
||||
owner(s) (each and all, an "owner") of an original work of authorship and/or
|
||||
a database (each, a "Work").
|
||||
|
||||
Certain owners wish to permanently relinquish those rights to a Work for the
|
||||
purpose of contributing to a commons of creative, cultural and scientific
|
||||
works ("Commons") that the public can reliably and without fear of later claims
|
||||
of infringement build upon, modify, incorporate in other works, reuse and
|
||||
redistribute as freely as possible in any form whatsoever and for any purposes,
|
||||
including without limitation commercial purposes. These owners may contribute
|
||||
to the Commons to promote the ideal of a free culture and the further production
|
||||
of creative, cultural and scientific works, or to gain reputation or greater
|
||||
distribution for their Work in part through the use and efforts of others.
|
||||
|
||||
For these and/or other purposes and motivations, and without any expectation
|
||||
of additional consideration or compensation, the person associating CC0 with
|
||||
a Work (the "Affirmer"), to the extent that he or she is an owner of Copyright
|
||||
and Related Rights in the Work, voluntarily elects to apply CC0 to the Work
|
||||
and publicly distribute the Work under its terms, with knowledge of his or
|
||||
her Copyright and Related Rights in the Work and the meaning and intended
|
||||
legal effect of CC0 on those rights.
|
||||
|
||||
1. Copyright and Related Rights. A Work made available under CC0 may be protected
|
||||
by copyright and related or neighboring rights ("Copyright and Related Rights").
|
||||
Copyright and Related Rights include, but are not limited to, the following:
|
||||
|
||||
i. the right to reproduce, adapt, distribute, perform, display, communicate,
|
||||
and translate a Work;
|
||||
|
||||
ii. moral rights retained by the original author(s) and/or performer(s);
|
||||
|
||||
iii. publicity and privacy rights pertaining to a person's image or likeness
|
||||
depicted in a Work;
|
||||
|
||||
iv. rights protecting against unfair competition in regards to a Work, subject
|
||||
to the limitations in paragraph 4(a), below;
|
||||
|
||||
v. rights protecting the extraction, dissemination, use and reuse of data
|
||||
in a Work;
|
||||
|
||||
vi. database rights (such as those arising under Directive 96/9/EC of the
|
||||
European Parliament and of the Council of 11 March 1996 on the legal protection
|
||||
of databases, and under any national implementation thereof, including any
|
||||
amended or successor version of such directive); and
|
||||
|
||||
vii. other similar, equivalent or corresponding rights throughout the world
|
||||
based on applicable law or treaty, and any national implementations thereof.
|
||||
|
||||
2. Waiver. To the greatest extent permitted by, but not in contravention of,
|
||||
applicable law, Affirmer hereby overtly, fully, permanently, irrevocably and
|
||||
unconditionally waives, abandons, and surrenders all of Affirmer's Copyright
|
||||
and Related Rights and associated claims and causes of action, whether now
|
||||
known or unknown (including existing as well as future claims and causes of
|
||||
action), in the Work (i) in all territories worldwide, (ii) for the maximum
|
||||
duration provided by applicable law or treaty (including future time extensions),
|
||||
(iii) in any current or future medium and for any number of copies, and (iv)
|
||||
for any purpose whatsoever, including without limitation commercial, advertising
|
||||
or promotional purposes (the "Waiver"). Affirmer makes the Waiver for the
|
||||
benefit of each member of the public at large and to the detriment of Affirmer's
|
||||
heirs and successors, fully intending that such Waiver shall not be subject
|
||||
to revocation, rescission, cancellation, termination, or any other legal or
|
||||
equitable action to disrupt the quiet enjoyment of the Work by the public
|
||||
as contemplated by Affirmer's express Statement of Purpose.
|
||||
|
||||
3. Public License Fallback. Should any part of the Waiver for any reason be
|
||||
judged legally invalid or ineffective under applicable law, then the Waiver
|
||||
shall be preserved to the maximum extent permitted taking into account Affirmer's
|
||||
express Statement of Purpose. In addition, to the extent the Waiver is so
|
||||
judged Affirmer hereby grants to each affected person a royalty-free, non
|
||||
transferable, non sublicensable, non exclusive, irrevocable and unconditional
|
||||
license to exercise Affirmer's Copyright and Related Rights in the Work (i)
|
||||
in all territories worldwide, (ii) for the maximum duration provided by applicable
|
||||
law or treaty (including future time extensions), (iii) in any current or
|
||||
future medium and for any number of copies, and (iv) for any purpose whatsoever,
|
||||
including without limitation commercial, advertising or promotional purposes
|
||||
(the "License"). The License shall be deemed effective as of the date CC0
|
||||
was applied by Affirmer to the Work. Should any part of the License for any
|
||||
reason be judged legally invalid or ineffective under applicable law, such
|
||||
partial invalidity or ineffectiveness shall not invalidate the remainder of
|
||||
the License, and in such case Affirmer hereby affirms that he or she will
|
||||
not (i) exercise any of his or her remaining Copyright and Related Rights
|
||||
in the Work or (ii) assert any associated claims and causes of action with
|
||||
respect to the Work, in either case contrary to Affirmer's express Statement
|
||||
of Purpose.
|
||||
|
||||
4. Limitations and Disclaimers.
|
||||
|
||||
a. No trademark or patent rights held by Affirmer are waived, abandoned, surrendered,
|
||||
licensed or otherwise affected by this document.
|
||||
|
||||
b. Affirmer offers the Work as-is and makes no representations or warranties
|
||||
of any kind concerning the Work, express, implied, statutory or otherwise,
|
||||
including without limitation warranties of title, merchantability, fitness
|
||||
for a particular purpose, non infringement, or the absence of latent or other
|
||||
defects, accuracy, or the present or absence of errors, whether or not discoverable,
|
||||
all to the greatest extent permissible under applicable law.
|
||||
|
||||
c. Affirmer disclaims responsibility for clearing rights of other persons
|
||||
that may apply to the Work or any use thereof, including without limitation
|
||||
any person's Copyright and Related Rights in the Work. Further, Affirmer disclaims
|
||||
responsibility for obtaining any necessary consents, permissions or other
|
||||
rights required for any use of the Work.
|
||||
|
||||
d. Affirmer understands and acknowledges that Creative Commons is not a party
|
||||
to this document and has no duty or obligation with respect to this CC0 or
|
||||
use of the Work.
|
@@ -1,488 +0,0 @@
|
||||
|
||||
The KD Tools Library is Copyright (C) 2001-2010 Klaralvdalens Datakonsult AB.
|
||||
|
||||
You may use, distribute and copy the KD Tools Library under the terms of
|
||||
GNU Library General Public License version 2, which is displayed below.
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
GNU LIBRARY GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1991 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 library GPL. It is
|
||||
numbered 2 because it goes with version 2 of the ordinary GPL.]
|
||||
|
||||
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 Library General Public License, applies to some
|
||||
specially designated Free Software Foundation software, and to any
|
||||
other libraries whose authors decide to use it. You can use it for
|
||||
your libraries, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, 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 or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the 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 a program 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.
|
||||
|
||||
Our method of protecting your rights has two steps: (1) copyright
|
||||
the library, and (2) offer you this license which gives you legal
|
||||
permission to copy, distribute and/or modify the library.
|
||||
|
||||
Also, for each distributor's protection, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
library. If the library is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original
|
||||
version, so that any problems introduced by others will not reflect on
|
||||
the original authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that companies distributing free
|
||||
software will individually obtain patent licenses, thus in effect
|
||||
transforming the program into proprietary software. To prevent this,
|
||||
we have made it clear that any patent must be licensed for everyone's
|
||||
free use or not licensed at all.
|
||||
|
||||
Most GNU software, including some libraries, is covered by the ordinary
|
||||
GNU General Public License, which was designed for utility programs. This
|
||||
license, the GNU Library General Public License, applies to certain
|
||||
designated libraries. This license is quite different from the ordinary
|
||||
one; be sure to read it in full, and don't assume that anything in it is
|
||||
the same as in the ordinary license.
|
||||
|
||||
The reason we have a separate public license for some libraries is that
|
||||
they blur the distinction we usually make between modifying or adding to a
|
||||
program and simply using it. Linking a program with a library, without
|
||||
changing the library, is in some sense simply using the library, and is
|
||||
analogous to running a utility program or application program. However, in
|
||||
a textual and legal sense, the linked executable is a combined work, a
|
||||
derivative of the original library, and the ordinary General Public License
|
||||
treats it as such.
|
||||
|
||||
Because of this blurred distinction, using the ordinary General
|
||||
Public License for libraries did not effectively promote software
|
||||
sharing, because most developers did not use the libraries. We
|
||||
concluded that weaker conditions might promote sharing better.
|
||||
|
||||
However, unrestricted linking of non-free programs would deprive the
|
||||
users of those programs of all benefit from the free status of the
|
||||
libraries themselves. This Library General Public License is intended to
|
||||
permit developers of non-free programs to use free libraries, while
|
||||
preserving your freedom as a user of such programs to change the free
|
||||
libraries that are incorporated in them. (We have not seen how to achieve
|
||||
this as regards changes in header files, but we have achieved it as regards
|
||||
changes in the actual functions of the Library.) The hope is that this
|
||||
will lead to faster development of free libraries.
|
||||
|
||||
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, while the latter only
|
||||
works together with the library.
|
||||
|
||||
Note that it is possible for a library to be covered by the ordinary
|
||||
General Public License rather than by this special one.
|
||||
|
||||
GNU LIBRARY GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License Agreement applies to any software library which
|
||||
contains a notice placed by the copyright holder or other authorized
|
||||
party saying it may be distributed under the terms of this Library
|
||||
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 compile 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) 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.
|
||||
|
||||
c) 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.
|
||||
|
||||
d) 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 source code 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 to
|
||||
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 Library 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.
|
||||
|
||||
<one line to give the library's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 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
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library 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.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1990
|
||||
Ty Coon, President of Vice
|
||||
|
||||
That's all there is to it!
|
@@ -1,467 +0,0 @@
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
< one line to give the library's name and an idea of what it does. >
|
||||
|
||||
Copyright (C) < year > < name of author >
|
||||
|
||||
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.
|
||||
|
||||
< signature of Ty Coon > , 1 April 1990
|
||||
|
||||
Ty Coon, President of Vice
|
||||
|
||||
That's all there is to it!
|
@@ -1,163 +0,0 @@
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||
|
||||
Everyone is permitted to copy and distribute verbatim copies of this license
|
||||
document, but changing it is not allowed.
|
||||
|
||||
This version of the GNU Lesser General Public License incorporates the terms
|
||||
and conditions of version 3 of the GNU General Public License, supplemented
|
||||
by the additional permissions listed below.
|
||||
|
||||
0. Additional Definitions.
|
||||
|
||||
|
||||
|
||||
As used herein, "this License" refers to version 3 of the GNU Lesser General
|
||||
Public License, and the "GNU GPL" refers to version 3 of the GNU General Public
|
||||
License.
|
||||
|
||||
|
||||
|
||||
"The Library" refers to a covered work governed by this License, other than
|
||||
an Application or a Combined Work as defined below.
|
||||
|
||||
|
||||
|
||||
An "Application" is any work that makes use of an interface provided by the
|
||||
Library, but which is not otherwise based on the Library. Defining a subclass
|
||||
of a class defined by the Library is deemed a mode of using an interface provided
|
||||
by the Library.
|
||||
|
||||
|
||||
|
||||
A "Combined Work" is a work produced by combining or linking an Application
|
||||
with the Library. The particular version of the Library with which the Combined
|
||||
Work was made is also called the "Linked Version".
|
||||
|
||||
|
||||
|
||||
The "Minimal Corresponding Source" for a Combined Work means the Corresponding
|
||||
Source for the Combined Work, excluding any source code for portions of the
|
||||
Combined Work that, considered in isolation, are based on the Application,
|
||||
and not on the Linked Version.
|
||||
|
||||
|
||||
|
||||
The "Corresponding Application Code" for a Combined Work means the object
|
||||
code and/or source code for the Application, including any data and utility
|
||||
programs needed for reproducing the Combined Work from the Application, but
|
||||
excluding the System Libraries of the Combined Work.
|
||||
|
||||
1. Exception to Section 3 of the GNU GPL.
|
||||
|
||||
You may convey a covered work under sections 3 and 4 of this License without
|
||||
being bound by section 3 of the GNU GPL.
|
||||
|
||||
2. Conveying Modified Versions.
|
||||
|
||||
If you modify a copy of the Library, and, in your modifications, a facility
|
||||
refers to a function or data to be supplied by an Application that uses the
|
||||
facility (other than as an argument passed when the facility is invoked),
|
||||
then you may convey a copy of the modified version:
|
||||
|
||||
a) under this License, provided that you make a good faith effort to ensure
|
||||
that, in the event an Application does not supply the function or data, the
|
||||
facility still operates, and performs whatever part of its purpose remains
|
||||
meaningful, or
|
||||
|
||||
b) under the GNU GPL, with none of the additional permissions of this License
|
||||
applicable to that copy.
|
||||
|
||||
3. Object Code Incorporating Material from Library Header Files.
|
||||
|
||||
The object code form of an Application may incorporate material from a header
|
||||
file that is part of the Library. You may convey such object code under terms
|
||||
of your choice, provided that, if the incorporated material is not limited
|
||||
to numerical parameters, data structure layouts and accessors, or small macros,
|
||||
inline functions and templates (ten or fewer lines in length), you do both
|
||||
of the following:
|
||||
|
||||
a) Give prominent notice with each copy of the object code that the Library
|
||||
is used in it and that the Library and its use are covered by this License.
|
||||
|
||||
b) Accompany the object code with a copy of the GNU GPL and this license document.
|
||||
|
||||
4. Combined Works.
|
||||
|
||||
You may convey a Combined Work under terms of your choice that, taken together,
|
||||
effectively do not restrict modification of the portions of the Library contained
|
||||
in the Combined Work and reverse engineering for debugging such modifications,
|
||||
if you also do each of the following:
|
||||
|
||||
a) Give prominent notice with each copy of the Combined Work that the Library
|
||||
is used in it and that the Library and its use are covered by this License.
|
||||
|
||||
b) Accompany the Combined Work with a copy of the GNU GPL and this license
|
||||
document.
|
||||
|
||||
c) For a Combined Work that displays copyright notices during execution, include
|
||||
the copyright notice for the Library among these notices, as well as a reference
|
||||
directing the user to the copies of the GNU GPL and this license document.
|
||||
|
||||
d) Do one of the following:
|
||||
|
||||
0) Convey the Minimal Corresponding Source under the terms of this License,
|
||||
and the Corresponding Application Code in a form suitable for, and under terms
|
||||
that permit, the user to recombine or relink the Application with a modified
|
||||
version of the Linked Version to produce a modified Combined Work, in the
|
||||
manner specified by section 6 of the GNU GPL for conveying Corresponding Source.
|
||||
|
||||
1) Use a suitable shared library mechanism for linking with the Library. A
|
||||
suitable mechanism is one that (a) uses at run time a copy of the Library
|
||||
already present on the user's computer system, and (b) will operate properly
|
||||
with a modified version of the Library that is interface-compatible with the
|
||||
Linked Version.
|
||||
|
||||
e) Provide Installation Information, but only if you would otherwise be required
|
||||
to provide such information under section 6 of the GNU GPL, and only to the
|
||||
extent that such information is necessary to install and execute a modified
|
||||
version of the Combined Work produced by recombining or relinking the Application
|
||||
with a modified version of the Linked Version. (If you use option 4d0, the
|
||||
Installation Information must accompany the Minimal Corresponding Source and
|
||||
Corresponding Application Code. If you use option 4d1, you must provide the
|
||||
Installation Information in the manner specified by section 6 of the GNU GPL
|
||||
for conveying Corresponding Source.)
|
||||
|
||||
5. Combined Libraries.
|
||||
|
||||
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 that are
|
||||
not Applications and are not covered by this License, and convey such a combined
|
||||
library under terms of your choice, if you do both of the following:
|
||||
|
||||
a) Accompany the combined library with a copy of the same work based on the
|
||||
Library, uncombined with any other library facilities, conveyed under the
|
||||
terms of this License.
|
||||
|
||||
b) Give prominent notice with the combined library that part of it is a work
|
||||
based on the Library, and explaining where to find the accompanying uncombined
|
||||
form of the same work.
|
||||
|
||||
6. Revised Versions of the GNU Lesser General Public License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of the
|
||||
GNU 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 as you
|
||||
received it specifies that a certain numbered version of the GNU Lesser General
|
||||
Public License "or any later version" applies to it, you have the option of
|
||||
following the terms and conditions either of that published version or of
|
||||
any later version published by the Free Software Foundation. If the Library
|
||||
as you received it does not specify a version number of the GNU Lesser General
|
||||
Public License, you may choose any version of the GNU Lesser General Public
|
||||
License ever published by the Free Software Foundation.
|
||||
|
||||
If the Library as you received it specifies that a proxy can decide whether
|
||||
future versions of the GNU Lesser General Public License shall apply, that
|
||||
proxy's public statement of acceptance of any version is permanent authorization
|
||||
for you to choose that version for the Library.
|
@@ -1,19 +0,0 @@
|
||||
MIT License Copyright (c) <year> <copyright holders>
|
||||
|
||||
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 (including the next
|
||||
paragraph) 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.
|
100
README.md
100
README.md
@@ -1,64 +1,54 @@
|
||||
<!-- SPDX-FileCopyrightText: no
|
||||
SPDX-License-Identifier: CC0-1.0
|
||||
-->
|
||||
|
||||
# Calamares: Distribution-Independent Installer Framework
|
||||
### Calamares: Distribution-Independent Installer Framework
|
||||
---------
|
||||
|
||||
[](https://github.com/calamares/calamares/releases)
|
||||
[](https://github.com/calamares/calamares/actions?query=workflow%3Aci)
|
||||
[](https://travis-ci.org/calamares/calamares)
|
||||
[](https://calamares.io/ci/job/calamares-master/)
|
||||
[](https://scan.coverity.com/projects/5389)
|
||||
[](https://github.com/calamares/calamares/blob/calamares/LICENSE)
|
||||
[](https://github.com/calamares/calamares/blob/master/LICENSE)
|
||||
|
||||
| [Report a Bug](https://calamares.io/bugs/) | [Contribute](https://github.com/calamares/calamares/blob/master/HACKING.md) | [Translate](https://www.transifex.com/projects/p/calamares/) | Freenode (IRC): #calamares |
|
||||
|:-----------------------------------------:|:----------------------:|:-----------------------:|:--------------------------:|
|
||||
|
||||
### Dependencies
|
||||
|
||||
Compiler with C++11 support: GCC >= 4.8.4 or Clang >= 3.5.1
|
||||
|
||||
| Main | Welcome module | Partitioning module | Bootloader module | Unpackfs module |
|
||||
|:----:|:--------------:|:-------------------:|:-----------------:|:---------------:|
|
||||
| CMake >= 2.8.12 | NetworkManager | extra-cmake-modules | systemd-boot or GRUB2 | squashfs-tools |
|
||||
| Qt >= 5.3 | UPower | kconfig (part of KF5) | sgdisk | rsync |
|
||||
| yaml-cpp >= 0.5.1 | | solid (part of KF5) | | |
|
||||
| Python >= 3.3 | | kcoreaddons (part of KF5) | | |
|
||||
| Boost.Python >= 1.55.0 | | ki18n (part of KF5) | | |
|
||||
| dmidecode | | sgdisk | | |
|
||||
|
||||
### Deployment
|
||||
[__Setting up branding__](https://github.com/calamares/calamares/blob/master/src/branding/README.md)
|
||||
|
||||
[__Working with modules__](https://github.com/calamares/calamares/blob/master/src/modules/README.md)
|
||||
|
||||
|
||||
| [Report a Bug](https://github.com/calamares/calamares/issues/new) | [Translate](https://www.transifex.com/projects/p/calamares/) | [Contribute](CONTRIBUTING.md) | [Freenode (IRC): #calamares](https://webchat.freenode.net/?channel=#calamares?nick=guest) | [Wiki](https://github.com/calamares/calamares/wiki) |
|
||||
|:--:|:--:|:--:|:--:|:--:|
|
||||
|
||||
|
||||
> Calamares is a distribution-independent system installer, with an advanced partitioning
|
||||
> feature for both manual and automated partitioning operations. Calamares is designed to
|
||||
> be customizable by distribution maintainers without need for cumbersome patching,
|
||||
> thanks to third party branding and external modules support.
|
||||
|
||||
## Target Audience
|
||||
|
||||
Calamares is a Linux installer; users who install Linux on a computer will hopefully
|
||||
use it just **once**, to install their Linux distribution. Calamares is not
|
||||
a "ready to use" application: distributions apply a huge amount of customisation
|
||||
and configuration to Calamares, and the target audience for this repository
|
||||
is those distributions, and the people who make those Linux distro's.
|
||||
|
||||
Calamares has some [generic user documentation](https://github.com/calamares/calamares/wiki/Use-Guide)
|
||||
for end-users, but most of what we have is for distro developers.
|
||||
|
||||
## Getting Calamares
|
||||
|
||||
Clone Calamares from GitHub. The default branch is called *calamares*.
|
||||
|
||||
### Building
|
||||
Clone Calamares from GitHub and `cd` into the calamares directory, then:
|
||||
```
|
||||
git clone https://github.com/calamares/calamares.git
|
||||
$ git submodule init
|
||||
$ git submodule update
|
||||
$ mkdir build
|
||||
$ cd build
|
||||
$ cmake -DCMAKE_BUILD_TYPE=Debug -DWITH_PARTITIONMANAGER=1 ..
|
||||
$ make
|
||||
```
|
||||
|
||||
Calamares is a KDE-Frameworks and Qt-based, C++17, CMake-built application.
|
||||
The dependencies are explained in [CONTRIBUTING.md](CONTRIBUTING.md).
|
||||
|
||||
## Contributing to Calamares
|
||||
|
||||
Calamares welcomes PRs. New issues are welcome, too.
|
||||
There are both the Calamares **core** repository (this one),
|
||||
and an *extensions** repository ([Calamares extensions](https://github.com/calamares/calamares-extensions).
|
||||
|
||||
Contributions to code, modules, documentation, the wiki and the website are all welcome.
|
||||
There is more information in the [CONTRIBUTING.md](CONTRIBUTING.md) file.
|
||||
|
||||
## Join the Conversation
|
||||
|
||||
GitHub Issues are **one** place for discussing Calamares if there are concrete
|
||||
problems or a new feature to discuss.
|
||||
|
||||
Regular Calamares development chit-chat happens on old-school IRC
|
||||
(no registration required). Responsiveness is best during the day
|
||||
in Europe, but feel free to idle.
|
||||
|
||||
[](https://webchat.freenode.net/?channel=#calamares?nick=guest|)
|
||||
### Design Notes
|
||||
Calamares is currently split as follows:
|
||||
1. __libcalamares__ - The back-end library.
|
||||
* Only depends on QtCore, yaml-cpp, Python and Boost.Python.
|
||||
* Provides a job queue and generic jobs.
|
||||
* Comes with 3 job interfaces: C++, Python and process (the latter is very limited).
|
||||
2. __libcalamaresui__ - The front-end library.
|
||||
* Same dependencies as libcalamares, plus QtWidgets and other Qt modules.
|
||||
* Comes with a module loading system, for different kinds of plugins.
|
||||
* Supports branding components.
|
||||
* Presents a bunch of pages in a scripted order, enqueues jobs in the back-end library.
|
||||
3. __calamares__ - The main executable.
|
||||
* A thin wrapper around libcalamaresui; starts up and plugs together all the parts.
|
||||
|
@@ -1,239 +1,12 @@
|
||||
[Desktop Entry]
|
||||
Type=Application
|
||||
Version=1.0
|
||||
Name=Install System
|
||||
Name=Calamares
|
||||
GenericName=System Installer
|
||||
Keywords=calamares;system;installer;
|
||||
TryExec=calamares
|
||||
Exec=pkexec /usr/bin/calamares
|
||||
Comment=Calamares — System Installer
|
||||
Icon=calamares
|
||||
Terminal=false
|
||||
StartupNotify=true
|
||||
StartupNotify=false
|
||||
Categories=Qt;System;
|
||||
X-AppStream-Ignore=true
|
||||
|
||||
Name[ar]=تثبيت النظام
|
||||
Icon[ar]=كالامارس
|
||||
GenericName[ar]=مثبت النظام
|
||||
Comment[ar]=كالامارس - مثبت النظام
|
||||
Name[as]=চিছটেম ইনস্তল কৰক
|
||||
Icon[as]=কেলামাৰেচ
|
||||
GenericName[as]=চিছটেম ইনস্তলাৰ
|
||||
Comment[as]=কেলামাৰেচ — চিছটেম ইনস্তলাৰ
|
||||
Name[az]=Sistemi Quraşdırmaq
|
||||
Icon[az]=calamares
|
||||
GenericName[az]=Sistem Quraşdırıcısı
|
||||
Comment[az]=Calamares Sistem Quraşdırıcısı
|
||||
Name[be]=Усталяваць сістэму
|
||||
Icon[be]=calamares
|
||||
GenericName[be]=Усталёўшчык сістэмы
|
||||
Comment[be]=Calamares — усталёўшчык сістэмы
|
||||
Name[bg]=Инсталирай системата
|
||||
Icon[bg]=calamares
|
||||
GenericName[bg]=Системен Инсталатор
|
||||
Comment[bg]=Calamares — Системен Инсталатор
|
||||
Name[bn]=সিস্টেম ইনস্টল করুন
|
||||
Icon[bn]=ক্যালামারেস
|
||||
GenericName[bn]=সিস্টেম ইনস্টলার
|
||||
Comment[bn]=ক্যালামারেস - সিস্টেম ইনস্টলার
|
||||
Name[ca]=Instal·la el sistema
|
||||
Icon[ca]=calamares
|
||||
GenericName[ca]=Instal·lador de sistema
|
||||
Comment[ca]=Calamares — Instal·lador de sistema
|
||||
Name[da]=Installér system
|
||||
Icon[da]=calamares
|
||||
GenericName[da]=Systeminstallationsprogram
|
||||
Comment[da]=Calamares — Systeminstallationsprogram
|
||||
Name[de]=System installieren
|
||||
Icon[de]=calamares
|
||||
GenericName[de]=Installation des Betriebssystems
|
||||
Comment[de]=Calamares - Installation des Betriebssystems
|
||||
Name[el]=Εγκατάσταση συστήματος
|
||||
Icon[el]=calamares
|
||||
GenericName[el]=Εγκατάσταση συστήματος
|
||||
Comment[el]=Calamares — Εγκατάσταση συστήματος
|
||||
Name[en_GB]=Install System
|
||||
Icon[en_GB]=calamares
|
||||
GenericName[en_GB]=System Installer
|
||||
Comment[en_GB]=Calamares — System Installer
|
||||
Name[es]=Instalar Sistema
|
||||
Icon[es]=calamares
|
||||
GenericName[es]=Instalador del Sistema
|
||||
Comment[es]=Calamares — Instalador del Sistema
|
||||
Name[et]=Paigalda süsteem
|
||||
Icon[et]=calamares
|
||||
GenericName[et]=Süsteemipaigaldaja
|
||||
Comment[et]=Calamares — süsteemipaigaldaja
|
||||
Name[eu]=Sistema instalatu
|
||||
Icon[eu]=calamares
|
||||
GenericName[eu]=Sistema instalatzailea
|
||||
Comment[eu]=Calamares - sistema instalatzailea
|
||||
Name[fa]=نصب سامانه
|
||||
Icon[fa]=کالامارس
|
||||
GenericName[fa]=نصبکنندهٔ سامانه
|
||||
Comment[fa]=کالامارس — نصبکنندهٔ سامانه
|
||||
Name[es_PR]=Instalar el sistema
|
||||
Name[fr]=Installer le système
|
||||
Icon[fr]=calamares
|
||||
GenericName[fr]=Installateur système
|
||||
Comment[fr]=Calamares - Installateur système
|
||||
Name[fur]=Instale il sisteme
|
||||
Icon[fur]=calamares
|
||||
GenericName[fur]=Program di instalazion dal sisteme
|
||||
Comment[fur]=Calamares — Program di instalazion dal sisteme
|
||||
Name[gl]=Instalación do Sistema
|
||||
Icon[gl]=calamares
|
||||
GenericName[gl]=Instalador de sistemas
|
||||
Comment[gl]=Calamares — Instalador de sistemas
|
||||
Name[he]=התקנת מערכת
|
||||
Icon[he]=calamares
|
||||
GenericName[he]=אשף התקנה
|
||||
Comment[he]=Calamares - אשף התקנה
|
||||
Name[hi]=सिस्टम इंस्टॉल करें
|
||||
Icon[hi]=calamares
|
||||
GenericName[hi]=सिस्टम इंस्टॉलर
|
||||
Comment[hi]=Calamares — सिस्टम इंस्टॉलर
|
||||
Name[hr]=Instaliraj sustav
|
||||
Icon[hr]=calamares
|
||||
GenericName[hr]=Instalacija sustava
|
||||
Comment[hr]=Calamares — Instalacija sustava
|
||||
Name[ie]=Installar li sistema
|
||||
Icon[ie]=calamares
|
||||
GenericName[ie]=Installator del sistema
|
||||
Comment[ie]=Calamares — Installator del sistema
|
||||
Name[hu]=Rendszer telepítése
|
||||
Icon[hu]=calamares
|
||||
GenericName[hu]=Rendszertelepítő
|
||||
Comment[hu]=Calamares – Rendszertelepítő
|
||||
Name[id]=Instal Sistem
|
||||
Icon[id]=calamares
|
||||
GenericName[id]=Pemasang
|
||||
Comment[id]=Calamares — Pemasang Sistem
|
||||
Name[is]=Setja upp kerfið
|
||||
Icon[is]=calamares
|
||||
GenericName[is]=Kerfis uppsetning
|
||||
Comment[is]=Calamares — Kerfis uppsetning
|
||||
Name[cs_CZ]=Nainstalovat systém
|
||||
Icon[cs_CZ]=calamares
|
||||
GenericName[cs_CZ]=Instalátor systému
|
||||
Comment[cs_CZ]=Calamares – instalátor operačních systémů
|
||||
Name[ja]=システムをインストール
|
||||
Icon[ja]=calamares
|
||||
GenericName[ja]=システムインストーラー
|
||||
Comment[ja]=Calamares — システムインストーラー
|
||||
Name[ko]=시스템 설치
|
||||
Icon[ko]=깔라마레스
|
||||
GenericName[ko]=시스템 설치 관리자
|
||||
Comment[ko]=깔라마레스 — 시스템 설치 관리자
|
||||
Name[lt]=Įdiegti Sistemą
|
||||
Icon[lt]=calamares
|
||||
GenericName[lt]=Sistemos diegimas į kompiuterį
|
||||
Comment[lt]=Calamares — Sistemos diegimo programa
|
||||
Name[it_IT]=Installa il sistema
|
||||
Icon[it_IT]=calamares
|
||||
GenericName[it_IT]=Programma d'installazione del sistema
|
||||
Comment[it_IT]=Calamares — Programma d'installazione del sistema
|
||||
Name[mk]=Инсталирај го системот
|
||||
Icon[mk]=calamares
|
||||
GenericName[mk]=Системен Инсталер
|
||||
Comment[mk]=Calamares - Системен Инсталер
|
||||
Name[ml]=സിസ്റ്റം ഇൻസ്റ്റാൾ ചെയ്യുക
|
||||
Icon[ml]=കലാമാരേസ്
|
||||
GenericName[ml]=സിസ്റ്റം ഇൻസ്റ്റാളർ
|
||||
Comment[ml]=കലാമാരേസ് - സിസ്റ്റം ഇൻസ്റ്റാളർ
|
||||
Name[nb]=Installer System
|
||||
Icon[nb]=calamares
|
||||
GenericName[nb]=Systeminstallatør
|
||||
Comment[nb]=Calamares-systeminstallatør
|
||||
Name[nl]=Installeer systeem
|
||||
Icon[nl]=calamares
|
||||
GenericName[nl]=Installatieprogramma
|
||||
Comment[nl]=Calamares — Installatieprogramma
|
||||
Name[az_AZ]=Sistemi quraşdırmaq
|
||||
Icon[az_AZ]=calamares
|
||||
GenericName[az_AZ]=Sistem quraşdırcısı
|
||||
Comment[az_AZ]=Calamares — Sistem Quraşdırıcısı
|
||||
Name[pl]=Zainstaluj system
|
||||
Icon[pl]=calamares
|
||||
GenericName[pl]=Instalator systemu
|
||||
Comment[pl]=Calamares — Instalator systemu
|
||||
Name[pt_BR]=Sistema de Instalação
|
||||
Icon[pt_BR]=calamares
|
||||
GenericName[pt_BR]=Instalador de Sistema
|
||||
Comment[pt_BR]=Calamares — Instalador de Sistema
|
||||
Name[ro]=Instalează sistemul
|
||||
Icon[ro]=calamares
|
||||
GenericName[ro]=Instalator de sistem
|
||||
Comment[ro]=Calamares — Instalator de sistem
|
||||
Name[ru]=Установить систему
|
||||
Icon[ru]=calamares
|
||||
GenericName[ru]=Установщик системы
|
||||
Comment[ru]=Calamares - Установщик системы
|
||||
Name[sk]=Inštalovať systém
|
||||
Icon[sk]=calamares
|
||||
GenericName[sk]=Inštalátor systému
|
||||
Comment[sk]=Calamares — Inštalátor systému
|
||||
Name[sl]=Namesti sistem
|
||||
Name[sq]=Instalo Sistemin
|
||||
Icon[sq]=calamares
|
||||
GenericName[sq]=Instalues Sistemi
|
||||
Comment[sq]=Calamares — Instalues Sistemi
|
||||
Name[fi_FI]=Asenna Järjestelmä
|
||||
Icon[fi_FI]=calamares
|
||||
GenericName[fi_FI]=Järjestelmän Asennusohjelma
|
||||
Comment[fi_FI]=Calamares — Järjestelmän Asentaja
|
||||
Name[sr@latin]=Instaliraj sistem
|
||||
Name[sr]=Инсталирај систем
|
||||
Icon[sr]=calamares
|
||||
GenericName[sr]=Инсталатер система
|
||||
Comment[sr]=Каламарес — инсталатер система
|
||||
Name[sv]=Installera system
|
||||
Icon[sv]=calamares
|
||||
GenericName[sv]=Systeminstallerare
|
||||
Comment[sv]=Calamares — Systeminstallerare
|
||||
Name[tg]=Насбкунии низом
|
||||
Icon[tg]=calamares
|
||||
GenericName[tg]=Насбкунандаи низомӣ
|
||||
Comment[tg]=Calamares — Насбкунандаи низомӣ
|
||||
Name[th]=ติดตั้งระบบ
|
||||
Name[uk]=Встановити Систему
|
||||
Icon[uk]=calamares
|
||||
GenericName[uk]=Встановлювач системи
|
||||
Comment[uk]=Calamares - Встановлювач системи
|
||||
Name[vi]=Cài đặt hệ thống
|
||||
Icon[vi]=calamares
|
||||
GenericName[vi]=Bộ cài đặt hệ thống
|
||||
Comment[vi]=Calamares — Bộ cài đặt hệ thống
|
||||
Name[zh_CN]=安装系统
|
||||
Icon[zh_CN]=calamares
|
||||
GenericName[zh_CN]=系统安装程序
|
||||
Comment[zh_CN]=Calamares — 系统安装程序
|
||||
Name[zh_TW]=安裝系統
|
||||
Icon[zh_TW]=calamares
|
||||
GenericName[zh_TW]=系統安裝程式
|
||||
Comment[zh_TW]=Calamares ── 系統安裝程式
|
||||
Name[ast]=Instalar el sistema
|
||||
Icon[ast]=calamares
|
||||
GenericName[ast]=Instalador del sistema
|
||||
Comment[ast]=Calamares — Instalador del sistema
|
||||
Name[eo]=Instali Sistemo
|
||||
Icon[eo]=calamares
|
||||
GenericName[eo]=Sistema Instalilo
|
||||
Comment[eo]=Calamares — Sistema Instalilo
|
||||
Name[ne_NP]= सिस्टम इन्स्टल गर्नुहोस्
|
||||
Icon[ne_NP]=Calamares
|
||||
GenericName[ne_NP]=सिस्टम इन्स्टलर
|
||||
Comment[ne_NP]=Calamares - सिस्टम इन्स्टलर
|
||||
Name[es_MX]=Instalar el Sistema
|
||||
Icon[es_MX]=calamares
|
||||
GenericName[es_MX]=Instalador del sistema
|
||||
Comment[es_MX]=Calamares - Instalador del sistema
|
||||
Name[pt_PT]=Instalar Sistema
|
||||
Icon[pt_PT]=calamares
|
||||
GenericName[pt_PT]=Instalador de Sistema
|
||||
Comment[pt_PT]=Calamares - Instalador de Sistema
|
||||
Name[tr_TR]=Sistemi Yükle
|
||||
Icon[tr_TR]=calamares
|
||||
GenericName[tr_TR]=Sistem Yükleyici
|
||||
Comment[tr_TR]=Calamares — Sistem Yükleyici
|
||||
|
@@ -1,15 +0,0 @@
|
||||
[Desktop Entry]
|
||||
Type=Application
|
||||
Version=1.0
|
||||
Name=Install System
|
||||
GenericName=System Installer
|
||||
Keywords=calamares;system;installer;
|
||||
TryExec=calamares
|
||||
Exec=pkexec /usr/bin/calamares
|
||||
Comment=Calamares — System Installer
|
||||
Icon=calamares
|
||||
Terminal=false
|
||||
StartupNotify=true
|
||||
Categories=Qt;System;
|
||||
X-AppStream-Ignore=true
|
||||
|
274
ci/AppImage.sh
274
ci/AppImage.sh
@@ -1,274 +0,0 @@
|
||||
#! /bin/sh
|
||||
#
|
||||
# SPDX-FileCopyrightText: 2019 Adriaan de Groot <groot@kde.org>
|
||||
# SPDX-License-Identifier: BSD-2-Clause
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
#
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
### END LICENSES
|
||||
|
||||
### USAGE
|
||||
#
|
||||
# Shell script to help build an AppImage for Calamares.
|
||||
#
|
||||
# Usage:
|
||||
# AppImage.sh [-T|--tools-dir <dir>]
|
||||
# [-C|--cmake-args <args>]
|
||||
# [-c|--config-dir <dir>]
|
||||
# [-s|--skip-build]
|
||||
# [-p|--with-python]
|
||||
#
|
||||
# Multiple --cmake-args arguments will be collected together and passed to
|
||||
# CMake before building the application.
|
||||
#
|
||||
# Use --tools-dir to indicate where the linuxdeploy tools are located.
|
||||
#
|
||||
# Use --config to copy a config-directory (with settings.conf and others)
|
||||
# into the resulting image,
|
||||
#
|
||||
# Option --skip-build assumes that there is an already-built Calamares
|
||||
# available in the AppImage build directory; use this when you are, e.g.
|
||||
# re-packaging the image with different configuration. Option --with-python
|
||||
# adds the Conda Python packaging ecosystem to the AppImage, which will make
|
||||
# it **more** portable by disconnecting from the system Python libraries.
|
||||
#
|
||||
# The build process for AppImage proceeds in a directory build-AppImage
|
||||
# that is created in the current directory.
|
||||
#
|
||||
# The resulting AppImage has XDG_* enabled, and appends the in-image
|
||||
# directories to the current environment. You can set XDG_* in the
|
||||
# current environment to use other configurations and data, e.g. the
|
||||
# data in the current live environment. Or leave it unset, to try
|
||||
# Calamares with only the configuration contained in the AppImage.
|
||||
#
|
||||
### END USAGE
|
||||
|
||||
TOOLS_DIR="."
|
||||
CMAKE_ARGS=""
|
||||
DO_REBUILD="true"
|
||||
DO_CONDA="false"
|
||||
CONFIG_DIR=""
|
||||
while test "$#" -gt 0
|
||||
do
|
||||
case "x$1" in
|
||||
x--help|x-h)
|
||||
sed -e '1,/USAGE/d' -e '/END.USAGE/,$d' < "$0"
|
||||
return 0
|
||||
;;
|
||||
x--tools-dir|x-T)
|
||||
TOOLS_DIR="$2"
|
||||
shift
|
||||
;;
|
||||
x--cmake-args|x-C)
|
||||
CMAKE_ARGS="$CMAKE_ARGS $2"
|
||||
shift
|
||||
;;
|
||||
x--config-dir|x-c)
|
||||
CONFIG_DIR="$2"
|
||||
shift
|
||||
;;
|
||||
x--skip-build|x-s)
|
||||
DO_REBUILD="false"
|
||||
;;
|
||||
x--with-python|x-p)
|
||||
DO_CONDA="true"
|
||||
;;
|
||||
*)
|
||||
echo "! Unknown argument '$1'."
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
test "$#" -gt 0 || { echo "! Missing arguments."; exit 1; }
|
||||
shift
|
||||
done
|
||||
|
||||
### Check where we're running
|
||||
#
|
||||
BIN_DIR=$( cd $( dirname "$0" ) && pwd -P )
|
||||
test -d "$BIN_DIR" || { echo "! Could not find BIN_DIR"; exit 1; }
|
||||
test -f "$BIN_DIR/AppImage.sh" || { echo "! $BIN_DIR does not have AppImage.sh"; exit 1; }
|
||||
|
||||
SRC_DIR=$( cd "$BIN_DIR/.." && pwd -P )
|
||||
test -d "$SRC_DIR" || { echo "! Could not find SRC_DIR"; exit 1; }
|
||||
test -d "$SRC_DIR/ci" || { echo "! $SRC_DIR isn't a top-level Calamares checkout"; exit 1; }
|
||||
test -f "$SRC_DIR/CMakeLists.txt" || { echo "! SRC_DIR is missing CMakeLists.txt"; exit 1; }
|
||||
|
||||
### Check pre-requisites
|
||||
#
|
||||
BUILD_DIR=build-AppImage
|
||||
test -d "$BUILD_DIR" || mkdir -p "$BUILD_DIR"
|
||||
test -d "$BUILD_DIR" || { echo "! Could not create $BUILD_DIR"; exit 1; }
|
||||
|
||||
TOOLS_LIST="linuxdeploy-x86_64.AppImage linuxdeploy-plugin-qt-x86_64.AppImage"
|
||||
$DO_CONDA && TOOLS_LIST="$TOOLS_LIST linuxdeploy-plugin-conda.sh"
|
||||
|
||||
for tool in $TOOLS_LIST
|
||||
do
|
||||
if test -x "$BUILD_DIR/$tool" ; then
|
||||
# This tool is ok
|
||||
:
|
||||
else
|
||||
if test -f "$TOOLS_DIR/$tool" ; then
|
||||
cp "$TOOLS_DIR/$tool" "$BUILD_DIR/$tool" || exit 1
|
||||
else
|
||||
fetch=$( grep "^# URL .*$tool\$" "$0" | sed 's/# URL *//' )
|
||||
curl -L -o "$BUILD_DIR/$tool" "$fetch"
|
||||
fi
|
||||
chmod +x "$BUILD_DIR/$tool"
|
||||
test -x "$BUILD_DIR/$tool" || { echo "! Missing tool $tool in tools-dir $TOOLS_DIR"; exit 1; }
|
||||
fi
|
||||
done
|
||||
|
||||
if test -n "$CONFIG_DIR" ; then
|
||||
test -f "$CONFIG_DIR/settings.conf" || { echo "! No settings.conf in $CONFIG_DIR"; exit 1; }
|
||||
fi
|
||||
|
||||
### Clean up build-directory
|
||||
#
|
||||
rm -rf "$BUILD_DIR/AppDir"
|
||||
if $DO_REBUILD ; then
|
||||
rm -rf "$BUILD_DIR/build"
|
||||
mkdir "$BUILD_DIR/build" || { echo "! Could not create $BUILD_DIR/build for the cmake-build."; exit 1; }
|
||||
else
|
||||
test -d "$BUILD_DIR/build" || { echo "! No build found in $BUILD_DIR, but --skip-build is given."; exit 1; }
|
||||
test -x "$BUILD_DIR/build/calamares" || { echo "! No complete build found in $BUILD_DIR/build ."; exit 1; }
|
||||
fi
|
||||
mkdir "$BUILD_DIR/AppDir" || { echo "! Could not create $BUILD_DIR/AppDir for the AppImage install."; exit 1; }
|
||||
LOG_FILE="$BUILD_DIR/AppImage.log"
|
||||
rm -f "$LOG_FILE"
|
||||
{ echo "# Calamares build started" `date` ; echo "# .. build directory $BUILD_DIR"; echo "# .. log file $LOG_FILE"; } > "$LOG_FILE"
|
||||
cat "$LOG_FILE"
|
||||
|
||||
### Python Support
|
||||
#
|
||||
#
|
||||
if $DO_CONDA ; then
|
||||
export CONDA_CHANNELS="conda-forge;anaconda"
|
||||
export CONDA_PACKAGES="gettext;py-boost"
|
||||
|
||||
(
|
||||
cd "$BUILD_DIR" &&
|
||||
./linuxdeploy-x86_64.AppImage --appdir=AppDir/ --plugin=conda
|
||||
)
|
||||
|
||||
. "$BUILD_DIR/AppDir/usr/conda/bin/activate"
|
||||
fi
|
||||
|
||||
### Build Calamares
|
||||
#
|
||||
if $DO_REBUILD ; then
|
||||
echo "# Running cmake ..."
|
||||
(
|
||||
cd "$BUILD_DIR/build" &&
|
||||
cmake "$SRC_DIR" -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_LIBDIR=lib $CMAKE_ARGS
|
||||
) >> "$LOG_FILE" 2>&1 || { tail -10 "$LOG_FILE" ; echo "! Could not run CMake"; exit 1; }
|
||||
echo "# Running make ..."
|
||||
(
|
||||
cd "$BUILD_DIR/build" &&
|
||||
make -j4
|
||||
) >> "$LOG_FILE" 2>&1 || { tail -10 "$LOG_FILE" ; echo "! Could not run make"; exit 1; }
|
||||
fi
|
||||
echo "# Running make install ..."
|
||||
(
|
||||
cd "$BUILD_DIR/build" &&
|
||||
make install DESTDIR=../AppDir
|
||||
) >> "$LOG_FILE" 2>&1 || { tail -10 "$LOG_FILE" ; echo "! Could not run make install"; exit 1; }
|
||||
|
||||
### Modify installation
|
||||
#
|
||||
IMAGE_DIR="$BUILD_DIR/AppDir"
|
||||
|
||||
# Munge the desktop file to not use absolute paths or pkexec
|
||||
sed -i \
|
||||
-e 's+^Exec=.*+Exec=calamares+' \
|
||||
-e 's+^Name=.*+Name=Calamares+' \
|
||||
"$IMAGE_DIR"/usr/share/applications/calamares.desktop
|
||||
|
||||
# Replace the executable with a shell-proxy
|
||||
test -x "$IMAGE_DIR/usr/bin/calamares" || { echo "! Does not seem to have installed calamares"; exit 1; }
|
||||
mv "$IMAGE_DIR/usr/bin/calamares" "$IMAGE_DIR/usr/bin/calamares.bin"
|
||||
cat > "$IMAGE_DIR/usr/bin/calamares" <<"EOF"
|
||||
#! /bin/sh
|
||||
#
|
||||
# Calamares proxy-script. Runs Calamares with XDG support enabled,
|
||||
# and in-image XDG dirs set up so that compiled-in configuration can be used.
|
||||
test -n "${XDG_DATA_DIRS}" && XDG_DATA_DIRS="${XDG_DATA_DIRS}:"
|
||||
test -n "${XDG_CONFIG_DIRS}" $$ XDG_CONFIG_DIRS="${XDG_CONFIG_DIRS}:"
|
||||
export XDG_DATA_DIRS="${XDG_DATA_DIRS}${APPDIR}/usr/share/"
|
||||
export XDG_CONFIG_DIRS="${XDG_CONFIG_DIRS}${APPDIR}/etc/:${APPDIR}/usr/share/"
|
||||
export PYTHONPATH="${APPDIR}/usr/lib:"
|
||||
cd "$APPDIR"
|
||||
exec "$APPDIR"/usr/bin/calamares.bin -X "$@"
|
||||
EOF
|
||||
chmod 755 "$IMAGE_DIR/usr/bin/calamares"
|
||||
test -x "$IMAGE_DIR/usr/bin/calamares" || { echo "! Does not seem to have proxy for calamares"; exit 1; }
|
||||
|
||||
### Install additional files
|
||||
#
|
||||
PLUGIN_DIR=$( qmake -query QT_INSTALL_PLUGINS )
|
||||
for plugin in \
|
||||
libpmsfdiskbackendplugin.so \
|
||||
libpmdummybackendplugin.so \
|
||||
libpmlibpartedbackendplugin.so
|
||||
do
|
||||
# Warning, but not fatal: generally you only have two out of three available
|
||||
# depending on the KPMCore version.
|
||||
cp "$PLUGIN_DIR/$plugin" "$IMAGE_DIR/usr/lib" 2> /dev/null || { echo "! Could not copy KPMCore plugin $plugin"; }
|
||||
done
|
||||
|
||||
# Install configuration files
|
||||
ETC_DIR="$IMAGE_DIR"/etc/calamares
|
||||
mkdir -p "$ETC_DIR"
|
||||
test -d "$ETC_DIR" || { echo "! Could not create /etc/calamares in image."; exit 1; }
|
||||
|
||||
if test -z "$CONFIG_DIR" ; then
|
||||
echo "# Using basic settings.conf"
|
||||
cp "$SRC_DIR/settings.conf" "$ETC_DIR"
|
||||
else
|
||||
test -f "$CONFIG_DIR/settings.conf" || { echo "! No settings.conf in $CONFIG_DIR"; exit 1; }
|
||||
mkdir -p "$ETC_DIR/modules"
|
||||
cp "$CONFIG_DIR/settings.conf" "$ETC_DIR"
|
||||
test -d "$CONFIG_DIR/modules" && cp -r "$CONFIG_DIR/modules" "$ETC_DIR"
|
||||
test -d "$CONFIG_DIR/branding" && cp -r "$CONFIG_DIR/branding" "$IMAGE_DIR/usr/share/calamares"
|
||||
fi
|
||||
|
||||
### Build the AppImage
|
||||
#
|
||||
#
|
||||
echo "# Building AppImage"
|
||||
(
|
||||
export QT_SELECT=qt5 # Otherwise might pick Qt4 in image
|
||||
export LD_LIBRARY_PATH=AppDir/usr/lib # RPATH isn't set in the executable
|
||||
cd "$BUILD_DIR" &&
|
||||
./linuxdeploy-x86_64.AppImage --appdir=AppDir/ --plugin=qt --output=appimage
|
||||
) >> "$LOG_FILE" 2>&1 || { tail -10 "$LOG_FILE" ; echo "! Could not create image"; exit 1; }
|
||||
|
||||
echo "# Created in $BUILD_DIR/Calamares-x86_64.AppImage"
|
||||
echo "# .. log file at $LOG_FILE"
|
||||
|
||||
exit 0
|
||||
### Database for installation
|
||||
#
|
||||
# URL https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage
|
||||
# URL https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-x86_64.AppImage
|
||||
# URL https://raw.githubusercontent.com/TheAssassin/linuxdeploy-plugin-conda/master/linuxdeploy-plugin-conda.sh
|
130
ci/RELEASE.md
130
ci/RELEASE.md
@@ -1,130 +0,0 @@
|
||||
# Calamares Release Process
|
||||
|
||||
<!-- SPDX-FileCopyrightText: 2015 Teo Mrnjavac <teo@kde.org>
|
||||
SPDX-FileCopyrightText: 2017 Adriaan de Groot <groot@kde.org>
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
-->
|
||||
|
||||
> Calamares releases are now rolling when-they-are-ready releases.
|
||||
> Releases are made from *calamares* and tagged there. When, in future,
|
||||
> LTS releases resume, these steps may be edited again.
|
||||
>
|
||||
> Most things are automated through the release script [RELEASE.sh](RELEASE.sh)
|
||||
|
||||
## (1) Preparation
|
||||
|
||||
* Make sure all tests pass.
|
||||
```
|
||||
make
|
||||
make test
|
||||
```
|
||||
Note that *all* means all-that-make-sense. The partition-manager tests need
|
||||
an additional environment variable to be set for some tests, which will
|
||||
destroy an attached disk. This is not always desirable. There are some
|
||||
sample config-files that are empty and which fail the config-tests.
|
||||
* Pull latest translations from Transifex. We only push / pull translations
|
||||
from master, so longer-lived branches (e.g. 3.1.x) don't get translation
|
||||
updates. This is to keep the translation workflow simple. The script
|
||||
automatically commits changes to the translations.
|
||||
```
|
||||
sh ci/txpull.sh
|
||||
```
|
||||
* Update the list of enabled translation languages in `CMakeLists.txt`.
|
||||
Check the [translation site][transifex] for the list of languages with
|
||||
fairly complete translations, or use `ci/txstats.py` for an automated
|
||||
suggestion. If there are changes, commit them.
|
||||
* Push the changes.
|
||||
* Check defaults in `settings.conf` and other configuration files.
|
||||
* Drop the RC variable to 0 in `CMakeLists.txt`, *CALAMARES_VERSION_RC*.
|
||||
* Edit `CHANGES` and set the date of the release.
|
||||
* Commit both. This is usually done with commit-message
|
||||
*Changes: pre-release housekeeping*.
|
||||
|
||||
|
||||
## (2) Release Day
|
||||
|
||||
* Run the helper script `ci/RELEASE.sh` or follow steps below.
|
||||
The script checks:
|
||||
- for uncommitted local changes,
|
||||
- if translations are up-to-date and translators
|
||||
have had enough time to chase new strings,
|
||||
- that the build is successful (with gcc and clang, if available),
|
||||
- tests pass,
|
||||
- tarball can be created,
|
||||
- tarball can be signed.
|
||||
On success, it prints out a suitable signature- and SHA256 blurb
|
||||
for use in the release announcement.
|
||||
|
||||
## (3) Release
|
||||
|
||||
Follow the instructions printed by the release script.
|
||||
|
||||
* Push the tags.
|
||||
* Create a new release on GitHub.
|
||||
* Upload tarball and signature.
|
||||
* Publish release article on `calamares.io`.
|
||||
* Close associated milestone on GitHub if it's entirely done.
|
||||
* Update topic on #calamares IRC channel.
|
||||
|
||||
## (4) Post-Release
|
||||
|
||||
* Bump the version number in `CMakeLists.txt` in the `project()` command.
|
||||
* Set *CALAMARES_VERSION_RC* back to 1.
|
||||
* Add a placeholder entry for the next release in `CHANGES` with date
|
||||
text *not released yet*.
|
||||
* Commit and push that, usually with the message
|
||||
*Changes: post-release housekeeping*.
|
||||
|
||||
```
|
||||
# 3.2.XX (unreleased) #
|
||||
|
||||
This release contains contributions from (alphabetically by first name):
|
||||
- No external contributors yet
|
||||
|
||||
## Core ##
|
||||
- No core changes yet
|
||||
|
||||
## Modules ##
|
||||
- No module changes yet
|
||||
```
|
||||
|
||||
# Related Material
|
||||
|
||||
> This section isn't directly related to any specific release,
|
||||
> but bears on all releases.
|
||||
|
||||
## GPG Key Maintainence
|
||||
|
||||
Calamares uses GPG Keys for signing the tarballs and some commits
|
||||
(tags, mostly). Calamares uses the **maintainer's** personal GPG
|
||||
key for this. This section details some GPG activities that the
|
||||
maintainer should do with those keys.
|
||||
|
||||
- Signing sub-key. It's convenient to use a signing sub-key specifically
|
||||
for the signing of Calamares. To do so, add a key to the private key.
|
||||
It's recommended to use key expiry, and to update signing keys periodically.
|
||||
- Run `gpg -K` to find the key ID of your personal GPG secret key.
|
||||
- Run `gpg --edit-key <keyid>` to edit that personal GPG key.
|
||||
- In gpg edit-mode, use `addkey`, then pick a key type that is *sign-only*
|
||||
(e.g. type 4, *RSA (sign only)*), then pick a keysize (3072 seems ok
|
||||
as of 2020) and set a key expiry time, (e.g. in 18 months time).
|
||||
- After generation, the secret key information is printed again, now
|
||||
including the new signing subkey:
|
||||
```
|
||||
ssb rsa3072/0xCFDDC96F12B1915C
|
||||
created: 2020-07-11 expires: 2022-01-02 usage: S
|
||||
```
|
||||
- Update the `RELEASE.sh` script with a new signing sub-key ID when a new
|
||||
one is generated. Also announce the change of signing sub-key (e.g. on
|
||||
the Calmares site or as part of a release announcement).
|
||||
- Send the updated key to keyservers with `gpg --send-keys <keyid>`
|
||||
- Optional: sanitize the keyring for use in development machines.
|
||||
Export the current subkeys of the master key and keep **only** those
|
||||
secret keys around. There is documentation
|
||||
[here](https://blog.tinned-software.net/create-gnupg-key-with-sub-keys-to-sign-encrypt-authenticate/)
|
||||
but be careful.
|
||||
- Export the public key material with `gpg --export --armor <keyid>`,
|
||||
possibly also setting an output file.
|
||||
- Upload that public key to the relevant GitHub profile.
|
||||
- Upload that public key to the Calamares site.
|
||||
|
166
ci/RELEASE.sh
166
ci/RELEASE.sh
@@ -1,166 +0,0 @@
|
||||
#! /bin/sh
|
||||
#
|
||||
# SPDX-FileCopyrightText: 2018 Adriaan de Groot <groot@kde.org>
|
||||
# SPDX-License-Identifier: BSD-2-Clause
|
||||
#
|
||||
### USAGE
|
||||
#
|
||||
# Release script for Calamares
|
||||
#
|
||||
# NOTE: this script contains Linuxisms (in particular, expects GNU mktemp(1))
|
||||
#
|
||||
# This attempts to perform the different steps of the RELEASE.md
|
||||
# document automatically. It's not tested on other machines or
|
||||
# setups other than [ade]'s development VM.
|
||||
#
|
||||
# Assumes that the version in CMakeLists.txt has been bumped,
|
||||
# and that a release of that version is desired.
|
||||
#
|
||||
# None of the "update stuff" is done by this script; in preparation
|
||||
# for the release, you should have already done:
|
||||
# * updating the version
|
||||
# * pulling translations
|
||||
# * updating the language list
|
||||
# * switching to the right branch
|
||||
# The release can fail for various reasons: doesn't build, tests fail,
|
||||
# or the string freeze has been violated.
|
||||
#
|
||||
# You can influence the script a little with these options:
|
||||
# * `-B` do not build (before tagging)
|
||||
# * `-P` do not package (tag, sign, tarball)
|
||||
# * `-T` do not respect string freeze
|
||||
#
|
||||
# The build / package settings can be influenced via environment variables:
|
||||
# * BUILD_DEFAULT set to `false` to avoid first build with gcc
|
||||
# * BUILD_CLANG set to `false` to avoid second build with clang
|
||||
# * BUILD_ONLY set to `true` to break after building
|
||||
#
|
||||
### END USAGE
|
||||
|
||||
test -d .git || { echo "Not at top-level." ; exit 1 ; }
|
||||
test -d src/modules || { echo "No src/modules." ; exit 1 ; }
|
||||
|
||||
which cmake > /dev/null 2>&1 || { echo "No cmake(1) available." ; exit 1 ; }
|
||||
|
||||
test -z "$BUILD_DEFAULT" && BUILD_DEFAULT=true
|
||||
test -z "$BUILD_CLANG" && BUILD_CLANG=true
|
||||
test -z "$BUILD_ONLY" && BUILD_ONLY=false
|
||||
STRING_FREEZE=true
|
||||
|
||||
while getopts "hBPT" opt ; do
|
||||
case "$opt" in
|
||||
h|\?)
|
||||
sed -e '1,/USAGE/d' -e '/END.USAGE/,$d' < "$0"
|
||||
return 0
|
||||
;;
|
||||
B)
|
||||
BUILD_DEFAULT=false
|
||||
BUILD_CLANG=false
|
||||
;;
|
||||
P)
|
||||
BUILD_ONLY=true
|
||||
;;
|
||||
T)
|
||||
STRING_FREEZE=false
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
|
||||
if $STRING_FREEZE ; then
|
||||
sh ci/txcheck.sh || { echo "! String freeze failed." ; exit 1 ; }
|
||||
fi
|
||||
|
||||
### Setup
|
||||
#
|
||||
#
|
||||
BUILDDIR=$(mktemp -d --suffix=-build --tmpdir=.)
|
||||
|
||||
### Build with default compiler
|
||||
#
|
||||
#
|
||||
if test "x$BUILD_DEFAULT" = "xtrue" ; then
|
||||
rm -rf "$BUILDDIR"
|
||||
mkdir "$BUILDDIR" || { echo "Could not create build directory." ; exit 1 ; }
|
||||
( cd "$BUILDDIR" && cmake .. && make -j4 ) || { echo "Could not perform test-build in $BUILDDIR." ; exit 1 ; }
|
||||
( cd "$BUILDDIR" && make test ) || { echo "Tests failed in $BUILDDIR ." ; exit 1 ; }
|
||||
fi
|
||||
|
||||
### Build with clang
|
||||
#
|
||||
#
|
||||
if test "x$BUILD_CLANG" = "xtrue" ; then
|
||||
if which clang++ > /dev/null 2>&1 ; then
|
||||
# Do build again with clang
|
||||
rm -rf "$BUILDDIR"
|
||||
mkdir "$BUILDDIR" || { echo "Could not create build directory." ; exit 1 ; }
|
||||
( cd "$BUILDDIR" && CC=clang CXX=clang++ cmake .. && make -j4 ) || { echo "Could not perform test-build in $BUILDDIR." ; exit 1 ; }
|
||||
( cd "$BUILDDIR" && make test ) || { echo "Tests failed in $BUILDDIR (clang)." ; exit 1 ; }
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x$BUILD_ONLY" = "xtrue" ; then
|
||||
echo "Builds completed, release stopped. Build remains in $BUILDDIR ."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if test -f "$BUILDDIR/CMakeCache.txt" ; then
|
||||
# Some build has created it, so that's good
|
||||
:
|
||||
else
|
||||
# Presumably -B was given; just do the cmake part
|
||||
rm -rf "$BUILDDIR"
|
||||
mkdir "$BUILDDIR" || { echo "Could not create build directory." ; exit 1 ; }
|
||||
( cd "$BUILDDIR" && cmake .. ) || { echo "Could not run cmake in $BUILDDIR ." ; exit 1 ; }
|
||||
fi
|
||||
|
||||
### Get version number for this release
|
||||
#
|
||||
#
|
||||
V=$( cd "$BUILDDIR" && make show-version | grep ^CALAMARES_VERSION | sed s/^[A-Z_]*=// )
|
||||
test -n "$V" || { echo "Could not obtain version in $BUILDDIR ." ; exit 1 ; }
|
||||
|
||||
### Create signed tag
|
||||
#
|
||||
# This is the signing key ID associated with the GitHub account adriaandegroot,
|
||||
# which is used to create all "verified" tags in the Calamares repo.
|
||||
KEY_ID="CFDDC96F12B1915C"
|
||||
git tag -u "$KEY_ID" -m "Release v$V" "v$V" || { echo "Could not sign tag v$V." ; exit 1 ; }
|
||||
|
||||
### Create the tarball
|
||||
#
|
||||
#
|
||||
TAR_V="calamares-$V"
|
||||
TAR_FILE="$TAR_V.tar.gz"
|
||||
git archive -o "$TAR_FILE" --prefix "$TAR_V/" "v$V" || { echo "Could not create tarball." ; exit 1 ; }
|
||||
test -f "$TAR_FILE" || { echo "Tarball was not created." ; exit 1 ; }
|
||||
SHA256=$(sha256sum "$TAR_FILE" | cut -d" " -f1)
|
||||
|
||||
### Build the tarball
|
||||
#
|
||||
#
|
||||
D=$(date +%Y%m%d-%H%M%S)
|
||||
TMPDIR=$(mktemp -d --suffix="-calamares-$D")
|
||||
test -d "$TMPDIR" || { echo "Could not create tarball-build directory." ; exit 1 ; }
|
||||
tar xzf "$TAR_FILE" -C "$TMPDIR" || { echo "Could not unpack tarball." ; exit 1 ; }
|
||||
test -d "$TMPDIR/$TAR_V" || { echo "Tarball did not contain source directory." ; exit 1 ; }
|
||||
( cd "$TMPDIR/$TAR_V" && cmake . && make -j4 && make test ) || { echo "Tarball build failed in $TMPDIR ." ; exit 1 ; }
|
||||
|
||||
### Cleanup
|
||||
#
|
||||
rm -rf "$BUILDDIR" # From test-builds
|
||||
rm -rf "$TMPDIR" # From tarball
|
||||
|
||||
### Print subsequent instructions
|
||||
#
|
||||
#
|
||||
cat <<EOF
|
||||
# Next steps for this release:
|
||||
git push origin v$V
|
||||
gpg -s -u $KEY_ID --detach --armor $TAR_FILE # Sign the tarball
|
||||
# Upload tarball $TAR_FILE and the signature $TAR_FILE.asc
|
||||
# Announce via https://github.com/calamares/calamares/releases/new
|
||||
# SHA256: $SHA256
|
||||
EOF
|
||||
|
||||
exit 0
|
17
ci/astylerc
17
ci/astylerc
@@ -1,17 +0,0 @@
|
||||
# SPDX-FileCopyrightText: 2014 Aurélien Gâteau <agateau@kde.org>
|
||||
# SPDX-FileCopyrightText: 2019 Adriaan de Groot <groot@kde.org>
|
||||
# SPDX-License-Identifier: BSD-2-Clause
|
||||
|
||||
# Do not create a backup file
|
||||
suffix=none
|
||||
|
||||
indent=spaces=4
|
||||
|
||||
# Brackets
|
||||
style=break
|
||||
add-brackets
|
||||
|
||||
# Spaces
|
||||
pad-paren-in
|
||||
pad-header
|
||||
align-pointer=type
|
@@ -1,77 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# SPDX-FileCopyrightText: 2014 Aurélien Gâteau <agateau@kde.org>
|
||||
# SPDX-FileCopyrightText: 2019 Adriaan de Groot <groot@kde.org>
|
||||
# SPDX-License-Identifier: BSD-2-Clause
|
||||
#
|
||||
# Calls astyle with settings matching Calamares coding style
|
||||
# Requires astyle >= 2.04 and clang-format-7 -8 or -9
|
||||
#
|
||||
# Clang-format-10 is **not** supported, since it changes a default
|
||||
# that re-introduces a space into empty function bodies; this
|
||||
# can be turned off with a style setting, but that breaks
|
||||
# older format versions which don't recognize the setting.
|
||||
#
|
||||
# You can pass in directory names, in which case the files
|
||||
# in that directory (NOT below it) are processed.
|
||||
#
|
||||
LANG=C
|
||||
LC_ALL=C
|
||||
LC_NUMERIC=C
|
||||
export LANG LC_ALL LC_NUMERIC
|
||||
|
||||
AS=$( which astyle )
|
||||
|
||||
CF_VERSIONS="clang-format-7 clang-format-8 clang-format70 clang-format80 clang-format90 clang-format-9.0.1 clang-format"
|
||||
for _cf in $CF_VERSIONS
|
||||
do
|
||||
# Not an error if this particular clang-format isn't found
|
||||
CF=$( which $_cf 2> /dev/null || true )
|
||||
test -n "$CF" && break
|
||||
done
|
||||
|
||||
test -n "$AS" || { echo "! No astyle found in PATH"; exit 1 ; }
|
||||
test -n "$CF" || { echo "! No clang-format ($CF_VERSIONS) found in PATH"; exit 1 ; }
|
||||
test -x "$AS" || { echo "! $AS is not executable."; exit 1 ; }
|
||||
test -x "$CF" || { echo "! $CF is not executable."; exit 1 ; }
|
||||
|
||||
unmangle_clang_format=""
|
||||
if expr `"$CF" --version | tr -dc '[^.0-9]' | cut -d . -f 1` '<' 10 > /dev/null ; then
|
||||
:
|
||||
else
|
||||
unmangle_clang_format=$( dirname $0 )/../.clang-format
|
||||
echo "SpaceInEmptyBlock: false" >> "$unmangle_clang_format"
|
||||
fi
|
||||
|
||||
set -e
|
||||
|
||||
any_dirs=no
|
||||
for d in "$@"
|
||||
do
|
||||
test -d "$d" && any_dirs=yes
|
||||
done
|
||||
|
||||
style_some()
|
||||
{
|
||||
if test -n "$*" ; then
|
||||
$AS --options=$(dirname $0)/astylerc --quiet "$@"
|
||||
$CF -i -style=file "$@"
|
||||
fi
|
||||
}
|
||||
|
||||
if test "x$any_dirs" = "xyes" ; then
|
||||
for d in "$@"
|
||||
do
|
||||
if test -d "$d" ; then
|
||||
style_some $( find "$d" -maxdepth 1 -type f -name '*.cpp' -o -name '*.h' )
|
||||
else
|
||||
style_some "$d"
|
||||
fi
|
||||
done
|
||||
else
|
||||
style_some "$@"
|
||||
fi
|
||||
|
||||
if test -n "$unmangle_clang_format" ; then
|
||||
sed -i.bak '/^SpaceInEmptyBlock/d' "$unmangle_clang_format"
|
||||
fi
|
@@ -1,128 +0,0 @@
|
||||
#! /usr/bin/env python3
|
||||
#
|
||||
# SPDX-FileCopyrightText: 2020 Adriaan de Groot <groot@kde.org>
|
||||
# SPDX-License-Identifier: BSD-2-Clause
|
||||
#
|
||||
usage = """
|
||||
Validates a Calamares config file -- YAML syntax -- against a schema.
|
||||
|
||||
The schema is also written in YAML syntax, but the schema itself
|
||||
is JSON-schema. This is possible because all JSON is YAML, and most
|
||||
YAML is JSON. The limited subset of YAML that Calamares uses is
|
||||
JSON-representable, anyway.
|
||||
|
||||
Usage:
|
||||
configvalidator.py <schema> <file> ...
|
||||
configvalidator.py -x
|
||||
|
||||
Exits with value 0 on success, otherwise:
|
||||
1 on missing dependencies
|
||||
2 on invalid command-line arguments
|
||||
3 on missing files
|
||||
4 if files have invalid syntax
|
||||
5 if files fail to validate
|
||||
Use -x as only command-line argument to check the imports only.
|
||||
"""
|
||||
|
||||
# The schemata originally lived outside the Calamares repository,
|
||||
# without documented tooling. By putting them in the repository
|
||||
# with the example files and explicit tooling, there's a better
|
||||
# chance of them catching problems and acting as documentation.
|
||||
|
||||
dependencies = """
|
||||
Dependencies for this tool are: py-yaml and py-jsonschema.
|
||||
|
||||
https://pyyaml.org/
|
||||
https://github.com/Julian/jsonschema
|
||||
|
||||
Simple installation is `pip install pyyaml jsonschema`
|
||||
"""
|
||||
|
||||
ERR_IMPORT, ERR_USAGE, ERR_FILE_NOT_FOUND, ERR_SYNTAX, ERR_INVALID = range(1,6)
|
||||
|
||||
### DEPENDENCIES
|
||||
#
|
||||
#
|
||||
try:
|
||||
from jsonschema import validate, SchemaError, ValidationError
|
||||
from jsonschema import draft7_format_checker
|
||||
from yaml import safe_load, YAMLError
|
||||
except ImportError as e:
|
||||
print(e)
|
||||
print(dependencies)
|
||||
exit(ERR_IMPORT)
|
||||
|
||||
from os.path import exists
|
||||
import sys
|
||||
|
||||
### INPUT VALIDATION
|
||||
#
|
||||
#
|
||||
if len(sys.argv) < 3:
|
||||
# Special-case: called with -x to just test the imports
|
||||
if len(sys.argv) == 2 and sys.argv[1] == "-x":
|
||||
exit(0)
|
||||
print(usage)
|
||||
exit(ERR_USAGE)
|
||||
|
||||
schema_file_name = sys.argv[1]
|
||||
config_file_names = sys.argv[2:]
|
||||
|
||||
if not exists(schema_file_name):
|
||||
print(usage)
|
||||
print("\nSchema file '{}' does not exist.".format(schema_file_name))
|
||||
exit(ERR_FILE_NOT_FOUND)
|
||||
for f in config_file_names:
|
||||
if not exists(f):
|
||||
print(usage)
|
||||
print("\nYAML file '{}' does not exist.".format(f))
|
||||
exit(ERR_FILE_NOT_FOUND)
|
||||
|
||||
### FILES SYNTAX CHECK
|
||||
#
|
||||
#
|
||||
with open(schema_file_name, "r") as data:
|
||||
try:
|
||||
schema = safe_load(data)
|
||||
except YAMLError as e:
|
||||
print("Schema error: {} {}.".format(e.problem, e.problem_mark))
|
||||
print("\nSchema file '{}' is invalid YAML.".format(schema_file_name))
|
||||
exit(ERR_SYNTAX)
|
||||
|
||||
try:
|
||||
validate(instance={}, schema=schema)
|
||||
# While developing the schemata, get full exceptions from schema failure
|
||||
except SchemaError as e:
|
||||
print(e)
|
||||
print("\nSchema file '{}' is invalid JSON-Schema.".format(schema_file_name))
|
||||
exit(ERR_INVALID)
|
||||
except ValidationError:
|
||||
# Just means that empty isn't valid, but the Schema itself is
|
||||
pass
|
||||
|
||||
configs = []
|
||||
for f in config_file_names:
|
||||
config = None
|
||||
with open(f, "r") as data:
|
||||
try:
|
||||
config = safe_load(data)
|
||||
except YAMLError as e:
|
||||
print("YAML error: {} {}.".format(e.problem, e.problem_mark))
|
||||
print("\nYAML file '{}' is invalid.".format(f))
|
||||
exit(ERR_SYNTAX)
|
||||
if config is None:
|
||||
print("YAML file '{}' is empty.".format(f))
|
||||
configs.append(config)
|
||||
|
||||
assert len(configs) == len(config_file_names), "Not all configurations loaded."
|
||||
|
||||
### SCHEMA VALIDATION
|
||||
#
|
||||
#
|
||||
for c, f in zip(configs, config_file_names):
|
||||
try:
|
||||
validate(instance=c, schema=schema)
|
||||
except ValidationError as e:
|
||||
print(e)
|
||||
print("\nConfig file '{}' does not validate in schema.".format(f))
|
||||
exit(ERR_INVALID)
|
@@ -1,9 +0,0 @@
|
||||
/* Model file for Coverity checker.
|
||||
See https://scan.coverity.com/tune
|
||||
|
||||
Calamares doesn't seem to geenerate any false positives,
|
||||
so the model-file is empty.
|
||||
|
||||
SPDX-FileCopyrightText: 2017 Adriaan de Groot <groot@kde.org>
|
||||
SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
155
ci/txcheck.sh
155
ci/txcheck.sh
@@ -1,155 +0,0 @@
|
||||
#! /bin/sh
|
||||
|
||||
### LICENSE
|
||||
# === This file is part of Calamares - <https://calamares.io> ===
|
||||
#
|
||||
# SPDX-FileCopyrightText: 2019-2020 Adriaan de Groot <groot@kde.org>
|
||||
# SPDX-License-Identifier: BSD-2-Clause
|
||||
#
|
||||
# This file is Free Software: you can redistribute it and/or modify
|
||||
# it under the terms of the 2-clause BSD License.
|
||||
#
|
||||
### END LICENSE
|
||||
|
||||
### USAGE
|
||||
#
|
||||
# Does the translation tag (from a previous txpush) exist?
|
||||
# This assumes that the release host has also locally done
|
||||
# a translations push, which works for the current development
|
||||
# workflow .. but it could be improved by looking for one of
|
||||
# the typical txpush log messages instead of the tag.
|
||||
#
|
||||
# Use --cleanup as an argument to clean things up.
|
||||
#
|
||||
# Normal use:
|
||||
# $ sh ci/txcheck.sh
|
||||
# If there are differences, fix them and then clean up:
|
||||
# $ sh ci/txcheck.sh --cleanup
|
||||
#
|
||||
### END USAGE
|
||||
|
||||
# The files that are translated; should match the contents of .tx/config
|
||||
TX_FILE_LIST="lang/calamares_en.ts lang/python.pot calamares.desktop"
|
||||
|
||||
### COMMAND ARGUMENTS
|
||||
#
|
||||
# We need to define tx_cleanup for the --cleanup argument, although it's
|
||||
# normally used much later in the script.
|
||||
tx_cleanup()
|
||||
{
|
||||
# Cleanup artifacs of checking
|
||||
git worktree remove --force build-txcheck-head
|
||||
git worktree remove --force build-txcheck-prev
|
||||
git branch -D build-txcheck-head > /dev/null 2>&1
|
||||
}
|
||||
|
||||
if test "x$1" = "x--cleanup" ; then
|
||||
tx_cleanup
|
||||
exit 0
|
||||
fi
|
||||
if test "x$1" = "x--help" ; then
|
||||
sed -e '1,/USAGE/d' -e '/END.USAGE/,$d' < "$0"
|
||||
fi
|
||||
test -z "$1" || { echo "! Usage: txcheck.sh [--cleanup]" ; exit 1 ; }
|
||||
|
||||
|
||||
### FIND EXECUTABLES
|
||||
#
|
||||
#
|
||||
XMLLINT=""
|
||||
for _xmllint in xmllint
|
||||
do
|
||||
$_xmllint --version > /dev/null 2>&1 && XMLLINT=$_xmllint
|
||||
test -n "$XMLLINT" && break
|
||||
done
|
||||
|
||||
# Distinguish GNU date from BSD date
|
||||
if date +%s -d "1 week ago" > /dev/null 2>&1 ; then
|
||||
last_week() { date +%s -d "1 week ago" ; }
|
||||
else
|
||||
last_week() { date -v1w +%s; }
|
||||
fi
|
||||
|
||||
# Distinguish GNU SHA executables from BSD ones
|
||||
if which sha256sum > /dev/null 2>&1 ; then
|
||||
SHA256=sha256sum
|
||||
else
|
||||
SHA256=sha256
|
||||
fi
|
||||
|
||||
### CHECK WORKING DIRECTORY
|
||||
#
|
||||
#
|
||||
if git describe translation > /dev/null 2>&1 ; then
|
||||
:
|
||||
else
|
||||
echo "! No 'translation' tag exists for enforcing the string-freeze."
|
||||
exit 1
|
||||
fi
|
||||
# The tag exists, so now check that there's no unsaved changes
|
||||
if test `git describe` = `git describe --dirty` ; then
|
||||
:
|
||||
else
|
||||
# Don't want any local changes, since those won't be
|
||||
# reflected in the worktrees and we might miss a string change.
|
||||
echo "! There are local changes."
|
||||
exit 1
|
||||
fi
|
||||
# No unsaved changes; enforce a string freeze of one week
|
||||
DATE_PREV=$( git log -1 translation --date=unix | sed -e '/^Date:/s+.*:++p' -e d )
|
||||
DATE_HEAD=$( last_week )
|
||||
test "$DATE_PREV" -le "$DATE_HEAD" || { echo "! Translation tag has not aged enough." ; git log -1 translation ; exit 1 ; }
|
||||
|
||||
# Tag is good, check that necessary files exist. The list of
|
||||
# files is hard-coded, but should match what is in the Transifex config.
|
||||
test -f ".tx/config" || { echo "! No Transifex configuration is present." ; exit 1 ; }
|
||||
for f in $TX_FILE_LIST ; do
|
||||
test -f $f || { echo "! Translation file '$f' does not exist." ; exit 1 ; }
|
||||
done
|
||||
|
||||
### COMPARE TRANSLATIONS
|
||||
#
|
||||
#
|
||||
|
||||
# The state of translations; assume that sha256 is enough
|
||||
# to distinguish changed translations when we cat all the
|
||||
# string sources together.
|
||||
tx_sum()
|
||||
{
|
||||
CURDIR=`pwd`
|
||||
WORKTREE_NAME="$1"
|
||||
WORKTREE_TAG="$2"
|
||||
|
||||
git worktree add $WORKTREE_NAME $WORKTREE_TAG > /dev/null 2>&1 || { echo "! Could not create worktree." ; exit 1 ; }
|
||||
( cd $WORKTREE_NAME && sh "$CURDIR"/ci/txpush.sh --no-tx ) > /dev/null 2>&1 || { echo "! Could not re-create translations." ; exit 1 ; }
|
||||
|
||||
# Remove linenumbers from .ts (XML) and .pot
|
||||
sed -i'' -e '/<location filename/d' "$WORKTREE_NAME/lang/calamares_en.ts"
|
||||
sed -i'' -e '/^#: src..*[0-9]$/d' $WORKTREE_NAME/lang/python.pot
|
||||
|
||||
_SUM=$( cd $WORKTREE_NAME && cat $TX_FILE_LIST | $SHA256 )
|
||||
echo "$_SUM"
|
||||
}
|
||||
|
||||
# Check from the translation tag as well
|
||||
HEAD_SUM=`tx_sum build-txcheck-head ""` || { echo "$HEAD_SUM" ; exit 1 ; }
|
||||
PREV_SUM=`tx_sum build-txcheck-prev translation` || { echo "$HEAD_SUM" ; exit 1 ; }
|
||||
|
||||
# An error message will have come from the shell function
|
||||
test -d build-txcheck-head || { echo "$HEAD_SUM" ; exit 1 ; }
|
||||
test -d build-txcheck-prev || { echo "$PREV_SUM" ; exit 1 ; }
|
||||
|
||||
if test "$HEAD_SUM" = "$PREV_SUM" ; then
|
||||
:
|
||||
else
|
||||
echo "! Translations have changed."
|
||||
for f in $TX_FILE_LIST ; do
|
||||
echo "! $f"
|
||||
diff -u build-txcheck-prev/$f build-txcheck-head/$f
|
||||
done
|
||||
echo "! Run 'txcheck.sh --cleanup' to clean-up before next run"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
tx_cleanup
|
||||
exit 0
|
142
ci/txpull.sh
142
ci/txpull.sh
@@ -1,142 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
### LICENSE
|
||||
# === This file is part of Calamares - <https://calamares.io> ===
|
||||
#
|
||||
# SPDX-FileCopyrightText: 2015-2016 Teo Mrnjavac <teo@kde.org>
|
||||
# SPDX-FileCopyrightText: 2017-2020 Adriaan de Groot <groot@kde.org>
|
||||
# SPDX-License-Identifier: BSD-2-Clause
|
||||
#
|
||||
# This file is Free Software: you can redistribute it and/or modify
|
||||
# it under the terms of the 2-clause BSD License.
|
||||
#
|
||||
### END LICENSE
|
||||
|
||||
### USAGE
|
||||
#
|
||||
# Fetch the Transifex translations for Calamares and incorporate them
|
||||
# into the source tree, adding commits of the different files.
|
||||
#
|
||||
# Run this (occasionally) at the top-level directory to get
|
||||
# new translations. See also CMakeLists.txt and ci/txstats.py
|
||||
# for update instructions.
|
||||
#
|
||||
### END USAGE
|
||||
|
||||
### SANITY CHECKING
|
||||
#
|
||||
# The script needs a .tx/config to talk to the Transifex server;
|
||||
# it also checks that it is run from the top-level of a Calamares
|
||||
# checkout. In order to use the system overall, you'll also need:
|
||||
# - ~/.gitconfig (For the git commits this does)
|
||||
# - ~/.transifexrc (Password token for Transifex)
|
||||
# - ~/.ssh (For git commits)
|
||||
#
|
||||
test -f "CMakeLists.txt" || { echo "! Not at Calamares top-level" ; exit 1 ; }
|
||||
test -f ".tx/config" || { echo "! Not at Calamares top-level" ; exit 1 ; }
|
||||
test -f "calamares.desktop" || { echo "! Not at Calamares top-level" ; exit 1 ; }
|
||||
|
||||
|
||||
### FIND EXECUTABLES
|
||||
#
|
||||
#
|
||||
XMLLINT=""
|
||||
for _xmllint in xmllint
|
||||
do
|
||||
$_xmllint --version > /dev/null 2>&1 && XMLLINT=$_xmllint
|
||||
test -n "$XMLLINT" && break
|
||||
done
|
||||
# XMLLINT is optional
|
||||
|
||||
|
||||
### FETCH TRANSLATIONS
|
||||
#
|
||||
# Use Transifex client to get translations; this depends on the
|
||||
# .tx/config file to locate files, and overwrites them in the
|
||||
# filesystem with new (merged) translations.
|
||||
export QT_SELECT=5
|
||||
tx pull --force --source --all
|
||||
|
||||
|
||||
### CLEANUP TRANSLATIONS
|
||||
#
|
||||
# Some languages have been deprecated. They may still exist in Transifex,
|
||||
# so clean them up after pulling.
|
||||
#
|
||||
drop_language() {
|
||||
rm -rf lang/python/"$1" lang/calamares_"$1".ts
|
||||
grep -v "\\[$1]" calamares.desktop > calamares.desktop.new
|
||||
mv calamares.desktop.new calamares.desktop
|
||||
}
|
||||
|
||||
drop_language es_ES
|
||||
drop_language pl_PL
|
||||
|
||||
# Also fix the .desktop file, which has some fields removed by Transifex.
|
||||
#
|
||||
{ cat calamares.desktop.in ; grep "\\[[a-zA-Z_@]*]=" calamares.desktop ; } > calamares.desktop.new
|
||||
mv calamares.desktop.new calamares.desktop
|
||||
|
||||
# And fixup the XML files like in txpush.sh
|
||||
if test -n "$XMLLINT" ; then
|
||||
for TS_FILE in lang/calamares_*.ts
|
||||
do
|
||||
$XMLLINT --c14n11 "$TS_FILE" | { echo "<!DOCTYPE TS>" ; cat - ; } | $XMLLINT --format --encode utf-8 -o "$TS_FILE".new - && mv "$TS_FILE".new "$TS_FILE"
|
||||
done
|
||||
fi
|
||||
|
||||
|
||||
### COMMIT TRANSLATIONS
|
||||
#
|
||||
# Produce multiple commits (for the various parts of the i18n
|
||||
# infrastructure used by Calamares) of the updated translations.
|
||||
# Try to be a little smart about not committing trivial changes.
|
||||
|
||||
# Who is credited with these CI commits
|
||||
AUTHOR="--author='Calamares CI <groot@kde.org>'"
|
||||
# Message to put after the module name
|
||||
BOILERPLATE="Automatic merge of Transifex translations"
|
||||
|
||||
git add --verbose lang/calamares*.ts
|
||||
git commit "$AUTHOR" --message="i18n: [calamares] $BOILERPLATE" | true
|
||||
|
||||
rm -f lang/desktop*.desktop
|
||||
awk '
|
||||
BEGIN {skip=0;}
|
||||
/^# Translations/ {skip=1;}
|
||||
{if (!skip || (length($0)>1 && $0 != "# Translations")) {
|
||||
skip=0; print $0;
|
||||
}}' < calamares.desktop > calamares.desktop.new
|
||||
mv calamares.desktop.new calamares.desktop
|
||||
git add --verbose calamares.desktop
|
||||
git commit "$AUTHOR" --message="i18n: [desktop] $BOILERPLATE" | true
|
||||
|
||||
# Transifex updates the PO-Created timestamp also when nothing interesting
|
||||
# has happened, so drop the files which have just 1 line changed (the
|
||||
# PO-Created line). This applies only to modules which use po-files.
|
||||
git diff --numstat src/modules | awk '($1==1 && $2==1){print $3}' | xargs git checkout --
|
||||
|
||||
# Go through the Python modules; those with a lang/ subdir have their
|
||||
# own complete gettext-based setup.
|
||||
for MODULE_DIR in $(find src/modules -maxdepth 1 -mindepth 1 -type d) ; do
|
||||
FILES=$(find "$MODULE_DIR" -name "*.py" -a -type f)
|
||||
if test -n "$FILES" ; then
|
||||
MODULE_NAME=$(basename ${MODULE_DIR})
|
||||
if [ -d ${MODULE_DIR}/lang ]; then
|
||||
# Convert PO files to MO files
|
||||
for POFILE in $(find ${MODULE_DIR} -name "*.po") ; do
|
||||
sed -i'' '/^"Content-Type/s/CHARSET/UTF-8/' $POFILE
|
||||
# msgfmt -o ${POFILE%.po}.mo $POFILE
|
||||
done
|
||||
git add --verbose ${MODULE_DIR}/lang/*
|
||||
git commit "$AUTHOR" --message="i18n: [${MODULE_NAME}] $BOILERPLATE" | true
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
for POFILE in $(find lang -name "python.po") ; do
|
||||
sed -i'' '/^"Content-Type/s/CHARSET/UTF-8/' $POFILE
|
||||
# msgfmt -o ${POFILE%.po}.mo $POFILE
|
||||
done
|
||||
git add --verbose lang/python*
|
||||
git commit "$AUTHOR" --message="i18n: [python] $BOILERPLATE" | true
|
154
ci/txpush.sh
154
ci/txpush.sh
@@ -1,154 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
### LICENSE
|
||||
# === This file is part of Calamares - <https://calamares.io> ===
|
||||
#
|
||||
# SPDX-FileCopyrightText: 2015-2016 Teo Mrnjavac <teo@kde.org>
|
||||
# SPDX-FileCopyrightText: 2017-2020 Adriaan de Groot <groot@kde.org>
|
||||
# SPDX-License-Identifier: BSD-2-Clause
|
||||
#
|
||||
# This file is Free Software: you can redistribute it and/or modify
|
||||
# it under the terms of the 2-clause BSD License.
|
||||
#
|
||||
### END LICENSE
|
||||
|
||||
### USAGE
|
||||
#
|
||||
# Extract translations from Calamares source and send them
|
||||
# to Transifex. Also (forcibly) updates the git "translation"
|
||||
# tag to document that source texts were updated and sent;
|
||||
# this is used by txcheck.sh to ensure that there's enough
|
||||
# time between updates and releases, and that strings don't
|
||||
# change between updates and releases.
|
||||
#
|
||||
# Run this at the top-level.
|
||||
#
|
||||
# Use the --no-tx option to do the extraction, but not the
|
||||
# pushing-to-Transifex part. This can be useful to check for
|
||||
# new strings or when testing the tools themselves.
|
||||
#
|
||||
### END USAGE
|
||||
|
||||
### SANITY CHECKING
|
||||
#
|
||||
# The script needs a .tx/config to talk to the Transifex server;
|
||||
# it also checks that it is run from the top-level of a Calamares
|
||||
# checkout. In order to use the system overall, you'll also need:
|
||||
# - ~/.gitconfig (For the git commits this does)
|
||||
# - ~/.transifexrc (Password token for Transifex)
|
||||
# - ~/.ssh (For git commits)
|
||||
#
|
||||
test -f "CMakeLists.txt" || { echo "! Not at Calamares top-level" ; exit 1 ; }
|
||||
test -f ".tx/config" || { echo "! Not at Calamares top-level" ; exit 1 ; }
|
||||
test -f "calamares.desktop" || { echo "! Not at Calamares top-level" ; exit 1 ; }
|
||||
|
||||
if test "x$1" = "x--no-tx" ; then
|
||||
# tx is the transifex command -- eat its arguments and do nothing
|
||||
tx() {
|
||||
echo "Skipped tx $*"
|
||||
}
|
||||
# txtag is used to tag in git to measure changes -- skip it too
|
||||
txtag() {
|
||||
echo "Skipped tx tagging."
|
||||
}
|
||||
else
|
||||
# tx is the regular transifex command
|
||||
# txtag is used to tag in git to measure changes
|
||||
txtag() {
|
||||
git tag -f translation
|
||||
git push --force origin translation
|
||||
}
|
||||
fi
|
||||
|
||||
|
||||
### FIND EXECUTABLES
|
||||
#
|
||||
#
|
||||
LUPDATE=""
|
||||
for _lupdate in lupdate-qt5 lupdate
|
||||
do
|
||||
export QT_SELECT=5
|
||||
$_lupdate -version > /dev/null 2>&1 || export QT_SELECT=qt5
|
||||
$_lupdate -version > /dev/null 2>&1 && LUPDATE=$_lupdate
|
||||
test -n "$LUPDATE" && break
|
||||
done
|
||||
test -n "$LUPDATE" || { echo "! No working lupdate" ; lupdate -version ; exit 1 ; }
|
||||
|
||||
XMLLINT=""
|
||||
for _xmllint in xmllint
|
||||
do
|
||||
$_xmllint --version > /dev/null 2>&1 && XMLLINT=$_xmllint
|
||||
test -n "$XMLLINT" && break
|
||||
done
|
||||
# XMLLINT is optional
|
||||
|
||||
|
||||
### CREATE TRANSLATIONS
|
||||
#
|
||||
# Use local tools (depending on type of source) to create translation
|
||||
# sources, then push to Transifex
|
||||
|
||||
# Don't pull branding translations in,
|
||||
# those are done separately.
|
||||
_srcdirs="src/calamares src/libcalamares src/libcalamaresui src/modules src/qml"
|
||||
$LUPDATE -no-obsolete $_srcdirs -ts lang/calamares_en.ts
|
||||
# Non-Transifex special-cases
|
||||
#
|
||||
# - timezone names can be translated, but that's 700+ strings I don't want
|
||||
# to inflict on translators normally
|
||||
# - keyboard layouts can be translated, but that's 767 strings
|
||||
#
|
||||
# For both of these, the language / translation only needs to be updated
|
||||
# when the source data is updated, which is very very rarely.
|
||||
# $LUPDATE -no-obsolete -extensions cxxtr src/libcalamares/locale -ts lang/tz_en.ts
|
||||
# $LUPDATE -no-obsolete -extensions cxxtr src/modules/keyboard -ts lang/kb_en.ts
|
||||
|
||||
if test -n "$XMLLINT" ; then
|
||||
TS_FILE="lang/calamares_en.ts"
|
||||
$XMLLINT --c14n11 "$TS_FILE" | { echo "<!DOCTYPE TS>" ; cat - ; } | $XMLLINT --format --encode utf-8 -o "$TS_FILE".new - && mv "$TS_FILE".new "$TS_FILE"
|
||||
fi
|
||||
|
||||
tx push --source --no-interactive -r calamares.calamares
|
||||
tx push --source --no-interactive -r calamares.fdo
|
||||
|
||||
|
||||
### PYTHON MODULES
|
||||
#
|
||||
# The Python tooling depends on the underlying distro to provide
|
||||
# gettext, and handles two cases:
|
||||
#
|
||||
# - python modules with their own lang/ subdir, for larger translations
|
||||
# - python modules without lang/, which use one shared catalog
|
||||
#
|
||||
|
||||
PYGETTEXT="xgettext --keyword=_n:1,2 -L python"
|
||||
|
||||
SHARED_PYTHON=""
|
||||
for MODULE_DIR in $(find src/modules -maxdepth 1 -mindepth 1 -type d) ; do
|
||||
FILES=$(find "$MODULE_DIR" -name "*.py" -a -type f)
|
||||
if test -n "$FILES" ; then
|
||||
MODULE_NAME=$(basename ${MODULE_DIR})
|
||||
if [ -d ${MODULE_DIR}/lang ]; then
|
||||
${PYGETTEXT} -p ${MODULE_DIR}/lang -d ${MODULE_NAME} -o ${MODULE_NAME}.pot ${MODULE_DIR}/*.py
|
||||
POTFILE="${MODULE_DIR}/lang/${MODULE_NAME}.pot"
|
||||
if [ -f "$POTFILE" ]; then
|
||||
sed -i'' '/^"Content-Type/s/CHARSET/UTF-8/' "$POTFILE"
|
||||
tx set -r calamares.${MODULE_NAME} --source -l en "$POTFILE"
|
||||
tx push --source --no-interactive -r calamares.${MODULE_NAME}
|
||||
fi
|
||||
else
|
||||
SHARED_PYTHON="$SHARED_PYTHON $FILES"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
if test -n "$SHARED_PYTHON" ; then
|
||||
${PYGETTEXT} -p lang -d python -o python.pot $SHARED_PYTHON
|
||||
POTFILE="lang/python.pot"
|
||||
sed -i'' '/^"Content-Type/s/CHARSET/UTF-8/' "$POTFILE"
|
||||
tx set -r calamares.python --source -l en "$POTFILE"
|
||||
tx push --source --no-interactive -r calamares.python
|
||||
fi
|
||||
|
||||
txtag
|
||||
exit 0
|
@@ -1,47 +0,0 @@
|
||||
#! /usr/bin/env python3
|
||||
#
|
||||
# SPDX-FileCopyrightText: 2020 Adriaan de Groot <groot@kde.org>
|
||||
# SPDX-License-Identifier: BSD-2-Clause
|
||||
#
|
||||
# Reduce a translation file -- generally, a Timezone translation -- by
|
||||
# dropping untranslated strings. An untranslated string is one that
|
||||
# has an empty translation **and** is marked unfinished.
|
||||
#
|
||||
# This is mostly useful to cut down the size of the source file:
|
||||
# far and away most of the zones are not translated, and it's just a
|
||||
# handful of places that get special treatment.
|
||||
|
||||
from xml.dom.minidom import parse
|
||||
import sys
|
||||
|
||||
valid = True
|
||||
dom = parse(sys.argv[1])
|
||||
for n in dom.getElementsByTagName("translation"):
|
||||
attrs = n.attributes.keys()
|
||||
|
||||
drop = True
|
||||
if "type" not in attrs:
|
||||
drop = False
|
||||
elif "type" in attrs and n.attributes["type"].value != "unfinished":
|
||||
# In the samples I've seen, only "unfinished" is a valid type;
|
||||
# once something has been translated, the attribute vanishes (see
|
||||
# the if branch, above).
|
||||
print("WARNING ''{!s}'' unknown type".format(n.attributes["type"].value))
|
||||
drop = False
|
||||
valid = False
|
||||
else:
|
||||
t = n.firstChild
|
||||
if t is None:
|
||||
# Unfinished and empty
|
||||
drop = True
|
||||
else:
|
||||
drop = bool(t.data)
|
||||
if drop:
|
||||
message = n.parentNode
|
||||
message.parentNode.removeChild(message)
|
||||
message.unlink()
|
||||
|
||||
if valid:
|
||||
for line in dom.toxml().split("\n"):
|
||||
if line.strip():
|
||||
print(line)
|
234
ci/txstats.py
234
ci/txstats.py
@@ -1,234 +0,0 @@
|
||||
#! /usr/bin/env python3
|
||||
#
|
||||
# SPDX-FileCopyrightText: 2018 Adriaan de Groot <groot@kde.org>
|
||||
# SPDX-License-Identifier: BSD-2-Clause
|
||||
#
|
||||
# Uses the Transifex API to get a list of enabled languages,
|
||||
# and outputs CMake settings for inclusion into CMakeLists.txt.
|
||||
#
|
||||
# This is a Python3 script.
|
||||
#
|
||||
# Run it with a -v command-line option to get extra output on
|
||||
# actual translation percentages.
|
||||
import sys
|
||||
import argparse
|
||||
|
||||
class TXError(Exception):
|
||||
pass
|
||||
|
||||
|
||||
class TransifexGetter(object):
|
||||
"""
|
||||
Get language data from Transifex.
|
||||
|
||||
The object does all the work in __init__, after that
|
||||
the only relevant data is .languages, a dictionary
|
||||
of language data.
|
||||
"""
|
||||
def __init__(self):
|
||||
token = self.get_tx_credentials()
|
||||
if token is None:
|
||||
raise TXError("Could not get Transifex API token")
|
||||
|
||||
import requests
|
||||
r = requests.get("https://api.transifex.com/organizations/calamares/projects/calamares/resources/calamares/", auth=("api", token))
|
||||
if r.status_code != 200:
|
||||
raise TXError("Could not get Transifex data from API")
|
||||
|
||||
j = r.json()
|
||||
self.languages = j["stats"]
|
||||
|
||||
|
||||
def get_tx_credentials(self):
|
||||
"""
|
||||
Gets the API token out of the user's .transifexrc (this is supposed
|
||||
to be secure).
|
||||
"""
|
||||
import configparser
|
||||
import os
|
||||
txconfig_name = os.path.expanduser("~/.transifexrc")
|
||||
try:
|
||||
with open(txconfig_name, "r") as f:
|
||||
parser = configparser.ConfigParser()
|
||||
parser.read_file(f)
|
||||
|
||||
return parser.get("https://www.transifex.com", "password")
|
||||
except IOError as e:
|
||||
return None
|
||||
|
||||
|
||||
class BogusGetter(object):
|
||||
"""
|
||||
Fake language data.
|
||||
|
||||
This object pretends to retrieve data, and returns fixed language lists and percentages,
|
||||
for testing purposes without hitting Transifex servers all the time.
|
||||
"""
|
||||
def __init__(self):
|
||||
self.languages = dict()
|
||||
for lang, completion in ( ("sq", 100), ("ar", 44), ("as", 28), ("de", 15), ("da", 4), ("ts", 82) ):
|
||||
self.languages[lang] = dict(translated=dict(stringcount=686, percentage=(completion/100.0)))
|
||||
|
||||
|
||||
class PrintOutputter(object):
|
||||
"""
|
||||
Output via print-statements.
|
||||
"""
|
||||
def __init__(self):
|
||||
pass
|
||||
|
||||
def print(self, s):
|
||||
print(s)
|
||||
|
||||
def __enter__(self):
|
||||
return self
|
||||
|
||||
def __exit__(self, e, v, tb):
|
||||
pass
|
||||
|
||||
|
||||
class EditingOutputter(object):
|
||||
"""
|
||||
Edit CMakeLists in-place.
|
||||
"""
|
||||
def __init__(self):
|
||||
with open("CMakeLists.txt", "r") as f:
|
||||
lines = f.readlines()
|
||||
|
||||
mark = None
|
||||
for l in lines:
|
||||
# Note that we didn't strip the lines, so need the \n here
|
||||
if l.startswith("# Total ") and l.endswith(" languages\n"):
|
||||
mark = lines.index(l)
|
||||
break
|
||||
if mark is None:
|
||||
raise TXError("No CMakeLists.txt lines for TX stats found")
|
||||
self.pre_lines = lines[:mark]
|
||||
|
||||
nextmark = mark + 1
|
||||
for l in lines[mark+1:]:
|
||||
if l.startswith("set( _tx_"):
|
||||
nextmark += 1
|
||||
continue
|
||||
if l.startswith(" "):
|
||||
nextmark += 1
|
||||
continue
|
||||
break
|
||||
if nextmark > mark + 12 or nextmark > len(lines) - 4:
|
||||
# Try to catch runaway nextmarks: we know there should
|
||||
# be four set-lines, which are unlikely to be 3 lines each;
|
||||
# similarly the CMakeLists.txt is supposed to end with
|
||||
# some boilerplate.
|
||||
raise TXError("Could not find end of TX settings in CMakeLists.txt")
|
||||
self.post_lines = lines[nextmark:]
|
||||
|
||||
self.mid_lines = []
|
||||
print("# Editing CMakeLists.txt in-place")
|
||||
|
||||
def print(self, s):
|
||||
# Add the implicit \n from print()
|
||||
self.mid_lines.append(s + "\n")
|
||||
if s.startswith("#"):
|
||||
print(s)
|
||||
|
||||
def __enter__(self):
|
||||
return self
|
||||
|
||||
def __exit__(self, e, v, tb):
|
||||
if e is None:
|
||||
with open("CMakeLists.txt", "w") as f:
|
||||
f.write("".join(self.pre_lines + self.mid_lines + self.post_lines))
|
||||
print("# CMakeLists.txt updated")
|
||||
|
||||
|
||||
def output_langs(all_langs, outputter, label, filterfunc):
|
||||
"""
|
||||
Output (via print) all of the languages in @p all_langs
|
||||
that satisfy the translation-percentage filter @p filterfunc.
|
||||
Prints a CMake set() command with the @p label as part
|
||||
of the variable name.
|
||||
|
||||
Performs line-wrapping.
|
||||
"""
|
||||
these_langs = [l for s, l in all_langs if filterfunc(s)]
|
||||
out = " ".join(["set( _tx_%s" % label, " ".join(sorted(these_langs)), ")"])
|
||||
width = 68
|
||||
prefix = ""
|
||||
|
||||
while len(out) > width - len(prefix):
|
||||
chunk = out[:out[:width].rfind(" ")]
|
||||
outputter.print("%s%s" % (prefix, chunk))
|
||||
out = out[len(chunk)+1:]
|
||||
prefix = " "
|
||||
outputter.print("%s%s" % (prefix, out))
|
||||
|
||||
|
||||
def get_tx_stats(languages, outputter, verbose):
|
||||
"""
|
||||
Does an API request to Transifex with the given API @p token, getting
|
||||
the translation statistics for the main body of texts. Then prints
|
||||
out CMake settings to replace the _tx_* variables in CMakeLists.txt
|
||||
according to standard criteria.
|
||||
|
||||
If @p verbose is True, prints out language stats as well.
|
||||
"""
|
||||
suppressed_languages = ( "es_ES", ) # In Transifex, but not used
|
||||
# Some languages go into the "incomplete" list by definition,
|
||||
# regardless of their completion status: this can have various reasons.
|
||||
#
|
||||
# Note that Esperanto (eo) is special-cased in CMakeLists.txt
|
||||
# during the build; recent Qt releases *do* support the language,
|
||||
# and it's at-the-least ok.
|
||||
incomplete_languages = (
|
||||
"eo", # Not supported by QLocale < 5.12.1
|
||||
"ie", # Not supported by Qt at least through 5.15.0
|
||||
)
|
||||
|
||||
all_langs = []
|
||||
outputter.print("# Total %d languages" % len(languages))
|
||||
for lang_name in languages:
|
||||
if lang_name in suppressed_languages:
|
||||
continue
|
||||
stats = languages[lang_name]["translated"]["percentage"]
|
||||
# Make the by-definition-incomplete languages have a percentage
|
||||
# lower than zero; this way they end up sorted (in -v output)
|
||||
# at the bottom but you can still determine the "actual" percentage.
|
||||
if lang_name in incomplete_languages:
|
||||
stats = -stats
|
||||
all_langs.append((stats, lang_name))
|
||||
|
||||
if verbose:
|
||||
for s, l in sorted(all_langs, reverse=True):
|
||||
outputter.print("# %16s\t%6.2f" % (l, s * 100.0))
|
||||
output_langs(all_langs, outputter, "complete", lambda s : s == 1.0)
|
||||
output_langs(all_langs, outputter, "good", lambda s : 1.0 > s >= 0.75)
|
||||
output_langs(all_langs, outputter, "ok", lambda s : 0.75 > s >= 0.05)
|
||||
output_langs(all_langs, outputter, "incomplete", lambda s : 0.05 > s)
|
||||
|
||||
return 0
|
||||
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser(description="Update Transifex Statistics")
|
||||
parser.add_argument("--verbose", "-v", help="Show statistics", action="store_true")
|
||||
parser.add_argument("--bogus", "-n", help="Use bogus data (do not query Transifex)", action="store_true")
|
||||
parser.add_argument("--edit", "-e", help="Edit CMakeLists.txt in-place", action="store_true")
|
||||
args = parser.parse_args()
|
||||
try:
|
||||
if args.bogus:
|
||||
getter = BogusGetter()
|
||||
else:
|
||||
getter = TransifexGetter()
|
||||
if args.edit:
|
||||
outputter = EditingOutputter()
|
||||
else:
|
||||
outputter = PrintOutputter()
|
||||
with outputter:
|
||||
return get_tx_stats(getter.languages, outputter, args.verbose)
|
||||
except TXError as e:
|
||||
print("! " + str(e))
|
||||
return 1;
|
||||
return 0
|
||||
|
||||
if __name__ == "__main__":
|
||||
sys.exit(main())
|
@@ -1,6 +1,3 @@
|
||||
# SPDX-FileCopyrightText: 2014 Teo Mrnjavac <teo@kde.org>
|
||||
# SPDX-License-Identifier: BSD-2-Clause
|
||||
|
||||
IF(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
|
||||
MESSAGE(FATAL_ERROR "Cannot find install manifest: \"@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt\"")
|
||||
ENDIF(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
|
||||
|
@@ -1,7 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- SPDX-FileCopyrightText: no
|
||||
SPDX-License-Identifier: CC0-1.0
|
||||
-->
|
||||
<!DOCTYPE policyconfig PUBLIC
|
||||
"-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
|
||||
"http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd">
|
||||
@@ -22,4 +19,4 @@
|
||||
<annotate key="org.freedesktop.policykit.exec.path">/usr/bin/calamares</annotate>
|
||||
<annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate>
|
||||
</action>
|
||||
</policyconfig>
|
||||
</policyconfig>
|
@@ -1,37 +0,0 @@
|
||||
# $FreeBSD$
|
||||
#
|
||||
# SPDX-FileCopyrightText: 2020 Adriaan de Groot <adridg@FreeBSD.org>
|
||||
# SPDX-License-Identifier: BSD-2-Clause
|
||||
|
||||
PORTNAME= calamares
|
||||
DISTVERSION= 3.2.25
|
||||
CATEGORIES= sysutils
|
||||
MASTER_SITES= https://github.com/${PORTNAME}/${PORTNAME}/releases/download/v${DISTVERSION}/
|
||||
|
||||
MAINTAINER= adridg@FreeBSD.org
|
||||
COMMENT= GUI System installer and OEM configurator
|
||||
|
||||
LICENSE= GPLv3
|
||||
LICENSE_FILE= ${WRKSRC}/LICENSE
|
||||
|
||||
LIB_DEPENDS= libyaml-cpp.so:devel/yaml-cpp \
|
||||
libpwquality.so:security/libpwquality \
|
||||
libboost_python${PYTHON_SUFFIX}.so:devel/boost-python-libs
|
||||
|
||||
USES= cmake compiler:c++17-lang gettext kde:5 pkgconfig \
|
||||
python:3.3+ qt:5
|
||||
USE_QT= concurrent core dbus declarative gui \
|
||||
network quickcontrols2 svg widgets xml \
|
||||
buildtools_build linguist_build qmake_build
|
||||
USE_KDE= coreaddons dbusaddons parts service \
|
||||
ecm_build
|
||||
USE_LDCONFIG= yes
|
||||
|
||||
CMAKE_OFF= WITH_KF5Crash \
|
||||
INSTALL_CONFIG \
|
||||
INSTALL_COMPLETION \
|
||||
INSTALL_POLKIT
|
||||
CMAKE_ON= CMAKE_DISABLE_FIND_PACKAGE_KPMcore
|
||||
CMAKE_ARGS= -DSKIP_MODULES="webview"
|
||||
|
||||
.include <bsd.port.mk>
|
@@ -1,3 +0,0 @@
|
||||
TIMESTAMP = 1592339404
|
||||
SHA256 (calamares-3.2.25.tar.gz) = 797ce33db7d4e4c06bbccef95f6c4023f7628e91bd142896695565fed4ae8c4b
|
||||
SIZE (calamares-3.2.25.tar.gz) = 3580197
|
@@ -1,14 +0,0 @@
|
||||
Calamares is an installer framework. By design it is very customizable,
|
||||
in order to satisfy a wide variety of needs and use cases.
|
||||
|
||||
Calamares aims to be easy, usable, beautiful, pragmatic, inclusive and
|
||||
distribution-agnostic.
|
||||
|
||||
Got a Linux distribution but no system installer? Grab Calamares, mix
|
||||
and match any number of Calamares modules (or write your own in Python
|
||||
or C++), throw together some branding, package it up and you are ready
|
||||
to ship!
|
||||
|
||||
(The above applies to FreeBSD as well)
|
||||
|
||||
WWW: https://calamares.io/
|
@@ -1,224 +0,0 @@
|
||||
bin/calamares
|
||||
include/libcalamares/CalamaresConfig.h
|
||||
include/libcalamares/CppJob.h
|
||||
include/libcalamares/DllMacro.h
|
||||
include/libcalamares/GlobalStorage.h
|
||||
include/libcalamares/Job.h
|
||||
include/libcalamares/JobExample.h
|
||||
include/libcalamares/JobQueue.h
|
||||
include/libcalamares/ProcessJob.h
|
||||
include/libcalamares/PythonHelper.h
|
||||
include/libcalamares/PythonJob.h
|
||||
include/libcalamares/PythonJobApi.h
|
||||
include/libcalamares/Settings.h
|
||||
include/libcalamares/utils/BoostPython.h
|
||||
include/libcalamares/utils/CalamaresUtilsSystem.h
|
||||
include/libcalamares/utils/CommandList.h
|
||||
include/libcalamares/utils/Dirs.h
|
||||
include/libcalamares/utils/Entropy.h
|
||||
include/libcalamares/utils/Logger.h
|
||||
include/libcalamares/utils/NamedEnum.h
|
||||
include/libcalamares/utils/NamedSuffix.h
|
||||
include/libcalamares/utils/PluginFactory.h
|
||||
include/libcalamares/utils/RAII.h
|
||||
include/libcalamares/utils/Retranslator.h
|
||||
include/libcalamares/utils/String.h
|
||||
include/libcalamares/utils/Tests.h
|
||||
include/libcalamares/utils/UMask.h
|
||||
include/libcalamares/utils/Units.h
|
||||
include/libcalamares/utils/Variant.h
|
||||
include/libcalamares/utils/Yaml.h
|
||||
include/libcalamares/utils/moc-warnings.h
|
||||
lib/calamares/libcalamares.so
|
||||
lib/calamares/modules/bootloader/main.py
|
||||
lib/calamares/modules/bootloader/module.desc
|
||||
lib/calamares/modules/bootloader/test.yaml
|
||||
lib/calamares/modules/contextualprocess/libcalamares_job_contextualprocess.so
|
||||
lib/calamares/modules/contextualprocess/module.desc
|
||||
lib/calamares/modules/displaymanager/main.py
|
||||
lib/calamares/modules/displaymanager/module.desc
|
||||
lib/calamares/modules/dracut/main.py
|
||||
lib/calamares/modules/dracut/module.desc
|
||||
lib/calamares/modules/dracutlukscfg/libcalamares_job_dracutlukscfg.so
|
||||
lib/calamares/modules/dracutlukscfg/module.desc
|
||||
lib/calamares/modules/dummycpp/libcalamares_job_dummycpp.so
|
||||
lib/calamares/modules/dummycpp/module.desc
|
||||
lib/calamares/modules/dummyprocess/module.desc
|
||||
lib/calamares/modules/dummypython/main.py
|
||||
lib/calamares/modules/dummypython/module.desc
|
||||
lib/calamares/modules/finished/libcalamares_viewmodule_finished.so
|
||||
lib/calamares/modules/finished/module.desc
|
||||
lib/calamares/modules/fstab/main.py
|
||||
lib/calamares/modules/fstab/module.desc
|
||||
lib/calamares/modules/fstab/test.yaml
|
||||
lib/calamares/modules/grubcfg/main.py
|
||||
lib/calamares/modules/grubcfg/module.desc
|
||||
lib/calamares/modules/hostinfo/libcalamares_job_hostinfo.so
|
||||
lib/calamares/modules/hostinfo/module.desc
|
||||
lib/calamares/modules/hwclock/main.py
|
||||
lib/calamares/modules/hwclock/module.desc
|
||||
lib/calamares/modules/initcpio/libcalamares_job_initcpio.so
|
||||
lib/calamares/modules/initcpio/module.desc
|
||||
lib/calamares/modules/initcpiocfg/main.py
|
||||
lib/calamares/modules/initcpiocfg/module.desc
|
||||
lib/calamares/modules/initramfs/libcalamares_job_initramfs.so
|
||||
lib/calamares/modules/initramfs/module.desc
|
||||
lib/calamares/modules/initramfscfg/encrypt_hook
|
||||
lib/calamares/modules/initramfscfg/encrypt_hook_nokey
|
||||
lib/calamares/modules/initramfscfg/main.py
|
||||
lib/calamares/modules/initramfscfg/module.desc
|
||||
lib/calamares/modules/interactiveterminal/libcalamares_viewmodule_interactiveterminal.so
|
||||
lib/calamares/modules/interactiveterminal/module.desc
|
||||
lib/calamares/modules/keyboard/libcalamares_viewmodule_keyboard.so
|
||||
lib/calamares/modules/keyboard/module.desc
|
||||
lib/calamares/modules/keyboardq/libcalamares_viewmodule_keyboardq.so
|
||||
lib/calamares/modules/keyboardq/module.desc
|
||||
lib/calamares/modules/license/libcalamares_viewmodule_license.so
|
||||
lib/calamares/modules/license/module.desc
|
||||
lib/calamares/modules/locale/libcalamares_viewmodule_locale.so
|
||||
lib/calamares/modules/locale/module.desc
|
||||
lib/calamares/modules/localecfg/main.py
|
||||
lib/calamares/modules/localecfg/module.desc
|
||||
lib/calamares/modules/localeq/libcalamares_viewmodule_localeq.so
|
||||
lib/calamares/modules/localeq/module.desc
|
||||
lib/calamares/modules/luksbootkeyfile/libcalamares_job_luksbootkeyfile.so
|
||||
lib/calamares/modules/luksbootkeyfile/module.desc
|
||||
lib/calamares/modules/luksopenswaphookcfg/main.py
|
||||
lib/calamares/modules/luksopenswaphookcfg/module.desc
|
||||
lib/calamares/modules/machineid/libcalamares_job_machineid.so
|
||||
lib/calamares/modules/machineid/module.desc
|
||||
lib/calamares/modules/mount/main.py
|
||||
lib/calamares/modules/mount/module.desc
|
||||
lib/calamares/modules/mount/test.yaml
|
||||
lib/calamares/modules/netinstall/libcalamares_viewmodule_netinstall.so
|
||||
lib/calamares/modules/netinstall/module.desc
|
||||
lib/calamares/modules/networkcfg/main.py
|
||||
lib/calamares/modules/networkcfg/module.desc
|
||||
lib/calamares/modules/notesqml/libcalamares_viewmodule_notesqml.so
|
||||
lib/calamares/modules/notesqml/module.desc
|
||||
lib/calamares/modules/oemid/libcalamares_viewmodule_oemid.so
|
||||
lib/calamares/modules/oemid/module.desc
|
||||
lib/calamares/modules/openrcdmcryptcfg/main.py
|
||||
lib/calamares/modules/openrcdmcryptcfg/module.desc
|
||||
lib/calamares/modules/packagechooser/libcalamares_viewmodule_packagechooser.so
|
||||
lib/calamares/modules/packagechooser/module.desc
|
||||
lib/calamares/modules/packages/main.py
|
||||
lib/calamares/modules/packages/module.desc
|
||||
lib/calamares/modules/packages/test.yaml
|
||||
lib/calamares/modules/plymouthcfg/main.py
|
||||
lib/calamares/modules/plymouthcfg/module.desc
|
||||
lib/calamares/modules/preservefiles/libcalamares_job_preservefiles.so
|
||||
lib/calamares/modules/preservefiles/module.desc
|
||||
lib/calamares/modules/rawfs/main.py
|
||||
lib/calamares/modules/rawfs/module.desc
|
||||
lib/calamares/modules/removeuser/libcalamares_job_removeuser.so
|
||||
lib/calamares/modules/removeuser/module.desc
|
||||
lib/calamares/modules/services-openrc/main.py
|
||||
lib/calamares/modules/services-openrc/module.desc
|
||||
lib/calamares/modules/services-systemd/main.py
|
||||
lib/calamares/modules/services-systemd/module.desc
|
||||
lib/calamares/modules/shellprocess/libcalamares_job_shellprocess.so
|
||||
lib/calamares/modules/shellprocess/module.desc
|
||||
lib/calamares/modules/summary/libcalamares_viewmodule_summary.so
|
||||
lib/calamares/modules/summary/module.desc
|
||||
lib/calamares/modules/tracking/libcalamares_viewmodule_tracking.so
|
||||
lib/calamares/modules/tracking/module.desc
|
||||
lib/calamares/modules/umount/main.py
|
||||
lib/calamares/modules/umount/module.desc
|
||||
lib/calamares/modules/unpackfs/main.py
|
||||
lib/calamares/modules/unpackfs/module.desc
|
||||
lib/calamares/modules/unpackfs/runtests.sh
|
||||
lib/calamares/modules/users/libcalamares_viewmodule_users.so
|
||||
lib/calamares/modules/users/module.desc
|
||||
lib/calamares/modules/welcome/libcalamares_viewmodule_welcome.so
|
||||
lib/calamares/modules/welcome/module.desc
|
||||
lib/calamares/modules/welcomeq/libcalamares_viewmodule_welcomeq.so
|
||||
lib/calamares/modules/welcomeq/module.desc
|
||||
lib/cmake/Calamares/CMakeColors.cmake
|
||||
lib/cmake/Calamares/CalamaresAddBrandingSubdirectory.cmake
|
||||
lib/cmake/Calamares/CalamaresAddLibrary.cmake
|
||||
lib/cmake/Calamares/CalamaresAddModuleSubdirectory.cmake
|
||||
lib/cmake/Calamares/CalamaresAddPlugin.cmake
|
||||
lib/cmake/Calamares/CalamaresAddTest.cmake
|
||||
lib/cmake/Calamares/CalamaresAddTranslations.cmake
|
||||
lib/cmake/Calamares/CalamaresAutomoc.cmake
|
||||
lib/cmake/Calamares/CalamaresConfig.cmake
|
||||
lib/cmake/Calamares/CalamaresConfigVersion.cmake
|
||||
lib/cmake/Calamares/CalamaresLibraryDepends-%%CMAKE_BUILD_TYPE%%.cmake
|
||||
lib/cmake/Calamares/CalamaresLibraryDepends.cmake
|
||||
lib/cmake/Calamares/CalamaresUse.cmake
|
||||
lib/libcalamares.so
|
||||
lib/libcalamares.so.3.2.25
|
||||
lib/libcalamaresui.so
|
||||
lib/libcalamaresui.so.3.2.25
|
||||
man/man8/calamares.8.gz
|
||||
share/applications/calamares.desktop
|
||||
%%DATADIR%%/branding/default/banner.png
|
||||
%%DATADIR%%/branding/default/branding.desc
|
||||
%%DATADIR%%/branding/default/lang/calamares-default_ar.qm
|
||||
%%DATADIR%%/branding/default/lang/calamares-default_en.qm
|
||||
%%DATADIR%%/branding/default/lang/calamares-default_eo.qm
|
||||
%%DATADIR%%/branding/default/lang/calamares-default_fr.qm
|
||||
%%DATADIR%%/branding/default/lang/calamares-default_nl.qm
|
||||
%%DATADIR%%/branding/default/languages.png
|
||||
%%DATADIR%%/branding/default/show.qml
|
||||
%%DATADIR%%/branding/default/squid.png
|
||||
%%DATADIR%%/branding/default/stylesheet.qss
|
||||
%%DATADIR%%/qml/calamares/slideshow/BackButton.qml
|
||||
%%DATADIR%%/qml/calamares/slideshow/ForwardButton.qml
|
||||
%%DATADIR%%/qml/calamares/slideshow/NavButton.qml
|
||||
%%DATADIR%%/qml/calamares/slideshow/Presentation.qml
|
||||
%%DATADIR%%/qml/calamares/slideshow/Slide.qml
|
||||
%%DATADIR%%/qml/calamares/slideshow/SlideCounter.qml
|
||||
%%DATADIR%%/qml/calamares/slideshow/qmldir
|
||||
share/icons/hicolor/scalable/apps/calamares.svg
|
||||
share/locale/ar/LC_MESSAGES/calamares-python.mo
|
||||
share/locale/as/LC_MESSAGES/calamares-python.mo
|
||||
share/locale/ast/LC_MESSAGES/calamares-python.mo
|
||||
share/locale/be/LC_MESSAGES/calamares-python.mo
|
||||
share/locale/bg/LC_MESSAGES/calamares-python.mo
|
||||
share/locale/ca/LC_MESSAGES/calamares-python.mo
|
||||
share/locale/cs_CZ/LC_MESSAGES/calamares-python.mo
|
||||
share/locale/da/LC_MESSAGES/calamares-python.mo
|
||||
share/locale/de/LC_MESSAGES/calamares-python.mo
|
||||
share/locale/el/LC_MESSAGES/calamares-python.mo
|
||||
share/locale/en_GB/LC_MESSAGES/calamares-python.mo
|
||||
share/locale/eo/LC_MESSAGES/calamares-python.mo
|
||||
share/locale/es/LC_MESSAGES/calamares-python.mo
|
||||
share/locale/es_MX/LC_MESSAGES/calamares-python.mo
|
||||
share/locale/es_PR/LC_MESSAGES/calamares-python.mo
|
||||
share/locale/et/LC_MESSAGES/calamares-python.mo
|
||||
share/locale/eu/LC_MESSAGES/calamares-python.mo
|
||||
share/locale/fi_FI/LC_MESSAGES/calamares-python.mo
|
||||
share/locale/fr/LC_MESSAGES/calamares-python.mo
|
||||
share/locale/gl/LC_MESSAGES/calamares-python.mo
|
||||
share/locale/he/LC_MESSAGES/calamares-python.mo
|
||||
share/locale/hi/LC_MESSAGES/calamares-python.mo
|
||||
share/locale/hr/LC_MESSAGES/calamares-python.mo
|
||||
share/locale/hu/LC_MESSAGES/calamares-python.mo
|
||||
share/locale/id/LC_MESSAGES/calamares-python.mo
|
||||
share/locale/is/LC_MESSAGES/calamares-python.mo
|
||||
share/locale/it_IT/LC_MESSAGES/calamares-python.mo
|
||||
share/locale/ja/LC_MESSAGES/calamares-python.mo
|
||||
share/locale/ko/LC_MESSAGES/calamares-python.mo
|
||||
share/locale/lt/LC_MESSAGES/calamares-python.mo
|
||||
share/locale/ml/LC_MESSAGES/calamares-python.mo
|
||||
share/locale/mr/LC_MESSAGES/calamares-python.mo
|
||||
share/locale/nb/LC_MESSAGES/calamares-python.mo
|
||||
share/locale/nl/LC_MESSAGES/calamares-python.mo
|
||||
share/locale/pl/LC_MESSAGES/calamares-python.mo
|
||||
share/locale/pt_BR/LC_MESSAGES/calamares-python.mo
|
||||
share/locale/pt_PT/LC_MESSAGES/calamares-python.mo
|
||||
share/locale/ro/LC_MESSAGES/calamares-python.mo
|
||||
share/locale/ru/LC_MESSAGES/calamares-python.mo
|
||||
share/locale/sk/LC_MESSAGES/calamares-python.mo
|
||||
share/locale/sl/LC_MESSAGES/calamares-python.mo
|
||||
share/locale/sq/LC_MESSAGES/calamares-python.mo
|
||||
share/locale/sr/LC_MESSAGES/calamares-python.mo
|
||||
share/locale/sr@latin/LC_MESSAGES/calamares-python.mo
|
||||
share/locale/sv/LC_MESSAGES/calamares-python.mo
|
||||
share/locale/th/LC_MESSAGES/calamares-python.mo
|
||||
share/locale/tr_TR/LC_MESSAGES/calamares-python.mo
|
||||
share/locale/uk/LC_MESSAGES/calamares-python.mo
|
||||
share/locale/zh_CN/LC_MESSAGES/calamares-python.mo
|
||||
share/locale/zh_TW/LC_MESSAGES/calamares-python.mo
|
@@ -1,27 +0,0 @@
|
||||
# === This file is part of Calamares - <https://calamares.io> ===
|
||||
#
|
||||
# SPDX-FileCopyrightText: 2020 Gaël PORTAY <gael.portay@gmail.com>
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
#
|
||||
# Calamares is Free Software: see the License-Identifier above.
|
||||
#
|
||||
|
||||
_calamares()
|
||||
{
|
||||
local cur prev words cword
|
||||
_init_completion || return
|
||||
|
||||
case "$prev" in
|
||||
-D)
|
||||
COMPREPLY=( $( compgen -W "$( seq 0 1 8 )" -- "$cur" ) )
|
||||
return
|
||||
;;
|
||||
-c|--config)
|
||||
_filedir
|
||||
return
|
||||
;;
|
||||
esac
|
||||
|
||||
COMPREPLY=( $( compgen -W "-h --help -v --version -d --debug -D -c --config -X -xdg-config -T --debug-translation" -- "$cur" ) )
|
||||
} &&
|
||||
complete -F _calamares calamares
|
Binary file not shown.
Before Width: | Height: | Size: 10 KiB |
@@ -1,2 +0,0 @@
|
||||
SPDX-FileCopyrightText: 2014 Teo Mrnjavac <teo@kde.org>
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
@@ -1,31 +0,0 @@
|
||||
# SPDX-FileCopyrightText: no
|
||||
# SPDX-License-Identifier: CC0-1.0
|
||||
#
|
||||
# Configure one or more display managers (e.g. SDDM)
|
||||
# with a "best effort" approach.
|
||||
---
|
||||
#The DM module attempts to set up all the DMs found in this list, in that precise order.
|
||||
#It also sets up autologin, if the feature is enabled in globalstorage.
|
||||
#The displaymanagers list can also be set in globalstorage, and in that case it overrides anything set up here.
|
||||
displaymanagers:
|
||||
- slim
|
||||
- sddm
|
||||
- lightdm
|
||||
- gdm
|
||||
- mdm
|
||||
- lxdm
|
||||
- kdm
|
||||
|
||||
#Enable the following settings to force a desktop environment in your displaymanager configuration file:
|
||||
#defaultDesktopEnvironment:
|
||||
# executable: "startkde"
|
||||
# desktopFile: "plasma"
|
||||
|
||||
#If true, try to ensure that the user, group, /var directory etc. for the
|
||||
#display manager are set up correctly. This is normally done by the distribution
|
||||
#packages, and best left to them. Therefore, it is disabled by default.
|
||||
basicSetup: false
|
||||
|
||||
#If true, setup autologin for openSUSE. This only makes sense on openSUSE
|
||||
#derivatives or other systems where /etc/sysconfig/displaymanager exists.
|
||||
sysconfigSetup: false
|
@@ -1,34 +0,0 @@
|
||||
# SPDX-FileCopyrightText: no
|
||||
# SPDX-License-Identifier: CC0-1.0
|
||||
#
|
||||
# Configuration for the "finished" page, which is usually shown only at
|
||||
# the end of the installation (successful or not).
|
||||
---
|
||||
# Behavior of the "restart system now" button.
|
||||
#
|
||||
# There are four usable values:
|
||||
# - never
|
||||
# Does not show the button and does not restart.
|
||||
# This matches the old behavior with restartNowEnabled=false.
|
||||
# - user-unchecked
|
||||
# Shows the button, defaults to unchecked, restarts if it is checked.
|
||||
# This matches the old behavior with restartNowEnabled=true and restartNowChecked=false.
|
||||
# - user-checked
|
||||
# Shows the button, defaults to checked, restarts if it is checked.
|
||||
# This matches the old behavior with restartNowEnabled=true and restartNowChecked=true.
|
||||
# - always
|
||||
# Shows the button, checked, but the user cannot change it.
|
||||
# This is new behavior.
|
||||
#
|
||||
# The three combinations of legacy values are still supported.
|
||||
restartNowMode: user-unchecked
|
||||
|
||||
# If the checkbox is shown, and the checkbox is checked, then when
|
||||
# Calamares exits from the finished-page it will run this command.
|
||||
# If not set, falls back to "shutdown -r now".
|
||||
restartNowCommand: "systemctl -i reboot"
|
||||
|
||||
# When the last page is (successfully) reached, send a DBus notification
|
||||
# to the desktop that the installation is done. This works only if the
|
||||
# user as whom Calamares is run, can reach the regular desktop session bus.
|
||||
notifyOnFinished: false
|
@@ -1,19 +0,0 @@
|
||||
# SPDX-FileCopyrightText: no
|
||||
# SPDX-License-Identifier: CC0-1.0
|
||||
#
|
||||
# NOTE: you must have ckbcomp installed and runnable
|
||||
# on the live system, for keyboard layout previews.
|
||||
---
|
||||
# The name of the file to write X11 keyboard settings to
|
||||
# The default value is the name used by upstream systemd-localed.
|
||||
# Relative paths are assumed to be relative to /etc/X11/xorg.conf.d
|
||||
xOrgConfFileName: "/etc/X11/xorg.conf.d/00-keyboard.conf"
|
||||
|
||||
# The path to search for keymaps converted from X11 to kbd format
|
||||
# Leave this empty if the setting does not make sense on your distribution.
|
||||
convertedKeymapPath: "/lib/kbd/keymaps/xkb"
|
||||
|
||||
# Write keymap configuration to /etc/default/keyboard, usually
|
||||
# found on Debian-related systems.
|
||||
# Defaults to true if nothing is set.
|
||||
#writeEtcDefaultKeyboard: true
|
@@ -1,34 +0,0 @@
|
||||
# SPDX-FileCopyrightText: no
|
||||
# SPDX-License-Identifier: CC0-1.0
|
||||
#
|
||||
---
|
||||
# This settings are used to set your default system time zone.
|
||||
# Time zones are usually located under /usr/share/zoneinfo and
|
||||
# provided by the 'tzdata' package of your Distribution.
|
||||
#
|
||||
# Distributions using systemd can list available
|
||||
# time zones by using the timedatectl command.
|
||||
# timedatectl list-timezones
|
||||
#
|
||||
# The starting timezone (e.g. the pin-on-the-map) when entering
|
||||
# the locale page can be set through keys *region* and *zone*.
|
||||
# If either is not set, defaults to America/New_York.
|
||||
#
|
||||
region: "Europe"
|
||||
zone: "Amsterdam"
|
||||
|
||||
|
||||
# Enable only when your Distribution is using an
|
||||
# custom path for locale.gen
|
||||
#localeGenPath: "PATH_TO/locale.gen"
|
||||
|
||||
# GeoIP based Language settings:
|
||||
#
|
||||
# GeoIP need an working Internet connection.
|
||||
#
|
||||
geoipUrl: "https://geoip.kde.org/v1/calamares"
|
||||
|
||||
# GeoIP style. Leave commented out for the "legacy" interpretation.
|
||||
# This setting only makes sense if geoipUrl is set, enabliing geoIP.
|
||||
geoipStyle: "json"
|
||||
|
@@ -1,62 +0,0 @@
|
||||
# SPDX-FileCopyrightText: no
|
||||
# SPDX-License-Identifier: CC0-1.0
|
||||
#
|
||||
# Configuration for the one-user-system user module.
|
||||
#
|
||||
# Besides these settings, the user module also places the following
|
||||
# keys into the globalconfig area, based on user input in the view step.
|
||||
#
|
||||
# - hostname
|
||||
# - username
|
||||
# - password (obscured)
|
||||
# - autologinUser (if enabled, set to username)
|
||||
#
|
||||
# These globalconfig keys are set when the jobs for this module
|
||||
# are created.
|
||||
---
|
||||
# Used as default groups for the created user.
|
||||
# Adjust to your Distribution defaults.
|
||||
defaultGroups:
|
||||
- users
|
||||
- lp
|
||||
- video
|
||||
- network
|
||||
- storage
|
||||
- wheel
|
||||
- audio
|
||||
|
||||
# Some Distributions require a 'autologin' group for the user.
|
||||
# Autologin causes a user to become automatically logged in to
|
||||
# the desktop environment on boot.
|
||||
# Disable when your Distribution does not require such a group.
|
||||
autologinGroup: autologin
|
||||
# You can control the initial state for the 'autologin checkbox' in UsersViewStep here.
|
||||
# Possible values are: true to enable or false to disable the checkbox by default
|
||||
doAutologin: true
|
||||
|
||||
# When set to a non-empty string, Calamares creates a sudoers file for the user.
|
||||
# /etc/sudoers.d/10-installer
|
||||
# Remember to add sudoersGroup to defaultGroups.
|
||||
#
|
||||
# If your Distribution already sets up a group of sudoers in its packaging,
|
||||
# remove this setting (delete or comment out the line below). Otherwise,
|
||||
# the setting will be duplicated in the /etc/sudoers.d/10-installer file,
|
||||
# potentially confusing users.
|
||||
sudoersGroup: wheel
|
||||
|
||||
# Setting this to false , causes the root account to be disabled.
|
||||
setRootPassword: true
|
||||
# You can control the initial state for the 'root password checkbox' in UsersViewStep here.
|
||||
# Possible values are: true to enable or false to disable the checkbox by default.
|
||||
# When enabled the user password is used for the root account too.
|
||||
# NOTE: doReusePassword requires setRootPassword to be enabled.
|
||||
doReusePassword: true
|
||||
|
||||
# These are optional password-requirements that a distro can enforce
|
||||
# on the user. The values given in this sample file disable each check,
|
||||
# as if the check was not listed at all.
|
||||
passwordRequirements:
|
||||
minLength: -1 # Password at least this many characters
|
||||
maxLength: -1 # Password at most this many characters
|
||||
|
||||
userShell: /bin/bash
|
@@ -1,49 +0,0 @@
|
||||
# SPDX-FileCopyrightText: no
|
||||
# SPDX-License-Identifier: CC0-1.0
|
||||
#
|
||||
# Configuration for the welcome module. The welcome page
|
||||
# displays some information from the branding file.
|
||||
# Which parts it displays can be configured through
|
||||
# the show* variables.
|
||||
#
|
||||
# In addition to displaying the welcome page, this module
|
||||
# can check requirements for installation.
|
||||
---
|
||||
# Display settings for various buttons on the welcome page.
|
||||
showSupportUrl: true
|
||||
showKnownIssuesUrl: true
|
||||
showReleaseNotesUrl: true
|
||||
|
||||
# Requirements checking. These are general, generic, things
|
||||
# that are checked. They may not match with the actual requirements
|
||||
# imposed by other modules in the system.
|
||||
requirements:
|
||||
# Amount of available disk, in GiB. Floating-point is allowed here.
|
||||
# Note that this does not account for *usable* disk, so it is possible
|
||||
# to pass this requirement, yet have no space to install to.
|
||||
requiredStorage: 5.5
|
||||
|
||||
# Amount of available RAM, in GiB. Floating-point is allowed here.
|
||||
requiredRam: 1.0
|
||||
|
||||
# To check for internet connectivity, Calamares does a HTTP GET
|
||||
# on this URL; on success (e.g. HTTP code 200) internet is OK.
|
||||
internetCheckUrl: http://google.com
|
||||
|
||||
# List conditions to check. Each listed condition will be
|
||||
# probed in some way, and yields true or false according to
|
||||
# the host system satisfying the condition.
|
||||
#
|
||||
# This sample file lists all the conditions that are known.
|
||||
check:
|
||||
- ram
|
||||
- power
|
||||
- internet
|
||||
- root
|
||||
- screen
|
||||
# List conditions that **must** be satisfied (from the list
|
||||
# of conditions, above) for installation to proceed.
|
||||
# If any of these conditions are not met, the user cannot
|
||||
# continue past the welcome page.
|
||||
required:
|
||||
- ram
|
@@ -1,39 +0,0 @@
|
||||
# SPDX-FileCopyrightText: no
|
||||
# SPDX-License-Identifier: CC0-1.0
|
||||
#
|
||||
# Configuration file for Calamares
|
||||
# Syntax is YAML 1.2
|
||||
---
|
||||
modules-search: [ usr/lib/calamares/modules ]
|
||||
|
||||
# YAML: list of maps of string:string key-value pairs.
|
||||
#instances:
|
||||
#- id: owncloud
|
||||
# module: webview
|
||||
# config: owncloud.conf
|
||||
|
||||
# Sequence section. This section describes the sequence of modules, both
|
||||
# viewmodules and jobmodules, as they should appear and/or run.
|
||||
sequence:
|
||||
- show:
|
||||
- welcome
|
||||
- locale
|
||||
- keyboard
|
||||
- users
|
||||
- summary
|
||||
- exec:
|
||||
- dummypython
|
||||
- locale
|
||||
- keyboard
|
||||
- users
|
||||
- displaymanager
|
||||
- networkcfg
|
||||
- show:
|
||||
- finished
|
||||
|
||||
branding: default
|
||||
|
||||
prompt-install: false
|
||||
# OEM mode
|
||||
dont-chroot: true
|
||||
disable-cancel: false
|
@@ -1,15 +0,0 @@
|
||||
# Example Filesystem
|
||||
|
||||
<!-- SPDX-FileCopyrightText: no
|
||||
SPDX-License-Identifier: CC0-1.0
|
||||
-->
|
||||
|
||||
This is a filesystem that will be used as / in an example distro,
|
||||
*if* you build the `example-distro` target and use the default
|
||||
unpackfs configuration. It should hold files and configuration
|
||||
bits that need to be on the target system for example purposes.
|
||||
|
||||
It should *not* have a bin/, lib/, sbin/ or lib64/ directory,
|
||||
since those are copied into the example-distro filesystem
|
||||
from the build host.
|
||||
|
@@ -1,5 +0,0 @@
|
||||
# SPDX-FileCopyrightText: no
|
||||
# SPDX-License-Identifier: CC0-1.0
|
||||
#
|
||||
# Global .profile -- add /sbin_1
|
||||
PATH=$PATH:/sbin_1:/xbin
|
@@ -1,4 +0,0 @@
|
||||
# SPDX-FileCopyrightText: no
|
||||
# SPDX-License-Identifier: CC0-1.0
|
||||
#
|
||||
root:x:0:
|
@@ -1,4 +0,0 @@
|
||||
# SPDX-FileCopyrightText: no
|
||||
# SPDX-License-Identifier: CC0-1.0
|
||||
#
|
||||
This is an example /etc/issue file.
|
@@ -1,10 +0,0 @@
|
||||
# SPDX-FileCopyrightText: no
|
||||
# SPDX-License-Identifier: CC0-1.0
|
||||
#
|
||||
# This file lists locales that you wish to have built. You can find a list
|
||||
# of valid supported locales at /usr/share/i18n/SUPPORTED, and you can add
|
||||
# user defined locales to /usr/local/share/i18n/SUPPORTED. If you change
|
||||
# this file, you need to rerun locale-gen.
|
||||
|
||||
en_CA.UTF-8 UTF-8
|
||||
en_US.UTF-8 UTF-8
|
@@ -1,5 +0,0 @@
|
||||
# SPDX-FileCopyrightText: no
|
||||
# SPDX-License-Identifier: CC0-1.0
|
||||
#
|
||||
# Global .profile -- add /sbin_1
|
||||
PATH=$PATH:/sbin_1:/xbin
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user