Class: Releasy::Builders::WindowsWrapped
- Inherits:
-
WindowsBuilder
- Object
- Builder
- WindowsBuilder
- Releasy::Builders::WindowsWrapped
- Includes:
- Mixins::HasGemspecs
- Defined in:
- lib/releasy/builders/windows_wrapped.rb
Overview
Wraps up an application for Windows when not on Windows, based on a RubyInstaller distribution and installing Windows binary gems.
The resulting package will be much larger than a Windows package created on Windows, since it will include the whole Ruby distribution, not just files that are needed.
Limitations:
* Does not DLLs loaded from the system, which will have to be included manually if any are required by the application and no universally available in Windows installations.
* Unless a gem is in pure Ruby or available as a pre-compiled binary gem, it won't work!
Constant Summary collapse
- TYPE =
:windows_wrapped
- DEFAULT_FOLDER_SUFFIX =
"WIN32"
- TCL_TK_FILES =
Files that are required for Tcl/Tk, but which are unlikely to be used in many applications.
%w[bin/tcl*-ri.dll bin/tk*-ri.dll lib/tcltk lib/ruby/tk*.rb lib/ruby/1.*/tk* lib/ruby/1.*/tcl* lib/ruby/1.*/i386-mingw32/tk* lib/ruby/1.*/i386-mingw32/tcl* ]
- REQUIRED_ENCODING_FILES =
Encoding files that are required, even if we don’t need most of them if we select to Mixins::CanExcludeEncoding#exclude_encoding.
%w[encdb.so iso_8859_1.so utf_16le.so trans/single_byte.so trans/transdb.so trans/utf_16_32.so]
- VALID_RUBY_DIST =
/ruby-1\.[89]\.\d-p\d+-i386-mingw32.7z/
Constants inherited from WindowsBuilder
Releasy::Builders::WindowsBuilder::EXECUTABLE_TYPES
Constants included from Mixins::Log
Mixins::Log::DEFAULT_LOG_LEVEL, Mixins::Log::LOG_LEVELS
Instance Attribute Summary collapse
-
#wrapper ⇒ String
Path to windows distribution archive that has been manually downloaded from rubyinstaller.org/downloads/ (e.g. “rubies/ruby-1.9.2-p290-i386-mingw32.7z”).
Attributes included from Mixins::HasGemspecs
Attributes inherited from WindowsBuilder
Attributes inherited from Builder
Instance Method Summary collapse
-
#exclude_tcl_tk ⇒ Project
Remove TCL/TK from package, which can save a significant amount of space if the application does not require them.
- #valid_for_platform? ⇒ Boolean
Methods inherited from WindowsBuilder
Methods included from Mixins::CanExcludeEncoding
Methods inherited from Builder
Methods included from Mixins::Log
Methods included from Mixins::HasPackagers
Constructor Details
This class inherits a constructor from Releasy::Builders::Builder
Instance Attribute Details
#wrapper ⇒ String
Returns Path to windows distribution archive that has been manually downloaded from rubyinstaller.org/downloads/ (e.g. “rubies/ruby-1.9.2-p290-i386-mingw32.7z”).
47 48 49 |
# File 'lib/releasy/builders/windows_wrapped.rb', line 47 def wrapper @wrapper end |
Instance Method Details
#exclude_tcl_tk ⇒ Project
Remove TCL/TK from package, which can save a significant amount of space if the application does not require them. This is over 6MB uncompressed, which is a saving of 1.6MB when compressed with 7z format (LZMA).
52 |
# File 'lib/releasy/builders/windows_wrapped.rb', line 52 def exclude_tcl_tk; @exclude_tcl_tk = true; self; end |
#valid_for_platform? ⇒ Boolean
54 |
# File 'lib/releasy/builders/windows_wrapped.rb', line 54 def valid_for_platform?; not Releasy.win_platform?; end |