pmq20 / node-packer

Packing your Node.js application into a single executable.
MIT License
3.07k stars 202 forks source link

How to build nodec for Window? #140

Open saurabh-deep opened 5 years ago

saurabh-deep commented 5 years ago

Hi, Can someone please guide me on how to create a new nodec executable for Windows? I have been able to build for MacOS using ruby-packer, but am unable to proceed with Windows. In need of urgent help please.

slee047 commented 5 years ago

Do you mean building a single nodec executable file like the downloads from: http://enclose.io/nodec

saurabh-deep commented 5 years ago

Do you mean building a single nodec executable file like the downloads from: http://enclose.io/nodec

Yeah. That was the goal. I even managed to build the nodec for Mac using ruby-packer (rubyc), but failed to do so for Windows.

slee047 commented 5 years ago

Do you mean building a single nodec executable file like the downloads from: http://enclose.io/nodec

Yeah. That was the goal. I even managed to build the nodec for Mac using ruby-packer (rubyc), but failed to do so for Windows.

I tried using ruby-packer but I got this:

=> Building ruby phase 1 Traceback (most recent call last): 9: from C:/ruby-packer/bin/rubyc:143:in <main>' 8: from C:/ruby-packer/lib/compiler.rb:661:inrun!' 7: from C:/ruby-packer/lib/compiler.rb:183:in build_ruby_pass_1_windows' 6: from C:/ruby-packer/lib/compiler.rb:183:inchdir' 5: from C:/ruby-packer/lib/compiler.rb:184:in block in build_ruby_pass_1_windows' 4: from C:/ruby-packer/lib/compiler/utils.rb:52:inrun' 3: from C:/ruby-packer/lib/compiler/utils.rb:52:in map' 2: from C:/ruby-packer/lib/compiler/utils.rb:52:ineach' 1: from C:/ruby-packer/lib/compiler/utils.rb:53:in block in run' C:/ruby-packer/lib/compiler/utils.rb:38:inescape': undefined method `include?' for nil:NilClass (NoMethodError)

So how did you use ruby-packer to pack this in macOS?

saurabh-deep commented 5 years ago

Do you mean building a single nodec executable file like the downloads from: http://enclose.io/nodec

Yeah. That was the goal. I even managed to build the nodec for Mac using ruby-packer (rubyc), but failed to do so for Windows.

I tried using ruby-packer but I got this:

=> Building ruby phase 1 Traceback (most recent call last): 9: from C:/ruby-packer/bin/rubyc:143:in <main>' 8: from C:/ruby-packer/lib/compiler.rb:661:inrun!' 7: from C:/ruby-packer/lib/compiler.rb:183:in build_ruby_pass_1_windows' 6: from C:/ruby-packer/lib/compiler.rb:183:inchdir' 5: from C:/ruby-packer/lib/compiler.rb:184:in block in build_ruby_pass_1_windows' 4: from C:/ruby-packer/lib/compiler/utils.rb:52:inrun' 3: from C:/ruby-packer/lib/compiler/utils.rb:52:in map' 2: from C:/ruby-packer/lib/compiler/utils.rb:52:ineach' 1: from C:/ruby-packer/lib/compiler/utils.rb:53:in block in run' C:/ruby-packer/lib/compiler/utils.rb:38:inescape': undefined method `include?' for nil:NilClass (NoMethodError)

So how did you use ruby-packer to pack this in macOS?

Exact steps mentioned here worked for me on macOS but on Windows it fails with compile-time errors - https://github.com/adobe/node-packer/blob/master/BUILD_INSTRUCTIONS.md