diff --git a/build/win/LWFS/.a/start-remote.bat b/build/win/LWFS/.a/start-remote.bat old mode 100644 new mode 100755 index 1b3585f..6cfac31 --- a/build/win/LWFS/.a/start-remote.bat +++ b/build/win/LWFS/.a/start-remote.bat @@ -1,5 +1,5 @@ cd /d "%~dp0" -set PATH=%~dp0ruby19\bin;%PATH% +set PATH=%~dp0ruby27\bin;%PATH% if exist "..\.lwfsrc" copy "..\.lwfsrc" tmp.bat & call tmp.bat set JRUBY_OPTS="--server -J-Djruby.jit.threshold=30" set TZ= @@ -14,7 +14,7 @@ ver | find "XP" if %errorlevel% EQU 0 goto :winxp :run -ruby -Ku "%~dp0ruby19\bin\rackup" lwfs.ru +ruby -Ku "%~dp0ruby27\bin\rackup" lwfs.ru exit :setdatafolder diff --git a/build/win/LWFS/.a/start.bat b/build/win/LWFS/.a/start.bat old mode 100644 new mode 100755 index b07099f..5cf1f14 --- a/build/win/LWFS/.a/start.bat +++ b/build/win/LWFS/.a/start.bat @@ -1,5 +1,5 @@ cd /d "%~dp0" -set PATH=%~dp0ruby19\bin;%PATH% +set PATH=%~dp0ruby27\bin;%PATH% if exist "..\.lwfsrc" copy "..\.lwfsrc" tmp.bat & call tmp.bat set JRUBY_OPTS="--server -J-Djruby.jit.threshold=30" set TZ= @@ -14,7 +14,7 @@ ver | find "XP" if %errorlevel% EQU 0 goto :winxp :run -ruby -Ku "%~dp0ruby19\bin\rackup" lwfs.ru +ruby -Ku "%~dp0ruby27\bin\rackup" lwfs.ru exit :setdatafolder diff --git a/build/win/Makefile b/build/win/Makefile index 8d3c208..6c9faff 100644 --- a/build/win/Makefile +++ b/build/win/Makefile @@ -2,7 +2,7 @@ build: testtag clean mkdir -p tmp/LWFS cp -a LWFS tmp/LWFS/LWFS cp -a README*.txt *.jse tmp/LWFS - unzip -q ruby19.zip -d tmp/LWFS/LWFS/.a + unzip -q ruby27.zip -d tmp/LWFS/LWFS/.a mkdir -p tmp/LWFS/LWFS/.a/lwfs cp -a ../../{lib,lwfs.rb,lwfs.ru,lwfs.conf,tmpl} tmp/LWFS/LWFS/.a/lwfs find tmp/LWFS -name '.git*' -print0 | xargs -0 rm -rf diff --git a/build/win/ruby19.zip b/build/win/ruby27.zip similarity index 72% rename from build/win/ruby19.zip rename to build/win/ruby27.zip index 7cddec8..75dddb0 100644 Binary files a/build/win/ruby19.zip and b/build/win/ruby27.zip differ diff --git a/build/win/runtime/Makefile b/build/win/runtime/Makefile index 9ffd01d..f12dc47 100644 --- a/build/win/runtime/Makefile +++ b/build/win/runtime/Makefile @@ -1,25 +1,27 @@ # -*- mode: makefile-gmake; -*- -RUBY=http://dl.bintray.com/oneclick/rubyinstaller/ruby-1.9.3-p545-i386-mingw32.7z -DEVKIT=https://github.com/downloads/oneclick/rubyinstaller/DevKit-tdm-32-4.5.2-20111229-1559-sfx.exe -LIBJPEG=http://www.ijg.org/files/jpegsrc.v9a.tar.gz -LIBPNG=http://prdownloads.sourceforge.net/libpng/libpng-1.2.51.tar.gz -ZLIB=http://zlib.net/zlib-1.2.8.tar.gz -LIBICONV=http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.14.tar.gz -LIBXML2=http://xmlsoft.org/sources/libxml2-2.9.1.tar.gz +RUBY=https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-2.7.1-1/rubyinstaller-devkit-2.7.1-1-x64.exe +LIBJPEG=http://www.ijg.org/files/jpegsrc.v9d.tar.gz +LIBPNG=http://prdownloads.sourceforge.net/libpng/libpng-1.2.59.tar.gz +ZLIB=http://zlib.net/zlib-1.2.11.tar.gz +LIBICONV=http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.16.tar.gz +LIBXML2=http://xmlsoft.org/sources/libxml2-2.9.10.tar.gz WGET=wget --no-check-certificate SEVENZIP='/cygdrive/c/Program Files/7-zip/7z.exe' default: - @echo 'make [ all | download | ruby | devkit | zlib | libpng | libjpeg | libiconv | libxml2 | gems | cleanall | clean | updateruby ]' + @echo 'make [ all | download | ruby | libpng | libjpeg | libxml2 | gems | cleanall | clean | updateruby ]' + @echo '' + @echo 'NOTES:' + @echo ' install bison/flex under bison-and-flex (for actioncompiler-*.gem).' + @echo ' after installing ruby, open mingw64 terminal and proceed.' -all: cleanall download ruby devkit zlib libpng libjpeg libiconv libxml2 gems +all: cleanall download ruby libpng libjpeg libxml2 gems download: if [ ! -d dl ]; then mkdir dl; fi cd dl; if [ ! -f `basename $(RUBY)` ]; then $(WGET) $(RUBY); fi - cd dl; if [ ! -f `basename $(DEVKIT)` ]; then $(WGET) $(DEVKIT); fi cd dl; if [ ! -f `basename $(LIBJPEG)` ]; then $(WGET) $(LIBJPEG); fi cd dl; if [ ! -f `basename $(LIBPNG)` ]; then $(WGET) $(LIBPNG); fi cd dl; if [ ! -f `basename $(ZLIB)` ]; then $(WGET) $(ZLIB); fi @@ -27,69 +29,66 @@ download: cd dl; if [ ! -f `basename $(LIBXML2)` ]; then $(WGET) $(LIBXML2); fi checkso: - (ldd `which ruby`; find /home/ruby19 -name '*.so' | grep -vi tcltk | xargs ldd) | grep ' ' | sort | uniq + (ldd /c/Ruby27-x64/bin/ruby; find /c/Ruby27-x64 -name '*.so' | xargs ldd) | grep ' ' | sort | uniq ruby: - cp dl/ruby-*.7z /home - cd /home; $(SEVENZIP) x ruby-*.7z > /dev/null - cd /home; rm ruby-*.7z; mv ruby-*-mingw32 ruby19; chmod -R 755 ruby19 - -devkit: - mkdir /home/devkit; cp dl/DevKit*.exe /home/devkit - cd /home/devkit; $(SEVENZIP) x DevKit*.exe > /dev/null - cd /home/devkit; rm DevKit*.exe; chmod -R 755 . - cd /home/devkit; env LANG= PATH=/home/ruby19/bin:/usr/bin ruby dk.rb init - cd /home/devkit; echo ' - C:/home/ruby19' >> config.yml - cd /home/devkit; env LANG= PATH=/home/ruby19/bin:/usr/bin ruby dk.rb install - -zlib: - tar xzf dl/zlib-*.tar.gz - cd zlib-*; export PATH=/home/devkit/mingw/bin:/home/devkit/mingw/bin:/usr/bin; make -fwin32/Makefile.gcc - cd zlib-*; cp zlib.h zconf.h /home/devkit/mingw/include - cd zlib-*; cp libz.a /home/devkit/mingw/lib - -libpng: + chmod 755 dl/`basename ${RUBY}` + cygstart -w dl/`basename ${RUBY}` + echo "please perform 'make mingw64' after installing ruby." + +mingw64: + cygstart /c/Ruby27-x64/msys64/mingw64.exe + +# zlib: checkmingw64 +# tar xzf dl/zlib-*.tar.gz +# cd zlib-*; bash -c 'source ../_bashrc; make -fwin32/Makefile.gcc' +# cd zlib-*; cp zlib.h zconf.h /c/Ruby27-x64/msys64/mingw64/include +# cd zlib-*; cp libz.a /c/Ruby27-x64/msys64/mingw64/lib + +libpng: checkmingw64 tar xzf dl/libpng-*.tar.gz - cd libpng-*; export PATH=/home/devkit/mingw/bin:/home/devkit/mingw/bin:/usr/bin; ./configure --target=mingw32 --prefix=/home/devkit/mingw; make - cd libpng-*; cp png*.h /home/devkit/mingw/include - cd libpng-*; cp .libs/libpng.a /home/devkit/mingw/lib + cd libpng-*; bash -c 'source ../_bashrc; ./configure --prefix=/c/Ruby27-x64/msys64/mingw64; make' + cd libpng-*; cp png*.h /c/Ruby27-x64/msys64/mingw64/include + cd libpng-*; cp .libs/libpng.a /c/Ruby27-x64/msys64/mingw64/lib -libjpeg: +libjpeg: checkmingw64 tar xzf dl/jpegsrc.*.tar.gz - cd jpeg-*; export PATH=/home/devkit/mingw/bin:/home/devkit/mingw/bin:/usr/bin; ./configure --target=mingw32 --prefix=/home/devkit/mingw; make - cd jpeg-*; cp jconfig.h jerror.h jmorecfg.h jpeglib.h /home/devkit/mingw/include - cd jpeg-*; cp .libs/libjpeg.a /home/devkit/mingw/lib - -libiconv: - tar xzf dl/libiconv-*.tar.gz - cd libiconv-1.14; export PATH=/home/devkit/mingw/bin:/home/devkit/mingw/bin:/usr/bin; ./configure --target=mingw32 --prefix=/home/devkit/mingw --disable-shared; make - cp libiconv-*/lib/libcharset.h /home/devkit/mingw/include - cp libiconv-*/lib/libcharset.a /home/devkit/mingw/lib - cp libiconv-*/include/iconv.h /home/devkit/mingw/include - cp libiconv-*/lib/.libs/libiconv.a /home/devkit/mingw/lib - -libxml2: + cd jpeg-*; bash -c 'source ../_bashrc; ./configure --prefix=/c/Ruby27-x64/msys64/mingw64; make' + cd jpeg-*; cp jconfig.h jerror.h jmorecfg.h jpeglib.h /c/Ruby27-x64/msys64/mingw64/include + cd jpeg-*; cp .libs/libjpeg.a /c/Ruby27-x64/msys64/mingw64/lib + +# libiconv: checkmingw64 +# tar xzf dl/libiconv-*.tar.gz +# cd libiconv-*; bash -c 'source ../_bashrc; ./configure --prefix=/c/Ruby27-x64/msys64/mingw64 --disable-shared; make' +# cp libiconv-*/lib/libcharset.h /c/Ruby27-x64/msys64/mingw64/include +# cp libiconv-*/lib/libcharset.a /c/Ruby27-x64/msys64/mingw64/lib +# cp libiconv-*/include/iconv.h /c/Ruby27-x64/msys64/mingw64/include +# cp libiconv-*/lib/.libs/libiconv.a /c/Ruby27-x64/msys64/mingw64/lib + +libxml2: checkmingw64 tar xzf dl/libxml2-*.tar.gz - cd libxml2-*; export PATH=/home/devkit/mingw/bin:/home/devkit/mingw/bin:/usr/bin; ./configure --target=mingw32 --prefix=/home/devkit/mingw --disable-shared; make libxml2.la - cd libxml2-*; mkdir /home/devkit/mingw/include/libxml; cp include/libxml/*.h /home/devkit/mingw/include/libxml - cd libxml2-*; cp .libs/libxml2.a /home/devkit/mingw/lib + cd libxml2-*; bash -c 'source ../_bashrc; ./configure --prefix=/c/Ruby27-x64/msys64/mingw64 --disable-shared; make libxml2.la' + cd libxml2-*; mkdir /c/Ruby27-x64/msys64/mingw64/include/libxml; cp include/libxml/*.h /c/Ruby27-x64/msys64/mingw64/include/libxml + cd libxml2-*; cp .libs/libxml2.a /c/Ruby27-x64/msys64/mingw64/lib -gems: +gems: checkmingw64 bash -c 'source _bashrc; gem install httpclient' - bash -c 'source _bashrc; gem install ../../../vendor/cache/listen-*[0-9].gem' bash -c 'source _bashrc; gem install wdm' bash -c 'source _bashrc; gem install sinatra' bash -c 'source _bashrc; gem install thin' bash -c 'source _bashrc; gem install uuidtools' bash -c 'source _bashrc; gem install ../../../vendor/cache/ruby-lzma-*[0-9].gem' - bash -c 'source _bashrc; gem install ../../../vendor/cache/libxml-ruby-*[0-9].gem' + bash -c 'source _bashrc; gem install ../../../vendor/cache/libxml-ruby-*[0-9].gem -- --with-cppflags=-DLIBXML_STATIC' bash -c 'source _bashrc; gem install ../../../lib/swf2lwf/gems/rb-img-*[0-9].gem' bash -c 'source _bashrc; gem install ../../../lib/swf2lwf/gems/actioncompiler-*[0-9].gem' +checkmingw64: + if expr `uname` : '^MINGW64' > /dev/null; then exit 0; else exit 1; fi + cleanall: clean + cygstart -w /c/Ruby27-x64/unins000.exe + rm -rf /c/Ruby27-x64 rm -rf dl - rm -rf /home/ruby19 - rm -rf /home/devkit clean: rm -rf zlib-* @@ -99,15 +98,15 @@ clean: rm -rf libxml2-* updateruby: - rm -f ../ruby19.zip - cp -r /home/ruby19 . - cp -r rsync-cw/* ruby19/bin - chmod -R 755 ruby19 - find ruby19 -name '*.o' | xargs rm -f - rm -rf ruby19/lib/ruby/gems/1.9.1/cache/* - rm -rf ruby19/lib/ruby/gems/1.9.1/doc/* - rm -rf ruby19/lib/libmsvcrt-ruby191.dll.a - rm -rf ruby19/lib/libmsvcrt-ruby191-static.a - rm -rf ruby19/lib/tcltk - zip -Xqr9 ../ruby19.zip ruby19 - rm -rf ruby19 + rm -f ../ruby27.zip + rm -rf ruby27; mkdir ruby27 + (cd /c/Ruby27-x64; tar --exclude=msys64 -cf - .) | (cd ruby27; tar xf -) + cp -r rsync-cw/* ruby27/bin + chmod -R 755 ruby27 + find ruby27 -name '*.o' | xargs rm -f + rm -rf ruby27/lib/ruby/gems/2.7.0/cache/* + rm -rf ruby27/lib/ruby/gems/2.7.0/doc/* + rm -rf ruby27/lib/libx64-msvcrt-ruby270.dll.a + rm -rf ruby27/msys64 + zip -Xqr9 ../ruby27.zip ruby27 + rm -rf ruby27 diff --git a/build/win/runtime/_bashrc b/build/win/runtime/_bashrc index bc3451f..67e5360 100644 --- a/build/win/runtime/_bashrc +++ b/build/win/runtime/_bashrc @@ -1,2 +1 @@ -PATH=/home/ruby19/bin:/usr/bin -export PATH +export PATH="/c/PROGRA~2/GnuWin32/bin:/c/Ruby27-x64/bin:/c/Ruby27-x64/msys64/mingw64/bin:/Ruby27-x64/bin:/usr/bin:/bin" diff --git a/build/win/runtime/bison-and-flex/bison-2.4.1-setup.exe b/build/win/runtime/bison-and-flex/bison-2.4.1-setup.exe new file mode 100644 index 0000000..300821c Binary files /dev/null and b/build/win/runtime/bison-and-flex/bison-2.4.1-setup.exe differ diff --git a/build/win/runtime/bison-and-flex/flex-2.5.4a-1.exe b/build/win/runtime/bison-and-flex/flex-2.5.4a-1.exe new file mode 100644 index 0000000..af8f01e Binary files /dev/null and b/build/win/runtime/bison-and-flex/flex-2.5.4a-1.exe differ diff --git a/lib/postupdate.rb b/lib/postupdate.rb index 4944abe..0af108f 100644 --- a/lib/postupdate.rb +++ b/lib/postupdate.rb @@ -8,7 +8,8 @@ def postUpdate(port, arg = nil) if arg res = client.post_content("http://localhost:#{port}/update/", {'arg' => arg}) else - res = client.post_content("http://localhost:#{port}/update/") + # https://stackoverflow.com/questions/2651379/webrickhttpstatuslengthrequired-error-when-accessing-create-method-in-contro/4061028#4061028 + res = client.post_content("http://localhost:#{port}/update/", {}) end ret = true # at least the http request was correctly processed. rescue diff --git a/vendor/cache/libxml-ruby-2.7.0.1.gem b/vendor/cache/libxml-ruby-2.7.0.1.gem deleted file mode 100644 index fe13420..0000000 Binary files a/vendor/cache/libxml-ruby-2.7.0.1.gem and /dev/null differ diff --git a/vendor/cache/libxml-ruby-2.7.0.2.gem b/vendor/cache/libxml-ruby-2.7.0.2.gem new file mode 100755 index 0000000..9f521df Binary files /dev/null and b/vendor/cache/libxml-ruby-2.7.0.2.gem differ