Compare commits
	
		
			6 Commits
		
	
	
		
			v3.2.59
			...
			3.1.x-stab
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						 | 
					5ea2e1c2fe | ||
| 
						 | 
					c9ced8c387 | ||
| 
						 | 
					4f16d65a8b | ||
| 
						 | 
					17fd10cdb1 | ||
| 
						 | 
					faf21ce438 | ||
| 
						 | 
					be5ad6944e | 
@@ -1,36 +0,0 @@
 | 
			
		||||
#   SPDX-FileCopyrightText: no
 | 
			
		||||
#   SPDX-License-Identifier: CC0-1.0
 | 
			
		||||
---
 | 
			
		||||
BasedOnStyle: WebKit
 | 
			
		||||
 | 
			
		||||
AlignAfterOpenBracket: Align
 | 
			
		||||
AlignEscapedNewlines: DontAlign
 | 
			
		||||
AllowAllParametersOfDeclarationOnNextLine: "false"
 | 
			
		||||
AllowShortFunctionsOnASingleLine: Inline
 | 
			
		||||
AllowShortIfStatementsOnASingleLine: "false"
 | 
			
		||||
AllowShortLambdasOnASingleLine: All
 | 
			
		||||
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"
 | 
			
		||||
SpaceInEmptyBlock: "false"
 | 
			
		||||
SpacesBeforeTrailingComments: "2"
 | 
			
		||||
SpacesInAngles: "true"
 | 
			
		||||
SpacesInParentheses: "true"
 | 
			
		||||
SpacesInSquareBrackets: "true"
 | 
			
		||||
Standard: c++17
 | 
			
		||||
@@ -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
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -1,5 +0,0 @@
 | 
			
		||||
#   SPDX-FileCopyrightText: no
 | 
			
		||||
#   SPDX-License-Identifier: CC0-1.0
 | 
			
		||||
#
 | 
			
		||||
18fef8dfe5d926ec0bc979562553adf4db8db2e9
 | 
			
		||||
874a0c1f38b0da4e5bc83083b13a63b1c7eed935
 | 
			
		||||
							
								
								
									
										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
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										29
									
								
								.github/ISSUE_TEMPLATE.md
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										29
									
								
								.github/ISSUE_TEMPLATE.md
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,29 @@
 | 
			
		||||
#### Submission type
 | 
			
		||||
 | 
			
		||||
  - [ ] Bug report
 | 
			
		||||
  - [ ] Feature Request
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#### Info regarding which version of Calamares is used, which Distribution
 | 
			
		||||
 | 
			
		||||
> …
 | 
			
		||||
 | 
			
		||||
#### Provide information on how the disks are set up, in detail, with full logs of commands issued 
 | 
			
		||||
 | 
			
		||||
> …
 | 
			
		||||
 | 
			
		||||
#### What do you expect to have happen when Calamares installs?
 | 
			
		||||
 | 
			
		||||
> …
 | 
			
		||||
 | 
			
		||||
#### Describe the issue you encountered
 | 
			
		||||
 | 
			
		||||
> …
 | 
			
		||||
 | 
			
		||||
#### Steps to reproduce the problem
 | 
			
		||||
 | 
			
		||||
> …
 | 
			
		||||
 | 
			
		||||
#### Include the installation.log:
 | 
			
		||||
 | 
			
		||||
> …
 | 
			
		||||
							
								
								
									
										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.
 | 
			
		||||
 | 
			
		||||
-->
 | 
			
		||||
							
								
								
									
										32
									
								
								.github/workflows/issues.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										32
									
								
								.github/workflows/issues.yml
									
									
									
									
										vendored
									
									
								
							@@ -1,32 +0,0 @@
 | 
			
		||||
name: issues
 | 
			
		||||
 | 
			
		||||
on:
 | 
			
		||||
  issues:
 | 
			
		||||
    types: [opened, reopened, closed]
 | 
			
		||||
 | 
			
		||||
jobs:
 | 
			
		||||
  notify:
 | 
			
		||||
    runs-on: ubuntu-latest
 | 
			
		||||
    steps:
 | 
			
		||||
      - name: "notify: new"
 | 
			
		||||
        if: github.event.issue.state == 'open'
 | 
			
		||||
        uses: calamares/actions/matrix-notify@v4
 | 
			
		||||
        with:
 | 
			
		||||
          token: ${{ secrets.MATRIX_TOKEN }}
 | 
			
		||||
          room: ${{ secrets.MATRIX_ROOM }}
 | 
			
		||||
          message: "OPENED ${{ github.event.issue.html_url }} by ${{ github.actor }} ${{ github.event.issue.title }}"
 | 
			
		||||
      - name: "notify: closed"
 | 
			
		||||
        if: github.event.issue.state != 'open'
 | 
			
		||||
        uses: calamares/actions/matrix-notify@v4
 | 
			
		||||
        with:
 | 
			
		||||
          token: ${{ secrets.MATRIX_TOKEN }}
 | 
			
		||||
          room: ${{ secrets.MATRIX_ROOM }}
 | 
			
		||||
          message: "CLOSED ${{ github.event.issue.html_url }} by ${{ github.actor }} ${{ github.event.issue.title }}"
 | 
			
		||||
      - name: "remove in-progress label"
 | 
			
		||||
        if: github.event.issue.state != 'open'
 | 
			
		||||
        run: |
 | 
			
		||||
          curl -X DELETE \
 | 
			
		||||
            -H 'Accept: application/vnd.github.v3+json' \
 | 
			
		||||
            -H 'Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' \
 | 
			
		||||
            "https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.issue.number }}/labels/hacking%3A%20in-progress"
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										46
									
								
								.github/workflows/nightly-debian.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										46
									
								
								.github/workflows/nightly-debian.yml
									
									
									
									
										vendored
									
									
								
							@@ -1,46 +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"
 | 
			
		||||
        uses: calamares/actions/prepare-debian@v4
 | 
			
		||||
      - name: "prepare source"
 | 
			
		||||
        uses: calamares/actions/generic-checkout@v4
 | 
			
		||||
      - name: "build"
 | 
			
		||||
        id: build
 | 
			
		||||
        uses: calamares/actions/generic-build@v4
 | 
			
		||||
      - name: "notify: ok"
 | 
			
		||||
        if: ${{ success() && github.repository == 'calamares/calamares' }}
 | 
			
		||||
        uses: calamares/actions/matrix-notify@v4
 | 
			
		||||
        with:
 | 
			
		||||
          token: ${{ secrets.MATRIX_TOKEN }}
 | 
			
		||||
          room: ${{ secrets.MATRIX_ROOM }}
 | 
			
		||||
          message: |
 | 
			
		||||
            OK ${{ github.workflow }} in ${{ github.repository }} ${{ steps.build.outputs.git-summary }}
 | 
			
		||||
      - name: "notify: fail"
 | 
			
		||||
        if: ${{ failure() && github.repository == 'calamares/calamares' }}
 | 
			
		||||
        uses: calamares/actions/matrix-notify@v4
 | 
			
		||||
        with:
 | 
			
		||||
          token: ${{ secrets.MATRIX_TOKEN }}
 | 
			
		||||
          room: ${{ secrets.MATRIX_ROOM }}
 | 
			
		||||
          message: |
 | 
			
		||||
            FAIL ${{ github.workflow }} in ${{ github.repository }} ${{ steps.build.outputs.git-summary }}
 | 
			
		||||
							
								
								
									
										58
									
								
								.github/workflows/nightly-neon.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										58
									
								
								.github/workflows/nightly-neon.yml
									
									
									
									
										vendored
									
									
								
							@@ -1,58 +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"
 | 
			
		||||
        uses: calamares/actions/prepare-neon@v4
 | 
			
		||||
      - name: "prepare source"
 | 
			
		||||
        uses: calamares/actions/generic-checkout@v4
 | 
			
		||||
      - name: "build"
 | 
			
		||||
        id: build
 | 
			
		||||
        uses: calamares/actions/generic-build@v4
 | 
			
		||||
      - name: "notify: ok"
 | 
			
		||||
        if: ${{ success() && github.repository == 'calamares/calamares' }}
 | 
			
		||||
        uses: calamares/actions/matrix-notify@v4
 | 
			
		||||
        with:
 | 
			
		||||
          token: ${{ secrets.MATRIX_TOKEN }}
 | 
			
		||||
          room: ${{ secrets.MATRIX_ROOM }}
 | 
			
		||||
          message: |
 | 
			
		||||
            OK ${{ github.workflow }} in ${{ github.repository }} ${{ steps.build.outputs.git-summary }}
 | 
			
		||||
      - name: "notify: fail"
 | 
			
		||||
        if: ${{ failure() && github.repository == 'calamares/calamares' }}
 | 
			
		||||
        uses: calamares/actions/matrix-notify@v4
 | 
			
		||||
        with:
 | 
			
		||||
          token: ${{ secrets.MATRIX_TOKEN }}
 | 
			
		||||
          room: ${{ secrets.MATRIX_ROOM }}
 | 
			
		||||
          message: |
 | 
			
		||||
            FAIL ${{ github.workflow }} in ${{ github.repository }} ${{ steps.build.outputs.git-summary }}
 | 
			
		||||
      - name: "Calamares: archive"
 | 
			
		||||
        working-directory: ${{ env.BUILDDIR }}
 | 
			
		||||
        run: |
 | 
			
		||||
          make install DESTDIR=${{ env.BUILDDIR }}/stage
 | 
			
		||||
          tar czf calamares.tar.gz stage
 | 
			
		||||
      - name: "Calamares: upload"
 | 
			
		||||
        uses: actions/upload-artifact@v2
 | 
			
		||||
        with:
 | 
			
		||||
          name: calamares-tarball
 | 
			
		||||
          path: ${{ env.BUILDDIR }}/calamares.tar.gz
 | 
			
		||||
          if-no-files-found: error
 | 
			
		||||
          retention-days: 7
 | 
			
		||||
							
								
								
									
										46
									
								
								.github/workflows/nightly-opensuse.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										46
									
								
								.github/workflows/nightly-opensuse.yml
									
									
									
									
										vendored
									
									
								
							@@ -1,46 +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"
 | 
			
		||||
        uses: calamares/actions/prepare-opensuse@v4
 | 
			
		||||
      - name: "prepare source"
 | 
			
		||||
        uses: calamares/actions/generic-checkout@v4
 | 
			
		||||
      - name: "build"
 | 
			
		||||
        id: build
 | 
			
		||||
        uses: calamares/actions/generic-build@v4
 | 
			
		||||
      - name: "notify: ok"
 | 
			
		||||
        if: ${{ success() && github.repository == 'calamares/calamares' }}
 | 
			
		||||
        uses: calamares/actions/matrix-notify@v4
 | 
			
		||||
        with:
 | 
			
		||||
          token: ${{ secrets.MATRIX_TOKEN }}
 | 
			
		||||
          room: ${{ secrets.MATRIX_ROOM }}
 | 
			
		||||
          message: |
 | 
			
		||||
            OK ${{ github.workflow }} in ${{ github.repository }} ${{ steps.build.outputs.git-summary }}
 | 
			
		||||
      - name: "notify: fail"
 | 
			
		||||
        if: ${{ failure() && github.repository == 'calamares/calamares' }}
 | 
			
		||||
        uses: calamares/actions/matrix-notify@v4
 | 
			
		||||
        with:
 | 
			
		||||
          token: ${{ secrets.MATRIX_TOKEN }}
 | 
			
		||||
          room: ${{ secrets.MATRIX_ROOM }}
 | 
			
		||||
          message: |
 | 
			
		||||
            FAIL ${{ github.workflow }} in ${{ github.repository }} ${{ steps.build.outputs.git-summary }}
 | 
			
		||||
							
								
								
									
										56
									
								
								.github/workflows/push.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										56
									
								
								.github/workflows/push.yml
									
									
									
									
										vendored
									
									
								
							@@ -1,56 +0,0 @@
 | 
			
		||||
name: ci-push
 | 
			
		||||
 | 
			
		||||
on:
 | 
			
		||||
  push:
 | 
			
		||||
    branches:
 | 
			
		||||
      - calamares
 | 
			
		||||
      - work-3.3
 | 
			
		||||
  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"
 | 
			
		||||
        uses: calamares/actions/prepare-neon@v4
 | 
			
		||||
      - name: "prepare source"
 | 
			
		||||
        uses: calamares/actions/generic-checkout@v4
 | 
			
		||||
      - name: "build"
 | 
			
		||||
        id: build
 | 
			
		||||
        uses: calamares/actions/generic-build@v4
 | 
			
		||||
      - name: "notify: ok"
 | 
			
		||||
        if: ${{ success() && github.repository == 'calamares/calamares' }}
 | 
			
		||||
        uses: calamares/actions/matrix-notify@v4
 | 
			
		||||
        with:
 | 
			
		||||
          token: ${{ secrets.MATRIX_TOKEN }}
 | 
			
		||||
          room: ${{ secrets.MATRIX_ROOM }}
 | 
			
		||||
          message: |
 | 
			
		||||
            OK ${{ github.workflow }} in ${{ github.repository }} by ${{ github.actor }} on ${{ github.event.ref }}
 | 
			
		||||
            .. ${{ steps.build.outputs.git-summary }}
 | 
			
		||||
      - name: "notify: fail"
 | 
			
		||||
        if: ${{ failure() && github.repository == 'calamares/calamares' }}
 | 
			
		||||
        uses: calamares/actions/matrix-notify@v4
 | 
			
		||||
        with:
 | 
			
		||||
          token: ${{ secrets.MATRIX_TOKEN }}
 | 
			
		||||
          room: ${{ secrets.MATRIX_ROOM }}
 | 
			
		||||
          message: |
 | 
			
		||||
            FAIL ${{ github.workflow }} in ${{ github.repository }} by ${{ github.actor }} on ${{ github.event.ref }}
 | 
			
		||||
              .. ${{ steps.build.outputs.git-summary }}
 | 
			
		||||
              .. ${{ github.event.compare }}
 | 
			
		||||
							
								
								
									
										9
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										9
									
								
								.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
 | 
			
		||||
@@ -50,8 +46,3 @@ CMakeLists.txt.user
 | 
			
		||||
 | 
			
		||||
# Backup files
 | 
			
		||||
*~
 | 
			
		||||
*.bak
 | 
			
		||||
 | 
			
		||||
# Kate
 | 
			
		||||
*.kate-swp
 | 
			
		||||
tags
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										90
									
								
								.reuse/dep5
									
									
									
									
									
								
							
							
						
						
									
										90
									
								
								.reuse/dep5
									
									
									
									
									
								
							@@ -1,90 +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
 | 
			
		||||
 | 
			
		||||
# GitHub actions are not part of the source
 | 
			
		||||
Files: .github/workflows/*.yml
 | 
			
		||||
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
 | 
			
		||||
							
								
								
									
										22
									
								
								.travis.yml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										22
									
								
								.travis.yml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,22 @@
 | 
			
		||||
language:
 | 
			
		||||
  - cpp
 | 
			
		||||
  - python
 | 
			
		||||
 | 
			
		||||
python:
 | 
			
		||||
  - 3.5
 | 
			
		||||
 | 
			
		||||
sudo: required
 | 
			
		||||
 | 
			
		||||
services:
 | 
			
		||||
  - docker
 | 
			
		||||
 | 
			
		||||
notifications:
 | 
			
		||||
  irc:
 | 
			
		||||
    - "chat.freenode.net#calamares"
 | 
			
		||||
 | 
			
		||||
install:
 | 
			
		||||
  - docker build -t calamares .
 | 
			
		||||
 | 
			
		||||
script:
 | 
			
		||||
  - docker run -v $PWD:/src --tmpfs /build:rw,size=65536k calamares bash -lc "cd /build && cmake -DWEBVIEW_FORCE_WEBKIT=1 -DKDE_INSTALL_USE_QT_SYS_PATHS=ON /src && make -j2 && make install DESTDIR=/build/INSTALL_ROOT"
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										10
									
								
								.tx/config
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								.tx/config
									
									
									
									
									
								
							@@ -1,15 +1,17 @@
 | 
			
		||||
#   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.dummypythonqt]
 | 
			
		||||
file_filter = src/modules/dummypythonqt/lang/<lang>/LC_MESSAGES/dummypythonqt.po
 | 
			
		||||
source_file = src/modules/dummypythonqt/lang/dummypythonqt.pot
 | 
			
		||||
source_lang = en
 | 
			
		||||
 | 
			
		||||
[calamares.fdo]
 | 
			
		||||
file_filter = lang/desktop_<lang>.desktop
 | 
			
		||||
source_file = calamares.desktop
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										79
									
								
								AUTHORS
									
									
									
									
									
								
							
							
						
						
									
										79
									
								
								AUTHORS
									
									
									
									
									
								
							@@ -1,77 +1,2 @@
 | 
			
		||||
<!-- 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
 | 
			
		||||
 - Anke Boersma
 | 
			
		||||
 - Anubhav Choudhary
 | 
			
		||||
 - Arjen Balfoort
 | 
			
		||||
 - Arnaud Ferraris
 | 
			
		||||
 - Artem Grinev
 | 
			
		||||
 - artoo@cromnix.org
 | 
			
		||||
 - benne-dee
 | 
			
		||||
 - Bernhard Landauer
 | 
			
		||||
 - Bezzy1999
 | 
			
		||||
 - Bill Auger
 | 
			
		||||
 - Bob van der Linden
 | 
			
		||||
 - Caio Jordão Carvalho
 | 
			
		||||
 - Camilo Higuita
 | 
			
		||||
 - Collabora LTD
 | 
			
		||||
 - Corey Lang
 | 
			
		||||
 - crispg72
 | 
			
		||||
 - Dan Simmons
 | 
			
		||||
 - demmm
 | 
			
		||||
 - Emmanuel Arias
 | 
			
		||||
 - Enrique Medina Gremaldos
 | 
			
		||||
 - Erik Dubois
 | 
			
		||||
 - Dominic Hayes
 | 
			
		||||
 - El-Wumbus
 | 
			
		||||
 - Evan James
 | 
			
		||||
 - Frede H
 | 
			
		||||
 - Gabriel Craciunescu
 | 
			
		||||
 - Harald Sitter
 | 
			
		||||
 - Huang Jia Wen
 | 
			
		||||
 - Jerrod Frost
 | 
			
		||||
 - Jia Chao
 | 
			
		||||
 - Joe Kamprad
 | 
			
		||||
 - Jonas Strassel
 | 
			
		||||
 - Kai Dohmen
 | 
			
		||||
 - Kevin Kofler
 | 
			
		||||
 - Kyle Robertze
 | 
			
		||||
 - Lisa Vitolo
 | 
			
		||||
 - Matti Hyttinen
 | 
			
		||||
 - n3rdopolis
 | 
			
		||||
 - Neal Gompa
 | 
			
		||||
 - Nico 'dr460nf1r3'
 | 
			
		||||
 - Omer I.S.
 | 
			
		||||
 - Philip Müller
 | 
			
		||||
 - Ramon Buldó
 | 
			
		||||
 - Raul Rodrigo Segura
 | 
			
		||||
 - Rohan Garg
 | 
			
		||||
 - Santosh Mahto
 | 
			
		||||
 - Scott Harvey
 | 
			
		||||
 - Simon Quigley
 | 
			
		||||
 - Taejun Park
 | 
			
		||||
 - Victor Fuentes
 | 
			
		||||
 - vtriolet
 | 
			
		||||
 - Walter Lapchynski
 | 
			
		||||
 - Waneon Kim
 | 
			
		||||
 | 
			
		||||
 > This list was updated to revision 6e8d820737dea0f3e08f12b10768facef19be684 on May 28th 2022.
 | 
			
		||||
Teo Mrnjavac <teo@kde.org>
 | 
			
		||||
Adriaan de Groot <groot@kde.org>
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										2012
									
								
								CHANGES-3.2
									
									
									
									
									
								
							
							
						
						
									
										2012
									
								
								CHANGES-3.2
									
									
									
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										630
									
								
								CMakeLists.txt
									
									
									
									
									
								
							
							
						
						
									
										630
									
								
								CMakeLists.txt
									
									
									
									
									
								
							@@ -1,15 +1,20 @@
 | 
			
		||||
# === This file is part of Calamares - <https://calamares.io> ===
 | 
			
		||||
# === This file is part of Calamares - <https://github.com/calamares> ===
 | 
			
		||||
#
 | 
			
		||||
#   SPDX-FileCopyrightText: 2017 Adriaan de Groot <groot@kde.org>
 | 
			
		||||
#   SPDX-License-Identifier: BSD-2-Clause
 | 
			
		||||
#   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.
 | 
			
		||||
#
 | 
			
		||||
#   Calamares is Free Software: see the License-Identifier above.
 | 
			
		||||
#   You should have received a copy of the GNU General Public License
 | 
			
		||||
#   along with Calamares. If not, see <http://www.gnu.org/licenses/>.
 | 
			
		||||
#
 | 
			
		||||
#   Individual files may have different licenses (like the CMake
 | 
			
		||||
#   infrastructure, which is BSD-2-Clause licensed). Check the SPDX
 | 
			
		||||
#   identifiers in each file.
 | 
			
		||||
#   SPDX-License-Identifier: GPL-3.0+
 | 
			
		||||
#   License-Filename: LICENSE
 | 
			
		||||
#
 | 
			
		||||
###
 | 
			
		||||
#
 | 
			
		||||
@@ -19,196 +24,33 @@
 | 
			
		||||
#
 | 
			
		||||
#   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.
 | 
			
		||||
 | 
			
		||||
# TODO:3.3: Require CMake 3.12
 | 
			
		||||
cmake_minimum_required( VERSION 3.3 FATAL_ERROR )
 | 
			
		||||
project( CALAMARES
 | 
			
		||||
    VERSION 3.2.59
 | 
			
		||||
    LANGUAGES C CXX
 | 
			
		||||
)
 | 
			
		||||
project( calamares C CXX )
 | 
			
		||||
 | 
			
		||||
set( CALAMARES_VERSION_RC 0 )  # Set to 0 during release cycle, 1 during development
 | 
			
		||||
if( CALAMARES_VERSION_RC EQUAL 1 AND CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR )
 | 
			
		||||
    message( FATAL_ERROR "Do not build development versions in the source-directory." )
 | 
			
		||||
endif()
 | 
			
		||||
cmake_minimum_required( VERSION 3.2 )
 | 
			
		||||
 | 
			
		||||
### 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_BAIL_OUT (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.
 | 
			
		||||
#
 | 
			
		||||
# 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.
 | 
			
		||||
set( USE_services "" CACHE STRING "Select the services module to use" )
 | 
			
		||||
 | 
			
		||||
### 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) or location (ca@valencia) need special
 | 
			
		||||
# handling in libcalamares/locale/Translation.h .
 | 
			
		||||
#
 | 
			
		||||
# 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 74 languages
 | 
			
		||||
set( _tx_complete az az_AZ ca es fi_FI he hi hr ja lt pt_BR pt_PT
 | 
			
		||||
    sq sv uk zh_TW )
 | 
			
		||||
set( _tx_good as be ca@valencia cs_CZ da de fa fr fur it_IT ko ml
 | 
			
		||||
    nl ru si sk tg tr_TR vi zh_CN )
 | 
			
		||||
set( _tx_ok ar ast bg bn el en_GB es_MX et eu gl hu id is mr nb oc
 | 
			
		||||
    pl ro sl sr sr@latin th )
 | 
			
		||||
set( _tx_incomplete eo es_PR gu ie ja-Hira kk kn lo lv mk ne_NP
 | 
			
		||||
    ta_IN te ur zh zh_HK )
 | 
			
		||||
 | 
			
		||||
### 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 14 )
 | 
			
		||||
set( CMAKE_CXX_STANDARD_REQUIRED ON )
 | 
			
		||||
set( CMAKE_CXX_FLAGS                "${CMAKE_CXX_FLAGS} -Wall -Werror=return-type" )
 | 
			
		||||
set( CMAKE_CXX_FLAGS_DEBUG          "-Og -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            "-Og -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" )
 | 
			
		||||
 | 
			
		||||
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" )
 | 
			
		||||
    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).
 | 
			
		||||
    # Calamares is C++14).
 | 
			
		||||
    foreach( CLANG_WARNINGS
 | 
			
		||||
        -Weverything
 | 
			
		||||
        -Wno-c++98-compat
 | 
			
		||||
@@ -219,31 +61,31 @@ if( CMAKE_CXX_COMPILER_ID MATCHES "Clang" )
 | 
			
		||||
        -Wno-exit-time-destructors
 | 
			
		||||
        -Wno-missing-prototypes
 | 
			
		||||
        -Wno-documentation-unknown-command
 | 
			
		||||
        -Wno-unknown-warning-option
 | 
			
		||||
    )
 | 
			
		||||
        string( APPEND CMAKE_CXX_FLAGS " ${CLANG_WARNINGS}" )
 | 
			
		||||
    endforeach()
 | 
			
		||||
 | 
			
		||||
    # The dwarf-debugging flags are slightly different, too
 | 
			
		||||
    string( APPEND CMAKE_CXX_FLAGS_DEBUG " -gdwarf" )
 | 
			
		||||
    string( APPEND CMAKE_C_FLAGS_DEBUG " -gdwarf" )
 | 
			
		||||
 | 
			
		||||
    # 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( SUPPRESS_BOOST_WARNINGS " -Wno-zero-as-null-pointer-constant -Wno-disabled-macro-expansion" )
 | 
			
		||||
 | 
			
		||||
    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( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wl,--no-undefined" )
 | 
			
		||||
    set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wl,--fatal-warnings -Wnon-virtual-dtor -Woverloaded-virtual -Werror=return-type" )
 | 
			
		||||
 | 
			
		||||
    set( SUPPRESS_3RDPARTY_WARNINGS "" )
 | 
			
		||||
    set( SUPPRESS_BOOST_WARNINGS "" )
 | 
			
		||||
endif()
 | 
			
		||||
 | 
			
		||||
# Use mark_thirdparty_code() to reduce warnings from the compiler
 | 
			
		||||
@@ -264,122 +106,49 @@ if( CMAKE_COMPILER_IS_GNUCXX )
 | 
			
		||||
    endif()
 | 
			
		||||
endif()
 | 
			
		||||
 | 
			
		||||
include( FeatureSummary )
 | 
			
		||||
 | 
			
		||||
### 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 )
 | 
			
		||||
set( QT_VERSION 5.6.0 )
 | 
			
		||||
 | 
			
		||||
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_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 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.
 | 
			
		||||
set( ECM_VERSION 5.10.0 )
 | 
			
		||||
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)
 | 
			
		||||
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()
 | 
			
		||||
option( INSTALL_CONFIG "Install configuration files" ON )
 | 
			
		||||
option( WITH_PYTHON "Enable Python modules API (requires Boost.Python)." ON )
 | 
			
		||||
option( WITH_PYTHONQT "Enable next generation Python modules API (experimental, requires PythonQt)." OFF )
 | 
			
		||||
option( BUILD_TESTING "Build the testing tree." ON )
 | 
			
		||||
 | 
			
		||||
# 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."
 | 
			
		||||
)
 | 
			
		||||
if( BUILD_TESTING )
 | 
			
		||||
    enable_testing()
 | 
			
		||||
endif ()
 | 
			
		||||
 | 
			
		||||
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( PythonLibs ${PYTHONLIBS_VERSION} )
 | 
			
		||||
find_package( PythonLibs 3.3 )
 | 
			
		||||
set_package_properties(
 | 
			
		||||
    PythonLibs PROPERTIES
 | 
			
		||||
    DESCRIPTION "C interface libraries for the Python 3 interpreter."
 | 
			
		||||
    URL "https://python.org"
 | 
			
		||||
    URL "http://python.org"
 | 
			
		||||
    PURPOSE "Python 3 is used for Python 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 )
 | 
			
		||||
    find_boost_python3( 1.54.0 ${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."
 | 
			
		||||
@@ -388,62 +157,78 @@ if ( PYTHONLIBS_FOUND )
 | 
			
		||||
    )
 | 
			
		||||
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")
 | 
			
		||||
if( PYTHONLIBS_NOTFOUND OR NOT PYTHONQT_FOUND )
 | 
			
		||||
    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 bg ca cs_CZ da de el en en_GB es_MX es eu fr he hr hu id is it_IT ja lt nl pl pt_BR pt_PT ro ru sk sv th tr_TR zh_CN zh_TW )
 | 
			
		||||
 | 
			
		||||
### Transifex Translation status
 | 
			
		||||
#
 | 
			
		||||
# Construct language lists for use. This massages the language lists
 | 
			
		||||
# for use with older Qt (which does not support Esperanto) and checks
 | 
			
		||||
# for some obvious error. The actual work of compiling translations
 | 
			
		||||
# is done in the lang/ directory.
 | 
			
		||||
#
 | 
			
		||||
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" )
 | 
			
		||||
### Bump version here
 | 
			
		||||
set( CALAMARES_VERSION_MAJOR 3 )
 | 
			
		||||
set( CALAMARES_VERSION_MINOR 1 )
 | 
			
		||||
set( CALAMARES_VERSION_PATCH 13 )
 | 
			
		||||
set( CALAMARES_VERSION_RC 0 )
 | 
			
		||||
 | 
			
		||||
set( CALAMARES_VERSION ${CALAMARES_VERSION_MAJOR}.${CALAMARES_VERSION_MINOR}.${CALAMARES_VERSION_PATCH} )
 | 
			
		||||
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
 | 
			
		||||
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}" )
 | 
			
		||||
    if( CALAMARES_VERSION_DATE GREATER 0 )
 | 
			
		||||
        set( CALAMARES_VERSION ${CALAMARES_VERSION}.${CALAMARES_VERSION_DATE} )
 | 
			
		||||
    endif()
 | 
			
		||||
 | 
			
		||||
    include( CMakeVersionSource )
 | 
			
		||||
    if( CMAKE_VERSION_SOURCE )
 | 
			
		||||
        set( CALAMARES_VERSION ${CALAMARES_VERSION}-${CMAKE_VERSION_SOURCE} )
 | 
			
		||||
    endif()
 | 
			
		||||
endif()
 | 
			
		||||
 | 
			
		||||
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()
 | 
			
		||||
# enforce using constBegin, constEnd for const-iterators
 | 
			
		||||
add_definitions( "-DQT_STRICT_ITERATORS" )
 | 
			
		||||
 | 
			
		||||
    unset( p_l )
 | 
			
		||||
    unset( l )
 | 
			
		||||
endif()
 | 
			
		||||
unset( curr_tx )
 | 
			
		||||
if( tx_errors )
 | 
			
		||||
    message( FATAL_ERROR "Translation warnings, see above." )
 | 
			
		||||
# set paths
 | 
			
		||||
set( CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}" )
 | 
			
		||||
set( CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}" )
 | 
			
		||||
set( CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}" )
 | 
			
		||||
 | 
			
		||||
# Better default installation paths: GNUInstallDirs defines
 | 
			
		||||
# CMAKE_INSTALL_FULL_SYSCONFDIR to be CMAKE_INSTALL_PREFIX/etc by default
 | 
			
		||||
# but we really want /etc
 | 
			
		||||
if( NOT DEFINED CMAKE_INSTALL_SYSCONFDIR )
 | 
			
		||||
    set( CMAKE_INSTALL_SYSCONFDIR "/etc" )
 | 
			
		||||
endif()
 | 
			
		||||
 | 
			
		||||
set( CALAMARES_TRANSLATION_LANGUAGES en ${_tx_complete} ${_tx_good} ${_tx_ok} )
 | 
			
		||||
list( SORT CALAMARES_TRANSLATION_LANGUAGES )
 | 
			
		||||
# make predefined install dirs available everywhere
 | 
			
		||||
include( GNUInstallDirs )
 | 
			
		||||
 | 
			
		||||
add_subdirectory( lang )  # i18n tools
 | 
			
		||||
# make uninstall support
 | 
			
		||||
configure_file(
 | 
			
		||||
    "${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in"
 | 
			
		||||
    "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
 | 
			
		||||
    IMMEDIATE @ONLY
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
# Early configure these files as we need them later on
 | 
			
		||||
set( CALAMARES_CMAKE_DIR "${CMAKE_SOURCE_DIR}/CMakeModules" )
 | 
			
		||||
set( CALAMARES_LIBRARIES calamares )
 | 
			
		||||
 | 
			
		||||
set( THIRDPARTY_DIR "${CMAKE_SOURCE_DIR}/thirdparty" )
 | 
			
		||||
 | 
			
		||||
### Example Distro
 | 
			
		||||
#
 | 
			
		||||
@@ -496,150 +281,83 @@ endif()
 | 
			
		||||
# "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}" )
 | 
			
		||||
 | 
			
		||||
# 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.
 | 
			
		||||
if( NOT BUILD_RELEASE AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/.git/" )
 | 
			
		||||
    include( ExtendedVersion )
 | 
			
		||||
    extend_version( "${CALAMARES_VERSION}" OFF CALAMARES_VERSION_SHORT CALAMARES_VERSION )
 | 
			
		||||
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
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
# set paths
 | 
			
		||||
set( CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}" )
 | 
			
		||||
set( CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}" )
 | 
			
		||||
set( CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}" )
 | 
			
		||||
 | 
			
		||||
# Better default installation paths: GNUInstallDirs defines
 | 
			
		||||
# CMAKE_INSTALL_FULL_SYSCONFDIR to be CMAKE_INSTALL_PREFIX/etc by default
 | 
			
		||||
# but we really want /etc
 | 
			
		||||
if( NOT DEFINED CMAKE_INSTALL_SYSCONFDIR )
 | 
			
		||||
    set( CMAKE_INSTALL_SYSCONFDIR "/etc" )
 | 
			
		||||
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( thirdparty )
 | 
			
		||||
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
 | 
			
		||||
#
 | 
			
		||||
#
 | 
			
		||||
feature_summary(WHAT ALL)
 | 
			
		||||
 | 
			
		||||
# 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 )
 | 
			
		||||
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::
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
# 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"
 | 
			
		||||
        "CMakeModules/CalamaresAddBrandingSubdirectory.cmake"
 | 
			
		||||
        "CMakeModules/CalamaresAddLibrary.cmake"
 | 
			
		||||
        "CMakeModules/CalamaresAddModuleSubdirectory.cmake"
 | 
			
		||||
        "CMakeModules/CalamaresAddPlugin.cmake"
 | 
			
		||||
        "CMakeModules/CalamaresAddTest.cmake"
 | 
			
		||||
        "CMakeModules/CalamaresAddTranslations.cmake"
 | 
			
		||||
        "CMakeModules/CalamaresAutomoc.cmake"
 | 
			
		||||
        "CMakeModules/CalamaresCheckModuleSelection.cmake"
 | 
			
		||||
        "CMakeModules/CMakeColors.cmake"
 | 
			
		||||
        "CMakeModules/FindYAMLCPP.cmake"
 | 
			
		||||
        "CMakeModules/CalamaresAddModuleSubdirectory.cmake"
 | 
			
		||||
        "CMakeModules/CalamaresAddLibrary.cmake"
 | 
			
		||||
        "CMakeModules/CalamaresAddBrandingSubdirectory.cmake"
 | 
			
		||||
    DESTINATION
 | 
			
		||||
        "${CMAKE_INSTALL_CMAKEDIR}"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
# Install the export set for use with the install-tree
 | 
			
		||||
install(
 | 
			
		||||
    EXPORT
 | 
			
		||||
        CalamaresLibraryDepends
 | 
			
		||||
    DESTINATION
 | 
			
		||||
        "${CMAKE_INSTALL_CMAKEDIR}"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
### Miscellaneous installs
 | 
			
		||||
#
 | 
			
		||||
#
 | 
			
		||||
if( INSTALL_CONFIG )
 | 
			
		||||
    install(
 | 
			
		||||
        FILES settings.conf
 | 
			
		||||
        DESTINATION share/calamares
 | 
			
		||||
        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
 | 
			
		||||
  FILES
 | 
			
		||||
      com.github.calamares.calamares.policy
 | 
			
		||||
  DESTINATION
 | 
			
		||||
      "${POLKITQT-1_POLICY_FILES_INSTALL_DIR}"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
install(
 | 
			
		||||
    FILES man/calamares.8
 | 
			
		||||
    DESTINATION ${CMAKE_INSTALL_MANDIR}/man8/
 | 
			
		||||
  FILES
 | 
			
		||||
      calamares.desktop
 | 
			
		||||
  DESTINATION
 | 
			
		||||
      ${CMAKE_INSTALL_DATADIR}/applications
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
install(
 | 
			
		||||
    FILES
 | 
			
		||||
        man/calamares.8
 | 
			
		||||
    DESTINATION
 | 
			
		||||
        ${CMAKE_INSTALL_MANDIR}/man8/
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
# uninstall target
 | 
			
		||||
@@ -652,41 +370,3 @@ configure_file(
 | 
			
		||||
add_custom_target( uninstall
 | 
			
		||||
    COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
### CMAKE SUMMARY REPORT
 | 
			
		||||
#
 | 
			
		||||
get_directory_property( SKIPPED_MODULES
 | 
			
		||||
    DIRECTORY src/modules
 | 
			
		||||
    DEFINITION LIST_SKIPPED_MODULES
 | 
			
		||||
)
 | 
			
		||||
calamares_explain_skipped_modules( ${SKIPPED_MODULES} )
 | 
			
		||||
 | 
			
		||||
feature_summary(
 | 
			
		||||
    WHAT DISABLED_FEATURES
 | 
			
		||||
    DESCRIPTION "The following features have been disabled:"
 | 
			
		||||
    QUIET_ON_EMPTY
 | 
			
		||||
)
 | 
			
		||||
feature_summary(
 | 
			
		||||
    WHAT OPTIONAL_PACKAGES_NOT_FOUND
 | 
			
		||||
    DESCRIPTION "The following OPTIONAL packages were not found:"
 | 
			
		||||
    QUIET_ON_EMPTY
 | 
			
		||||
)
 | 
			
		||||
feature_summary(
 | 
			
		||||
    WHAT REQUIRED_PACKAGES_NOT_FOUND
 | 
			
		||||
    FATAL_ON_MISSING_REQUIRED_PACKAGES
 | 
			
		||||
    DESCRIPTION "The following REQUIRED packages were not found:"
 | 
			
		||||
    QUIET_ON_EMPTY
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
### PACKAGING
 | 
			
		||||
#
 | 
			
		||||
# Note: most distro's will do distro-specific packaging rather than
 | 
			
		||||
#       using CPack, and this duplicates information in the AppStream, too.
 | 
			
		||||
# TODO:3.3 With newer CMake, move HOMEPAGE_URL to the project()call
 | 
			
		||||
set(CPACK_PACKAGE_VENDOR calamares)
 | 
			
		||||
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "A Linux system installer")
 | 
			
		||||
set(CPACK_PACKAGE_DESCRIPTION "Calamares is a Linux system installer, intended for Linux distributions to use on their ISOs and other bootable media to install the distribution to the end-user's computer. Calamares can also be used as an OEM configuration tool. It is modular, extensible and highly-configurable for Linux distributions from all five major Linux families.")
 | 
			
		||||
set(CPACK_PACKAGE_HOMEPAGE_URL "https://calamares.io")
 | 
			
		||||
set(CPACK_PACKAGE_ICON "data/images/squid.png")
 | 
			
		||||
 | 
			
		||||
include(CPack)
 | 
			
		||||
 
 | 
			
		||||
@@ -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,11 +15,6 @@
 | 
			
		||||
# 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.
 | 
			
		||||
@@ -51,12 +32,7 @@ macro( _find_boost_python3_int boost_version componentname found_var )
 | 
			
		||||
        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()
 | 
			
		||||
            set( ${found_var} ${_fbp_uc_name} )
 | 
			
		||||
            break()
 | 
			
		||||
        endif()
 | 
			
		||||
    endforeach()
 | 
			
		||||
@@ -70,10 +46,6 @@ macro( find_boost_python3 boost_version python_version found_var )
 | 
			
		||||
    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()
 | 
			
		||||
 | 
			
		||||
    if (NOT _fbp_found)
 | 
			
		||||
        # The following loop changes the searched name for Gentoo based distributions
 | 
			
		||||
        # turns "3.4.123abc" into "3.4"
 | 
			
		||||
 
 | 
			
		||||
@@ -1,14 +1,3 @@
 | 
			
		||||
# === 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}")
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										23
									
								
								CMakeModules/CMakeDateStamp.cmake
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										23
									
								
								CMakeModules/CMakeDateStamp.cmake
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,23 @@
 | 
			
		||||
find_program(DATE_EXECUTABLE NAMES date)
 | 
			
		||||
mark_as_advanced(DATE_EXECUTABLE)
 | 
			
		||||
 | 
			
		||||
if(DATE_EXECUTABLE)
 | 
			
		||||
  execute_process(
 | 
			
		||||
    COMMAND ${DATE_EXECUTABLE} +%Y
 | 
			
		||||
    OUTPUT_VARIABLE CMAKE_DATESTAMP_YEAR
 | 
			
		||||
    OUTPUT_STRIP_TRAILING_WHITESPACE
 | 
			
		||||
    WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
 | 
			
		||||
  )
 | 
			
		||||
  execute_process(
 | 
			
		||||
    COMMAND ${DATE_EXECUTABLE} +%m
 | 
			
		||||
    OUTPUT_VARIABLE CMAKE_DATESTAMP_MONTH
 | 
			
		||||
    OUTPUT_STRIP_TRAILING_WHITESPACE
 | 
			
		||||
    WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
 | 
			
		||||
  )
 | 
			
		||||
  execute_process(
 | 
			
		||||
    COMMAND ${DATE_EXECUTABLE} +%d
 | 
			
		||||
    OUTPUT_VARIABLE CMAKE_DATESTAMP_DAY
 | 
			
		||||
    OUTPUT_STRIP_TRAILING_WHITESPACE
 | 
			
		||||
    WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
 | 
			
		||||
  )
 | 
			
		||||
endif()
 | 
			
		||||
							
								
								
									
										45
									
								
								CMakeModules/CMakeVersionSource.cmake
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										45
									
								
								CMakeModules/CMakeVersionSource.cmake
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,45 @@
 | 
			
		||||
# Try to identify the current development source version.
 | 
			
		||||
set(CMAKE_VERSION_SOURCE "")
 | 
			
		||||
if(EXISTS ${CMAKE_SOURCE_DIR}/.git/HEAD)
 | 
			
		||||
  find_program(GIT_EXECUTABLE NAMES git git.cmd)
 | 
			
		||||
  mark_as_advanced(GIT_EXECUTABLE)
 | 
			
		||||
  if(GIT_EXECUTABLE)
 | 
			
		||||
    execute_process(
 | 
			
		||||
      COMMAND ${GIT_EXECUTABLE} rev-parse --verify -q --short=7 HEAD
 | 
			
		||||
      OUTPUT_VARIABLE head
 | 
			
		||||
      OUTPUT_STRIP_TRAILING_WHITESPACE
 | 
			
		||||
      WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
 | 
			
		||||
      )
 | 
			
		||||
    if(head)
 | 
			
		||||
      set(branch "")
 | 
			
		||||
      execute_process(
 | 
			
		||||
        COMMAND ${GIT_EXECUTABLE} name-rev HEAD
 | 
			
		||||
        OUTPUT_VARIABLE branch
 | 
			
		||||
        OUTPUT_STRIP_TRAILING_WHITESPACE
 | 
			
		||||
        WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
 | 
			
		||||
        )
 | 
			
		||||
      string(REGEX REPLACE "HEAD " "" branch "${branch}")
 | 
			
		||||
      set(CMAKE_VERSION_SOURCE "git-${branch}-${head}")
 | 
			
		||||
      execute_process(
 | 
			
		||||
        COMMAND ${GIT_EXECUTABLE} update-index -q --refresh
 | 
			
		||||
        WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
 | 
			
		||||
        )
 | 
			
		||||
      execute_process(
 | 
			
		||||
        COMMAND ${GIT_EXECUTABLE} diff-index --name-only HEAD --
 | 
			
		||||
        OUTPUT_VARIABLE dirty
 | 
			
		||||
        OUTPUT_STRIP_TRAILING_WHITESPACE
 | 
			
		||||
        WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
 | 
			
		||||
        )
 | 
			
		||||
      if(dirty)
 | 
			
		||||
        set(CMAKE_VERSION_SOURCE "${CMAKE_VERSION_SOURCE}-dirty")
 | 
			
		||||
      endif()
 | 
			
		||||
    endif()
 | 
			
		||||
  endif()
 | 
			
		||||
elseif(EXISTS ${CMAKE_SOURCE_DIR}/CVS/Repository)
 | 
			
		||||
  file(READ ${CMAKE_SOURCE_DIR}/CVS/Repository repo)
 | 
			
		||||
  set(branch "")
 | 
			
		||||
  if("${repo}" MATCHES "\\.git/")
 | 
			
		||||
    string(REGEX REPLACE ".*\\.git/([^\r\n]*).*" "-\\1" branch "${repo}")
 | 
			
		||||
  endif()
 | 
			
		||||
  set(CMAKE_VERSION_SOURCE "cvs${branch}")
 | 
			
		||||
endif()
 | 
			
		||||
@@ -1,147 +1,43 @@
 | 
			
		||||
# === 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()
 | 
			
		||||
function( calamares_add_branding_subdirectory )
 | 
			
		||||
    set( SUBDIRECTORY ${ARGV0} )
 | 
			
		||||
 | 
			
		||||
    if( EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${SUBDIRECTORY}/CMakeLists.txt" )
 | 
			
		||||
        add_subdirectory( ${SUBDIRECTORY} )
 | 
			
		||||
        add_subdirectory( $SUBDIRECTORY )
 | 
			
		||||
        message( "-- ${BoldYellow}Found ${CALAMARES_APPLICATION_NAME} branding component: ${BoldRed}${SUBDIRECTORY}${ColorReset}" )
 | 
			
		||||
 | 
			
		||||
    elseif( EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${SUBDIRECTORY}/branding.desc" )
 | 
			
		||||
        calamares_add_branding( ${_CABS_NAME} DIRECTORY ${SUBDIRECTORY} SUBDIRECTORIES ${_CABS_SUBDIRECTORIES} )
 | 
			
		||||
        set( BRANDING_DIR share/calamares/branding )
 | 
			
		||||
        set( BRANDING_COMPONENT_DESTINATION ${BRANDING_DIR}/${SUBDIRECTORY} )
 | 
			
		||||
 | 
			
		||||
        if( IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/${SUBDIRECTORY}/lang" )
 | 
			
		||||
            calamares_add_branding_translations( ${_CABS_NAME} DIRECTORY ${SUBDIRECTORY} )
 | 
			
		||||
            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()
 | 
			
		||||
    message( "" )
 | 
			
		||||
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,29 +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()
 | 
			
		||||
    # 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}
 | 
			
		||||
    target_link_libraries(${target} 
 | 
			
		||||
        LINK_PUBLIC ${CALAMARES_LIBRARIES}
 | 
			
		||||
        Qt5::Core
 | 
			
		||||
        Qt5::Gui
 | 
			
		||||
        Qt5::Widgets
 | 
			
		||||
        ${LIBRARY_QT5_MODULES}
 | 
			
		||||
    )
 | 
			
		||||
    if(LIBRARY_LINK_LIBRARIES)
 | 
			
		||||
        target_link_libraries(${target} LINK_PUBLIC ${LIBRARY_LINK_LIBRARIES})
 | 
			
		||||
@@ -116,6 +97,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)
 | 
			
		||||
 
 | 
			
		||||
@@ -1,193 +1,75 @@
 | 
			
		||||
# === 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.
 | 
			
		||||
#
 | 
			
		||||
# # Usage
 | 
			
		||||
#
 | 
			
		||||
# The public API is one single function:
 | 
			
		||||
#
 | 
			
		||||
# - calamares_add_module_subdirectory(subdirectory [skiplistvar])
 | 
			
		||||
#   Adds a given *subdirectory* to the modules list, building the
 | 
			
		||||
#   module that is there. The *subdirectory* must contain a `module.desc`
 | 
			
		||||
#   (generally non-C++ modules) or a `CMakeLists.txt` (for C++ modules,
 | 
			
		||||
#   or special cases). The module is assumed to be named after the
 | 
			
		||||
#   (last component of) the subdirectory.
 | 
			
		||||
#
 | 
			
		||||
#   If the module would be skipped (by the global SKIP_MODULES setting
 | 
			
		||||
#   or a USE_* setting) or the module itself sets a reason to skip
 | 
			
		||||
#   via the calamares_skip_module() function, the module is added to
 | 
			
		||||
#   the list of skipped-modules in *skiplistvar*. If no variable is
 | 
			
		||||
#   given, the reason is set in the parent scope variable
 | 
			
		||||
#   SKIPPED_MODULES . Do **not** use SKIPPED_MODULES as the name of
 | 
			
		||||
#   *skiplistvar*, things will get weird.
 | 
			
		||||
#
 | 
			
		||||
#   Do note that the name of a module must be the same as the name of
 | 
			
		||||
#   the directory containing it (as documented in src/modules/README.md).
 | 
			
		||||
#   This applies to both C++ and Python modules, and allows the use of
 | 
			
		||||
#   the subdirectory as a proxy for the module name inside.
 | 
			
		||||
#
 | 
			
		||||
 | 
			
		||||
include( CMakeColors )
 | 
			
		||||
include( CalamaresAddTranslations )
 | 
			
		||||
include( CalamaresCheckModuleSelection )
 | 
			
		||||
 | 
			
		||||
set( MODULE_DATA_DESTINATION share/calamares/modules )
 | 
			
		||||
 | 
			
		||||
# We look for Pylint (just once) so that unittests can be added that
 | 
			
		||||
# check the syntax / variables of Python modules. This should help
 | 
			
		||||
# avoid more typo's-in-releases.
 | 
			
		||||
if(BUILD_TESTING AND NOT PYLINT_COMMAND_SEARCHED)
 | 
			
		||||
    set(PYLINT_COMMAND_SEARCHED TRUE)
 | 
			
		||||
    find_program(
 | 
			
		||||
        PYLINT_COMMAND
 | 
			
		||||
        NAMES pylint3 pylint
 | 
			
		||||
        PATHS $ENV{HOME}/.local/bin
 | 
			
		||||
        )
 | 
			
		||||
endif()
 | 
			
		||||
# 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_add_module_subdirectory_impl )
 | 
			
		||||
function( calamares_add_module_subdirectory )
 | 
			
		||||
    set( SUBDIRECTORY ${ARGV0} )
 | 
			
		||||
 | 
			
		||||
    # Set SKIPPED_MODULES here, so CMake-based modules have a
 | 
			
		||||
    # parent scope to set it in; this function, in turn sets it
 | 
			
		||||
    # in **its** parent scope.
 | 
			
		||||
    set( SKIPPED_MODULES "" )
 | 
			
		||||
    set( SKIPPED_MODULES )
 | 
			
		||||
    set( MODULE_CONFIG_FILES "" )
 | 
			
		||||
 | 
			
		||||
    # 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.
 | 
			
		||||
    #
 | 
			
		||||
    # Compute _modulename (the last directory name) and _mod_dir
 | 
			
		||||
    # (the full path to the module sources).
 | 
			
		||||
    get_filename_component(_dirname "${SUBDIRECTORY}" DIRECTORY)
 | 
			
		||||
    if( _dirname )
 | 
			
		||||
        # Remove the dirname and any leftover leading /s
 | 
			
		||||
        string( REGEX REPLACE "^${_dirname}/*" "" _modulename "${SUBDIRECTORY}" )
 | 
			
		||||
    else()
 | 
			
		||||
        set( _modulename ${SUBDIRECTORY} )
 | 
			
		||||
    endif()
 | 
			
		||||
    # Strip any remaining /
 | 
			
		||||
    string( REGEX REPLACE "/" "" _modulename "${_modulename}" )
 | 
			
		||||
    set( _mod_dir "${CMAKE_CURRENT_SOURCE_DIR}/${SUBDIRECTORY}" )
 | 
			
		||||
 | 
			
		||||
    # Skip list check applies to all kinds of modules
 | 
			
		||||
    calamares_check_skip( ${_modulename} SKIPPED_MODULES )
 | 
			
		||||
    if ( SKIPPED_MODULES )
 | 
			
		||||
        # If it's skipped by infrastucture, the message already includes the module
 | 
			
		||||
        # name. We don't need to do any further checking.
 | 
			
		||||
        set( SKIPPED_MODULES "${SKIPPED_MODULES}" PARENT_SCOPE )
 | 
			
		||||
        return()
 | 
			
		||||
    endif()
 | 
			
		||||
 | 
			
		||||
    # If this subdirectory has a CMakeLists.txt, we add_subdirectory it...
 | 
			
		||||
    if( EXISTS "${_mod_dir}/CMakeLists.txt" )
 | 
			
		||||
    if( EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${SUBDIRECTORY}/CMakeLists.txt" )
 | 
			
		||||
        add_subdirectory( ${SUBDIRECTORY} )
 | 
			
		||||
        file( GLOB MODULE_CONFIG_FILES RELATIVE ${_mod_dir} "${SUBDIRECTORY}/*.conf" )
 | 
			
		||||
        file( GLOB MODULE_CONFIG_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}/${SUBDIRECTORY} "${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 "" )
 | 
			
		||||
        else()
 | 
			
		||||
            # The SKIPPED_MODULES may be set in the directory itself
 | 
			
		||||
            get_directory_property( _skip DIRECTORY ${SUBDIRECTORY} DEFINITION SKIPPED_MODULES )
 | 
			
		||||
            if ( _skip )
 | 
			
		||||
                set( SKIPPED_MODULES ${_skip} PARENT_SCOPE )
 | 
			
		||||
                set( MODULE_CONFIG_FILES "" )
 | 
			
		||||
            endif()
 | 
			
		||||
        endif()
 | 
			
		||||
        if ( SKIPPED_MODULES )
 | 
			
		||||
            return()
 | 
			
		||||
        endif()
 | 
			
		||||
    # ...otherwise, we look for a module.desc.
 | 
			
		||||
    elseif( EXISTS "${_mod_dir}/module.desc" )
 | 
			
		||||
    elseif( EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${SUBDIRECTORY}/module.desc" )
 | 
			
		||||
        set( MODULES_DIR ${CMAKE_INSTALL_LIBDIR}/calamares/modules )
 | 
			
		||||
        set( MODULE_DESTINATION ${MODULES_DIR}/${_modulename} )
 | 
			
		||||
        set( MODULE_DESTINATION ${MODULES_DIR}/${SUBDIRECTORY} )
 | 
			
		||||
 | 
			
		||||
        # 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()
 | 
			
		||||
        # 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 ( _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()
 | 
			
		||||
                get_filename_component( FLEXT ${MODULE_FILE} EXT )
 | 
			
		||||
                if( "${FLEXT}" STREQUAL ".conf" AND INSTALL_CONFIG)
 | 
			
		||||
                    install( FILES ${CMAKE_CURRENT_BINARY_DIR}/${SUBDIRECTORY}/${MODULE_FILE}
 | 
			
		||||
                             DESTINATION ${MODULE_DATA_DESTINATION} )
 | 
			
		||||
                    list( APPEND MODULE_CONFIG_FILES ${MODULE_FILE} )
 | 
			
		||||
                else()
 | 
			
		||||
                    install( FILES ${CMAKE_CURRENT_BINARY_DIR}/${SUBDIRECTORY}/${MODULE_FILE}
 | 
			
		||||
                             DESTINATION ${MODULE_DESTINATION} )
 | 
			
		||||
                endif()
 | 
			
		||||
            endforeach()
 | 
			
		||||
            endif()
 | 
			
		||||
        endforeach()
 | 
			
		||||
 | 
			
		||||
            message( "-- ${BoldYellow}Found ${CALAMARES_APPLICATION_NAME} module: ${BoldRed}${_modulename}${ColorReset}" )
 | 
			
		||||
        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}" )
 | 
			
		||||
            if( MODULE_CONFIG_FILES )
 | 
			
		||||
                if ( INSTALL_CONFIG )
 | 
			
		||||
                    set( _destination "${MODULE_DATA_DESTINATION}" )
 | 
			
		||||
                    message( "   ${Green}CONFIGURATION_FILES:${ColorReset} ${MODULE_CONFIG_FILES} => ${MODULE_DATA_DESTINATION}" )
 | 
			
		||||
                else()
 | 
			
		||||
                    set( _destination "[Build directory only]" )
 | 
			
		||||
                    message( "   ${Green}CONFIGURATION_FILES:${ColorReset} ${MODULE_CONFIG_FILES} => [Skipping installation]" )
 | 
			
		||||
                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()
 | 
			
		||||
        # We copy over the lang directory, if any
 | 
			
		||||
        if( IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/${SUBDIRECTORY}/lang" )
 | 
			
		||||
            install_calamares_gettext_translations(
 | 
			
		||||
                ${SUBDIRECTORY}
 | 
			
		||||
                SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/${SUBDIRECTORY}/lang"
 | 
			
		||||
                FILENAME ${SUBDIRECTORY}.mo
 | 
			
		||||
                RENAME calamares-${SUBDIRECTORY}.mo
 | 
			
		||||
            )
 | 
			
		||||
        endif()
 | 
			
		||||
    else()
 | 
			
		||||
        message( "-- ${BoldYellow}Warning:${ColorReset} tried to add module subdirectory ${BoldRed}${SUBDIRECTORY}${ColorReset} which has no CMakeLists.txt or module.desc." )
 | 
			
		||||
@@ -208,79 +90,4 @@ function( _calamares_add_module_subdirectory_impl )
 | 
			
		||||
            math( EXPR _count "${_count} + 1" )
 | 
			
		||||
        endforeach()
 | 
			
		||||
    endif()
 | 
			
		||||
 | 
			
		||||
    # Adding general tests
 | 
			
		||||
    #
 | 
			
		||||
    # Add a 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()
 | 
			
		||||
        if ( PYLINT_COMMAND AND MODULE_INTERFACE MATCHES "python" )
 | 
			
		||||
            # Python modules get an additional test via pylint; this
 | 
			
		||||
            # needs to run at top-level because the ci/libcalamares directory
 | 
			
		||||
            # contains API stubs.
 | 
			
		||||
            #
 | 
			
		||||
            # TODO: the entry point is assumed to be `main.py`, but that is
 | 
			
		||||
            #       configurable through module.desc
 | 
			
		||||
            add_test(
 | 
			
		||||
                NAME lint-${SUBDIRECTORY}
 | 
			
		||||
                COMMAND env PYTHONPATH=ci: ${PYLINT_COMMAND} -E ${_mod_dir}/main.py
 | 
			
		||||
                WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
 | 
			
		||||
                )
 | 
			
		||||
        endif()
 | 
			
		||||
    endif()
 | 
			
		||||
endfunction()
 | 
			
		||||
 | 
			
		||||
function( calamares_add_module_subdirectory )
 | 
			
		||||
    set( SUBDIRECTORY ${ARGV0} )
 | 
			
		||||
    set( _ams_SKIP_LIST ${ARGV1} )
 | 
			
		||||
 | 
			
		||||
    set( SKIPPED_MODULES "" )
 | 
			
		||||
    _calamares_add_module_subdirectory_impl( ${SUBDIRECTORY} )
 | 
			
		||||
    if ( SKIPPED_MODULES )
 | 
			
		||||
        if ( _ams_SKIP_LIST )
 | 
			
		||||
            list( APPEND ${_ams_SKIP_LIST} "${SKIPPED_MODULES}" )
 | 
			
		||||
            set( ${_ams_SKIP_LIST} "${${_ams_SKIP_LIST}}" PARENT_SCOPE )
 | 
			
		||||
        else()
 | 
			
		||||
            set( SKIPPED_MODULES "${SKIPPED_MODULES}" PARENT_SCOPE )
 | 
			
		||||
        endif()
 | 
			
		||||
    endif()
 | 
			
		||||
endfunction()
 | 
			
		||||
 
 | 
			
		||||
@@ -1,19 +1,8 @@
 | 
			
		||||
# === 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).
 | 
			
		||||
# a module.desc with standard values if none is provided (which only
 | 
			
		||||
# happens for very unusual plugins).
 | 
			
		||||
#
 | 
			
		||||
# Usage:
 | 
			
		||||
#
 | 
			
		||||
@@ -25,59 +14,22 @@
 | 
			
		||||
#   UI ui-file...
 | 
			
		||||
#   LINK_LIBRARIES lib...
 | 
			
		||||
#   LINK_PRIVATE_LIBRARIES lib...
 | 
			
		||||
#   [COMPILE_DEFINITIONS def...]
 | 
			
		||||
#   [RESOURCES resource-file]
 | 
			
		||||
#   [REQUIRES module-name...]
 | 
			
		||||
#   COMPILE_DEFINITIONS def...
 | 
			
		||||
#   RESOURCES resource-file
 | 
			
		||||
#   [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.
 | 
			
		||||
#
 | 
			
		||||
#
 | 
			
		||||
# This function follows the global SKIP_MODULES and USE_* settings, so
 | 
			
		||||
# a plugin may be skipped -- then nothing will be built. In that case,
 | 
			
		||||
# SKIPPED_MODULES is set in the parent (i.e. caller's) scope with the
 | 
			
		||||
# reason why. This should rarely be a concern as AddModuleSubdirectory
 | 
			
		||||
# already handles skip-reasons and collects them for reporting.
 | 
			
		||||
 | 
			
		||||
include( CMakeParseArguments )
 | 
			
		||||
 | 
			
		||||
include( CalamaresAddLibrary  )
 | 
			
		||||
include( CalamaresCheckModuleSelection )
 | 
			
		||||
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 )
 | 
			
		||||
    set( options NO_INSTALL SHARED_LIB )
 | 
			
		||||
    set( oneValueArgs NAME TYPE EXPORT_MACRO RESOURCES )
 | 
			
		||||
    set( multiValueArgs SOURCES UI LINK_LIBRARIES LINK_PRIVATE_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} )
 | 
			
		||||
@@ -88,53 +40,31 @@ function( calamares_add_plugin )
 | 
			
		||||
    set( CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}" )
 | 
			
		||||
    set( CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}" )
 | 
			
		||||
 | 
			
		||||
    calamares_check_skip( ${NAME} _skip)
 | 
			
		||||
    if ( _skip )
 | 
			
		||||
        set( SKIPPED_MODULES "${_skip}" PARENT_SCOPE )
 | 
			
		||||
        return()
 | 
			
		||||
    endif()
 | 
			
		||||
 | 
			
		||||
    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}" )
 | 
			
		||||
    if( NOT CMAKE_BUILD_TYPE STREQUAL "Release" )
 | 
			
		||||
        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}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( PLUGIN_CONFIG_FILES )
 | 
			
		||||
            if ( INSTALL_CONFIG )
 | 
			
		||||
                message( "   ${Green}CONFIGURATION_FILES:${ColorReset} ${PLUGIN_CONFIG_FILES} => ${PLUGIN_DATA_DESTINATION}" )
 | 
			
		||||
            else()
 | 
			
		||||
                message( "   ${Green}CONFIGURATION_FILES:${ColorReset} ${PLUGIN_CONFIG_FILES} => [Skipping installation]" )
 | 
			
		||||
            endif()
 | 
			
		||||
        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." )
 | 
			
		||||
        if( PLUGIN_RESOURCES )
 | 
			
		||||
            message( "   ${Green}RESOURCES:${ColorReset} ${PLUGIN_RESOURCES}" )
 | 
			
		||||
        endif()
 | 
			
		||||
        message( "" )
 | 
			
		||||
    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}" )
 | 
			
		||||
 | 
			
		||||
    # automatic library linkage
 | 
			
		||||
    if(PLUGIN_TYPE STREQUAL "view" OR PLUGIN_TYPE STREQUAL "viewmodule")
 | 
			
		||||
        list(APPEND PLUGIN_LINK_PRIVATE_LIBRARIES Calamares::calamaresui)
 | 
			
		||||
    elseif(PLUGIN_TYPE STREQUAL "job")
 | 
			
		||||
        list(APPEND PLUGIN_LINK_PRIVATE_LIBRARIES Calamares::calamares)
 | 
			
		||||
    else()
 | 
			
		||||
        message(FATAL_ERROR "Unknown plugin type ${PLUGIN_TYPE}")
 | 
			
		||||
    endif()
 | 
			
		||||
 | 
			
		||||
    # determine target type
 | 
			
		||||
    if( NOT ${PLUGIN_SHARED_LIB} )
 | 
			
		||||
        set( target_type "MODULE" )
 | 
			
		||||
@@ -142,7 +72,7 @@ function( calamares_add_plugin )
 | 
			
		||||
        set( target_type "SHARED" )
 | 
			
		||||
    endif()
 | 
			
		||||
 | 
			
		||||
    set( calamares_add_library_args
 | 
			
		||||
    list( APPEND calamares_add_library_args
 | 
			
		||||
        "${target}"
 | 
			
		||||
        "EXPORT_MACRO" "${PLUGIN_EXPORT_MACRO}"
 | 
			
		||||
        "TARGET_TYPE" "${target_type}"
 | 
			
		||||
@@ -165,14 +95,9 @@ function( calamares_add_plugin )
 | 
			
		||||
        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" )
 | 
			
		||||
 | 
			
		||||
    list( APPEND calamares_add_library_args
 | 
			
		||||
        "NO_VERSION"
 | 
			
		||||
        "INSTALL_BINDIR" "${PLUGIN_DESTINATION}"
 | 
			
		||||
    )
 | 
			
		||||
    list( APPEND calamares_add_library_args "INSTALL_BINDIR" "${PLUGIN_DESTINATION}" )
 | 
			
		||||
 | 
			
		||||
    if( PLUGIN_RESOURCES )
 | 
			
		||||
        list( APPEND calamares_add_library_args "RESOURCES" "${PLUGIN_RESOURCES}" )
 | 
			
		||||
@@ -187,43 +112,16 @@ function( calamares_add_plugin )
 | 
			
		||||
        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} )
 | 
			
		||||
    install( FILES ${CMAKE_CURRENT_BINARY_DIR}/${PLUGIN_DESC_FILE}
 | 
			
		||||
             DESTINATION ${PLUGIN_DESTINATION} )
 | 
			
		||||
 | 
			
		||||
        set( _warned_config OFF )
 | 
			
		||||
    if ( INSTALL_CONFIG )
 | 
			
		||||
        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()
 | 
			
		||||
            configure_file( ${PLUGIN_CONFIG_FILE} ${PLUGIN_CONFIG_FILE} COPYONLY )
 | 
			
		||||
            install( FILES ${CMAKE_CURRENT_BINARY_DIR}/${PLUGIN_CONFIG_FILE}
 | 
			
		||||
                     DESTINATION ${PLUGIN_DATA_DESTINATION} )
 | 
			
		||||
        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::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} Calamares::calamaresui Qt5::Gui )
 | 
			
		||||
        endif()
 | 
			
		||||
        if( TEST_RESOURCES )
 | 
			
		||||
            calamares_autorcc( ${TEST_NAME} ${TEST_RESOURCES} )
 | 
			
		||||
        endif()
 | 
			
		||||
    endif()
 | 
			
		||||
endfunction()
 | 
			
		||||
@@ -1,25 +1,65 @@
 | 
			
		||||
# === 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
 | 
			
		||||
)
 | 
			
		||||
# Internal macro for adding the C++ / Qt translations to the
 | 
			
		||||
# build and install tree. Should be called only once, from
 | 
			
		||||
# src/calamares/CMakeLists.txt.
 | 
			
		||||
macro(add_calamares_translations language)
 | 
			
		||||
    list( APPEND CALAMARES_LANGUAGES ${ARGV} )
 | 
			
		||||
 | 
			
		||||
    set( calamares_i18n_qrc_content "<!DOCTYPE RCC><RCC version=\"1.0\">\n" )
 | 
			
		||||
 | 
			
		||||
    # calamares and qt language files
 | 
			
		||||
    set( calamares_i18n_qrc_content "${calamares_i18n_qrc_content}<qresource prefix=\"/lang\">\n" )
 | 
			
		||||
    foreach( lang ${CALAMARES_LANGUAGES} )
 | 
			
		||||
        set( calamares_i18n_qrc_content "${calamares_i18n_qrc_content}<file>calamares_${lang}.qm</file>\n" )
 | 
			
		||||
        list( APPEND TS_FILES "${CMAKE_SOURCE_DIR}/lang/calamares_${lang}.ts" )
 | 
			
		||||
    endforeach()
 | 
			
		||||
 | 
			
		||||
    set( calamares_i18n_qrc_content "${calamares_i18n_qrc_content}</qresource>\n" )
 | 
			
		||||
    set( calamares_i18n_qrc_content "${calamares_i18n_qrc_content}</RCC>\n" )
 | 
			
		||||
 | 
			
		||||
    file( WRITE ${CMAKE_BINARY_DIR}/lang/calamares_i18n.qrc "${calamares_i18n_qrc_content}" )
 | 
			
		||||
 | 
			
		||||
    qt5_add_translation(QM_FILES ${TS_FILES})
 | 
			
		||||
 | 
			
		||||
    ## HACK HACK HACK - around rcc limitations to allow out of source-tree building
 | 
			
		||||
    set( trans_file calamares_i18n )
 | 
			
		||||
    set( trans_srcfile ${CMAKE_BINARY_DIR}/lang/${trans_file}.qrc )
 | 
			
		||||
    set( trans_infile ${CMAKE_CURRENT_BINARY_DIR}/${trans_file}.qrc )
 | 
			
		||||
    set( trans_outfile ${CMAKE_CURRENT_BINARY_DIR}/qrc_${trans_file}.cxx )
 | 
			
		||||
 | 
			
		||||
    # Copy the QRC file to the output directory
 | 
			
		||||
    add_custom_command(
 | 
			
		||||
        OUTPUT ${trans_infile}
 | 
			
		||||
        COMMAND ${CMAKE_COMMAND} -E copy ${trans_srcfile} ${trans_infile}
 | 
			
		||||
        MAIN_DEPENDENCY ${trans_srcfile}
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    # Run the resource compiler (rcc_options should already be set)
 | 
			
		||||
    add_custom_command(
 | 
			
		||||
        OUTPUT ${trans_outfile}
 | 
			
		||||
        COMMAND "${Qt5Core_RCC_EXECUTABLE}"
 | 
			
		||||
        ARGS ${rcc_options} -name ${trans_file} -o ${trans_outfile} ${trans_infile}
 | 
			
		||||
        MAIN_DEPENDENCY ${trans_infile}
 | 
			
		||||
        DEPENDS ${QM_FILES}
 | 
			
		||||
    )
 | 
			
		||||
endmacro()
 | 
			
		||||
 | 
			
		||||
# Internal macro for Python translations
 | 
			
		||||
#
 | 
			
		||||
# Translations of the Python modules that don't have their own
 | 
			
		||||
# lang/ subdirectories -- these are collected in top-level
 | 
			
		||||
# lang/python/<lang>/LC_MESSAGES/python.mo
 | 
			
		||||
macro(add_calamares_python_translations language)
 | 
			
		||||
    set( CALAMARES_LANGUAGES "" )
 | 
			
		||||
    list( APPEND CALAMARES_LANGUAGES ${ARGV} )
 | 
			
		||||
 | 
			
		||||
    install_calamares_gettext_translations( python
 | 
			
		||||
        SOURCE_DIR ${CMAKE_SOURCE_DIR}/lang/python
 | 
			
		||||
        FILENAME python.mo
 | 
			
		||||
        RENAME calamares-python.mo
 | 
			
		||||
    )
 | 
			
		||||
endmacro()
 | 
			
		||||
 | 
			
		||||
# Installs a directory containing language-code-labeled subdirectories with
 | 
			
		||||
# gettext data into the appropriate system directory. Allows renaming the
 | 
			
		||||
@@ -51,52 +91,31 @@ function( install_calamares_gettext_translations )
 | 
			
		||||
    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()
 | 
			
		||||
    message(STATUS "Installing gettext translations for ${TRANSLATION_NAME}")
 | 
			
		||||
    message(STATUS "  Installing ${TRANSLATION_FILENAME} from ${TRANSLATION_SOURCE_DIR}")
 | 
			
		||||
 | 
			
		||||
    set( TRANSLATION_NAME "${NAME}" )
 | 
			
		||||
    set( INSTALLED_TRANSLATIONS "" )
 | 
			
		||||
    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}" )
 | 
			
		||||
        set( lang_mo "${TRANSLATION_SOURCE_DIR}/${lang}/LC_MESSAGES/${TRANSLATION_FILENAME}" )
 | 
			
		||||
        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}" )
 | 
			
		||||
        else( EXISTS ${lang_mo} )
 | 
			
		||||
            list( APPEND INSTALLED_LANGUAGES "${lang}" )
 | 
			
		||||
            install(
 | 
			
		||||
                FILES ${lang_mo}
 | 
			
		||||
                DESTINATION ${CMAKE_INSTALL_LOCALEDIR}/${lang}/LC_MESSAGES/
 | 
			
		||||
                RENAME ${TRANSLATION_RENAME}
 | 
			
		||||
            )
 | 
			
		||||
            # TODO: make translations available in build dir too, for
 | 
			
		||||
            #       translation when running calamares -d from builddir.
 | 
			
		||||
            set(_build_lc ${CMAKE_BINARY_DIR}/lang/${lang}/LC_MESSAGES/)
 | 
			
		||||
            file(COPY ${lang_mo} DESTINATION ${_build_lc})
 | 
			
		||||
            if (NOT TRANSLATION_FILENAME STREQUAL TRANSLATION_RENAME)
 | 
			
		||||
                file(RENAME ${_build_lc}${TRANSLATION_FILENAME} ${_build_lc}${TRANSLATION_RENAME})
 | 
			
		||||
            endif()
 | 
			
		||||
 | 
			
		||||
        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,116 +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.
 | 
			
		||||
#
 | 
			
		||||
###
 | 
			
		||||
#
 | 
			
		||||
# This module implements the "skip modules" part of configuring
 | 
			
		||||
# the Calamares repository or an external-modules repository.
 | 
			
		||||
#
 | 
			
		||||
# It should not be necessary to include() this module explicitly,
 | 
			
		||||
# since both AddPlugin and AddModuleSubdirectory do so implicitly.
 | 
			
		||||
#
 | 
			
		||||
#
 | 
			
		||||
# # Usage
 | 
			
		||||
#
 | 
			
		||||
# The public API is two functions:
 | 
			
		||||
#
 | 
			
		||||
# - calamares_skip_module(reason)
 | 
			
		||||
#   A C++ module (or any that uses CMake) can call this macro to
 | 
			
		||||
#   add *reason* to the list of skipped modules. Typically a module
 | 
			
		||||
#   will pass in "modulename (why)" so that it is clear **which**
 | 
			
		||||
#   module is skipped. This macro should be called at the top-level
 | 
			
		||||
#   of a module's CMakeLists.txt and the module should then **not**
 | 
			
		||||
#   call calamares_add_plugin().
 | 
			
		||||
# - calamares_explain_skipped_modules(list...)
 | 
			
		||||
#   This will print out all the module reasons (see above) that have
 | 
			
		||||
#   been added to the given *listvar*. When AddModuleSubdirectory is
 | 
			
		||||
#   used as the mechanism to add all the subdirectories in the repository
 | 
			
		||||
#   that contain modules, with a consistent *listvar* setting,
 | 
			
		||||
#   this will show all the modules that have been skipped.
 | 
			
		||||
#
 | 
			
		||||
# The internal API is one function:
 | 
			
		||||
#
 | 
			
		||||
# - calamares_check_skip(modulename outvar)
 | 
			
		||||
#   Checks if the *modulename* has been listed in the global SKIP_MODULES
 | 
			
		||||
#   variable (to skip specifically-named modules) or if there is a USE_*
 | 
			
		||||
#   setting applicable to the module. If the module is skipped for this
 | 
			
		||||
#   reason, a suitable entry is added to *outvar* as if
 | 
			
		||||
#   calamares_skip_module() had been called.
 | 
			
		||||
#
 | 
			
		||||
# Best practice is to pick a variable to collect all of the skipped
 | 
			
		||||
# modules, and to pass the name of that variable to AddModuleSubdirectory
 | 
			
		||||
# in each call. After all subdirectories have been added, call
 | 
			
		||||
# calamares_explain_skipped_modules() with the value of that variable.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# 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()
 | 
			
		||||
 | 
			
		||||
# Globally, SKIP_MODULES and USE_* affect what modules are built.
 | 
			
		||||
# Check if *modulename* should be skipped, and if so, set *outvar* to
 | 
			
		||||
# a human-readable reason for skipping it.
 | 
			
		||||
function( _calamares_check_skip_impl modulename outvar )
 | 
			
		||||
    # Globally-defined SKIP_MODULES may be space- or semicolon- separated
 | 
			
		||||
    # so convert it to a list-variable.
 | 
			
		||||
    string( REPLACE " " ";" SKIP_LIST "${SKIP_MODULES}" )
 | 
			
		||||
 | 
			
		||||
    list( FIND SKIP_LIST "${modulename}" DO_SKIP )
 | 
			
		||||
    if( NOT DO_SKIP EQUAL -1 )
 | 
			
		||||
        set( ${outvar} "user request" PARENT_SCOPE )
 | 
			
		||||
        return()
 | 
			
		||||
    endif()
 | 
			
		||||
 | 
			
		||||
    # Not skipped by the global check, see if it has an applicable USE_*
 | 
			
		||||
    if( "${modulename}" MATCHES "^[a-zA-Z0-9_]+-" )
 | 
			
		||||
        # Split the name into <category>-<implementation>
 | 
			
		||||
        string( REGEX REPLACE "-.*" "" _category "${modulename}" )
 | 
			
		||||
        string( REGEX REPLACE "^[^-]+-" "" _implementation "${modulename}" )
 | 
			
		||||
    else()
 | 
			
		||||
        # Not a module to which USE_* applies
 | 
			
		||||
        return()
 | 
			
		||||
    endif()
 | 
			
		||||
 | 
			
		||||
    if( "${USE_${_category}}" STREQUAL "none" )
 | 
			
		||||
        set( ${outvar} "category ${_category} disabled" PARENT_SCOPE )
 | 
			
		||||
        return()
 | 
			
		||||
    elseif( "${USE_${_category}}" STREQUAL "" )
 | 
			
		||||
        # Category not set at all or nonexistent
 | 
			
		||||
        return()
 | 
			
		||||
    endif()
 | 
			
		||||
 | 
			
		||||
    if ( "${USE_${_category}}" STREQUAL "${_implementation}" )
 | 
			
		||||
        # Matches, so accept this module
 | 
			
		||||
    else()
 | 
			
		||||
        set( ${outvar} "category ${_category} selects ${USE_${_category}}" PARENT_SCOPE )
 | 
			
		||||
    endif()
 | 
			
		||||
endfunction()
 | 
			
		||||
 | 
			
		||||
# This is the public API;it calls the _impl version so that there
 | 
			
		||||
# is an extra intermediate scope for the subdirectory to write results into.
 | 
			
		||||
function( calamares_check_skip modulename outvar )
 | 
			
		||||
    set( _skip "" )
 | 
			
		||||
    _calamares_check_skip_impl( "${modulename}" _skip )
 | 
			
		||||
    if ( _skip )
 | 
			
		||||
        message( "${ColorReset}-- Skipping module ${BoldRed}${modulename} (${_skip})${ColorReset}." )
 | 
			
		||||
        message( "" )
 | 
			
		||||
        set( ${outvar} "${modulename} (${_skip})" PARENT_SCOPE )
 | 
			
		||||
    endif()
 | 
			
		||||
endfunction()
 | 
			
		||||
@@ -1,75 +0,0 @@
 | 
			
		||||
# === This file is part of Calamares - <https://calamares.io> ===
 | 
			
		||||
#
 | 
			
		||||
#   SPDX-FileCopyrightText: 2014 Teo Mrnjavac <teo@kde.org>
 | 
			
		||||
#   SPDX-FileCopyrightText: 2021 Adriaan de Groot <groot@kde.org>
 | 
			
		||||
#   SPDX-License-Identifier: BSD-2-Clause
 | 
			
		||||
#
 | 
			
		||||
###
 | 
			
		||||
#
 | 
			
		||||
# This file defines one function for extending a VERSION-like value
 | 
			
		||||
# with date and git information (if desired).
 | 
			
		||||
#
 | 
			
		||||
# - extend_version( version-string short_only short_var long_var )
 | 
			
		||||
#   Calling this function will copy *version-string* (which would typically
 | 
			
		||||
#   be a semver-style string, like "3.2.40") into the variable *short_var*.
 | 
			
		||||
#   If *short_only* is true, then:
 | 
			
		||||
#       - the short version is also copied into the variable *long_var*,
 | 
			
		||||
#   If *short_only* is false, then:
 | 
			
		||||
#       - the *version-string* plus date and git information, is copied
 | 
			
		||||
#         into the varialbe *long_var*, in the format {version}-{date}-{hash}
 | 
			
		||||
#
 | 
			
		||||
#
 | 
			
		||||
 | 
			
		||||
function( get_git_version_info out_var )
 | 
			
		||||
    set(CMAKE_VERSION_SOURCE "")
 | 
			
		||||
    if(EXISTS ${CMAKE_SOURCE_DIR}/.git/HEAD)
 | 
			
		||||
        find_program(GIT_EXECUTABLE NAMES git git.cmd)
 | 
			
		||||
        mark_as_advanced(GIT_EXECUTABLE)
 | 
			
		||||
        if(GIT_EXECUTABLE)
 | 
			
		||||
            execute_process(
 | 
			
		||||
                COMMAND ${GIT_EXECUTABLE} rev-parse --verify -q --short=8 HEAD
 | 
			
		||||
                OUTPUT_VARIABLE head
 | 
			
		||||
                OUTPUT_STRIP_TRAILING_WHITESPACE
 | 
			
		||||
                WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
 | 
			
		||||
            )
 | 
			
		||||
            if(head)
 | 
			
		||||
                set(CMAKE_VERSION_SOURCE "${head}")
 | 
			
		||||
                execute_process(
 | 
			
		||||
                    COMMAND ${GIT_EXECUTABLE} update-index -q --refresh
 | 
			
		||||
                    WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
 | 
			
		||||
                )
 | 
			
		||||
                execute_process(
 | 
			
		||||
                    COMMAND ${GIT_EXECUTABLE} diff-index --name-only HEAD --
 | 
			
		||||
                    OUTPUT_VARIABLE dirty
 | 
			
		||||
                    OUTPUT_STRIP_TRAILING_WHITESPACE
 | 
			
		||||
                    WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
 | 
			
		||||
                )
 | 
			
		||||
                if(dirty)
 | 
			
		||||
                    set(CMAKE_VERSION_SOURCE "${CMAKE_VERSION_SOURCE}-dirty")
 | 
			
		||||
                endif()
 | 
			
		||||
            endif()
 | 
			
		||||
        endif()
 | 
			
		||||
    endif()
 | 
			
		||||
    set( ${out_var} "${CMAKE_VERSION_SOURCE}" PARENT_SCOPE )
 | 
			
		||||
endfunction()
 | 
			
		||||
 | 
			
		||||
function( extend_version version short_only short_var long_var )
 | 
			
		||||
    set( ${short_var} "${version}" PARENT_SCOPE )
 | 
			
		||||
    set( _v "${version}" )
 | 
			
		||||
    if ( NOT short_only )
 | 
			
		||||
        # Additional info for non-release builds which want "long" version info
 | 
			
		||||
        # with date and git information (commit, dirty status). That 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.
 | 
			
		||||
        string( TIMESTAMP CALAMARES_VERSION_DATE "%Y%m%d" )
 | 
			
		||||
        if( CALAMARES_VERSION_DATE GREATER 0 )
 | 
			
		||||
            set( _v ${_v}.${CALAMARES_VERSION_DATE} )
 | 
			
		||||
        endif()
 | 
			
		||||
        get_git_version_info( _gitv )
 | 
			
		||||
        if( _gitv )
 | 
			
		||||
            set( _v "${_v}-${_gitv}" )
 | 
			
		||||
        endif()
 | 
			
		||||
    endif()
 | 
			
		||||
    set( ${long_var} "${_v}" PARENT_SCOPE )
 | 
			
		||||
endfunction()
 | 
			
		||||
@@ -1,11 +1,3 @@
 | 
			
		||||
# === 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
 | 
			
		||||
 
 | 
			
		||||
@@ -1,5 +1,4 @@
 | 
			
		||||
# SPDX-FileCopyrightText: 2008,2010,2011 by Volker Lanz <vl@fidra.de>
 | 
			
		||||
# SPDX-License-Identifier: BSD-2-Clause
 | 
			
		||||
# Copyright (C) 2008,2010,2011 by Volker Lanz <vl@fidra.de>
 | 
			
		||||
#
 | 
			
		||||
# Redistribution and use in source and binary forms, with or without
 | 
			
		||||
# modification, are permitted provided that the following conditions
 | 
			
		||||
@@ -45,7 +44,7 @@ else (LIBPARTED_FS_RESIZE_LIBRARY)
 | 
			
		||||
  set(LIBPARTED_LIBS ${LIBPARTED_LIBRARY})
 | 
			
		||||
endif (LIBPARTED_FS_RESIZE_LIBRARY)
 | 
			
		||||
 | 
			
		||||
# KDE adds -ansi to the C make flags, parted headers use GNU extensions, so
 | 
			
		||||
# KDE adds -ansi to the C make flags, parted headers use GNU extensions, so 
 | 
			
		||||
# undo that
 | 
			
		||||
unset(CMAKE_C_FLAGS)
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -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,18 +1,7 @@
 | 
			
		||||
# === 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)
 | 
			
		||||
@@ -20,101 +9,30 @@ 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.")
 | 
			
		||||
  find_path(PYTHONQT_INSTALL_DIR include/PythonQt/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"
 | 
			
		||||
  PATHS "${PYTHONQT_INSTALL_DIR}/include/PythonQt"
 | 
			
		||||
        "${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()
 | 
			
		||||
  DOC "Path to the PythonQt include directory")
 | 
			
		||||
 | 
			
		||||
# 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)."
 | 
			
		||||
)
 | 
			
		||||
find_library(PYTHONQT_LIBRARY_RELEASE PythonQt PATHS "${PYTHONQT_INSTALL_DIR}/lib" DOC "The PythonQt library.")
 | 
			
		||||
find_library(PYTHONQT_LIBRARY_DEBUG NAMES PythonQt${CTK_CMAKE_DEBUG_POSTFIX} PythonQt${CMAKE_DEBUG_POSTFIX} PythonQt PATHS "${PYTHONQT_INSTALL_DIR}/lib" DOC "The PythonQt library.")
 | 
			
		||||
find_library(PYTHONQT_QTALL_LIBRARY_RELEASE PythonQt_QtAll PATHS "${PYTHONQT_INSTALL_DIR}/lib" DOC "Full Qt bindings for the PythonQt library.")
 | 
			
		||||
find_library(PYTHONQT_QTALL_LIBRARY_DEBUG NAMES 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.")
 | 
			
		||||
 | 
			
		||||
# Also check for v3.2+
 | 
			
		||||
find_library(PYTHONQT_LIBRARY_RELEASE PythonQt-Qt5-Python3 PATHS "${PYTHONQT_INSTALL_DIR}/lib" DOC "The PythonQt library.")
 | 
			
		||||
find_library(PYTHONQT_LIBRARY_DEBUG NAMES PythonQt-Qt5-Python3${CTK_CMAKE_DEBUG_POSTFIX} PythonQt-Qt5-Python3${CMAKE_DEBUG_POSTFIX} PythonQt-Qt5-Python3 PATHS "${PYTHONQT_INSTALL_DIR}/lib" DOC "The PythonQt library.")
 | 
			
		||||
find_library(PYTHONQT_QTALL_LIBRARY_RELEASE PythonQt_QtAll-Qt5-Python3 PATHS "${PYTHONQT_INSTALL_DIR}/lib" DOC "Full Qt bindings for the PythonQt library.")
 | 
			
		||||
find_library(PYTHONQT_QTALL_LIBRARY_DEBUG NAMES PythonQt_QtAll-Qt5-Python3${CTK_CMAKE_DEBUG_POSTFIX} PythonQt_QtAll-Qt5-Python3${CMAKE_DEBUG_POSTFIX} PythonQt_QtAll-Qt5-Python3 PATHS "${PYTHONQT_INSTALL_DIR}/lib" DOC "Full Qt bindings for the PythonQt library.")
 | 
			
		||||
 | 
			
		||||
set(PYTHONQT_LIBRARY)
 | 
			
		||||
if(PYTHONQT_LIBRARY_RELEASE)
 | 
			
		||||
@@ -132,16 +50,6 @@ 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)
 | 
			
		||||
@@ -166,20 +74,4 @@ if(PYTHONQT_INCLUDE_DIR AND PYTHONQT_LIBRARY AND PYTHONQT_QTALL_LIBRARY)
 | 
			
		||||
  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
 | 
			
		||||
#  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 ...).
 | 
			
		||||
@@ -21,10 +11,6 @@
 | 
			
		||||
# If yaml-cpp is not installed in a standard path, you can use the YAMLCPP_DIR CMake variable
 | 
			
		||||
# to tell CMake where yaml-cpp is.
 | 
			
		||||
 | 
			
		||||
if(TARGET yamlcpp::yamlcpp)
 | 
			
		||||
    return()
 | 
			
		||||
endif()
 | 
			
		||||
 | 
			
		||||
# attempt to find static library first if this is set
 | 
			
		||||
if(YAMLCPP_STATIC_LIBRARY)
 | 
			
		||||
    set(YAMLCPP_STATIC libyaml-cpp.a)
 | 
			
		||||
@@ -62,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::yamlcpp UNKNOWN IMPORTED )
 | 
			
		||||
    set_property( TARGET yamlcpp::yamlcpp PROPERTY IMPORTED_LOCATION ${YAMLCPP_LIBRARY} )
 | 
			
		||||
    if ( YAMLCPP_INCLUDE_DIR )
 | 
			
		||||
        set_property( TARGET yamlcpp::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()
 | 
			
		||||
							
								
								
									
										17
									
								
								CMakeModules/IncludeKPMCore.cmake
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										17
									
								
								CMakeModules/IncludeKPMCore.cmake
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,17 @@
 | 
			
		||||
# Shared CMake core for finding KPMCore
 | 
			
		||||
#
 | 
			
		||||
# This is wrapped into a CMake include file because there's a bunch of
 | 
			
		||||
# pre-requisites that need searching for before looking for KPMCore.
 | 
			
		||||
# If you just do find_package( KPMCore ) without finding the things
 | 
			
		||||
# it links against first, you get CMake errors.
 | 
			
		||||
#
 | 
			
		||||
#
 | 
			
		||||
find_package(ECM 5.10.0 REQUIRED NO_MODULE)
 | 
			
		||||
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${CMAKE_MODULE_PATH})
 | 
			
		||||
 | 
			
		||||
include(KDEInstallDirs)
 | 
			
		||||
include(GenerateExportHeader)
 | 
			
		||||
find_package( KF5 REQUIRED CoreAddons )
 | 
			
		||||
find_package( KF5 REQUIRED Config I18n IconThemes KIO Service )
 | 
			
		||||
 | 
			
		||||
find_package( KPMcore 3.0.3 REQUIRED )
 | 
			
		||||
@@ -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()
 | 
			
		||||
							
								
								
									
										121
									
								
								CONTRIBUTING.md
									
									
									
									
									
								
							
							
						
						
									
										121
									
								
								CONTRIBUTING.md
									
									
									
									
									
								
							@@ -1,121 +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 in a [Matrix](https://matrix.org/)
 | 
			
		||||
room, `#calamares:kde.org`. The conversation is bridged with IRC
 | 
			
		||||
on [Libera.Chat](https://libera.chat/).
 | 
			
		||||
Responsiveness is best during the day
 | 
			
		||||
in Europe, but feel free to idle. If you use IRC, **DO NOT** ask-and-leave. Keep
 | 
			
		||||
that chat window open because it can easily take a few hours for
 | 
			
		||||
someone to notice a message.
 | 
			
		||||
Matrix is persistent, and we'll see your message eventually.
 | 
			
		||||
 | 
			
		||||
* [](https://webchat.kde.org/#/room/%23calamares:kde.org)
 | 
			
		||||
* [](https://kiwiirc.com/client/irc.libera.chat/#calamares)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
## 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.
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										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,91 +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)
 | 
			
		||||
if (NOT TARGET Calamares::calamares OR NOT TARGET Calamares::calamaresui)
 | 
			
		||||
    message(FATAL_ERROR "Calamares found with missing CMake targets")
 | 
			
		||||
# 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()
 | 
			
		||||
 | 
			
		||||
# Need various CMake files that are installed alongside this one.
 | 
			
		||||
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR})
 | 
			
		||||
# Our library dependencies (contains definitions for IMPORTED targets)
 | 
			
		||||
include("${CALAMARES_CMAKE_DIR}/CalamaresLibraryDepends.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()
 | 
			
		||||
endif()
 | 
			
		||||
 | 
			
		||||
find_package(YAMLCPP REQUIRED)
 | 
			
		||||
 | 
			
		||||
### Legacy support
 | 
			
		||||
#
 | 
			
		||||
#
 | 
			
		||||
set(Calamares_LIB_DIRS "@PACKAGE_CMAKE_INSTALL_LIBDIR@")
 | 
			
		||||
set(Calamares_INCLUDE_DIRS "@PACKAGE_CMAKE_INSTALL_INCLUDEDIR@")
 | 
			
		||||
set(Calamares_LIBRARIES Calamares::calamares)
 | 
			
		||||
 | 
			
		||||
### CMake support
 | 
			
		||||
#
 | 
			
		||||
#
 | 
			
		||||
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()
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										2
									
								
								Dockerfile
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										2
									
								
								Dockerfile
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,2 @@
 | 
			
		||||
FROM kdeneon/all:user
 | 
			
		||||
RUN sudo apt-get update && 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 
 | 
			
		||||
@@ -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.
 | 
			
		||||
							
								
								
									
										16
									
								
								LICENSES/GPLv3+-ImageRegistry
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										16
									
								
								LICENSES/GPLv3+-ImageRegistry
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,16 @@
 | 
			
		||||
/*
 | 
			
		||||
 *   Copyright 2012, Christian Muehlhaeuser <muesli@tomahawk-player.org>
 | 
			
		||||
 | 
			
		||||
    This program 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.
 | 
			
		||||
 | 
			
		||||
    This program 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 this program.  If not, see <http://www.gnu.org/licenses/>.
 | 
			
		||||
*/
 | 
			
		||||
							
								
								
									
										18
									
								
								LICENSES/GPLv3+-QJsonModel
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										18
									
								
								LICENSES/GPLv3+-QJsonModel
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,18 @@
 | 
			
		||||
/***********************************************
 | 
			
		||||
    Copyright (C) 2014  Schutz Sacha
 | 
			
		||||
    This file is part of QJsonModel (https://github.com/dridk/QJsonmodel).
 | 
			
		||||
 | 
			
		||||
    QJsonModel 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.
 | 
			
		||||
 | 
			
		||||
    QJsonModel 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 QJsonModel.  If not, see <http://www.gnu.org/licenses/>.
 | 
			
		||||
 | 
			
		||||
**********************************************/
 | 
			
		||||
@@ -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.
 | 
			
		||||
							
								
								
									
										83
									
								
								LICENSES/LGPLv2.1-Presentation
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										83
									
								
								LICENSES/LGPLv2.1-Presentation
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,83 @@
 | 
			
		||||
/****************************************************************************
 | 
			
		||||
**
 | 
			
		||||
** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
 | 
			
		||||
** Contact: http://www.qt-project.org/legal
 | 
			
		||||
**
 | 
			
		||||
** This file is part of the QML Presentation System.
 | 
			
		||||
**
 | 
			
		||||
** $QT_BEGIN_LICENSE:LGPL$
 | 
			
		||||
** Commercial License Usage
 | 
			
		||||
** Licensees holding valid commercial Qt licenses may use this file in
 | 
			
		||||
** accordance with the commercial license agreement provided with the
 | 
			
		||||
** Software or, alternatively, in accordance with the terms contained in
 | 
			
		||||
** a written agreement between you and Digia.  For licensing terms and
 | 
			
		||||
** conditions see http://qt.digia.com/licensing.  For further information
 | 
			
		||||
** use the contact form at http://qt.digia.com/contact-us.
 | 
			
		||||
**
 | 
			
		||||
** GNU Lesser General Public License Usage
 | 
			
		||||
** Alternatively, this file may be used under the terms of the GNU Lesser
 | 
			
		||||
** General Public License version 2.1 as published by the Free Software
 | 
			
		||||
** Foundation and appearing in the file LICENSE.LGPL included in the
 | 
			
		||||
** packaging of this file.  Please review the following information to
 | 
			
		||||
** ensure the GNU Lesser General Public License version 2.1 requirements
 | 
			
		||||
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
 | 
			
		||||
**
 | 
			
		||||
** In addition, as a special exception, Digia gives you certain additional
 | 
			
		||||
** rights.  These rights are described in the Digia Qt LGPL Exception
 | 
			
		||||
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
 | 
			
		||||
**
 | 
			
		||||
** GNU General Public License Usage
 | 
			
		||||
** Alternatively, this file may be used under the terms of the GNU
 | 
			
		||||
** General Public License version 3.0 as published by the Free Software
 | 
			
		||||
** Foundation and appearing in the file LICENSE.GPL included in the
 | 
			
		||||
** packaging of this file.  Please review the following information to
 | 
			
		||||
** ensure the GNU General Public License version 3.0 requirements will be
 | 
			
		||||
** met: http://www.gnu.org/copyleft/gpl.html.
 | 
			
		||||
**
 | 
			
		||||
**
 | 
			
		||||
** $QT_END_LICENSE$
 | 
			
		||||
**
 | 
			
		||||
****************************************************************************/
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/****************************************************************************
 | 
			
		||||
**
 | 
			
		||||
** Copyright (C) 2016 The Qt Company Ltd.
 | 
			
		||||
** Contact: https://www.qt.io/licensing/
 | 
			
		||||
**
 | 
			
		||||
** This file is part of the QML Presentation System.
 | 
			
		||||
**
 | 
			
		||||
** $QT_BEGIN_LICENSE:LGPL$
 | 
			
		||||
** Commercial License Usage
 | 
			
		||||
** Licensees holding valid commercial Qt licenses may use this file in
 | 
			
		||||
** accordance with the commercial license agreement provided with the
 | 
			
		||||
** Software or, alternatively, in accordance with the terms contained in
 | 
			
		||||
** a written agreement between you and Digia.  For licensing terms and
 | 
			
		||||
** conditions see http://qt.digia.com/licensing.  For further information
 | 
			
		||||
** use the contact form at http://qt.digia.com/contact-us.
 | 
			
		||||
**
 | 
			
		||||
** GNU Lesser General Public License Usage
 | 
			
		||||
** Alternatively, this file may be used under the terms of the GNU Lesser
 | 
			
		||||
** General Public License version 2.1 as published by the Free Software
 | 
			
		||||
** Foundation and appearing in the file LICENSE.LGPL included in the
 | 
			
		||||
** packaging of this file.  Please review the following information to
 | 
			
		||||
** ensure the GNU Lesser General Public License version 2.1 requirements
 | 
			
		||||
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
 | 
			
		||||
**
 | 
			
		||||
** In addition, as a special exception, Digia gives you certain additional
 | 
			
		||||
** rights.  These rights are described in the Digia Qt LGPL Exception
 | 
			
		||||
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
 | 
			
		||||
**
 | 
			
		||||
** GNU General Public License Usage
 | 
			
		||||
** Alternatively, this file may be used under the terms of the GNU
 | 
			
		||||
** General Public License version 3.0 as published by the Free Software
 | 
			
		||||
** Foundation and appearing in the file LICENSE.GPL included in the
 | 
			
		||||
** packaging of this file.  Please review the following information to
 | 
			
		||||
** ensure the GNU General Public License version 3.0 requirements will be
 | 
			
		||||
** met: http://www.gnu.org/copyleft/gpl.html.
 | 
			
		||||
**
 | 
			
		||||
**
 | 
			
		||||
** $QT_END_LICENSE$
 | 
			
		||||
**
 | 
			
		||||
****************************************************************************/
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										22
									
								
								LICENSES/LGPLv2.1-Presentation-Exception
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										22
									
								
								LICENSES/LGPLv2.1-Presentation-Exception
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,22 @@
 | 
			
		||||
Digia Qt LGPL Exception version 1.1
 | 
			
		||||
 | 
			
		||||
As an additional permission to the GNU Lesser General Public License version
 | 
			
		||||
2.1, the object code form of a "work that uses the Library" may incorporate
 | 
			
		||||
material from a header file that is part of the Library.  You may distribute
 | 
			
		||||
such object code under terms of your choice, provided that:
 | 
			
		||||
    (i)   the header files of the Library have not been modified; and 
 | 
			
		||||
    (ii)  the incorporated material is limited to numerical parameters, data
 | 
			
		||||
          structure layouts, accessors, macros, inline functions and
 | 
			
		||||
          templates; and
 | 
			
		||||
    (iii) you comply with the terms of Section 6 of the GNU Lesser General
 | 
			
		||||
          Public License version 2.1.
 | 
			
		||||
 | 
			
		||||
Moreover, you may apply this exception to a modified version of the Library,
 | 
			
		||||
provided that such modification does not involve copying material from the
 | 
			
		||||
Library into the modified Library's header files unless such material is
 | 
			
		||||
limited to (i) numerical parameters; (ii) data structure layouts;
 | 
			
		||||
(iii) accessors; and (iv) small macros, templates and inline functions of
 | 
			
		||||
five lines or less in length.
 | 
			
		||||
 | 
			
		||||
Furthermore, you are not required to apply this additional permission to a
 | 
			
		||||
modified version of the Library.
 | 
			
		||||
							
								
								
									
										21
									
								
								LICENSES/MIT-QtWaitingSpinner
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										21
									
								
								LICENSES/MIT-QtWaitingSpinner
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,21 @@
 | 
			
		||||
The MIT License (MIT)
 | 
			
		||||
 | 
			
		||||
Original Work Copyright (c) 2012-2015 Alexander Turkin
 | 
			
		||||
Modified 2014 by William Hallatt
 | 
			
		||||
 | 
			
		||||
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.
 | 
			
		||||
@@ -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.
 | 
			
		||||
							
								
								
									
										91
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										91
									
								
								README.md
									
									
									
									
									
								
							@@ -1,69 +1,40 @@
 | 
			
		||||
<!-- SPDX-FileCopyrightText: no
 | 
			
		||||
     SPDX-License-Identifier: CC0-1.0
 | 
			
		||||
-->
 | 
			
		||||
 | 
			
		||||
# Calamares: Distribution-Independent Installer Framework
 | 
			
		||||
### Calamares: Distribution-Independent Installer Framework
 | 
			
		||||
---------
 | 
			
		||||
 | 
			
		||||
[](https://github.com/calamares/calamares/labels/hacking%3A%20in-progress)
 | 
			
		||||
[](https://github.com/calamares/calamares/releases)
 | 
			
		||||
[](https://github.com/calamares/calamares/actions?query=workflow%3Aci)
 | 
			
		||||
[](https://github.com/calamares/calamares/blob/calamares/LICENSES/GPL-3.0-or-later.txt)
 | 
			
		||||
[](https://calamares.io/ci/job/calamares-post_commit/)
 | 
			
		||||
[](https://travis-ci.org/calamares/calamares)
 | 
			
		||||
[](https://scan.coverity.com/projects/5389)
 | 
			
		||||
[](https://github.com/calamares/calamares/blob/master/LICENSE)
 | 
			
		||||
 | 
			
		||||
| [Report a Bug](https://github.com/calamares/calamares/issues/new) | [Contribute](https://github.com/calamares/calamares/blob/master/ci/HACKING.md) | [Translate](https://www.transifex.com/projects/p/calamares/) | Freenode (IRC): #calamares | [Wiki](https://github.com/calamares/calamares/wiki) |
 | 
			
		||||
|:-----------------------------------------:|:----------------------:|:-----------------------:|:--------------------------:|:--------------------------:|
 | 
			
		||||
 | 
			
		||||
| [Report a Bug](https://github.com/calamares/calamares/issues/new) | [Translate](https://www.transifex.com/projects/p/calamares/) | [Contribute](CONTRIBUTING.md) | [Matrix: #calamares:kde.org](https://webchat.kde.org/#/room/%23calamares:kde.org) | [IRC: Libera.Chat #calamares](https://kiwiirc.com/client/irc.libera.chat/#calamares) | [Wiki](https://github.com/calamares/calamares/wiki) |
 | 
			
		||||
|:--:|:--:|:--:|:--:|:--:|:--:|
 | 
			
		||||
### Dependencies
 | 
			
		||||
 | 
			
		||||
Main:
 | 
			
		||||
* Compiler with C++11 support: GCC >= 4.9.0 or Clang >= 3.5.1
 | 
			
		||||
* CMake >= 3.2
 | 
			
		||||
* Qt >= 5.6
 | 
			
		||||
* yaml-cpp >= 0.5.1
 | 
			
		||||
* Python >= 3.3
 | 
			
		||||
* Boost.Python >= 1.55.0
 | 
			
		||||
* dmidecode
 | 
			
		||||
 | 
			
		||||
> 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.
 | 
			
		||||
Modules:
 | 
			
		||||
* welcome:
 | 
			
		||||
  * NetworkManager
 | 
			
		||||
  * UPower
 | 
			
		||||
* partition:
 | 
			
		||||
  * extra-cmake-modules
 | 
			
		||||
  * KF5: KCoreAddons, KConfig, KI18n, KIconThemes, KIO, KService
 | 
			
		||||
  * KPMcore >= 3.0.3
 | 
			
		||||
* bootloader:
 | 
			
		||||
  * systemd-boot or GRUB
 | 
			
		||||
* unpackfs:
 | 
			
		||||
  * squashfs-tools
 | 
			
		||||
  * rsync
 | 
			
		||||
 | 
			
		||||
## Target Audience
 | 
			
		||||
### Building
 | 
			
		||||
 | 
			
		||||
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://calamares.io/docs/users-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*.
 | 
			
		||||
 | 
			
		||||
```
 | 
			
		||||
git clone https://github.com/calamares/calamares.git
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
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 in a [Matrix](https://matrix.org/)
 | 
			
		||||
room, `#calamares:kde.org`. The conversation is bridged with IRC
 | 
			
		||||
on [Libera.Chat](https://libera.chat/).
 | 
			
		||||
Responsiveness is best during the day
 | 
			
		||||
in Europe, but feel free to idle. If you use IRC, **DO NOT** ask-and-leave. Keep
 | 
			
		||||
that chat window open because it can easily take a few hours for
 | 
			
		||||
someone to notice a message.
 | 
			
		||||
Matrix is persistent, and we'll see your message eventually.
 | 
			
		||||
 | 
			
		||||
* [](https://webchat.kde.org/#/room/%23calamares:kde.org) (needs a Matrix account)
 | 
			
		||||
* [](https://kiwiirc.com/client/irc.libera.chat/#calamares) (IRC supports guest accounts)
 | 
			
		||||
See [wiki](https://github.com/calamares/calamares/wiki) for up to date building and deployment instructions.
 | 
			
		||||
 
 | 
			
		||||
@@ -1,243 +1,115 @@
 | 
			
		||||
[Desktop Entry]
 | 
			
		||||
Type=Application
 | 
			
		||||
Version=1.0
 | 
			
		||||
Name=Install System
 | 
			
		||||
Name=Calamares
 | 
			
		||||
GenericName=System Installer
 | 
			
		||||
Keywords=calamares;system;installer;
 | 
			
		||||
Keywords=calamares;system;installer
 | 
			
		||||
TryExec=calamares
 | 
			
		||||
Exec=sh -c "pkexec calamares"
 | 
			
		||||
Exec=pkexec /usr/bin/calamares
 | 
			
		||||
Comment=Calamares — System Installer
 | 
			
		||||
Icon=calamares
 | 
			
		||||
Terminal=false
 | 
			
		||||
StartupNotify=true
 | 
			
		||||
Categories=Qt;System;
 | 
			
		||||
X-AppStream-Ignore=true
 | 
			
		||||
 | 
			
		||||
Name[ar]=تثبيت النظام 
 | 
			
		||||
Icon[ar]=كالامارس
 | 
			
		||||
GenericName[ar]=مثبت النظام
 | 
			
		||||
Comment[ar]=كالامارس - مثبت النظام
 | 
			
		||||
Name[as]=চিছটেম ইনস্তল কৰক
 | 
			
		||||
Icon[as]=কেলামাৰেচ
 | 
			
		||||
GenericName[as]=চিছটেম ইনস্তলাৰ
 | 
			
		||||
Comment[as]=কেলামাৰেচ — চিছটেম ইনস্তলাৰ
 | 
			
		||||
Name[ast]=Instalar el sistema
 | 
			
		||||
Icon[ast]=calamares
 | 
			
		||||
GenericName[ast]=Instalador del sistema
 | 
			
		||||
Comment[ast]=Calamares — Instalador del sistema
 | 
			
		||||
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[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[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
 | 
			
		||||
 | 
			
		||||
Name[ca]=Calamares
 | 
			
		||||
Icon[ca]=calamares
 | 
			
		||||
GenericName[ca]=Instal·lador de sistema
 | 
			
		||||
Comment[ca]=Calamares — Instal·lador de sistema
 | 
			
		||||
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[da]=Installér system
 | 
			
		||||
Name[da]=Calamares
 | 
			
		||||
Icon[da]=calamares
 | 
			
		||||
GenericName[da]=Systeminstallationsprogram
 | 
			
		||||
Comment[da]=Calamares — Systeminstallationsprogram
 | 
			
		||||
Name[de]=System installieren
 | 
			
		||||
Name[de]=Calamares
 | 
			
		||||
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
 | 
			
		||||
Name[en_GB]=Calamares
 | 
			
		||||
Icon[en_GB]=calamares
 | 
			
		||||
GenericName[en_GB]=System Installer
 | 
			
		||||
Comment[en_GB]=Calamares — System Installer
 | 
			
		||||
Name[eo]=Instali Sistemo
 | 
			
		||||
Icon[eo]=calamares
 | 
			
		||||
GenericName[eo]=Sistema Instalilo
 | 
			
		||||
Comment[eo]=Calamares — Sistema Instalilo
 | 
			
		||||
Name[es]=Instalar el sistema
 | 
			
		||||
Name[es]=Calamares
 | 
			
		||||
Icon[es]=calamares
 | 
			
		||||
GenericName[es]=Instalador del sistema
 | 
			
		||||
Comment[es]=Calamares — Instalador del sistema
 | 
			
		||||
Name[es_MX]=Instalar el Sistema
 | 
			
		||||
Icon[es_MX]=calamares
 | 
			
		||||
GenericName[es_MX]=Instalador del sistema
 | 
			
		||||
Comment[es_MX]=Calamares - Instalador del sistema
 | 
			
		||||
Name[es_PR]=Instalar el 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[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[fr]=Installer le système
 | 
			
		||||
GenericName[es]=Instalador del Sistema
 | 
			
		||||
Comment[es]=Calamares — Instalador del Sistema
 | 
			
		||||
Name[fr]=Calamares
 | 
			
		||||
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
 | 
			
		||||
Name[he]=קלמארס
 | 
			
		||||
Icon[he]=קלמארס
 | 
			
		||||
GenericName[he]=אשף התקנה
 | 
			
		||||
Comment[he]=Calamares - אשף התקנה
 | 
			
		||||
Name[hi]=सिस्टम इंस्टॉल करें
 | 
			
		||||
Icon[hi]=calamares
 | 
			
		||||
GenericName[hi]=सिस्टम इंस्टॉलर
 | 
			
		||||
Comment[hi]=Calamares — सिस्टम इंस्टॉलर
 | 
			
		||||
Name[hr]=Instaliraj sustav
 | 
			
		||||
Comment[he]=קלמארס - אשף התקנה
 | 
			
		||||
Name[hr]=Calamares
 | 
			
		||||
Icon[hr]=calamares
 | 
			
		||||
GenericName[hr]=Instalacija sustava
 | 
			
		||||
Comment[hr]=Calamares — Instalacija sustava
 | 
			
		||||
Name[hu]=Rendszer telepítése
 | 
			
		||||
Name[hu]=Calamares
 | 
			
		||||
Icon[hu]=calamares
 | 
			
		||||
GenericName[hu]=Rendszertelepítő
 | 
			
		||||
Comment[hu]=Calamares – Rendszertelepítő
 | 
			
		||||
Name[id]=Instal Sistem
 | 
			
		||||
GenericName[hu]=Rendszer Telepítő
 | 
			
		||||
Comment[hu]=Calamares — Rendszer Telepítő
 | 
			
		||||
Name[id]=Calamares
 | 
			
		||||
Icon[id]=calamares
 | 
			
		||||
GenericName[id]=Pemasang
 | 
			
		||||
Comment[id]=Calamares — Pemasang Sistem
 | 
			
		||||
Name[ie]=Installar li sistema
 | 
			
		||||
Icon[ie]=calamares
 | 
			
		||||
GenericName[ie]=Installator del sistema
 | 
			
		||||
Comment[ie]=Calamares — Installator del sistema
 | 
			
		||||
Name[is]=Setja upp kerfið
 | 
			
		||||
Name[is]=Calamares
 | 
			
		||||
Icon[is]=calamares
 | 
			
		||||
GenericName[is]=Kerfis uppsetning
 | 
			
		||||
Comment[is]=Calamares — Kerfis uppsetning
 | 
			
		||||
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[ja]=システムをインストール
 | 
			
		||||
Name[ja]=Calamares
 | 
			
		||||
Icon[ja]=calamares
 | 
			
		||||
GenericName[ja]=システムインストーラー
 | 
			
		||||
Comment[ja]=Calamares — システムインストーラー
 | 
			
		||||
Name[ko]=시스템 설치
 | 
			
		||||
Icon[ko]=깔라마레스
 | 
			
		||||
GenericName[ko]=시스템 설치 관리자
 | 
			
		||||
Comment[ko]=깔라마레스 — 시스템 설치 관리자
 | 
			
		||||
Name[lt]=Įdiegti Sistemą
 | 
			
		||||
Name[lt]=Calamares
 | 
			
		||||
Icon[lt]=calamares
 | 
			
		||||
GenericName[lt]=Sistemos diegimas į kompiuterį
 | 
			
		||||
Comment[lt]=Calamares — Sistemos diegimo programa
 | 
			
		||||
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[ne_NP]= सिस्टम इन्स्टल गर्नुहोस्
 | 
			
		||||
Icon[ne_NP]=Calamares
 | 
			
		||||
GenericName[ne_NP]=सिस्टम इन्स्टलर
 | 
			
		||||
Comment[ne_NP]=Calamares - सिस्टम इन्स्टलर
 | 
			
		||||
Name[nl]=Installeer systeem
 | 
			
		||||
Comment[lt]=Calamares — sistemos diegyklė
 | 
			
		||||
Name[nl]=Calamares
 | 
			
		||||
Icon[nl]=calamares
 | 
			
		||||
GenericName[nl]=Installatieprogramma
 | 
			
		||||
Comment[nl]=Calamares — Installatieprogramma
 | 
			
		||||
Name[pl]=Zainstaluj system
 | 
			
		||||
Name[pl]=Calamares
 | 
			
		||||
Icon[pl]=calamares
 | 
			
		||||
GenericName[pl]=Instalator systemu
 | 
			
		||||
Comment[pl]=Calamares — Instalator systemu
 | 
			
		||||
Name[pt_BR]=Sistema de Instalação
 | 
			
		||||
Name[pt_BR]=Calamares
 | 
			
		||||
Icon[pt_BR]=calamares
 | 
			
		||||
GenericName[pt_BR]=Instalador de Sistema
 | 
			
		||||
Comment[pt_BR]=Calamares — Instalador de Sistema
 | 
			
		||||
Name[pt_PT]=Instalar Sistema
 | 
			
		||||
Icon[pt_PT]=calamares
 | 
			
		||||
GenericName[pt_PT]=Instalador de Sistema
 | 
			
		||||
Comment[pt_PT]=Instalador de Sistema - Calamares
 | 
			
		||||
Name[ro]=Instalează sistemul
 | 
			
		||||
Icon[ro]=calamares
 | 
			
		||||
GenericName[ro]=Instalator de sistem
 | 
			
		||||
Comment[ro]=Calamares — Instalator de sistem
 | 
			
		||||
Name[ru]=Установить систему
 | 
			
		||||
Name[cs_CZ]=Calamares
 | 
			
		||||
Icon[cs_CZ]=calamares
 | 
			
		||||
GenericName[cs_CZ]=Instalační program systému
 | 
			
		||||
Comment[cs_CZ]=Calamares - instalační program systému
 | 
			
		||||
Name[ru]=Calamares
 | 
			
		||||
Icon[ru]=calamares
 | 
			
		||||
GenericName[ru]=Установщик системы
 | 
			
		||||
Comment[ru]=Calamares - Установщик системы
 | 
			
		||||
Name[si]=පද්ධතිය ස්ථාපනය කරන්න
 | 
			
		||||
Icon[si]=කැලමරේස්
 | 
			
		||||
GenericName[si]=පද්ධති ස්ථාපකය
 | 
			
		||||
Comment[si]=Calamares - පද්ධති ස්ථාපකය
 | 
			
		||||
Name[sk]=Inštalovať systém
 | 
			
		||||
Name[sk]=Calamares
 | 
			
		||||
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[sr]=Инсталирај систем
 | 
			
		||||
Icon[sr]=calamares
 | 
			
		||||
GenericName[sr]=Инсталатер система
 | 
			
		||||
Comment[sr]=Каламарес — инсталатер система
 | 
			
		||||
Name[sr@latin]=Instaliraj sistem
 | 
			
		||||
Name[sv]=Installera system
 | 
			
		||||
Name[sv]=Calamares
 | 
			
		||||
Icon[sv]=calamares
 | 
			
		||||
GenericName[sv]=Systeminstallerare
 | 
			
		||||
Comment[sv]=Calamares — Systeminstallerare
 | 
			
		||||
Name[tg]=Насбкунии низом
 | 
			
		||||
Icon[tg]=calamares
 | 
			
		||||
GenericName[tg]=Насбкунандаи низомӣ
 | 
			
		||||
Comment[tg]=Calamares — Насбкунандаи низомӣ
 | 
			
		||||
Name[th]=ติดตั้งระบบ
 | 
			
		||||
Name[tr_TR]=Sistemi Yükle
 | 
			
		||||
Icon[tr_TR]=calamares
 | 
			
		||||
GenericName[tr_TR]=Sistem Yükleyici
 | 
			
		||||
Comment[tr_TR]=Calamares — Sistem Yükleyici
 | 
			
		||||
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]=安装系统
 | 
			
		||||
Name[zh_CN]=Calamares
 | 
			
		||||
Icon[zh_CN]=calamares
 | 
			
		||||
GenericName[zh_CN]=系统安装程序
 | 
			
		||||
Comment[zh_CN]=Calamares — 系统安装程序
 | 
			
		||||
Name[zh_TW]=安裝系統
 | 
			
		||||
Name[zh_TW]=Calamares
 | 
			
		||||
Icon[zh_TW]=calamares
 | 
			
		||||
GenericName[zh_TW]=系統安裝程式
 | 
			
		||||
Comment[zh_TW]=Calamares ── 系統安裝程式
 | 
			
		||||
Name[ast]=Calamares
 | 
			
		||||
Icon[ast]=calamares
 | 
			
		||||
GenericName[ast]=Instalador del sistema
 | 
			
		||||
Comment[ast]=Calamares — Instalador del sistema
 | 
			
		||||
Name[pt_PT]=Calamares
 | 
			
		||||
Icon[pt_PT]=calamares
 | 
			
		||||
GenericName[pt_PT]=Instalador de Sistema
 | 
			
		||||
Comment[pt_PT]=Calamares - Instalador de Sistema
 | 
			
		||||
Name[tr_TR]=Calamares
 | 
			
		||||
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=sh -c "pkexec 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
 | 
			
		||||
							
								
								
									
										169
									
								
								ci/HACKING.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										169
									
								
								ci/HACKING.md
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,169 @@
 | 
			
		||||
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.
 | 
			
		||||
 | 
			
		||||
Please add your name to files you touch when making any contribution (even if
 | 
			
		||||
it's just a typo-fix which might not be copyrightable in all jurisdictions).
 | 
			
		||||
 | 
			
		||||
Formatting
 | 
			
		||||
----------
 | 
			
		||||
 | 
			
		||||
This formatting guide applies to C++ code only; for Python modules, we use
 | 
			
		||||
[pycodestyle][https://github.com/PyCQA/pycodestyle] to apply a check of
 | 
			
		||||
some PEP8 guidelines.
 | 
			
		||||
 | 
			
		||||
* 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
 | 
			
		||||
							
								
								
									
										186
									
								
								ci/RELEASE.md
									
									
									
									
									
								
							
							
						
						
									
										186
									
								
								ci/RELEASE.md
									
									
									
									
									
								
							@@ -1,41 +1,14 @@
 | 
			
		||||
# 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)
 | 
			
		||||
 | 
			
		||||
## (0) During a release cycle
 | 
			
		||||
 | 
			
		||||
* Fetch latest translations from Transifex. We only push / pull translations
 | 
			
		||||
  from *calamares* branch, 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. It's ok
 | 
			
		||||
  to do this during a release cycle. Run `sh ci/txpull.sh`
 | 
			
		||||
  to fetch translations and commit the changes in one go.
 | 
			
		||||
* Push the strings to Transifex. From a checkout, run `ci/txpush.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 --edit` for an automated
 | 
			
		||||
  suggestion. If there are changes, commit them.
 | 
			
		||||
 | 
			
		||||
## (1) Preparation
 | 
			
		||||
 | 
			
		||||
* Double-check the *CALAMARES_VERSION* value at the top of `CMakeLists.txt`.
 | 
			
		||||
* Set *CALAMARES_RELEASE_MODE* to `ON` in `CMakeLists.txt`.
 | 
			
		||||
* Edit `CHANGES-*` and set the date of the release. Pick the right
 | 
			
		||||
  file for the release-stream.
 | 
			
		||||
* Commit both. This is usually done with commit-message
 | 
			
		||||
  *Changes: pre-release housekeeping*.
 | 
			
		||||
 | 
			
		||||
## (2) Release Preparation
 | 
			
		||||
The Calamares release process
 | 
			
		||||
=============================
 | 
			
		||||
 | 
			
		||||
#### (0) A week in advance
 | 
			
		||||
* Run [Coverity scan][coverity], fix what's relevant. The Coverity scan runs
 | 
			
		||||
  automatically once a week on master.
 | 
			
		||||
* Build with clang -Weverything, fix what's relevant.
 | 
			
		||||
  ```
 | 
			
		||||
    rm -rf build ; mkdir build ; cd build
 | 
			
		||||
    CC=clang CXX=clang++ cmake .. && make
 | 
			
		||||
  ```
 | 
			
		||||
* Make sure all tests pass.
 | 
			
		||||
  ```
 | 
			
		||||
    make
 | 
			
		||||
@@ -43,103 +16,50 @@
 | 
			
		||||
  ```
 | 
			
		||||
  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.
 | 
			
		||||
  Note that the release script (see below) also runs the tests and
 | 
			
		||||
  will bail out if any fail.
 | 
			
		||||
* Make sure the translations are up-to-date. There is logic to check
 | 
			
		||||
  for changes in translations: a movable tag *translations* indicates
 | 
			
		||||
  when translations were last pushed, and the logic tries to enforce a
 | 
			
		||||
  week of latency between push-translations and a release, to allow
 | 
			
		||||
  translators to catch up. Run `ci/txcheck.sh` to confirm this.
 | 
			
		||||
  Run `ci/txcheck.sh --cleanup` to tidy up afterwards, and possibly pass
 | 
			
		||||
  `-T` to the release script to skip the translation-age check if you
 | 
			
		||||
  feel it is warranted.
 | 
			
		||||
* 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.
 | 
			
		||||
  destroy an attached disk. This is not always desirable.
 | 
			
		||||
* Notify [translators][transifex]. In the dashboard there is an *Announcements*
 | 
			
		||||
  link that you can use to send a translation announcement.
 | 
			
		||||
 | 
			
		||||
## (3) Release
 | 
			
		||||
[coverity]: https://scan.coverity.com/projects/calamares-calamares?tab=overview
 | 
			
		||||
[transifex]: https://www.transifex.com/calamares/calamares/dashboard/
 | 
			
		||||
 | 
			
		||||
Follow the instructions printed by the release script.
 | 
			
		||||
#### (1) Preparation
 | 
			
		||||
 | 
			
		||||
* Push the tags.
 | 
			
		||||
* Create a new release on GitHub.
 | 
			
		||||
* Upload tarball and signature.
 | 
			
		||||
* Bump version in `CMakeLists.txt`, *CALAMARES_VERSION* variables, and set
 | 
			
		||||
  RC to a non-zero value (e.g. doing -rc1, -rc2, ...). Push that.
 | 
			
		||||
* Check `README.md` and everything in `hacking`, make sure it's all still
 | 
			
		||||
  relevant. Run `hacking/calamaresstyle` to check the C++ code style.
 | 
			
		||||
  Python code is checked as part of the Travis CI builds.
 | 
			
		||||
* Check defaults in `settings.conf` and other configuration files.
 | 
			
		||||
* Pull latest translations from Transifex. This is done nightly on Jenkins,
 | 
			
		||||
  so a manual pull is rarely necessary.
 | 
			
		||||
* Update the list of enabled translation languages in `CMakeLists.txt`.
 | 
			
		||||
  Check the [translation site][transifex] for the list of languages with
 | 
			
		||||
  fairly complete translations.
 | 
			
		||||
 | 
			
		||||
#### (2) Tarball
 | 
			
		||||
* Create tarball: `git-archive-all -v calamares-1.1-rc1.tar.gz` or without
 | 
			
		||||
  the helper script,
 | 
			
		||||
  ```
 | 
			
		||||
    V=calamares-3.1.5
 | 
			
		||||
    git archive -o $V.tar.gz --prefix $V/ master
 | 
			
		||||
  ```
 | 
			
		||||
  Double check that the tarball matches the version number.
 | 
			
		||||
* Test tarball.
 | 
			
		||||
 | 
			
		||||
#### (3) Tag
 | 
			
		||||
* Set RC to zero in `CMakeLists.txt` if this is the actual release.
 | 
			
		||||
* `git tag -s v1.1.0` Make sure the signing key is known in GitHub, so that the
 | 
			
		||||
  tag is shown as a verified tag. Do not sign -rc tags.
 | 
			
		||||
* Generate MD5 and SHA256 checksums.
 | 
			
		||||
* Upload tarball.
 | 
			
		||||
* Announce on mailing list, notify packagers.
 | 
			
		||||
* Write release article.
 | 
			
		||||
 | 
			
		||||
#### (4) Release day
 | 
			
		||||
* Publish tarball.
 | 
			
		||||
* Update download page.
 | 
			
		||||
* 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 *CALAMARES_VERSION*.
 | 
			
		||||
* Set *CALAMARES_RELEASE_MODE* back to `OFF`.
 | 
			
		||||
* Add a placeholder entry for the next release in `CHANGES-*` with date
 | 
			
		||||
  text *not released yet*. See the text below, "Placeholder Release".
 | 
			
		||||
  Add the placeholder to the right file for the release-stream.
 | 
			
		||||
* Commit and push that, usually with the message
 | 
			
		||||
  *Changes: post-release housekeeping*.
 | 
			
		||||
 | 
			
		||||
# 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 primary 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.
 | 
			
		||||
 | 
			
		||||
## Placeholder Release Notes
 | 
			
		||||
 | 
			
		||||
```
 | 
			
		||||
# 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
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
* Publicize on social networks.
 | 
			
		||||
* Close associated milestone on GitHub if this is the actual release.
 | 
			
		||||
* Publish blog post.
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										177
									
								
								ci/RELEASE.sh
									
									
									
									
									
								
							
							
						
						
									
										177
									
								
								ci/RELEASE.sh
									
									
									
									
									
								
							@@ -1,177 +0,0 @@
 | 
			
		||||
#! /bin/sh
 | 
			
		||||
#
 | 
			
		||||
#   SPDX-FileCopyrightText: 2018 Adriaan de Groot <groot@kde.org>
 | 
			
		||||
#   SPDX-License-Identifier: BSD-2-Clause
 | 
			
		||||
#
 | 
			
		||||
### USAGE
 | 
			
		||||
#
 | 
			
		||||
# Release script for Calamares
 | 
			
		||||
#
 | 
			
		||||
# 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
 | 
			
		||||
#   * '-b' do not build-and-test tarball
 | 
			
		||||
#
 | 
			
		||||
# 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
 | 
			
		||||
#   * TEST_TARBALL  set to 'false' to skip build-and-test phase after tarring
 | 
			
		||||
#
 | 
			
		||||
### 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
 | 
			
		||||
test -z "$TEST_TARBALL" && TEST_TARBALL=true
 | 
			
		||||
STRING_FREEZE=true
 | 
			
		||||
 | 
			
		||||
while getopts "hBbPT" 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
 | 
			
		||||
        ;;
 | 
			
		||||
    b)
 | 
			
		||||
	TEST_TARBALL=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 ./cala-tmp-XXXXXX)
 | 
			
		||||
KEY_ID="328D742D8807A435"
 | 
			
		||||
 | 
			
		||||
# Try to make gpg cache the signing key, so we can leave the process
 | 
			
		||||
# to run and sign.
 | 
			
		||||
rm -f CMakeLists.txt.gpg
 | 
			
		||||
gpg -s -u $KEY_ID CMakeLists.txt
 | 
			
		||||
 | 
			
		||||
### 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.
 | 
			
		||||
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
 | 
			
		||||
#
 | 
			
		||||
#
 | 
			
		||||
if test "x$TEST_TARBALL" = "xtrue" ; then
 | 
			
		||||
    D=$(date +%Y%m%d-%H%M%S)
 | 
			
		||||
    TMPDIR=$(mktemp -d ./cala-tar-XXXXXX)
 | 
			
		||||
    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 ; }
 | 
			
		||||
fi
 | 
			
		||||
gpg -s -u $KEY_ID --detach --armor $TAR_FILE  # Sign the tarball
 | 
			
		||||
 | 
			
		||||
### 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
 | 
			
		||||
  # Upload tarball $TAR_FILE and the signature $TAR_FILE.asc
 | 
			
		||||
  # Announce via https://github.com/calamares/calamares/releases/new
 | 
			
		||||
  # SHA256: $SHA256
 | 
			
		||||
EOF
 | 
			
		||||
 | 
			
		||||
exit 0
 | 
			
		||||
@@ -1,7 +1,3 @@
 | 
			
		||||
#   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
 | 
			
		||||
 | 
			
		||||
@@ -9,7 +5,7 @@ indent=spaces=4
 | 
			
		||||
 | 
			
		||||
# Brackets
 | 
			
		||||
style=break
 | 
			
		||||
add-brackets
 | 
			
		||||
remove-brackets # Remove brackets on single-line `if` and `for` (requires astyle 2.04)
 | 
			
		||||
 | 
			
		||||
# Spaces
 | 
			
		||||
pad-paren-in
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										19
									
								
								ci/buildall.sh
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										19
									
								
								ci/buildall.sh
									
									
									
									
									
										Executable file
									
								
							@@ -0,0 +1,19 @@
 | 
			
		||||
#!/bin/bash
 | 
			
		||||
 | 
			
		||||
rm -Rf "$WORKSPACE/prefix"
 | 
			
		||||
mkdir "$WORKSPACE/prefix"
 | 
			
		||||
 | 
			
		||||
git clone git://anongit.kde.org/kpmcore "$WORKSPACE/kpmcore"
 | 
			
		||||
cd "$WORKSPACE/kpmcore"
 | 
			
		||||
mkdir "$WORKSPACE/kpmcore/build"
 | 
			
		||||
cd "$WORKSPACE/kpmcore/build"
 | 
			
		||||
cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=/usr ..
 | 
			
		||||
nice -n 18 make -j2
 | 
			
		||||
make DESTDIR="$WORKSPACE/prefix" install
 | 
			
		||||
 | 
			
		||||
rm -Rf "$WORKSPACE/build"
 | 
			
		||||
mkdir "$WORKSPACE/build"
 | 
			
		||||
cd "$WORKSPACE/build"
 | 
			
		||||
 | 
			
		||||
CMAKE_PREFIX_PATH="$WORKSPACE/prefix/usr" cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=/usr -DWEBVIEW_FORCE_WEBKIT=1 ..
 | 
			
		||||
nice -n 18 make -j2
 | 
			
		||||
							
								
								
									
										44
									
								
								ci/calamares-coverity.sh
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										44
									
								
								ci/calamares-coverity.sh
									
									
									
									
									
										Executable file
									
								
							@@ -0,0 +1,44 @@
 | 
			
		||||
#!/bin/bash
 | 
			
		||||
 | 
			
		||||
# Make sure we can make git operations from the Calamares Docker+Jenkins environment.
 | 
			
		||||
cp ~/jenkins-master/.gitconfig ~
 | 
			
		||||
cp -R ~/jenkins-master/.ssh ~
 | 
			
		||||
 | 
			
		||||
cd "$WORKSPACE"
 | 
			
		||||
git config --global http.sslVerify false
 | 
			
		||||
 | 
			
		||||
rm -Rf "$WORKSPACE/prefix"
 | 
			
		||||
mkdir "$WORKSPACE/prefix"
 | 
			
		||||
 | 
			
		||||
git clone git://anongit.kde.org/kpmcore "$WORKSPACE/kpmcore"
 | 
			
		||||
cd "$WORKSPACE/kpmcore"
 | 
			
		||||
mkdir "$WORKSPACE/kpmcore/build"
 | 
			
		||||
cd "$WORKSPACE/kpmcore/build"
 | 
			
		||||
cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=/usr ..
 | 
			
		||||
nice -n 18 make -j2
 | 
			
		||||
make DESTDIR="$WORKSPACE/prefix" install
 | 
			
		||||
 | 
			
		||||
cd "$WORKSPACE"
 | 
			
		||||
 | 
			
		||||
wget https://scan.coverity.com/download/cxx/linux64 --no-check-certificate \
 | 
			
		||||
     --post-data "token=ll90T04noQ4cORJx_zczKA&project=calamares%2Fcalamares" \
 | 
			
		||||
     -O coverity_tool.tar.gz
 | 
			
		||||
mkdir "$WORKSPACE/coveritytool"
 | 
			
		||||
tar xvf coverity_tool.tar.gz -C "$WORKSPACE/coveritytool" --strip-components 2
 | 
			
		||||
export PATH="$WORKSPACE/coveritytool/bin:$PATH"
 | 
			
		||||
 | 
			
		||||
rm -Rf "$WORKSPACE/build"
 | 
			
		||||
mkdir "$WORKSPACE/build"
 | 
			
		||||
cd "$WORKSPACE/build"
 | 
			
		||||
 | 
			
		||||
CMAKE_PREFIX_PATH="$WORKSPACE/prefix/usr" cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=/usr -DWEBVIEW_FORCE_WEBKIT=1 ..
 | 
			
		||||
nice -n 18 cov-build --dir cov-int make -j2
 | 
			
		||||
 | 
			
		||||
tar caf calamares-ci.tar.xz cov-int
 | 
			
		||||
 | 
			
		||||
curl -k --form token=ll90T04noQ4cORJx_zczKA \
 | 
			
		||||
  --form email=teo@kde.org \
 | 
			
		||||
  --form file=@calamares-ci.tar.xz \
 | 
			
		||||
  --form version="master-`date -u +%Y%m%d`" \
 | 
			
		||||
  --form description="master on `date -u`" \
 | 
			
		||||
  https://scan.coverity.com/builds?project=calamares%2Fcalamares
 | 
			
		||||
@@ -1,91 +1,6 @@
 | 
			
		||||
#!/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-8 or later
 | 
			
		||||
#
 | 
			
		||||
# 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
 | 
			
		||||
 | 
			
		||||
BASEDIR=$(dirname $0)
 | 
			
		||||
TOPDIR=$( cd $BASEDIR/.. && pwd -P )
 | 
			
		||||
test -d "$BASEDIR" || { echo "! Could not determine base for $0" ; exit 1 ; }
 | 
			
		||||
test -d "$TOPDIR" || { echo "! Cound not determine top-level source dir" ; exit 1 ; }
 | 
			
		||||
test -f "$TOPDIR/.clang-format" || { echo "! No .clang-format support files in $TOPDIR" ; exit 1 ; }
 | 
			
		||||
 | 
			
		||||
AS=$( which astyle )
 | 
			
		||||
 | 
			
		||||
# Allow specifying CF_VERSIONS outside already
 | 
			
		||||
CF_VERSIONS="$CF_VERSIONS clang-format13 clang-format-13 clang-format-13.0.1 clang-format12 clang-format-12 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 ; }
 | 
			
		||||
 | 
			
		||||
### CLANG-FORMAT-WRANGLING
 | 
			
		||||
#
 | 
			
		||||
# Version 7 and earlier doesn't understand all the options we would like
 | 
			
		||||
# Version 12 handles lambdas nicely, so use that.
 | 
			
		||||
# Version 13 is also ok.
 | 
			
		||||
# Version 14 behaves differently with short-functions-in-class,
 | 
			
		||||
#   spreading functions out that 13 keeps on one line. To avoid
 | 
			
		||||
#   ping-pong commits, forbid 14.
 | 
			
		||||
 | 
			
		||||
format_version=`"$CF" --version | tr -dc '[^.0-9]' | cut  -d . -f 1`
 | 
			
		||||
case "$format_version" in
 | 
			
		||||
	12|13 )
 | 
			
		||||
		:
 | 
			
		||||
		;;
 | 
			
		||||
	* )
 | 
			
		||||
		echo "! Clang-format version '$format_version' unsupported, versions 12 or 13 are ok."
 | 
			
		||||
		exit 1
 | 
			
		||||
		;;
 | 
			
		||||
esac
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
### FILE PROCESSING
 | 
			
		||||
#
 | 
			
		||||
#
 | 
			
		||||
# Requires astyle >= 2.04
 | 
			
		||||
set -e
 | 
			
		||||
 | 
			
		||||
any_dirs=no
 | 
			
		||||
for d in "$@"
 | 
			
		||||
do
 | 
			
		||||
	test -d "$d" && any_dirs=yes
 | 
			
		||||
done
 | 
			
		||||
 | 
			
		||||
style_some()
 | 
			
		||||
{
 | 
			
		||||
	if test -n "$*" ; then
 | 
			
		||||
		$AS --options=$BASEDIR/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
 | 
			
		||||
astyle --options=$(dirname $0)/astylerc "$@"
 | 
			
		||||
 
 | 
			
		||||
@@ -1,136 +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 -m <module>
 | 
			
		||||
    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.
 | 
			
		||||
 | 
			
		||||
Use -m <module> as shorthand for standard paths in src/modules/<module>/
 | 
			
		||||
"""
 | 
			
		||||
 | 
			
		||||
# 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)
 | 
			
		||||
 | 
			
		||||
if len(sys.argv) == 3 and sys.argv[1] == "-m":
 | 
			
		||||
    module = sys.argv[2]
 | 
			
		||||
    schema_file_name = f"src/modules/{module}/{module}.schema.yaml"
 | 
			
		||||
    config_file_names = [ f"src/modules/{module}/{module}.conf" ]
 | 
			
		||||
else:
 | 
			
		||||
    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)
 | 
			
		||||
@@ -3,7 +3,4 @@
 | 
			
		||||
 | 
			
		||||
  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
 | 
			
		||||
*/
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										4
									
								
								ci/cppcheck.sh
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										4
									
								
								ci/cppcheck.sh
									
									
									
									
									
										Executable file
									
								
							@@ -0,0 +1,4 @@
 | 
			
		||||
#!/bin/bash
 | 
			
		||||
 | 
			
		||||
cd "$WORKSPACE"
 | 
			
		||||
cppcheck --enable=all --inconclusive --xml --xml-version=2 src 2> cppcheck.xml
 | 
			
		||||
							
								
								
									
										30
									
								
								ci/kpmcore-coverity.sh
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										30
									
								
								ci/kpmcore-coverity.sh
									
									
									
									
									
										Executable file
									
								
							@@ -0,0 +1,30 @@
 | 
			
		||||
#!/bin/bash
 | 
			
		||||
 | 
			
		||||
#Hack for Coverity build, so the compiler doesn't complain about InheritanceChecker
 | 
			
		||||
sudo cp ~/jenkins-master/kpluginfactory.h /usr/include/KF5/KCoreAddons
 | 
			
		||||
 | 
			
		||||
cd "$WORKSPACE"
 | 
			
		||||
wget https://scan.coverity.com/download/cxx/linux64 --no-check-certificate \
 | 
			
		||||
     --post-data "token=cyOjQZx5EOFLdhfo7ZDa4Q&project=KDE+Partition+Manager+Core+Library+-+KPMcore" \
 | 
			
		||||
     -O coverity_tool.tar.gz
 | 
			
		||||
mkdir "$WORKSPACE/coveritytool"
 | 
			
		||||
tar xvf coverity_tool.tar.gz -C "$WORKSPACE/coveritytool" --strip-components 2
 | 
			
		||||
export PATH="$WORKSPACE/coveritytool/bin:$PATH"
 | 
			
		||||
 | 
			
		||||
rm -Rf "$WORKSPACE/build"
 | 
			
		||||
mkdir "$WORKSPACE/build"
 | 
			
		||||
cd "$WORKSPACE/build"
 | 
			
		||||
 | 
			
		||||
cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=/usr ..
 | 
			
		||||
nice -n 18 cov-build --dir cov-int make -j2
 | 
			
		||||
 | 
			
		||||
tar cavf kpmcore-ci.tar.xz cov-int
 | 
			
		||||
 | 
			
		||||
cat cov-int/build-log.txt
 | 
			
		||||
 | 
			
		||||
curl -k --form token=cyOjQZx5EOFLdhfo7ZDa4Q \
 | 
			
		||||
  --form email=teo@kde.org \
 | 
			
		||||
  --form file=@kpmcore-ci.tar.xz \
 | 
			
		||||
  --form version="master-`date -u +%Y%m%d`" \
 | 
			
		||||
  --form description="master on `date -u`" \
 | 
			
		||||
  https://scan.coverity.com/builds?project=KDE+Partition+Manager+Core+Library+-+KPMcore
 | 
			
		||||
@@ -1,9 +0,0 @@
 | 
			
		||||
#   SPDX-FileCopyrightText: no
 | 
			
		||||
#   SPDX-License-Identifier: CC0-1.0
 | 
			
		||||
#
 | 
			
		||||
# Stubs for part of the Python API from libcalamares
 | 
			
		||||
# (although the **actual** API is presented through
 | 
			
		||||
# Boost::Python, not as a bare C-extension) so that
 | 
			
		||||
# pylint doesn't complain about libcalamares internals.
 | 
			
		||||
 | 
			
		||||
VERSION_SHORT="1.0"
 | 
			
		||||
@@ -1,24 +0,0 @@
 | 
			
		||||
#   SPDX-FileCopyrightText: no
 | 
			
		||||
#   SPDX-License-Identifier: CC0-1.0
 | 
			
		||||
#
 | 
			
		||||
# Stubs for part of the Python API from libcalamares
 | 
			
		||||
# (although the **actual** API is presented through
 | 
			
		||||
# Boost::Python, not as a bare C-extension) so that
 | 
			
		||||
# pylint doesn't complain about libcalamares internals.
 | 
			
		||||
 | 
			
		||||
def count(): return 1
 | 
			
		||||
 | 
			
		||||
def keys(): return []
 | 
			
		||||
 | 
			
		||||
def contains(_): return True
 | 
			
		||||
 | 
			
		||||
def value(key):
 | 
			
		||||
    if key in ("branding",):
 | 
			
		||||
        return dict()
 | 
			
		||||
    if key in ("partitions",):
 | 
			
		||||
        return list()
 | 
			
		||||
    return ""
 | 
			
		||||
 | 
			
		||||
def insert(key, value): pass
 | 
			
		||||
 | 
			
		||||
def remove(_): pass
 | 
			
		||||
@@ -1,15 +0,0 @@
 | 
			
		||||
#   SPDX-FileCopyrightText: no
 | 
			
		||||
#   SPDX-License-Identifier: CC0-1.0
 | 
			
		||||
#
 | 
			
		||||
# Stubs for part of the Python API from libcalamares
 | 
			
		||||
# (although the **actual** API is presented through
 | 
			
		||||
# Boost::Python, not as a bare C-extension) so that
 | 
			
		||||
# pylint doesn't complain about libcalamares internals.
 | 
			
		||||
 | 
			
		||||
configuration = dict()
 | 
			
		||||
 | 
			
		||||
def setprogress(_): pass
 | 
			
		||||
 | 
			
		||||
def pretty_name(): return ""
 | 
			
		||||
 | 
			
		||||
def working_path(): return ""
 | 
			
		||||
@@ -1,27 +0,0 @@
 | 
			
		||||
#   SPDX-FileCopyrightText: no
 | 
			
		||||
#   SPDX-License-Identifier: CC0-1.0
 | 
			
		||||
#
 | 
			
		||||
# Stubs for part of the Python API from libcalamares
 | 
			
		||||
# (although the **actual** API is presented through
 | 
			
		||||
# Boost::Python, not as a bare C-extension) so that
 | 
			
		||||
# pylint doesn't complain about libcalamares internals.
 | 
			
		||||
 | 
			
		||||
def debug(_): pass
 | 
			
		||||
 | 
			
		||||
def warning(_): pass
 | 
			
		||||
 | 
			
		||||
def error(_): pass
 | 
			
		||||
 | 
			
		||||
def gettext_path(): pass
 | 
			
		||||
 | 
			
		||||
def gettext_languages(): pass
 | 
			
		||||
 | 
			
		||||
def target_env_call(_): return 0
 | 
			
		||||
 | 
			
		||||
def check_target_env_call(_): pass
 | 
			
		||||
 | 
			
		||||
def target_env_process_output(cmd, *args): return 0
 | 
			
		||||
 | 
			
		||||
def host_env_process_output(cmd, *args): return 0
 | 
			
		||||
 | 
			
		||||
def mount(device, mountpoint, fstype, options): return 0
 | 
			
		||||
							
								
								
									
										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
 | 
			
		||||
							
								
								
									
										144
									
								
								ci/txpull.sh
									
									
									
									
									
								
							
							
						
						
									
										144
									
								
								ci/txpull.sh
									
									
									
									
									
								
							@@ -1,54 +1,26 @@
 | 
			
		||||
#!/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
 | 
			
		||||
### INITIAL SETUP
 | 
			
		||||
#
 | 
			
		||||
# 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)
 | 
			
		||||
# This stuff needs to be done once; in a real CI environment where it
 | 
			
		||||
# runs regularly in a container, the setup needs to be done when
 | 
			
		||||
# creating the container.
 | 
			
		||||
#
 | 
			
		||||
#
 | 
			
		||||
# cp ~/jenkins-master/.transifexrc ~  # Transifex user settings
 | 
			
		||||
# cp ~/jenkins-master/.gitconfig ~    # Git config, user settings
 | 
			
		||||
# cp -R ~/jenkins-master/.ssh ~       # SSH, presumably for github
 | 
			
		||||
#
 | 
			
		||||
# cd "$WORKSPACE"
 | 
			
		||||
# git config --global http.sslVerify false
 | 
			
		||||
 | 
			
		||||
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
 | 
			
		||||
@@ -57,32 +29,6 @@ done
 | 
			
		||||
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
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
# 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
 | 
			
		||||
@@ -95,7 +41,7 @@ AUTHOR="--author='Calamares CI <groot@kde.org>'"
 | 
			
		||||
BOILERPLATE="Automatic merge of Transifex translations"
 | 
			
		||||
 | 
			
		||||
git add --verbose lang/calamares*.ts
 | 
			
		||||
git commit "$AUTHOR" --message="i18n: [calamares] $BOILERPLATE" | true
 | 
			
		||||
git commit "$AUTHOR" --message="[core] $BOILERPLATE" | true
 | 
			
		||||
 | 
			
		||||
rm -f lang/desktop*.desktop
 | 
			
		||||
awk '
 | 
			
		||||
@@ -105,63 +51,37 @@ awk '
 | 
			
		||||
		skip=0; print $0;
 | 
			
		||||
	}}' < calamares.desktop > calamares.desktop.new
 | 
			
		||||
mv calamares.desktop.new calamares.desktop
 | 
			
		||||
# Now group translated key-names (Name, Icon, Description, ..) by sorted
 | 
			
		||||
# language key rather than random-ish language-key order (which shuffles
 | 
			
		||||
# entries around).
 | 
			
		||||
#
 | 
			
		||||
# First, the non-translated lines
 | 
			
		||||
grep -v '\[.*\]=' calamares.desktop  > calamares.desktop.new
 | 
			
		||||
# The translated lines:
 | 
			
		||||
# - replace (the first) [] by | so we have a consistent field separator
 | 
			
		||||
# - sort based on field 2, then 1 (language code, then reversed key-name)
 | 
			
		||||
# - replace the first | by [, the first (remaining) | by ]
 | 
			
		||||
# Effectively this puts the fields in this order: Name, Icon, Generic Name,
 | 
			
		||||
# Comment -- within each language key. This keeps churn down since the
 | 
			
		||||
# language codes and key-names are constant.
 | 
			
		||||
grep '\[.*\]=' calamares.desktop | sed -e 's/\[/|/' -e 's/\]/|/' | sort -t '|' -k 2,2 -k 1,1r | sed -e 's/|/\[/' | sed -e 's/|/\]/' >> calamares.desktop.new
 | 
			
		||||
mv calamares.desktop.new calamares.desktop
 | 
			
		||||
git add --verbose calamares.desktop
 | 
			
		||||
git commit "$AUTHOR" --message="i18n: [desktop] $BOILERPLATE" | true
 | 
			
		||||
git commit "$AUTHOR" --message="[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 --
 | 
			
		||||
 | 
			
		||||
# sed either wants -i'' (GNU sed) or -i '' (BSD sed) to
 | 
			
		||||
# replace in a file, with no backup extension. Define
 | 
			
		||||
# a `reinplace` command to deal with the difference.
 | 
			
		||||
if test FreeBSD = `uname` ; then
 | 
			
		||||
	reinplace() { 
 | 
			
		||||
		sed -i '' "$@"
 | 
			
		||||
	}
 | 
			
		||||
else
 | 
			
		||||
	reinplace() { 
 | 
			
		||||
		sed -i'' "$@"
 | 
			
		||||
	}
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
# 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
 | 
			
		||||
				reinplace '/^"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
 | 
			
		||||
  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="[${MODULE_NAME}] $BOILERPLATE" | true
 | 
			
		||||
    fi
 | 
			
		||||
  fi
 | 
			
		||||
done
 | 
			
		||||
 | 
			
		||||
for POFILE in $(find lang -name "python.po") ; do
 | 
			
		||||
	reinplace '/^"Content-Type/s/CHARSET/UTF-8/' $POFILE
 | 
			
		||||
	# msgfmt -o ${POFILE%.po}.mo $POFILE
 | 
			
		||||
  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
 | 
			
		||||
git commit "$AUTHOR" --message="[python] $BOILERPLATE" | true
 | 
			
		||||
 | 
			
		||||
# git push --set-upstream origin master
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										155
									
								
								ci/txpush.sh
									
									
									
									
									
								
							
							
						
						
									
										155
									
								
								ci/txpush.sh
									
									
									
									
									
								
							@@ -1,117 +1,43 @@
 | 
			
		||||
#!/bin/sh
 | 
			
		||||
#
 | 
			
		||||
# Fetch the Transifex translations for Calamares and incorporate them
 | 
			
		||||
# into the source tree, adding commits of the different files.
 | 
			
		||||
 | 
			
		||||
### LICENSE
 | 
			
		||||
# === This file is part of Calamares - <https://calamares.io> ===
 | 
			
		||||
### INITIAL SETUP
 | 
			
		||||
#
 | 
			
		||||
#   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 stuff needs to be done once; in a real CI environment where it
 | 
			
		||||
# runs regularly in a container, the setup needs to be done when
 | 
			
		||||
# creating the container.
 | 
			
		||||
#
 | 
			
		||||
#   This file is Free Software: you can redistribute it and/or modify
 | 
			
		||||
#   it under the terms of the 2-clause BSD License.
 | 
			
		||||
#
 | 
			
		||||
### END LICENSE
 | 
			
		||||
# cp ~/jenkins-master/.transifexrc ~  # Transifex user settings
 | 
			
		||||
# cp ~/jenkins-master/.gitconfig ~    # Git config, user settings
 | 
			
		||||
# cp -R ~/jenkins-master/.ssh ~       # SSH, presumably for github
 | 
			
		||||
#
 | 
			
		||||
# cd "$WORKSPACE"
 | 
			
		||||
# git config --global http.sslVerify false
 | 
			
		||||
 | 
			
		||||
### 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
 | 
			
		||||
	}
 | 
			
		||||
  tx() {
 | 
			
		||||
    echo "Skipped tx $*"
 | 
			
		||||
  }
 | 
			
		||||
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
 | 
			
		||||
export QT_SELECT=5
 | 
			
		||||
lupdate src/ -ts -no-obsolete lang/calamares_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.calamares-master
 | 
			
		||||
tx push --source --no-interactive -r calamares.fdo
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
### PYTHON MODULES
 | 
			
		||||
#
 | 
			
		||||
# The Python tooling depends on the underlying distro to provide
 | 
			
		||||
@@ -125,30 +51,27 @@ 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
 | 
			
		||||
  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
 | 
			
		||||
  ${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)
 | 
			
		||||
							
								
								
									
										264
									
								
								ci/txstats.py
									
									
									
									
									
								
							
							
						
						
									
										264
									
								
								ci/txstats.py
									
									
									
									
									
								
							@@ -1,264 +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 os
 | 
			
		||||
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.
 | 
			
		||||
    """
 | 
			
		||||
    # 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:
 | 
			
		||||
        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)
 | 
			
		||||
 | 
			
		||||
    # Audit the languages that are in TX, mapped to git
 | 
			
		||||
    for lang_name in languages:
 | 
			
		||||
        if not os.path.exists("lang/calamares_{}.ts".format(lang_name)):
 | 
			
		||||
            print("# !! Missing translation file for {}".format(lang_name))
 | 
			
		||||
        if not os.path.isdir("lang/python/{}/LC_MESSAGES".format(lang_name)):
 | 
			
		||||
            print("# !! Missing Python translation file for {}".format(lang_name))
 | 
			
		||||
 | 
			
		||||
    # Audit the files that are in git, mapped to TX
 | 
			
		||||
    special_cases = ("python.pot", "python", "CMakeLists.txt", "txload.cpp", "calamares_i18n.qrc.in")
 | 
			
		||||
    for file_name in os.listdir("lang"):
 | 
			
		||||
        if file_name in special_cases:
 | 
			
		||||
            continue
 | 
			
		||||
        elif file_name.startswith("calamares_") and file_name.endswith(".ts"):
 | 
			
		||||
            key = file_name[10:-3]
 | 
			
		||||
            if not key in languages and not key == "en":
 | 
			
		||||
                print("# !! Translation file for {} not in TX".format(key))
 | 
			
		||||
        elif file_name.startswith("tz_") and file_name.endswith(".ts"):
 | 
			
		||||
            key = file_name[3:-3]
 | 
			
		||||
            if not key in languages and not key == "en":
 | 
			
		||||
                print("# !! Translation file for TZ {} not in TX".format(key))
 | 
			
		||||
        elif file_name.startswith("kb_") and file_name.endswith(".ts"):
 | 
			
		||||
            key = file_name[3:-3]
 | 
			
		||||
            if not key in languages and not key == "en":
 | 
			
		||||
                print("# !! Translation file for KB {} not in TX".format(key))
 | 
			
		||||
        else:
 | 
			
		||||
            print("# !! Weird translation file {} not in TX".format(file_name))
 | 
			
		||||
 | 
			
		||||
    # Audit the python translation files that are in git, mapped to TX
 | 
			
		||||
    for file_name in os.listdir("lang/python"):
 | 
			
		||||
        if file_name not in languages:
 | 
			
		||||
            print("# !! Translation file for Python {} not in TX".format(file_name))
 | 
			
		||||
 | 
			
		||||
    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())
 | 
			
		||||
							
								
								
									
										29
									
								
								ci/umount.sh
									
									
									
									
									
								
							
							
						
						
									
										29
									
								
								ci/umount.sh
									
									
									
									
									
								
							@@ -1,29 +0,0 @@
 | 
			
		||||
#! /bin/sh
 | 
			
		||||
 | 
			
		||||
### LICENSE
 | 
			
		||||
# === This file is part of Calamares - <https://calamares.io> ===
 | 
			
		||||
#
 | 
			
		||||
#   SPDX-FileCopyrightText: 2022 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
 | 
			
		||||
 | 
			
		||||
#
 | 
			
		||||
# This is an "unmount" script that tries to unmount whatever
 | 
			
		||||
# filesystems Calamares might have left mounted (e.g. because of
 | 
			
		||||
# a crash, or ^C'ing the installer, or ..).
 | 
			
		||||
#
 | 
			
		||||
 | 
			
		||||
# Swap may have become enabled on the disks just used; assume
 | 
			
		||||
# we're in a live session where we don't want any.
 | 
			
		||||
sudo swapoff -a
 | 
			
		||||
# In Arch-based systems, there may be a gpg-agent started by
 | 
			
		||||
# pacman during installation, which lives in the chroot. Kill
 | 
			
		||||
# them all; again assume we're in a live session where it doesn't matter.
 | 
			
		||||
sudo pkill gpg-agent
 | 
			
		||||
# Unmount the filesystems in *reverse* order, since we need to ditch
 | 
			
		||||
# e.g. /run/udev before /run before the root filesystem.
 | 
			
		||||
sudo umount $( LC_ALL=C mount | awk '/calamares-root/{print $3}' | LC_ALL=C sort -r )
 | 
			
		||||
@@ -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,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,9 +1,5 @@
 | 
			
		||||
# 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
 | 
			
		||||
 
 | 
			
		||||
@@ -1,5 +1,2 @@
 | 
			
		||||
#   SPDX-FileCopyrightText: no
 | 
			
		||||
#   SPDX-License-Identifier: CC0-1.0
 | 
			
		||||
#
 | 
			
		||||
# Global .profile -- add /sbin_1
 | 
			
		||||
PATH=$PATH:/sbin_1:/xbin
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1 @@
 | 
			
		||||
#   SPDX-FileCopyrightText: no
 | 
			
		||||
#   SPDX-License-Identifier: CC0-1.0
 | 
			
		||||
#
 | 
			
		||||
root:x:0:
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1 @@
 | 
			
		||||
#   SPDX-FileCopyrightText: no
 | 
			
		||||
#   SPDX-License-Identifier: CC0-1.0
 | 
			
		||||
#
 | 
			
		||||
This is an example /etc/issue file.
 | 
			
		||||
 
 | 
			
		||||
Some files were not shown because too many files have changed in this diff Show More
		Reference in New Issue
	
	Block a user