Skip to content

Commit

Permalink
Release/v0.1.3 (#13)
Browse files Browse the repository at this point in the history
Co-authored-by: Xavrax <[email protected]>
  • Loading branch information
KGronek-Pubnub and Xavrax authored Sep 23, 2024
1 parent e9692e9 commit d4e72e9
Show file tree
Hide file tree
Showing 3 changed files with 112 additions and 3 deletions.
42 changes: 42 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Visual Studio 2015 user specific files
.vs/

# Compiled Object files
*.slo
*.lo
*.o
*.obj

# Precompiled Headers
*.gch
*.pch


# Fortran module files
*.mod

# Executables
*.exe
*.out
*.app
*.ipa

# These project files can be generated by the engine
*.xcodeproj
*.xcworkspace
*.sln
*.suo
*.opensdf
*.sdf
*.VC.db
*.VC.opendb

# Precompiled Assets
SourceArt/**/*.png
SourceArt/**/*.tga

# Binary Files
Binaries/*

# Compiled source files for the engine to use
Intermediate/*
6 changes: 3 additions & 3 deletions PubnubChat.uplugin
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"FileVersion": 3,
"Version": 3,
"VersionName": "0.1.2",
"Version": 4,
"VersionName": "0.1.3",
"FriendlyName": "Pubnub Chat SDK",
"Description": "Quickly and easily integrate a real-time text chat solution that is reliable, flexible, and scalable.",
"Category": "Code",
"CreatedBy": "PubNub Inc.",
"CreatedByURL": "https://www.pubnub.com/",
"DocsURL": "https://www.pubnub.com/docs/chat/unreal-chat-sdk/overview",
"MarketplaceURL": "",
"MarketplaceURL": "com.epicgames.launcher://ue/marketplace/product/6c1cddf71c29441aaf2e80af29626829",
"SupportURL": "",
"CanContainContent": true,
"IsBetaVersion": false,
Expand Down
67 changes: 67 additions & 0 deletions make_packages.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
import os
import glob
import itertools
import shutil
import json
import zipfile

print("Creating packages for Unreal Engine chat")
supported_ue_versions = ["5.0.0", "5.1.0", "5.2.0", "5.3.0", "5.4.0"]

print("Preparing files")

current_dir = os.path.dirname(os.path.realpath(__file__))
temporary_dir = current_dir + "/../Pubnub/"

shutil.copytree(current_dir, temporary_dir)

os.remove(temporary_dir + "/LICENSE")
os.remove(temporary_dir + "/make_packages.py")
os.remove(temporary_dir + "/.gitignore")
os.remove(temporary_dir + "/README.md")

shutil.rmtree(temporary_dir + "/.github", ignore_errors=True)
shutil.rmtree(temporary_dir + "/.git", ignore_errors=True)
shutil.rmtree(temporary_dir + "/readme_content", ignore_errors=True)

cpp_files = itertools.chain(
glob.glob(temporary_dir + "/**/*.cpp", recursive=True),
glob.glob(temporary_dir + "/**/*.hpp", recursive=True),
glob.glob(temporary_dir + "/**/*.c", recursive=True),
glob.glob(temporary_dir + "/**/*.h", recursive=True),
)

for version in supported_ue_versions:
print("Creating package for Unreal Engine " + version)
with open(temporary_dir + "/PubnubChat.uplugin", "r") as uplugin_file:
uplugin = json.load(uplugin_file)
uplugin["EngineVersion"] = version
plugin_version = uplugin["VersionName"]
with open(
temporary_dir + "/PubnubChat.uplugin", "w"
) as uplugin_file_write:
json.dump(uplugin, uplugin_file_write, indent=4)

zipf = zipfile.ZipFile(
temporary_dir
+ "../Pubnub-chat-"
+ plugin_version
+ "-ue"
+ version
+ ".zip",
"w",
zipfile.ZIP_DEFLATED,
)

for root, dirs, inner_files in os.walk(temporary_dir):
for file in inner_files:
zipf.write(
os.path.join(root, file),
os.path.relpath(
os.path.join(root, file), os.path.join(temporary_dir, "..")
),
)

zipf.close()

shutil.rmtree(temporary_dir, ignore_errors=True)

0 comments on commit d4e72e9

Please sign in to comment.