diff options
| author | SulfurNitride <SulfurNitride@users.noreply.github.com> | 2026-02-14 15:40:33 -0600 |
|---|---|---|
| committer | SulfurNitride <SulfurNitride@users.noreply.github.com> | 2026-02-14 15:40:33 -0600 |
| commit | 6410929e17d642618f284d5c97d457f1ac653e6e (patch) | |
| tree | 5c0ee09e04f38a2dd70f1734d25c74e0b8ae5d43 /libs/bsatk/src | |
| parent | 817e8f5cd26739c69d930d21cd9dc4c0b6e4984e (diff) | |
Migrate data paths to ~/.local/share/fluorine/, add native build, fix %command% and system Proton scanning
- All data paths migrated from ~/.var/app/com.fluorine.manager/ to
~/.local/share/fluorine/ so native and Flatpak builds share the same
instances, plugins, and configs
- New fluorinepaths.h/.cpp with fluorineDataDir() helper and one-time
migration from old path (writes MOVED.txt breadcrumb)
- New libs/nak/src/paths.rs as Rust equivalent (data_dir())
- Strip %command% tokens from launch wrapper in protonlauncher.cpp
- Always scan /usr/share/steam/compatibilitytools.d/ for system Proton
packages (Arch installs Proton there); add Flatpak filesystem permission
- Native build (build-native.sh) installs to ~/.local/share/fluorine/
with desktop entry and ~/.local/bin symlink instead of portable zip
- build-flatpak.sh wrapper for Flatpak builds
- Fix container locale (LANG=C.UTF-8) for AutoUic warnings
- Fix prefixExists() to handle both compatdata and pfx directory layouts
- Fix globalInstancesRootPath() to use fluorineDataDir() on Linux
- Fix umu-run Flatpak lookup to use fluorineDataDir()
- Update README with build instructions and Arch dependency list
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Diffstat (limited to 'libs/bsatk/src')
| -rw-r--r-- | libs/bsatk/src/CMakeLists.txt | 3 | ||||
| -rw-r--r-- | libs/bsatk/src/bsaarchive.cpp | 12 | ||||
| -rw-r--r-- | libs/bsatk/src/bsafile.cpp | 1 |
3 files changed, 3 insertions, 13 deletions
diff --git a/libs/bsatk/src/CMakeLists.txt b/libs/bsatk/src/CMakeLists.txt index 99a0f26..d9b7be1 100644 --- a/libs/bsatk/src/CMakeLists.txt +++ b/libs/bsatk/src/CMakeLists.txt @@ -1,4 +1,7 @@ cmake_minimum_required(VERSION 3.16) +if(POLICY CMP0167) + cmake_policy(SET CMP0167 NEW) +endif() find_package(Boost REQUIRED COMPONENTS thread) find_package(ZLIB REQUIRED) diff --git a/libs/bsatk/src/bsaarchive.cpp b/libs/bsatk/src/bsaarchive.cpp index e1655c1..4ae94a6 100644 --- a/libs/bsatk/src/bsaarchive.cpp +++ b/libs/bsatk/src/bsaarchive.cpp @@ -446,11 +446,9 @@ EErrorCode Archive::write(const char* fileName) writeHeader(outfile, determineFileFlags(fileNames), static_cast<BSAULong>(folderNames.size()), folderNamesLength, fileNamesLength); -#pragma message("folders (and files?) need to be sorted by hash!") // dummy-pass: before we can store the actual folder data // prepare folder and file headers -#pragma message("it's unnecessary to write actual data, placeholders are sufficient") for (std::vector<Folder::Ptr>::const_iterator folderIter = folders.begin(); folderIter != folders.end(); ++folderIter) { (*folderIter)->writeHeader(outfile); @@ -673,7 +671,6 @@ EErrorCode Archive::extractDirect(File::Ptr file, std::ofstream& outFile) const if (namePrefixed()) { std::string fullName = readBString(m_File); if (size <= fullName.length()) { -#pragma message("report error!") return result; } size -= fullName.length() + 1; @@ -735,7 +732,6 @@ std::shared_ptr<unsigned char[]> Archive::decompress(unsigned char* inBuffer, stream.next_out = reinterpret_cast<Bytef*>(outBuffer.get()); zlibRet = inflate(&stream, Z_NO_FLUSH); if ((zlibRet != Z_OK) && (zlibRet != Z_STREAM_END) && (zlibRet != Z_BUF_ERROR)) { -#pragma message("pass result code to caller") throw std::runtime_error("invalid data"); } } while (stream.avail_out == 0); @@ -824,7 +820,6 @@ EErrorCode Archive::extractCompressed(File::Ptr file, std::ofstream& outFile) co if (namePrefixed()) { std::string fullName = readBString(m_File); if (inSize <= fullName.length()) { -#pragma message("report error!") return result; } inSize -= fullName.length() + 1; @@ -850,7 +845,6 @@ EErrorCode Archive::extractCompressed(File::Ptr file, std::ofstream& outFile) co if (namePrefixed()) { std::string fullName = readBString(m_File); if (inSize <= fullName.length()) { -#pragma message("report error!") return result; } inSize -= fullName.length() + 1; @@ -907,7 +901,6 @@ void Archive::readFiles(std::queue<FileInfo>& queue, boost::mutex& mutex, if (namePrefixed()) { std::string fullName = readBString(m_File); if (size <= fullName.length()) { -#pragma message("report error!") continue; } size -= fullName.length() + 1; @@ -954,7 +947,6 @@ void Archive::readFiles(std::queue<FileInfo>& queue, boost::mutex& mutex, reinterpret_cast<char*>(unpackedChunk.get()), length); unpackedChunk.reset(); } catch (const std::exception&) { -#pragma message("report error!") continue; } } else { @@ -1029,7 +1021,6 @@ void Archive::extractFiles(const std::string& targetDirectory, fstream::out | fstream::binary | fstream::trunc); if (!outputFile.is_open()) { -#pragma message("report error!") continue; // return ERROR_ACCESSFAILED; } @@ -1052,7 +1043,6 @@ void Archive::extractFiles(const std::string& targetDirectory, buffer.reset(); } } catch (const std::exception&) { -#pragma message("report error!") dataBuffer.first.reset(); fileInfo.data.first.reset(); continue; @@ -1121,7 +1111,6 @@ void Archive::extractFiles(const std::string& targetDirectory, dataBuffer.second); } } catch (const std::exception&) { -#pragma message("report error!") dataBuffer.first.reset(); fileInfo.data.first.reset(); continue; @@ -1151,7 +1140,6 @@ EErrorCode Archive::extractAll( const std::function<bool(int value, std::string fileName)>& progress, bool overwrite) { -#pragma message("report errors") createFolders(outputDirectory, m_RootFolder); std::vector<File::Ptr> fileList; diff --git a/libs/bsatk/src/bsafile.cpp b/libs/bsatk/src/bsafile.cpp index db4e4e6..3179c63 100644 --- a/libs/bsatk/src/bsafile.cpp +++ b/libs/bsatk/src/bsafile.cpp @@ -104,7 +104,6 @@ EErrorCode File::writeData(fstream& sourceArchive, fstream& targetArchive) const if (m_SourceFile.length() == 0) { // copy from source archive -#pragma message("we may have to compress/decompress!") sourceArchive.seekg(m_DataOffset, fstream::beg); try { |
