mirror of
https://github.com/dcs-liberation/dcs_liberation.git
synced 2025-11-10 14:22:26 +00:00
Merge
This commit is contained in:
commit
7ca435337f
11
.gitignore
vendored
11
.gitignore
vendored
@ -10,13 +10,4 @@ a.py
|
|||||||
resources/tools/a.miz
|
resources/tools/a.miz
|
||||||
tests/**
|
tests/**
|
||||||
# User-specific stuff
|
# User-specific stuff
|
||||||
.idea/**/workspace.xml
|
.idea/
|
||||||
.idea/**/tasks.xml
|
|
||||||
.idea/**/dictionaries
|
|
||||||
.idea/**/shelf
|
|
||||||
.idea/misc.xml
|
|
||||||
.idea/*.iml
|
|
||||||
*.iml
|
|
||||||
.idea
|
|
||||||
.idea/*.xml
|
|
||||||
.idea/**/*.xml
|
|
||||||
|
|||||||
3
.gitmodules
vendored
3
.gitmodules
vendored
@ -1,3 +0,0 @@
|
|||||||
[submodule "submodules/dcs"]
|
|
||||||
path = submodules/dcs
|
|
||||||
url = https://github.com/pydcs/dcs
|
|
||||||
38
a.py
38
a.py
@ -1,38 +0,0 @@
|
|||||||
from theater.caucasus import *
|
|
||||||
from gen.conflictgen import Conflict
|
|
||||||
|
|
||||||
from matplotlib import pyplot
|
|
||||||
from matplotlib import lines
|
|
||||||
from shapely import geometry
|
|
||||||
from shapely.geometry import Polygon
|
|
||||||
from descartes.patch import PolygonPatch
|
|
||||||
|
|
||||||
def put_lines(ls, ax):
|
|
||||||
for g in ls.geoms:
|
|
||||||
ax.plot([g.xy[0][0], g.xy[0][1]], [g.xy[1][0], g.xy[1][1]])
|
|
||||||
|
|
||||||
cau = CaucasusTheater()
|
|
||||||
#left, heading, dist = Conflict.frontline_vector(cau.soganlug, cau.kutaisi, cau)
|
|
||||||
#right = left.point_from_heading(heading, dist)
|
|
||||||
|
|
||||||
left, heading = Conflict.frontline_position(cau, cau.soganlug, cau.kutaisi)
|
|
||||||
right = left.point_from_heading(heading+90, 80000)
|
|
||||||
left = left.point_from_heading(heading-90, 80000)
|
|
||||||
|
|
||||||
line = geometry.LineString([(left.x, left.y), (right.x, right.y)])
|
|
||||||
line = line.intersection(cau.land_poly)
|
|
||||||
|
|
||||||
fig = pyplot.figure(1, figsize=(20, 20), dpi=90)
|
|
||||||
ax = fig.add_subplot(121)
|
|
||||||
ax.set_ylim([0, 1500000])
|
|
||||||
ax.set_xlim([-600000, 400000])
|
|
||||||
|
|
||||||
patch = PolygonPatch(cau.land_poly, facecolor=(0, 0, 0), edgecolor=(0, 0, 0), alpha=0.5, zorder=2)
|
|
||||||
ax.add_patch(patch)
|
|
||||||
ax.plot([left.x, right.x], [left.y, right.y], 'k-', lw=2)
|
|
||||||
|
|
||||||
ax.plot([cau.soganlug.position.x, cau.soganlug.position.x+1000], [cau.soganlug.position.y, cau.soganlug.position.y+1000], lw=5)
|
|
||||||
ax.plot([cau.kutaisi.position.x, cau.kutaisi.position.x+1000], [cau.kutaisi.position.y, cau.kutaisi.position.y+1000], lw=5)
|
|
||||||
put_lines(line, ax)
|
|
||||||
pyplot.show()
|
|
||||||
|
|
||||||
@ -3,13 +3,14 @@
|
|||||||
block_cipher = None
|
block_cipher = None
|
||||||
|
|
||||||
|
|
||||||
a = Analysis(['__init__.py'],
|
analysis = Analysis(
|
||||||
pathex=['C:\\Users\\shdwp\\PycharmProjects\\dcs_liberation'],
|
['__init__.py'],
|
||||||
|
pathex=['.'],
|
||||||
binaries=[],
|
binaries=[],
|
||||||
datas=[
|
datas=[
|
||||||
('resources', 'resources'),
|
('resources', 'resources'),
|
||||||
('submodules/dcs/dcs/terrain/caucasus.p', 'dcs/terrain/'),
|
('resources/caucasus.p', 'dcs/terrain/'),
|
||||||
('submodules/dcs/dcs/terrain/nevada.p', 'dcs/terrain/'),
|
('resources/nevada.p', 'dcs/terrain/'),
|
||||||
],
|
],
|
||||||
hookspath=[],
|
hookspath=[],
|
||||||
runtime_hooks=[],
|
runtime_hooks=[],
|
||||||
@ -17,11 +18,16 @@ a = Analysis(['__init__.py'],
|
|||||||
win_no_prefer_redirects=False,
|
win_no_prefer_redirects=False,
|
||||||
win_private_assemblies=False,
|
win_private_assemblies=False,
|
||||||
cipher=block_cipher,
|
cipher=block_cipher,
|
||||||
noarchive=False)
|
noarchive=False,
|
||||||
pyz = PYZ(a.pure, a.zipped_data,
|
)
|
||||||
cipher=block_cipher)
|
pyz = PYZ(
|
||||||
exe = EXE(pyz,
|
analysis.pure,
|
||||||
a.scripts,
|
analysis.zipped_data,
|
||||||
|
cipher=block_cipher,
|
||||||
|
)
|
||||||
|
exe = EXE(
|
||||||
|
pyz,
|
||||||
|
analysis.scripts,
|
||||||
[],
|
[],
|
||||||
icon="resources/icon.ico",
|
icon="resources/icon.ico",
|
||||||
exclude_binaries=True,
|
exclude_binaries=True,
|
||||||
@ -30,11 +36,14 @@ exe = EXE(pyz,
|
|||||||
bootloader_ignore_signals=False,
|
bootloader_ignore_signals=False,
|
||||||
strip=False,
|
strip=False,
|
||||||
upx=True,
|
upx=True,
|
||||||
console=True )
|
console=True,
|
||||||
coll = COLLECT(exe,
|
)
|
||||||
a.binaries,
|
coll = COLLECT(
|
||||||
a.zipfiles,
|
exe,
|
||||||
a.datas,
|
analysis.binaries,
|
||||||
|
analysis.zipfiles,
|
||||||
|
analysis.datas,
|
||||||
strip=False,
|
strip=False,
|
||||||
upx=True,
|
upx=True,
|
||||||
name='dcs_liberation')
|
name='dcs_liberation',
|
||||||
|
)
|
||||||
|
|||||||
3
requirements.txt
Normal file
3
requirements.txt
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
pygame
|
||||||
|
pydcs>=0.9.3
|
||||||
|
pyinstaller
|
||||||
BIN
resources/caucasus.p
Normal file
BIN
resources/caucasus.p
Normal file
Binary file not shown.
BIN
resources/nevada.p
Normal file
BIN
resources/nevada.p
Normal file
Binary file not shown.
@ -7,12 +7,10 @@ from zipfile import *
|
|||||||
IGNORED_PATHS = [
|
IGNORED_PATHS = [
|
||||||
"__pycache__",
|
"__pycache__",
|
||||||
".gitignore",
|
".gitignore",
|
||||||
".gitmodules",
|
|
||||||
".git",
|
".git",
|
||||||
".idea",
|
".idea",
|
||||||
".DS_Store",
|
".DS_Store",
|
||||||
"submodules",
|
"requirements.txt",
|
||||||
|
|
||||||
"build",
|
"build",
|
||||||
"venv",
|
"venv",
|
||||||
]
|
]
|
||||||
@ -38,15 +36,16 @@ def _zip_dir(archieve, path):
|
|||||||
|
|
||||||
|
|
||||||
def _mk_archieve():
|
def _mk_archieve():
|
||||||
path = os.path.join("build", "dcs_liberation_{}.zip".format(VERSION))
|
path = os.path.join(os.path.dirname(__file__), os.pardir, os.pardir, "build", "dcs_liberation_{}.zip".format(VERSION))
|
||||||
if os.path.exists(path):
|
if os.path.exists(path):
|
||||||
print("version already exists")
|
print("version already exists")
|
||||||
return
|
return
|
||||||
|
|
||||||
|
try:
|
||||||
shutil.rmtree("./dist")
|
shutil.rmtree("./dist")
|
||||||
|
except FileNotFoundError:
|
||||||
|
pass
|
||||||
os.system("pyinstaller.exe pyinstaller.spec")
|
os.system("pyinstaller.exe pyinstaller.spec")
|
||||||
|
|
||||||
archieve = ZipFile(path, "w")
|
archieve = ZipFile(path, "w")
|
||||||
archieve.writestr("dcs_liberation.bat", "cd dist\\dcs_liberation\r\nliberation_main \"%UserProfile%\\Saved Games\" \"{}\"".format(VERSION))
|
archieve.writestr("dcs_liberation.bat", "cd dist\\dcs_liberation\r\nliberation_main \"%UserProfile%\\Saved Games\" \"{}\"".format(VERSION))
|
||||||
_zip_dir(archieve, "./dist/dcs_liberation")
|
_zip_dir(archieve, "./dist/dcs_liberation")
|
||||||
|
|||||||
@ -1 +0,0 @@
|
|||||||
Subproject commit 4fbb7ad3e0e2eecedc4e1dd14f2eb18025fef9f5
|
|
||||||
Loading…
x
Reference in New Issue
Block a user