-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 1ee7c38
Showing
17 changed files
with
1,516 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"image": "ghcr.io/gblikas/unity-desktop-lite/unity-2022/2022.3.11f1:latest", | ||
"features": { | ||
"./local-features/unity-license-activate": { | ||
"unity_password": "${localEnv:UNITY_PASSWORD}", | ||
"unity_username": "${localEnv:UNITY_USERNAME}", | ||
"unity_serial": "${localEnv:UNITY_SERIAL}", | ||
"vnc_password": "${localEnv:VNC_PASSWORD}" | ||
} | ||
}, | ||
"forwardPorts": [6080, 5901], | ||
"customizations": { | ||
"vscode": { | ||
"extensions": ["ms-azuretools.vscode-docker", "GitHub.copilot"] | ||
} | ||
}, | ||
"hostRequirements": { | ||
"cpus": 8 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Local Features | ||
|
||
This directory contains local features needed for using the unity-desktop-lite images. |
27 changes: 27 additions & 0 deletions
27
.devcontainer/local-features/unity-license-activate/devcontainer-feature.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ | ||
"id": "unity-license-activate", | ||
"name": "unity-license-activate", | ||
"version": "0.0.0", | ||
"options": { | ||
"unity_username": { | ||
"type": "string", | ||
"default": "" | ||
}, | ||
"unity_password": { | ||
"type": "string", | ||
"default": "" | ||
}, | ||
"unity_serial": { | ||
"type": "string", | ||
"default": "" | ||
}, | ||
"unity_install_dir": { | ||
"type": "string", | ||
"default": "/opt/unity" | ||
}, | ||
"vnc_password": { | ||
"type": "string", | ||
"default": "vscode" | ||
} | ||
} | ||
} |
65 changes: 65 additions & 0 deletions
65
.devcontainer/local-features/unity-license-activate/install.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
#!/bin/bash | ||
|
||
USERNAME="${USERNAME:-"${_REMOTE_USER:-"automatic"}"}" | ||
if [ "${USERNAME}" = "auto" ] || [ "${USERNAME}" = "automatic" ]; then | ||
USERNAME="" | ||
POSSIBLE_USERS=("vscode" "node" "codespace" "$(awk -v val=1000 -F ":" '$3==val{print $1}' /etc/passwd)") | ||
for CURRENT_USER in "${POSSIBLE_USERS[@]}"; do | ||
if id -u ${CURRENT_USER} > /dev/null 2>&1; then | ||
USERNAME=${CURRENT_USER} | ||
break | ||
fi | ||
done | ||
if [ "${USERNAME}" = "" ]; then | ||
USERNAME=root | ||
fi | ||
elif [ "${USERNAME}" = "none" ] || ! id -u ${USERNAME} > /dev/null 2>&1; then | ||
USERNAME=root | ||
fi | ||
|
||
if [ -z "${VNC_PASSWORD}" ]; then | ||
echo "VNC_PASSWORD is not set" | ||
exit 1 | ||
fi | ||
|
||
echo "${VNC_PASSWORD}" | vncpasswd -f > /usr/local/etc/vscode-dev-containers/vnc-passwd | ||
|
||
if [ -z "${UNITY_USERNAME}" ]; then | ||
echo "UNITY_USERNAME is not set" | ||
exit 1 | ||
fi | ||
|
||
if [ -z "${UNITY_PASSWORD}" ]; then | ||
echo "UNITY_PASSWORD is not set" | ||
exit 1 | ||
fi | ||
|
||
if [ -z "${UNITY_SERIAL}" ]; then | ||
echo "UNITY_SERIAL is not set" | ||
exit 1 | ||
fi | ||
|
||
if [ -z "${UNITY_INSTALL_DIR}" ]; then | ||
echo "UNITY_INSTALL_DIR is not set" | ||
exit 1 | ||
fi | ||
|
||
set -x | ||
|
||
# remove all licenses | ||
sudo -u ${USERNAME} ${UNITY_INSTALL_DIR}/Editor/Unity \ | ||
-quit \ | ||
-batchmode \ | ||
-returnlicense \ | ||
-username ${UNITY_USERNAME} \ | ||
-password ${UNITY_PASSWORD} \ | ||
-logFile - | ||
|
||
sudo -u ${USERNAME} ${UNITY_INSTALL_DIR}/Editor/Unity \ | ||
-quit \ | ||
-batchmode \ | ||
-nographics \ | ||
-serial ${UNITY_SERIAL} \ | ||
-username ${UNITY_USERNAME} \ | ||
-password ${UNITY_PASSWORD} \ | ||
-logFile - |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
--- | ||
name: Bug report | ||
about: Create a report to help us improve | ||
title: '' | ||
labels: '' | ||
assignees: '' | ||
|
||
--- | ||
|
||
**Describe the bug** | ||
A clear and concise description of what the bug is. | ||
|
||
**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** | ||
If applicable, add screenshots to help explain your problem. | ||
|
||
**Desktop (please complete the following information):** | ||
- OS: [e.g. iOS] | ||
- Browser [e.g. chrome, safari] | ||
- Version [e.g. 22] | ||
|
||
**Smartphone (please complete the following information):** | ||
- Device: [e.g. iPhone6] | ||
- OS: [e.g. iOS8.1] | ||
- Browser [e.g. stock browser, safari] | ||
- Version [e.g. 22] | ||
|
||
**Additional context** | ||
Add any other context about the problem here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- | ||
name: Feature request | ||
about: Suggest an idea for this project | ||
title: '' | ||
labels: '' | ||
assignees: '' | ||
|
||
--- | ||
|
||
**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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
name: devcontainer build and push release | ||
|
||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
branches: | ||
- "main" | ||
- "staging" | ||
push: | ||
tags: | ||
- "v*.*.*" | ||
branches: | ||
- "main" | ||
- "staging" | ||
|
||
|
||
jobs: | ||
build-and-push: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
directory: ['unity-2022/2022.3.11f1'] | ||
|
||
steps: | ||
- name: checkout | ||
id: checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 2 | ||
- name: login ghcr | ||
id: login_ghcr | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: ${{ matrix.directory }} - check diff changes | ||
id: check_diff_changes | ||
run: | | ||
if git diff --quiet HEAD^ HEAD -- ${{ matrix.directory }}; then | ||
echo "[${{ matrix.directory }}] didn't find changes" | ||
echo "::set-output name=changed::false" | ||
else | ||
echo "[${{ matrix.directory }}] found changes" | ||
echo "::set-output name=subfolder::${{ matrix.directory }}" | ||
echo "::set-output name=changed::true" | ||
fi | ||
- name: ${{ matrix.directory }} - prebuild unity | ||
id: prebuild_unity | ||
uses: devcontainers/ci@v0.3 | ||
if: steps.check_diff_changes.outputs.changed == 'true' | ||
with: | ||
subfolder: ${{ steps.check_diff_changes.outputs.subfolder }} | ||
imageName: ghcr.io/${{ github.repository }}/${{ steps.check_diff_changes.outputs.subfolder }} | ||
cacheFrom: ghcr.io/${{ github.repository }}/${{ steps.check_diff_changes.outputs.subfolder }} | ||
refFilterForPush: "refs/heads/main" | ||
push: filter |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
# This .gitignore file should be placed at the root of your Unity project directory | ||
# | ||
# Get latest from https://github.com/github/gitignore/blob/main/Unity.gitignore | ||
# | ||
/[Ll]ibrary/ | ||
/[Tt]emp/ | ||
/[Oo]bj/ | ||
/[Bb]uild/ | ||
/[Bb]uilds/ | ||
/[Ll]ogs/ | ||
/[Uu]ser[Ss]ettings/ | ||
|
||
# MemoryCaptures can get excessive in size. | ||
# They also could contain extremely sensitive data | ||
/[Mm]emoryCaptures/ | ||
|
||
# Recordings can get excessive in size | ||
/[Rr]ecordings/ | ||
|
||
# Uncomment this line if you wish to ignore the asset store tools plugin | ||
# /[Aa]ssets/AssetStoreTools* | ||
|
||
# Autogenerated Jetbrains Rider plugin | ||
/[Aa]ssets/Plugins/Editor/JetBrains* | ||
|
||
# Visual Studio cache directory | ||
.vs/ | ||
|
||
# Gradle cache directory | ||
.gradle/ | ||
|
||
# Autogenerated VS/MD/Consulo solution and project files | ||
ExportedObj/ | ||
.consulo/ | ||
*.csproj | ||
*.unityproj | ||
*.sln | ||
*.suo | ||
*.tmp | ||
*.user | ||
*.userprefs | ||
*.pidb | ||
*.booproj | ||
*.svd | ||
*.pdb | ||
*.mdb | ||
*.opendb | ||
*.VC.db | ||
|
||
# Unity3D generated meta files | ||
*.pidb.meta | ||
*.pdb.meta | ||
*.mdb.meta | ||
|
||
# Unity3D generated file on crash reports | ||
sysinfo.txt | ||
|
||
# Builds | ||
*.apk | ||
*.aab | ||
*.unitypackage | ||
*.app | ||
|
||
# Crashlytics generated file | ||
crashlytics-build.properties | ||
|
||
# Packed Addressables | ||
/[Aa]ssets/[Aa]ddressable[Aa]ssets[Dd]ata/*/*.bin* | ||
|
||
# Temporary auto-generated Android Assets | ||
/[Aa]ssets/[Ss]treamingAssets/aa.meta | ||
/[Aa]ssets/[Ss]treamingAssets/aa/* |
Oops, something went wrong.