Skip to content

Commit c87bacf

Browse files
committed
fixed 4.17
1 parent b0dc3e5 commit c87bacf

File tree

2 files changed

+18
-16
lines changed

2 files changed

+18
-16
lines changed

Source/UnrealEnginePython/Private/UEPyModule.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3195,7 +3195,7 @@ UFunction *unreal_engine_add_function(UClass *u_class, char *name, PyObject *py_
31953195
prop_struct->Struct = TBaseStructure<FTransform>::Get();
31963196
prop = prop_struct;
31973197
}
3198-
#if ENGINE_MINOR_VERSION > 16
3198+
#if ENGINE_MINOR_VERSION > 17
31993199
else if ((PyTypeObject *)value == &ue_PyFQuatType)
32003200
{
32013201
UStructProperty *prop_struct = NewObject<UStructProperty>(function, UTF8_TO_TCHAR(p_name), RF_Public);
@@ -3248,7 +3248,7 @@ UFunction *unreal_engine_add_function(UClass *u_class, char *name, PyObject *py_
32483248
prop_base->SetPropertyClass(p_u_class);
32493249
prop = prop_base;
32503250
}
3251-
#if ENGINE_MINOR_VERSION > 16
3251+
#if ENGINE_MINOR_VERSION > 17
32523252
else if (py_obj->ue_object->IsA<UEnum>())
32533253
{
32543254
UEnumProperty *prop_enum = NewObject<UEnumProperty>(function, UTF8_TO_TCHAR(p_name), RF_Public);
@@ -3338,7 +3338,7 @@ UFunction *unreal_engine_add_function(UClass *u_class, char *name, PyObject *py_
33383338
prop_struct->Struct = TBaseStructure<FTransform>::Get();
33393339
prop = prop_struct;
33403340
}
3341-
#if ENGINE_MINOR_VERSION > 16
3341+
#if ENGINE_MINOR_VERSION > 17
33423342
else if ((PyTypeObject *)py_return_value == &ue_PyFQuatType)
33433343
{
33443344
UStructProperty *prop_struct = NewObject<UStructProperty>(function, UTF8_TO_TCHAR(p_name), RF_Public);
@@ -3391,7 +3391,7 @@ UFunction *unreal_engine_add_function(UClass *u_class, char *name, PyObject *py_
33913391
prop_base->SetPropertyClass(p_u_class);
33923392
prop = prop_base;
33933393
}
3394-
#if ENGINE_MINOR_VERSION > 16
3394+
#if ENGINE_MINOR_VERSION > 17
33953395
else if (py_obj->ue_object->IsA<UEnum>())
33963396
{
33973397
UEnumProperty *prop_enum = NewObject<UEnumProperty>(function, UTF8_TO_TCHAR(p_name), RF_Public);

tools/release_win64.py

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,11 @@
55
import shutil
66
import zipfile
77

8-
UE_VERSIONS = ['4.15', '4.16', '4.17', '4.18', '4.19', '4.20']
9-
PYTHON_VERSIONS = ["C:/Program Files/Python36", "C:/Program Files/Python37", "C:/Python27"]
8+
UE_VERSIONS = ['4.15', '4.16', '4.17', '4.18', '4.19', '4.20', '4.21']
9+
PYTHON_VERSIONS = ["C:/Program Files/Python37", "C:/Program Files/Python36", "C:/Python27"]
10+
MSBUILD = 'C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/MSBuild/15.0/Bin/MSBuild.exe'
11+
UE_PATH = 'C:/Program Files/Epic Games'
12+
PROJECTS_PATH = 'C:/Users/rober/Documents/Unreal Projects'
1013

1114
RELEASE_DIR = sys.argv[1].rstrip('/')
1215

@@ -20,28 +23,27 @@ def msbuild(project, python_version):
2023
base_environ = os.environ
2124
base_environ.update({'PYTHONHOME': python_version})
2225
base_environ.update({'UEP_ENABLE_UNITY_BUILD': '1'})
23-
#vs = '"C:/Program Files (x86)/MSBuild/14.0/Bin/MSBuild.exe"'
24-
vs = '"C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/MSBuild/15.0/Bin/MSBuild.exe"'
25-
process = subprocess.Popen('{0} {1} /m /t:Rebuild /p:Configuration="Development Editor" /p:Platform=Win64'.format(vs, project), env=base_environ)
26+
vs = '"{}"'.format(MSBUILD)
27+
process = subprocess.Popen('{0} "{1}" /m /t:Rebuild /p:Configuration="Development Editor" /p:Platform=Win64'.format(vs, project), env=base_environ)
2628
while process.poll() is None:
2729
time.sleep(0.5)
2830
if process.returncode != 0:
2931
sys.exit(process.returncode)
3032

3133
def commandlet(version, project):
32-
ue_editor = os.path.join('D:/', 'UE_{0}'.format(version), 'Engine/Binaries/Win64/UE4Editor-Cmd.exe')
33-
process = subprocess.Popen('{0} D:/{1}/{2}.uproject -run=PyCommandlet D:/{3}/Plugins/UnrealEnginePython/tools/release_check.py'.format(ue_editor, project, project, project))
34+
ue_editor = os.path.join(UE_PATH, 'UE_{0}'.format(version), 'Engine/Binaries/Win64/UE4Editor-Cmd.exe')
35+
process = subprocess.Popen('{0} {1}/{2}/{3}.uproject -run=PyCommandlet {1}/{4}/Plugins/UnrealEnginePython/tools/release_check.py'.format(ue_editor, PROJECTS_PATH, project, project, project))
3436
while process.poll() is None:
3537
time.sleep(0.5)
3638
# ignore return code, has too much different meanings for commandlets
3739

3840
def git(project):
39-
process = subprocess.Popen('git checkout master', cwd='D:/{0}/Plugins/UnrealEnginePython'.format(project))
41+
process = subprocess.Popen('git checkout master', cwd='{0}/{1}/Plugins/UnrealEnginePython'.format(PROJECTS_PATH, project))
4042
while process.poll() is None:
4143
time.sleep(0.5)
4244
if process.returncode != 0:
4345
sys.exit(process.returncode)
44-
process = subprocess.Popen('git pull', cwd='D:/{0}/Plugins/UnrealEnginePython'.format(project))
46+
process = subprocess.Popen('git pull', cwd='{0}/{1}/Plugins/UnrealEnginePython'.format(PROJECTS_PATH, project))
4547
while process.poll() is None:
4648
time.sleep(0.5)
4749
if process.returncode != 0:
@@ -51,7 +53,7 @@ def git(project):
5153
main_start = time.time()
5254
for ue_version in UE_VERSIONS:
5355
project = 'PyTest{0}'.format(ue_version.replace('.', ''))
54-
sln = os.path.join('D:/', project, '{0}.sln'.format(project))
56+
sln = os.path.join(PROJECTS_PATH, project, '{0}.sln'.format(project))
5557
git(project)
5658
for python_version in PYTHON_VERSIONS:
5759
python_sanitized = os.path.basename(python_version).lower()
@@ -62,9 +64,9 @@ def git(project):
6264
commandlet(ue_version, project)
6365
end = time.time()
6466
for item in ('UE4Editor.modules', 'UE4Editor-UnrealEnginePython.dll', 'UE4Editor-PythonConsole.dll', 'UE4Editor-PythonEditor.dll', 'UE4Editor-PythonAutomation.dll'):
65-
shutil.copyfile('D:/{0}/Plugins/UnrealEnginePython/Binaries/Win64/{1}'.format(project, item), '{0}/UnrealEnginePython/Binaries/Win64/{1}'.format(RELEASE_DIR, item))
67+
shutil.copyfile('{0}/{1}/Plugins/UnrealEnginePython/Binaries/Win64/{2}'.format(PROJECTS_PATH, project, item), '{0}/UnrealEnginePython/Binaries/Win64/{1}'.format(RELEASE_DIR, item))
6668
if python_sanitized == 'python36':
67-
shutil.copyfile('D:/{0}/Plugins/UnrealEnginePython/Binaries/Win64/{1}'.format(project, item), '{0}/Embedded/UnrealEnginePython/Binaries/Win64/{1}'.format(RELEASE_DIR, item))
69+
shutil.copyfile('{0}/{1}/Plugins/UnrealEnginePython/Binaries/Win64/{2}'.format(PROJECTS_PATH, project, item), '{0}/Embedded/UnrealEnginePython/Binaries/Win64/{1}'.format(RELEASE_DIR, item))
6870
filename = 'UnrealEnginePython_{0}_{1}_{2}_win64.zip'.format(os.path.basename(RELEASE_DIR), ue_version.replace('.','_'), python_sanitized)
6971
zh = zipfile.ZipFile(os.path.join(RELEASE_DIR, filename), 'w', zipfile.ZIP_DEFLATED)
7072
zipdir(os.path.join(RELEASE_DIR, 'UnrealEnginePython'), zh, RELEASE_DIR)

0 commit comments

Comments
 (0)