Skip to content

Commit 0a86fc2

Browse files
authored
Merge pull request #7 from ue4plugins/gpltech
Merging all updates from Gpltech for official release
2 parents 4a284ee + fd1f0a4 commit 0a86fc2

File tree

1,620 files changed

+4994
-142605
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,620 files changed

+4994
-142605
lines changed

.flake8

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# Copyright 2018 GPL Solutions, LLC. All rights reserved.
2+
#
3+
# Use of this software is subject to the terms of the GPL Solutions license
4+
# agreement provided at the time of installation or download, or which otherwise
5+
# accompanies this software in either electronic or hard copy form.
6+
#
7+
8+
# Flake 8 PEP and lint configuration - https://gitlab.com/pycqa/flake8
9+
#
10+
# This defines the official lint and PEP8 rules for this repository
11+
#
12+
# You can run this locally by doing pep install flake8 and then
13+
# >flake8 .
14+
15+
[flake8]
16+
17+
# Things we don't want to lint
18+
exclude =
19+
.tox,
20+
.git,
21+
.flake8,
22+
.gitignore,
23+
.travis.yml,
24+
.cache,
25+
.eggs,
26+
*.rst,
27+
*.yml,
28+
*.pyc,
29+
*.pyo,
30+
*.egg-info,
31+
__pycache__,
32+
# Those are our third parties, do not lint them
33+
vendors,
34+
# Skip __init__.py files, to not have a lot of 'xxx' imported but unused
35+
python/__init__.py,
36+
python/*/__init__.py,
37+
# Skip the auto-generated ui file.
38+
python/*/ui,
39+
venv,
40+
winenv,
41+
osx_env,
42+
win_env,
43+
44+
# Ignore some errors
45+
#
46+
# E402 module level import not at top of file
47+
# E501 line too long (112 > 79 characters)
48+
# N802 Variables should be lower case. (clashes with Qt naming conventions)
49+
# N806 Variables should be lower case. (clashes with Qt naming conventions)
50+
# W503 line break before binary operator (it breaks before, not after)
51+
52+
ignore = E501, E402, N802, N806, W503
53+

.gitignore

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
5+
# C extensions
6+
*.so
7+
8+
# Distribution / packaging
9+
.Python
10+
build/
11+
develop-eggs/
12+
dist/
13+
eggs/
14+
parts/
15+
sdist/
16+
*.egg-info/
17+
.installed.cfg
18+
*.egg
19+
*.dist-info
20+
21+
# Installer logs
22+
pip-log.txt
23+
pip-delete-this-directory.txt
24+
25+
# Unit test / coverage reports
26+
htmlcov/
27+
.tox/
28+
.coverage
29+
.cache
30+
nosetests.xml
31+
coverage.xml
32+
test
33+
34+
# Translations
35+
*.mo
36+
37+
# Mr Developer
38+
.mr.developer.cfg
39+
.project
40+
.pydevproject
41+
42+
# Editors
43+
.idea
44+
.vscode
45+
46+
# Rope
47+
.ropeproject
48+
49+
# Django stuff:
50+
*.log
51+
*.pot
52+
53+
# Sphinx documentation
54+
docs/_build/
55+
56+
# Mac stuff
57+
.DS_Store
58+
59+
# Package building
60+
packagevenv*
61+
python/vendors

README.md

Lines changed: 68 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,73 @@
11
# Unreal QT Framework
22

33
This is a helper library designed to be used in
4-
conjunction with the [tk-unreal](https://github.com/shotgunsoftware/tk-unreal) engine.
4+
conjunction with the [tk-unreal](https://github.com/ue4plugins/tk-unreal) engine.
5+
6+
This framework contains hooks which can be re-used in configurations where the
7+
Unreal integration is needed, and PySide2 binaries needed to run the SG Toolkit
8+
integration in Unreal.
59

610
Please see the engine for more details.
11+
12+
## The PySide2 libraries
13+
14+
Binaries for PySide2 libraries for all platforms are not included in the
15+
source tree and must be built before being able to use this framework.
16+
17+
### Building the PySide2 libraries locally
18+
19+
Use the [build_packages.sh](resources/build_packages.sh) script with the `-b` option to build and install
20+
the packages specified in the [requirements.txt](resources/requirements.txt) file.
21+
```
22+
Usage : ./build_packages.sh [-h] [-b] [-p <python command]
23+
Options :
24+
-h : show this help message
25+
-b : build packages into their shipping destination
26+
-p : specify which python command to use, e.g. python, python2, python3
27+
```
28+
The framework can be used with a local descriptor (e.g. dev or path) once the
29+
binaries are build.
30+
31+
### Building the PySide2 libraries with Azure Pipelines
32+
33+
The [build_packages.sh](resources/build_packages.sh) script can be used with [Azure Pipelines](https://docs.microsoft.com/en-us/azure/devops/pipelines/get-started/pipelines-get-started?view=azure-devops)
34+
to automatically build the packages each time a new version tag is added in Github.
35+
36+
You can get access to Azure Pipelines for free [from your Github account](https://docs.microsoft.com/en-us/azure/devops/pipelines/get-started/pipelines-sign-up?view=azure-devops#sign-up-with-a-github-account)
37+
if you don't already have an account.
38+
39+
You can use the provided [azure-pipelines.yml](azure-pipelines.yml) file to create a [new Azure Pipeline](https://docs.microsoft.com/en-us/azure/devops/pipelines/repos/github?view=azure-devops&tabs=yaml#access-to-github-repositories).
40+
41+
A [service connection to Github](https://docs.microsoft.com/en-us/azure/devops/pipelines/repos/github?view=azure-devops&tabs=yaml#permissions-needed-in-github-1)
42+
will have to be created if you don't already have one.
43+
44+
The Azure pipeline builds the PySide2 libraries for Windows, Linux and Mac, and upload them to Github releases.
45+
46+
<img width="512" alt="Github releases" src="https://user-images.githubusercontent.com/39291844/153920988-0dcb80d3-3c37-479d-8079-33496f8952f4.png">
47+
48+
## Using this framework in your Setup
49+
50+
Add this framework in the `frameworks` settings section of the Toolkit application needing
51+
it.
52+
For example:
53+
54+
```
55+
frameworks:
56+
- {"name": "tk-framework-unrealqt", "version": "v1.x.x"}
57+
```
58+
59+
- If you're using a local descriptor (dev or path) you need to build the PySide2 libraries
60+
yourself. See [building the PySide2 libraries locally](#building-the-pyside2-libraries-locally).
61+
62+
- If you're using a remote descriptor, just in time download must be added so these binaries are downloaded in SG TK bootstrap process. The provided [bootstrap.py](hooks/core/bootstrap.py) script implements just in time downloads from Github releases with a `git` descriptor:
63+
- Copy the `hooks/core/bootstrap.py` file to your config `core/hooks/bootstrap.py`
64+
hook.
65+
- Use a `git` descriptor for the framework, e.g.:
66+
```
67+
tk-framework-unrealqt_v1.x.x:
68+
location:
69+
version: v1.2.5
70+
type: git
71+
path: [email protected]:ue4plugins/tk-framework-unrealqt.git
72+
```
73+

azure-pipelines.yml

Lines changed: 139 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
1+
# We want builds to trigger for 3 reasons:
2+
# - The master branch sees new commits
3+
# - Each PR should get rebuilt when commits are added to it.
4+
# - When we tag something
5+
trigger:
6+
branches:
7+
include:
8+
- master
9+
tags:
10+
include:
11+
# Tags must start with "v"
12+
- v*
13+
pr:
14+
branches:
15+
include:
16+
- "*"
17+
18+
# The github_ci_token variable is defined in the Azure Pipeline web page as a
19+
# secret variable and is a github personal token.
20+
21+
jobs:
22+
23+
- job: 'Build'
24+
strategy:
25+
matrix:
26+
# Define all the platform/python version we need
27+
MacPython37:
28+
platform: 'osx' # Short name for us
29+
imageName: 'macOS-10.15'
30+
python.version: '3.7'
31+
WinPython37:
32+
platform: 'win' # Short name for us
33+
imageName: 'windows-2019'
34+
python.version: '3.7'
35+
LinuxPython37:
36+
platform: 'linux' # Short name for us
37+
imageName: 'ubuntu-latest'
38+
python.version: '3.7'
39+
maxParallel: 1
40+
41+
pool:
42+
# Retrieve the value set by the strategy above
43+
vmImage: $(imageName)
44+
45+
steps:
46+
- task: UsePythonVersion@0
47+
inputs:
48+
versionSpec: '$(python.version)'
49+
architecture: 'x64'
50+
51+
- script: |
52+
python -m pip install --upgrade pip
53+
displayName: 'Install dependencies'
54+
55+
# Not needed for Python 3, virtual env are built with python3 -m venv
56+
- script: |
57+
pip install virtualenv
58+
condition: eq( variables['python.version'], '2.7' )
59+
displayName: 'Install virtualenv'
60+
61+
# Couldn't get the script to be found using a bash task.
62+
- script: |
63+
./build_packages.sh -b
64+
workingDirectory: "resources"
65+
displayName: 'Build'
66+
env:
67+
# Pass the variable into the environment
68+
GITHUB_CI_TOKEN: $(github_ci_token)
69+
condition: in( variables['Agent.OS'], 'Darwin', 'Linux' )
70+
71+
# Couldn't get the script to be found using a bash task.
72+
- script: |
73+
bash.exe ./build_packages.sh -b
74+
workingDirectory: resources
75+
displayName: 'Build Windows'
76+
env:
77+
# Pass the variable into the environment
78+
GITHUB_CI_TOKEN: $(github_ci_token)
79+
condition: eq( variables['Agent.OS'], 'Windows_NT' )
80+
81+
# Delete files
82+
# Delete folders, or files matching a pattern
83+
- task: DeleteFiles@1
84+
inputs:
85+
Contents: |
86+
.git
87+
resources/packagevenv_osx_2
88+
resources/packagevenv_osx_3
89+
resources/packagevenv_windows_2
90+
resources/packagevenv_windows_3
91+
resources/packagevenv_linux_2
92+
resources/packagevenv_linux_3
93+
94+
# Archive files
95+
# Compress files into .7z, .tar.gz, or .zip
96+
- task: ArchiveFiles@2
97+
inputs:
98+
rootFolderOrFile: '$(Build.SourcesDirectory)'
99+
includeRootFolder: false
100+
archiveType: 'zip' # Options: zip, 7z, tar, wim
101+
#tarCompression: 'gz' # Optional. Options: gz, bz2, xz, none
102+
# archive name will be something like v2.1.2-py2.7-osx.zip
103+
archiveFile: '$(Build.ArtifactStagingDirectory)/$(Build.SourceBranchName)-py$(python.version)-$(platform).zip'
104+
replaceExistingArchive: true
105+
verbose: true
106+
#quiet: # Optional
107+
108+
- bash: |
109+
echo Source branch is ${BUILD_SOURCEBRANCHNAME} for ${PLATFORM}
110+
condition: startsWith(variables['build.sourceBranch'], 'refs/tags/')
111+
112+
# Create, edit, or delete a GitHub release
113+
- task: GitHubRelease@0
114+
displayName: 'Create GitHub Release'
115+
inputs:
116+
# Note: the service connection needs to be created manually with curl
117+
# not from the Azure web UI
118+
# https://github.com/microsoft/azure-pipelines-tasks/issues/11558
119+
gitHubConnection: "Github release"
120+
repositoryName: '$(Build.Repository.Name)'
121+
action: 'edit'
122+
target: '$(Build.SourceVersion)' # Required when action == Create || Action == Edit
123+
tagSource: 'auto' # Required when action == Create# Options: auto, manual
124+
assets: '$(Build.ArtifactStagingDirectory)/$(Build.SourceBranchName)-py$(python.version)-$(platform).zip'
125+
assetUploadMode: 'replace' # Optional. Options: delete, replace
126+
tag: '$(Build.SourceBranchName)'
127+
#tagPattern: # Optional
128+
#tag: # Required when action == Edit || Action == Delete || TagSource == Manual
129+
#title: # Optional
130+
#releaseNotesSource: 'file' # Optional. Options: file, input
131+
#releaseNotesFile: # Optional
132+
#releaseNotes: # Optional
133+
#isDraft: false # Optional
134+
#isPreRelease: false # Optional
135+
#addChangeLog: true # Optional
136+
#compareWith: 'lastFullRelease' # Required when addChangeLog == True. Options: lastFullRelease, lastRelease, lastReleaseByTag
137+
#releaseTag: # Required when compareWith == LastReleaseByTag
138+
condition: startsWith(variables['build.sourceBranch'], 'refs/tags/')
139+

0 commit comments

Comments
 (0)