Skip to content

Commit

Permalink
Merge tag '0.11.11' into QWebEngineView
Browse files Browse the repository at this point in the history
  • Loading branch information
KrisCris committed Jan 12, 2025
2 parents 474c1d0 + 4f4f2d9 commit 61b508f
Show file tree
Hide file tree
Showing 22 changed files with 412 additions and 133 deletions.
75 changes: 73 additions & 2 deletions .github/workflows/dev-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false

- name: Set up Python
uses: actions/setup-python@v5
Expand All @@ -27,6 +30,55 @@ jobs:
with:
node-version: 20

- name: Extract Project Name
shell: bash
id: extract_project_name
run: |
PROJECT_NAME=$(cat pyproject.toml | grep "^name" | awk -F'"' '{print $2}')
if [[ -z "$PROJECT_NAME" ]]; then
echo "Error: Could not extract project name from pyproject.toml"
exit 1
fi
echo "PROJECT_NAME=$PROJECT_NAME" >> $GITHUB_ENV
- name: Set Build Metadata
shell: bash
run: |
CONFIG_FILE="src/palworld_pal_editor/config.py"
PYPROJECT_FILE="./pyproject.toml"
VERSION_TAG=$(git describe --tags --abbrev=0)
RELEASE_TYPE="NIGHTLY"
GIT_HASH=$(git rev-parse --short HEAD)
BUILD_TIME=$(date +%s)
REPO_OWNER="${{ github.repository_owner }}"
REPO_NAME="${{ github.event.repository.name }}"
BRANCH_NAME="${{ github.ref_name }}"
REPO="${REPO_OWNER}/${REPO_NAME}@${BRANCH_NAME}"
echo "VERSION_TAG=$VERSION_TAG" >> $GITHUB_ENV
echo "GIT_HASH=$GIT_HASH" >> $GITHUB_ENV
if [[ "$RUNNER_OS" == "macOS" ]]; then
sed -i '' "s|^VERSION = .*|VERSION = \"${VERSION_TAG}\"|" $CONFIG_FILE
sed -i '' "s|^RELEASE_TYPE = .*|RELEASE_TYPE = \"${RELEASE_TYPE}\"|" $CONFIG_FILE
sed -i '' "s|^BUILD_TIME = .*|BUILD_TIME = \"${BUILD_TIME}\"|" $CONFIG_FILE
sed -i '' "s|^GIT_HASH = .*|GIT_HASH = \"${GIT_HASH}\"|" $CONFIG_FILE
sed -i '' "s|^REPO = .*|REPO = \"${REPO}\"|" $CONFIG_FILE
sed -i '' "s|^version = .*|version = \"${VERSION_TAG}\"|" $PYPROJECT_FILE
else
sed -i "s|^VERSION = .*|VERSION = \"${VERSION_TAG}\"|" $CONFIG_FILE
sed -i "s|^RELEASE_TYPE = .*|RELEASE_TYPE = \"${RELEASE_TYPE}\"|" $CONFIG_FILE
sed -i "s|^BUILD_TIME = .*|BUILD_TIME = \"${BUILD_TIME}\"|" $CONFIG_FILE
sed -i "s|^GIT_HASH = .*|GIT_HASH = \"${GIT_HASH}\"|" $CONFIG_FILE
sed -i "s|^REPO = .*|REPO = \"${REPO}\"|" $CONFIG_FILE
sed -i "s|^version = .*|version = \"${VERSION_TAG}\"|" $PYPROJECT_FILE
fi
cat $CONFIG_FILE
cat $PYPROJECT_FILE

- name: Run Windows Builder Script
if: runner.os == 'Windows'
shell: pwsh
Expand All @@ -37,8 +89,27 @@ jobs:
shell: bash
run: ./build_executable.sh

- name: Rename Built File
shell: bash
run: |
FILE_EXT=""
if [[ "${{ matrix.os }}" == "windows-latest" ]]; then
FILE_EXT=".exe"
fi
FILE_PATH="./dist/${{ env.PROJECT_NAME }}${FILE_EXT}"
if [[ ! -f "$FILE_PATH" ]]; then
echo "Error: Built file not found: $FILE_PATH"
exit 1
fi
NEW_NAME="Palworld-Pal-Editor_${{ runner.os }}_${{ env.VERSION_TAG }}_${{ env.GIT_HASH }}${FILE_EXT}"
mv "$FILE_PATH" "./dist/$NEW_NAME"
echo "Renamed file to: $NEW_NAME"
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: Palworld_Pal_Editor_${{ runner.os }}_artifact
path: ./dist/
name: "Palworld-Pal-Editor_${{ runner.os }}_${{ env.VERSION_TAG }}_${{ env.GIT_HASH }}"
path: ./dist/
86 changes: 80 additions & 6 deletions .github/workflows/release-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ on:
push:
tags:
- "*"
workflow_dispatch:

jobs:
release-build:
Expand All @@ -16,6 +15,9 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false

- name: Set up Python
uses: actions/setup-python@v5
Expand All @@ -28,32 +30,104 @@ jobs:
with:
node-version: 20

- name: Extract Project Name
shell: bash
id: extract_project_name
run: |
PROJECT_NAME=$(cat pyproject.toml | grep "^name" | awk -F'"' '{print $2}')
if [[ -z "$PROJECT_NAME" ]]; then
echo "Error: Could not extract project name from pyproject.toml"
exit 1
fi
echo "PROJECT_NAME=$PROJECT_NAME" >> $GITHUB_ENV
- name: Set Build Metadata
shell: bash
run: |
CONFIG_FILE="src/palworld_pal_editor/config.py"
PYPROJECT_FILE="./pyproject.toml"
VERSION_TAG=$(git describe --tags --abbrev=0)
RELEASE_TYPE="RELEASE"
GIT_HASH=$(git rev-parse --short HEAD)
BUILD_TIME=$(date +%s)
REPO_OWNER="${{ github.repository_owner }}"
REPO_NAME="${{ github.event.repository.name }}"
BRANCH_NAME="${{ github.ref_name }}"
REPO="${REPO_OWNER}/${REPO_NAME}@${BRANCH_NAME}"
echo "VERSION_TAG=$VERSION_TAG" >> $GITHUB_ENV
echo "GIT_HASH=$GIT_HASH" >> $GITHUB_ENV
if [[ "$RUNNER_OS" == "macOS" ]]; then
sed -i '' "s|^VERSION = .*|VERSION = \"${VERSION_TAG}\"|" $CONFIG_FILE
sed -i '' "s|^RELEASE_TYPE = .*|RELEASE_TYPE = \"${RELEASE_TYPE}\"|" $CONFIG_FILE
sed -i '' "s|^BUILD_TIME = .*|BUILD_TIME = \"${BUILD_TIME}\"|" $CONFIG_FILE
sed -i '' "s|^GIT_HASH = .*|GIT_HASH = \"${GIT_HASH}\"|" $CONFIG_FILE
sed -i '' "s|^REPO = .*|REPO = \"${REPO}\"|" $CONFIG_FILE
sed -i '' "s|^version = .*|version = \"${VERSION_TAG}\"|" $PYPROJECT_FILE
else
sed -i "s|^VERSION = .*|VERSION = \"${VERSION_TAG}\"|" $CONFIG_FILE
sed -i "s|^RELEASE_TYPE = .*|RELEASE_TYPE = \"${RELEASE_TYPE}\"|" $CONFIG_FILE
sed -i "s|^BUILD_TIME = .*|BUILD_TIME = \"${BUILD_TIME}\"|" $CONFIG_FILE
sed -i "s|^GIT_HASH = .*|GIT_HASH = \"${GIT_HASH}\"|" $CONFIG_FILE
sed -i "s|^REPO = .*|REPO = \"${REPO}\"|" $CONFIG_FILE
sed -i "s|^version = .*|version = \"${VERSION_TAG}\"|" $PYPROJECT_FILE
fi
cat $CONFIG_FILE
cat $PYPROJECT_FILE

LAST_TAG=$(git describe --tags --abbrev=0 HEAD^)
COMPARE_URL="https://github.com/${REPO_OWNER}/${REPO_NAME}/compare/${LAST_TAG}...${VERSION_TAG}"
echo "COMPARE_URL=$COMPARE_URL" >> $GITHUB_ENV


- name: Windows Build
if: runner.os == 'Windows'
shell: pwsh
run: |
./build_executable.ps1
$tagName = "${{ github.ref_name }}"
Rename-Item ./dist/palworld-pal-editor.exe "palworld-pal-editor-$tagName-${{ runner.os }}.exe"
- name: Unix-like Build
if: runner.os != 'Windows'
shell: bash
run: |
./build_executable.sh
tagName=${GITHUB_REF#refs/tags/}
mv ./dist/palworld-pal-editor ./dist/palworld-pal-editor-$tagName-${{ runner.os }}
- name: Rename Built File
shell: bash
run: |
FILE_EXT=""
if [[ "${{ matrix.os }}" == "windows-latest" ]]; then
FILE_EXT=".exe"
fi
FILE_PATH="./dist/${{ env.PROJECT_NAME }}${FILE_EXT}"
if [[ ! -f "$FILE_PATH" ]]; then
echo "Error: Built file not found: $FILE_PATH"
exit 1
fi
NEW_NAME="Palworld-Pal-Editor_${{ runner.os }}_${{ env.VERSION_TAG }}_${{ env.GIT_HASH }}${FILE_EXT}"
mv "$FILE_PATH" "./dist/$NEW_NAME"
echo "Renamed file to: $NEW_NAME"
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: Palworld_Pal_Editor_${{ runner.os }}_artifact
name: "Palworld-Pal-Editor_${{ runner.os }}_${{ env.VERSION_TAG }}"
path: ./dist/

- name: Create and Upload Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: dist/*
body: |
## Changes
View the changes between versions [here](${{ env.COMPARE_URL }}).
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
46 changes: 46 additions & 0 deletions .github/workflows/release-ghcr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,52 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false

- name: Set Build Metadata
shell: bash
run: |
CONFIG_FILE="src/palworld_pal_editor/config.py"
PYPROJECT_FILE="./pyproject.toml"
VERSION_TAG=$(git describe --tags --abbrev=0)
if git describe --tags --exact-match > /dev/null 2>&1; then
RELEASE_TYPE="RELEASE"
else
RELEASE_TYPE="NIGHTLY"
fi
GIT_HASH=$(git rev-parse --short HEAD)
BUILD_TIME=$(date +%s)
REPO_OWNER="${{ github.repository_owner }}"
REPO_NAME="${{ github.event.repository.name }}"
BRANCH_NAME="${{ github.ref_name }}"
REPO="${REPO_OWNER}/${REPO_NAME}@${BRANCH_NAME}"
echo "VERSION_TAG=$VERSION_TAG" >> $GITHUB_ENV
echo "GIT_HASH=$GIT_HASH" >> $GITHUB_ENV
if [[ "$RUNNER_OS" == "macOS" ]]; then
sed -i '' "s|^VERSION = .*|VERSION = \"${VERSION_TAG}\"|" $CONFIG_FILE
sed -i '' "s|^RELEASE_TYPE = .*|RELEASE_TYPE = \"${RELEASE_TYPE}\"|" $CONFIG_FILE
sed -i '' "s|^BUILD_TIME = .*|BUILD_TIME = \"${BUILD_TIME}\"|" $CONFIG_FILE
sed -i '' "s|^GIT_HASH = .*|GIT_HASH = \"${GIT_HASH}\"|" $CONFIG_FILE
sed -i '' "s|^REPO = .*|REPO = \"${REPO}\"|" $CONFIG_FILE
sed -i '' "s|^version = .*|version = \"${VERSION_TAG}\"|" $PYPROJECT_FILE
else
sed -i "s|^VERSION = .*|VERSION = \"${VERSION_TAG}\"|" $CONFIG_FILE
sed -i "s|^RELEASE_TYPE = .*|RELEASE_TYPE = \"${RELEASE_TYPE}\"|" $CONFIG_FILE
sed -i "s|^BUILD_TIME = .*|BUILD_TIME = \"${BUILD_TIME}\"|" $CONFIG_FILE
sed -i "s|^GIT_HASH = .*|GIT_HASH = \"${GIT_HASH}\"|" $CONFIG_FILE
sed -i "s|^REPO = .*|REPO = \"${REPO}\"|" $CONFIG_FILE
sed -i "s|^version = .*|version = \"${VERSION_TAG}\"|" $PYPROJECT_FILE
fi
cat $CONFIG_FILE
cat $PYPROJECT_FILE

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -786,7 +786,7 @@ div.spaceBetween {
.tooltip-text {
visibility: hidden;
width: 200px;
background-color: rgba(0, 0, 0, 0.65);
background-color: rgba(0, 0, 0, 0.85);
color: white;
text-align: center;
border-radius: 6px;
Expand Down
41 changes: 30 additions & 11 deletions frontend/palworld-pal-editor-webui/src/components/PlayerList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,24 +18,23 @@ onMounted(async () => {
<p>
{{ palStore.getTranslatedText("PlayerList_Text") }}
</p>
<button class="playerSettings" v-if="palStore.SELECTED_PLAYER_ID != null && !palStore.PLAYER_MAP.get(palStore.SELECTED_PLAYER_ID).hasViewingCage"
:title="`${palStore.getTranslatedText('PlayerList_Viewing_Cage')}${palStore.PLAYER_MAP.get(palStore.SELECTED_PLAYER_ID).name}`"
:disabled="palStore.LOADING_FLAG"
@click="palStore.updatePlayer" name="unlock_viewing_cage">🧊</button>
<div class="tooltip-container">
<button class="playerSettings"
v-if="palStore.SELECTED_PLAYER_ID != null && !palStore.PLAYER_MAP.get(palStore.SELECTED_PLAYER_ID).hasViewingCage"
:title="palStore.getTranslatedText('PlayerList_Viewing_Cage')" :disabled="palStore.LOADING_FLAG"
@click="palStore.updatePlayer" name="unlock_viewing_cage">🧊</button>
<span class="tooltip-text">{{ palStore.getTranslatedText('PlayerList_Viewing_Cage') }}</span>
</div>
</div>
<div class="overflow-list" ref="playerListContainer">
<div class="overflow-container" v-if="palStore.HAS_WORKING_PAL_FLAG">
<button class="player" @click="palStore.selectPlayer" :disabled="palStore.BASE_PAL_BTN_CLK_FLAG || palStore.LOADING_FLAG"
:value="palStore.PAL_BASE_WORKER_BTN">
<button class="player" @click="palStore.selectPlayer"
:disabled="palStore.BASE_PAL_BTN_CLK_FLAG || palStore.LOADING_FLAG" :value="palStore.PAL_BASE_WORKER_BTN">
{{ palStore.getTranslatedText('PlayerList_Base_Pal') }}
</button>
</div>
<div class="overflow-container" v-for="player in palStore.PLAYER_MAP.values()">
<button
class="player real"
:value="player.id"
@click="palStore.selectPlayer"
:title="player.id"
<button class="player real" :value="player.id" @click="palStore.selectPlayer" :title="player.id"
:disabled="player.id == palStore.SELECTED_PLAYER_ID || palStore.LOADING_FLAG">
{{ player.name }}
</button>
Expand Down Expand Up @@ -137,10 +136,30 @@ button.player:disabled {
filter: grayscale(100%);
cursor: not-allowed;
}
button.playerSettings:disabled {
background-color: #8a8a8a;
box-shadow: 0 0 0;
filter: grayscale(100%);
cursor: not-allowed;
}
.tooltip-text {
visibility: hidden;
width: 200px;
background-color: rgba(0, 0, 0, 0.85);
color: white;
text-align: center;
border-radius: 6px;
padding: 1rem;
position: absolute;
z-index: 1;
top: 5rem;
margin-left: -60px;
}
.tooltip-container:hover .tooltip-text {
visibility: visible;
}
</style>
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ button.op.toggled:disabled {
.tooltip-text {
visibility: hidden;
width: 200px;
background-color: rgba(0, 0, 0, 0.65);
background-color: rgba(0, 0, 0, 0.85);
color: white;
text-align: center;
border-radius: 6px;
Expand Down
3 changes: 2 additions & 1 deletion frontend/palworld-pal-editor-webui/src/i18n/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export default {
EntryView_BTN_Path_Picker: "Select Path",
EntryView_BTN_Load: "Load Save",
EntryView_Period: ".",
EntryView_Version_Warning: "This version was not built by the official CI/CD pipeline. Please exercise caution and verify the source.",

Editor_Note_Ghost_Pal: "THIS PAL IS LIKELY UNREFERENCED IN GAME",
Editor_Basic_Info: "BASIC INFO",
Expand Down Expand Up @@ -71,7 +72,7 @@ export default {
PalList_Text: "PAL LIST",

PlayerList_Text: "PLAYER LIST",
PlayerList_Viewing_Cage: "Unlock Viewing Cage for ",
PlayerList_Viewing_Cage: "Unlock the viewing cage for the selected player. Note: After unlocking, you can build it directly, but it will not appear in the technology unlock menu.",

PlayerList_Base_Pal: "BASECAMP",

Expand Down
3 changes: 2 additions & 1 deletion frontend/palworld-pal-editor-webui/src/i18n/fr.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export default {
EntryView_BTN_Path_Picker: "Sélectionner le chemin",
EntryView_BTN_Load: "Charger la sauvegarde",
EntryView_Period: ".",
EntryView_Version_Warning: "Cette version n'a pas été construite par le pipeline CI/CD officiel. Veuillez faire preuve de prudence et vérifier la source.",

Editor_Note_Ghost_Pal: "CE PAL EST PROBABLEMENT NON RÉFÉRENCÉ DANS LE JEU",
Editor_Basic_Info: "INFOS DE BASE",
Expand Down Expand Up @@ -73,7 +74,7 @@ export default {
PalList_Text: "LISTE DES PALS",

PlayerList_Text: "LISTE DES JOUEURS",
PlayerList_Viewing_Cage: "Déverrouiller la cage d'observation pour ",
PlayerList_Viewing_Cage: "Déverrouiller la cage d'observation pour le joueur sélectionné. Remarque : Une fois déverrouillée, vous pouvez la construire directement, mais elle n'apparaîtra pas dans le menu de déverrouillage des technologies.",

PlayerList_Base_Pal: "Camp De Base",

Expand Down
Loading

0 comments on commit 61b508f

Please sign in to comment.