diff --git a/make/mingw/dlls b/make/mingw/dlls deleted file mode 100644 index c623bc18..00000000 --- a/make/mingw/dlls +++ /dev/null @@ -1,19 +0,0 @@ -libungif4 -libjpeg-8 -libcairo-2 -libglib-2.0-0 -libgobject-2.0-0 -libpango-1.0-0 -libpangoft2-1.0-0 -libgio-2.0-0 -libgthread-2.0-0 -libgmodule-2.0-0 -libpangocairo-1.0-0 -libpangowin32-1.0-0 -libportaudio-2 -sqlite3 -libssl32 -libeay32 -zlib1 -readline5 -libiconv2 diff --git a/make/mingw/env.rb b/make/mingw/env.rb deleted file mode 100644 index 0448bfdc..00000000 --- a/make/mingw/env.rb +++ /dev/null @@ -1,51 +0,0 @@ -require File.expand_path('make/make') -extend Make - -EXT_RUBY = "../mingw" - -# use the platform Ruby claims -require 'rbconfig' - -CC = ENV['CC'] ? ENV['CC'] : "gcc" -file_list = ["shoes/*.c"] + %w{shoes/native/windows.c shoes/http/winhttp.c shoes/http/windownload.c} - -SRC = FileList[*file_list] -OBJ = SRC.map do |x| - x.gsub(/\.\w+$/, '.o') -end - -ADD_DLL = ["shoes/appwin32.o"] - -# Linux build environment -CAIRO_CFLAGS = '-I/mingw/include/glib-2.0 -I/mingw/lib/glib-2.0/include -I/mingw/include/cairo' -CAIRO_LIB = '-lcairo' -PANGO_CFLAGS = '-I/mingw/include/pango-1.0' -PANGO_LIB = '-lpangocairo-1.0 -lpango-1.0 -lpangoft2-1.0 -lpangowin32-1.0' -LINUX_CFLAGS = %[-Wall -I#{ENV['SHOES_DEPS_PATH'] || "/usr"}/include #{CAIRO_CFLAGS} #{PANGO_CFLAGS} -I#{RbConfig::CONFIG['archdir']}] -if RbConfig::CONFIG['rubyhdrdir'] - LINUX_CFLAGS << " -I#{RbConfig::CONFIG['rubyhdrdir']} -I#{RbConfig::CONFIG['rubyhdrdir']}/#{SHOES_RUBY_ARCH}" -end -LINUX_LIB_NAMES = %W[#{RUBY_SO} cairo pangocairo-1.0 ungif] - -#FLAGS.each do |flag| -# LINUX_CFLAGS << " -D#{flag}" if ENV[flag] -#end -if ENV['DEBUG'] - LINUX_CFLAGS << " -g -O0 " -else - LINUX_CFLAGS << " -O " -end -LINUX_CFLAGS << " -DRUBY_1_9" - -DLEXT = 'dll' -LINUX_CFLAGS << ' -I. -I/mingw/include' -LINUX_CFLAGS << ' -I/mingw/include/ruby-1.9.1/ruby' -LINUX_CFLAGS << " -DXMD_H -DHAVE_BOOLEAN -DSHOES_WIN32 -D_WIN32_IE=0x0500 -D_WIN32_WINNT=0x0500 -DWINVER=0x0500 -DCOBJMACROS" -LINUX_LDFLAGS = " -DBUILD_DLL -lungif -ljpeg -lglib-2.0 -lgobject-2.0 -lgio-2.0 -lgmodule-2.0 -lgthread-2.0 -fPIC -shared" -LINUX_LDFLAGS << ' -lshell32 -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lcomctl32 -lole32 -loleaut32 -ladvapi32 -loleacc -lwinhttp' - -cp APP['icons']['win32'], "shoes/appwin32.ico" - -LINUX_LIBS = LINUX_LIB_NAMES.map { |x| "-l#{x}" }.join(' ') - -LINUX_LIBS << " -L#{RbConfig::CONFIG['libdir']} #{CAIRO_LIB} #{PANGO_LIB}" diff --git a/make/mingw/tasks.rb b/make/mingw/tasks.rb deleted file mode 100644 index 498a4ce9..00000000 --- a/make/mingw/tasks.rb +++ /dev/null @@ -1,69 +0,0 @@ -require File.expand_path('make/make') - -include FileUtils - -class MakeMinGW - extend Make - - class << self - # Execute shell calls through bash if we are compiling with mingw. This breaks us - # out of the windows command shell if we are compiling from there. - def sh(*args) - cmd = args.join(' ') - super "bash.exe --login -i -c \"#{cmd}\"" - end - - def copy_ext xdir, libdir - Dir.chdir(xdir) do - sh 'ruby extconf.rb; make' - end - copy_files "#{xdir}/*.so", libdir - end - - def copy_deps_to_dist - dlls = [RUBY_SO] - dlls += IO.readlines("make/mingw/dlls").map{|dll| dll.chomp} - dlls.each{|dll| cp "#{EXT_RUBY}/bin/#{dll}.dll", "dist/"} - cp "dist/zlib1.dll", "dist/zlib.dll" - Dir.glob("../deps_cairo*/*"){|file| cp file, "dist/"} - sh "strip -x dist/*.dll" unless ENV['DEBUG'] - end - - def setup_system_resources - cp APP['icons']['gtk'], "dist/static/app-icon.png" - end - - def make_resource(t) - sh "windres -I. #{t.source} #{t.name}" - end - - def make_app(name) - bin = name - rm_f bin - sh "#{CC} -Ldist -o #{bin} bin/main.o shoes/appwin32.o #{LINUX_LIBS} -lshoes #{Config::CONFIG['LDFLAGS']} -mwindows" - rewrite "platform/nix/shoes.launch", name, %r!/shoes!, "/#{NAME}" - sh %{echo 'cd "$OLDPWD"'} - sh %{echo 'LD_LIBRARY_PATH=$APPPATH $APPPATH/#{File.basename(bin)} "$@"' >> #{name}} - chmod 0755, name - cp "platform/msw/shoes.exe.manifest", "dist/#{NAME}.exe.manifest" - end - - def make_so(name) - ldflags = LINUX_LDFLAGS.sub! /INSTALL_NAME/, "-install_name @executable_path/lib#{SONAME}.#{DLEXT}" - sh "#{CC} -o #{name} #{OBJ.join(' ')} #{LINUX_LDFLAGS} #{LINUX_LIBS}" - end - - def make_installer - def sh(*args); super; end - mkdir_p "pkg" - rm_rf "dist/nsis" - cp_r "platform/msw", "dist/nsis" - cp APP['icons']['win32'], "dist/nsis/setup.ico" - rewrite "dist/nsis/base.nsi", "dist/nsis/#{NAME}.nsi" - Dir.chdir("dist/nsis") do - sh "\"#{env('NSIS')}\\makensis.exe\" #{NAME}.nsi" - end - mv "dist/nsis/#{PKG}.exe", "pkg" - end - end -end