Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
/epicgamesstore/buildpatchtool
/epicgamesstore/upload
/epicgamesstore/macos
/epicgamesstore/windows
libssl/android/output
libssl/openssl
22 changes: 22 additions & 0 deletions epicgamesstore/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Epic Games Store


## Download BuildPatchTool

```shell
./updateTool.sh
```

## Run BuildPatchTool

```shell
export CLIENTID="foobar123"
export CLIENTSECRET="foobar123"
export ORGANIZATION_ID="foobar123"
export PRODUCT_ID="foobar123"
export ARTIFACT_ID="foobar123"
```

```shell
./runTool.sh
```
84 changes: 84 additions & 0 deletions epicgamesstore/runTool.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
#!/bin/bash

# exit when any command fails
set -e

CUBZH_RELEASE_BUILD_VERSION="0.1.1_175"

SCRIPT_PATH=`readlink -f "${BASH_SOURCE:-$0}"`
SCRIPT_DIR=`dirname ${SCRIPT_PATH}`
# echo "SCRIPT_DIR: ${SCRIPT_DIR}"

# ------------------------------
# Cubzh release paths
# ------------------------------

_CUBZH_RELEASE_DIR="/Users/gaetan/projects/voxowl/particubes-private/distribution/builds"
CUBZH_RELEASE_WINDOWS_ABSPATH="${_CUBZH_RELEASE_DIR}/Cubzh.exe"
CUBZH_RELEASE_MACOS_ABSPATH="${_CUBZH_RELEASE_DIR}/Cubzh.zip"

# ------------------------------
# Epic Games Store
# ------------------------------

# Those are env vars
# CLIENTID=""
# CLIENTSECRET=""
# ORGANIZATION_ID=""
# PRODUCT_ID=""
# ARTIFACT_ID=""

# ------------------------------
# Prepare upload
# ------------------------------

mkdir -p $SCRIPT_DIR/macos
mkdir -p $SCRIPT_DIR/upload
mkdir -p $SCRIPT_DIR/windows

rm -rf $SCRIPT_DIR/macos/*
rm -rf $SCRIPT_DIR/upload/*
rm -rf $SCRIPT_DIR/windows/*

# ------------------------------
# Upload build
# ------------------------------

# Copy release from project to local directory
# Windows
cp $CUBZH_RELEASE_WINDOWS_ABSPATH $SCRIPT_DIR/windows/Cubzh.exe
# macOS
cp $CUBZH_RELEASE_MACOS_ABSPATH $SCRIPT_DIR/macos/Cubzh.zip
unzip -d $SCRIPT_DIR/macos $SCRIPT_DIR/macos/Cubzh.zip
rm $SCRIPT_DIR/macos/Cubzh.zip

# Send Windows build to Epic Games Store
$SCRIPT_DIR/buildpatchtool/tool/Engine/Binaries/Mac/BuildPatchTool \
-OrganizationId="${ORGANIZATION_ID}" \
-ProductId="${PRODUCT_ID}" \
-ArtifactId="${ARTIFACT_ID}" \
-ClientId="${CLIENTID}" \
-ClientSecret="${CLIENTSECRET}" \
-mode=UploadBinary \
-BuildRoot="${SCRIPT_DIR}/windows" \
-CloudDir="${SCRIPT_DIR}/upload" \
-BuildVersion="${CUBZH_RELEASE_BUILD_VERSION}_windows" \
-AppLaunch="Cubzh.exe" \
-AppArgs=""

# cleanup
rm -rf $SCRIPT_DIR/upload/*

# Send macOS build to Epic Games Store
$SCRIPT_DIR/buildpatchtool/tool/Engine/Binaries/Mac/BuildPatchTool \
-OrganizationId="${ORGANIZATION_ID}" \
-ProductId="${PRODUCT_ID}" \
-ArtifactId="${ARTIFACT_ID}" \
-ClientId="${CLIENTID}" \
-ClientSecret="${CLIENTSECRET}" \
-mode=UploadBinary \
-BuildRoot="${SCRIPT_DIR}/macos" \
-CloudDir="${SCRIPT_DIR}/upload" \
-BuildVersion="${CUBZH_RELEASE_BUILD_VERSION}_macos" \
-AppLaunch="Cubzh.app/Contents/MacOS/Cubzh" \
-AppArgs=""
14 changes: 14 additions & 0 deletions epicgamesstore/updateTool.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash

# exit when any command fails
set -e

# download tool
rm -rf ./buildpatchtool
mkdir ./buildpatchtool
curl -L -o ./buildpatchtool/tool.zip https://launcher-public-service-prod06.ol.epicgames.com/launcher/api/installer/download/BuildPatchTool.zip

# unzip tool
unzip -u -d ./buildpatchtool/tool ./buildpatchtool/tool.zip

rm ./buildpatchtool/tool.zip