Coder Social home page Coder Social logo

Build on Visual C++ about arc_unpacker HOT 10 CLOSED

vn-tools avatar vn-tools commented on August 29, 2024
Build on Visual C++

from arc_unpacker.

Comments (10)

rr- avatar rr- commented on August 29, 2024

Whoa, that's quite a few issues at once! I'm going to fix the AUX folder in a few hours.
Could you please create a pull request that shows the changes regarding p_file_saver_proxy so I can verify your fix?

Regarding general support for VS: like I said in README, pull requests are welcome - as long as it doesn't pollute / which should contain as few files as possible, I'm okay with it. Unfortunately I can't support it myself as I don't have neither VS or Windows (which probably won't change for a long time).

from arc_unpacker.

acaly avatar acaly commented on August 29, 2024

I missed one modification... Edited. So there are two.

I will create a pull request after aux is fixed, which prevents git clone.

from arc_unpacker.

rr- avatar rr- commented on August 29, 2024

Actually, for some reason I could clone it on this machine even though it's Windows as well.
The aux folder has been renamed to extra.

from arc_unpacker.

rr- avatar rr- commented on August 29, 2024

In formats/kirikiri/tlg_converter.cc, std::unique_ptr decode_tlg_0(File &file), change ::decode to decode. (In VC++, functions in inline namespace can not be refered to as this.)

In gcc and mingw, firing decode rather than ::decode at line 132 will cause infinite recursion. I'm going to rename it to something different. Edit: done

from arc_unpacker.

rr- avatar rr- commented on August 29, 2024

Please let me know if changing archive.cc like this:

diff --git a/src/formats/archive.cc b/src/formats/archive.cc
index 9d1d9f3..d8fd8f8 100644
--- a/src/formats/archive.cc
+++ b/src/formats/archive.cc
@@ -5,8 +5,10 @@ void Archive::unpack(File &file, FileSaver &file_saver) const
     if (!is_recognized(file))
         throw std::runtime_error("File is not recognized");

+    FileSaverCallback file_saver_proxy;
+
     //every file should be passed through registered transformers
-    FileSaverCallback file_saver_proxy([&](std::shared_ptr<File> saved_file)
+    file_saver_proxy.set_callback([&](std::shared_ptr<File> saved_file)
     {
         for (auto &transformer : transformers)
         {

lets you compile it in VS.

from arc_unpacker.

acaly avatar acaly commented on August 29, 2024

Thanks!

And sorry, I just find there are two more. As I did not use git, it turned out to be difficult to point out modifications.

In formats/microsoft/dds_converter.cc, there is a function called max, while on Windows, WindowsAPI provide a macro named max, prevent the function declaration from compiling. I'm not sure how this header is included. But as this function is never used, how about just removing it.

In formats/microsoft/exe_archive.cc, the character in path_sep is not recognized. Maybe using \x will fix.

And as for file_saver_proxy, set_callback works fine.

Anyway, I can check them on the new branch. Please wait for my result.

from arc_unpacker.

acaly avatar acaly commented on August 29, 2024

After some efforts CMake is working now. Please check the changes in my fork and let me know your suggestions. And I want to know whether CMake also works for linux.

On VS, there is still an error produced by the linker (caused by the auto-linking lib file in Boost). But it can be easily fixed by manually adding a library directory. My CMake can not properly do it. I will update the README and create a pull request later.

from arc_unpacker.

rr- avatar rr- commented on August 29, 2024

You should fire a pull request so I can verify the changes here on a line-by-line basis. (You will be able to correct things by committing to your repository.)

The changes overall look good except for a few cosmetic issues which I'll discuss after receiving a PR. I'll test Linux cmake likewise.

from arc_unpacker.

rr- avatar rr- commented on August 29, 2024

N.b. have you tried to adapt the existing build system, waf, to use MSVC? Apparently it's supported. If it is possible, I'm all for limiting the support to only one build system.

from arc_unpacker.

rr- avatar rr- commented on August 29, 2024

Closed in 7dde78b .

from arc_unpacker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.