warp icon indicating copy to clipboard operation
warp copied to clipboard

Does not work in some scenarios

Open andrewsav-bt opened this issue 6 years ago • 5 comments

Running on windows similar to:

warp-packer --exec E:\path\to\folder\file.exe --input_dir E:\path\to\folder --output G:\some\test.exe --arch windows-x64

Then running test.exe. Working locally, but copying on another machine getting:

Error: Os { code: 2, kind: NotFound, message: "The system cannot find the file specified." }

If I copy E:\path\to\folder to that same machine and run file.exe everything is working as expected.

The application being wrapped in a ,net core app. Note that I went through the steps with myapp.exe from readme and that simple application also worked fine when copied to the other machine. So it looks there are some more complex interactions at work here...

Is it possible to get some debug output somehow?

andrewsav-bt avatar Dec 10 '18 03:12 andrewsav-bt

Can you set WARP_TRACE=1 environment variable when running the self-contained executable? This should show some debugging output.

dgiagio avatar Dec 11 '18 01:12 dgiagio

It prints the following:

2018-12-11 16:14:07 TRACE [warp_runner] self_path="C:\\Users\\asavinykh\\test.exe"
2018-12-11 16:14:07 TRACE [warp_runner] self_file_name="test.exe"
2018-12-11 16:14:07 TRACE [warp_runner] cache_path="C:\\Users\\asavinykh\\AppData\\Local\\warp\\packages\\test.exe"
2018-12-11 16:14:07 TRACE [warp_runner] target_exec="E:\\Sources\\DevOps\\HelperApps\\OctoVars\\bin\\Debug\\netcoreapp2.1\\win10-x64\\publish\\OctoVars.exe"
2018-12-11 16:14:07 TRACE [warp_runner] target_path="E:\\Sources\\DevOps\\HelperApps\\OctoVars\\bin\\Debug\\netcoreapp2.1\\win10-x64\\publish\\OctoVars.exe"
2018-12-11 16:14:07 TRACE [warp_runner] cache is up-to-date
2018-12-11 16:14:07 TRACE [warp_runner::executor] target="E:\\Sources\\DevOps\\HelperApps\\OctoVars\\bin\\Debug\\netcoreapp2.1\\win10-x64\\publish\\OctoVars.exe"
2018-12-11 16:14:07 TRACE [warp_runner::executor] args=[]
Error: Os { code: 2, kind: NotFound, message: "The system cannot find the file specified." }

Note that this box does not have disk E. Is it a factor?

andrewsav-bt avatar Dec 11 '18 03:12 andrewsav-bt

Seems like it's getting confused with the drive letters. Can you try going to drive E:\ and running warp-packer from there using relative directories like the example?

E:\> cd \path\to\folder
E:\path\to\folder> warp-packer --arch windows-x64 --input_dir . --exec file.exe --output G:\some\test.exe

dgiagio avatar Dec 11 '18 21:12 dgiagio

@dgiagio yep, that worked, thanks. Do you think it's worth fixing in code?

andrewsav-bt avatar Dec 13 '18 22:12 andrewsav-bt

Unrelated to the issue question, am I guessing right, that if a program is looking for it's config file in the executable folder, it's unlikely to find it because the executable is in the cache folder, and the config in the wrapped program folder?

andrewsav-bt avatar Dec 13 '18 22:12 andrewsav-bt