├── .gitignore ├── LICENSE ├── README.md ├── generate.sh ├── issue_template.md ├── makeself ├── COPYING ├── README ├── makeself-header.sh ├── makeself.1 ├── makeself.lsm └── makeself.sh └── src ├── mdtool-stable ├── monodevelop-stable ├── monodevelop-stable-uninstall ├── monodevelop-stable.svg └── postinstall.sh /.gitignore: -------------------------------------------------------------------------------- 1 | bin/ 2 | tmp/ 3 | monodevelop/ 4 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2016 Harry 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # MonoDevelop has returned to providing per distro packages, this repo will no longer be maintained. 2 | 3 | # A simple .run installer for MonoDevelop 4 | 5 | This is a simple .run installer for the newest version of MonoDevelop. I created this since the flatpak version is still quite unstable (flatpak version sandboxes the app which hides the system folders from it, this makes debugging stuff which requires system libraries impossible since they can't load system libs, and there are also problems with using MonoGame for example which is depandand on the content builder, which gets installed in /usr). 6 | 7 | ## Installing 8 | 9 | To install simply download a release and do: 10 | ``` 11 | chmod +x monodevelop-{version}.run 12 | sudo ./monodevelop-{version}.run 13 | ``` 14 | where you replace `{version}` with the version you've downloaded. The installer will not download dependencies (mono, xbuild, etc.) so you should install `monodevelop` package from you systems default repos to fetch them quickly. 15 | 16 | The installer will add "MonoDevelop Stable" application launcher, as well as the following commands: 17 | - monodevelop-stable - Launches MonoDevelop 18 | - mdtool-stable - Launches MDTool 19 | - monodevelop-stable-uninstall - Uninstalls MonoDevelop from .run installer 20 | 21 | ## Building installer from source 22 | 23 | To build from source, simply download and install `flatpak`, and after than just call the generate script (it will automatically download and update MonoDevelop for you): 24 | ``` 25 | ./generate.sh 26 | ``` 27 | -------------------------------------------------------------------------------- /generate.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Check flatpak installed 4 | if ! type "flatpak" &> /dev/null 5 | then 6 | echo "'flatpak' command not found :(" 7 | exit 1 8 | fi 9 | 10 | # Locate (and update) Monodevelop 11 | MDFDIR="$HOME/.local/share/flatpak/app/com.xamarin.MonoDevelop/current/active/files" 12 | MDU="$(flatpak list | grep com.xamarin.MonoDevelop | grep user)" 13 | MDS="$(flatpak list | grep com.xamarin.MonoDevelop | grep system)" 14 | 15 | if [ -n "$MDS" ] 16 | then 17 | MDFDIR="/var/lib/flatpak/app/com.xamarin.MonoDevelop/current/active/files" 18 | flatpak update com.xamarin.MonoDevelop 19 | elif [ -n "$MDU" ] 20 | then 21 | flatpak update --user com.xamarin.MonoDevelop 22 | else 23 | flatpak install --user --from https://download.mono-project.com/repo/monodevelop.flatpakref 24 | fi 25 | 26 | if [ ! -d $MDFDIR ] 27 | then 28 | echo "Could not locate MonoDevelop from flatpak, please make sure it is installed." 29 | exit 1 30 | fi 31 | 32 | mkdir tmp 33 | cd tmp 34 | 35 | # Copy installer source 36 | echo "Copying installer data..." 37 | mkdir installer 38 | cp -rf "../src/." "installer" 39 | 40 | # Copy MonoDevelop binaries 41 | mkdir installer/MonoDevelop 42 | cp -rf "$MDFDIR/lib/monodevelop/." "installer/MonoDevelop" 43 | 44 | # Remove bundled version of libgit2 45 | rm installer/MonoDevelop/AddIns/VersionControl/libgit2-* 46 | 47 | echo "Building the Installer..." 48 | rm -rf ../bin 49 | mkdir ../bin 50 | ../makeself/makeself.sh installer/ ../bin/monodevelop.run "MonoDevelop .run installer" ./postinstall.sh 51 | 52 | echo "Cleaning Up..." 53 | cd .. 54 | rm -rf tmp 55 | 56 | echo "Done :)" 57 | -------------------------------------------------------------------------------- /issue_template.md: -------------------------------------------------------------------------------- 1 | # Please make sure that the issue you are reporting is 2 | # actually related to the .run packaging. This reposetory 3 | # is afteral only just a repackaging of monodevelop and 4 | # nothing more. 5 | 6 | # PS. If the MonoDevelop is not starting when launched 7 | # from the launcher or terminal, you can look at the 8 | # log file located at ~/.config/MonoDevelop/7.0/Logs/Ide.log 9 | # to get the crash error and figure out what you are missing. 10 | -------------------------------------------------------------------------------- /makeself/COPYING: -------------------------------------------------------------------------------- 1 | 2 | GNU GENERAL PUBLIC LICENSE 3 | Version 2, June 1991 4 | 5 | Copyright (C) 1989, 1991 Free Software Foundation, Inc. 6 | 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 7 | Everyone is permitted to copy and distribute verbatim copies 8 | of this license document, but changing it is not allowed. 9 | 10 | Preamble 11 | 12 | The licenses for most software are designed to take away your 13 | freedom to share and change it. By contrast, the GNU General Public 14 | License is intended to guarantee your freedom to share and change free 15 | software--to make sure the software is free for all its users. This 16 | General Public License applies to most of the Free Software 17 | Foundation's software and to any other program whose authors commit to 18 | using it. (Some other Free Software Foundation software is covered by 19 | the GNU Library General Public License instead.) You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | this service if you wish), that you receive source code or can get it 26 | if you want it, that you can change the software or use pieces of it 27 | in new free programs; and that you know you can do these things. 28 | 29 | To protect your rights, we need to make restrictions that forbid 30 | anyone to deny you these rights or to ask you to surrender the rights. 31 | These restrictions translate to certain responsibilities for you if you 32 | distribute copies of the software, or if you modify it. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must give the recipients all the rights that 36 | you have. You must make sure that they, too, receive or can get the 37 | source code. And you must show them these terms so they know their 38 | rights. 39 | 40 | We protect your rights with two steps: (1) copyright the software, and 41 | (2) offer you this license which gives you legal permission to copy, 42 | distribute and/or modify the software. 43 | 44 | Also, for each author's protection and ours, we want to make certain 45 | that everyone understands that there is no warranty for this free 46 | software. If the software is modified by someone else and passed on, we 47 | want its recipients to know that what they have is not the original, so 48 | that any problems introduced by others will not reflect on the original 49 | authors' reputations. 50 | 51 | Finally, any free program is threatened constantly by software 52 | patents. We wish to avoid the danger that redistributors of a free 53 | program will individually obtain patent licenses, in effect making the 54 | program proprietary. To prevent this, we have made it clear that any 55 | patent must be licensed for everyone's free use or not licensed at all. 56 | 57 | The precise terms and conditions for copying, distribution and 58 | modification follow. 59 | 60 | GNU GENERAL PUBLIC LICENSE 61 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 62 | 63 | 0. This License applies to any program or other work which contains 64 | a notice placed by the copyright holder saying it may be distributed 65 | under the terms of this General Public License. The "Program", below, 66 | refers to any such program or work, and a "work based on the Program" 67 | means either the Program or any derivative work under copyright law: 68 | that is to say, a work containing the Program or a portion of it, 69 | either verbatim or with modifications and/or translated into another 70 | language. (Hereinafter, translation is included without limitation in 71 | the term "modification".) Each licensee is addressed as "you". 72 | 73 | Activities other than copying, distribution and modification are not 74 | covered by this License; they are outside its scope. The act of 75 | running the Program is not restricted, and the output from the Program 76 | is covered only if its contents constitute a work based on the 77 | Program (independent of having been made by running the Program). 78 | Whether that is true depends on what the Program does. 79 | 80 | 1. You may copy and distribute verbatim copies of the Program's 81 | source code as you receive it, in any medium, provided that you 82 | conspicuously and appropriately publish on each copy an appropriate 83 | copyright notice and disclaimer of warranty; keep intact all the 84 | notices that refer to this License and to the absence of any warranty; 85 | and give any other recipients of the Program a copy of this License 86 | along with the Program. 87 | 88 | You may charge a fee for the physical act of transferring a copy, and 89 | you may at your option offer warranty protection in exchange for a fee. 90 | 91 | 2. You may modify your copy or copies of the Program or any portion 92 | of it, thus forming a work based on the Program, and copy and 93 | distribute such modifications or work under the terms of Section 1 94 | above, provided that you also meet all of these conditions: 95 | 96 | a) You must cause the modified files to carry prominent notices 97 | stating that you changed the files and the date of any change. 98 | 99 | b) You must cause any work that you distribute or publish, that in 100 | whole or in part contains or is derived from the Program or any 101 | part thereof, to be licensed as a whole at no charge to all third 102 | parties under the terms of this License. 103 | 104 | c) If the modified program normally reads commands interactively 105 | when run, you must cause it, when started running for such 106 | interactive use in the most ordinary way, to print or display an 107 | announcement including an appropriate copyright notice and a 108 | notice that there is no warranty (or else, saying that you provide 109 | a warranty) and that users may redistribute the program under 110 | these conditions, and telling the user how to view a copy of this 111 | License. (Exception: if the Program itself is interactive but 112 | does not normally print such an announcement, your work based on 113 | the Program is not required to print an announcement.) 114 | 115 | These requirements apply to the modified work as a whole. If 116 | identifiable sections of that work are not derived from the Program, 117 | and can be reasonably considered independent and separate works in 118 | themselves, then this License, and its terms, do not apply to those 119 | sections when you distribute them as separate works. But when you 120 | distribute the same sections as part of a whole which is a work based 121 | on the Program, the distribution of the whole must be on the terms of 122 | this License, whose permissions for other licensees extend to the 123 | entire whole, and thus to each and every part regardless of who wrote it. 124 | 125 | Thus, it is not the intent of this section to claim rights or contest 126 | your rights to work written entirely by you; rather, the intent is to 127 | exercise the right to control the distribution of derivative or 128 | collective works based on the Program. 129 | 130 | In addition, mere aggregation of another work not based on the Program 131 | with the Program (or with a work based on the Program) on a volume of 132 | a storage or distribution medium does not bring the other work under 133 | the scope of this License. 134 | 135 | 3. You may copy and distribute the Program (or a work based on it, 136 | under Section 2) in object code or executable form under the terms of 137 | Sections 1 and 2 above provided that you also do one of the following: 138 | 139 | a) Accompany it with the complete corresponding machine-readable 140 | source code, which must be distributed under the terms of Sections 141 | 1 and 2 above on a medium customarily used for software interchange; or, 142 | 143 | b) Accompany it with a written offer, valid for at least three 144 | years, to give any third party, for a charge no more than your 145 | cost of physically performing source distribution, a complete 146 | machine-readable copy of the corresponding source code, to be 147 | distributed under the terms of Sections 1 and 2 above on a medium 148 | customarily used for software interchange; or, 149 | 150 | c) Accompany it with the information you received as to the offer 151 | to distribute corresponding source code. (This alternative is 152 | allowed only for noncommercial distribution and only if you 153 | received the program in object code or executable form with such 154 | an offer, in accord with Subsection b above.) 155 | 156 | The source code for a work means the preferred form of the work for 157 | making modifications to it. For an executable work, complete source 158 | code means all the source code for all modules it contains, plus any 159 | associated interface definition files, plus the scripts used to 160 | control compilation and installation of the executable. However, as a 161 | special exception, the source code distributed need not include 162 | anything that is normally distributed (in either source or binary 163 | form) with the major components (compiler, kernel, and so on) of the 164 | operating system on which the executable runs, unless that component 165 | itself accompanies the executable. 166 | 167 | If distribution of executable or object code is made by offering 168 | access to copy from a designated place, then offering equivalent 169 | access to copy the source code from the same place counts as 170 | distribution of the source code, even though third parties are not 171 | compelled to copy the source along with the object code. 172 | 173 | 4. You may not copy, modify, sublicense, or distribute the Program 174 | except as expressly provided under this License. Any attempt 175 | otherwise to copy, modify, sublicense or distribute the Program is 176 | void, and will automatically terminate your rights under this License. 177 | However, parties who have received copies, or rights, from you under 178 | this License will not have their licenses terminated so long as such 179 | parties remain in full compliance. 180 | 181 | 5. You are not required to accept this License, since you have not 182 | signed it. However, nothing else grants you permission to modify or 183 | distribute the Program or its derivative works. These actions are 184 | prohibited by law if you do not accept this License. Therefore, by 185 | modifying or distributing the Program (or any work based on the 186 | Program), you indicate your acceptance of this License to do so, and 187 | all its terms and conditions for copying, distributing or modifying 188 | the Program or works based on it. 189 | 190 | 6. Each time you redistribute the Program (or any work based on the 191 | Program), the recipient automatically receives a license from the 192 | original licensor to copy, distribute or modify the Program subject to 193 | these terms and conditions. You may not impose any further 194 | restrictions on the recipients' exercise of the rights granted herein. 195 | You are not responsible for enforcing compliance by third parties to 196 | this License. 197 | 198 | 7. If, as a consequence of a court judgment or allegation of patent 199 | infringement or for any other reason (not limited to patent issues), 200 | conditions are imposed on you (whether by court order, agreement or 201 | otherwise) that contradict the conditions of this License, they do not 202 | excuse you from the conditions of this License. If you cannot 203 | distribute so as to satisfy simultaneously your obligations under this 204 | License and any other pertinent obligations, then as a consequence you 205 | may not distribute the Program at all. For example, if a patent 206 | license would not permit royalty-free redistribution of the Program by 207 | all those who receive copies directly or indirectly through you, then 208 | the only way you could satisfy both it and this License would be to 209 | refrain entirely from distribution of the Program. 210 | 211 | If any portion of this section is held invalid or unenforceable under 212 | any particular circumstance, the balance of the section is intended to 213 | apply and the section as a whole is intended to apply in other 214 | circumstances. 215 | 216 | It is not the purpose of this section to induce you to infringe any 217 | patents or other property right claims or to contest validity of any 218 | such claims; this section has the sole purpose of protecting the 219 | integrity of the free software distribution system, which is 220 | implemented by public license practices. Many people have made 221 | generous contributions to the wide range of software distributed 222 | through that system in reliance on consistent application of that 223 | system; it is up to the author/donor to decide if he or she is willing 224 | to distribute software through any other system and a licensee cannot 225 | impose that choice. 226 | 227 | This section is intended to make thoroughly clear what is believed to 228 | be a consequence of the rest of this License. 229 | 230 | 8. If the distribution and/or use of the Program is restricted in 231 | certain countries either by patents or by copyrighted interfaces, the 232 | original copyright holder who places the Program under this License 233 | may add an explicit geographical distribution limitation excluding 234 | those countries, so that distribution is permitted only in or among 235 | countries not thus excluded. In such case, this License incorporates 236 | the limitation as if written in the body of this License. 237 | 238 | 9. The Free Software Foundation may publish revised and/or new versions 239 | of the General Public License from time to time. Such new versions will 240 | be similar in spirit to the present version, but may differ in detail to 241 | address new problems or concerns. 242 | 243 | Each version is given a distinguishing version number. If the Program 244 | specifies a version number of this License which applies to it and "any 245 | later version", you have the option of following the terms and conditions 246 | either of that version or of any later version published by the Free 247 | Software Foundation. If the Program does not specify a version number of 248 | this License, you may choose any version ever published by the Free Software 249 | Foundation. 250 | 251 | 10. If you wish to incorporate parts of the Program into other free 252 | programs whose distribution conditions are different, write to the author 253 | to ask for permission. For software which is copyrighted by the Free 254 | Software Foundation, write to the Free Software Foundation; we sometimes 255 | make exceptions for this. Our decision will be guided by the two goals 256 | of preserving the free status of all derivatives of our free software and 257 | of promoting the sharing and reuse of software generally. 258 | 259 | NO WARRANTY 260 | 261 | 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY 262 | FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN 263 | OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES 264 | PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED 265 | OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 266 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS 267 | TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE 268 | PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, 269 | REPAIR OR CORRECTION. 270 | 271 | 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 272 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR 273 | REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, 274 | INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING 275 | OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED 276 | TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY 277 | YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER 278 | PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE 279 | POSSIBILITY OF SUCH DAMAGES. 280 | 281 | END OF TERMS AND CONDITIONS 282 | 283 | How to Apply These Terms to Your New Programs 284 | 285 | If you develop a new program, and you want it to be of the greatest 286 | possible use to the public, the best way to achieve this is to make it 287 | free software which everyone can redistribute and change under these terms. 288 | 289 | To do so, attach the following notices to the program. It is safest 290 | to attach them to the start of each source file to most effectively 291 | convey the exclusion of warranty; and each file should have at least 292 | the "copyright" line and a pointer to where the full notice is found. 293 | 294 | 295 | Copyright (C) 19yy 296 | 297 | This program is free software; you can redistribute it and/or modify 298 | it under the terms of the GNU General Public License as published by 299 | the Free Software Foundation; either version 2 of the License, or 300 | (at your option) any later version. 301 | 302 | This program is distributed in the hope that it will be useful, 303 | but WITHOUT ANY WARRANTY; without even the implied warranty of 304 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 305 | GNU General Public License for more details. 306 | 307 | You should have received a copy of the GNU General Public License 308 | along with this program; if not, write to the Free Software 309 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 310 | 311 | 312 | Also add information on how to contact you by electronic and paper mail. 313 | 314 | If the program is interactive, make it output a short notice like this 315 | when it starts in an interactive mode: 316 | 317 | Gnomovision version 69, Copyright (C) 19yy name of author 318 | Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 319 | This is free software, and you are welcome to redistribute it 320 | under certain conditions; type `show c' for details. 321 | 322 | The hypothetical commands `show w' and `show c' should show the appropriate 323 | parts of the General Public License. Of course, the commands you use may 324 | be called something other than `show w' and `show c'; they could even be 325 | mouse-clicks or menu items--whatever suits your program. 326 | 327 | You should also get your employer (if you work as a programmer) or your 328 | school, if any, to sign a "copyright disclaimer" for the program, if 329 | necessary. Here is a sample; alter the names: 330 | 331 | Yoyodyne, Inc., hereby disclaims all copyright interest in the program 332 | `Gnomovision' (which makes passes at compilers) written by James Hacker. 333 | 334 | , 1 April 1989 335 | Ty Coon, President of Vice 336 | 337 | This General Public License does not permit incorporating your program into 338 | proprietary programs. If your program is a subroutine library, you may 339 | consider it more useful to permit linking proprietary applications with the 340 | library. If this is what you want to do, use the GNU Library General 341 | Public License instead of this License. 342 | -------------------------------------------------------------------------------- /makeself/README: -------------------------------------------------------------------------------- 1 | The following was generated from http://www.megastep.org/makeself/ 2 | ----------------------- 3 | 4 | 5 | #[1]Mobile/PDA 6 | 7 | makeself - Make self-extractable archives on Unix 8 | 9 | [2]makeself.sh is a small shell script that generates a self-extractable 10 | tar.gz archive from a directory. The resulting file appears as a shell 11 | script (many of those have a .run suffix), and can be launched as is. The 12 | archive will then uncompress itself to a temporary directory and an optional 13 | arbitrary command will be executed (for example an installation script). 14 | This is pretty similar to archives generated with WinZip Self-Extractor in 15 | the Windows world. Makeself archives also include checksums for integrity 16 | self-validation (CRC and/or MD5 checksums). 17 | 18 | The makeself.sh script itself is used only to create the archives from a 19 | directory of files. The resultant archive is actually a compressed (using 20 | gzip, bzip2, or compress) TAR archive, with a small shell script stub at the 21 | beginning. This small stub performs all the steps of extracting the files, 22 | running the embedded command, and removing the temporary files when it's all 23 | over. All what the user has to do to install the software contained in such 24 | an archive is to "run" the archive, i.e sh nice-software.run. I recommend 25 | using the "run" (which was introduced by some Makeself archives released by 26 | Loki Software) or "sh" suffix for such archives not to confuse the users, 27 | since they know it's actually shell scripts (with quite a lot of binary data 28 | attached to it though!). 29 | 30 | I am trying to keep the code of this script as portable as possible, i.e 31 | it's not relying on any bash-specific features and only calls commands that 32 | are installed on any functioning UNIX-compatible system. This script as well 33 | as the archives it generates should run on any Unix flavor, with any 34 | compatible Bourne shell, provided of course that the compression programs 35 | are available. 36 | 37 | As of version 2.1, Makeself has been rewritten and tested on the following 38 | platforms : 39 | * Linux (all distributions) 40 | * Sun Solaris (8 tested) 41 | * HP-UX (tested on 11.0 and 11i on HPPA RISC) 42 | * SCO OpenUnix and OpenServer 43 | * IBM AIX 5.1L 44 | * MacOS X (Darwin) 45 | * SGI IRIX 6.5 46 | * FreeBSD 47 | * UnicOS / Cray 48 | 49 | If you successfully run Makeself and/or archives created with it on another 50 | system, then [3]let me know! 51 | 52 | Examples of publicly available archives made using makeself are : 53 | * Game patches and installers for [4]Id Software games like Quake 3 for 54 | Linux or Return To Castle Wolfenstien ; 55 | * All game patches released by [5]Loki Software for the Linux version of 56 | popular games ; 57 | * The [6]nVidia drivers for Linux 58 | * The installer for the Linux version of [7]Google Earth 59 | * The [8]Makeself distribution itself ;-) 60 | * and countless others... 61 | 62 | Important note for Apache users: By default, most Web servers will think 63 | that Makeself archives are regular text files and thus they may show up as 64 | text in a Web browser. The correct way to prevent this is to add a MIME type 65 | for this file format, like so (in httpd.conf) : 66 | AddType application/x-makeself .run 67 | 68 | Important note for recent GNU/Linux distributions: Archives created with 69 | Makeself prior to v2.1.2 were using an old syntax for the head and tail Unix 70 | commands that is being progressively obsoleted in their GNU forms. Therefore 71 | you may have problems uncompressing some of these archives. A workaround for 72 | this is to set the environment variable $_POSIX2_VERSION to enable the old 73 | syntax, i.e. : 74 | export _POSIX2_VERSION=199209 75 | 76 | Usage 77 | 78 | The syntax of makeself is the following: 79 | 80 | makeself.sh [args] archive_dir file_name label startup_script [script_args] 81 | * args are optional options for Makeself. The available ones are : 82 | + --version : Prints the version number on stdout, then exits 83 | immediately 84 | + --gzip : Use gzip for compression (is the default on platforms on 85 | which gzip is commonly available, like Linux) 86 | + --bzip2 : Use bzip2 instead of gzip for better compression. The 87 | bzip2 command must be available in the command path. I recommend 88 | that you set the prefix to something like '.bz2.run' for the 89 | archive, so that potential users know that they'll need bzip2 to 90 | extract it. 91 | + --compress : Use the UNIX "compress" command to compress the data. 92 | This should be the default on all platforms that don't have gzip 93 | available. 94 | + --nocomp : Do not use any compression for the archive, which will 95 | then be an uncompressed TAR. 96 | + --notemp : The generated archive will not extract the files to a 97 | temporary directory, but in a new directory created in the current 98 | directory. This is better to distribute software packages that may 99 | extract and compile by themselves (i.e. launch the compilation 100 | through the embedded script). 101 | + --current : Files will be extracted to the current directory, 102 | instead of in a subdirectory. This option implies --notemp above. 103 | + --follow : Follow the symbolic links inside of the archive 104 | directory, i.e. store the files that are being pointed to instead 105 | of the links themselves. 106 | + --append (new in 2.1.x): Append data to an existing archive, 107 | instead of creating a new one. In this mode, the settings from the 108 | original archive are reused (compression type, label, embedded 109 | script), and thus don't need to be specified again on the command 110 | line. 111 | + --header : Makeself 2.0 uses a separate file to store the header 112 | stub, called "makeself-header.sh". By default, it is assumed that 113 | it is stored in the same location as makeself.sh. This option can 114 | be used to specify its actual location if it is stored someplace 115 | else. 116 | + --copy : Upon extraction, the archive will first extract itself to 117 | a temporary directory. The main application of this is to allow 118 | self-contained installers stored in a Makeself archive on a CD, 119 | when the installer program will later need to unmount the CD and 120 | allow a new one to be inserted. This prevents "Filesystem busy" 121 | errors for installers that span multiple CDs. 122 | + --nox11 : Disable the automatic spawning of a new terminal in X11. 123 | + --nowait : When executed from a new X11 terminal, disable the user 124 | prompt at the end of the script execution. 125 | + --nomd5 and --nocrc : Disable the creation of a MD5 / CRC checksum 126 | for the archive. This speeds up the extraction process if integrity 127 | checking is not necessary. 128 | + --lsm file : Provide and LSM file to makeself, that will be 129 | embedded in the generated archive. LSM files are describing a 130 | software package in a way that is easily parseable. The LSM entry 131 | can then be later retrieved using the '-lsm' argument to the 132 | archive. An exemple of a LSM file is provided with Makeself. 133 | * archive_dir is the name of the directory that contains the files to be 134 | archived 135 | * file_name is the name of the archive to be created 136 | * label is an arbitrary text string describing the package. It will be 137 | displayed while extracting the files. 138 | * startup_script is the command to be executed from within the directory 139 | of extracted files. Thus, if you wish to execute a program contain in 140 | this directory, you must prefix your command with "./". For example, 141 | ./program will be fine. The script_args are additionnal arguments for 142 | this command. 143 | 144 | Here is an example, assuming the user has a package image stored in a 145 | /home/joe/mysoft, and he wants to generate a self-extracting package named 146 | mysoft.sh, which will launch the "setup" script initially stored in 147 | /home/joe/mysoft : 148 | 149 | makeself.sh /home/joe/mysoft mysoft.sh "Joe's Nice Software Package" ./setup 150 | Here is also how I created the [9]makeself.run archive which contains the 151 | Makeself distribution : 152 | 153 | makeself.sh --notemp makeself makeself.run "Makeself by Stephane Peter" echo 154 | "Makeself has extracted itself" 155 | 156 | Archives generated with Makeself 2.1 can be passed the following arguments: 157 | 158 | * --keep : Prevent the files to be extracted in a temporary directory that 159 | will be removed after the embedded script's execution. The files will 160 | then be extracted in the current working directory and will stay here 161 | until you remove them. 162 | * --verbose : Will prompt the user before executing the embedded command 163 | * --target dir : Allows to extract the archive in an arbitrary place. 164 | * --nox11 : Do not spawn a X11 terminal. 165 | * --confirm : Prompt the user for confirmation before running the embedded 166 | command. 167 | * --info : Print out general information about the archive (does not 168 | extract). 169 | * --lsm : Print out the LSM entry, if it is present. 170 | * --list : List the files in the archive. 171 | * --check : Check the archive for integrity using the embedded checksums. 172 | Does not extract the archive. 173 | * --nochown : By default, a "chown -R" command is run on the target 174 | directory after extraction, so that all files belong to the current 175 | user. This is mostly needed if you are running as root, as tar will then 176 | try to recreate the initial user ownerships. You may disable this 177 | behavior with this flag. 178 | * --tar : Run the tar command on the contents of the archive, using the 179 | following arguments as parameter for the command. 180 | * --noexec : Do not run the embedded script after extraction. 181 | 182 | Any subsequent arguments to the archive will be passed as additional 183 | arguments to the embedded command. You should explicitly use the -- special 184 | command-line construct before any such options to make sure that Makeself 185 | will not try to interpret them. 186 | 187 | License 188 | 189 | Makeself is covered by the [10]GNU General Public License (GPL) version 2 190 | and above. Archives generated by Makeself don't have to be placed under this 191 | license (although I encourage it ;-)), since the archive itself is merely 192 | data for Makeself. 193 | 194 | Download 195 | 196 | Get the latest official distribution [11]here (version 2.1.5). 197 | 198 | The latest development version can be grabbed from the Loki Setup CVS 199 | module, at [12]cvs.icculus.org. 200 | 201 | Version history 202 | 203 | * v1.0: Initial public release 204 | * v1.1: The archive can be passed parameters that will be passed on to the 205 | embedded script, thanks to John C. Quillan 206 | * v1.2: Cosmetic updates, support for bzip2 compression and non-temporary 207 | archives. Many ideas thanks to Francois Petitjean. 208 | * v1.3: More patches from Bjarni R. Einarsson and Francois Petitjean: 209 | Support for no compression (--nocomp), script is no longer mandatory, 210 | automatic launch in an xterm, optional verbose output, and -target 211 | archive option to indicate where to extract the files. 212 | * v1.4: Many patches from Francois Petitjean: improved UNIX compatibility, 213 | automatic integrity checking, support of LSM files to get info on the 214 | package at run time.. 215 | * v1.5.x: A lot of bugfixes, and many other patches, including automatic 216 | verification through the usage of checksums. Version 1.5.5 was the 217 | stable release for a long time, even though the Web page didn't get 218 | updated ;-). Makeself was also officially made a part of the [13]Loki 219 | Setup installer, and its source is being maintained as part of this 220 | package. 221 | * v2.0: Complete internal rewrite of Makeself. The command-line parsing 222 | was vastly improved, the overall maintenance of the package was greatly 223 | improved by separating the stub from makeself.sh. Also Makeself was 224 | ported and tested to a variety of Unix platforms. 225 | * v2.0.1: First public release of the new 2.0 branch. Prior versions are 226 | officially obsoleted. This release introduced the '--copy' argument that 227 | was introduced in response to a need for the [14]UT2K3 Linux installer. 228 | * v2.1.0: Big change : Makeself can now support multiple embedded 229 | tarballs, each stored separately with their own checksums. An existing 230 | archive can be updated with the --append flag. Checksums are also better 231 | managed, and the --nochown option for archives appeared. 232 | * v2.1.1: Fixes related to the Unix compression (compress command). Some 233 | Linux distributions made the insane choice to make it unavailable, even 234 | though gzip is capable of uncompressing these files, plus some more 235 | bugfixes in the extraction and checksum code. 236 | * v2.1.2: Some bug fixes. Use head -n to avoid problems with POSIX 237 | conformance. 238 | * v2.1.3: Bug fixes with the command line when spawning terminals. Added 239 | --tar, --noexec for archives. Added --nomd5 and --nocrc to avoid 240 | creating checksums in archives. The embedded script is now run through 241 | "eval". The --info output now includes the command used to create the 242 | archive. A man page was contributed by Bartosz Fenski. 243 | * v2.1.4: Fixed --info output. Generate random directory name when 244 | extracting files to . to avoid problems. Better handling of errors with 245 | wrong permissions for the directory containing the files. Avoid some 246 | race conditions, Unset the $CDPATH variable to avoid problems if it is 247 | set. Better handling of dot files in the archive directory. 248 | * v2.1.5: Made the md5sum detection consistent with the header code. Check 249 | for the presence of the archive directory. Added --encrypt for symmetric 250 | encryption through gpg (Eric Windisch). Added support for the digest 251 | command on Solaris 10 for MD5 checksums. Check for available disk space 252 | before extracting to the target directory (Andreas Schweitzer). Allow 253 | extraction to run asynchronously (patch by Peter Hatch). Use file 254 | descriptors internally to avoid error messages (patch by Kay Tiong 255 | Khoo). 256 | 257 | Links 258 | 259 | * Check out the [15]"Loki setup" installer, used to install many Linux 260 | games and other applications, and of which I am the co-author. Since the 261 | demise of Loki, I am now the official maintainer of the project, and it 262 | is now being hosted on [16]icculus.org, as well as a bunch of other 263 | ex-Loki projects (and a lot of other good stuff!). 264 | * Bjarni R. Einarsson also wrote the setup.sh installer script, inspired 265 | by Makeself. [17]Check it out ! 266 | 267 | Contact 268 | 269 | This script was written by [18]Stéphane Peter (megastep at megastep.org) I 270 | welcome any enhancements and suggestions. 271 | 272 | Contributions were included from John C. Quillan, Bjarni R. Einarsson, 273 | Francois Petitjean, and Ryan C. Gordon, thanks to them! If you think I 274 | forgot your name, don't hesitate to contact me. 275 | 276 | icculus.org also has a [19]Bugzilla server available that allows bug reports 277 | to be submitted for Loki setup, and since Makeself is a part of Loki setup, 278 | you can submit bug reports from there! 279 | _________________________________________________________________ 280 | 281 | 282 | [20]Stéphane Peter 283 | 284 | Last modified: Fri Jan 4 15:51:05 PST 2008 285 | 286 | References 287 | 288 | 1. http://mowser.com/web/megastep.org/makeself/ 289 | 2. http://www.megastep.org/makeself/makeself.run 290 | 3. mailto:megastep@REMOVEME.megastep.org 291 | 4. http://www.idsoftware.com/ 292 | 5. http://www.lokigames.com/products/myth2/updates.php3 293 | 6. http://www.nvidia.com/ 294 | 7. http://earth.google.com/ 295 | 8. http://www.megastep.org/makeself/makeself.run 296 | 9. http://www.megastep.org/makeself/makeself.run 297 | 10. http://www.gnu.org/copyleft/gpl.html 298 | 11. http://www.megastep.org/makeself/makeself-2.1.5.run 299 | 12. http://cvs.icculus.org/ 300 | 13. http://www.icculus.org/loki_setup/ 301 | 14. http://www.unrealtournament2003.com/ 302 | 15. http://www.icculus.org/loki_setup/ 303 | 16. http://www.icculus.org/ 304 | 17. http://www.mmedia.is/~bre/programs/setup.sh/ 305 | 18. mailto:megastep@@megastep.org 306 | 19. https://bugzilla.icculus.org/ 307 | 20. mailto:megastep@@megastep.org 308 | -------------------------------------------------------------------------------- /makeself/makeself-header.sh: -------------------------------------------------------------------------------- 1 | cat << EOF > "$archname" 2 | #!/bin/sh 3 | # This script was generated using Makeself $MS_VERSION 4 | 5 | CRCsum="$CRCsum" 6 | MD5="$MD5sum" 7 | TMPROOT=\${TMPDIR:=/tmp} 8 | 9 | label="$LABEL" 10 | script="$SCRIPT" 11 | scriptargs="$SCRIPTARGS" 12 | targetdir="$archdirname" 13 | filesizes="$filesizes" 14 | keep=$KEEP 15 | 16 | print_cmd_arg="" 17 | if type printf > /dev/null; then 18 | print_cmd="printf" 19 | elif test -x /usr/ucb/echo; then 20 | print_cmd="/usr/ucb/echo" 21 | else 22 | print_cmd="echo" 23 | fi 24 | 25 | unset CDPATH 26 | 27 | MS_Printf() 28 | { 29 | \$print_cmd \$print_cmd_arg "\$1" 30 | } 31 | 32 | MS_Progress() 33 | { 34 | while read a; do 35 | MS_Printf . 36 | done 37 | } 38 | 39 | MS_diskspace() 40 | { 41 | ( 42 | if test -d /usr/xpg4/bin; then 43 | PATH=/usr/xpg4/bin:\$PATH 44 | fi 45 | df -kP "\$1" | tail -1 | awk '{print \$4}' 46 | ) 47 | } 48 | 49 | MS_dd() 50 | { 51 | blocks=\`expr \$3 / 1024\` 52 | bytes=\`expr \$3 % 1024\` 53 | dd if="\$1" ibs=\$2 skip=1 obs=1024 conv=sync 2> /dev/null | \\ 54 | { test \$blocks -gt 0 && dd ibs=1024 obs=1024 count=\$blocks ; \\ 55 | test \$bytes -gt 0 && dd ibs=1 obs=1024 count=\$bytes ; } 2> /dev/null 56 | } 57 | 58 | MS_Help() 59 | { 60 | cat << EOH >&2 61 | Makeself version $MS_VERSION 62 | 1) Getting help or info about \$0 : 63 | \$0 --help Print this message 64 | \$0 --info Print embedded info : title, default target directory, embedded script ... 65 | \$0 --lsm Print embedded lsm entry (or no LSM) 66 | \$0 --list Print the list of files in the archive 67 | \$0 --check Checks integrity of the archive 68 | 69 | 2) Running \$0 : 70 | \$0 [options] [--] [additional arguments to embedded script] 71 | with following options (in that order) 72 | --confirm Ask before running embedded script 73 | --noexec Do not run embedded script 74 | --keep Do not erase target directory after running 75 | the embedded script 76 | --nox11 Do not spawn an xterm 77 | --nochown Do not give the extracted files to the current user 78 | --target NewDirectory Extract in NewDirectory 79 | --tar arg1 [arg2 ...] Access the contents of the archive through the tar command 80 | -- Following arguments will be passed to the embedded script 81 | EOH 82 | } 83 | 84 | MS_Check() 85 | { 86 | OLD_PATH="\$PATH" 87 | PATH=\${GUESS_MD5_PATH:-"\$OLD_PATH:/bin:/usr/bin:/sbin:/usr/local/ssl/bin:/usr/local/bin:/opt/openssl/bin"} 88 | MD5_ARG="" 89 | MD5_PATH=\`exec <&- 2>&-; which md5sum || type md5sum\` 90 | test -x "\$MD5_PATH" || MD5_PATH=\`exec <&- 2>&-; which md5 || type md5\` 91 | test -x "\$MD5_PATH" || MD5_PATH=\`exec <&- 2>&-; which digest || type digest\` 92 | PATH="\$OLD_PATH" 93 | 94 | MS_Printf "Verifying archive integrity..." 95 | offset=\`head -n $SKIP "\$1" | wc -c | tr -d " "\` 96 | verb=\$2 97 | i=1 98 | for s in \$filesizes 99 | do 100 | crc=\`echo \$CRCsum | cut -d" " -f\$i\` 101 | if test -x "\$MD5_PATH"; then 102 | if test \`basename \$MD5_PATH\` = digest; then 103 | MD5_ARG="-a md5" 104 | fi 105 | md5=\`echo \$MD5 | cut -d" " -f\$i\` 106 | if test \$md5 = "00000000000000000000000000000000"; then 107 | test x\$verb = xy && echo " \$1 does not contain an embedded MD5 checksum." >&2 108 | else 109 | md5sum=\`MS_dd "\$1" \$offset \$s | eval "\$MD5_PATH \$MD5_ARG" | cut -b-32\`; 110 | if test "\$md5sum" != "\$md5"; then 111 | echo "Error in MD5 checksums: \$md5sum is different from \$md5" >&2 112 | exit 2 113 | else 114 | test x\$verb = xy && MS_Printf " MD5 checksums are OK." >&2 115 | fi 116 | crc="0000000000"; verb=n 117 | fi 118 | fi 119 | if test \$crc = "0000000000"; then 120 | test x\$verb = xy && echo " \$1 does not contain a CRC checksum." >&2 121 | else 122 | sum1=\`MS_dd "\$1" \$offset \$s | CMD_ENV=xpg4 cksum | awk '{print \$1}'\` 123 | if test "\$sum1" = "\$crc"; then 124 | test x\$verb = xy && MS_Printf " CRC checksums are OK." >&2 125 | else 126 | echo "Error in checksums: \$sum1 is different from \$crc" 127 | exit 2; 128 | fi 129 | fi 130 | i=\`expr \$i + 1\` 131 | offset=\`expr \$offset + \$s\` 132 | done 133 | echo " All good." 134 | } 135 | 136 | UnTAR() 137 | { 138 | tar \$1vf - 2>&1 || { echo Extraction failed. > /dev/tty; kill -15 \$$; } 139 | } 140 | 141 | finish=true 142 | xterm_loop= 143 | nox11=$NOX11 144 | copy=$COPY 145 | ownership=y 146 | verbose=n 147 | 148 | initargs="\$@" 149 | 150 | while true 151 | do 152 | case "\$1" in 153 | -h | --help) 154 | MS_Help 155 | exit 0 156 | ;; 157 | --info) 158 | echo Identification: "\$label" 159 | echo Target directory: "\$targetdir" 160 | echo Uncompressed size: $USIZE KB 161 | echo Compression: $COMPRESS 162 | echo Date of packaging: $DATE 163 | echo Built with Makeself version $MS_VERSION on $OSTYPE 164 | echo Build command was: "$MS_COMMAND" 165 | if test x\$script != x; then 166 | echo Script run after extraction: 167 | echo " " \$script \$scriptargs 168 | fi 169 | if test x"$copy" = xcopy; then 170 | echo "Archive will copy itself to a temporary location" 171 | fi 172 | if test x"$KEEP" = xy; then 173 | echo "directory \$targetdir is permanent" 174 | else 175 | echo "\$targetdir will be removed after extraction" 176 | fi 177 | exit 0 178 | ;; 179 | --dumpconf) 180 | echo LABEL=\"\$label\" 181 | echo SCRIPT=\"\$script\" 182 | echo SCRIPTARGS=\"\$scriptargs\" 183 | echo archdirname=\"$archdirname\" 184 | echo KEEP=$KEEP 185 | echo COMPRESS=$COMPRESS 186 | echo filesizes=\"\$filesizes\" 187 | echo CRCsum=\"\$CRCsum\" 188 | echo MD5sum=\"\$MD5\" 189 | echo OLDUSIZE=$USIZE 190 | echo OLDSKIP=`expr $SKIP + 1` 191 | exit 0 192 | ;; 193 | --lsm) 194 | cat << EOLSM 195 | EOF 196 | eval "$LSM_CMD" 197 | cat << EOF >> "$archname" 198 | EOLSM 199 | exit 0 200 | ;; 201 | --list) 202 | echo Target directory: \$targetdir 203 | offset=\`head -n $SKIP "\$0" | wc -c | tr -d " "\` 204 | for s in \$filesizes 205 | do 206 | MS_dd "\$0" \$offset \$s | eval "$GUNZIP_CMD" | UnTAR t 207 | offset=\`expr \$offset + \$s\` 208 | done 209 | exit 0 210 | ;; 211 | --tar) 212 | offset=\`head -n $SKIP "\$0" | wc -c | tr -d " "\` 213 | arg1="\$2" 214 | shift 2 215 | for s in \$filesizes 216 | do 217 | MS_dd "\$0" \$offset \$s | eval "$GUNZIP_CMD" | tar "\$arg1" - \$* 218 | offset=\`expr \$offset + \$s\` 219 | done 220 | exit 0 221 | ;; 222 | --check) 223 | MS_Check "\$0" y 224 | exit 0 225 | ;; 226 | --confirm) 227 | verbose=y 228 | shift 229 | ;; 230 | --noexec) 231 | script="" 232 | shift 233 | ;; 234 | --keep) 235 | keep=y 236 | shift 237 | ;; 238 | --target) 239 | keep=y 240 | targetdir=\${2:-.} 241 | shift 2 242 | ;; 243 | --nox11) 244 | nox11=y 245 | shift 246 | ;; 247 | --nochown) 248 | ownership=n 249 | shift 250 | ;; 251 | --xwin) 252 | finish="echo Press Return to close this window...; read junk" 253 | xterm_loop=1 254 | shift 255 | ;; 256 | --phase2) 257 | copy=phase2 258 | shift 259 | ;; 260 | --) 261 | shift 262 | break ;; 263 | -*) 264 | echo Unrecognized flag : "\$1" >&2 265 | MS_Help 266 | exit 1 267 | ;; 268 | *) 269 | break ;; 270 | esac 271 | done 272 | 273 | case "\$copy" in 274 | copy) 275 | tmpdir=\$TMPROOT/makeself.\$RANDOM.\`date +"%y%m%d%H%M%S"\`.\$\$ 276 | mkdir "\$tmpdir" || { 277 | echo "Could not create temporary directory \$tmpdir" >&2 278 | exit 1 279 | } 280 | SCRIPT_COPY="\$tmpdir/makeself" 281 | echo "Copying to a temporary location..." >&2 282 | cp "\$0" "\$SCRIPT_COPY" 283 | chmod +x "\$SCRIPT_COPY" 284 | cd "\$TMPROOT" 285 | exec "\$SCRIPT_COPY" --phase2 -- \$initargs 286 | ;; 287 | phase2) 288 | finish="\$finish ; rm -rf \`dirname \$0\`" 289 | ;; 290 | esac 291 | 292 | if test "\$nox11" = "n"; then 293 | if tty -s; then # Do we have a terminal? 294 | : 295 | else 296 | if test x"\$DISPLAY" != x -a x"\$xterm_loop" = x; then # No, but do we have X? 297 | if xset q > /dev/null 2>&1; then # Check for valid DISPLAY variable 298 | GUESS_XTERMS="xterm rxvt dtterm eterm Eterm kvt konsole aterm" 299 | for a in \$GUESS_XTERMS; do 300 | if type \$a >/dev/null 2>&1; then 301 | XTERM=\$a 302 | break 303 | fi 304 | done 305 | chmod a+x \$0 || echo Please add execution rights on \$0 306 | if test \`echo "\$0" | cut -c1\` = "/"; then # Spawn a terminal! 307 | exec \$XTERM -title "\$label" -e "\$0" --xwin "\$initargs" 308 | else 309 | exec \$XTERM -title "\$label" -e "./\$0" --xwin "\$initargs" 310 | fi 311 | fi 312 | fi 313 | fi 314 | fi 315 | 316 | if test "\$targetdir" = "."; then 317 | tmpdir="." 318 | else 319 | if test "\$keep" = y; then 320 | echo "Creating directory \$targetdir" >&2 321 | tmpdir="\$targetdir" 322 | dashp="-p" 323 | else 324 | tmpdir="\$TMPROOT/selfgz\$\$\$RANDOM" 325 | dashp="" 326 | fi 327 | mkdir \$dashp \$tmpdir || { 328 | echo 'Cannot create target directory' \$tmpdir >&2 329 | echo 'You should try option --target OtherDirectory' >&2 330 | eval \$finish 331 | exit 1 332 | } 333 | fi 334 | 335 | location="\`pwd\`" 336 | if test x\$SETUP_NOCHECK != x1; then 337 | MS_Check "\$0" 338 | fi 339 | offset=\`head -n $SKIP "\$0" | wc -c | tr -d " "\` 340 | 341 | if test x"\$verbose" = xy; then 342 | MS_Printf "About to extract $USIZE KB in \$tmpdir ... Proceed ? [Y/n] " 343 | read yn 344 | if test x"\$yn" = xn; then 345 | eval \$finish; exit 1 346 | fi 347 | fi 348 | 349 | MS_Printf "Uncompressing \$label" 350 | res=3 351 | if test "\$keep" = n; then 352 | trap 'echo Signal caught, cleaning up >&2; cd \$TMPROOT; /bin/rm -rf \$tmpdir; eval \$finish; exit 15' 1 2 3 15 353 | fi 354 | 355 | leftspace=\`MS_diskspace \$tmpdir\` 356 | if test \$leftspace -lt $USIZE; then 357 | echo 358 | echo "Not enough space left in "\`dirname \$tmpdir\`" (\$leftspace KB) to decompress \$0 ($USIZE KB)" >&2 359 | if test "\$keep" = n; then 360 | echo "Consider setting TMPDIR to a directory with more free space." 361 | fi 362 | eval \$finish; exit 1 363 | fi 364 | 365 | for s in \$filesizes 366 | do 367 | if MS_dd "\$0" \$offset \$s | eval "$GUNZIP_CMD" | ( cd "\$tmpdir"; UnTAR x ) | MS_Progress; then 368 | if test x"\$ownership" = xy; then 369 | (PATH=/usr/xpg4/bin:\$PATH; cd "\$tmpdir"; chown -R \`id -u\` .; chgrp -R \`id -g\` .) 370 | fi 371 | else 372 | echo 373 | echo "Unable to decompress \$0" >&2 374 | eval \$finish; exit 1 375 | fi 376 | offset=\`expr \$offset + \$s\` 377 | done 378 | echo 379 | 380 | cd "\$tmpdir" 381 | res=0 382 | if test x"\$script" != x; then 383 | if test x"\$verbose" = xy; then 384 | MS_Printf "OK to execute: \$script \$scriptargs \$* ? [Y/n] " 385 | read yn 386 | if test x"\$yn" = x -o x"\$yn" = xy -o x"\$yn" = xY; then 387 | eval \$script \$scriptargs \$*; res=\$?; 388 | fi 389 | else 390 | eval \$script \$scriptargs \$*; res=\$? 391 | fi 392 | if test \$res -ne 0; then 393 | test x"\$verbose" = xy && echo "The program '\$script' returned an error code (\$res)" >&2 394 | fi 395 | fi 396 | if test "\$keep" = n; then 397 | cd \$TMPROOT 398 | /bin/rm -rf \$tmpdir 399 | fi 400 | eval \$finish; exit \$res 401 | EOF 402 | -------------------------------------------------------------------------------- /makeself/makeself.1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/harry-cpp/monodevelop-run-installer/eebbc5b1667ee927668d615959212ca5e7d8bfbe/makeself/makeself.1 -------------------------------------------------------------------------------- /makeself/makeself.lsm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/harry-cpp/monodevelop-run-installer/eebbc5b1667ee927668d615959212ca5e7d8bfbe/makeself/makeself.lsm -------------------------------------------------------------------------------- /makeself/makeself.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/harry-cpp/monodevelop-run-installer/eebbc5b1667ee927668d615959212ca5e7d8bfbe/makeself/makeself.sh -------------------------------------------------------------------------------- /src/mdtool-stable: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | mono /opt/MonoDevelop/bin/mdtool.exe "$@" 3 | -------------------------------------------------------------------------------- /src/monodevelop-stable: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Few needed hacks for MonoDevelop 4 | export UBUNTU_MENUPROXY=0 5 | export LIBOVERLAY_SCROLLBAR=0 6 | export OXYGEN_DISABLE_INNER_SHADOWS_HACK=1 7 | 8 | # Run MonoDevelop 9 | mono /opt/MonoDevelop/bin/MonoDevelop.exe "$@" 10 | -------------------------------------------------------------------------------- /src/monodevelop-stable-uninstall: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Check installation priviledge 4 | if [ "$(id -u)" != "0" ]; then 5 | echo "Please make sure you are running this installer with sudo or as root." 1>&2 6 | exit 1 7 | fi 8 | 9 | # Uninstall 10 | rm -rf /opt/MonoDevelop 11 | rm /usr/bin/monodevelop-stable 12 | rm /usr/bin/mdtool-stable 13 | rm /usr/bin/monodevelop-stable-uninstall 14 | rm /usr/share/applications/monodevelop-stable.desktop 15 | rm /usr/share/icons/hicolor/scalable/apps/monodevelop-stable.svg 16 | 17 | rm -f /usr/lib/libgit2-e8b8948.so 18 | rm -f /usr/lib/x86_64-linux-gnu/libgit2-e8b8948.so 19 | -------------------------------------------------------------------------------- /src/monodevelop-stable.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 21 | 23 | 26 | 30 | 34 | 35 | 44 | 47 | 51 | 52 | 55 | 59 | 60 | 62 | 66 | 70 | 74 | 75 | 85 | 92 | 96 | 97 | 108 | 119 | 126 | 130 | 131 | 134 | 138 | 142 | 143 | 154 | 155 | 176 | 178 | 179 | 181 | image/svg+xml 182 | 184 | 185 | 186 | 187 | 191 | 198 | 201 | 205 | 215 | 225 | 235 | 236 | 239 | 244 | 254 | 262 | 270 | 278 | 282 | 291 | 292 | 293 | 300 | 301 | 302 | 303 | -------------------------------------------------------------------------------- /src/postinstall.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | LIBGIT2="$(ldconfig -p | grep -m 1 libgit2.so | sed 's/.\+=> //')" 4 | 5 | # Check installation priviledge 6 | if [ "$(id -u)" != "0" ]; then 7 | echo "Please make sure you are running this installer with sudo or as root." 1>&2 8 | exit 1 9 | fi 10 | 11 | # Check for libgit2 12 | if [ ! -f "$LIBGIT2" ] 13 | then 14 | echo "libgit2 not found, please install it and re run the installer." 15 | exit 1 16 | fi 17 | 18 | # Check previous versions 19 | if type "monodevelop-stable-uninstall" > /dev/null 2>&1 20 | then 21 | echo "Previous version detected, uninstalling..." 22 | monodevelop-stable-uninstall 23 | fi 24 | 25 | echo "Copying MonoDevelop binaries..." 26 | cp -rf MonoDevelop/ /opt/MonoDevelop/ 27 | 28 | echo "Adding libgit2-e8b8948.so symlink to fix VersionControl Addin..." 29 | ln -s "$LIBGIT2" "/opt/MonoDevelop/AddIns/VersionControl/libgit2-e8b8948.so" 30 | 31 | echo "Adding terminal commands..." 32 | cp monodevelop-stable /usr/bin/monodevelop-stable 33 | chmod +x /usr/bin/monodevelop-stable 34 | cp mdtool-stable /usr/bin/mdtool-stable 35 | chmod +x /usr/bin/mdtool-stable 36 | cp monodevelop-stable-uninstall /usr/bin/monodevelop-stable-uninstall 37 | chmod +x /usr/bin/monodevelop-stable-uninstall 38 | 39 | echo "Adding application icon..." 40 | mkdir -p /usr/share/icons/hicolor/scalable/apps 41 | cp monodevelop-stable.svg /usr/share/icons/hicolor/scalable/apps/monodevelop-stable.svg 42 | gtk-update-icon-cache /usr/share/icons/hicolor/ -f &> /dev/null 43 | 44 | echo "Adding application launcher..." 45 | cat > /usr/share/applications/monodevelop-stable.desktop <<'endmsg' 46 | [Desktop Entry] 47 | Version=1.0 48 | Encoding=UTF-8 49 | Name=MonoDevelop Stable 50 | GenericName=Integrated Development Environment 51 | GenericName[ja]=統合開発環境 52 | Comment=Develop .NET applications in an Integrated Development Environment 53 | Exec=monodevelop-stable %F 54 | TryExec=monodevelop-stable 55 | Icon=monodevelop-stable 56 | StartupNotify=true 57 | Terminal=false 58 | Type=Application 59 | MimeType=text/x-csharp;application/x-mds;application/x-mdp;application/x-cmbx;application/x-prjx;application/x-csproj;application/x-vbproj;application/x-sln;application/x-aspx; 60 | Categories=GNOME;GTK;Development;IDE; 61 | X-GNOME-Bugzilla-Bugzilla=Ximian 62 | X-GNOME-Bugzilla-Product=MonoDevelop 63 | X-GNOME-Bugzilla-OtherBinaries=monodevelop 64 | endmsg 65 | --------------------------------------------------------------------------------