felicienfrancois / node-winresourcer

NodeJS wrapper for Anolis Resourcer (windows executable resource editor)
GNU General Public License v2.0
34 stars 8 forks source link

does not work at all on macos #7

Open indexofrefraction opened 5 years ago

indexofrefraction commented 5 years ago

hi, sadly, winresourcer does not work at all using macos. it fails with npm nw-builder and also if used directy...

winresourcer --operation=Update --exeFile=myfile.exe --resourceType=Icongroup  --resourceName=IDR_MAINFRAME --lang=1033 --resourceFile=myicon.ico

results in this error

Unhandled Exception:
System.IO.DirectoryNotFoundException: Could not find a part of the path "C:\users\...\Local Settings\Application Data\Anolis\Exceptions.log".
  at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean anonymous, System.IO.FileOptions options) [0x0017e] in <9727e7c25d434f57880423f7c033fc46>:0 
  at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.IO.FileOptions options, System.String msgPath, System.Boolean bFromProxy, System.Boolean useLongPath, System.Boolean checkHost) [0x00000] in <9727e7c25d434f57880423f7c033fc46>:0 
  at (wrapper remoting-invoke-with-check) System.IO.FileStream:.ctor (string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare,int,System.IO.FileOptions,string,bool,bool,bool)
  at System.IO.StreamWriter.CreateFile (System.String path, System.Boolean append, System.Boolean checkHost) [0x0001c] in <9727e7c25d434f57880423f7c033fc46>:0 
  at System.IO.StreamWriter..ctor (System.String path, System.Boolean append, System.Text.Encoding encoding, System.Int32 bufferSize, System.Boolean checkHost) [0x00055] in <9727e7c25d434f57880423f7c033fc46>:0 
  at System.IO.StreamWriter..ctor (System.String path, System.Boolean append, System.Text.Encoding encoding, System.Int32 bufferSize) [0x00000] in <9727e7c25d434f57880423f7c033fc46>:0 
  at System.IO.StreamWriter..ctor (System.String path, System.Boolean append) [0x00008] in <9727e7c25d434f57880423f7c033fc46>:0 
  at (wrapper remoting-invoke-with-check) System.IO.StreamWriter:.ctor (string,bool)
  at Anolis.Resourcer.Program.Main (System.String[] args) [0x001db] in <38d208fdc7254be09b356cc9fcca7ccf>:0 
[ERROR] FATAL UNHANDLED EXCEPTION: System.IO.DirectoryNotFoundException: Could not find a part of the path "C:\users\...\Local Settings\Application Data\Anolis\Exceptions.log".
  at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean anonymous, System.IO.FileOptions options) [0x0017e] in <9727e7c25d434f57880423f7c033fc46>:0 
  at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.IO.FileOptions options, System.String msgPath, System.Boolean bFromProxy, System.Boolean useLongPath, System.Boolean checkHost) [0x00000] in <9727e7c25d434f57880423f7c033fc46>:0 
  at (wrapper remoting-invoke-with-check) System.IO.FileStream:.ctor (string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare,int,System.IO.FileOptions,string,bool,bool,bool)
  at System.IO.StreamWriter.CreateFile (System.String path, System.Boolean append, System.Boolean checkHost) [0x0001c] in <9727e7c25d434f57880423f7c033fc46>:0 
  at System.IO.StreamWriter..ctor (System.String path, System.Boolean append, System.Text.Encoding encoding, System.Int32 bufferSize, System.Boolean checkHost) [0x00055] in <9727e7c25d434f57880423f7c033fc46>:0 
  at System.IO.StreamWriter..ctor (System.String path, System.Boolean append, System.Text.Encoding encoding, System.Int32 bufferSize) [0x00000] in <9727e7c25d434f57880423f7c033fc46>:0 
  at System.IO.StreamWriter..ctor (System.String path, System.Boolean append) [0x00008] in <9727e7c25d434f57880423f7c033fc46>:0 
  at (wrapper remoting-invoke-with-check) System.IO.StreamWriter:.ctor (string,bool)
  at Anolis.Resourcer.Program.Main (System.String[] args) [0x001db] in <38d208fdc7254be09b356cc9fcca7ccf>:0 

if i create the file Anolis/Exceptions.log

mkdir $HOME/.wine/drive_c/users/$USER/Local\ Settings/Application\ Data/Anolis
touch $HOME/.wine/drive_c/users/$USER/Local\ Settings/Application\ Data/Anolis/Exceptions.log

i get this in Exceptions.log

--------------------------------------------------------------------------------
2019-02-24T15:44:32

EntryPointNotFoundException : EnumResourceTypesEx
  at (wrapper managed-to-native) Anolis.Core.Native.NativeMethods:EnumResourceTypesEx (intptr,Anolis.Core.Native.NativeMethods/EnumResTypeProc,intptr,Anolis.Core.Native.NativeMethods/MuiResourceFlags,uint16)
  at Anolis.Core.Source.Win32ResourceSource.PopulateResources () [0x00024] in <38d208fdc7254be09b356cc9fcca7ccf>:0 
  at Anolis.Core.Source.Win32ResourceSource.Reload () [0x00054] in <38d208fdc7254be09b356cc9fcca7ccf>:0 
  at Anolis.Core.Source.Win32ResourceSource..ctor (System.String fileName, System.Boolean isReadOnly, Anolis.Core.ResourceSourceLoadMode mode) [0x00032] in <38d208fdc7254be09b356cc9fcca7ccf>:0 
  at Anolis.Core.Source.Win32ResourceSourceFactory.Create (System.String fileName, System.Boolean isReadOnly, Anolis.Core.ResourceSourceLoadMode mode) [0x00000] in <38d208fdc7254be09b356cc9fcca7ccf>:0 
  at Anolis.Core.ResourceSource.Open (System.String fileName, System.Boolean readOnly, Anolis.Core.ResourceSourceLoadMode mode) [0x0002c] in <38d208fdc7254be09b356cc9fcca7ccf>:0 
  at Anolis.Resourcer.CommandLine.StatelessResourceEditor.OneOffUpdate (System.String sourceFilename, Anolis.Core.ResourceTypeIdentifier typeId, Anolis.Core.ResourceIdentifier nameId, System.UInt16 langId, System.String dataFilename) [0x00000] in <38d208fdc7254be09b356cc9fcca7ccf>:0 
  at Anolis.Resourcer.CommandLine.StatelessResourceEditor.PerformOneOff (Anolis.Resourcer.CommandLine.CommandLineParser args) [0x0030e] in <38d208fdc7254be09b356cc9fcca7ccf>:0 
  at Anolis.Resourcer.Program.Main (System.String[] args) [0x0012e] in <38d208fdc7254be09b356cc9fcca7ccf>:0 

note: .NET 2.2.2 (dotnet-hosting-2.2.2-win.exe) is installed

WebeWizard commented 5 years ago

I installed winetricks with brew install winetricks Then installed .net 2.0 sp2 with winetricks dotnet20sp2

Seems to get past the error above.