Disable DynOS compression for non-dev again

This commit is contained in:
Agent X 2024-07-03 18:38:06 -04:00
parent b2042864dc
commit bc63f96f2b
3 changed files with 13 additions and 2 deletions

View file

@ -149,10 +149,12 @@ static void DynOS_Actor_Generate(const SysPath &aPackFolder, Array<Pair<u64, Str
// If there is an existing binary file for this layout, skip and go to the next actor // If there is an existing binary file for this layout, skip and go to the next actor
SysPath _BinFilename = fstring("%s/%s.bin", aPackFolder.c_str(), _GeoRootName.begin()); SysPath _BinFilename = fstring("%s/%s.bin", aPackFolder.c_str(), _GeoRootName.begin());
if (fs_sys_file_exists(_BinFilename.c_str())) { if (fs_sys_file_exists(_BinFilename.c_str())) {
#ifdef DEVELOPMENT
// Compress file to gain some space // Compress file to gain some space
if (!DynOS_Bin_IsCompressed(_BinFilename)) { if (!DynOS_Bin_IsCompressed(_BinFilename)) {
DynOS_Bin_Compress(_BinFilename); DynOS_Bin_Compress(_BinFilename);
} }
#endif
return; return;
} }
} }
@ -258,12 +260,14 @@ void DynOS_Actor_GeneratePack(const SysPath &aPackFolder) {
if (SysPath(_PackEnt->d_name) == ".") continue; if (SysPath(_PackEnt->d_name) == ".") continue;
if (SysPath(_PackEnt->d_name) == "..") continue; if (SysPath(_PackEnt->d_name) == "..") continue;
#ifdef DEVELOPMENT
// Compress .bin files to gain some space // Compress .bin files to gain some space
SysPath _Filename = fstring("%s/%s", aPackFolder.c_str(), _PackEnt->d_name); SysPath _Filename = fstring("%s/%s", aPackFolder.c_str(), _PackEnt->d_name);
if (SysPath(_PackEnt->d_name).find(".bin") != SysPath::npos && !DynOS_Bin_IsCompressed(_Filename)) { if (SysPath(_PackEnt->d_name).find(".bin") != SysPath::npos && !DynOS_Bin_IsCompressed(_Filename)) {
DynOS_Bin_Compress(_Filename); DynOS_Bin_Compress(_Filename);
continue; continue;
} }
#endif
// For each subfolder, read tokens from model.inc.c and geo.inc.c // For each subfolder, read tokens from model.inc.c and geo.inc.c
SysPath _Folder = fstring("%s/%s", aPackFolder.c_str(), _PackEnt->d_name); SysPath _Folder = fstring("%s/%s", aPackFolder.c_str(), _PackEnt->d_name);

View file

@ -691,11 +691,13 @@ void DynOS_Col_Generate(const SysPath &aPackFolder, Array<Pair<u64, String>> _Ac
// If there is an existing binary file for this collision, skip and go to the next actor // If there is an existing binary file for this collision, skip and go to the next actor
SysPath _ColFilename = fstring("%s/%s.col", aPackFolder.c_str(), _ColRootName.begin()); SysPath _ColFilename = fstring("%s/%s.col", aPackFolder.c_str(), _ColRootName.begin());
if (fs_sys_file_exists(_ColFilename.c_str())) { if (fs_sys_file_exists(_ColFilename.c_str())) {
#ifdef DEVELOPMENT
// Compress file to gain some space // Compress file to gain some space
if (!DynOS_Bin_IsCompressed(_ColFilename)) { if (!DynOS_Bin_IsCompressed(_ColFilename)) {
DynOS_Bin_Compress(_ColFilename); DynOS_Bin_Compress(_ColFilename);
} }
continue; continue;
#endif
} }
// Init // Init

View file

@ -1119,10 +1119,12 @@ static bool DynOS_Lvl_GeneratePack_Internal(const SysPath &aPackFolder, Array<Pa
// If there is an existing binary file for this level, skip and go to the next level // If there is an existing binary file for this level, skip and go to the next level
SysPath _LvlFilename = fstring("%s/%s.lvl", aPackFolder.c_str(), _LvlRootName.begin()); SysPath _LvlFilename = fstring("%s/%s.lvl", aPackFolder.c_str(), _LvlRootName.begin());
if (fs_sys_file_exists(_LvlFilename.c_str())) { if (fs_sys_file_exists(_LvlFilename.c_str())) {
#ifdef DEVELOPMENT
// Compress file to gain some space // Compress file to gain some space
if (!DynOS_Bin_IsCompressed(_LvlFilename)) { if (!DynOS_Bin_IsCompressed(_LvlFilename)) {
DynOS_Bin_Compress(_LvlFilename); DynOS_Bin_Compress(_LvlFilename);
} }
#endif
continue; continue;
} }
@ -1245,12 +1247,15 @@ void DynOS_Lvl_GeneratePack(const SysPath &aPackFolder) {
if (SysPath(_PackEnt->d_name) == ".") continue; if (SysPath(_PackEnt->d_name) == ".") continue;
if (SysPath(_PackEnt->d_name) == "..") continue; if (SysPath(_PackEnt->d_name) == "..") continue;
#ifdef DEVELOPMENT
// Compress .lvl files to gain some space // Compress .lvl files to gain some space
SysPath _Filename = fstring("%s/%s", aPackFolder.c_str(), _PackEnt->d_name); // TODO: is this required anymore?
/*SysPath _Filename = fstring("%s/%s", aPackFolder.c_str(), _PackEnt->d_name);
if (SysPath(_PackEnt->d_name).find(".lvl") != SysPath::npos && !DynOS_Bin_IsCompressed(_Filename)) { if (SysPath(_PackEnt->d_name).find(".lvl") != SysPath::npos && !DynOS_Bin_IsCompressed(_Filename)) {
DynOS_Bin_Compress(_Filename); DynOS_Bin_Compress(_Filename);
continue; continue;
} }*/
#endif
// For each subfolder, read tokens from script.c // For each subfolder, read tokens from script.c
SysPath _Folder = fstring("%s/%s", aPackFolder.c_str(), _PackEnt->d_name); SysPath _Folder = fstring("%s/%s", aPackFolder.c_str(), _PackEnt->d_name);