rbczmq 1.6.2 → 1.6.4
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +4 -3
- data/.gitmodules +6 -0
- data/.travis.yml +5 -1
- data/CHANGELOG.rdoc +15 -0
- data/Gemfile.lock +2 -2
- data/README.rdoc +5 -2
- data/Rakefile +8 -3
- data/ext/czmq/.gitignore +52 -0
- data/ext/czmq/.travis.yml +18 -0
- data/ext/czmq/AUTHORS +9 -0
- data/ext/czmq/COPYING +674 -0
- data/ext/czmq/COPYING.LESSER +178 -0
- data/ext/czmq/ChangeLog +0 -0
- data/ext/czmq/Makefile.am +22 -0
- data/ext/czmq/NEWS +263 -0
- data/ext/czmq/README +0 -0
- data/ext/czmq/README.md +1122 -0
- data/ext/czmq/README.txt +327 -0
- data/ext/czmq/autogen.sh +46 -0
- data/ext/czmq/builds/android/Android.mk +35 -0
- data/ext/czmq/builds/android/Application.mk +1 -0
- data/ext/czmq/builds/android/build.sh +59 -0
- data/ext/czmq/builds/android/clean.sh +26 -0
- data/ext/czmq/builds/mingw32/Makefile.mingw32 +38 -0
- data/ext/czmq/builds/mingw32/platform.h +0 -0
- data/ext/czmq/builds/msvc/.gitignore +18 -0
- data/ext/czmq/builds/msvc/README.txt +17 -0
- data/ext/czmq/builds/msvc/czmq.sln +69 -0
- data/ext/czmq/builds/msvc/czmq.vcproj +2246 -0
- data/ext/czmq/builds/msvc/czmq.vcxproj +329 -0
- data/ext/czmq/builds/msvc/czmq.vcxproj.filters +117 -0
- data/ext/czmq/builds/msvc/czmq11.sln +36 -0
- data/ext/czmq/builds/msvc/czmq_selftest.vcproj +840 -0
- data/ext/czmq/builds/msvc/czmq_selftest.vcxproj +189 -0
- data/ext/czmq/builds/msvc/czmq_selftest.vcxproj.filters +14 -0
- data/ext/czmq/c +520 -0
- data/ext/czmq/configure.ac +229 -0
- data/ext/czmq/doc/Makefile.am +49 -0
- data/ext/czmq/doc/asciidoc.conf +57 -0
- data/ext/czmq/doc/czmq.txt +334 -0
- data/ext/czmq/doc/mkman +100 -0
- data/ext/czmq/doc/mksite +65 -0
- data/ext/czmq/doc/wdput +43 -0
- data/ext/czmq/doc/xml2wd.pl +242 -0
- data/ext/czmq/doc/zbeacon.txt +173 -0
- data/ext/czmq/doc/zclock.txt +51 -0
- data/ext/czmq/doc/zconfig.txt +92 -0
- data/ext/czmq/doc/zctx.txt +111 -0
- data/ext/czmq/doc/zfile.txt +77 -0
- data/ext/czmq/doc/zframe.txt +222 -0
- data/ext/czmq/doc/zhash.txt +225 -0
- data/ext/czmq/doc/zlist.txt +176 -0
- data/ext/czmq/doc/zloop.txt +106 -0
- data/ext/czmq/doc/zmsg.txt +315 -0
- data/ext/czmq/doc/zmutex.txt +54 -0
- data/ext/czmq/doc/zsocket.txt +110 -0
- data/ext/czmq/doc/zsockopt.txt +528 -0
- data/ext/czmq/doc/zstr.txt +80 -0
- data/ext/czmq/doc/zsys.txt +44 -0
- data/ext/czmq/doc/zthread.txt +126 -0
- data/ext/czmq/doc/ztree.txt +236 -0
- data/ext/czmq/images/README_1.png +0 -0
- data/ext/czmq/images/README_2.png +0 -0
- data/ext/czmq/include/czmq.h +64 -0
- data/ext/czmq/include/czmq_prelude.h +504 -0
- data/ext/czmq/include/zbeacon.h +91 -0
- data/ext/czmq/include/zclock.h +56 -0
- data/ext/czmq/include/zconfig.h +117 -0
- data/ext/czmq/include/zctx.h +96 -0
- data/ext/czmq/include/zfile.h +82 -0
- data/ext/czmq/include/zframe.h +145 -0
- data/ext/czmq/include/zhash.h +127 -0
- data/ext/czmq/include/zlist.h +113 -0
- data/ext/czmq/include/zloop.h +98 -0
- data/ext/czmq/include/zmsg.h +165 -0
- data/ext/czmq/include/zmutex.h +62 -0
- data/ext/czmq/include/zsocket.h +104 -0
- data/ext/czmq/include/zsockopt.h +249 -0
- data/ext/czmq/include/zstr.h +69 -0
- data/ext/czmq/include/zsys.h +66 -0
- data/ext/czmq/include/zthread.h +62 -0
- data/ext/czmq/include/ztree.h +133 -0
- data/ext/czmq/mkdoc +14 -0
- data/ext/czmq/model/generate +2 -0
- data/ext/czmq/model/sockopts.xml +101 -0
- data/ext/czmq/notes.txt +21 -0
- data/ext/czmq/scripts/sockopts.gsl +325 -0
- data/ext/czmq/src/Makefile.am +61 -0
- data/ext/czmq/src/czmq_selftest.c +60 -0
- data/ext/czmq/src/libczmq.pc.in +11 -0
- data/ext/czmq/src/selftest +7 -0
- data/ext/czmq/src/selftest.cfg +5 -0
- data/ext/czmq/src/valgrind.supp +14 -0
- data/ext/czmq/src/vg +2 -0
- data/ext/czmq/src/zbeacon.c +787 -0
- data/ext/czmq/src/zclock.c +143 -0
- data/ext/czmq/src/zconfig.c +691 -0
- data/ext/czmq/src/zctx.c +287 -0
- data/ext/czmq/src/zfile.c +237 -0
- data/ext/czmq/src/zframe.c +551 -0
- data/ext/czmq/src/zhash.c +664 -0
- data/ext/czmq/src/zlist.c +459 -0
- data/ext/czmq/src/zloop.c +496 -0
- data/ext/czmq/src/zmsg.c +854 -0
- data/ext/czmq/src/zmutex.c +134 -0
- data/ext/czmq/src/zsocket.c +313 -0
- data/ext/czmq/src/zsockopt.c +1756 -0
- data/ext/czmq/src/zstr.c +297 -0
- data/ext/czmq/src/zsys.c +136 -0
- data/ext/czmq/src/zthread.c +269 -0
- data/ext/czmq/src/ztree.c +888 -0
- data/ext/czmq/version.sh +21 -0
- data/ext/rbczmq/extconf.rb +1 -18
- data/ext/rbczmq/poller.c +4 -1
- data/ext/rbczmq/socket.c +28 -5
- data/ext/rbczmq/socket.h +1 -0
- data/ext/zeromq/AUTHORS +110 -0
- data/ext/zeromq/CMakeLists.txt +392 -0
- data/ext/zeromq/COPYING +674 -0
- data/ext/zeromq/COPYING.LESSER +179 -0
- data/ext/zeromq/INSTALL +246 -0
- data/ext/zeromq/MAINTAINERS +56 -0
- data/ext/zeromq/Makefile.am +40 -0
- data/ext/zeromq/NEWS +333 -0
- data/ext/zeromq/README +39 -0
- data/ext/zeromq/acinclude.m4 +930 -0
- data/ext/zeromq/autogen.sh +45 -0
- data/ext/zeromq/branding.bmp +0 -0
- data/ext/zeromq/builds/msvc/Makefile.am +33 -0
- data/ext/zeromq/builds/msvc/c_local_lat/c_local_lat.vcproj +176 -0
- data/ext/zeromq/builds/msvc/c_local_lat/c_local_lat.vcxproj +87 -0
- data/ext/zeromq/builds/msvc/c_local_thr/c_local_thr.vcproj +176 -0
- data/ext/zeromq/builds/msvc/c_local_thr/c_local_thr.vcxproj +87 -0
- data/ext/zeromq/builds/msvc/c_remote_lat/c_remote_lat.vcproj +176 -0
- data/ext/zeromq/builds/msvc/c_remote_lat/c_remote_lat.vcxproj +87 -0
- data/ext/zeromq/builds/msvc/c_remote_thr/c_remote_thr.vcproj +176 -0
- data/ext/zeromq/builds/msvc/c_remote_thr/c_remote_thr.vcxproj +87 -0
- data/ext/zeromq/builds/msvc/errno.cpp +32 -0
- data/ext/zeromq/builds/msvc/errno.hpp +56 -0
- data/ext/zeromq/builds/msvc/inproc_lat/inproc_lat.vcproj +174 -0
- data/ext/zeromq/builds/msvc/inproc_lat/inproc_lat.vcxproj +86 -0
- data/ext/zeromq/builds/msvc/inproc_thr/inproc_thr.vcproj +174 -0
- data/ext/zeromq/builds/msvc/inproc_thr/inproc_thr.vcxproj +86 -0
- data/ext/zeromq/builds/msvc/libzmq/libzmq.vcproj +804 -0
- data/ext/zeromq/builds/msvc/libzmq/libzmq.vcxproj +252 -0
- data/ext/zeromq/builds/msvc/libzmq/libzmq.vcxproj.filters +431 -0
- data/ext/zeromq/builds/msvc/msvc.sln +89 -0
- data/ext/zeromq/builds/msvc/msvc10.sln +116 -0
- data/ext/zeromq/builds/msvc/platform.hpp +32 -0
- data/ext/zeromq/builds/msvc/properties/Common.props +21 -0
- data/ext/zeromq/builds/msvc/properties/Debug.props +19 -0
- data/ext/zeromq/builds/msvc/properties/Dynamic.props +20 -0
- data/ext/zeromq/builds/msvc/properties/Executable.props +19 -0
- data/ext/zeromq/builds/msvc/properties/Precompiled.props +14 -0
- data/ext/zeromq/builds/msvc/properties/Release.props +22 -0
- data/ext/zeromq/builds/msvc/properties/Win32.props +12 -0
- data/ext/zeromq/builds/msvc/properties/Win32_Release.props +17 -0
- data/ext/zeromq/builds/msvc/properties/WithOpenPGM.props +12 -0
- data/ext/zeromq/builds/msvc/properties/ZeroMQ.props +23 -0
- data/ext/zeromq/builds/msvc/properties/x64.props +12 -0
- data/ext/zeromq/builds/redhat/zeromq.spec.in +160 -0
- data/ext/zeromq/builds/valgrind/valgrind.supp +14 -0
- data/ext/zeromq/builds/valgrind/vg +1 -0
- data/ext/zeromq/cmake/Modules/TestZMQVersion.cmake +35 -0
- data/ext/zeromq/cmake/Modules/zmq_version.cpp +31 -0
- data/ext/zeromq/cmake/NSIS.template32.in +952 -0
- data/ext/zeromq/cmake/NSIS.template64.in +960 -0
- data/ext/zeromq/configure.in +428 -0
- data/ext/zeromq/doc/Makefile.am +51 -0
- data/ext/zeromq/doc/asciidoc.conf +56 -0
- data/ext/zeromq/doc/zmq.txt +233 -0
- data/ext/zeromq/doc/zmq_bind.txt +102 -0
- data/ext/zeromq/doc/zmq_close.txt +52 -0
- data/ext/zeromq/doc/zmq_connect.txt +98 -0
- data/ext/zeromq/doc/zmq_ctx_destroy.txt +66 -0
- data/ext/zeromq/doc/zmq_ctx_get.txt +67 -0
- data/ext/zeromq/doc/zmq_ctx_new.txt +49 -0
- data/ext/zeromq/doc/zmq_ctx_set.txt +75 -0
- data/ext/zeromq/doc/zmq_disconnect.txt +67 -0
- data/ext/zeromq/doc/zmq_epgm.txt +162 -0
- data/ext/zeromq/doc/zmq_errno.txt +50 -0
- data/ext/zeromq/doc/zmq_getsockopt.txt +516 -0
- data/ext/zeromq/doc/zmq_init.txt +52 -0
- data/ext/zeromq/doc/zmq_inproc.txt +85 -0
- data/ext/zeromq/doc/zmq_ipc.txt +85 -0
- data/ext/zeromq/doc/zmq_msg_close.txt +55 -0
- data/ext/zeromq/doc/zmq_msg_copy.txt +57 -0
- data/ext/zeromq/doc/zmq_msg_data.txt +48 -0
- data/ext/zeromq/doc/zmq_msg_get.txt +72 -0
- data/ext/zeromq/doc/zmq_msg_init.txt +65 -0
- data/ext/zeromq/doc/zmq_msg_init_data.txt +85 -0
- data/ext/zeromq/doc/zmq_msg_init_size.txt +58 -0
- data/ext/zeromq/doc/zmq_msg_more.txt +63 -0
- data/ext/zeromq/doc/zmq_msg_move.txt +52 -0
- data/ext/zeromq/doc/zmq_msg_recv.txt +125 -0
- data/ext/zeromq/doc/zmq_msg_send.txt +122 -0
- data/ext/zeromq/doc/zmq_msg_set.txt +45 -0
- data/ext/zeromq/doc/zmq_msg_size.txt +48 -0
- data/ext/zeromq/doc/zmq_pgm.txt +162 -0
- data/ext/zeromq/doc/zmq_poll.txt +132 -0
- data/ext/zeromq/doc/zmq_proxy.txt +97 -0
- data/ext/zeromq/doc/zmq_recv.txt +93 -0
- data/ext/zeromq/doc/zmq_recvmsg.txt +123 -0
- data/ext/zeromq/doc/zmq_send.txt +100 -0
- data/ext/zeromq/doc/zmq_sendmsg.txt +119 -0
- data/ext/zeromq/doc/zmq_setsockopt.txt +523 -0
- data/ext/zeromq/doc/zmq_socket.txt +369 -0
- data/ext/zeromq/doc/zmq_socket_monitor.txt +288 -0
- data/ext/zeromq/doc/zmq_strerror.txt +55 -0
- data/ext/zeromq/doc/zmq_tcp.txt +101 -0
- data/ext/zeromq/doc/zmq_term.txt +66 -0
- data/ext/zeromq/doc/zmq_unbind.txt +65 -0
- data/ext/zeromq/doc/zmq_version.txt +53 -0
- data/ext/zeromq/foreign/openpgm/Makefile.am +8 -0
- data/ext/zeromq/foreign/openpgm/libpgm-5.1.118~dfsg.tar.gz +0 -0
- data/ext/zeromq/include/zmq.h +402 -0
- data/ext/zeromq/include/zmq_utils.h +64 -0
- data/ext/zeromq/installer.ico +0 -0
- data/ext/zeromq/perf/Makefile.am +22 -0
- data/ext/zeromq/perf/inproc_lat.cpp +233 -0
- data/ext/zeromq/perf/inproc_thr.cpp +241 -0
- data/ext/zeromq/perf/local_lat.cpp +109 -0
- data/ext/zeromq/perf/local_thr.cpp +133 -0
- data/ext/zeromq/perf/remote_lat.cpp +122 -0
- data/ext/zeromq/perf/remote_thr.cpp +105 -0
- data/ext/zeromq/src/Makefile.am +171 -0
- data/ext/zeromq/src/address.cpp +78 -0
- data/ext/zeromq/src/address.hpp +52 -0
- data/ext/zeromq/src/array.hpp +155 -0
- data/ext/zeromq/src/atomic_counter.hpp +197 -0
- data/ext/zeromq/src/atomic_ptr.hpp +196 -0
- data/ext/zeromq/src/blob.hpp +129 -0
- data/ext/zeromq/src/clock.cpp +147 -0
- data/ext/zeromq/src/clock.hpp +60 -0
- data/ext/zeromq/src/command.hpp +154 -0
- data/ext/zeromq/src/config.hpp +89 -0
- data/ext/zeromq/src/ctx.cpp +352 -0
- data/ext/zeromq/src/ctx.hpp +173 -0
- data/ext/zeromq/src/dealer.cpp +133 -0
- data/ext/zeromq/src/dealer.hpp +92 -0
- data/ext/zeromq/src/decoder.cpp +166 -0
- data/ext/zeromq/src/decoder.hpp +248 -0
- data/ext/zeromq/src/devpoll.cpp +190 -0
- data/ext/zeromq/src/devpoll.hpp +105 -0
- data/ext/zeromq/src/dist.cpp +194 -0
- data/ext/zeromq/src/dist.hpp +105 -0
- data/ext/zeromq/src/encoder.cpp +102 -0
- data/ext/zeromq/src/encoder.hpp +200 -0
- data/ext/zeromq/src/epoll.cpp +178 -0
- data/ext/zeromq/src/epoll.hpp +101 -0
- data/ext/zeromq/src/err.cpp +291 -0
- data/ext/zeromq/src/err.hpp +155 -0
- data/ext/zeromq/src/fd.hpp +45 -0
- data/ext/zeromq/src/fq.cpp +141 -0
- data/ext/zeromq/src/fq.hpp +74 -0
- data/ext/zeromq/src/i_decoder.hpp +49 -0
- data/ext/zeromq/src/i_encoder.hpp +55 -0
- data/ext/zeromq/src/i_engine.hpp +55 -0
- data/ext/zeromq/src/i_msg_sink.hpp +43 -0
- data/ext/zeromq/src/i_msg_source.hpp +44 -0
- data/ext/zeromq/src/i_poll_events.hpp +47 -0
- data/ext/zeromq/src/io_object.cpp +108 -0
- data/ext/zeromq/src/io_object.hpp +81 -0
- data/ext/zeromq/src/io_thread.cpp +104 -0
- data/ext/zeromq/src/io_thread.hpp +91 -0
- data/ext/zeromq/src/ip.cpp +109 -0
- data/ext/zeromq/src/ip.hpp +41 -0
- data/ext/zeromq/src/ipc_address.cpp +84 -0
- data/ext/zeromq/src/ipc_address.hpp +67 -0
- data/ext/zeromq/src/ipc_connecter.cpp +265 -0
- data/ext/zeromq/src/ipc_connecter.hpp +128 -0
- data/ext/zeromq/src/ipc_listener.cpp +206 -0
- data/ext/zeromq/src/ipc_listener.hpp +99 -0
- data/ext/zeromq/src/kqueue.cpp +201 -0
- data/ext/zeromq/src/kqueue.hpp +107 -0
- data/ext/zeromq/src/lb.cpp +148 -0
- data/ext/zeromq/src/lb.hpp +73 -0
- data/ext/zeromq/src/libzmq.pc.in +10 -0
- data/ext/zeromq/src/likely.hpp +33 -0
- data/ext/zeromq/src/mailbox.cpp +87 -0
- data/ext/zeromq/src/mailbox.hpp +75 -0
- data/ext/zeromq/src/msg.cpp +299 -0
- data/ext/zeromq/src/msg.hpp +148 -0
- data/ext/zeromq/src/mtrie.cpp +428 -0
- data/ext/zeromq/src/mtrie.hpp +93 -0
- data/ext/zeromq/src/mutex.hpp +118 -0
- data/ext/zeromq/src/object.cpp +393 -0
- data/ext/zeromq/src/object.hpp +134 -0
- data/ext/zeromq/src/options.cpp +562 -0
- data/ext/zeromq/src/options.hpp +135 -0
- data/ext/zeromq/src/own.cpp +206 -0
- data/ext/zeromq/src/own.hpp +145 -0
- data/ext/zeromq/src/pair.cpp +136 -0
- data/ext/zeromq/src/pair.hpp +79 -0
- data/ext/zeromq/src/pgm_receiver.cpp +283 -0
- data/ext/zeromq/src/pgm_receiver.hpp +141 -0
- data/ext/zeromq/src/pgm_sender.cpp +218 -0
- data/ext/zeromq/src/pgm_sender.hpp +113 -0
- data/ext/zeromq/src/pgm_socket.cpp +706 -0
- data/ext/zeromq/src/pgm_socket.hpp +124 -0
- data/ext/zeromq/src/pipe.cpp +447 -0
- data/ext/zeromq/src/pipe.hpp +207 -0
- data/ext/zeromq/src/poll.cpp +176 -0
- data/ext/zeromq/src/poll.hpp +105 -0
- data/ext/zeromq/src/poller.hpp +82 -0
- data/ext/zeromq/src/poller_base.cpp +99 -0
- data/ext/zeromq/src/poller_base.hpp +86 -0
- data/ext/zeromq/src/precompiled.cpp +21 -0
- data/ext/zeromq/src/precompiled.hpp +47 -0
- data/ext/zeromq/src/proxy.cpp +150 -0
- data/ext/zeromq/src/proxy.hpp +32 -0
- data/ext/zeromq/src/pub.cpp +57 -0
- data/ext/zeromq/src/pub.hpp +69 -0
- data/ext/zeromq/src/pull.cpp +79 -0
- data/ext/zeromq/src/pull.hpp +81 -0
- data/ext/zeromq/src/push.cpp +76 -0
- data/ext/zeromq/src/push.hpp +80 -0
- data/ext/zeromq/src/random.cpp +52 -0
- data/ext/zeromq/src/random.hpp +37 -0
- data/ext/zeromq/src/reaper.cpp +117 -0
- data/ext/zeromq/src/reaper.hpp +80 -0
- data/ext/zeromq/src/rep.cpp +137 -0
- data/ext/zeromq/src/rep.hpp +80 -0
- data/ext/zeromq/src/req.cpp +185 -0
- data/ext/zeromq/src/req.hpp +91 -0
- data/ext/zeromq/src/router.cpp +364 -0
- data/ext/zeromq/src/router.hpp +138 -0
- data/ext/zeromq/src/select.cpp +216 -0
- data/ext/zeromq/src/select.hpp +126 -0
- data/ext/zeromq/src/session_base.cpp +503 -0
- data/ext/zeromq/src/session_base.hpp +156 -0
- data/ext/zeromq/src/signaler.cpp +406 -0
- data/ext/zeromq/src/signaler.hpp +63 -0
- data/ext/zeromq/src/socket_base.cpp +1236 -0
- data/ext/zeromq/src/socket_base.hpp +255 -0
- data/ext/zeromq/src/stdint.hpp +63 -0
- data/ext/zeromq/src/stream_engine.cpp +594 -0
- data/ext/zeromq/src/stream_engine.hpp +149 -0
- data/ext/zeromq/src/sub.cpp +93 -0
- data/ext/zeromq/src/sub.hpp +71 -0
- data/ext/zeromq/src/tcp.cpp +131 -0
- data/ext/zeromq/src/tcp.hpp +38 -0
- data/ext/zeromq/src/tcp_address.cpp +613 -0
- data/ext/zeromq/src/tcp_address.hpp +100 -0
- data/ext/zeromq/src/tcp_connecter.cpp +319 -0
- data/ext/zeromq/src/tcp_connecter.hpp +123 -0
- data/ext/zeromq/src/tcp_listener.cpp +293 -0
- data/ext/zeromq/src/tcp_listener.hpp +91 -0
- data/ext/zeromq/src/thread.cpp +107 -0
- data/ext/zeromq/src/thread.hpp +79 -0
- data/ext/zeromq/src/trie.cpp +337 -0
- data/ext/zeromq/src/trie.hpp +79 -0
- data/ext/zeromq/src/v1_decoder.cpp +162 -0
- data/ext/zeromq/src/v1_decoder.hpp +68 -0
- data/ext/zeromq/src/v1_encoder.cpp +103 -0
- data/ext/zeromq/src/v1_encoder.hpp +60 -0
- data/ext/zeromq/src/v1_protocol.hpp +43 -0
- data/ext/zeromq/src/version.rc.in +93 -0
- data/ext/zeromq/src/windows.hpp +181 -0
- data/ext/zeromq/src/wire.hpp +99 -0
- data/ext/zeromq/src/xpub.cpp +200 -0
- data/ext/zeromq/src/xpub.hpp +110 -0
- data/ext/zeromq/src/xsub.cpp +242 -0
- data/ext/zeromq/src/xsub.hpp +108 -0
- data/ext/zeromq/src/ypipe.hpp +210 -0
- data/ext/zeromq/src/yqueue.hpp +199 -0
- data/ext/zeromq/src/zmq.cpp +1058 -0
- data/ext/zeromq/src/zmq_utils.cpp +61 -0
- data/ext/zeromq/tests/Makefile.am +55 -0
- data/ext/zeromq/tests/test_connect_delay.cpp +260 -0
- data/ext/zeromq/tests/test_connect_resolve.cpp +54 -0
- data/ext/zeromq/tests/test_disconnect_inproc.cpp +120 -0
- data/ext/zeromq/tests/test_hwm.cpp +83 -0
- data/ext/zeromq/tests/test_invalid_rep.cpp +92 -0
- data/ext/zeromq/tests/test_last_endpoint.cpp +60 -0
- data/ext/zeromq/tests/test_monitor.cpp +289 -0
- data/ext/zeromq/tests/test_msg_flags.cpp +78 -0
- data/ext/zeromq/tests/test_pair_inproc.cpp +53 -0
- data/ext/zeromq/tests/test_pair_ipc.cpp +53 -0
- data/ext/zeromq/tests/test_pair_tcp.cpp +54 -0
- data/ext/zeromq/tests/test_reqrep_device.cpp +143 -0
- data/ext/zeromq/tests/test_reqrep_inproc.cpp +53 -0
- data/ext/zeromq/tests/test_reqrep_ipc.cpp +53 -0
- data/ext/zeromq/tests/test_reqrep_tcp.cpp +54 -0
- data/ext/zeromq/tests/test_router_mandatory.cpp +62 -0
- data/ext/zeromq/tests/test_shutdown_stress.cpp +93 -0
- data/ext/zeromq/tests/test_sub_forward.cpp +99 -0
- data/ext/zeromq/tests/test_term_endpoint.cpp +118 -0
- data/ext/zeromq/tests/test_timeo.cpp +119 -0
- data/ext/zeromq/tests/testutil.hpp +77 -0
- data/ext/zeromq/version.sh +21 -0
- data/lib/zmq/version.rb +1 -1
- data/rbczmq.gemspec +16 -3
- data/test/test_socket.rb +13 -1
- metadata +398 -9
- checksums.yaml +0 -15
- data/ext/czmq-1.4.1.tar.gz +0 -0
- data/ext/zeromq-3.2.3.tar.gz +0 -0
@@ -0,0 +1,960 @@
|
|
1
|
+
; CPack install script designed for a nmake build
|
2
|
+
|
3
|
+
;--------------------------------
|
4
|
+
; You must define these values
|
5
|
+
|
6
|
+
!define VERSION "@CPACK_PACKAGE_VERSION@"
|
7
|
+
!define PATCH "@CPACK_PACKAGE_VERSION_PATCH@"
|
8
|
+
!define INST_DIR "@CPACK_TEMPORARY_DIRECTORY@"
|
9
|
+
|
10
|
+
;--------------------------------
|
11
|
+
;Variables
|
12
|
+
|
13
|
+
Var MUI_TEMP
|
14
|
+
Var STARTMENU_FOLDER
|
15
|
+
Var SV_ALLUSERS
|
16
|
+
Var START_MENU
|
17
|
+
Var DO_NOT_ADD_TO_PATH
|
18
|
+
Var ADD_TO_PATH_ALL_USERS
|
19
|
+
Var ADD_TO_PATH_CURRENT_USER
|
20
|
+
Var INSTALL_DESKTOP
|
21
|
+
Var IS_DEFAULT_INSTALLDIR
|
22
|
+
;--------------------------------
|
23
|
+
;Include Modern UI
|
24
|
+
|
25
|
+
!include "MUI.nsh"
|
26
|
+
|
27
|
+
;Default installation folder
|
28
|
+
;InstallDir "$PROGRAMFILES\@CPACK_PACKAGE_INSTALL_DIRECTORY@"
|
29
|
+
InstallDir "$PROGRAMFILES64\@CPACK_PACKAGE_INSTALL_DIRECTORY@"
|
30
|
+
|
31
|
+
;--------------------------------
|
32
|
+
;General
|
33
|
+
|
34
|
+
;Name and file
|
35
|
+
Name "@CPACK_NSIS_PACKAGE_NAME@"
|
36
|
+
OutFile "@CPACK_TOPLEVEL_DIRECTORY@/@CPACK_OUTPUT_FILE_NAME@"
|
37
|
+
|
38
|
+
;Set compression
|
39
|
+
SetCompressor @CPACK_NSIS_COMPRESSOR@
|
40
|
+
|
41
|
+
@CPACK_NSIS_DEFINES@
|
42
|
+
|
43
|
+
!include Sections.nsh
|
44
|
+
|
45
|
+
;--- Component support macros: ---
|
46
|
+
; The code for the add/remove functionality is from:
|
47
|
+
; http://nsis.sourceforge.net/Add/Remove_Functionality
|
48
|
+
; It has been modified slightly and extended to provide
|
49
|
+
; inter-component dependencies.
|
50
|
+
Var AR_SecFlags
|
51
|
+
Var AR_RegFlags
|
52
|
+
@CPACK_NSIS_SECTION_SELECTED_VARS@
|
53
|
+
|
54
|
+
; Loads the "selected" flag for the section named SecName into the
|
55
|
+
; variable VarName.
|
56
|
+
!macro LoadSectionSelectedIntoVar SecName VarName
|
57
|
+
SectionGetFlags ${${SecName}} $${VarName}
|
58
|
+
IntOp $${VarName} $${VarName} & ${SF_SELECTED} ;Turn off all other bits
|
59
|
+
!macroend
|
60
|
+
|
61
|
+
; Loads the value of a variable... can we get around this?
|
62
|
+
!macro LoadVar VarName
|
63
|
+
IntOp $R0 0 + $${VarName}
|
64
|
+
!macroend
|
65
|
+
|
66
|
+
; Sets the value of a variable
|
67
|
+
!macro StoreVar VarName IntValue
|
68
|
+
IntOp $${VarName} 0 + ${IntValue}
|
69
|
+
!macroend
|
70
|
+
|
71
|
+
!macro InitSection SecName
|
72
|
+
; This macro reads component installed flag from the registry and
|
73
|
+
;changes checked state of the section on the components page.
|
74
|
+
;Input: section index constant name specified in Section command.
|
75
|
+
|
76
|
+
ClearErrors
|
77
|
+
;Reading component status from registry
|
78
|
+
ReadRegDWORD $AR_RegFlags HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_NAME@ (x64)\Components\${SecName}" "Installed"
|
79
|
+
IfErrors "default_${SecName}"
|
80
|
+
;Status will stay default if registry value not found
|
81
|
+
;(component was never installed)
|
82
|
+
IntOp $AR_RegFlags $AR_RegFlags & ${SF_SELECTED} ;Turn off all other bits
|
83
|
+
SectionGetFlags ${${SecName}} $AR_SecFlags ;Reading default section flags
|
84
|
+
IntOp $AR_SecFlags $AR_SecFlags & 0xFFFE ;Turn lowest (enabled) bit off
|
85
|
+
IntOp $AR_SecFlags $AR_RegFlags | $AR_SecFlags ;Change lowest bit
|
86
|
+
|
87
|
+
; Note whether this component was installed before
|
88
|
+
!insertmacro StoreVar ${SecName}_was_installed $AR_RegFlags
|
89
|
+
IntOp $R0 $AR_RegFlags & $AR_RegFlags
|
90
|
+
|
91
|
+
;Writing modified flags
|
92
|
+
SectionSetFlags ${${SecName}} $AR_SecFlags
|
93
|
+
|
94
|
+
"default_${SecName}:"
|
95
|
+
!insertmacro LoadSectionSelectedIntoVar ${SecName} ${SecName}_selected
|
96
|
+
!macroend
|
97
|
+
|
98
|
+
!macro FinishSection SecName
|
99
|
+
; This macro reads section flag set by user and removes the section
|
100
|
+
;if it is not selected.
|
101
|
+
;Then it writes component installed flag to registry
|
102
|
+
;Input: section index constant name specified in Section command.
|
103
|
+
|
104
|
+
SectionGetFlags ${${SecName}} $AR_SecFlags ;Reading section flags
|
105
|
+
;Checking lowest bit:
|
106
|
+
IntOp $AR_SecFlags $AR_SecFlags & ${SF_SELECTED}
|
107
|
+
IntCmp $AR_SecFlags 1 "leave_${SecName}"
|
108
|
+
;Section is not selected:
|
109
|
+
;Calling Section uninstall macro and writing zero installed flag
|
110
|
+
!insertmacro "Remove_${${SecName}}"
|
111
|
+
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_NAME@ (x64)\Components\${SecName}" \
|
112
|
+
"Installed" 0
|
113
|
+
Goto "exit_${SecName}"
|
114
|
+
|
115
|
+
"leave_${SecName}:"
|
116
|
+
;Section is selected:
|
117
|
+
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_NAME@ (x64)\Components\${SecName}" \
|
118
|
+
"Installed" 1
|
119
|
+
|
120
|
+
"exit_${SecName}:"
|
121
|
+
!macroend
|
122
|
+
|
123
|
+
!macro RemoveSection SecName
|
124
|
+
; This macro is used to call section's Remove_... macro
|
125
|
+
;from the uninstaller.
|
126
|
+
;Input: section index constant name specified in Section command.
|
127
|
+
|
128
|
+
!insertmacro "Remove_${${SecName}}"
|
129
|
+
!macroend
|
130
|
+
|
131
|
+
; Determine whether the selection of SecName changed
|
132
|
+
!macro MaybeSelectionChanged SecName
|
133
|
+
!insertmacro LoadVar ${SecName}_selected
|
134
|
+
SectionGetFlags ${${SecName}} $R1
|
135
|
+
IntOp $R1 $R1 & ${SF_SELECTED} ;Turn off all other bits
|
136
|
+
|
137
|
+
; See if the status has changed:
|
138
|
+
IntCmp $R0 $R1 "${SecName}_unchanged"
|
139
|
+
!insertmacro LoadSectionSelectedIntoVar ${SecName} ${SecName}_selected
|
140
|
+
|
141
|
+
IntCmp $R1 ${SF_SELECTED} "${SecName}_was_selected"
|
142
|
+
!insertmacro "Deselect_required_by_${SecName}"
|
143
|
+
goto "${SecName}_unchanged"
|
144
|
+
|
145
|
+
"${SecName}_was_selected:"
|
146
|
+
!insertmacro "Select_${SecName}_depends"
|
147
|
+
|
148
|
+
"${SecName}_unchanged:"
|
149
|
+
!macroend
|
150
|
+
;--- End of Add/Remove macros ---
|
151
|
+
|
152
|
+
;--------------------------------
|
153
|
+
;Interface Settings
|
154
|
+
|
155
|
+
!define MUI_HEADERIMAGE
|
156
|
+
!define MUI_ABORTWARNING
|
157
|
+
|
158
|
+
;--------------------------------
|
159
|
+
; path functions
|
160
|
+
|
161
|
+
!verbose 3
|
162
|
+
!include "WinMessages.NSH"
|
163
|
+
!verbose 4
|
164
|
+
|
165
|
+
;----------------------------------------
|
166
|
+
; based upon a script of "Written by KiCHiK 2003-01-18 05:57:02"
|
167
|
+
;----------------------------------------
|
168
|
+
!verbose 3
|
169
|
+
!include "WinMessages.NSH"
|
170
|
+
!verbose 4
|
171
|
+
;====================================================
|
172
|
+
; get_NT_environment
|
173
|
+
; Returns: the selected environment
|
174
|
+
; Output : head of the stack
|
175
|
+
;====================================================
|
176
|
+
!macro select_NT_profile UN
|
177
|
+
Function ${UN}select_NT_profile
|
178
|
+
StrCmp $ADD_TO_PATH_ALL_USERS "1" 0 environment_single
|
179
|
+
DetailPrint "Selected environment for all users"
|
180
|
+
Push "all"
|
181
|
+
Return
|
182
|
+
environment_single:
|
183
|
+
DetailPrint "Selected environment for current user only."
|
184
|
+
Push "current"
|
185
|
+
Return
|
186
|
+
FunctionEnd
|
187
|
+
!macroend
|
188
|
+
!insertmacro select_NT_profile ""
|
189
|
+
!insertmacro select_NT_profile "un."
|
190
|
+
;----------------------------------------------------
|
191
|
+
!define NT_current_env 'HKCU "Environment"'
|
192
|
+
!define NT_all_env 'HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"'
|
193
|
+
|
194
|
+
!ifndef WriteEnvStr_RegKey
|
195
|
+
!ifdef ALL_USERS
|
196
|
+
!define WriteEnvStr_RegKey \
|
197
|
+
'HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"'
|
198
|
+
!else
|
199
|
+
!define WriteEnvStr_RegKey 'HKCU "Environment"'
|
200
|
+
!endif
|
201
|
+
!endif
|
202
|
+
|
203
|
+
; AddToPath - Adds the given dir to the search path.
|
204
|
+
; Input - head of the stack
|
205
|
+
; Note - Win9x systems requires reboot
|
206
|
+
|
207
|
+
Function AddToPath
|
208
|
+
Exch $0
|
209
|
+
Push $1
|
210
|
+
Push $2
|
211
|
+
Push $3
|
212
|
+
|
213
|
+
# don't add if the path doesn't exist
|
214
|
+
IfFileExists "$0\*.*" "" AddToPath_done
|
215
|
+
|
216
|
+
ReadEnvStr $1 PATH
|
217
|
+
; if the path is too long for a NSIS variable NSIS will return a 0
|
218
|
+
; length string. If we find that, then warn and skip any path
|
219
|
+
; modification as it will trash the existing path.
|
220
|
+
StrLen $2 $1
|
221
|
+
IntCmp $2 0 CheckPathLength_ShowPathWarning CheckPathLength_Done CheckPathLength_Done
|
222
|
+
CheckPathLength_ShowPathWarning:
|
223
|
+
Messagebox MB_OK|MB_ICONEXCLAMATION "Warning! PATH too long installer unable to modify PATH!"
|
224
|
+
Goto AddToPath_done
|
225
|
+
CheckPathLength_Done:
|
226
|
+
Push "$1;"
|
227
|
+
Push "$0;"
|
228
|
+
Call StrStr
|
229
|
+
Pop $2
|
230
|
+
StrCmp $2 "" "" AddToPath_done
|
231
|
+
Push "$1;"
|
232
|
+
Push "$0\;"
|
233
|
+
Call StrStr
|
234
|
+
Pop $2
|
235
|
+
StrCmp $2 "" "" AddToPath_done
|
236
|
+
GetFullPathName /SHORT $3 $0
|
237
|
+
Push "$1;"
|
238
|
+
Push "$3;"
|
239
|
+
Call StrStr
|
240
|
+
Pop $2
|
241
|
+
StrCmp $2 "" "" AddToPath_done
|
242
|
+
Push "$1;"
|
243
|
+
Push "$3\;"
|
244
|
+
Call StrStr
|
245
|
+
Pop $2
|
246
|
+
StrCmp $2 "" "" AddToPath_done
|
247
|
+
|
248
|
+
Call IsNT
|
249
|
+
Pop $1
|
250
|
+
StrCmp $1 1 AddToPath_NT
|
251
|
+
; Not on NT
|
252
|
+
StrCpy $1 $WINDIR 2
|
253
|
+
FileOpen $1 "$1\autoexec.bat" a
|
254
|
+
FileSeek $1 -1 END
|
255
|
+
FileReadByte $1 $2
|
256
|
+
IntCmp $2 26 0 +2 +2 # DOS EOF
|
257
|
+
FileSeek $1 -1 END # write over EOF
|
258
|
+
FileWrite $1 "$\r$\nSET PATH=%PATH%;$3$\r$\n"
|
259
|
+
FileClose $1
|
260
|
+
SetRebootFlag true
|
261
|
+
Goto AddToPath_done
|
262
|
+
|
263
|
+
AddToPath_NT:
|
264
|
+
StrCmp $ADD_TO_PATH_ALL_USERS "1" ReadAllKey
|
265
|
+
ReadRegStr $1 ${NT_current_env} "PATH"
|
266
|
+
Goto DoTrim
|
267
|
+
ReadAllKey:
|
268
|
+
ReadRegStr $1 ${NT_all_env} "PATH"
|
269
|
+
DoTrim:
|
270
|
+
StrCmp $1 "" AddToPath_NTdoIt
|
271
|
+
Push $1
|
272
|
+
Call Trim
|
273
|
+
Pop $1
|
274
|
+
StrCpy $0 "$1;$0"
|
275
|
+
AddToPath_NTdoIt:
|
276
|
+
StrCmp $ADD_TO_PATH_ALL_USERS "1" WriteAllKey
|
277
|
+
WriteRegExpandStr ${NT_current_env} "PATH" $0
|
278
|
+
Goto DoSend
|
279
|
+
WriteAllKey:
|
280
|
+
WriteRegExpandStr ${NT_all_env} "PATH" $0
|
281
|
+
DoSend:
|
282
|
+
SendMessage ${HWND_BROADCAST} ${WM_WININICHANGE} 0 "STR:Environment" /TIMEOUT=5000
|
283
|
+
|
284
|
+
AddToPath_done:
|
285
|
+
Pop $3
|
286
|
+
Pop $2
|
287
|
+
Pop $1
|
288
|
+
Pop $0
|
289
|
+
FunctionEnd
|
290
|
+
|
291
|
+
|
292
|
+
; RemoveFromPath - Remove a given dir from the path
|
293
|
+
; Input: head of the stack
|
294
|
+
|
295
|
+
Function un.RemoveFromPath
|
296
|
+
Exch $0
|
297
|
+
Push $1
|
298
|
+
Push $2
|
299
|
+
Push $3
|
300
|
+
Push $4
|
301
|
+
Push $5
|
302
|
+
Push $6
|
303
|
+
|
304
|
+
IntFmt $6 "%c" 26 # DOS EOF
|
305
|
+
|
306
|
+
Call un.IsNT
|
307
|
+
Pop $1
|
308
|
+
StrCmp $1 1 unRemoveFromPath_NT
|
309
|
+
; Not on NT
|
310
|
+
StrCpy $1 $WINDIR 2
|
311
|
+
FileOpen $1 "$1\autoexec.bat" r
|
312
|
+
GetTempFileName $4
|
313
|
+
FileOpen $2 $4 w
|
314
|
+
GetFullPathName /SHORT $0 $0
|
315
|
+
StrCpy $0 "SET PATH=%PATH%;$0"
|
316
|
+
Goto unRemoveFromPath_dosLoop
|
317
|
+
|
318
|
+
unRemoveFromPath_dosLoop:
|
319
|
+
FileRead $1 $3
|
320
|
+
StrCpy $5 $3 1 -1 # read last char
|
321
|
+
StrCmp $5 $6 0 +2 # if DOS EOF
|
322
|
+
StrCpy $3 $3 -1 # remove DOS EOF so we can compare
|
323
|
+
StrCmp $3 "$0$\r$\n" unRemoveFromPath_dosLoopRemoveLine
|
324
|
+
StrCmp $3 "$0$\n" unRemoveFromPath_dosLoopRemoveLine
|
325
|
+
StrCmp $3 "$0" unRemoveFromPath_dosLoopRemoveLine
|
326
|
+
StrCmp $3 "" unRemoveFromPath_dosLoopEnd
|
327
|
+
FileWrite $2 $3
|
328
|
+
Goto unRemoveFromPath_dosLoop
|
329
|
+
unRemoveFromPath_dosLoopRemoveLine:
|
330
|
+
SetRebootFlag true
|
331
|
+
Goto unRemoveFromPath_dosLoop
|
332
|
+
|
333
|
+
unRemoveFromPath_dosLoopEnd:
|
334
|
+
FileClose $2
|
335
|
+
FileClose $1
|
336
|
+
StrCpy $1 $WINDIR 2
|
337
|
+
Delete "$1\autoexec.bat"
|
338
|
+
CopyFiles /SILENT $4 "$1\autoexec.bat"
|
339
|
+
Delete $4
|
340
|
+
Goto unRemoveFromPath_done
|
341
|
+
|
342
|
+
unRemoveFromPath_NT:
|
343
|
+
StrCmp $ADD_TO_PATH_ALL_USERS "1" unReadAllKey
|
344
|
+
ReadRegStr $1 ${NT_current_env} "PATH"
|
345
|
+
Goto unDoTrim
|
346
|
+
unReadAllKey:
|
347
|
+
ReadRegStr $1 ${NT_all_env} "PATH"
|
348
|
+
unDoTrim:
|
349
|
+
StrCpy $5 $1 1 -1 # copy last char
|
350
|
+
StrCmp $5 ";" +2 # if last char != ;
|
351
|
+
StrCpy $1 "$1;" # append ;
|
352
|
+
Push $1
|
353
|
+
Push "$0;"
|
354
|
+
Call un.StrStr ; Find `$0;` in $1
|
355
|
+
Pop $2 ; pos of our dir
|
356
|
+
StrCmp $2 "" unRemoveFromPath_done
|
357
|
+
; else, it is in path
|
358
|
+
# $0 - path to add
|
359
|
+
# $1 - path var
|
360
|
+
StrLen $3 "$0;"
|
361
|
+
StrLen $4 $2
|
362
|
+
StrCpy $5 $1 -$4 # $5 is now the part before the path to remove
|
363
|
+
StrCpy $6 $2 "" $3 # $6 is now the part after the path to remove
|
364
|
+
StrCpy $3 $5$6
|
365
|
+
|
366
|
+
StrCpy $5 $3 1 -1 # copy last char
|
367
|
+
StrCmp $5 ";" 0 +2 # if last char == ;
|
368
|
+
StrCpy $3 $3 -1 # remove last char
|
369
|
+
|
370
|
+
StrCmp $ADD_TO_PATH_ALL_USERS "1" unWriteAllKey
|
371
|
+
WriteRegExpandStr ${NT_current_env} "PATH" $3
|
372
|
+
Goto unDoSend
|
373
|
+
unWriteAllKey:
|
374
|
+
WriteRegExpandStr ${NT_all_env} "PATH" $3
|
375
|
+
unDoSend:
|
376
|
+
SendMessage ${HWND_BROADCAST} ${WM_WININICHANGE} 0 "STR:Environment" /TIMEOUT=5000
|
377
|
+
|
378
|
+
unRemoveFromPath_done:
|
379
|
+
Pop $6
|
380
|
+
Pop $5
|
381
|
+
Pop $4
|
382
|
+
Pop $3
|
383
|
+
Pop $2
|
384
|
+
Pop $1
|
385
|
+
Pop $0
|
386
|
+
FunctionEnd
|
387
|
+
|
388
|
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
389
|
+
; Uninstall sutff
|
390
|
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
391
|
+
|
392
|
+
###########################################
|
393
|
+
# Utility Functions #
|
394
|
+
###########################################
|
395
|
+
|
396
|
+
;====================================================
|
397
|
+
; IsNT - Returns 1 if the current system is NT, 0
|
398
|
+
; otherwise.
|
399
|
+
; Output: head of the stack
|
400
|
+
;====================================================
|
401
|
+
; IsNT
|
402
|
+
; no input
|
403
|
+
; output, top of the stack = 1 if NT or 0 if not
|
404
|
+
;
|
405
|
+
; Usage:
|
406
|
+
; Call IsNT
|
407
|
+
; Pop $R0
|
408
|
+
; ($R0 at this point is 1 or 0)
|
409
|
+
|
410
|
+
!macro IsNT un
|
411
|
+
Function ${un}IsNT
|
412
|
+
Push $0
|
413
|
+
ReadRegStr $0 HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion" CurrentVersion
|
414
|
+
StrCmp $0 "" 0 IsNT_yes
|
415
|
+
; we are not NT.
|
416
|
+
Pop $0
|
417
|
+
Push 0
|
418
|
+
Return
|
419
|
+
|
420
|
+
IsNT_yes:
|
421
|
+
; NT!!!
|
422
|
+
Pop $0
|
423
|
+
Push 1
|
424
|
+
FunctionEnd
|
425
|
+
!macroend
|
426
|
+
!insertmacro IsNT ""
|
427
|
+
!insertmacro IsNT "un."
|
428
|
+
|
429
|
+
; StrStr
|
430
|
+
; input, top of stack = string to search for
|
431
|
+
; top of stack-1 = string to search in
|
432
|
+
; output, top of stack (replaces with the portion of the string remaining)
|
433
|
+
; modifies no other variables.
|
434
|
+
;
|
435
|
+
; Usage:
|
436
|
+
; Push "this is a long ass string"
|
437
|
+
; Push "ass"
|
438
|
+
; Call StrStr
|
439
|
+
; Pop $R0
|
440
|
+
; ($R0 at this point is "ass string")
|
441
|
+
|
442
|
+
!macro StrStr un
|
443
|
+
Function ${un}StrStr
|
444
|
+
Exch $R1 ; st=haystack,old$R1, $R1=needle
|
445
|
+
Exch ; st=old$R1,haystack
|
446
|
+
Exch $R2 ; st=old$R1,old$R2, $R2=haystack
|
447
|
+
Push $R3
|
448
|
+
Push $R4
|
449
|
+
Push $R5
|
450
|
+
StrLen $R3 $R1
|
451
|
+
StrCpy $R4 0
|
452
|
+
; $R1=needle
|
453
|
+
; $R2=haystack
|
454
|
+
; $R3=len(needle)
|
455
|
+
; $R4=cnt
|
456
|
+
; $R5=tmp
|
457
|
+
loop:
|
458
|
+
StrCpy $R5 $R2 $R3 $R4
|
459
|
+
StrCmp $R5 $R1 done
|
460
|
+
StrCmp $R5 "" done
|
461
|
+
IntOp $R4 $R4 + 1
|
462
|
+
Goto loop
|
463
|
+
done:
|
464
|
+
StrCpy $R1 $R2 "" $R4
|
465
|
+
Pop $R5
|
466
|
+
Pop $R4
|
467
|
+
Pop $R3
|
468
|
+
Pop $R2
|
469
|
+
Exch $R1
|
470
|
+
FunctionEnd
|
471
|
+
!macroend
|
472
|
+
!insertmacro StrStr ""
|
473
|
+
!insertmacro StrStr "un."
|
474
|
+
|
475
|
+
Function Trim ; Added by Pelaca
|
476
|
+
Exch $R1
|
477
|
+
Push $R2
|
478
|
+
Loop:
|
479
|
+
StrCpy $R2 "$R1" 1 -1
|
480
|
+
StrCmp "$R2" " " RTrim
|
481
|
+
StrCmp "$R2" "$\n" RTrim
|
482
|
+
StrCmp "$R2" "$\r" RTrim
|
483
|
+
StrCmp "$R2" ";" RTrim
|
484
|
+
GoTo Done
|
485
|
+
RTrim:
|
486
|
+
StrCpy $R1 "$R1" -1
|
487
|
+
Goto Loop
|
488
|
+
Done:
|
489
|
+
Pop $R2
|
490
|
+
Exch $R1
|
491
|
+
FunctionEnd
|
492
|
+
|
493
|
+
Function ConditionalAddToRegisty
|
494
|
+
Pop $0
|
495
|
+
Pop $1
|
496
|
+
StrCmp "$0" "" ConditionalAddToRegisty_EmptyString
|
497
|
+
WriteRegStr SHCTX "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_NAME@ (x64)" \
|
498
|
+
"$1" "$0"
|
499
|
+
;MessageBox MB_OK "Set Registry: '$1' to '$0'"
|
500
|
+
DetailPrint "Set install registry entry: '$1' to '$0'"
|
501
|
+
ConditionalAddToRegisty_EmptyString:
|
502
|
+
FunctionEnd
|
503
|
+
|
504
|
+
;--------------------------------
|
505
|
+
|
506
|
+
!ifdef CPACK_USES_DOWNLOAD
|
507
|
+
Function DownloadFile
|
508
|
+
IfFileExists $INSTDIR\* +2
|
509
|
+
CreateDirectory $INSTDIR
|
510
|
+
Pop $0
|
511
|
+
|
512
|
+
; Skip if already downloaded
|
513
|
+
IfFileExists $INSTDIR\$0 0 +2
|
514
|
+
Return
|
515
|
+
|
516
|
+
StrCpy $1 "@CPACK_DOWNLOAD_SITE@"
|
517
|
+
|
518
|
+
try_again:
|
519
|
+
NSISdl::download "$1/$0" "$INSTDIR\$0"
|
520
|
+
|
521
|
+
Pop $1
|
522
|
+
StrCmp $1 "success" success
|
523
|
+
StrCmp $1 "Cancelled" cancel
|
524
|
+
MessageBox MB_OK "Download failed: $1"
|
525
|
+
cancel:
|
526
|
+
Return
|
527
|
+
success:
|
528
|
+
FunctionEnd
|
529
|
+
!endif
|
530
|
+
|
531
|
+
;--------------------------------
|
532
|
+
; Installation types
|
533
|
+
@CPACK_NSIS_INSTALLATION_TYPES@
|
534
|
+
|
535
|
+
;--------------------------------
|
536
|
+
; Component sections
|
537
|
+
@CPACK_NSIS_COMPONENT_SECTIONS@
|
538
|
+
|
539
|
+
;--------------------------------
|
540
|
+
; Define some macro setting for the gui
|
541
|
+
@CPACK_NSIS_INSTALLER_MUI_ICON_CODE@
|
542
|
+
@CPACK_NSIS_INSTALLER_ICON_CODE@
|
543
|
+
@CPACK_NSIS_INSTALLER_MUI_COMPONENTS_DESC@
|
544
|
+
|
545
|
+
;--------------------------------
|
546
|
+
;Pages
|
547
|
+
!insertmacro MUI_PAGE_WELCOME
|
548
|
+
|
549
|
+
!insertmacro MUI_PAGE_LICENSE "@CPACK_RESOURCE_FILE_LICENSE@"
|
550
|
+
Page custom InstallOptionsPage
|
551
|
+
!insertmacro MUI_PAGE_DIRECTORY
|
552
|
+
|
553
|
+
;Start Menu Folder Page Configuration
|
554
|
+
!define MUI_STARTMENUPAGE_REGISTRY_ROOT "SHCTX"
|
555
|
+
!define MUI_STARTMENUPAGE_REGISTRY_KEY "Software\@CPACK_PACKAGE_VENDOR@\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@"
|
556
|
+
!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "Start Menu Folder"
|
557
|
+
!insertmacro MUI_PAGE_STARTMENU Application $STARTMENU_FOLDER
|
558
|
+
|
559
|
+
!define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\README.txt"
|
560
|
+
|
561
|
+
@CPACK_NSIS_PAGE_COMPONENTS@
|
562
|
+
|
563
|
+
!insertmacro MUI_PAGE_INSTFILES
|
564
|
+
!insertmacro MUI_PAGE_FINISH
|
565
|
+
|
566
|
+
!insertmacro MUI_UNPAGE_CONFIRM
|
567
|
+
!insertmacro MUI_UNPAGE_INSTFILES
|
568
|
+
!insertmacro MUI_UNPAGE_FINISH
|
569
|
+
|
570
|
+
;--------------------------------
|
571
|
+
;Languages
|
572
|
+
|
573
|
+
!insertmacro MUI_LANGUAGE "English" ;first language is the default language
|
574
|
+
!insertmacro MUI_LANGUAGE "Albanian"
|
575
|
+
!insertmacro MUI_LANGUAGE "Arabic"
|
576
|
+
!insertmacro MUI_LANGUAGE "Basque"
|
577
|
+
!insertmacro MUI_LANGUAGE "Belarusian"
|
578
|
+
!insertmacro MUI_LANGUAGE "Bosnian"
|
579
|
+
!insertmacro MUI_LANGUAGE "Breton"
|
580
|
+
!insertmacro MUI_LANGUAGE "Bulgarian"
|
581
|
+
!insertmacro MUI_LANGUAGE "Croatian"
|
582
|
+
!insertmacro MUI_LANGUAGE "Czech"
|
583
|
+
!insertmacro MUI_LANGUAGE "Danish"
|
584
|
+
!insertmacro MUI_LANGUAGE "Dutch"
|
585
|
+
!insertmacro MUI_LANGUAGE "Estonian"
|
586
|
+
!insertmacro MUI_LANGUAGE "Farsi"
|
587
|
+
!insertmacro MUI_LANGUAGE "Finnish"
|
588
|
+
!insertmacro MUI_LANGUAGE "French"
|
589
|
+
!insertmacro MUI_LANGUAGE "German"
|
590
|
+
!insertmacro MUI_LANGUAGE "Greek"
|
591
|
+
!insertmacro MUI_LANGUAGE "Hebrew"
|
592
|
+
!insertmacro MUI_LANGUAGE "Hungarian"
|
593
|
+
!insertmacro MUI_LANGUAGE "Icelandic"
|
594
|
+
!insertmacro MUI_LANGUAGE "Indonesian"
|
595
|
+
!insertmacro MUI_LANGUAGE "Irish"
|
596
|
+
!insertmacro MUI_LANGUAGE "Italian"
|
597
|
+
!insertmacro MUI_LANGUAGE "Japanese"
|
598
|
+
!insertmacro MUI_LANGUAGE "Korean"
|
599
|
+
!insertmacro MUI_LANGUAGE "Kurdish"
|
600
|
+
!insertmacro MUI_LANGUAGE "Latvian"
|
601
|
+
!insertmacro MUI_LANGUAGE "Lithuanian"
|
602
|
+
!insertmacro MUI_LANGUAGE "Luxembourgish"
|
603
|
+
!insertmacro MUI_LANGUAGE "Macedonian"
|
604
|
+
!insertmacro MUI_LANGUAGE "Malay"
|
605
|
+
!insertmacro MUI_LANGUAGE "Mongolian"
|
606
|
+
!insertmacro MUI_LANGUAGE "Norwegian"
|
607
|
+
!insertmacro MUI_LANGUAGE "Polish"
|
608
|
+
!insertmacro MUI_LANGUAGE "Portuguese"
|
609
|
+
!insertmacro MUI_LANGUAGE "PortugueseBR"
|
610
|
+
!insertmacro MUI_LANGUAGE "Romanian"
|
611
|
+
!insertmacro MUI_LANGUAGE "Russian"
|
612
|
+
!insertmacro MUI_LANGUAGE "Serbian"
|
613
|
+
!insertmacro MUI_LANGUAGE "SerbianLatin"
|
614
|
+
!insertmacro MUI_LANGUAGE "SimpChinese"
|
615
|
+
!insertmacro MUI_LANGUAGE "Slovak"
|
616
|
+
!insertmacro MUI_LANGUAGE "Slovenian"
|
617
|
+
!insertmacro MUI_LANGUAGE "Spanish"
|
618
|
+
!insertmacro MUI_LANGUAGE "Swedish"
|
619
|
+
!insertmacro MUI_LANGUAGE "Thai"
|
620
|
+
!insertmacro MUI_LANGUAGE "TradChinese"
|
621
|
+
!insertmacro MUI_LANGUAGE "Turkish"
|
622
|
+
!insertmacro MUI_LANGUAGE "Ukrainian"
|
623
|
+
!insertmacro MUI_LANGUAGE "Welsh"
|
624
|
+
|
625
|
+
|
626
|
+
;--------------------------------
|
627
|
+
;Reserve Files
|
628
|
+
|
629
|
+
;These files should be inserted before other files in the data block
|
630
|
+
;Keep these lines before any File command
|
631
|
+
;Only for solid compression (by default, solid compression is enabled for BZIP2 and LZMA)
|
632
|
+
|
633
|
+
ReserveFile "NSIS.InstallOptions.ini"
|
634
|
+
!insertmacro MUI_RESERVEFILE_INSTALLOPTIONS
|
635
|
+
|
636
|
+
;--------------------------------
|
637
|
+
;Installer Sections
|
638
|
+
|
639
|
+
Section "-Core installation"
|
640
|
+
;Use the entire tree produced by the INSTALL target. Keep the
|
641
|
+
;list of directories here in sync with the RMDir commands below.
|
642
|
+
SetOutPath "$INSTDIR"
|
643
|
+
@CPACK_NSIS_FULL_INSTALL@
|
644
|
+
|
645
|
+
;Store installation folder
|
646
|
+
WriteRegStr SHCTX "Software\@CPACK_PACKAGE_VENDOR@\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@" "" $INSTDIR
|
647
|
+
|
648
|
+
;Create uninstaller
|
649
|
+
WriteUninstaller "$INSTDIR\Uninstall.exe"
|
650
|
+
Push "DisplayName"
|
651
|
+
Push "@CPACK_NSIS_DISPLAY_NAME@"
|
652
|
+
Call ConditionalAddToRegisty
|
653
|
+
Push "DisplayVersion"
|
654
|
+
Push "@CPACK_PACKAGE_VERSION@"
|
655
|
+
Call ConditionalAddToRegisty
|
656
|
+
Push "Publisher"
|
657
|
+
Push "@CPACK_PACKAGE_VENDOR@"
|
658
|
+
Call ConditionalAddToRegisty
|
659
|
+
Push "UninstallString"
|
660
|
+
Push "$INSTDIR\Uninstall.exe"
|
661
|
+
Call ConditionalAddToRegisty
|
662
|
+
Push "NoRepair"
|
663
|
+
Push "1"
|
664
|
+
Call ConditionalAddToRegisty
|
665
|
+
|
666
|
+
!ifdef CPACK_NSIS_ADD_REMOVE
|
667
|
+
;Create add/remove functionality
|
668
|
+
Push "ModifyPath"
|
669
|
+
Push "$INSTDIR\AddRemove.exe"
|
670
|
+
Call ConditionalAddToRegisty
|
671
|
+
!else
|
672
|
+
Push "NoModify"
|
673
|
+
Push "1"
|
674
|
+
Call ConditionalAddToRegisty
|
675
|
+
!endif
|
676
|
+
|
677
|
+
; Optional registration
|
678
|
+
Push "DisplayIcon"
|
679
|
+
Push "$INSTDIR\@CPACK_NSIS_INSTALLED_ICON_NAME@"
|
680
|
+
Call ConditionalAddToRegisty
|
681
|
+
Push "HelpLink"
|
682
|
+
Push "@CPACK_NSIS_HELP_LINK@"
|
683
|
+
Call ConditionalAddToRegisty
|
684
|
+
Push "URLInfoAbout"
|
685
|
+
Push "@CPACK_NSIS_URL_INFO_ABOUT@"
|
686
|
+
Call ConditionalAddToRegisty
|
687
|
+
Push "Contact"
|
688
|
+
Push "@CPACK_NSIS_CONTACT@"
|
689
|
+
Call ConditionalAddToRegisty
|
690
|
+
!insertmacro MUI_INSTALLOPTIONS_READ $INSTALL_DESKTOP "NSIS.InstallOptions.ini" "Field 5" "State"
|
691
|
+
!insertmacro MUI_STARTMENU_WRITE_BEGIN Application
|
692
|
+
|
693
|
+
;Create shortcuts
|
694
|
+
CreateDirectory "$SMPROGRAMS\$STARTMENU_FOLDER"
|
695
|
+
@CPACK_NSIS_CREATE_ICONS@
|
696
|
+
@CPACK_NSIS_CREATE_ICONS_EXTRA@
|
697
|
+
CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\Uninstall.lnk" "$INSTDIR\Uninstall.exe"
|
698
|
+
|
699
|
+
;Read a value from an InstallOptions INI file
|
700
|
+
!insertmacro MUI_INSTALLOPTIONS_READ $DO_NOT_ADD_TO_PATH "NSIS.InstallOptions.ini" "Field 2" "State"
|
701
|
+
!insertmacro MUI_INSTALLOPTIONS_READ $ADD_TO_PATH_ALL_USERS "NSIS.InstallOptions.ini" "Field 3" "State"
|
702
|
+
!insertmacro MUI_INSTALLOPTIONS_READ $ADD_TO_PATH_CURRENT_USER "NSIS.InstallOptions.ini" "Field 4" "State"
|
703
|
+
|
704
|
+
; Write special uninstall registry entries
|
705
|
+
Push "StartMenu"
|
706
|
+
Push "$STARTMENU_FOLDER"
|
707
|
+
Call ConditionalAddToRegisty
|
708
|
+
Push "DoNotAddToPath"
|
709
|
+
Push "$DO_NOT_ADD_TO_PATH"
|
710
|
+
Call ConditionalAddToRegisty
|
711
|
+
Push "AddToPathAllUsers"
|
712
|
+
Push "$ADD_TO_PATH_ALL_USERS"
|
713
|
+
Call ConditionalAddToRegisty
|
714
|
+
Push "AddToPathCurrentUser"
|
715
|
+
Push "$ADD_TO_PATH_CURRENT_USER"
|
716
|
+
Call ConditionalAddToRegisty
|
717
|
+
Push "InstallToDesktop"
|
718
|
+
Push "$INSTALL_DESKTOP"
|
719
|
+
Call ConditionalAddToRegisty
|
720
|
+
|
721
|
+
!insertmacro MUI_STARTMENU_WRITE_END
|
722
|
+
|
723
|
+
@CPACK_NSIS_EXTRA_INSTALL_COMMANDS@
|
724
|
+
|
725
|
+
SectionEnd
|
726
|
+
|
727
|
+
Section "-Add to path"
|
728
|
+
Push $INSTDIR\bin
|
729
|
+
StrCmp "@CPACK_NSIS_MODIFY_PATH@" "ON" 0 doNotAddToPath
|
730
|
+
StrCmp $DO_NOT_ADD_TO_PATH "1" doNotAddToPath 0
|
731
|
+
Call AddToPath
|
732
|
+
doNotAddToPath:
|
733
|
+
SectionEnd
|
734
|
+
|
735
|
+
;--------------------------------
|
736
|
+
; Create custom pages
|
737
|
+
Function InstallOptionsPage
|
738
|
+
!insertmacro MUI_HEADER_TEXT "Install Options" "Choose options for installing @CPACK_NSIS_PACKAGE_NAME@"
|
739
|
+
!insertmacro MUI_INSTALLOPTIONS_DISPLAY "NSIS.InstallOptions.ini"
|
740
|
+
|
741
|
+
FunctionEnd
|
742
|
+
|
743
|
+
;--------------------------------
|
744
|
+
; determine admin versus local install
|
745
|
+
Function un.onInit
|
746
|
+
|
747
|
+
ClearErrors
|
748
|
+
UserInfo::GetName
|
749
|
+
IfErrors noLM
|
750
|
+
Pop $0
|
751
|
+
UserInfo::GetAccountType
|
752
|
+
Pop $1
|
753
|
+
StrCmp $1 "Admin" 0 +3
|
754
|
+
SetShellVarContext all
|
755
|
+
;MessageBox MB_OK 'User "$0" is in the Admin group'
|
756
|
+
Goto done
|
757
|
+
StrCmp $1 "Power" 0 +3
|
758
|
+
SetShellVarContext all
|
759
|
+
;MessageBox MB_OK 'User "$0" is in the Power Users group'
|
760
|
+
Goto done
|
761
|
+
|
762
|
+
noLM:
|
763
|
+
;Get installation folder from registry if available
|
764
|
+
|
765
|
+
done:
|
766
|
+
|
767
|
+
;Disable WoW64 redirection
|
768
|
+
SetRegView 64
|
769
|
+
|
770
|
+
FunctionEnd
|
771
|
+
|
772
|
+
;--- Add/Remove callback functions: ---
|
773
|
+
!macro SectionList MacroName
|
774
|
+
;This macro used to perform operation on multiple sections.
|
775
|
+
;List all of your components in following manner here.
|
776
|
+
@CPACK_NSIS_COMPONENT_SECTION_LIST@
|
777
|
+
!macroend
|
778
|
+
|
779
|
+
Section -FinishComponents
|
780
|
+
;Removes unselected components and writes component status to registry
|
781
|
+
!insertmacro SectionList "FinishSection"
|
782
|
+
|
783
|
+
!ifdef CPACK_NSIS_ADD_REMOVE
|
784
|
+
; Get the name of the installer executable
|
785
|
+
System::Call 'kernel32::GetModuleFileNameA(i 0, t .R0, i 1024) i r1'
|
786
|
+
StrCpy $R3 $R0
|
787
|
+
|
788
|
+
; Strip off the last 13 characters, to see if we have AddRemove.exe
|
789
|
+
StrLen $R1 $R0
|
790
|
+
IntOp $R1 $R0 - 13
|
791
|
+
StrCpy $R2 $R0 13 $R1
|
792
|
+
StrCmp $R2 "AddRemove.exe" addremove_installed
|
793
|
+
|
794
|
+
; We're not running AddRemove.exe, so install it
|
795
|
+
CopyFiles $R3 $INSTDIR\AddRemove.exe
|
796
|
+
|
797
|
+
addremove_installed:
|
798
|
+
!endif
|
799
|
+
SectionEnd
|
800
|
+
;--- End of Add/Remove callback functions ---
|
801
|
+
|
802
|
+
;--------------------------------
|
803
|
+
; Component dependencies
|
804
|
+
Function .onSelChange
|
805
|
+
!insertmacro SectionList MaybeSelectionChanged
|
806
|
+
FunctionEnd
|
807
|
+
|
808
|
+
;--------------------------------
|
809
|
+
;Uninstaller Section
|
810
|
+
|
811
|
+
Section "Uninstall"
|
812
|
+
ReadRegStr $START_MENU SHCTX \
|
813
|
+
"Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_NAME@ (x64)" "StartMenu"
|
814
|
+
;MessageBox MB_OK "Start menu is in: $START_MENU"
|
815
|
+
ReadRegStr $DO_NOT_ADD_TO_PATH SHCTX \
|
816
|
+
"Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_NAME@ (x64)" "DoNotAddToPath"
|
817
|
+
ReadRegStr $ADD_TO_PATH_ALL_USERS SHCTX \
|
818
|
+
"Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_NAME@ (x64)" "AddToPathAllUsers"
|
819
|
+
ReadRegStr $ADD_TO_PATH_CURRENT_USER SHCTX \
|
820
|
+
"Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_NAME@ (x64)" "AddToPathCurrentUser"
|
821
|
+
;MessageBox MB_OK "Add to path: $DO_NOT_ADD_TO_PATH all users: $ADD_TO_PATH_ALL_USERS"
|
822
|
+
ReadRegStr $INSTALL_DESKTOP SHCTX \
|
823
|
+
"Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_NAME@ (x64)" "InstallToDesktop"
|
824
|
+
;MessageBox MB_OK "Install to desktop: $INSTALL_DESKTOP "
|
825
|
+
|
826
|
+
@CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS@
|
827
|
+
|
828
|
+
;Remove files we installed.
|
829
|
+
;Keep the list of directories here in sync with the File commands above.
|
830
|
+
@CPACK_NSIS_DELETE_FILES@
|
831
|
+
@CPACK_NSIS_DELETE_DIRECTORIES@
|
832
|
+
|
833
|
+
!ifdef CPACK_NSIS_ADD_REMOVE
|
834
|
+
;Remove the add/remove program
|
835
|
+
Delete "$INSTDIR\AddRemove.exe"
|
836
|
+
!endif
|
837
|
+
|
838
|
+
;Remove the uninstaller itself.
|
839
|
+
Delete "$INSTDIR\Uninstall.exe"
|
840
|
+
DeleteRegKey SHCTX "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_NAME@ (x64)"
|
841
|
+
|
842
|
+
;Remove the installation directory if it is empty.
|
843
|
+
RMDir "$INSTDIR"
|
844
|
+
|
845
|
+
; Remove the registry entries.
|
846
|
+
DeleteRegKey SHCTX "Software\@CPACK_PACKAGE_VENDOR@\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@"
|
847
|
+
|
848
|
+
; Removes all optional components
|
849
|
+
!insertmacro SectionList "RemoveSection"
|
850
|
+
|
851
|
+
!insertmacro MUI_STARTMENU_GETFOLDER Application $MUI_TEMP
|
852
|
+
|
853
|
+
Delete "$SMPROGRAMS\$MUI_TEMP\Uninstall.lnk"
|
854
|
+
@CPACK_NSIS_DELETE_ICONS@
|
855
|
+
@CPACK_NSIS_DELETE_ICONS_EXTRA@
|
856
|
+
|
857
|
+
;Delete empty start menu parent diretories
|
858
|
+
StrCpy $MUI_TEMP "$SMPROGRAMS\$MUI_TEMP"
|
859
|
+
|
860
|
+
startMenuDeleteLoop:
|
861
|
+
ClearErrors
|
862
|
+
RMDir $MUI_TEMP
|
863
|
+
GetFullPathName $MUI_TEMP "$MUI_TEMP\.."
|
864
|
+
|
865
|
+
IfErrors startMenuDeleteLoopDone
|
866
|
+
|
867
|
+
StrCmp "$MUI_TEMP" "$SMPROGRAMS" startMenuDeleteLoopDone startMenuDeleteLoop
|
868
|
+
startMenuDeleteLoopDone:
|
869
|
+
|
870
|
+
; If the user changed the shortcut, then untinstall may not work. This should
|
871
|
+
; try to fix it.
|
872
|
+
StrCpy $MUI_TEMP "$START_MENU"
|
873
|
+
Delete "$SMPROGRAMS\$MUI_TEMP\Uninstall.lnk"
|
874
|
+
@CPACK_NSIS_DELETE_ICONS_EXTRA@
|
875
|
+
|
876
|
+
;Delete empty start menu parent diretories
|
877
|
+
StrCpy $MUI_TEMP "$SMPROGRAMS\$MUI_TEMP"
|
878
|
+
|
879
|
+
secondStartMenuDeleteLoop:
|
880
|
+
ClearErrors
|
881
|
+
RMDir $MUI_TEMP
|
882
|
+
GetFullPathName $MUI_TEMP "$MUI_TEMP\.."
|
883
|
+
|
884
|
+
IfErrors secondStartMenuDeleteLoopDone
|
885
|
+
|
886
|
+
StrCmp "$MUI_TEMP" "$SMPROGRAMS" secondStartMenuDeleteLoopDone secondStartMenuDeleteLoop
|
887
|
+
secondStartMenuDeleteLoopDone:
|
888
|
+
|
889
|
+
DeleteRegKey /ifempty SHCTX "Software\@CPACK_PACKAGE_VENDOR@\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@"
|
890
|
+
|
891
|
+
Push $INSTDIR\bin
|
892
|
+
StrCmp $DO_NOT_ADD_TO_PATH_ "1" doNotRemoveFromPath 0
|
893
|
+
Call un.RemoveFromPath
|
894
|
+
doNotRemoveFromPath:
|
895
|
+
SectionEnd
|
896
|
+
|
897
|
+
;--------------------------------
|
898
|
+
; determine admin versus local install
|
899
|
+
; Is install for "AllUsers" or "JustMe"?
|
900
|
+
; Default to "JustMe" - set to "AllUsers" if admin or on Win9x
|
901
|
+
; This function is used for the very first "custom page" of the installer.
|
902
|
+
; This custom page does not show up visibly, but it executes prior to the
|
903
|
+
; first visible page and sets up $INSTDIR properly...
|
904
|
+
; Choose different default installation folder based on SV_ALLUSERS...
|
905
|
+
; "Program Files" for AllUsers, "My Documents" for JustMe...
|
906
|
+
|
907
|
+
Function .onInit
|
908
|
+
; Reads components status for registry
|
909
|
+
!insertmacro SectionList "InitSection"
|
910
|
+
|
911
|
+
; check to see if /D has been used to change
|
912
|
+
; the install directory by comparing it to the
|
913
|
+
; install directory that is expected to be the
|
914
|
+
; default
|
915
|
+
StrCpy $IS_DEFAULT_INSTALLDIR 0
|
916
|
+
;StrCmp "$INSTDIR" "$PROGRAMFILES\@CPACK_PACKAGE_INSTALL_DIRECTORY@" 0 +2
|
917
|
+
StrCmp "$INSTDIR" "$PROGRAMFILES64\@CPACK_PACKAGE_INSTALL_DIRECTORY@" 0 +2
|
918
|
+
StrCpy $IS_DEFAULT_INSTALLDIR 1
|
919
|
+
|
920
|
+
StrCpy $SV_ALLUSERS "JustMe"
|
921
|
+
; if default install dir then change the default
|
922
|
+
; if it is installed for JustMe
|
923
|
+
StrCmp "$IS_DEFAULT_INSTALLDIR" "1" 0 +2
|
924
|
+
StrCpy $INSTDIR "$DOCUMENTS\@CPACK_PACKAGE_INSTALL_DIRECTORY@"
|
925
|
+
|
926
|
+
;Disable WoW64 redirection
|
927
|
+
SetRegView 64
|
928
|
+
|
929
|
+
ClearErrors
|
930
|
+
UserInfo::GetName
|
931
|
+
IfErrors noLM
|
932
|
+
Pop $0
|
933
|
+
UserInfo::GetAccountType
|
934
|
+
Pop $1
|
935
|
+
StrCmp $1 "Admin" 0 +3
|
936
|
+
SetShellVarContext all
|
937
|
+
;MessageBox MB_OK 'User "$0" is in the Admin group'
|
938
|
+
StrCpy $SV_ALLUSERS "AllUsers"
|
939
|
+
Goto done
|
940
|
+
StrCmp $1 "Power" 0 +3
|
941
|
+
SetShellVarContext all
|
942
|
+
;MessageBox MB_OK 'User "$0" is in the Power Users group'
|
943
|
+
StrCpy $SV_ALLUSERS "AllUsers"
|
944
|
+
Goto done
|
945
|
+
|
946
|
+
noLM:
|
947
|
+
StrCpy $SV_ALLUSERS "AllUsers"
|
948
|
+
;Get installation folder from registry if available
|
949
|
+
|
950
|
+
done:
|
951
|
+
StrCmp $SV_ALLUSERS "AllUsers" 0 +3
|
952
|
+
StrCmp "$IS_DEFAULT_INSTALLDIR" "1" 0 +2
|
953
|
+
;StrCpy $INSTDIR "$PROGRAMFILES\@CPACK_PACKAGE_INSTALL_DIRECTORY@"
|
954
|
+
StrCpy $INSTDIR "$PROGRAMFILES64\@CPACK_PACKAGE_INSTALL_DIRECTORY@"
|
955
|
+
|
956
|
+
StrCmp "@CPACK_NSIS_MODIFY_PATH@" "ON" 0 noOptionsPage
|
957
|
+
!insertmacro MUI_INSTALLOPTIONS_EXTRACT "NSIS.InstallOptions.ini"
|
958
|
+
|
959
|
+
noOptionsPage:
|
960
|
+
FunctionEnd
|