├── .gitignore
├── LICENSE
├── README.md
├── Red5LicenseInfo.txt
├── debian
├── make_deb.sh
├── pom.xml
└── src
│ └── deb
│ ├── control
│ └── control
│ └── init.d
│ └── red5
├── images
├── red5.ico
├── red5_250.jpg
├── red5_big.ico
├── red5_header.bmp
├── red5_left.bmp
├── red5_left.png
├── red5_splash.png
├── red5_top.bmp
├── red5_top.png
├── red5developers.psd
└── red5splash.bmp
├── license.txt
├── macosx
├── Readme.txt
├── build.properties
├── build.xml
├── plists
│ ├── docs
│ │ ├── Description.plist
│ │ └── Info.plist
│ ├── flash
│ │ ├── Description.plist
│ │ └── Info.plist
│ ├── main
│ │ ├── Description.plist
│ │ └── Info.plist
│ ├── release
│ │ ├── Description.plist
│ │ └── Info.plist
│ └── source
│ │ ├── Description.plist
│ │ └── Info.plist
├── resources
│ ├── Red5.app
│ │ └── Contents
│ │ │ ├── Info.plist
│ │ │ ├── MacOS
│ │ │ └── Red5
│ │ │ ├── PkgInfo
│ │ │ └── Resources
│ │ │ ├── .script
│ │ │ ├── AppSettings.plist
│ │ │ ├── appIcon.icns
│ │ │ ├── en.lproj
│ │ │ ├── InfoPlist.strings
│ │ │ ├── MainMenu.nib
│ │ │ │ ├── classes.nib
│ │ │ │ ├── info.nib
│ │ │ │ ├── keyedobjects.nib
│ │ │ │ └── red5_small.tiff
│ │ │ └── MainMenu~.nib
│ │ │ │ ├── classes.nib
│ │ │ │ ├── info.nib
│ │ │ │ └── keyedobjects.nib
│ │ │ └── script
│ ├── Welcome.txt
│ └── background.gif
└── tools
│ ├── dmg_red5.scpt
│ └── make-diskimage.sh
├── redhat
├── Makefile
├── howto.txt
├── make_rpmPackage.sh
├── old
│ └── 1.0.0
│ │ ├── Makefile
│ │ ├── red5.init
│ │ └── red5.spec
├── red5.init
└── red5.spec
└── windows
├── NSIS_Includes
├── AdvReplaceInFile.nsh
├── EnvVarUpdate.nsh
├── defines.nsh
├── readme.txt
├── windowsx86.nsi.in
└── zipdll.nsh
├── NSIS_Plugins
├── AccessControl.dll
├── Dialogs.chm
├── Dialogs.dll
└── ZipDLL.dll
├── howto.txt
├── make_setupRed5Exe.sh
└── red5.nsi
/.gitignore:
--------------------------------------------------------------------------------
1 | *.log
2 | *.exe
3 | windows/work
4 | debian/src/tarball
5 |
6 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Apache License
2 | Version 2.0, January 2004
3 | http://www.apache.org/licenses/
4 |
5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6 |
7 | 1. Definitions.
8 |
9 | "License" shall mean the terms and conditions for use, reproduction,
10 | and distribution as defined by Sections 1 through 9 of this document.
11 |
12 | "Licensor" shall mean the copyright owner or entity authorized by
13 | the copyright owner that is granting the License.
14 |
15 | "Legal Entity" shall mean the union of the acting entity and all
16 | other entities that control, are controlled by, or are under common
17 | control with that entity. For the purposes of this definition,
18 | "control" means (i) the power, direct or indirect, to cause the
19 | direction or management of such entity, whether by contract or
20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the
21 | outstanding shares, or (iii) beneficial ownership of such entity.
22 |
23 | "You" (or "Your") shall mean an individual or Legal Entity
24 | exercising permissions granted by this License.
25 |
26 | "Source" form shall mean the preferred form for making modifications,
27 | including but not limited to software source code, documentation
28 | source, and configuration files.
29 |
30 | "Object" form shall mean any form resulting from mechanical
31 | transformation or translation of a Source form, including but
32 | not limited to compiled object code, generated documentation,
33 | and conversions to other media types.
34 |
35 | "Work" shall mean the work of authorship, whether in Source or
36 | Object form, made available under the License, as indicated by a
37 | copyright notice that is included in or attached to the work
38 | (an example is provided in the Appendix below).
39 |
40 | "Derivative Works" shall mean any work, whether in Source or Object
41 | form, that is based on (or derived from) the Work and for which the
42 | editorial revisions, annotations, elaborations, or other modifications
43 | represent, as a whole, an original work of authorship. For the purposes
44 | of this License, Derivative Works shall not include works that remain
45 | separable from, or merely link (or bind by name) to the interfaces of,
46 | the Work and Derivative Works thereof.
47 |
48 | "Contribution" shall mean any work of authorship, including
49 | the original version of the Work and any modifications or additions
50 | to that Work or Derivative Works thereof, that is intentionally
51 | submitted to Licensor for inclusion in the Work by the copyright owner
52 | or by an individual or Legal Entity authorized to submit on behalf of
53 | the copyright owner. For the purposes of this definition, "submitted"
54 | means any form of electronic, verbal, or written communication sent
55 | to the Licensor or its representatives, including but not limited to
56 | communication on electronic mailing lists, source code control systems,
57 | and issue tracking systems that are managed by, or on behalf of, the
58 | Licensor for the purpose of discussing and improving the Work, but
59 | excluding communication that is conspicuously marked or otherwise
60 | designated in writing by the copyright owner as "Not a Contribution."
61 |
62 | "Contributor" shall mean Licensor and any individual or Legal Entity
63 | on behalf of whom a Contribution has been received by Licensor and
64 | subsequently incorporated within the Work.
65 |
66 | 2. Grant of Copyright License. Subject to the terms and conditions of
67 | this License, each Contributor hereby grants to You a perpetual,
68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69 | copyright license to reproduce, prepare Derivative Works of,
70 | publicly display, publicly perform, sublicense, and distribute the
71 | Work and such Derivative Works in Source or Object form.
72 |
73 | 3. Grant of Patent License. Subject to the terms and conditions of
74 | this License, each Contributor hereby grants to You a perpetual,
75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76 | (except as stated in this section) patent license to make, have made,
77 | use, offer to sell, sell, import, and otherwise transfer the Work,
78 | where such license applies only to those patent claims licensable
79 | by such Contributor that are necessarily infringed by their
80 | Contribution(s) alone or by combination of their Contribution(s)
81 | with the Work to which such Contribution(s) was submitted. If You
82 | institute patent litigation against any entity (including a
83 | cross-claim or counterclaim in a lawsuit) alleging that the Work
84 | or a Contribution incorporated within the Work constitutes direct
85 | or contributory patent infringement, then any patent licenses
86 | granted to You under this License for that Work shall terminate
87 | as of the date such litigation is filed.
88 |
89 | 4. Redistribution. You may reproduce and distribute copies of the
90 | Work or Derivative Works thereof in any medium, with or without
91 | modifications, and in Source or Object form, provided that You
92 | meet the following conditions:
93 |
94 | (a) You must give any other recipients of the Work or
95 | Derivative Works a copy of this License; and
96 |
97 | (b) You must cause any modified files to carry prominent notices
98 | stating that You changed the files; and
99 |
100 | (c) You must retain, in the Source form of any Derivative Works
101 | that You distribute, all copyright, patent, trademark, and
102 | attribution notices from the Source form of the Work,
103 | excluding those notices that do not pertain to any part of
104 | the Derivative Works; and
105 |
106 | (d) If the Work includes a "NOTICE" text file as part of its
107 | distribution, then any Derivative Works that You distribute must
108 | include a readable copy of the attribution notices contained
109 | within such NOTICE file, excluding those notices that do not
110 | pertain to any part of the Derivative Works, in at least one
111 | of the following places: within a NOTICE text file distributed
112 | as part of the Derivative Works; within the Source form or
113 | documentation, if provided along with the Derivative Works; or,
114 | within a display generated by the Derivative Works, if and
115 | wherever such third-party notices normally appear. The contents
116 | of the NOTICE file are for informational purposes only and
117 | do not modify the License. You may add Your own attribution
118 | notices within Derivative Works that You distribute, alongside
119 | or as an addendum to the NOTICE text from the Work, provided
120 | that such additional attribution notices cannot be construed
121 | as modifying the License.
122 |
123 | You may add Your own copyright statement to Your modifications and
124 | may provide additional or different license terms and conditions
125 | for use, reproduction, or distribution of Your modifications, or
126 | for any such Derivative Works as a whole, provided Your use,
127 | reproduction, and distribution of the Work otherwise complies with
128 | the conditions stated in this License.
129 |
130 | 5. Submission of Contributions. Unless You explicitly state otherwise,
131 | any Contribution intentionally submitted for inclusion in the Work
132 | by You to the Licensor shall be under the terms and conditions of
133 | this License, without any additional terms or conditions.
134 | Notwithstanding the above, nothing herein shall supersede or modify
135 | the terms of any separate license agreement you may have executed
136 | with Licensor regarding such Contributions.
137 |
138 | 6. Trademarks. This License does not grant permission to use the trade
139 | names, trademarks, service marks, or product names of the Licensor,
140 | except as required for reasonable and customary use in describing the
141 | origin of the Work and reproducing the content of the NOTICE file.
142 |
143 | 7. Disclaimer of Warranty. Unless required by applicable law or
144 | agreed to in writing, Licensor provides the Work (and each
145 | Contributor provides its Contributions) on an "AS IS" BASIS,
146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147 | implied, including, without limitation, any warranties or conditions
148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149 | PARTICULAR PURPOSE. You are solely responsible for determining the
150 | appropriateness of using or redistributing the Work and assume any
151 | risks associated with Your exercise of permissions under this License.
152 |
153 | 8. Limitation of Liability. In no event and under no legal theory,
154 | whether in tort (including negligence), contract, or otherwise,
155 | unless required by applicable law (such as deliberate and grossly
156 | negligent acts) or agreed to in writing, shall any Contributor be
157 | liable to You for damages, including any direct, indirect, special,
158 | incidental, or consequential damages of any character arising as a
159 | result of this License or out of the use or inability to use the
160 | Work (including but not limited to damages for loss of goodwill,
161 | work stoppage, computer failure or malfunction, or any and all
162 | other commercial damages or losses), even if such Contributor
163 | has been advised of the possibility of such damages.
164 |
165 | 9. Accepting Warranty or Additional Liability. While redistributing
166 | the Work or Derivative Works thereof, You may choose to offer,
167 | and charge a fee for, acceptance of support, warranty, indemnity,
168 | or other liability obligations and/or rights consistent with this
169 | License. However, in accepting such obligations, You may act only
170 | on Your own behalf and on Your sole responsibility, not on behalf
171 | of any other Contributor, and only if You agree to indemnify,
172 | defend, and hold each Contributor harmless for any liability
173 | incurred by, or claims asserted against, such Contributor by reason
174 | of your accepting any such warranty or additional liability.
175 |
176 | END OF TERMS AND CONDITIONS
177 |
178 | APPENDIX: How to apply the Apache License to your work.
179 |
180 | To apply the Apache License to your work, attach the following
181 | boilerplate notice, with the fields enclosed by brackets "{}"
182 | replaced with your own identifying information. (Don't include
183 | the brackets!) The text should be enclosed in the appropriate
184 | comment syntax for the file format. We also recommend that a
185 | file or class name and description of purpose be included on the
186 | same "printed page" as the copyright notice for easier
187 | identification within third-party archives.
188 |
189 | Copyright {yyyy} {name of copyright owner}
190 |
191 | Licensed under the Apache License, Version 2.0 (the "License");
192 | you may not use this file except in compliance with the License.
193 | You may obtain a copy of the License at
194 |
195 | http://www.apache.org/licenses/LICENSE-2.0
196 |
197 | Unless required by applicable law or agreed to in writing, software
198 | distributed under the License is distributed on an "AS IS" BASIS,
199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200 | See the License for the specific language governing permissions and
201 | limitations under the License.
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | Installer
2 | =========
3 |
4 | Installer and any other build related script or code
5 |
6 | Please feel free to hack-away and / or fix anything that is amiss.
7 |
8 | Builds
9 | ======
10 |
11 | [Windows](https://builds.apache.org/view/M-R/view/OpenMeetings/job/red5-installer/) - _Available courtesy of Apache_
12 |
13 |
--------------------------------------------------------------------------------
/Red5LicenseInfo.txt:
--------------------------------------------------------------------------------
1 | Apache License, Version 2.0
2 |
3 | Apache License
4 |
5 | Version 2.0, January 2004
6 |
7 | http://www.apache.org/licenses/
8 |
9 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
10 |
11 | 1. Definitions.
12 |
13 | "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
14 |
15 | "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
16 |
17 | "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
18 |
19 | "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
20 |
21 | "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
22 |
23 | "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
24 |
25 | "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
26 |
27 | "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
28 |
29 | "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
30 |
31 | "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
32 |
33 | 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
34 |
35 | 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
36 |
37 | 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
38 |
39 | You must give any other recipients of the Work or Derivative Works a copy of this License; and
40 |
41 | You must cause any modified files to carry prominent notices stating that You changed the files; and
42 |
43 | You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
44 |
45 | If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
46 |
47 | 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
48 |
49 | 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
50 |
51 | 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
52 |
53 | 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
54 |
55 | 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
56 |
57 | END OF TERMS AND CONDITIONS
--------------------------------------------------------------------------------
/debian/make_deb.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash --
2 |
3 | # default configuration
4 | DATE=$(date +"%Y-%m-%d %H:%M:%S")
5 | PROG_NAME=$(basename $0)
6 | LOG_FILE="$(pwd)/$(echo ${PROG_NAME} | sed "s/\.sh//").log"
7 |
8 | # archive repositories for installing files
9 | GITHUB_URL="https://github.com"
10 |
11 | SERVER_VERSION=
12 | SERVER_URL="$GITHUB_URL/Red5/red5-server"
13 |
14 | # requires
15 | NEEDED_COMMANDS=(
16 | "curl"
17 | )
18 |
19 | # for error check
20 | RET_OK=0
21 | RET_ERROR=1
22 |
23 |
24 | #######################################################################
25 | # Utilities
26 | #######################################################################
27 | log() {
28 | local date=$(date +"%Y-%m-%d %H:%M:%S")
29 | echo -e "$date - INFO : $*" | tee -a $LOG_FILE
30 | }
31 |
32 | error() { # color red
33 | local date=$(date +"%Y-%m-%d %H:%M:%S")
34 | echo -en "\e[31m"
35 | echo -e "$date - ERROR: $*" | tee -a $LOG_FILE
36 | echo -en "\e[m"
37 | }
38 |
39 | run_command() {
40 | local eval cmd="$*"
41 | log "$ $cmd"
42 | eval "$*" | tee -a $LOG_FILE
43 | }
44 |
45 | re_create_dir() {
46 | local dir="$1"
47 | run_command "rm -rf ./$dir"
48 | run_command "mkdir ./$dir"
49 | }
50 |
51 | download() {
52 | local url="$1"
53 | local archive_name="$2"
54 | run_command "curl -# -L $url -o $archive_name"
55 | }
56 |
57 | #######################################################################
58 | # Functions
59 | #######################################################################
60 | get_tarball() {
61 | LAST_FUNCNAME=$FUNCNAME
62 | local version="$1"
63 | if [ -f "red5-server-${version}-RELEASE-server.tar.gz" ];
64 | then
65 | log "Tarball exists"
66 | else
67 | # https://github.com/Red5/red5-server/releases/download/v1.0.5-RELEASE/red5-server-1.0.5-RELEASE-server.tar.gz
68 | local url="${SERVER_URL}/releases/download/v${version}-RELEASE/red5-server-${version}-RELEASE-server.tar.gz"
69 | log "** getting red5 tarball ..."
70 | download $url red5-server-${version}-RELEASE-server.tar.gz
71 | fi
72 | }
73 |
74 | make_deb() {
75 | LAST_FUNCNAME=$FUNCNAME
76 | local version="$1"
77 |
78 | log "** making deb ..."
79 | run_command "mvn clean package"
80 | return $RET_OK
81 | }
82 |
83 | check_needed_commands() {
84 | LAST_FUNCNAME=$FUNCNAME
85 | local i=
86 | local cmd=
87 | local retval=$RET_OK
88 |
89 | log "* check commands this script uses"
90 | for ((i=0; i<${#NEEDED_COMMANDS[@]}; i++))
91 | do
92 | cmd=${NEEDED_COMMANDS[$i]}
93 | which $cmd > /dev/null 2>&1
94 | if [ $? -ne 0 ]; then
95 | error "** '$cmd' command is not found, need to install!"
96 | retval=$RET_ERROR
97 | else
98 | run_command "$cmd --version"
99 | fi
100 | done
101 | return $retval
102 | }
103 |
104 | check_argument() {
105 | LAST_FUNCNAME=$FUNCNAME
106 |
107 | # not implemented now ...
108 | [ $# -eq 0 ] && return $RET_ERROR
109 | return $RET_OK
110 | }
111 |
112 | check_error() {
113 | local retval=$1
114 | [ $retval != $RET_OK ] && echo "Error in '$LAST_FUNCNAME' function"
115 | # not implemented now ...
116 | return $retval
117 | }
118 |
119 | usage() {
120 | echo "Usage: $0 [OPTION] red5_version"
121 | echo
122 | echo "red5_version is like this"
123 | echo " - 1.0.5"
124 | echo " - 1.0.4"
125 | echo
126 | echo "Options:"
127 | echo " -c, --cleanbuild: remove working directory before build"
128 | echo " -h, --help"
129 | exit 0
130 | }
131 |
132 | main() {
133 | LAST_FUNCNAME=$FUNCNAME
134 | local version="$1"
135 | [ -z "$version" ] && usage && return $RET_OK
136 |
137 | log "* Start $PROG_NAME on $DATE"
138 |
139 | mkdir src/tarball
140 | cd src/tarball
141 | log "** change dir to : $(pwd)"
142 |
143 | # get tarball
144 | get_tarball $version || return $?
145 |
146 | cd ../..
147 | log "** change dir to : $(pwd)"
148 |
149 | make_deb $version || return $?
150 |
151 | log "* End $PROG_NAME on $DATE"
152 | return $RET_OK
153 | }
154 |
155 |
156 | #######################################################################
157 | # Run Main
158 | #######################################################################
159 | for OPT in "$@"
160 | do
161 | case "$OPT" in
162 | '-c'|'--cleanbuild')
163 | OPT_CLEAN_BUILD="true"
164 | shift
165 | ;;
166 | '-h'|'--help'|-*)
167 | usage
168 | ;;
169 | esac
170 | done
171 |
172 | rm -f $LOG_FILE
173 | check_needed_commands || exit $?
174 | check_argument "$@" || usage $?
175 | main "$@" || check_error $?
176 |
--------------------------------------------------------------------------------
/debian/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 4.0.0
4 | org.red5
5 | red5-server
6 | 1.0.5-RELEASE
7 | Red5 :: Server
8 | The Red5 server
9 | https://github.com/Red5/red5-server
10 | 2005
11 | deb
12 |
13 | Red5
14 | https://github.com/Red5
15 |
16 |
17 |
18 | Apache 2
19 | http://www.apache.org/licenses/LICENSE-2.0.txt
20 | repo
21 | A business-friendly OSS license
22 |
23 |
24 |
25 | UTF-8
26 | UTF-8
27 |
28 |
29 |
30 |
31 |
32 |
33 | org.vafer
34 | jdeb
35 | 1.4
36 |
37 |
38 |
39 |
40 | org.vafer
41 | jdeb
42 | 1.4
43 |
44 |
45 | package
46 |
47 | jdeb
48 |
49 |
50 | ${basedir}/target/red5-server_1.0.5_all.deb
51 | ${basedir}/src/deb/control/
52 | /opt/red5
53 |
54 | true
55 | dpkg-sig
56 |
57 | true
58 |
59 | all
60 |
61 |
62 | ${project.basedir}/src/tarball/red5-server-1.0.5-RELEASE-server.tar.gz
63 | archive
64 |
65 | perm
66 | 1
67 | /opt/red5
68 | 600
69 |
70 |
71 |
72 | ${basedir}/src/deb/init.d
73 | directory
74 |
75 | perm
76 | /etc/init.d
77 | loader
78 | loader
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 | snapshots
91 | http://localhost:8081/nexus/content/repositories/snapshots
92 |
93 |
94 |
95 |
--------------------------------------------------------------------------------
/debian/src/deb/control/control:
--------------------------------------------------------------------------------
1 | Package: [[name]]
2 | Version: [[version]]
3 | Section: misc
4 | Priority: optional
5 | Architecture: all
6 | Depends: jdk (>= 1.7)
7 | Maintainer: "Paul Gregoire"
8 | Description: [[description]]
9 |
--------------------------------------------------------------------------------
/debian/src/deb/init.d/red5:
--------------------------------------------------------------------------------
1 | #! /bin/sh
2 | #
3 | # red5 red5 initscript
4 | #
5 | # Author: Simon Eisenmann
6 | #
7 |
8 | set -e
9 |
10 | PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
11 | DESC="Red5 server"
12 | NAME=red5
13 | RED5_HOME=/opt/red5
14 | DAEMON=$RED5_HOME/$NAME.sh
15 | SHUTDOWN=$RED5_HOME/$NAME-shutdown.sh
16 | PIDFILE=/var/run/$NAME.pid
17 | SCRIPTNAME=/etc/init.d/$NAME
18 |
19 | # Gracefully exit if the package has been removed.
20 | test -x $DAEMON || exit 0
21 |
22 | # Read config file if it is present.
23 | if [ -r /etc/default/$NAME ]
24 | then
25 | . /etc/default/$NAME
26 | fi
27 |
28 | #
29 | # Function that starts the daemon/service.
30 | #
31 | d_start() {
32 | start-stop-daemon --start --pidfile $PIDFILE \
33 | --chdir $RED5_HOME --background --make-pidfile \
34 | --exec $DAEMON
35 | }
36 |
37 | #
38 | # Function that stops the daemon/service.
39 | #
40 | d_stop() {
41 | start-stop-daemon --stop --quiet --pidfile $PIDFILE \
42 | --chdir $RED5_HOME --exec $SHUTDOWN
43 | rm -f $PIDFILE
44 | }
45 |
46 | case "$1" in
47 | start)
48 | echo -n "Starting $DESC: $NAME"
49 | d_start
50 | echo "."
51 | ;;
52 | stop)
53 | echo -n "Stopping $DESC: $NAME"
54 | d_stop
55 | echo "."
56 | ;;
57 | restart|force-reload)
58 | echo -n "Restarting $DESC: $NAME"
59 | d_stop
60 | sleep 1
61 | d_start
62 | echo "."
63 | ;;
64 | *)
65 | echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
66 | exit 1
67 | ;;
68 | esac
69 |
70 | exit 0
71 |
--------------------------------------------------------------------------------
/images/red5.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Red5/installer/5004abbd3bc056de50186401efffc166ef7b0655/images/red5.ico
--------------------------------------------------------------------------------
/images/red5_250.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Red5/installer/5004abbd3bc056de50186401efffc166ef7b0655/images/red5_250.jpg
--------------------------------------------------------------------------------
/images/red5_big.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Red5/installer/5004abbd3bc056de50186401efffc166ef7b0655/images/red5_big.ico
--------------------------------------------------------------------------------
/images/red5_header.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Red5/installer/5004abbd3bc056de50186401efffc166ef7b0655/images/red5_header.bmp
--------------------------------------------------------------------------------
/images/red5_left.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Red5/installer/5004abbd3bc056de50186401efffc166ef7b0655/images/red5_left.bmp
--------------------------------------------------------------------------------
/images/red5_left.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Red5/installer/5004abbd3bc056de50186401efffc166ef7b0655/images/red5_left.png
--------------------------------------------------------------------------------
/images/red5_splash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Red5/installer/5004abbd3bc056de50186401efffc166ef7b0655/images/red5_splash.png
--------------------------------------------------------------------------------
/images/red5_top.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Red5/installer/5004abbd3bc056de50186401efffc166ef7b0655/images/red5_top.bmp
--------------------------------------------------------------------------------
/images/red5_top.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Red5/installer/5004abbd3bc056de50186401efffc166ef7b0655/images/red5_top.png
--------------------------------------------------------------------------------
/images/red5developers.psd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Red5/installer/5004abbd3bc056de50186401efffc166ef7b0655/images/red5developers.psd
--------------------------------------------------------------------------------
/images/red5splash.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Red5/installer/5004abbd3bc056de50186401efffc166ef7b0655/images/red5splash.bmp
--------------------------------------------------------------------------------
/license.txt:
--------------------------------------------------------------------------------
1 | RED5 Open Source Flash Server - http://code.google.com/p/red5/
2 |
3 | Copyright 2006-2014 by respective authors (see below). All rights reserved.
4 |
5 | Licensed under the Apache License, Version 2.0 (the "License");
6 | you may not use this file except in compliance with the License.
7 | You may obtain a copy of the License at
8 |
9 | http://www.apache.org/licenses/LICENSE-2.0
10 |
11 | Unless required by applicable law or agreed to in writing, software
12 | distributed under the License is distributed on an "AS IS" BASIS,
13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | See the License for the specific language governing permissions and
15 | limitations under the License.
16 |
17 | The Red5 Project
18 | Luke Hubbard (luke@codegent.com)
19 | Dominick Accattato (daccattato@gmail.com)
20 | Chris Allen (mrchrisallen@gmail.com)
21 | Joachim Bauch (jojo@struktur.de)
22 | Mick Herres (mickherres@hotmail.com)
23 | John Grden (johng@acmewebworks.com)
24 | Grant Davies (grant@bluetube.com)
25 | Steven Elliott (steven.s.elliott@gmail.com)
26 | Jokul Tian (tianxuefeng@gmail.com)
27 | Steven Gong (steven.gong@gmail.com)
28 | Paul Gregoire (mondain@gmail.com)
29 | Michael Klishin (michael.s.klishin@gmail.com)
30 | Thijs Triemstra (info@collab.nl)
31 | Dan Rossi (electroteque@gmail.com)
32 | Anton Lebedevich (mabrek@gmail.com)
33 | Art Clarke (aclarke@xuggle.com)
34 | Tiago Daniel Jacobs (tiago@imdt.com.br)
35 |
--------------------------------------------------------------------------------
/macosx/Readme.txt:
--------------------------------------------------------------------------------
1 | = How to release =
2 | 1. Get the latest tarball or tag from svn of the Red5 server and unpack it.
3 | 2. Update the version number and source directory in the build.properties file
4 | and point it to the root of the unpacked Red5 installation directory.
5 | 3. Start building with the 'ant' command.
6 | 4. The output file (setup-red5-VERSION.dmg) will be created in the DIST_DIR directory.
7 |
8 | Author: Thijs Triemstra (info@collab.nl), 07/2007
9 | Based on script from http://brok3n.org/archivesextreme/2006/09/dmg_creation_ti.html
10 |
--------------------------------------------------------------------------------
/macosx/build.properties:
--------------------------------------------------------------------------------
1 | # Version number
2 | VERSION=1.0
3 |
4 | # Red5 root folder
5 | SRC_DIR=../../
6 |
7 | # Copyright info
8 | COPYRIGHT=2006-2012 The Red5 Project
9 |
--------------------------------------------------------------------------------
/macosx/build.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Red5 for Mac OSX
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
39 |
40 | Completed building ${FANCY_NAME} for ${os.name}
41 |
42 |
43 |
46 |
47 |
51 |
55 |
56 |
57 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
86 |
87 | Copying plist files...
88 |
89 |
90 |
91 | Copying files for '${DOCS_PACKAGE_NAME}' package...
92 |
93 |
94 |
95 | Copying files for '${FLASH_PACKAGE_NAME}' package...
96 |
97 |
98 |
99 |
100 | Copying files for '${MAIN_PACKAGE_NAME}' package...
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 | Copying files for '${SOURCE_PACKAGE_NAME}' package...
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 |
144 |
145 |
146 |
147 |
148 | Copying files for '${META_PACKAGE_NAME}' package...
149 |
150 |
151 |
152 |
153 |
154 |
155 |
156 |
157 |
158 |
159 |
160 |
161 |
162 |
163 |
164 |
165 |
166 |
167 |
168 |
169 |
170 |
171 |
172 |
173 | Creating '${RELEASE_NAME}' metapackage...
174 |
175 |
176 |
177 |
178 |
179 |
180 |
181 |
182 |
183 |
184 | Removing old build files...
185 |
186 |
187 |
188 |
189 |
190 |
191 |
192 |
193 |
194 |
195 |
196 |
197 |
200 |
201 | Creating disk image...
202 |
203 |
204 |
205 |
206 |
207 |
208 |
209 |
210 |
211 |
214 |
215 |
216 |
217 |
219 |
220 |
221 |
222 |
223 |
224 |
225 |
228 |
229 |
230 |
231 |
232 | Creating '@{packageName}' package...
233 |
234 |
235 |
236 |
237 |
238 |
239 |
240 |
241 |
242 |
243 |
244 |
--------------------------------------------------------------------------------
/macosx/plists/docs/Description.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IFPkgDescriptionDescription
6 | Red5 Documentation
7 | IFPkgDescriptionTitle
8 | Documentation
9 |
10 |
11 |
--------------------------------------------------------------------------------
/macosx/plists/docs/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleGetInfoString
6 | Red5 @VERSION@, Copyright © @COPYRIGHT@
7 | CFBundleIdentifier
8 | docs
9 | CFBundleShortVersionString
10 | @VERSION@
11 | IFMajorVersion
12 | 0
13 | IFMinorVersion
14 | 6
15 | IFPkgFlagAllowBackRev
16 |
17 | IFPkgFlagAuthorizationAction
18 |
19 | IFPkgFlagBackgroundAlignment
20 | topleft
21 | IFPkgFlagBackgroundScaling
22 | none
23 | IFPkgFlagDefaultLocation
24 | /Applications/Red5
25 | IFPkgFlagFollowLinks
26 |
27 | IFPkgFlagInstallFat
28 |
29 | IFPkgFlagInstalledSize
30 | 19844
31 | IFPkgFlagIsRequired
32 |
33 | IFPkgFlagOverwritePermissions
34 |
35 | IFPkgFlagRelocatable
36 |
37 | IFPkgFlagRestartAction
38 | NoRestart
39 | IFPkgFlagRootVolumeOnly
40 |
41 | IFPkgFlagUpdateInstalledLanguages
42 |
43 | IFPkgFormatVersion
44 | 0.10000000149011612
45 |
46 |
47 |
--------------------------------------------------------------------------------
/macosx/plists/flash/Description.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IFPkgDescriptionDescription
6 | Flash sample source files
7 | IFPkgDescriptionTitle
8 | Flash Samples
9 |
10 |
11 |
--------------------------------------------------------------------------------
/macosx/plists/flash/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleGetInfoString
6 | Red5 @VERSION@, Copyright © @COPYRIGHT@
7 | CFBundleIdentifier
8 | flash
9 | CFBundleShortVersionString
10 | @VERSION@
11 | IFMajorVersion
12 | 0
13 | IFMinorVersion
14 | 6
15 | IFPkgFlagAllowBackRev
16 |
17 | IFPkgFlagAuthorizationAction
18 |
19 | IFPkgFlagBackgroundAlignment
20 | topleft
21 | IFPkgFlagBackgroundScaling
22 | none
23 | IFPkgFlagDefaultLocation
24 | /Applications/Red5
25 | IFPkgFlagFollowLinks
26 |
27 | IFPkgFlagInstallFat
28 |
29 | IFPkgFlagInstalledSize
30 | 27756
31 | IFPkgFlagIsRequired
32 |
33 | IFPkgFlagOverwritePermissions
34 |
35 | IFPkgFlagRelocatable
36 |
37 | IFPkgFlagRestartAction
38 | NoRestart
39 | IFPkgFlagRootVolumeOnly
40 |
41 | IFPkgFlagUpdateInstalledLanguages
42 |
43 | IFPkgFormatVersion
44 | 0.10000000149011612
45 |
46 |
47 |
--------------------------------------------------------------------------------
/macosx/plists/main/Description.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IFPkgDescriptionDescription
6 | Main files for the Red5 server
7 | IFPkgDescriptionTitle
8 | Server
9 |
10 |
11 |
--------------------------------------------------------------------------------
/macosx/plists/main/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleGetInfoString
6 | Red5 @VERSION@, Copyright © @COPYRIGHT@
7 | CFBundleIdentifier
8 | main
9 | CFBundleShortVersionString
10 | @VERSION@
11 | IFMajorVersion
12 | 0
13 | IFMinorVersion
14 | 6
15 | IFPkgFlagAllowBackRev
16 |
17 | IFPkgFlagAuthorizationAction
18 |
19 | IFPkgFlagBackgroundAlignment
20 | topleft
21 | IFPkgFlagBackgroundScaling
22 | none
23 | IFPkgFlagDefaultLocation
24 | /Applications/Red5
25 | IFPkgFlagFollowLinks
26 |
27 | IFPkgFlagInstallFat
28 |
29 | IFPkgFlagInstalledSize
30 | 41556
31 | IFPkgFlagIsRequired
32 |
33 | IFPkgFlagOverwritePermissions
34 |
35 | IFPkgFlagRelocatable
36 |
37 | IFPkgFlagRestartAction
38 | NoRestart
39 | IFPkgFlagRootVolumeOnly
40 |
41 | IFPkgFlagUpdateInstalledLanguages
42 |
43 | IFPkgFormatVersion
44 | 0.10000000149011612
45 |
46 |
47 |
--------------------------------------------------------------------------------
/macosx/plists/release/Description.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IFPkgDescriptionDescription
6 | RED5 Open Source Flash Server - http://red5.googlecode.com/
7 | IFPkgDescriptionTitle
8 | Red5
9 |
10 |
11 |
--------------------------------------------------------------------------------
/macosx/plists/release/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IFPkgFlagBackgroundAlignment
6 | left
7 | IFPkgFlagBackgroundScaling
8 | none
9 | IFPkgFlagComponentDirectory
10 | ./Contents/Packages
11 | IFPkgFlagPackageList
12 |
13 |
14 | IFPkgFlagPackageLocation
15 | main.pkg
16 | IFPkgFlagPackageSelection
17 | required
18 |
19 |
20 | IFPkgFlagPackageLocation
21 | source.pkg
22 | IFPkgFlagPackageSelection
23 | selected
24 |
25 |
26 | IFPkgFlagPackageLocation
27 | flash.pkg
28 | IFPkgFlagPackageSelection
29 | selected
30 |
31 |
32 | IFPkgFlagPackageLocation
33 | docs.pkg
34 | IFPkgFlagPackageSelection
35 | selected
36 |
37 |
38 | IFPkgFormatVersion
39 | 0.10000000149011612
40 |
41 |
42 |
--------------------------------------------------------------------------------
/macosx/plists/source/Description.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IFPkgDescriptionDescription
6 | Java source files
7 | IFPkgDescriptionTitle
8 | Source
9 |
10 |
11 |
--------------------------------------------------------------------------------
/macosx/plists/source/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleGetInfoString
6 | Red5 @VERSION@, Copyright © @COPYRIGHT@
7 | CFBundleIdentifier
8 | source
9 | CFBundleShortVersionString
10 | @VERSION@
11 | IFMajorVersion
12 | 0
13 | IFMinorVersion
14 | 6
15 | IFPkgFlagAllowBackRev
16 |
17 | IFPkgFlagAuthorizationAction
18 |
19 | IFPkgFlagBackgroundAlignment
20 | topleft
21 | IFPkgFlagBackgroundScaling
22 | none
23 | IFPkgFlagDefaultLocation
24 | /Applications/Red5
25 | IFPkgFlagFollowLinks
26 |
27 | IFPkgFlagInstallFat
28 |
29 | IFPkgFlagInstalledSize
30 | 2960
31 | IFPkgFlagIsRequired
32 |
33 | IFPkgFlagOverwritePermissions
34 |
35 | IFPkgFlagRelocatable
36 |
37 | IFPkgFlagRestartAction
38 | NoRestart
39 | IFPkgFlagRootVolumeOnly
40 |
41 | IFPkgFlagUpdateInstalledLanguages
42 |
43 | IFPkgFormatVersion
44 | 0.10000000149011612
45 |
46 |
47 |
--------------------------------------------------------------------------------
/macosx/resources/Red5.app/Contents/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | 10.4.0
6 | LSMinimumSystemVersion
7 | CFBundleDevelopmentRegion
8 | English
9 | CFBundleDisplayName
10 | Red5 @VERSION@
11 | CFBundleExecutable
12 | Red5
13 | CFBundleGetInfoString
14 | Red5 @VERSION@ Copyright @COPYRIGHT@
15 | CFBundleIconFile
16 | appIcon.icns
17 | CFBundleIdentifier
18 | org.red5.server.Red5
19 | CFBundleInfoDictionaryVersion
20 | 6.0
21 | CFBundleName
22 | Red5
23 | CFBundlePackageType
24 | APPL
25 | CFBundleShortVersionString
26 | @VERSION@
27 | CFBundleSignature
28 | ????
29 | CFBundleVersion
30 | @VERSION@
31 | LSEnvironment
32 |
33 | APP_BUNDLER
34 | Platypus-3.2
35 |
36 | LSHasLocalizedDisplayName
37 |
38 | LSUIElement
39 |
40 | NSAppleScriptEnabled
41 |
42 | NSHumanReadableCopyright
43 | Red5 @VERSION@ Copyright @COPYRIGHT@
44 | NSMainNibFile
45 | MainMenu
46 | NSPrincipalClass
47 | NSApplication
48 |
49 |
50 |
--------------------------------------------------------------------------------
/macosx/resources/Red5.app/Contents/MacOS/Red5:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Red5/installer/5004abbd3bc056de50186401efffc166ef7b0655/macosx/resources/Red5.app/Contents/MacOS/Red5
--------------------------------------------------------------------------------
/macosx/resources/Red5.app/Contents/PkgInfo:
--------------------------------------------------------------------------------
1 | APPL????
--------------------------------------------------------------------------------
/macosx/resources/Red5.app/Contents/Resources/.script:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Red5/installer/5004abbd3bc056de50186401efffc166ef7b0655/macosx/resources/Red5.app/Contents/Resources/.script
--------------------------------------------------------------------------------
/macosx/resources/Red5.app/Contents/Resources/AppSettings.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Creator
6 | Platypus-3.4
7 | EncryptAndChecksum
8 |
9 | IsDroppable
10 |
11 | OutputType
12 | TextWindow
13 | RemainRunningAfterCompletion
14 |
15 | RequiresAdminPrivileges
16 |
17 | ScriptInterpreter
18 | /bin/bash
19 |
20 |
21 |
--------------------------------------------------------------------------------
/macosx/resources/Red5.app/Contents/Resources/appIcon.icns:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Red5/installer/5004abbd3bc056de50186401efffc166ef7b0655/macosx/resources/Red5.app/Contents/Resources/appIcon.icns
--------------------------------------------------------------------------------
/macosx/resources/Red5.app/Contents/Resources/en.lproj/InfoPlist.strings:
--------------------------------------------------------------------------------
1 | CFBundleName = "Red5";
2 | CFBundleShortVersionString = "@VERSION@";
3 | CFBundleGetInfoString = "Red5 version @VERSION@ Copyright @COPYRIGHT@";
4 | NSHumanReadableCopyright = "Copyright @COPYRIGHT@";
5 |
--------------------------------------------------------------------------------
/macosx/resources/Red5.app/Contents/Resources/en.lproj/MainMenu.nib/classes.nib:
--------------------------------------------------------------------------------
1 | {
2 | IBClasses = (
3 | {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; },
4 | {
5 | ACTIONS = {cancel = id; };
6 | CLASS = ScriptExecController;
7 | LANGUAGE = ObjC;
8 | OUTLETS = {
9 | aboutMenuItem = id;
10 | applicationMenu = id;
11 | cancelButton = id;
12 | hideMenuItem = id;
13 | messageTextField = id;
14 | progressBar = id;
15 | progressWindow = id;
16 | quitMenuItem = id;
17 | textOutputCancelButton = id;
18 | textOutputProgressIndicator = id;
19 | textOutputTextField = id;
20 | textOutputWindow = id;
21 | };
22 | SUPERCLASS = NSObject;
23 | }
24 | );
25 | IBVersion = 1;
26 | }
--------------------------------------------------------------------------------
/macosx/resources/Red5.app/Contents/Resources/en.lproj/MainMenu.nib/info.nib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IBDocumentLocation
6 | 991 760 356 240 0 0 2560 1578
7 | IBEditorPositions
8 |
9 | 29
10 | 549 1068 210 44 0 0 2560 1578
11 |
12 | IBFramework Version
13 | 446.1
14 | IBOpenObjects
15 |
16 | 216
17 | 29
18 |
19 | IBSystem Version
20 | 8L127
21 |
22 |
23 |
--------------------------------------------------------------------------------
/macosx/resources/Red5.app/Contents/Resources/en.lproj/MainMenu.nib/keyedobjects.nib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Red5/installer/5004abbd3bc056de50186401efffc166ef7b0655/macosx/resources/Red5.app/Contents/Resources/en.lproj/MainMenu.nib/keyedobjects.nib
--------------------------------------------------------------------------------
/macosx/resources/Red5.app/Contents/Resources/en.lproj/MainMenu.nib/red5_small.tiff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Red5/installer/5004abbd3bc056de50186401efffc166ef7b0655/macosx/resources/Red5.app/Contents/Resources/en.lproj/MainMenu.nib/red5_small.tiff
--------------------------------------------------------------------------------
/macosx/resources/Red5.app/Contents/Resources/en.lproj/MainMenu~.nib/classes.nib:
--------------------------------------------------------------------------------
1 | {
2 | IBClasses = (
3 | {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; },
4 | {
5 | ACTIONS = {cancel = id; };
6 | CLASS = ScriptExecController;
7 | LANGUAGE = ObjC;
8 | OUTLETS = {
9 | aboutMenuItem = id;
10 | applicationMenu = id;
11 | cancelButton = id;
12 | hideMenuItem = id;
13 | messageTextField = id;
14 | progressBar = id;
15 | progressWindow = id;
16 | quitMenuItem = id;
17 | textOutputCancelButton = id;
18 | textOutputProgressIndicator = id;
19 | textOutputTextField = id;
20 | textOutputWindow = id;
21 | };
22 | SUPERCLASS = NSObject;
23 | }
24 | );
25 | IBVersion = 1;
26 | }
--------------------------------------------------------------------------------
/macosx/resources/Red5.app/Contents/Resources/en.lproj/MainMenu~.nib/info.nib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IBDocumentLocation
6 | 991 760 356 240 0 0 2560 1578
7 | IBEditorPositions
8 |
9 | 29
10 | 549 1068 210 44 0 0 2560 1578
11 |
12 | IBFramework Version
13 | 446.1
14 | IBOpenObjects
15 |
16 | 216
17 | 29
18 |
19 | IBSystem Version
20 | 8L127
21 |
22 |
23 |
--------------------------------------------------------------------------------
/macosx/resources/Red5.app/Contents/Resources/en.lproj/MainMenu~.nib/keyedobjects.nib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Red5/installer/5004abbd3bc056de50186401efffc166ef7b0655/macosx/resources/Red5.app/Contents/Resources/en.lproj/MainMenu~.nib/keyedobjects.nib
--------------------------------------------------------------------------------
/macosx/resources/Red5.app/Contents/Resources/script:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | cd "$1/.."
4 | java -version
5 | echo ""
6 | echo "Starting Red5..."
7 | echo ""
8 |
9 | for JAVA in "$JAVA_HOME/bin/java" "/usr/bin/java" "/usr/local/bin/java"
10 | do
11 | if [ -x $JAVA ]
12 | then
13 | break
14 | fi
15 | done
16 |
17 | if [ ! -x $JAVA ]
18 | then
19 | echo "Unable to locate java. Please set JAVA_HOME environment variable."
20 | exit
21 | fi
22 |
23 | exec $JAVA -Djava.security.manager -Djava.security.policy=conf/red5.policy -cp red5.jar:conf:$CLASSPATH org.red5.server.Standalone
24 |
--------------------------------------------------------------------------------
/macosx/resources/Welcome.txt:
--------------------------------------------------------------------------------
1 |
2 | This will install Red5 @VERSION@ on your computer.
3 |
4 | It is recommended that you close all other applications before continuing.
5 |
6 | Click Continue to proceed.
7 |
--------------------------------------------------------------------------------
/macosx/resources/background.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Red5/installer/5004abbd3bc056de50186401efffc166ef7b0655/macosx/resources/background.gif
--------------------------------------------------------------------------------
/macosx/tools/dmg_red5.scpt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Red5/installer/5004abbd3bc056de50186401efffc166ef7b0655/macosx/tools/dmg_red5.scpt
--------------------------------------------------------------------------------
/macosx/tools/make-diskimage.sh:
--------------------------------------------------------------------------------
1 | # Create a read-only disk image of the contents of a folder
2 | #
3 | # Usage: make-diskimage
4 | #
5 | #
6 | #
7 | #
8 |
9 | set -e;
10 |
11 | DMG_DIRNAME=`dirname $1`
12 | DMG_DIR=`cd $DMG_DIRNAME > /dev/null; pwd`
13 | DMG_NAME=`basename $1`
14 | DMG_TEMP_NAME=${DMG_DIR}/rw.${DMG_NAME}
15 | SRC_FOLDER=`cd $2 > /dev/null; pwd`
16 | VOLUME_NAME=$3
17 |
18 | # optional arguments
19 | APPLESCRIPT=$4
20 | EULA_RSRC=$5
21 |
22 | # Create the image
23 | echo "== Creating read-only disk image =="
24 | rm -f $DMG_TEMP_NAME
25 | hdiutil create -srcfolder $SRC_FOLDER -volname $VOLUME_NAME -fs HFS+ -fsargs "-c c=64,a=16,e=16" -format UDRW $DMG_TEMP_NAME
26 |
27 | # mount it
28 | echo "== Mounting disk image =="
29 | MOUNT_DIR=/Volumes/$VOLUME_NAME
30 | DEV_NAME=`hdiutil attach -readwrite -noverify -noautoopen $DMG_TEMP_NAME | egrep '^/dev/' | sed 1q | awk '{print $1}'`
31 |
32 | # run applescript
33 | if [ ! -z "${APPLESCRIPT}" -a "${APPLESCRIPT}" != "-null-" ]; then
34 | osascript $APPLESCRIPT
35 | fi
36 |
37 | # make sure it's not world writeable
38 | echo "== Fixing permissions =="
39 | chmod -Rf go-w ${MOUNT_DIR} || true
40 |
41 | # make the top window open itself on mount:
42 | if [ -x /usr/local/bin/openUp ]; then
43 | /usr/local/bin/openUp ${MOUNT_DIR}
44 | fi
45 |
46 | # unmount
47 | echo "== Unmounting disk image =="
48 | hdiutil detach $DEV_NAME
49 |
50 | # compress image
51 | echo "== Compressing disk image =="
52 | hdiutil convert $DMG_TEMP_NAME -format UDZO -imagekey zlib-level=9 -o ${DMG_DIR}/${DMG_NAME}
53 | rm -f $DMG_TEMP_NAME
54 |
55 | # adding EULA resources
56 | if [ ! -z "${EULA_RSRC}" -a "${EULA_RSRC}" != "-null-" ]; then
57 | echo "== Adding EULA resources =="
58 | hdiutil unflatten ${DMG_DIR}/${DMG_NAME}
59 | /Developer/Tools/ResMerger -a ${EULA_RSRC} -o ${DMG_DIR}/${DMG_NAME}
60 | hdiutil flatten ${DMG_DIR}/${DMG_NAME}
61 | fi
62 |
63 | # Internet-enabling a disk image
64 | echo "== Internet-enabling disk image =="
65 | hdiutil internet-enable -yes ${DMG_DIR}/${DMG_NAME}
66 |
67 | echo "== Disk image ready =="
68 | exit 0
69 |
--------------------------------------------------------------------------------
/redhat/Makefile:
--------------------------------------------------------------------------------
1 | VERSION=
2 | SOURCE0=red5-server-$(VERSION)-RELEASE-server.tar.gz
3 | SOURCE1=red5.init
4 | SPEC=red5.spec
5 | TOPDIR=$(shell pwd)
6 |
7 | prepare: $(SPEC)
8 | mkdir -p BUILD SOURCES SPECS SRPMS RPMS
9 | cp $(SOURCE0) SOURCES
10 | cp $(SOURCE1) SOURCES
11 | cp $(SPEC) SPECS
12 | sed -i 's;@VERSION@;$(VERSION);' SPECS/$(SPEC)
13 |
14 | build: prepare
15 | rpmbuild -ba --nodeps --define '_topdir $(TOPDIR)' SPECS/$(SPEC)
16 |
17 | clean:
18 | rm -rf SOURCES SPECS RPMS SRPMS BUILD BUILDROOT
19 |
--------------------------------------------------------------------------------
/redhat/howto.txt:
--------------------------------------------------------------------------------
1 | Use make_rpmPackage.sh to build automatically.
2 | Run this script on RHEL or CentOS.
3 | You can find RPM packages in RPMS/SRPMS directroy after the script would run.
4 |
5 | NOTE: this script is only available for Red5 release version.
6 |
7 | 1. Create RPM Packages
8 |
9 | Usage:
10 |
11 | $ ./make_rpmPackage.sh -h
12 | Usage: ./make_rpmPackage.sh [OPTION] red5_version
13 |
14 | red5_version is like this
15 | - 1.0.x
16 | - 1.0.3
17 | - 1.0.2
18 |
19 | Options:
20 | -h, --help
21 |
22 | * To build 1.0.3-release, like this
23 |
24 | $ ./make_rpmPackage.sh 1.0.3
25 | $ tree RPMS/ SRPMS/
26 | RPMS/
27 | └── x86_64
28 | ├── red5-1.0.3-1.el7.centos.x86_64.rpm
29 | └── red5-debuginfo-1.0.3-1.el7.centos.x86_64.rpm
30 | SRPMS/
31 | └── red5-1.0.3-1.el7.centos.src.rpm
32 |
33 | You can confirm make_rpmPackage.log if failed.
34 |
35 |
36 | 2. Install binary RPM and JDK
37 |
38 | $ sudo rpm -ivh RPMS/x86_64/red5-1.0.3-1.el7.centos.x86_64.rpm
39 | Preparing... ################################# [100%]
40 | Updating / installing...
41 | 1:red5-1.0.3-1.el7.centos ################################# [100%]
42 |
43 | $ sudo vi /var/lib/red5/conf/logback.xml
44 | --- logback.xml.orig 2014-12-15 17:36:20.000000000 +0900
45 | +++ logback.xml 2014-12-15 12:41:59.985638644 +0900
46 | @@ -9,7 +9,7 @@
47 |
48 | - log/red5.log
49 | + /var/lib/red5/log/red5.log
50 | false
51 |
52 |
53 | * download JDK and deploy it
54 | e.g) red5-1.0.3 requires JDK7 and deploy to /opt/jdk/jdk1.7.0_71
55 |
56 | $ sudo vi /etc/init.d/red5
57 | --- red5.orig 2014-12-15 17:36:21.000000000 +0900
58 | +++ red5 2014-12-15 17:49:22.459399002 +0900
59 | @@ -8,7 +8,7 @@
60 | -export JAVA_HOME=
61 | +export JAVA_HOME=/opt/jdk/jdk1.7.0_71
62 | if [ -z "$JAVA_HOME" ]; then
63 |
64 | $ sudo service red5 start
65 | Starting red5: [ OK ]
66 |
67 | $ sudo service red5 status
68 | Running red5 (pid 2492) ...
69 |
70 |
--------------------------------------------------------------------------------
/redhat/make_rpmPackage.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash --
2 |
3 | # default configuration
4 | DATE=$(date +"%Y-%m-%d %H:%M:%S")
5 | PROG_NAME=$(basename $0)
6 | LOG_FILE="$(pwd)/$(echo ${PROG_NAME} | sed "s/\.sh//").log"
7 |
8 | # archive repositories for installing files
9 | GITHUB_URL="https://github.com"
10 |
11 | SERVER_VERSION=
12 | SERVER_URL="$GITHUB_URL/Red5/red5-server"
13 | SERVER_DOWNLOAD_URL="$SERVER_URL/releases/download/v\${version}-RELEASE/"
14 | SERVER_ARCHIVE_NAME="red5-server-\${version}-RELEASE-server.tar.gz"
15 |
16 | # requires
17 | NEEDED_COMMANDS=(
18 | "curl"
19 | "make"
20 | "rpmbuild"
21 | )
22 |
23 | # for error check
24 | RET_OK=0
25 | RET_ERROR=1
26 |
27 |
28 | #######################################################################
29 | # Utilities
30 | #######################################################################
31 | log() {
32 | local date=$(date +"%Y-%m-%d %H:%M:%S")
33 | echo -e "$date - INFO : $*" | tee -a $LOG_FILE
34 | }
35 |
36 | error() { # color red
37 | local date=$(date +"%Y-%m-%d %H:%M:%S")
38 | echo -en "\e[31m"
39 | echo -e "$date - ERROR: $*" | tee -a $LOG_FILE
40 | echo -en "\e[m"
41 | }
42 |
43 | run_command() {
44 | local eval cmd="$*"
45 | log "$ $cmd"
46 | eval "$*" | tee -a $LOG_FILE
47 | }
48 |
49 | download() {
50 | local url="$1"
51 | local archive_name="$2"
52 | run_command "curl -# -L $url -o $archive_name"
53 | }
54 |
55 | #######################################################################
56 | # Functions
57 | #######################################################################
58 | get_red5_server_release() {
59 | LAST_FUNCNAME=$FUNCNAME
60 | local version="$1"
61 | local download_url=$(eval echo $SERVER_DOWNLOAD_URL)
62 | local archive_name=$(eval echo $SERVER_ARCHIVE_NAME)
63 | local url="${download_url}/${archive_name}"
64 |
65 | if [ -f $archive_name ]; then
66 | log "** $archive_name is found so never download"
67 | return $RET_OK
68 | fi
69 |
70 | log "** getting red5-server archive ..."
71 | download $url $archive_name
72 | [ ! -f $archive_name ] && return $RET_ERROR
73 |
74 | return $RET_OK
75 | }
76 |
77 | make_rpm_package() {
78 | LAST_FUNCNAME=$FUNCNAME
79 | local version="$1"
80 | log "** making rpm package ..."
81 | run_command "make clean"
82 | run_command "make VERSION=$version build"
83 | return $RET_OK
84 | }
85 |
86 | check_needed_commands() {
87 | LAST_FUNCNAME=$FUNCNAME
88 | local i=
89 | local cmd=
90 | local retval=$RET_OK
91 |
92 | log "* check commands this script uses"
93 | for ((i=0; i<${#NEEDED_COMMANDS[@]}; i++))
94 | do
95 | cmd=${NEEDED_COMMANDS[$i]}
96 | which $cmd > /dev/null 2>&1
97 | if [ $? -ne 0 ]; then
98 | error "** '$cmd' command is not found, need to install!"
99 | retval=$RET_ERROR
100 | else
101 | run_command "$cmd --version"
102 | fi
103 | done
104 | return $retval
105 | }
106 |
107 | check_argument() {
108 | LAST_FUNCNAME=$FUNCNAME
109 |
110 | # not implemented now ...
111 | [ $# -eq 0 ] && return $RET_ERROR
112 | return $RET_OK
113 | }
114 |
115 | check_error() {
116 | local retval=$1
117 | [ $retval != $RET_OK ] && echo "Error in '$LAST_FUNCNAME' function"
118 | # not implemented now ...
119 | return $retval
120 | }
121 |
122 | usage() {
123 | echo "Usage: $0 [OPTION] red5_version"
124 | echo
125 | echo "red5_version is like this"
126 | echo " - 1.0.x"
127 | echo " - 1.0.3"
128 | echo " - 1.0.2"
129 | echo
130 | echo "Options:"
131 | echo " -h, --help"
132 | exit 0
133 | }
134 |
135 | main() {
136 | LAST_FUNCNAME=$FUNCNAME
137 | local version="$1"
138 | [ -z "$version" ] && usage && return $RET_OK
139 |
140 | log "* Start $PROG_NAME on $DATE"
141 |
142 | # get red5-server release and build
143 | SERVER_VERSION=${version}
144 | log "** target version: $SERVER_VERSION"
145 | get_red5_server_release $SERVER_VERSION || return $?
146 | make_rpm_package $SERVER_VERSION || return $?
147 |
148 | log "* End $PROG_NAME on $DATE"
149 | return $RET_OK
150 | }
151 |
152 |
153 | #######################################################################
154 | # Run Main
155 | #######################################################################
156 | for OPT in "$@"
157 | do
158 | case "$OPT" in
159 | '-h'|'--help'|-*)
160 | usage
161 | ;;
162 | esac
163 | done
164 |
165 | rm -f $LOG_FILE
166 | check_needed_commands || exit $?
167 | check_argument "$@" || usage $?
168 | main "$@" || check_error $?
169 |
--------------------------------------------------------------------------------
/redhat/old/1.0.0/Makefile:
--------------------------------------------------------------------------------
1 | VERSION=1.0.0
2 | SOURCE0=red5-$(VERSION).tar.gz
3 | SOURCE1=flash-demos.tar.gz
4 | SOURCE2=red5.init
5 | SPEC=red5.spec
6 | TOPDIR=$(shell pwd)
7 |
8 | prepare: $(SPEC)
9 | mkdir -p BUILD SOURCES SPECS SRPMS RPMS
10 | cp $(SOURCE0) SOURCES
11 | cp $(SOURCE1) SOURCES
12 | cp $(SOURCE2) SOURCES
13 | cp $(SPEC) SPECS
14 | sed -i 's;@VERSION@;$(VERSION);' SPECS/$(SPEC)
15 |
16 | build: prepare
17 | rpmbuild -ba --nodeps --define '_topdir $(TOPDIR)' SPECS/$(SPEC)
18 |
19 | clean:
20 | rm -rf SOURCES SPECS RPMS SRPMS BUILD
21 |
--------------------------------------------------------------------------------
/redhat/old/1.0.0/red5.init:
--------------------------------------------------------------------------------
1 | #! /bin/sh
2 |
3 | # For RedHat and cousins:
4 | # chkconfig: 2345 85 85
5 | # description: Red5 flash streaming server
6 | # processname: red5
7 |
8 | PROG=red5
9 | if [ -z "$RED5_HOME" ]; then
10 | export RED5_HOME=/usr/lib/red5
11 | fi
12 | DAEMON=$RED5_HOME/$PROG.sh
13 | PIDFILE=/var/run/$PROG.pid
14 |
15 | # Source function library
16 | . /etc/rc.d/init.d/functions
17 |
18 | [ -r /etc/sysconfig/red5 ] && . /etc/sysconfig/red5
19 |
20 | RETVAL=0
21 |
22 | case "$1" in
23 | start)
24 | echo -n $"Starting $PROG: "
25 | $DAEMON >/dev/null 2>/dev/null &
26 | RETVAL=$?
27 | if [ $RETVAL -eq 0 ]; then
28 | echo $! > $PIDFILE
29 | touch /var/lock/subsys/$PROG
30 |
31 | fi
32 | [ $RETVAL -eq 0 ] && success $"$PROG startup" || failure $"$PROG startup"
33 | echo
34 | ;;
35 | stop)
36 | echo -n $"Shutting down $PROG: "
37 | killproc -p $PIDFILE
38 | RETVAL=$?
39 | echo
40 | [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/$PROG
41 | ;;
42 | restart)
43 | $0 stop
44 | $0 start
45 | ;;
46 | status)
47 | status $PROG -p $PIDFILE
48 | RETVAL=$?
49 | ;;
50 | *)
51 | echo $"Usage: $0 {start|stop|restart|status}"
52 | RETVAL=1
53 | esac
54 |
55 | exit $RETVAL
56 |
57 |
--------------------------------------------------------------------------------
/redhat/old/1.0.0/red5.spec:
--------------------------------------------------------------------------------
1 | Summary: Red5 Server
2 | Name: red5
3 | Version: @VERSION@
4 | Release: 1%{?dist}
5 | Source0: %{name}-%{version}.tar.gz
6 | Source1: flash-demos.tar.gz
7 | Source2: red5.init
8 | License: Apache Software License 2.0
9 | URL: http://www.red5.org/
10 | Group: Applications/Networking
11 | BuildRoot: %{_builddir}/%{name}-%{version}-%{release}-root
12 | BuildRequires: ant >= 1.8
13 | Requires: chkconfig
14 | Requires: java
15 |
16 | %define red5_lib /usr/lib/red5
17 | %define red5_log /var/log/red5
18 |
19 | %description
20 | The Red5 open source Flash server allows you to record and stream video to the Flash Player.
21 | %prep
22 | %setup -q
23 | %build
24 | ant dist-installer
25 | %install
26 | rm -rf $RPM_BUILD_ROOT
27 | make install PREFIX=$RPM_BUILD_ROOT/usr
28 | # extra files
29 | tar zxvf %{SOURCE1}
30 | cp -r demos $RPM_BUILD_ROOT%{red5_lib}/webapps/root/ # recursively install
31 | install -m 0755 -d $RPM_BUILD_ROOT%{red5_lib}/plugins
32 | install -m 0755 plugins/* $RPM_BUILD_ROOT%{red5_lib}/plugins
33 | install -d $RPM_BUILD_ROOT/etc/rc.d/init.d
34 | install -m 0755 %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/red5
35 | install -d $RPM_BUILD_ROOT%{red5_log}
36 | %clean
37 | rm -rf $RPM_BUILD_ROOT
38 | %files
39 | %defattr(-,root,root)
40 | %attr(0755,root,root) %dir %{red5_lib}
41 | %attr(0644,root,root) %{red5_lib}/*.jar
42 | %attr(0755,root,root) %{red5_lib}/*.sh
43 |
44 | %attr(0755,root,root) %dir %{red5_lib}/lib
45 | %attr(0644,root,root) %{red5_lib}/lib/*
46 |
47 | %attr(0755,root,root) %dir %{red5_lib}/webapps
48 | %attr(0644,root,root) %{red5_lib}/webapps/*
49 |
50 | %attr(0755,root,root) %dir %{red5_lib}/plugins
51 | %attr(0644,root,root) %{red5_lib}/plugins/*
52 |
53 | %attr(0755,root,root) %dir %{red5_lib}/conf
54 | %config %{red5_lib}/conf/*
55 |
56 | %attr(0755,root,root) /etc/rc.d/init.d/red5
57 | %doc license.txt doc/*
58 |
59 | %attr(0755,root,root) %dir %{red5_log}
60 |
61 | %post
62 | /sbin/chkconfig --add red5
63 |
64 | %postun
65 | /sbin/service red5 restart > /dev/null 2>&1 || :
66 |
67 | %preun
68 | if [ "$1" = 0 ]; then
69 | /sbin/service/red5 stop > /dev/null 2>&1 || :
70 | /sbin/chkconfig --del red5
71 | fi
72 |
73 | %changelog
74 | * Wed Dec 26 2012 Tetsuya Morimoto 1.0.0-1%{?dist}
75 | - first packaging for Red5 1.0 Final
76 |
--------------------------------------------------------------------------------
/redhat/red5.init:
--------------------------------------------------------------------------------
1 | #! /bin/sh
2 |
3 | # For RedHat and cousins:
4 | # chkconfig: 2345 85 85
5 | # description: Red5 flash streaming server
6 | # processname: red5
7 |
8 | # Source function library
9 | . /etc/rc.d/init.d/functions
10 |
11 | export JAVA_HOME=
12 | if [ -z "$JAVA_HOME" ]; then
13 | echo -n "need to set JAVA_HOME in red5.init" && failure
14 | echo
15 | exit 1
16 | fi
17 |
18 | PROG=red5
19 | if [ -z "$RED5_HOME" ]; then
20 | export RED5_HOME=/var/lib/red5
21 | fi
22 | DAEMON=$RED5_HOME/$PROG.sh
23 | PIDFILE=/var/run/$PROG.pid
24 |
25 | [ -r /etc/sysconfig/red5 ] && . /etc/sysconfig/red5
26 |
27 | RETVAL=0
28 |
29 | case "$1" in
30 | start)
31 | echo -n $"Starting $PROG: "
32 | $DAEMON >/dev/null 2>/dev/null &
33 | RETVAL=$?
34 | if [ $RETVAL -eq 0 ]; then
35 | echo $! > $PIDFILE
36 | touch /var/lock/subsys/$PROG
37 | fi
38 | [ $RETVAL -eq 0 ] && success $"$PROG startup" || failure $"$PROG startup"
39 | echo
40 | ;;
41 | stop)
42 | echo -n $"Shutting down $PROG: "
43 | killproc -p $PIDFILE
44 | RETVAL=$?
45 | echo
46 | [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/$PROG
47 | ;;
48 | restart)
49 | $0 stop
50 | $0 start
51 | ;;
52 | status)
53 | status $PROG -p $PIDFILE
54 | RETVAL=$?
55 | ;;
56 | *)
57 | echo $"Usage: $0 {start|stop|restart|status}"
58 | RETVAL=1
59 | esac
60 |
61 | exit $RETVAL
62 |
--------------------------------------------------------------------------------
/redhat/red5.spec:
--------------------------------------------------------------------------------
1 | Summary: Red5 Server
2 | Name: red5
3 | Version: @VERSION@
4 | Release: 1%{?dist}
5 | Source0: %{name}-server-%{version}-RELEASE-server.tar.gz
6 | Source2: red5.init
7 | License: Apache Software License 2.0
8 | URL: http://www.red5.org/
9 | Group: Applications/Networking
10 | BuildRoot: %{_builddir}/%{name}-%{version}-%{release}-root
11 | Requires: chkconfig
12 | Requires: java
13 |
14 | %define red5_home /var/lib/red5
15 |
16 | %description
17 | The Red5 open source Flash server allows you to record and stream video to the Flash Player.
18 |
19 | %prep
20 | %setup -q -n red5-server-%{version}-RELEASE
21 |
22 | %build
23 | rm -f *.bat
24 |
25 | %install
26 | rm -rf $RPM_BUILD_ROOT
27 | mkdir -p $RPM_BUILD_ROOT%{red5_home}
28 | cp -r ./* $RPM_BUILD_ROOT%{red5_home}
29 | install -m 0755 -d $RPM_BUILD_ROOT%{red5_home}/plugins
30 | install -m 0755 plugins/* $RPM_BUILD_ROOT%{red5_home}/plugins
31 | install -d $RPM_BUILD_ROOT/etc/rc.d/init.d
32 | install -m 0755 %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/red5
33 | install -m 0755 -d $RPM_BUILD_ROOT/%{red5_home}/log
34 |
35 | %clean
36 | rm -rf $RPM_BUILD_ROOT
37 |
38 | %files
39 | %defattr(-,root,root)
40 | %attr(0755,root,root) %dir %{red5_home}
41 | %attr(0644,root,root) %{red5_home}/*.jar
42 | %attr(0755,root,root) %{red5_home}/*.sh
43 |
44 | %attr(0755,root,root) %dir %{red5_home}/lib
45 | %attr(0644,root,root) %{red5_home}/lib/*
46 |
47 | %attr(0755,root,root) %dir %{red5_home}/webapps
48 | %attr(0644,root,root) %{red5_home}/webapps/*
49 |
50 | %attr(0755,root,root) %dir %{red5_home}/plugins
51 | %attr(0644,root,root) %{red5_home}/plugins/*
52 |
53 | %attr(0755,root,root) %dir %{red5_home}/conf
54 | %config %{red5_home}/conf/*
55 |
56 | %attr(0755,root,root) %dir %{red5_home}/log
57 |
58 | %attr(0755,root,root) /etc/rc.d/init.d/red5
59 | %doc license.txt
60 |
61 | %ghost %{red5_home}/license.txt
62 |
63 | %post
64 | /sbin/chkconfig --add red5
65 |
66 | %postun
67 | /sbin/service red5 restart > /dev/null 2>&1 || :
68 |
69 | %preun
70 | if [ "$1" = 0 ]; then
71 | /sbin/service/red5 stop > /dev/null 2>&1 || :
72 | /sbin/chkconfig --del red5
73 | fi
74 |
75 | %changelog
76 | * Wed Dec 10 2014 Tetsuya Morimoto 1.0.3-1%{?dist}
77 | - update packaging for Red5 server 1.0.3
78 |
79 | * Wed Dec 26 2012 Tetsuya Morimoto 1.0.0-1%{?dist}
80 | - first packaging for Red5 1.0 Final
81 |
--------------------------------------------------------------------------------
/windows/NSIS_Includes/AdvReplaceInFile.nsh:
--------------------------------------------------------------------------------
1 | /**
2 | * AdvReplaceInFile.nsh
3 | * This function allows you to replace pieces of text in a file. Instead of replacing all text
4 | * found in the file, you have the extra option of replacing text after the x times of it occurring,
5 | * and x times to replace the text after that occurrence.
6 | *
7 | * Usage:
8 | * Push hello #text to be replaced
9 | * Push blah #replace with
10 | * Push 3 #start replacing after 3rd occurrence
11 | * Push 4 #replace next 4 occurrences
12 | * Push C:\temp1.bat #file to replace in
13 | * Call AdvReplaceInFile
14 | *
15 | *
16 | * http://nsis.sourceforge.net/More_advanced_replace_text_in_file
17 | *
18 | */
19 |
20 | Function AdvReplaceInFile
21 | Exch $0 ;file to replace in
22 | Exch
23 | Exch $1 ;number to replace after
24 | Exch
25 | Exch 2
26 | Exch $2 ;replace and onwards
27 | Exch 2
28 | Exch 3
29 | Exch $3 ;replace with
30 | Exch 3
31 | Exch 4
32 | Exch $4 ;to replace
33 | Exch 4
34 | Push $5 ;minus count
35 | Push $6 ;universal
36 | Push $7 ;end string
37 | Push $8 ;left string
38 | Push $9 ;right string
39 | Push $R0 ;file1
40 | Push $R1 ;file2
41 | Push $R2 ;read
42 | Push $R3 ;universal
43 | Push $R4 ;count (onwards)
44 | Push $R5 ;count (after)
45 | Push $R6 ;temp file name
46 |
47 | GetTempFileName $R6
48 | FileOpen $R1 $0 r ;file to search in
49 | FileOpen $R0 $R6 w ;temp file
50 | StrLen $R3 $4
51 | StrCpy $R4 -1
52 | StrCpy $R5 -1
53 |
54 | loop_read:
55 | ClearErrors
56 | FileRead $R1 $R2 ;read line
57 | IfErrors exit
58 |
59 | StrCpy $5 0
60 | StrCpy $7 $R2
61 |
62 | loop_filter:
63 | IntOp $5 $5 - 1
64 | StrCpy $6 $7 $R3 $5 ;search
65 | StrCmp $6 "" file_write2
66 | StrCmp $6 $4 0 loop_filter
67 |
68 | StrCpy $8 $7 $5 ;left part
69 | IntOp $6 $5 + $R3
70 | IntCmp $6 0 is0 not0
71 | is0:
72 | StrCpy $9 ""
73 | Goto done
74 | not0:
75 | StrCpy $9 $7 "" $6 ;right part
76 | done:
77 | StrCpy $7 $8$3$9 ;re-join
78 |
79 | IntOp $R4 $R4 + 1
80 | StrCmp $2 all file_write1
81 | StrCmp $R4 $2 0 file_write2
82 | IntOp $R4 $R4 - 1
83 |
84 | IntOp $R5 $R5 + 1
85 | StrCmp $1 all file_write1
86 | StrCmp $R5 $1 0 file_write1
87 | IntOp $R5 $R5 - 1
88 | Goto file_write2
89 |
90 | file_write1:
91 | FileWrite $R0 $7 ;write modified line
92 | Goto loop_read
93 |
94 | file_write2:
95 | FileWrite $R0 $R2 ;write unmodified line
96 | Goto loop_read
97 |
98 | exit:
99 | FileClose $R0
100 | FileClose $R1
101 |
102 | SetDetailsPrint none
103 | Delete $0
104 | Rename $R6 $0
105 | Delete $R6
106 | SetDetailsPrint both
107 |
108 | Pop $R6
109 | Pop $R5
110 | Pop $R4
111 | Pop $R3
112 | Pop $R2
113 | Pop $R1
114 | Pop $R0
115 | Pop $9
116 | Pop $8
117 | Pop $7
118 | Pop $6
119 | Pop $5
120 | Pop $0
121 | Pop $1
122 | Pop $2
123 | Pop $3
124 | Pop $4
125 | FunctionEnd
--------------------------------------------------------------------------------
/windows/NSIS_Includes/EnvVarUpdate.nsh:
--------------------------------------------------------------------------------
1 | /**
2 | * EnvVarUpdate.nsh
3 | * : Environmental Variables: append, prepend, and remove entries
4 | *
5 | * WARNING: If you use StrFunc.nsh header then include it before this file
6 | * with all required definitions. This is to avoid conflicts
7 | *
8 | * Usage:
9 | * ${EnvVarUpdate} "ResultVar" "EnvVarName" "Action" "RegLoc" "PathString"
10 | *
11 | * Credits:
12 | * Version 1.0
13 | * * Cal Turney (turnec2)
14 | * * Amir Szekely (KiCHiK) and e-circ for developing the forerunners of this
15 | * function: AddToPath, un.RemoveFromPath, AddToEnvVar, un.RemoveFromEnvVar,
16 | * WriteEnvStr, and un.DeleteEnvStr
17 | * * Diego Pedroso (deguix) for StrTok
18 | * * Kevin English (kenglish_hi) for StrContains
19 | * * Hendri Adriaens (Smile2Me), Diego Pedroso (deguix), and Dan Fuhry
20 | * (dandaman32) for StrReplace
21 | *
22 | * Version 1.1 (compatibility with StrFunc.nsh)
23 | * * techtonik
24 | *
25 | * http://nsis.sourceforge.net/Environmental_Variables:_append%2C_prepend%2C_and_remove_entries
26 | *
27 | */
28 |
29 |
30 | !ifndef ENVVARUPDATE_FUNCTION
31 | !define ENVVARUPDATE_FUNCTION
32 | !verbose push
33 | !verbose 3
34 | !include "LogicLib.nsh"
35 | !include "WinMessages.NSH"
36 | !include "StrFunc.nsh"
37 |
38 | ; ---- Fix for conflict if StrFunc.nsh is already includes in main file -----------------------
39 | !macro _IncludeStrFunction StrFuncName
40 | !ifndef ${StrFuncName}_INCLUDED
41 | ${${StrFuncName}}
42 | !endif
43 | !ifndef Un${StrFuncName}_INCLUDED
44 | ${Un${StrFuncName}}
45 | !endif
46 | !define un.${StrFuncName} "${Un${StrFuncName}}"
47 | !macroend
48 |
49 | !insertmacro _IncludeStrFunction StrTok
50 | !insertmacro _IncludeStrFunction StrStr
51 | !insertmacro _IncludeStrFunction StrRep
52 |
53 | ; ---------------------------------- Macro Definitions ----------------------------------------
54 | !macro _EnvVarUpdateConstructor ResultVar EnvVarName Action Regloc PathString
55 | Push "${EnvVarName}"
56 | Push "${Action}"
57 | Push "${RegLoc}"
58 | Push "${PathString}"
59 | Call EnvVarUpdate
60 | Pop "${ResultVar}"
61 | !macroend
62 | !define EnvVarUpdate '!insertmacro "_EnvVarUpdateConstructor"'
63 |
64 | !macro _unEnvVarUpdateConstructor ResultVar EnvVarName Action Regloc PathString
65 | Push "${EnvVarName}"
66 | Push "${Action}"
67 | Push "${RegLoc}"
68 | Push "${PathString}"
69 | Call un.EnvVarUpdate
70 | Pop "${ResultVar}"
71 | !macroend
72 | !define un.EnvVarUpdate '!insertmacro "_unEnvVarUpdateConstructor"'
73 | ; ---------------------------------- Macro Definitions end-------------------------------------
74 |
75 | ;----------------------------------- EnvVarUpdate start----------------------------------------
76 | !define hklm_all_users 'HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"'
77 | !define hkcu_current_user 'HKCU "Environment"'
78 |
79 | !macro EnvVarUpdate UN
80 |
81 | Function ${UN}EnvVarUpdate
82 |
83 | Push $0
84 | Exch 4
85 | Exch $1
86 | Exch 3
87 | Exch $2
88 | Exch 2
89 | Exch $3
90 | Exch
91 | Exch $4
92 | Push $5
93 | Push $6
94 | Push $7
95 | Push $8
96 | Push $9
97 | Push $R0
98 |
99 | /* After this point:
100 | -------------------------
101 | $0 = ResultVar (returned)
102 | $1 = EnvVarName (input)
103 | $2 = Action (input)
104 | $3 = RegLoc (input)
105 | $4 = PathString (input)
106 | $5 = Orig EnvVar (read from registry)
107 | $6 = Len of $0 (temp)
108 | $7 = tempstr1 (temp)
109 | $8 = Entry counter (temp)
110 | $9 = tempstr2 (temp)
111 | $R0 = tempChar (temp) */
112 |
113 | ; Step 1: Read contents of EnvVarName from RegLoc
114 | ;
115 | ; Check for empty EnvVarName
116 | ${If} $1 == ""
117 | SetErrors
118 | DetailPrint "ERROR: EnvVarName is blank"
119 | Goto EnvVarUpdate_Restore_Vars
120 | ${EndIf}
121 |
122 | ; Check for valid Action
123 | ${If} $2 != "A"
124 | ${AndIf} $2 != "P"
125 | ${AndIf} $2 != "R"
126 | SetErrors
127 | DetailPrint "ERROR: Invalid Action - must be A, P, or R"
128 | Goto EnvVarUpdate_Restore_Vars
129 | ${EndIf}
130 |
131 | ${If} $3 == HKLM
132 | ReadRegStr $5 ${hklm_all_users} $1 ; Get EnvVarName from all users into $5
133 | ${ElseIf} $3 == HKCU
134 | ReadRegStr $5 ${hkcu_current_user} $1 ; Read EnvVarName from current user into $5
135 | ${Else}
136 | SetErrors
137 | DetailPrint 'ERROR: Action is [$3] but must be "HKLM" or HKCU"'
138 | Goto EnvVarUpdate_Restore_Vars
139 | ${EndIf}
140 |
141 | ; Check for empty PathString
142 | ${If} $4 == ""
143 | SetErrors
144 | DetailPrint "ERROR: PathString is blank"
145 | Goto EnvVarUpdate_Restore_Vars
146 | ${EndIf}
147 |
148 | ; Make sure we've got some work to do
149 | ${If} $5 == ""
150 | ${AndIf} $2 == "R"
151 | SetErrors
152 | DetailPrint "$1 is empty - Nothing to remove"
153 | Goto EnvVarUpdate_Restore_Vars
154 | ${EndIf}
155 |
156 | ; Step 2: Scrub EnvVar
157 | ;
158 | StrCpy $0 $5 ; Copy the contents to $0
159 | ; Remove spaces around semicolons (NOTE: spaces before the 1st entry or
160 | ; after the last one are not removed here but instead in Step 3)
161 | ${If} $0 != "" ; If EnvVar is not empty ...
162 | ${Do}
163 | ${${UN}StrStr} $7 $0 " ;"
164 | ${If} $7 == ""
165 | ${ExitDo}
166 | ${EndIf}
167 | ${${UN}StrRep} $0 $0 " ;" ";" ; Remove ';'
168 | ${Loop}
169 | ${Do}
170 | ${${UN}StrStr} $7 $0 "; "
171 | ${If} $7 == ""
172 | ${ExitDo}
173 | ${EndIf}
174 | ${${UN}StrRep} $0 $0 "; " ";" ; Remove ';'
175 | ${Loop}
176 | ${Do}
177 | ${${UN}StrStr} $7 $0 ";;"
178 | ${If} $7 == ""
179 | ${ExitDo}
180 | ${EndIf}
181 | ${${UN}StrRep} $0 $0 ";;" ";"
182 | ${Loop}
183 |
184 | ; Remove a leading or trailing semicolon from EnvVar
185 | StrCpy $7 $0 1 0
186 | ${If} $7 == ";"
187 | StrCpy $0 $0 "" 1 ; Change ';' to ''
188 | ${EndIf}
189 | StrLen $6 $0
190 | IntOp $6 $6 - 1
191 | StrCpy $7 $0 1 $6
192 | ${If} $7 == ";"
193 | StrCpy $0 $0 $6 ; Change ';' to ''
194 | ${EndIf}
195 | ; DetailPrint "Scrubbed $1: [$0]" ; Uncomment to debug
196 | ${EndIf}
197 |
198 | /* Step 3. Remove all instances of the target path/string (even if "A" or "P")
199 | $6 = bool flag (1 = found and removed PathString)
200 | $7 = a string (e.g. path) delimited by semicolon(s)
201 | $8 = entry counter starting at 0
202 | $9 = copy of $0
203 | $R0 = tempChar */
204 |
205 | ${If} $5 != "" ; If EnvVar is not empty ...
206 | StrCpy $9 $0
207 | StrCpy $0 ""
208 | StrCpy $8 0
209 | StrCpy $6 0
210 |
211 | ${Do}
212 | ${${UN}StrTok} $7 $9 ";" $8 "0" ; $7 = next entry, $8 = entry counter
213 |
214 | ${If} $7 == "" ; If we've run out of entries,
215 | ${ExitDo} ; were done
216 | ${EndIf} ;
217 |
218 | ; Remove leading and trailing spaces from this entry (critical step for Action=Remove)
219 | ${Do}
220 | StrCpy $R0 $7 1
221 | ${If} $R0 != " "
222 | ${ExitDo}
223 | ${EndIf}
224 | StrCpy $7 $7 "" 1 ; Remove leading space
225 | ${Loop}
226 | ${Do}
227 | StrCpy $R0 $7 1 -1
228 | ${If} $R0 != " "
229 | ${ExitDo}
230 | ${EndIf}
231 | StrCpy $7 $7 -1 ; Remove trailing space
232 | ${Loop}
233 | ${If} $7 == $4 ; If string matches, remove it by not appending it
234 | StrCpy $6 1 ; Set 'found' flag
235 | ${ElseIf} $7 != $4 ; If string does NOT match
236 | ${AndIf} $0 == "" ; and the 1st string being added to $0,
237 | StrCpy $0 $7 ; copy it to $0 without a prepended semicolon
238 | ${ElseIf} $7 != $4 ; If string does NOT match
239 | ${AndIf} $0 != "" ; and this is NOT the 1st string to be added to $0,
240 | StrCpy $0 $0;$7 ; append path to $0 with a prepended semicolon
241 | ${EndIf} ;
242 |
243 | IntOp $8 $8 + 1 ; Bump counter
244 | ${Loop} ; Check for duplicates until we run out of paths
245 | ${EndIf}
246 |
247 | ; Step 4: Perform the requested Action
248 | ;
249 | ${If} $2 != "R" ; If Append or Prepend
250 | ${If} $6 == 1 ; And if we found the target
251 | DetailPrint "Target is already present in $1. It will be removed and"
252 | ${EndIf}
253 | ${If} $0 == "" ; If EnvVar is (now) empty
254 | StrCpy $0 $4 ; just copy PathString to EnvVar
255 | ${If} $6 == 0 ; If found flag is either 0
256 | ${OrIf} $6 == "" ; or blank (if EnvVarName is empty)
257 | DetailPrint "$1 was empty and has been updated with the target"
258 | ${EndIf}
259 | ${ElseIf} $2 == "A" ; If Append (and EnvVar is not empty),
260 | StrCpy $0 $0;$4 ; append PathString
261 | ${If} $6 == 1
262 | DetailPrint "appended to $1"
263 | ${Else}
264 | DetailPrint "Target was appended to $1"
265 | ${EndIf}
266 | ${Else} ; If Prepend (and EnvVar is not empty),
267 | StrCpy $0 $4;$0 ; prepend PathString
268 | ${If} $6 == 1
269 | DetailPrint "prepended to $1"
270 | ${Else}
271 | DetailPrint "Target was prepended to $1"
272 | ${EndIf}
273 | ${EndIf}
274 | ${Else} ; If Action = Remove
275 | ${If} $6 == 1 ; and we found the target
276 | DetailPrint "Target was found and removed from $1"
277 | ${Else}
278 | DetailPrint "Target was NOT found in $1 (nothing to remove)"
279 | ${EndIf}
280 | ${If} $0 == ""
281 | DetailPrint "$1 is now empty"
282 | ${EndIf}
283 | ${EndIf}
284 |
285 | ; Step 5: Update the registry at RegLoc with the updated EnvVar and announce the change
286 | ;
287 | ClearErrors
288 | ${If} $3 == HKLM
289 | WriteRegExpandStr ${hklm_all_users} $1 $0 ; Write it in all users section
290 | ${ElseIf} $3 == HKCU
291 | WriteRegExpandStr ${hkcu_current_user} $1 $0 ; Write it to current user section
292 | ${EndIf}
293 |
294 | IfErrors 0 +4
295 | MessageBox MB_OK|MB_ICONEXCLAMATION "Could not write updated $1 to $3"
296 | DetailPrint "Could not write updated $1 to $3"
297 | Goto EnvVarUpdate_Restore_Vars
298 |
299 | ; "Export" our change
300 | SendMessage ${HWND_BROADCAST} ${WM_WININICHANGE} 0 "STR:Environment" /TIMEOUT=5000
301 |
302 | EnvVarUpdate_Restore_Vars:
303 | ;
304 | ; Restore the user's variables and return ResultVar
305 | Pop $R0
306 | Pop $9
307 | Pop $8
308 | Pop $7
309 | Pop $6
310 | Pop $5
311 | Pop $4
312 | Pop $3
313 | Pop $2
314 | Pop $1
315 | Push $0 ; Push my $0 (ResultVar)
316 | Exch
317 | Pop $0 ; Restore his $0
318 |
319 | FunctionEnd
320 |
321 | !macroend ; EnvVarUpdate UN
322 | !insertmacro EnvVarUpdate ""
323 | !insertmacro EnvVarUpdate "un."
324 | ;----------------------------------- EnvVarUpdate end----------------------------------------
325 |
326 | !verbose pop
327 | !endif
328 |
--------------------------------------------------------------------------------
/windows/NSIS_Includes/defines.nsh:
--------------------------------------------------------------------------------
1 | ;Defines to use with Dialogs.dll plugin and future ones.
2 | ;Developed by Joel Almeida García AKA Lobo Lunar.
3 |
4 | ;Email: lobolunarnet@yahoo.com.mx
5 |
6 | !echo "Reading header file from Lobo Lunar"
7 | !verbose 0
8 | !define VAR_0 0 ;$0
9 | !define VAR_1 1 ;$1
10 | !define VAR_2 2 ;$2
11 | !define VAR_3 3 ;$3
12 | !define VAR_4 4 ;$4
13 | !define VAR_5 5 ;$5
14 | !define VAR_6 6 ;$6
15 | !define VAR_7 7 ;$7
16 | !define VAR_8 8 ;$8
17 | !define VAR_9 9 ;$9
18 | !define VAR_R0 10 ;$R0
19 | !define VAR_R1 11 ;$R1
20 | !define VAR_R2 12 ;$R2
21 | !define VAR_R3 13 ;$R3
22 | !define VAR_R4 14 ;$R4
23 | !define VAR_R5 15 ;$R5
24 | !define VAR_R6 16 ;$R6
25 | !define VAR_R7 17 ;$R7
26 | !define VAR_R8 18 ;$R8
27 | !define VAR_R9 19 ;$R9
28 | !define VAR_CMDLINE 20 ;$CMDLINE
29 | !define VAR_INSTDIR 21 ;$INSTDIR
30 | !define VAR_OUTDIR 22 ;$OUTDIR
31 | !define VAR_EXEDIR 23 ;$EXEDIR
32 | !define VAR_LANGUAGE 24 ;$LANGUAGE
33 | !verbose 4
34 |
35 |
--------------------------------------------------------------------------------
/windows/NSIS_Includes/readme.txt:
--------------------------------------------------------------------------------
1 | Info:
2 | http://nsis.sourceforge.net/How_can_I_install_a_plugin
3 |
4 | Drop the nsh files here into your NSIS include folder.
5 |
6 |
--------------------------------------------------------------------------------
/windows/NSIS_Includes/windowsx86.nsi.in:
--------------------------------------------------------------------------------
1 | # Auto-generated by EclipseNSIS Script Wizard
2 | # Dec 26, 2008 3:15:56 PM
3 |
4 | Name Xuggle-Xuggler
5 |
6 | # General Symbol Definitions
7 | !define REGKEY "SOFTWARE\$(^Name)"
8 | !define VERSION @LIB_MAJOR_VERSION@.@LIB_MINOR_VERSION@.@LIB_REVISION@
9 | !define COMPANY Xuggle
10 | !define URL www.xuggle.com
11 |
12 | # MultiUser Symbol Definitions
13 | !define MULTIUSER_EXECUTIONLEVEL Highest
14 | !define MULTIUSER_MUI
15 | !define MULTIUSER_INSTALLMODE_DEFAULT_REGISTRY_KEY "${REGKEY}"
16 | !define MULTIUSER_INSTALLMODE_DEFAULT_REGISTRY_VALUENAME MultiUserInstallMode
17 | !define MULTIUSER_INSTALLMODE_COMMANDLINE
18 | !define MULTIUSER_INSTALLMODE_INSTDIR Xuggle
19 | !define MULTIUSER_INSTALLMODE_INSTDIR_REGISTRY_KEY "${REGKEY}"
20 | !define MULTIUSER_INSTALLMODE_INSTDIR_REGISTRY_VALUE "Path"
21 |
22 | # MUI Symbol Definitions
23 | !define MUI_ICON ..\mk\xuggle.ico
24 | !define MUI_FINISHPAGE_NOAUTOCLOSE
25 | !define MUI_CUSTOMFUNCTION_GUIINIT CustomGUIInit
26 | !define MUI_UNICON ..\mk\xuggle.ico
27 | !define MUI_UNFINISHPAGE_NOAUTOCLOSE
28 |
29 | # Included files
30 | !include MultiUser.nsh
31 | !include Sections.nsh
32 | !include MUI2.nsh
33 | !include ..\mk\EnvVarUpdate.nsh
34 |
35 | # Reserved Files
36 | ReserveFile "${NSISDIR}\Plugins\BGImage.dll"
37 | ReserveFile "${NSISDIR}\Plugins\AdvSplash.dll"
38 |
39 | # Installer pages
40 | !insertmacro MUI_PAGE_WELCOME
41 | !insertmacro MUI_PAGE_LICENSE ..\COPYING
42 | !insertmacro MULTIUSER_PAGE_INSTALLMODE
43 | !insertmacro MUI_PAGE_DIRECTORY
44 | !insertmacro MUI_PAGE_INSTFILES
45 | !insertmacro MUI_PAGE_FINISH
46 | !insertmacro MUI_UNPAGE_CONFIRM
47 | !insertmacro MUI_UNPAGE_INSTFILES
48 |
49 | # Installer languages
50 | !insertmacro MUI_LANGUAGE English
51 |
52 | # Installer attributes
53 | OutFile ../dist/setup-@LIB_MAJOR_VERSION@.@LIB_MINOR_VERSION@.@LIB_REVISION@.exe
54 | InstallDir Xuggle
55 | CRCCheck on
56 | XPStyle on
57 | ShowInstDetails show
58 | VIProductVersion @LIB_MAJOR_VERSION@.@LIB_MINOR_VERSION@.@LIB_REVISION@.0
59 | VIAddVersionKey ProductName Xuggle-Xuggler
60 | VIAddVersionKey ProductVersion "${VERSION}"
61 | VIAddVersionKey CompanyName "${COMPANY}"
62 | VIAddVersionKey CompanyWebsite "${URL}"
63 | VIAddVersionKey FileVersion "${VERSION}"
64 | VIAddVersionKey FileDescription ""
65 | VIAddVersionKey LegalCopyright "Copyright (c) 2009, Xuggle Inc."
66 | InstallDirRegKey HKLM "${REGKEY}" Path
67 | ShowUninstDetails show
68 |
69 | # Installer sections
70 | Section -Main SEC0000
71 | SetOutPath $INSTDIR
72 | SetOverwrite on
73 | File /r ${XUGGLE_HOME}\*
74 | WriteRegStr HKLM "${REGKEY}\Components" Main 1
75 | ${EnvVarUpdate} $0 "XUGGLE_HOME" "R" "HKLM" $INSTDIR
76 | ${EnvVarUpdate} $0 "XUGGLE_HOME" "A" "HKLM" $INSTDIR
77 | ${EnvVarUpdate} $0 "PATH" "R" "HKLM" "%XUGGLE_HOME%\bin"
78 | ${EnvVarUpdate} $0 "PATH" "P" "HKLM" "%XUGGLE_HOME%\bin"
79 | SectionEnd
80 |
81 | Section -post SEC0001
82 | WriteRegStr HKLM "${REGKEY}" Path $INSTDIR
83 | SetOutPath $INSTDIR
84 | WriteUninstaller $INSTDIR\uninstall.exe
85 | WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" DisplayName "$(^Name)"
86 | WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" DisplayVersion "${VERSION}"
87 | WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" Publisher "${COMPANY}"
88 | WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" URLInfoAbout "${URL}"
89 | WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" DisplayIcon $INSTDIR\uninstall.exe
90 | WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" UninstallString $INSTDIR\uninstall.exe
91 | WriteRegDWORD HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" NoModify 1
92 | WriteRegDWORD HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" NoRepair 1
93 | SectionEnd
94 |
95 | # Macro for selecting uninstaller sections
96 | !macro SELECT_UNSECTION SECTION_NAME UNSECTION_ID
97 | Push $R0
98 | ReadRegStr $R0 HKLM "${REGKEY}\Components" "${SECTION_NAME}"
99 | StrCmp $R0 1 0 next${UNSECTION_ID}
100 | !insertmacro SelectSection "${UNSECTION_ID}"
101 | GoTo done${UNSECTION_ID}
102 | next${UNSECTION_ID}:
103 | !insertmacro UnselectSection "${UNSECTION_ID}"
104 | done${UNSECTION_ID}:
105 | Pop $R0
106 | !macroend
107 |
108 | # Uninstaller sections
109 | Section /o -un.Main UNSEC0000
110 | ${un.EnvVarUpdate} $0 "PATH" "R" "HKLM" "%XUGGLE_HOME%\bin"
111 | RmDir /r /REBOOTOK $INSTDIR
112 | DeleteRegValue HKLM "${REGKEY}\Components" Main
113 | SectionEnd
114 |
115 | Section -un.post UNSEC0001
116 | DeleteRegKey HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)"
117 | Delete /REBOOTOK $INSTDIR\uninstall.exe
118 | DeleteRegValue HKLM "${REGKEY}" Path
119 | DeleteRegKey /IfEmpty HKLM "${REGKEY}\Components"
120 | DeleteRegKey /IfEmpty HKLM "${REGKEY}"
121 | RmDir /REBOOTOK $INSTDIR
122 | SectionEnd
123 |
124 | # Installer functions
125 | Function CustomGUIInit
126 | Push $R1
127 | Push $R2
128 | BgImage::SetReturn /NOUNLOAD on
129 | BgImage::SetBg /NOUNLOAD /GRADIENT 0 0 128 0 0 0
130 | Pop $R1
131 | Strcmp $R1 success 0 error
132 | File /oname=$PLUGINSDIR\bgimage.bmp ..\mk\xuggle-logo-background.bmp
133 | System::call "user32::GetSystemMetrics(i 0)i.R1"
134 | System::call "user32::GetSystemMetrics(i 1)i.R2"
135 | IntOp $R1 $R1 - 800
136 | IntOp $R1 $R1 / 2
137 | IntOp $R2 $R2 - 480
138 | IntOp $R2 $R2 / 2
139 | BGImage::AddImage /NOUNLOAD $PLUGINSDIR\bgimage.bmp $R1 $R2
140 | CreateFont $R1 "Times New Roman" 26 700 /ITALIC
141 | BGImage::AddText /NOUNLOAD "$(^SetupCaption)" $R1 255 255 255 16 8 500 100
142 | Pop $R1
143 | Strcmp $R1 success 0 error
144 | BGImage::Redraw /NOUNLOAD
145 | Goto done
146 | error:
147 | MessageBox MB_OK|MB_ICONSTOP $R1
148 | done:
149 | Pop $R2
150 | Pop $R1
151 | FunctionEnd
152 |
153 | Function .onGUIEnd
154 | BGImage::Destroy
155 | FunctionEnd
156 |
157 | Function .onInit
158 | InitPluginsDir
159 | Push $R1
160 | File /oname=$PLUGINSDIR\spltmp.bmp ..\mk\xuggle-logo-splash.bmp
161 | advsplash::show 1000 600 400 -1 $PLUGINSDIR\spltmp
162 | Pop $R1
163 | Pop $R1
164 | !insertmacro MULTIUSER_INIT
165 | FunctionEnd
166 |
167 | # Uninstaller functions
168 | Function un.onInit
169 | !insertmacro MULTIUSER_UNINIT
170 | !insertmacro SELECT_UNSECTION Main ${UNSEC0000}
171 | FunctionEnd
172 |
173 |
--------------------------------------------------------------------------------
/windows/NSIS_Includes/zipdll.nsh:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Red5/installer/5004abbd3bc056de50186401efffc166ef7b0655/windows/NSIS_Includes/zipdll.nsh
--------------------------------------------------------------------------------
/windows/NSIS_Plugins/AccessControl.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Red5/installer/5004abbd3bc056de50186401efffc166ef7b0655/windows/NSIS_Plugins/AccessControl.dll
--------------------------------------------------------------------------------
/windows/NSIS_Plugins/Dialogs.chm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Red5/installer/5004abbd3bc056de50186401efffc166ef7b0655/windows/NSIS_Plugins/Dialogs.chm
--------------------------------------------------------------------------------
/windows/NSIS_Plugins/Dialogs.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Red5/installer/5004abbd3bc056de50186401efffc166ef7b0655/windows/NSIS_Plugins/Dialogs.dll
--------------------------------------------------------------------------------
/windows/NSIS_Plugins/ZipDLL.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Red5/installer/5004abbd3bc056de50186401efffc166ef7b0655/windows/NSIS_Plugins/ZipDLL.dll
--------------------------------------------------------------------------------
/windows/howto.txt:
--------------------------------------------------------------------------------
1 |
2 | Get red5-server dependencies
3 |
4 | mvn dependency:copy-dependencies
5 |
6 | Build red5-server with javadoc and source.
7 |
8 | mvn -Dmaven.test.skip=true -Dmaven.buildNumber.doUpdate=false package
9 |
10 | Download and unzip the commons daemon windows binaries. If the path needs to be updated in the NSIS script, it should be around line 85. Also the "ServiceRoot" parameter may need to be updated depending upon your directory layout.
11 |
12 | Unzip the red5-server-[Version].zip file into the target/installable directory
13 |
14 |
15 | ------------------------------------------------------------------------
16 |
17 | Use make_setupRed5Exe.sh to build automatically.
18 | Run this script on Ubuntu 14.04 LTS or compatible Linux Distribution.
19 | You can find setup-Red5-X.Y.Z.exe in work directroy after the script would run.
20 |
21 | Usage:
22 |
23 | $ ./make_setupRed5Exe.sh -h
24 | Usage: ./make_setupRed5Exe.sh [OPTION] red5_version
25 |
26 | red5_version is like this
27 | - trunk
28 | - 1.0.3
29 | - 1.0.2
30 |
31 | Options:
32 | -c, --cleanbuild: remove working directory before build
33 | -h, --help
34 |
35 | * specify 'trunk' if you want development version
36 |
37 | $ ./make_setupRed5Exe.sh trunk => e.g) work/setup-Red5-1.0.4-SNAPSHOT.exe
38 |
39 | * use with '--cleanbuild' to build other version, like this
40 |
41 | $ ./make_setupRed5Exe.sh --cleanbuild 1.0.3 => work/setup-Red5-1.0.3.exe is built if success
42 |
43 | You can confirm work/make_setupRed5Exe.log if failed.
44 |
45 |
--------------------------------------------------------------------------------
/windows/make_setupRed5Exe.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash --
2 |
3 | # default configuration
4 | DATE=$(date +"%Y-%m-%d %H:%M:%S")
5 | WORK_DIR="work"
6 | PROG_NAME=$(basename $0)
7 | LOG_FILE="$(pwd)/$(echo ${PROG_NAME} | sed "s/\.sh//").log"
8 |
9 | # archive repositories for installing files
10 | GITHUB_URL="https://github.com"
11 |
12 | SERVER_VERSION=
13 | SERVER_URL="$GITHUB_URL/Red5/red5-server"
14 |
15 | MAVEN_URL="https://repo1.maven.org/maven2"
16 | COMMONS_DAEMON_VERSION="1.4.0"
17 | COMMONS_DAEMON_URL="$MAVEN_URL/commons-daemon"
18 | COMMONS_DAEMON_DOWNLOAD_URL="$COMMONS_DAEMON_URL/commons-daemon"
19 | COMMONS_DAEMON_ARCHIVE_URL="$COMMONS_DAEMON_DOWNLOAD_URL/$COMMONS_DAEMON_VERSION"
20 | COMMONS_DAEMON_ARCHIVE_NAME="commons-daemon-$COMMONS_DAEMON_VERSION-bin-windows.zip"
21 |
22 | # getting version for trunk
23 | MAVEN_HELP_PLUGIN="org.apache.maven.plugins:maven-help-plugin:2.2:evaluate"
24 | GREP_VERSION="eval egrep -v \"^\\[(INFO|WARNING)\\]\""
25 |
26 | # NSIS settings
27 | RED5_NSI="red5.nsi"
28 |
29 | # command line options
30 | OPT_CLEAN_BUILD="false"
31 |
32 | # for error check
33 | RET_OK=0
34 | RET_ERROR=1
35 |
36 |
37 | #######################################################################
38 | # Utilities
39 | #######################################################################
40 | log() {
41 | local date=$(date +"%Y-%m-%d %H:%M:%S")
42 | echo -e "$date - INFO : $*" | tee -a $LOG_FILE
43 | }
44 |
45 | error() { # color red
46 | local date=$(date +"%Y-%m-%d %H:%M:%S")
47 | echo -en "\e[31m"
48 | echo -e "$date - ERROR: $*" | tee -a $LOG_FILE
49 | echo -en "\e[m"
50 | }
51 |
52 | run_command() {
53 | local eval cmd="$*"
54 | log "$ $cmd"
55 | eval "$*" | tee -a $LOG_FILE
56 | }
57 |
58 | re_create_dir() {
59 | local dir="$1"
60 | run_command "rm -rf ./$dir"
61 | run_command "mkdir ./$dir"
62 | }
63 |
64 | download() {
65 | local url="$1"
66 | local archive_name="$2"
67 | echo "Download $archive_name from $url"
68 | run_command "curl -# -L $url -o $archive_name"
69 | }
70 |
71 | #######################################################################
72 | # Functions
73 | #######################################################################
74 | get_and_extract_commons_daemon_archive() {
75 | LAST_FUNCNAME=$FUNCNAME
76 | local url="${COMMONS_DAEMON_ARCHIVE_URL}/$COMMONS_DAEMON_ARCHIVE_NAME"
77 | local dir=$(echo $COMMONS_DAEMON_ARCHIVE_NAME | sed "s/.zip//")
78 |
79 | log "** getting commons-daemon archive ..."
80 | download $url $COMMONS_DAEMON_ARCHIVE_NAME
81 | re_create_dir $dir
82 | run_command "(cd ./$dir && unzip ../$COMMONS_DAEMON_ARCHIVE_NAME)"
83 | }
84 |
85 | get_red5_server() {
86 | LAST_FUNCNAME=$FUNCNAME
87 | local version="$1"
88 | echo "Get Red5 server ${version}"
89 | SERVER_VERSION=${version}
90 | # grab from releases
91 | # https://github.com/Red5/red5-server/releases/download/v1.0.8-M10/red5-server-1.0.8-M10.tar.gz
92 | local archive_name="red5-server-${version}.tar.gz"
93 | local url="https://github.com/Red5/red5-server/releases/download/v${version}/${archive_name}"
94 | log "** getting red5-server release..."
95 | download $url $archive_name
96 |
97 | run_command "tar zxvf $archive_name"
98 |
99 | # need to put the apidocs in red5-server/apidocs dir
100 | #echo "Work: ${WORK_DIR}"
101 | run_command "mkdir red5-server/apidocs"
102 | echo "Javadocs are online at http://red5.org/javadoc/" > red5-server/apidocs/javadocs.txt
103 | }
104 |
105 | make_setup_exe() {
106 | LAST_FUNCNAME=$FUNCNAME
107 | local _version="$1"
108 | echo "version: $1"
109 | local version="$(echo $_version | cut -d "-" -f1)"
110 | local snapshot="$(echo $_version | cut -d "-" -f2)"
111 | echo "VIProductVersion: $version snapshot: $snapshot"
112 | local setup_filename="setup-Red5-*.exe"
113 |
114 | log "** making setup.exe ..."
115 | run_command "rm -f ${WORK_DIR}/${setup_filename}"
116 | run_command "makensis -DVERSION=$version $RED5_NSI"
117 |
118 | [ ! -f $setup_filename ] && return $RET_ERROR
119 |
120 | if [ ! "$snapshot" = "RELEASE" ]; then
121 | run_command "mv $setup_filename setup-Red5-${_version}.exe"
122 | fi
123 | run_command "mv $setup_filename ${WORK_DIR}/"
124 | return $RET_OK
125 | }
126 |
127 | create_work_dir() {
128 | LAST_FUNCNAME=$FUNCNAME
129 |
130 | if [ "$OPT_CLEAN_BUILD" = "true" ]; then
131 | re_create_dir $WORK_DIR
132 | else
133 | run_command "mkdir -p $WORK_DIR"
134 | fi
135 |
136 | [ ! -d $WORK_DIR ] && return $RET_ERROR
137 | return $RET_OK
138 | }
139 |
140 | check_command() {
141 | which $1 > /dev/null 2>&1
142 | if [ $? -ne 0 ]; then
143 | error "** '$1' command is not found, need to install!"
144 | return $RET_ERROR
145 | else
146 | run_command "$1 $2"
147 | fi
148 | return $RET_OK
149 | }
150 |
151 | check_needed_commands() {
152 | LAST_FUNCNAME=$FUNCNAME
153 | local i=
154 | local cmd=
155 | local retval=$RET_OK
156 |
157 | log "* check commands this script uses"
158 | for cmd in "curl " "egrep " "git " "makensis -VERSION" "mvn " "tar " "unzip " "jq "
159 | do
160 | local cmd2="${cmd[1]}"
161 | local ver="${cmd2:=--version}"
162 |
163 | check_command $cmd $ver
164 | retval=$(($retval + $?))
165 | done
166 | return $retval
167 | }
168 |
169 | check_argument() {
170 | LAST_FUNCNAME=$FUNCNAME
171 |
172 | # not implemented now ...
173 | [ $# -eq 0 ] && return $RET_ERROR
174 | return $RET_OK
175 | }
176 |
177 | check_error() {
178 | local retval=$1
179 | [ $retval != $RET_OK ] && echo "Error in '$LAST_FUNCNAME' function"
180 | # not implemented now ...
181 | return $retval
182 | }
183 |
184 | usage() {
185 | echo "Usage: $0 [OPTION] red5_version"
186 | echo
187 | echo "red5_version is like this"
188 | echo " - trunk"
189 | echo " - 1.0.8-M10"
190 | echo " - 1.0.7-RELEASE"
191 | echo
192 | echo "Options:"
193 | echo " -c, --cleanbuild: remove working directory before build"
194 | echo " -h, --help"
195 | exit 0
196 | }
197 |
198 | main() {
199 | LAST_FUNCNAME=$FUNCNAME
200 | local version="$1"
201 | [ -z "$version" ] && usage && return $RET_OK
202 | if [ "$version" = "trunk" ]; then
203 | local ver=$(curl -s https://api.github.com/repos/Red5/red5-server/releases/latest|jq -r ".tag_name")
204 | version=${ver:1}
205 | fi
206 |
207 | log "* Start $PROG_NAME on $DATE"
208 |
209 | create_work_dir || return $?
210 | cd $WORK_DIR
211 | log "** change dir to : $(pwd)"
212 |
213 | # get install files from red5-server
214 | get_red5_server $version || return $?
215 | get_and_extract_commons_daemon_archive || return $?
216 |
217 | cd ..
218 | log "** change dir to : $(pwd)"
219 |
220 | # ${SERVER_VERSION} is set in get_red5_server() for trunk version
221 | make_setup_exe $SERVER_VERSION || return $?
222 |
223 | log "* End $PROG_NAME on $DATE"
224 | return $RET_OK
225 | }
226 |
227 |
228 | #######################################################################
229 | # Run Main
230 | #######################################################################
231 | for OPT in "$@"
232 | do
233 | case "$OPT" in
234 | '-c'|'--cleanbuild')
235 | OPT_CLEAN_BUILD="true"
236 | shift
237 | ;;
238 | '-h'|'--help'|-*)
239 | usage
240 | ;;
241 | esac
242 | done
243 |
244 | rm -f $LOG_FILE
245 | check_needed_commands || exit $?
246 | check_argument "$@" || usage $?
247 | main "$@" || check_error $?
248 |
--------------------------------------------------------------------------------
/windows/red5.nsi:
--------------------------------------------------------------------------------
1 | #
2 | # Red5 NSIS script for java7 builds
3 | # Author: Paul Gregoire
4 | # Date: 09/29/2008
5 | # Updated: 09/01/2016
6 | #
7 |
8 | Name Red5
9 |
10 | ; Request application privileges for Windows Vista and Windows 7
11 | RequestExecutionLevel admin
12 |
13 | # Defines
14 | !define REGKEY "SOFTWARE\$(^Name)"
15 | #!define VERSION 1.0.2 # should be specified "-DVERSION=x.y.z" as a command line parameter
16 | !define COMPANY "Red5 Server"
17 | !define DESCRIPTION "Red5 is an Open Source Media Server written in Java"
18 | !define URL https://github.com/Red5
19 | !define BuildRoot ".\work\red5-server"
20 | !define ImageRoot "..\images"
21 | !define CommonsDaemonVersion "1.4.0"
22 |
23 | # Additional Includes and Plugins
24 | !addincludedir .\NSIS_Includes
25 | !addplugindir .\NSIS_Plugins
26 |
27 | # MUI defines
28 | !define MUI_ICON ${ImageRoot}\red5.ico
29 | !define MUI_HEADERIMAGE
30 | !define MUI_HEADERIMAGE_BITMAP ${ImageRoot}\red5_header.bmp
31 | !define MUI_FINISHPAGE_NOAUTOCLOSE
32 | !define MUI_STARTMENUPAGE_REGISTRY_ROOT HKLM
33 | !define MUI_STARTMENUPAGE_REGISTRY_KEY ${REGKEY}
34 | !define MUI_STARTMENUPAGE_REGISTRY_VALUENAME StartMenuGroup
35 | !define MUI_STARTMENUPAGE_DEFAULTFOLDER Red5
36 | ;;!define MUI_UNICON ".\images\red5_uninstall.ico"
37 |
38 | # Included files
39 | !include Sections.nsh
40 | !include MUI.nsh
41 | !include AdvReplaceInFile.nsh
42 | !include "defines.nsh"
43 |
44 | # Reserved Files
45 | ReserveFile "${NSISDIR}/Plugins/amd64-unicode/AdvSplash.dll"
46 |
47 | # Variables
48 | Var StartMenuGroup
49 | Var /GLOBAL HTTP_PORT
50 | Var /GLOBAL IP_ADDRESS
51 |
52 | # Installer pages
53 | !insertmacro MUI_PAGE_WELCOME
54 | !insertmacro MUI_PAGE_LICENSE ..\Red5LicenseInfo.txt
55 | !insertmacro MUI_PAGE_DIRECTORY
56 | !insertmacro MUI_PAGE_STARTMENU Application $StartMenuGroup
57 | !insertmacro MUI_PAGE_INSTFILES
58 | !insertmacro MUI_PAGE_FINISH
59 | !insertmacro MUI_UNPAGE_CONFIRM
60 | !insertmacro MUI_UNPAGE_INSTFILES
61 |
62 | # Installer languages
63 | !insertmacro MUI_LANGUAGE English
64 |
65 | # Installer attributes
66 | OutFile setup-Red5-${VERSION}.exe
67 | InstallDir $PROGRAMFILES\Red5
68 | CRCCheck on
69 | XPStyle on
70 | ShowInstDetails show
71 | VIProductVersion ${VERSION}.0
72 | VIAddVersionKey ProductName $(^Name)
73 | VIAddVersionKey ProductVersion "${VERSION}"
74 | VIAddVersionKey CompanyName "${COMPANY}"
75 | VIAddVersionKey CompanyWebsite "${URL}"
76 | VIAddVersionKey FileVersion "${VERSION}"
77 | VIAddVersionKey FileDescription "${DESCRIPTION}"
78 | VIAddVersionKey LegalCopyright ""
79 | InstallDirRegKey HKLM "${REGKEY}" Path
80 | ShowUninstDetails show
81 |
82 | # Installer sections
83 | Section -Main SEC0000
84 | SetOutPath $INSTDIR
85 | SetOverwrite on
86 | ; copy daemon binaries
87 | File /r /x .svn /x .git /x *.txt .\work\commons-daemon-${CommonsDaemonVersion}-bin-windows\*
88 | ; copy the java files
89 | File /r /x war /x *.sh /x Makefile /x *.gz /x *.zip ${BuildRoot}\*
90 | ; cd and copy the docs
91 | SetOutPath $INSTDIR\doc
92 | File /r /x .svn ${BuildRoot}\apidocs
93 | ; create the log dir
94 | SetOutPath $INSTDIR\log
95 | ; create the temp dir
96 | SetOutPath $INSTDIR\temp
97 | WriteRegStr HKLM "${REGKEY}\Components" Main 1
98 | SectionEnd
99 |
100 | Section -post SEC0001
101 | WriteRegStr HKLM "${REGKEY}" Path $INSTDIR
102 | SetOutPath $INSTDIR
103 |
104 | !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
105 | SetOutPath $SMPROGRAMS\$StartMenuGroup
106 | CreateShortcut "$SMPROGRAMS\$StartMenuGroup\Start $(^Name).lnk" $INSTDIR\red5.bat
107 | CreateShortcut "$SMPROGRAMS\$StartMenuGroup\Stop $(^Name).lnk" $INSTDIR\red5-shutdown.bat
108 | CreateShortcut "$SMPROGRAMS\$StartMenuGroup\$(^Name) on the Web.lnk" "https://github.com/Red5/"
109 | CreateShortcut "$SMPROGRAMS\$StartMenuGroup\API documents.lnk" $INSTDIR\doc\apidocs\index.html
110 | CreateShortcut "$SMPROGRAMS\$StartMenuGroup\Bugtracker.lnk" "https://github.com/Red5/red5-server/issues"
111 | CreateShortcut "$SMPROGRAMS\$StartMenuGroup\Wiki.lnk" "https://github.com/Red5/red5-server/wiki"
112 | CreateShortcut "$SMPROGRAMS\$StartMenuGroup\Uninstall $(^Name).lnk" $INSTDIR\uninstall.exe
113 | !insertmacro MUI_STARTMENU_WRITE_END
114 |
115 | WriteUninstaller $INSTDIR\uninstall.exe
116 |
117 | WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" DisplayName "$(^Name)"
118 | WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" DisplayVersion "${VERSION}"
119 | WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" Publisher "${COMPANY}"
120 | WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" URLInfoAbout "${URL}"
121 | WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" DisplayIcon $INSTDIR\uninstall.exe
122 | WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" UninstallString $INSTDIR\uninstall.exe
123 | WriteRegDWORD HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" NoModify 1
124 | WriteRegDWORD HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" NoRepair 1
125 |
126 | # set directory accesses
127 | AccessControl::GrantOnFile "$INSTDIR" "(BU)" "FullAccess"
128 |
129 | #Dialogs::InputBox [dialog_title] [caption_inner_text] [caption_button1] [caption_button2] [apply_password] [output_var]
130 | Dialogs::InputBox "IP Address" "Enter an IP address for your server:" "Ok" "Cancel" 0 ${VAR_R2}
131 |
132 | ${If} $R2 == ""
133 | StrCpy $IP_ADDRESS "0.0.0.0"
134 | ${Else}
135 | StrCpy $IP_ADDRESS $R2
136 | ${EndIf}
137 |
138 | Dialogs::InputBox "HTTP Port" "Enter a port number to use for HTTP requests:" "Ok" "Cancel" 0 ${VAR_R3}
139 |
140 | ${If} $R3 == ""
141 | StrCpy $HTTP_PORT "5080"
142 | ${Else}
143 | StrCpy $HTTP_PORT $R3
144 | ${EndIf}
145 |
146 | # Replace http and rtmp address
147 | Push "http.host=0.0.0.0"
148 | Push "http.host=$IP_ADDRESS"
149 | Push all
150 | Push all
151 | Push "$INSTDIR\conf\red5.properties"
152 | Call AdvReplaceInFile
153 |
154 | Push "rtmp.host=0.0.0.0"
155 | Push "rtmp.host=$IP_ADDRESS"
156 | Push all
157 | Push all
158 | Push "$INSTDIR\conf\red5.properties"
159 | Call AdvReplaceInFile
160 |
161 | # Replace http port
162 | Push "http.port=5080"
163 | Push "http.port=$HTTP_PORT"
164 | Push all
165 | Push all
166 | Push "$INSTDIR\conf\red5.properties"
167 | Call AdvReplaceInFile
168 |
169 | # Add the service
170 | ExecWait '"$INSTDIR\install-service.bat"'
171 | ; send them to google code site
172 | ExecShell "open" "https://github.com/Red5/"
173 | SectionEnd
174 |
175 | # Macro for selecting uninstaller sections
176 | !macro SELECT_UNSECTION SECTION_NAME UNSECTION_ID
177 | Push $R0
178 | ReadRegStr $R0 HKLM "${REGKEY}\Components" "${SECTION_NAME}"
179 | StrCmp $R0 1 0 next${UNSECTION_ID}
180 | !insertmacro SelectSection "${UNSECTION_ID}"
181 | GoTo done${UNSECTION_ID}
182 | next${UNSECTION_ID}:
183 | !insertmacro UnselectSection "${UNSECTION_ID}"
184 | done${UNSECTION_ID}:
185 | Pop $R0
186 | !macroend
187 |
188 | # Uninstaller sections
189 | Section /o -un.Main UNSEC0000
190 | # remove the service
191 | ExecWait '"$INSTDIR\uninstall-service.bat"'
192 | RmDir /r /REBOOTOK $INSTDIR
193 | DeleteRegValue HKLM "${REGKEY}\Components" Main
194 | SectionEnd
195 |
196 | Section -un.post UNSEC0001
197 | DeleteRegKey HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)"
198 | Delete /REBOOTOK "$SMPROGRAMS\$StartMenuGroup\Start $(^Name).lnk"
199 | Delete /REBOOTOK "$SMPROGRAMS\$StartMenuGroup\Stop $(^Name).lnk"
200 | Delete /REBOOTOK "$SMPROGRAMS\$StartMenuGroup\$(^Name) on the Web.lnk"
201 | Delete /REBOOTOK "$SMPROGRAMS\$StartMenuGroup\Bugtracker.lnk"
202 | Delete /REBOOTOK "$SMPROGRAMS\$StartMenuGroup\API documents.lnk"
203 | Delete /REBOOTOK "$SMPROGRAMS\$StartMenuGroup\Uninstall $(^Name).lnk"
204 | Delete /REBOOTOK $INSTDIR\uninstall.exe
205 | DeleteRegValue HKLM "${REGKEY}" StartMenuGroup
206 | DeleteRegValue HKLM "${REGKEY}" Path
207 | DeleteRegKey /IfEmpty HKLM "${REGKEY}\Components"
208 | DeleteRegKey /IfEmpty HKLM "${REGKEY}"
209 | RmDir /REBOOTOK $SMPROGRAMS\$StartMenuGroup
210 | RmDir /REBOOTOK $INSTDIR
211 | Push $R0
212 | StrCpy $R0 $StartMenuGroup 1
213 | StrCmp $R0 ">" no_smgroup
214 | no_smgroup:
215 | Pop $R0
216 | SectionEnd
217 |
218 | # Installer functions
219 | Function .onInit
220 | InitPluginsDir
221 | Push $R1
222 | File /oname=$PLUGINSDIR\spltmp.bmp ${ImageRoot}\red5splash.bmp
223 | advsplash::show 1000 600 400 -1 $PLUGINSDIR\spltmp
224 | Pop $R1
225 | Pop $R1
226 | FunctionEnd
227 |
228 | # Uninstaller functions
229 | Function un.onInit
230 | SetAutoClose true
231 | ReadRegStr $INSTDIR HKLM "${REGKEY}" Path
232 | !insertmacro MUI_STARTMENU_GETFOLDER Application $StartMenuGroup
233 | !insertmacro SELECT_UNSECTION Main ${UNSEC0000}
234 | FunctionEnd
235 |
236 |
--------------------------------------------------------------------------------