issue in compiled binary
husseinamine opened this issue · 5 comments
basically while loading game data you have to include the main_dir path to be able to run using the binary itself without downloading any game data with it as the game data is embedded in the binary BUT the data is stored in a temporary directory so configuration files should be made or accessed in the directory the user is running from on start of the binary wich is already happening
so whats wrong?
instead of just importing game data prepend the main_dir to the path of the data ur loading
Hmm, I am not quite sure if I understand you correctly but I guess this is the problem when you add the data folder into the binary exe file itself right? In the previous releases, I compile only the main.py and avoid adding data folder inside it and keep them separate so the players can edit them.
Here is the spec file I used in the previous build:
-- mode: python ; coding: utf-8 --
block_cipher = None
a = Analysis(['main.py'],
pathex=['C:\Users\masendor\Documents\PycharmProjects\Masendor\RTS'],
binaries=[],
datas=[],
hiddenimports=[],
hookspath=[],
runtime_hooks=[],
excludes=[],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher,
noarchive=False)
pyz = PYZ(a.pure, a.zipped_data,
cipher=block_cipher)
exe = EXE(pyz,
a.scripts,
[],
exclude_binaries=True,
name='main',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
console=True )
coll = COLLECT(exe,
a.binaries,
a.zipfiles,
a.datas,
strip=False,
upx=True,
upx_exclude=[],
name='main')
I add main.spec in the new update. Probably should have done that before. Sorry about that.
ohhh lol yes thats what i meant i made it compilated it when i said it basically i meant that in the code ur not putting hte absolute path so its looking for the data directory in the running directory ok i got it its better if the user can edit the data anyways the user can make his own mod of the game for example
this issue should be closed i guess and i guess u need to remove the compile.spec file cuz its not needed
@husseinraed No worry glad that clear up :) thanks for the help with this.
hello just wanted to say i deleted it u can just merge the branch if, btw np just helping