Redistribution and use in source and binary forms, with or without
15 | modification, are permitted provided that the following conditions are
16 | met:
17 |
18 |
19 |
Redistributions of source code must retain the above copyright
20 | notice, this list of conditions and the following disclaimer.
21 |
22 |
Redistributions in binary form must reproduce the above copyright
23 | notice, this list of conditions and the following disclaimer in
24 | the documentation and/or other materials provided with the
25 | distribution.
26 |
27 |
28 |
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
29 | ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
30 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
31 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
32 | HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
33 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
34 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
35 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
36 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
37 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
38 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
39 |
40 |
41 |
42 |
43 |
44 |
Third party libraries
45 |
46 | The software relies on third party libraries. Such libraries have their own license:
47 |
3 | Qt LICENSE AGREEMENT
4 | Agreement version 3.9.2
5 |
6 | This License Agreement for Qt ("Agreement") is a legal agreement between Digia Finland Ltd ("Digia"), with its registered office at Valimotie 21, FI-00380 Helsinki, Finland and you (either an individual or a legal entity) ("Licensee") for the Licensed Software (as defined below).
7 |
8 | 1. DEFINITIONS
9 | "Affiliate" of a Party shall mean an entity (i) which is directly or indirectly controlling such Party; (ii) which is under the same direct or indirect ownership or control as such Party; or (iii) which is directly or indirectly owned or controlled by such Party. For these purposes, an entity shall be treated as being controlled by another if that other entity has fifty percent (50 %) or more of the votes in such entity, is able to direct its affairs and/or to control the composition of its board of directors or equivalent body.
10 | "Applications" shall mean Licensee's software products created using the Licensed Software which may include portions of the Licensed Software.
11 | "Designated User(s)" shall mean the employee(s) of Licensee acting within the scope of their employment or Licensee's consultant(s) or contractor(s) acting within the scope of their services for Licensee and on behalf of Licensee.
12 | "Initial Term" shall mean the period of time one (1) year from the later of (a) the Effective Date; or (b) the date the Licensed Software was initially delivered to Licensee by Digia. If no specific Effective Date is set forth in the Agreement, the Effective Date shall be deemed to be the date the Licensed Software was initially delivered to Licensee.
13 | "License Certificate" shall mean the document accompanying the Licensed Software which specifies the modules which are licensed under the Agreement, Platforms and Designated Users.
14 | "Licensed Software" shall mean the computer software, "online" or electronic documentation, associated media and printed materials, including the source code, example programs and the documentation delivered by Digia to Licensee in conjunction with this Agreement. Licensed Software does not include Third Party Software (as defined in Section 7).
15 | "Modified Software" shall mean modifications made to the Licensed Software by Licensee.
16 | "Nokia" shall mean Digia Plc, a corporation incorporated under the laws of Finland, having its registered office at PO box 226, 00045 Nokia Group, Finland (visiting address Keilalahdentie 4, 02150 Espoo, Finland) and registered with the Finnish Trade Register under business ID 0112038-9 and acting on behalf of its respective Affiliates.
17 | "Party or Parties" shall mean Licensee and/or Digia.
18 | "Platforms" shall mean the operating systems listed in the License Certificate.
19 | "Redistributables" shall mean the portions of the Licensed Software set forth in Appendix 1, Section 1 that may be distributed with or as part of Applications in object code form.
20 | "Support" shall mean standard developer support that is provided by Digia to assist eligible Designated Users in using the Licensed Software in accordance with its established standard support procedures listed at: http://qt.digia.com/
21 | "Updates" shall mean a release or version of the Licensed Software containing enhancement, new features, bug fixes, error corrections and other changes that are generally made available to users of the Licensed Software that have contracted for maintenance and support.
22 |
23 | 2. OWNERSHIP
24 | The Licensed Software is protected by copyright laws and international copyright treaties, as well as other intellectual property laws and treaties. The Licensed Software is licensed, not sold.
25 | To the extent Licensee submits bug fixes or error corrections, including information related thereto, Licensee hereby grants to Digia a sublicensable, irrevocable, perpetual, worldwide, non-exclusive, royalty-free and fully paid-up copyright and trade secret license to reproduce, adapt, translate, modify, and prepare derivative works of, publicly display, publicly perform, sublicense, make available and distribute error corrections and bug fixes, including derivative works thereof. All Digia's and/or its licensors' trademarks, service marks, trade names, logos or other words or symbols are and shall remain the exclusive property of Digia or its licensors respectively.
26 |
27 | 3. MODULES
28 | Some of the files in the Licensed Software have been grouped into modules. These files contain specific notices defining the module of which they are a part. The modules licensed to Licensee are specified in the License Certificate. The terms of the License Certificate are considered part of the Agreement. In the event of inconsistency or conflict between the language of this Agreement and the License Certificate, the provisions of this Agreement shall govern.
29 |
30 | 4. VALIDITY OF THE AGREEMENT
31 | By installing, copying, or otherwise using the Licensed Software, Licensee agrees to be bound by the terms of this Agreement. If Licensee does not agree to the terms of this Agreement, Licensee may not install, copy, or otherwise use the Licensed Software. In addition, by installing, copying, or otherwise using any Updates or other components of the Licensed Software that Licensee receives separately as part of the Licensed Software, Licensee agrees to be bound by any additional license terms that accompany such Updates, if any. If Licensee does not agree to the additional license terms that accompany such Updates, Licensee may not install, copy, or otherwise use such Updates.
32 | Upon Licensee's acceptance of the terms and conditions of this Agreement, Digia grants Licensee the right to use the Licensed Software in the manner provided below.
33 |
34 | 5. LICENSES
35 | 5.1 Using, modifying and copying
36 | Digia grants to Licensee a non-exclusive, non-transferable, perpetual license to use, modify and copy the Licensed Software for the Designated User(s) specified in the License Certificate for the sole purposes of designing, developing, and testing Application(s).
37 | Licensee may install copies of the Licensed Software on an unlimited number of computers provided that only the Designated Users use the Licensed Software. Licensee may at any time designate another Designated User to replace a then-current Designated User by notifying Digia, provided that a) the then-current Designated User has not been designated as a replacement during the last six (6) months; and b) there is no more than the specified number of Designated Users at any given time.
38 |
39 | 5.2 Redistribution
40 | a) Digia grants Licensee a non-exclusive, royalty-free right to reproduce and distribute the object code form of Redistributables for execution on the specified Platforms. Copies of Redistributables may only be distributed with and for the sole purpose of executing Applications permitted under this Agreement that Licensee has created using the Licensed Software. Under no circumstances may any copies of Redistributables be distributed separately. This Agreement does not give Licensee any rights to distribute any of the parts of the Licensed Software listed in Appendix 1, Section 2, neither as a whole nor as parts or snippets of code.
41 | b) Licensee may not distribute, transfer, assign or otherwise dispose of Applications and/or Redistributables, in binary/compiled form, or in any other form, if such action is part of a joint software and hardware distribution, except as provided by a separate runtime distribution license with Digia or one of its authorized distributors. A joint hardware and software distribution shall be defined as either:
42 | (i) distribution of a hardware device where, in its final end user configuration, the main user interface of the device is provided by Application(s) created by Licensee or others, using the Licensed Software, and depends on the Licensed Software or any Qt or Qt-based software product; or
43 | (ii) distribution of the Licensed Software with a device designed to facilitate the installation of the Licensed Software onto the same device where the main user interface of such device is provided by Application(s) created by Licensee or others, using the Licensed Software or any Qt or a Qt-based product, and depends on the Licensed Software.
44 |
45 | 5.3 Further Requirements
46 | It is expressly acknowledged and understood by Licensee, that Licensee is strictly prohibited from using Licensed Software for creation of mobile phones or tablet computers targeted for consumer end users.
47 | The aforementioned shall not prohibit Licensee from using Licensed Software for the purpose of creating of applications for any devices, including mobile phone and tablet computers.
48 | Notwithstanding anything contrary to this Agreement, it is expressly acknowledged and understood by Licensee, that Nokia shall hereby be named as a third party beneficiary under this Agreement with respect to this Section 5.3. Therefore, Nokia shall have the same rights as Digia under this Agreement with respect to this Section 5.3, and shall be entitled to exercise such rights independent from Digia.
49 | The licenses granted in this Section 5 by Digia to Licensee and Licensee Affiliates are subject to Licensee and Licensee Affiliate's compliance with Section 8 of this Agreement.
50 | 6. VERIFICATION
51 | Digia or a certified auditor on Digia's behalf, may, upon its reasonable request and at its expense, audit Licensee with respect to the use of the Licensed Software. Such audit may be conducted by mail, electronic means or through an in-person visit to Licensee's place of business. Any such in-person audit shall be conducted during regular business hours at Licensee's facilities and shall not unreasonably interfere with Licensee's business activities. Digia shall not remove, copy, or redistribute any electronic material during the course of an audit. If an audit reveals that Licensee is using the Licensed Software in a way that is in material violation of the terms of the Agreement, then Licensee shall pay Digia's reasonable costs of conducting the audit. In the case of a material violation, Licensee agrees to pay Digia any amounts owing that are attributable to the unauthorized use. In the alternative, Digia reserves the right, at Digia's sole option, to terminate the licenses for the Licensed Software.
52 |
53 | 7. THIRD PARTY SOFTWARE
54 | The Licensed Software may provide links to third party libraries or code (collectively "Third Party Software") to implement various functions. Third Party Software does not comprise part of the Licensed Software. In some cases, access to Third Party Software may be included along with the Licensed Software delivery as a convenience for development and testing only. Such source code and libraries may be listed in the ".../src/3rdparty" source tree delivered with the Licensed Software or documented in the Licensed Software where the Third Party Software is used, as may be amended from time to time, do not comprise the Licensed Software. Licensee acknowledges (1) that some part of Third Party Software may require additional licensing of copyright and patents from the owners of such, and (2) that distribution of any of the Licensed Software referencing any portion of a Third Party Software may require appropriate licensing from such third parties.
55 |
56 | 8. CONDITIONS FOR CREATING APPLICATIONS AND DISTRIBUTING REDISTRIBUTABLES
57 | The licenses granted in this Agreement for Licensee to create Applications and distribute them and the Redistributables (if any) to Licensee's customers is subject to all of the following conditions: (i) all copies of the Applications which Licensee creates must bear a valid copyright notice, either Licensee's own or the copyright notice that appears on the Licensed Software; (ii) Licensee may not remove or alter any copyright, trademark or other proprietary rights notice contained in any portion of the Licensed Software, including but not limited to the About Boxes in "Qt Assistant" and "Qt Linguist" as defined in Appendix 1; (iii) Redistributables, if any, shall be licensed to Licensee's customer "as is"; (iv) Licensee shall indemnify and hold Digia, its Affiliates, contractors, licensors, and suppliers, harmless from and against any claims or liabilities arising out of the use, reproduction or distribution of Applications; (v) Applications must be developed using a licensed, registered copy of the Licensed Software; (vi) Applications must add primary and substantial functionality to the Licensed Software; (vii) Applications may not pass on functionality which in any way makes it possible for others to create software with the Licensed Software, however Licensee may use the Licensed Software's scripting and QML ("Qt Quick") functionality solely in order to enable scripting, themes and styles that augment the functionality and appearance of the Application(s) without adding primary and substantial functionality to the Application(s); (viii) Applications may not compete with the Licensed Software; (ix) Licensee may not use Digia's or any of its suppliers' names, logos, or trademarks to market Application(s), except to state that Application was developed using the Licensed Software.
58 | NOTE: The Open Source Editions of Qt products and the Qt, Qtopia and Qt Extended versions licensed by Digia and previously licensed by Nokia and Trolltech (collectively referred to as "Open- source Qt Products") are licensed under the terms of the GNU Lesser General Public License version 2.1 ("LGPL") and/or the GNU General Public License versions 2.0 and 3.0 ("GPL") (as applicable) and not under this Agreement. If Licensee, or another third party, has, at any time, developed all (or any portions of) the Application(s) using a version of one of these Open-source Qt Products licensed under the LGPL or the GPL, Licensee may not combine such development work with the Licensed Software and must license such Application(s) (or any portions derived there from) under the terms of the GNU Lesser General Public License version 2.1 (Qt only) or GNU General Public License version 2.0 (Qt, Qtopia and Qt Extended) or version 3 (Qt only) copies of which are located at http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html, http://www.fsf.org/licensing/licenses/info/GPLv2.html, and http://www.gnu.org/copyleft/gpl.html.
59 |
60 | 9. LIMITED WARRANTY AND WARRANTY DISCLAIMER
61 | Digia hereby represents and warrants with respect to the Licensed Software that it has the power and authority to grant the rights and licenses granted to Licensee under this Agreement. Except as set forth above, the Licensed Software is licensed to Licensee "as is". To the maximum extent permitted by applicable law, Digia on behalf of itself, suppliers, and licensors disclaims all warranties and conditions, either express or implied, including, but not limited to, implied warranties of merchantability, fitness for a particular purpose, title and non-infringement with regard to the Licensed Software.
62 |
63 | 10. LIMITATION OF LIABILITY
64 | If, Digia's warranty disclaimer notwithstanding, Digia is held liable to Licensee, whether in contract, tort or any other legal theory, based on the Licensed Software, Digia's entire liability to Licensee and Licensee's exclusive remedy shall be, at Digia's option, either (A) return of the price Licensee paid for the Licensed Software, or (B) repair or replacement of the Licensed Software, provided Licensee returns to Digia all copies of the Licensed Software as originally delivered to Licensee. Digia shall not under any circumstances be liable to Licensee based on failure of the Licensed Software if the failure resulted from accident, abuse or misapplication, nor shall Digia under any circumstances be liable for special damages, punitive or exemplary damages, damages for loss of profits or interruption of business or for loss or corruption of data. Any award of damages from Digia to Licensee shall not exceed the total amount Licensee has paid to Digia in connection with this Agreement.
65 |
66 | 11. SUPPORT AND UPDATES
67 | Licensee shall be eligible to receive Support and Updates during the Initial Term, in accordance with Digia's then current policies and procedures, if any. Such policies and procedures may be changed from time to time. Following the Initial Term, Digia shall no longer make the Licensed Software available to Licensee unless Licensee purchases additional Support and Updates according to this Section 11 below.
68 | Licensee may purchase additional Support and Updates following the Initial Term at Digia's terms and conditions applicable at the time of renewal.
69 |
70 | 12. CONFIDENTIALITY
71 | Each party acknowledges that during the Initial Term of this Agreement it shall have access to information about the other party's business, business methods, business plans, customers, business relations, technology, and other information, including the terms of this Agreement, that is confidential and of great value to the other party, and the value of which would be significantly reduced if disclosed to third parties (the "Confidential Information"). Accordingly, when a party (the "Receiving Party") receives Confidential Information from another party (the "Disclosing Party"), the Receiving Party shall, and shall obligate its employees and agents and employees and agents of its affiliates to: (i) maintain the Confidential Information in strict confidence; (ii) not disclose the Confidential Information to a third party without the Disclosing Party's prior written approval; and (iii) not, directly or indirectly, use the Confidential Information for any purpose other than for exercising its rights and fulfilling its responsibilities pursuant to this Agreement. Each party shall take reasonable measures to protect the Confidential Information of the other party, which measures shall not be less than the measures taken by such party to protect its own confidential and proprietary information.
72 | "Confidential Information" shall not include information that (a) is or becomes generally known to the public through no act or omission of the Receiving Party; (b) was in the Receiving Party's lawful possession prior to the disclosure hereunder and was not subject to limitations on disclosure or use; (c) is developed by employees of the Receiving Party or other persons working for the Receiving Party who have not had access to the Confidential Information of the Disclosing Party, as proven by the written records of the Receiving Party or by persons who have not had access to the Confidential Information of the Disclosing Party as proven by the written records of the Receiving Party; (d) is lawfully disclosed to the Receiving Party without restrictions, by a third party not under an obligation of confidentiality; or (e) the Receiving Party is legally compelled to disclose the information, in which case the Receiving Party shall assert the privileged and confidential nature of the information and cooperate fully with the Disclosing Party to protect against and prevent disclosure of any Confidential Information and to limit the scope of disclosure and the dissemination of disclosed Confidential Information by all legally available means.
73 | The obligations of the Receiving Party under this Section shall continue during the Initial Term and for a period of five (5) years after expiration or termination of this Agreement. To the extent that the terms of the Non-Disclosure Agreement between Digia and Licensee conflict with the terms of this Section 12, this Section 12 shall be controlling over the terms of the Non-Disclosure Agreement.
74 |
75 | 13. GENERAL PROVISIONS
76 | 13.1 Marketing
77 | Digia may include Licensee's company name and logo in a publicly available list of Digia customers and in its public communications.
78 |
79 | 13.2 No Assignment
80 | Licensee shall not be entitled to assign or transfer all or any of its rights, benefits and obligations under this Agreement without the prior written consent of Digia, which shall not be unreasonably withheld. Digia shall be entitled to assign or transfer any of its rights, benefits or obligations under this Agreement on an unrestricted basis.
81 |
82 | 13.3 Termination
83 | Digia may terminate the Agreement at any time immediately upon written notice by Digia to Licensee if Licensee breaches this Agreement.
84 | Either party shall have the right to terminate this Agreement immediately upon written notice in the event that the other party becomes insolvent, files for any form of bankruptcy, makes any assignment for the benefit of creditors, has a receiver, administrative receiver or officer appointed over the whole or a substantial part of its assets, ceases to conduct business, or an act equivalent to any of the above occurs under the laws of the jurisdiction of the other party.
85 | Upon termination of this Agreement, Licensee shall return to Digia all copies of Licensed Software that were supplied by Digia. All other copies of Licensed Software in the possession or control of Licensee must be erased or destroyed. An officer of Licensee must promptly deliver to Digia a written confirmation that this has occurred.
86 |
87 | 13.4 Surviving Sections
88 | Any terms and conditions that by their nature or otherwise reasonably should survive a cancellation or termination of this Agreement shall also be deemed to survive. Such terms and conditions include, but are not limited to the following Sections: 2, 5.1, 6, 7, 8(iv), 10, 12, 13.5, 13.6, 13.9, 13.10 and 13.11 of this Agreement. Notwithstanding the foregoing, Section 5.1 shall not survive if the Agreement is terminated for material breach.
89 |
90 | 13.5 Entire Agreement
91 | This Agreement constitutes the complete agreement between the parties and supersedes all prior or contemporaneous discussions, representations, and proposals, written or oral, with respect to the subject matters discussed herein, with the exception of the non-disclosure agreement executed by the parties in connection with this Agreement ("Non-Disclosure Agreement"), if any, shall be subject to Section 12. No modification of this Agreement shall be effective unless contained in a writing executed by an authorized representative of each party. No term or condition contained in Licensee's purchase order shall apply unless expressly accepted by Digia in writing. If any provision of the Agreement is found void or unenforceable, the remainder shall remain valid and enforceable according to its terms. If any remedy provided is determined to have failed for its essential purpose, all limitations of liability and exclusions of damages set forth in this Agreement shall remain in effect.
92 |
93 | 13.6 Payment and Taxes
94 | If credit has been extended to Licensee by Digia, all payments under this Agreement are due within thirty (30) days of the date Digia mails its invoice to Licensee. If Digia has not extended credit to Licensee, Licensee shall be required to make payment concurrent with the delivery of the Licensed Software by Digia. All amounts payable are gross amounts but exclusive of any value added tax, use tax, sales tax or similar tax. Licensee shall be entitled to withhold from payments any applicable withholding taxes and comply with all applicable tax and employment legislation. Each party shall pay all taxes (including, but not limited to, taxes based upon its income) or levies imposed on it under applicable laws, regulations and tax treaties as a result of this Agreement and any payments made hereunder (including those required to be withheld or deducted from payments). Each party shall furnish evidence of such paid taxes as is sufficient to enable the other party to obtain any credits available to it, including original withholding tax certificates.
95 |
96 | 13.7 Force Majeure
97 | Neither party shall be liable to the other for any delay or non-performance of its obligations hereunder other than the obligation of paying the license fees in the event and to the extent that such delay or non-performance is due to an event of Force Majeure (as defined below). If any event of Force Majeure results in a delay or non-performance of a party for a period of three (3) months or longer, then either party shall have the right to terminate this Agreement with immediate effect without any liability (except for the obligations of payment arising prior to the event of Force Majeure) towards the other party. A "Force Majeure" event shall mean an act of God, terrorist attack or other catastrophic event of nature that prevents either party for fulfilling its obligations under this Agreement.
98 |
99 | 13.8 Notices
100 | Any notice given by one party to the other shall be deemed properly given and deemed received if specifically acknowledged by the receiving party in writing or when successfully delivered to the recipient by hand, fax, or special courier during normal business hours on a business day to the addresses specified below. Each communication and document made or delivered by one party to the other party pursuant to this Agreement shall be in the English language or accompanied by a translation thereof.
101 |
102 | Notices to Digia shall be given to:
103 | Digia Finland Ltd
104 | Attn: Qt / Legal
105 | Valimotie 21
106 | FI-00380 Helsinki
107 | Finland
108 | Fax: +358 10 313 3700
109 |
110 | 13.9 Export Control
111 | Licensee acknowledges that the Licensed Software may be subject to export control restrictions of various countries. Licensee shall fully comply with all applicable export license restrictions and requirements as well as with all laws and regulations relating to the importation of the Licensed Software and/or Modified Software and/or Applications and shall procure all necessary governmental authorizations, including without limitation, all necessary licenses, approvals, permissions or consents, where necessary for the re-exportation of the Licensed Software, Modified Software or Applications.
112 |
113 | 13.10 Governing Law and Legal Venue
114 | This Agreement shall be construed and interpreted in accordance with the laws of Finland, excluding its choice of law provisions. Any disputes, controversy or claim arising out of or relating to this Agreement, or the breach, termination or validity thereof shall be shall be finally settled by arbitration in accordance with the Arbitration Rules of the Central Chamber of Commerce of Finland. The arbitration tribunal shall consist of one (1), or if either Party so requires, of three (3), arbitrators. The award shall be final and binding and enforceable in any court of competent jurisdiction. The arbitration shall be held in Helsinki, Finland and the process shall be conducted in the English language.
115 |
116 | 13.11 No Implied License
117 | There are no implied licenses or other implied rights granted under this Agreement, and all rights, save for those expressly granted hereunder, shall remain with Digia and its licensors. In addition, no licenses or immunities are granted to the combination of the Licensed Software and/or Modified Software, as applicable, with any other software or hardware not delivered by Digia under this Agreement.
118 |
119 |
120 |
121 | Appendix 1
122 |
123 | 1. Parts of the Licensed Software that are permitted for distribution ("Redistributables"):
124 | - The Licensed Software's main and plug-in libraries in object code form
125 | - The Licensed Software's configuration tool ("qtconfig")
126 | - The Licensed Software's help tool in object code/executable form ("Qt Assistant")
127 | - The Licensed Software's internationalization tools in object code/executable form ("Qt Linguist", "lupdate", "lrelease")
128 | - The Licensed Software's designer tool ("Qt Designer")
129 | - The Licensed Software's IDE tool ("Qt Creator")
130 | - The Licensed Software's QML ("Qt Quick") launcher tool in object code/executable form
131 |
132 |
133 | 2. Parts of the Licensed Software that are not permitted for distribution include, but are not limited to:
134 | - The Licensed Software's source code and header files
135 | - The Licensed Software's documentation
136 | - The Licensed Software's tool for writing makefiles ("qmake")
137 | - The Licensed Software's Meta Object Compiler ("moc")
138 | - The Licensed Software's User Interface Compiler ("uic" or in the case of Qt Jambi: "juic")
139 | - The Licensed Software's Resource Compiler ("rcc")
140 | - The Licensed Software's generator (only in the case of Qt Jambi if applicable)
141 | - The Licensed Software's Qt SDK and its components
142 |
143 | QT COMMERCIAL LICENSE AGREEMENT
144 |
145 |
146 | DIGIA FINLAND LTD | VALIMOTIE 21 | FI-00380 HELSINKI FINLAND | TEL +358 (0) 10
147 | 313 3000 | FAX +358 (0) 10 313 3700
148 | PLACE OF REGISTERED OFFICE: HELSINKI | VAT REG. | BUSINESS ID 1091248-4 |
149 | WWW.DIGIA.COM
150 |
12 | Copyright (c) 2002-2024 MediaArea.net SARL. All rights reserved.
13 |
14 |
15 | Redistribution and use in source and binary forms, with or without modification,
16 | are permitted provided that the following conditions are met:
17 |
18 |
19 |
Redistributions of source code must retain the above copyright notice,
20 | this list of conditions and the following disclaimer.
21 |
Redistributions in binary form must reproduce the above copyright notice,
22 | this list of conditions and the following disclaimer in the documentation and/or
23 | other materials provided with the distribution.
24 |
25 |
26 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS”
27 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
28 | OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
29 | COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
30 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
31 | GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
32 | AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
33 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
34 | OF THE POSSIBILITY OF SUCH DAMAGE.
35 |
36 |
37 |
38 |
39 |
40 |
Alternate license for redistributions of the library in binary form:
41 | Redistributions in binary form must reproduce the following sentence (including the link to the website) in the documentation and/or other materials provided with the distribution.
42 | This product uses MediaInfo library, Copyright (c) 2002-2024 MediaArea.net SARL.
43 |
44 |
45 |
46 |
47 |
Third party libraries
48 |
49 | The software relies on third party libraries. Such libraries have their own license:
50 |
").arg(UTIL_VERSION_STR, MUtils::Version::lib_build_date().toString(Qt::ISODate), MUtils::Version::lib_build_time().toString(Qt::ISODate));
682 | text += QString("This program is free software: you can redistribute it and/or modify ");
683 | text += QString("it under the terms of the GNU General Public License <http://www.gnu.org/>. ");
684 | text += QString("Note that this program is distributed with ABSOLUTELY NO WARRANTY.
");
685 | text += QString("Please check the web-site at %1 for updates !!! ").arg(QString::fromLatin1(LINK_MULDER));
686 | text += QString(" ");
687 | text += QString("This application is powered by MediaInfo v%1 ").arg(MI_VERSION_STR);
688 | text += QString("Free and OpenSource tool for displaying technical information about media files. ");
689 | text += QString("Copyright (c) 2002-%1 MediaArea.net SARL. All rights reserved.
").arg(QString().sprintf("%04d", year));
690 | text += QString("Redistribution and use is permitted according to the (2-Clause) BSD License. ");
691 | text += QString("Please see %1 for more information. ").arg(QString::fromLatin1(LINK_MEDIAINFO));
692 |
693 | QMessageBox aboutBox(this);
694 | aboutBox.setIconPixmap(QIcon(":/res/logo.png").pixmap(64,64));
695 | aboutBox.setWindowTitle(tr("About..."));
696 | aboutBox.setText(text.replace("-", "−"));
697 | if(QPushButton *btn = aboutBox.addButton(tr("About Qt"), QMessageBox::NoRole))
698 | {
699 | btn->setIcon(QIcon(":/res/ico_qt.png"));
700 | btn->setMinimumWidth(120);
701 | }
702 | if(QPushButton *btn = aboutBox.addButton(tr("Discard"), QMessageBox::NoRole))
703 | {
704 | btn->setIcon(QIcon(":/res/ico_discard.png"));
705 | btn->setMinimumWidth(104);
706 | aboutBox.setEscapeButton(btn);
707 | }
708 |
709 | m_status = APP_STATUS_BLOCKED;
710 |
711 | forever
712 | {
713 | const int ret = aboutBox.exec();
714 | if(ret == 0)
715 | {
716 | QMessageBox::aboutQt(this);
717 | continue;
718 | }
719 | break;
720 | }
721 |
722 | m_status = APP_STATUS_IDLE;
723 | }
724 |
725 | void CMainWindow::updateSize(void)
726 | {
727 | if(const QWidget *const viewPort = ui->textBrowser->viewport())
728 | {
729 | m_floatingLabel->setGeometry(viewPort->x(), viewPort->y(), viewPort->width(), viewPort->height());
730 | }
731 | }
732 |
733 | void CMainWindow::received(const quint32 &command, const QString &message)
734 | {
735 | if((command == IPC::COMMAND_PING) || (command == IPC::COMMAND_OPEN))
736 | {
737 | MUtils::GUI::bring_to_front(this);
738 | }
739 |
740 | if((command == IPC::COMMAND_OPEN) && (!message.isEmpty()))
741 | {
742 | qDebug("Received file: %s", message.toUtf8().constData());
743 |
744 | if((m_status != APP_STATUS_IDLE) && (m_status != APP_STATUS_AWAITING))
745 | {
746 | qWarning("Cannot process files at this time!\n");
747 | return;
748 | }
749 |
750 | const QString absPath = QFileInfo(QDir::fromNativeSeparators(message)).absoluteFilePath();
751 | QFileInfo fileInfo(absPath);
752 | if(fileInfo.exists() && fileInfo.isFile())
753 | {
754 | m_pendingFiles << fileInfo.canonicalFilePath();
755 | if(m_status == APP_STATUS_IDLE)
756 | {
757 | m_status = APP_STATUS_AWAITING;
758 | QTimer::singleShot(FILE_RECEIVE_DELAY, this, SLOT(analyzeFiles()));
759 | }
760 | }
761 | }
762 | }
763 |
764 | ////////////////////////////////////////////////////////////
765 | // PRIVATE FUNCTIONS
766 | ////////////////////////////////////////////////////////////
767 |
768 | static const char *const HASH_SEED = "+A`~}vPe9'~#n+c1Wq/MPo;1XwY\\;Pb.";
769 |
770 | static bool VALIDATE_MEDIAINFO(QFile *const handle, const char *const expected_checksum)
771 | {
772 | if(!handle->reset())
773 | {
774 | qWarning("Failed to rewind file to be checked!\n");
775 | return false;
776 | }
777 |
778 | //Compute Hash
779 | QScopedPointer hash(MUtils::Hash::create(MUtils::Hash::HASH_BLAKE2_512, HASH_SEED));
780 | hash->update(handle->readAll());
781 | const QByteArray checksum = hash->digest(true);
782 |
783 | //Compare Hash
784 | if(qstricmp(checksum.constData(), expected_checksum) != 0)
785 | {
786 | qWarning("MediaInfo binary is corrupted!");
787 | qWarning("Expected checksum: %s", expected_checksum);
788 | qWarning("Computed checksum: %s\n", checksum.constData());
789 | return false;
790 | }
791 |
792 | qDebug("MediaInfo checksum: %s\n", checksum.constData());
793 | return true;
794 | }
795 |
796 | QPair CMainWindow::getMediaInfoArch(void)
797 | {
798 | const MUtils::CPUFetaures::cpu_info_t cpu_features = MUtils::CPUFetaures::detect();
799 | for (size_t i = 0; MEDIAINFO_BIN[i].arch; ++i)
800 | {
801 | if (cpu_features.x64 || (!MEDIAINFO_BIN[i].require_x64))
802 | {
803 | if ((HAVE_SSE2(cpu_features) || (!MEDIAINFO_BIN[i].require_sse2)) && (HAVE_AVX2(cpu_features) || (!MEDIAINFO_BIN[i].require_avx2)))
804 | {
805 | return qMakePair(QString::fromLatin1(MEDIAINFO_BIN[i].arch), MEDIAINFO_BIN[i].checksum);
806 | }
807 | }
808 | }
809 | MUTILS_THROW("This is not supposed to happen!");
810 | }
811 |
812 | void CMainWindow::selfTest(void)
813 | {
814 | qWarning("[Self-Test]");
815 | for (size_t i = 0; MEDIAINFO_BIN[i].arch; ++i)
816 | {
817 | qWarning("%s: %s", MEDIAINFO_BIN[i].arch, MEDIAINFO_BIN[i].checksum);
818 | const QResource mediaInfoRes(QString(":/res/bin/MediaInfo.%1.exe").arg(QString::fromLatin1(MEDIAINFO_BIN[i].arch)));
819 | if (mediaInfoRes.isValid())
820 | {
821 | QScopedPointer hash(MUtils::Hash::create(MUtils::Hash::HASH_BLAKE2_512, HASH_SEED));
822 | hash->update(mediaInfoRes.data(), mediaInfoRes.size());
823 | const QByteArray checksum = hash->digest(true);
824 | if (qstricmp(MEDIAINFO_BIN[i].checksum, checksum.constData()) != 0)
825 | {
826 | qWarning("\nComputed checksum: %s\n", checksum.constData());
827 | qFatal("MediaInfo checksum mismatch detected!");
828 | }
829 | }
830 | else
831 | {
832 | qFatal("MediaInfo resource could not be found!");
833 | }
834 | }
835 | qWarning("Success.\n");
836 | }
837 |
838 | QString CMainWindow::getMediaInfoPath(void)
839 | {
840 | //Detect MediaInfo arch
841 | const QPair arch = getMediaInfoArch();
842 | const QString fileName(QString("MediaInfo.%1.exe").arg(arch.first));
843 |
844 | //Setup resource
845 | const QResource mediaInfoRes(QString(":/res/bin/%1").arg(fileName));
846 | if((!mediaInfoRes.isValid()) || (!mediaInfoRes.data()))
847 | {
848 | qFatal("MediaInfo resource could not be initialized!");
849 | return QString();
850 | }
851 |
852 | //Validate file content, if already extracted
853 | if(!m_mediaInfoHandle.isNull())
854 | {
855 | if(VALIDATE_MEDIAINFO(m_mediaInfoHandle.data(), arch.second))
856 | {
857 | return m_mediaInfoHandle->fileName();
858 | }
859 | m_mediaInfoHandle->close();
860 | m_mediaInfoHandle.reset();
861 | }
862 |
863 | //Try to re-use file from cache first
864 | const QFileInfo cachedFile(QString("%1/cache/%2").arg(m_baseFolder, fileName));
865 | if (cachedFile.exists() && cachedFile.isFile())
866 | {
867 | qDebug("MediaInfo binary exists in cache, re-using existing binary...\n");
868 | m_mediaInfoHandle.reset(new QFile(cachedFile.absoluteFilePath()));
869 | qDebug("MediaInfo path is:\n%s\n", m_mediaInfoHandle->fileName().toUtf8().constData());
870 | if (m_mediaInfoHandle->open(QIODevice::ReadOnly))
871 | {
872 | if (VALIDATE_MEDIAINFO(m_mediaInfoHandle.data(), arch.second))
873 | {
874 | return m_mediaInfoHandle->fileName();
875 | }
876 | }
877 | else
878 | {
879 | qWarning("Failed to open MediaInfo binary for reading!\n");
880 | }
881 | m_mediaInfoHandle->close();
882 | m_mediaInfoHandle.reset();
883 | }
884 |
885 | //Generate temporary file name
886 | qDebug("MediaInfo binary not existing yet, going to extract now...\n");
887 | const QString filePath = MUtils::make_unique_file(m_tempFolder, "MediaInfo", arch.first + QLatin1String(".exe"));
888 | if (filePath.isEmpty())
889 | {
890 | qWarning("Failed to gemerate MediaInfo outout path!\n");
891 | return QString();
892 | }
893 |
894 | //Extract the MediaInfo binary now!
895 | m_mediaInfoHandle.reset(new QFile(filePath));
896 | if (m_mediaInfoHandle->open(QIODevice::ReadWrite | QIODevice::Truncate))
897 | {
898 | qDebug("MediaInfo path is:\n%s\n", MUTILS_UTF8(m_mediaInfoHandle->fileName()));
899 | const qint64 bytesWritten = m_mediaInfoHandle->write(reinterpret_cast(mediaInfoRes.data()), mediaInfoRes.size());
900 | m_mediaInfoHandle->close();
901 | if (bytesWritten != mediaInfoRes.size())
902 | {
903 | qWarning("Failed to write data to MediaInfo binary file!\n");
904 | m_mediaInfoHandle->remove();
905 | m_mediaInfoHandle.reset();
906 | return QString();
907 | }
908 | }
909 | else
910 | {
911 | qWarning("Failed to open MediaInfo binary for writing!\n");
912 | m_mediaInfoHandle.reset();
913 | return QString();
914 | }
915 |
916 | //Validate file's content, after it has been extracted
917 | if (m_mediaInfoHandle->open(QIODevice::ReadOnly))
918 | {
919 | if (VALIDATE_MEDIAINFO(m_mediaInfoHandle.data(), arch.second))
920 | {
921 | return m_mediaInfoHandle->fileName();
922 | }
923 | m_mediaInfoHandle->close();
924 | }
925 | else
926 | {
927 | qWarning("Failed to open MediaInfo binary for reading!\n");
928 | }
929 |
930 | m_mediaInfoHandle->remove();
931 | m_mediaInfoHandle.reset();
932 | return QString();
933 | }
934 |
935 | QStringList CMainWindow::escapeHtmlLines(const QStringList &strings)
936 | {
937 | QStringList output;
938 | for (QStringList::const_iterator iter = strings.constBegin(); iter != strings.constEnd(); ++iter)
939 | {
940 | output << Qt::escape(*iter);
941 | }
942 | return output;
943 | }
944 |
945 | QString CMainWindow::reformatXml(const QString &input)
946 | {
947 | QString output;
948 | QXmlStreamReader reader(input);
949 | QXmlStreamWriter writer(&output);
950 | writer.setAutoFormatting(true);
951 | while (!reader.atEnd())
952 | {
953 | reader.readNext();
954 | if (!reader.isWhitespace())
955 | {
956 | writer.writeCurrentToken(reader);
957 | }
958 | }
959 | return output;
960 | }
961 |
--------------------------------------------------------------------------------
/src/MainWindow.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////
2 | // MediaInfoXP
3 | // Copyright (C) 2004-2024 LoRd_MuldeR
4 | //
5 | // This program is free software; you can redistribute it and/or modify
6 | // it under the terms of the GNU General Public License as published by
7 | // the Free Software Foundation; either version 2 of the License, or
8 | // (at your option) any later version.
9 | //
10 | // This program is distributed in the hope that it will be useful,
11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | // GNU General Public License for more details.
14 | //
15 | // You should have received a copy of the GNU General Public License along
16 | // with this program; if not, write to the Free Software Foundation, Inc.,
17 | // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18 | //
19 | // http://www.gnu.org/licenses/gpl-2.0.txt
20 | ///////////////////////////////////////////////////////////////////////////////
21 |
22 | #pragma once
23 |
24 | #include
25 | #include
26 |
27 | //UIC forward declartion
28 | namespace Ui
29 | {
30 | class MainWindow;
31 | }
32 | namespace MUtils
33 | {
34 | class IPCChannel;
35 | }
36 | class QProcess;
37 | class QLabel;
38 | class QFile;
39 | class IPCReceiveThread;
40 |
41 | //MainWindow class
42 | class CMainWindow: public QMainWindow
43 | {
44 | Q_OBJECT
45 |
46 | public:
47 | CMainWindow(const QString &baseFolder, const QString &tempFolder, MUtils::IPCChannel *const ipc, QWidget *parent = 0);
48 | ~CMainWindow(void);
49 |
50 | private slots:
51 | void analyzeFiles(void);
52 | void analyzeNextFile(void);
53 | void analyzeButtonClicked(void);
54 | void saveButtonClicked(void);
55 | void copyToClipboardButtonClicked(void);
56 | void clearButtonClicked(void);
57 | void outputAvailable(void);
58 | void processFinished(void);
59 | void linkTriggered(void);
60 | void showAboutScreen(void);
61 | void updateSize(void);
62 | void initShellExtension(void);
63 | void updateShellExtension(bool checked);
64 | void updateLineWrapping(bool checked);
65 | void toggleOutputOption(bool checked);
66 | void received(const quint32 &command, const QString &message);
67 |
68 | protected:
69 | virtual void showEvent(QShowEvent *event);
70 | virtual void closeEvent(QCloseEvent *event);
71 | virtual void resizeEvent(QResizeEvent *event);
72 | virtual void dragEnterEvent(QDragEnterEvent *event);
73 | virtual void dropEvent(QDropEvent *event);
74 | virtual bool eventFilter(QObject *o, QEvent *e);
75 | virtual void keyPressEvent(QKeyEvent *e);
76 |
77 | private:
78 | enum
79 | {
80 | APP_STATUS_STARTING = 0,
81 | APP_STATUS_IDLE = 1,
82 | APP_STATUS_AWAITING = 2,
83 | APP_STATUS_WORKING = 3,
84 | APP_STATUS_BLOCKED = 4
85 | }
86 | status_t;
87 |
88 | Ui::MainWindow *ui; //for Qt UIC
89 |
90 | int m_status;
91 | const QString &m_baseFolder;
92 | const QString &m_tempFolder;
93 |
94 | QScopedPointer m_ipcThread;
95 | QScopedPointer m_mediaInfoHandle;
96 | QScopedPointer m_process;
97 | QScopedPointer m_floatingLabel;
98 | QStringList m_pendingFiles;
99 | QStringList m_outputLines;
100 |
101 | QPair getMediaInfoArch(void);
102 | void selfTest(void);
103 | QString getMediaInfoPath(void);
104 |
105 | static QStringList escapeHtmlLines(const QStringList &strings);
106 | static QString reformatXml(const QString &input);
107 | };
108 |
--------------------------------------------------------------------------------
/src/ShellExtension.cpp:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////
2 | // MediaInfoXP
3 | // Copyright (C) 2004-2024 LoRd_MuldeR
4 | //
5 | // This program is free software; you can redistribute it and/or modify
6 | // it under the terms of the GNU General Public License as published by
7 | // the Free Software Foundation; either version 2 of the License, or
8 | // (at your option) any later version.
9 | //
10 | // This program is distributed in the hope that it will be useful,
11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | // GNU General Public License for more details.
14 | //
15 | // You should have received a copy of the GNU General Public License along
16 | // with this program; if not, write to the Free Software Foundation, Inc.,
17 | // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18 | //
19 | // http://www.gnu.org/licenses/gpl-2.0.txt
20 | ///////////////////////////////////////////////////////////////////////////////
21 |
22 | #pragma once
23 |
24 | #include "ShellExtension.h"
25 |
26 | //MUtils
27 | #include "MUtils/Registry.h"
28 | #include "MUtils/OSSupport.h"
29 |
30 | //Qt
31 | #include
32 | #include
33 |
34 | #define MIXP_REGISTRY_KEY "Software\\Classes\\*\\shell\\MediaInfoXP"
35 | #define MIXP_REGISTRY_VAL "_shellExtEnabled"
36 |
37 | bool ShellExtension::getEnabled(void)
38 | {
39 | quint32 value = 0;
40 | if(MUtils::Registry::reg_value_read(MUtils::Registry::root_user, MIXP_REGISTRY_KEY, MIXP_REGISTRY_VAL, value))
41 | {
42 | return value;
43 | }
44 | return false;
45 | }
46 |
47 | bool ShellExtension::setEnabled(bool enabled)
48 | {
49 | if(enabled)
50 | {
51 | qDebug("Installing the shell extension...");
52 | if(MUtils::Registry::reg_value_write(MUtils::Registry::root_user, MIXP_REGISTRY_KEY, QString(), tr("Analyze file with MediaInfoXP")))
53 | {
54 | const QString appPath = QDir::toNativeSeparators(QApplication::applicationFilePath());
55 | const QString command = QString().sprintf("\"%ls\" --open=\"%%1\"", appPath.utf16());
56 | if(MUtils::Registry::reg_value_write(MUtils::Registry::root_user, MIXP_REGISTRY_KEY"\\command", QString(), command))
57 | {
58 | if(MUtils::Registry::reg_value_write(MUtils::Registry::root_user, MIXP_REGISTRY_KEY, MIXP_REGISTRY_VAL, 1))
59 | {
60 | qDebug("Success.\n");
61 | MUtils::OS::shell_change_notification();
62 | return true;
63 | }
64 | }
65 | }
66 | qWarning("Failed to install the shell extension!\n");
67 | MUtils::Registry::reg_key_delete(MUtils::Registry::root_user, MIXP_REGISTRY_KEY);
68 | return false;
69 | }
70 | else
71 | {
72 | qDebug("Un-installing the shell extension...");
73 | if(!MUtils::Registry::reg_key_delete(MUtils::Registry::root_user, MIXP_REGISTRY_KEY))
74 | {
75 | qWarning("Failed to un-install the shell extension!\n");
76 | return false;
77 | }
78 | qDebug("Success.\n");
79 | MUtils::OS::shell_change_notification();
80 | return true;
81 | }
82 | }
83 |
--------------------------------------------------------------------------------
/src/ShellExtension.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////
2 | // MediaInfoXP
3 | // Copyright (C) 2004-2024 LoRd_MuldeR
4 | //
5 | // This program is free software; you can redistribute it and/or modify
6 | // it under the terms of the GNU General Public License as published by
7 | // the Free Software Foundation; either version 2 of the License, or
8 | // (at your option) any later version.
9 | //
10 | // This program is distributed in the hope that it will be useful,
11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | // GNU General Public License for more details.
14 | //
15 | // You should have received a copy of the GNU General Public License along
16 | // with this program; if not, write to the Free Software Foundation, Inc.,
17 | // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18 | //
19 | // http://www.gnu.org/licenses/gpl-2.0.txt
20 | ///////////////////////////////////////////////////////////////////////////////
21 |
22 | #pragma once
23 |
24 | #include
25 |
26 | class ShellExtension : public QObject
27 | {
28 | public:
29 | static bool getEnabled(void);
30 | static bool setEnabled(bool enabled);
31 |
32 | private:
33 | ShellExtension(void) {}
34 | ~ShellExtension(void) {}
35 | };
36 |
--------------------------------------------------------------------------------
/src/Version.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////
2 | // MediaInfoXP
3 | // Copyright (C) 2004-2024 LoRd_MuldeR
4 | //
5 | // This program is free software; you can redistribute it and/or modify
6 | // it under the terms of the GNU General Public License as published by
7 | // the Free Software Foundation; either version 2 of the License, or
8 | // (at your option) any later version.
9 | //
10 | // This program is distributed in the hope that it will be useful,
11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | // GNU General Public License for more details.
14 | //
15 | // You should have received a copy of the GNU General Public License along
16 | // with this program; if not, write to the Free Software Foundation, Inc.,
17 | // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18 | //
19 | // http://www.gnu.org/licenses/gpl-2.0.txt
20 | ///////////////////////////////////////////////////////////////////////////////
21 |
22 | #pragma once
23 |
24 | #define MIXP_VERSION_MAJOR 2
25 | #define MIXP_VERSION_MINOR_HI 4
26 | #define MIXP_VERSION_MINOR_LO 7
27 | #define MIXP_VERSION_PATCH 0
28 |
--------------------------------------------------------------------------------
/z_build.bat:
--------------------------------------------------------------------------------
1 | @echo off
2 | REM ///////////////////////////////////////////////////////////////////////////
3 | REM // Set Paths
4 | REM ///////////////////////////////////////////////////////////////////////////
5 | set "MSVC_PATH=C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build"
6 |
7 | REM ###############################################
8 | REM # DO NOT MODIFY ANY LINES BELOW THIS LINE !!! #
9 | REM ###############################################
10 |
11 | REM ///////////////////////////////////////////////////////////////////////////
12 | REM // Setup environment
13 | REM ///////////////////////////////////////////////////////////////////////////
14 | if exist "%QTVC_PATH%\bin\qtvars.bat" ( call "%QTVC_PATH%\bin\qtvars.bat" )
15 | if exist "%QTVC_PATH%\bin\qtenv2.bat" ( call "%QTVC_PATH%\bin\qtenv2.bat" )
16 | call "%MSVC_PATH%\vcvarsall.bat" x86
17 |
18 | REM ///////////////////////////////////////////////////////////////////////////
19 | REM // Check environment
20 | REM ///////////////////////////////////////////////////////////////////////////
21 | if "%VCINSTALLDIR%"=="" (
22 | echo %%VCINSTALLDIR%% not specified. Please check your MSVC_PATH var!
23 | goto BuildError
24 | )
25 | if "%QTDIR%"=="" (
26 | echo %%QTDIR%% not specified. Please check your MSVC_PATH var!
27 | goto BuildError
28 | )
29 | if not exist "%VCToolsInstallDir%\bin\HostX86\x86\cl.exe" (
30 | echo C++ compiler not found. Please check your MSVC_PATH var!
31 | goto BuildError
32 | )
33 | if not exist "%QTDIR%\bin\moc.exe" (
34 | echo Qt meta compiler not found. Please check your QTDIR var!
35 | goto BuildError
36 | )
37 | if not exist "%QTDIR%\include\QtCore\qglobal.h" (
38 | echo %%QTDIR%% header files not found. Please check your QTDIR var!
39 | goto BuildError
40 | )
41 |
42 | REM ///////////////////////////////////////////////////////////////////////////
43 | REM // Get current date and time (in ISO format)
44 | REM ///////////////////////////////////////////////////////////////////////////
45 | set "ISO_DATE="
46 | set "ISO_TIME="
47 | if not exist "%~dp0\..\Prerequisites\MSYS\1.0\bin\date.exe" BuildError
48 | for /F "tokens=1,2 delims=:" %%a in ('"%~dp0\..\Prerequisites\MSYS\1.0\bin\date.exe" +ISODATE:%%Y-%%m-%%d') do (
49 | if "%%a"=="ISODATE" set "ISO_DATE=%%b"
50 | )
51 | for /F "tokens=1,2,3,4 delims=:" %%a in ('"%~dp0\..\Prerequisites\MSYS\1.0\bin\date.exe" +ISOTIME:%%T') do (
52 | if "%%a"=="ISOTIME" set "ISO_TIME=%%b:%%c:%%d"
53 | )
54 | if "%ISO_DATE%"=="" goto BuildError
55 | if "%ISO_TIME%"=="" goto BuildError
56 |
57 | REM ///////////////////////////////////////////////////////////////////////////
58 | REM // Build the binaries
59 | REM ///////////////////////////////////////////////////////////////////////////
60 | echo ---------------------------------------------------------------------
61 | echo BEGIN BUILD
62 | echo ---------------------------------------------------------------------
63 | MSBuild.exe /property:Configuration=release_static /property:Platform=Win32 /target:clean "%~dp0\MediaInfoXP.sln"
64 | if not "%ERRORLEVEL%"=="0" goto BuildError
65 | MSBuild.exe /property:Configuration=release_static /property:Platform=Win32 /target:rebuild "%~dp0\MediaInfoXP.sln"
66 | if not "%ERRORLEVEL%"=="0" goto BuildError
67 | MSBuild.exe /property:Configuration=release_static /property:Platform=Win32 /target:build "%~dp0\MediaInfoXP.sln"
68 | if not "%ERRORLEVEL%"=="0" goto BuildError
69 |
70 | REM ///////////////////////////////////////////////////////////////////////////
71 | REM // Copy base files
72 | REM ///////////////////////////////////////////////////////////////////////////
73 | echo ---------------------------------------------------------------------
74 | echo BEGIN PACKAGING
75 | echo ---------------------------------------------------------------------
76 | set "PACK_PATH=%TMP%\~%RANDOM%%RANDOM%.tmp"
77 | mkdir "%PACK_PATH%"
78 | copy "%~dp0\bin\Win32\Release_Static\*.exe" "%PACK_PATH%"
79 | copy "%~dp0\Copying.txt" "%PACK_PATH%"
80 | copy "%~dp0\doc\*.txt" "%PACK_PATH%"
81 | copy "%~dp0\doc\*.html" "%PACK_PATH%"
82 | copy "%~dp0\doc\*.svg" "%PACK_PATH%"
83 |
84 | REM ///////////////////////////////////////////////////////////////////////////
85 | REM // Compress
86 | REM ///////////////////////////////////////////////////////////////////////////
87 | ::"%~dp0\..\Prerequisites\UPX\upx.exe" --best "%PACK_PATH%\*.exe"
88 |
89 | REM ///////////////////////////////////////////////////////////////////////////
90 | REM // Attributes
91 | REM ///////////////////////////////////////////////////////////////////////////
92 | attrib +R "%PACK_PATH%\*.exe"
93 | attrib +R "%PACK_PATH%\*.html"
94 | attrib +R "%PACK_PATH%\*.txt"
95 | attrib +R "%PACK_PATH%\*.svg"
96 |
97 | REM ///////////////////////////////////////////////////////////////////////////
98 | REM // Generate outfile name
99 | REM ///////////////////////////////////////////////////////////////////////////
100 | set "OUT_NAME=MediaInfo-GUI.%ISO_DATE%"
101 | :CheckOutName
102 | if exist "%~dp0\out\%OUT_NAME%.zip" (
103 | set "OUT_NAME=%OUT_NAME%.new"
104 | goto CheckOutName
105 | )
106 |
107 | REM ///////////////////////////////////////////////////////////////////////////
108 | REM // Create version tag
109 | REM ///////////////////////////////////////////////////////////////////////////
110 | echo MediaInfoXP - Simple GUI for MediaInfo > "%~dp0\out\%OUT_NAME%.txt"
111 | echo Built %ISO_DATE%, %TIME% >> "%~dp0\out\%OUT_NAME%.txt"
112 | echo Copyright (C) 2004-2024 LoRd_MuldeR ^ >> "%~dp0\out\%OUT_NAME%.txt"
113 | echo. >> "%~dp0\out\%OUT_NAME%.txt"
114 | echo This program is free software; you can redistribute it and/or modify >> "%~dp0\out\%OUT_NAME%.txt"
115 | echo it under the terms of the GNU General Public License as published by >> "%~dp0\out\%OUT_NAME%.txt"
116 | echo the Free Software Foundation; either version 2 of the License, or >> "%~dp0\out\%OUT_NAME%.txt"
117 | echo (at your option) any later version. >> "%~dp0\out\%OUT_NAME%.txt"
118 | echo. >> "%~dp0\out\%OUT_NAME%.txt"
119 | echo ------------------------------------------------------------------->> "%~dp0\out\%OUT_NAME%.txt"
120 | echo. >> "%~dp0\out\%OUT_NAME%.txt"
121 | echo MediaInfo(Lib) is Copyright (C) 2002-2024 MediaArea.net SARL. >> "%~dp0\out\%OUT_NAME%.txt"
122 | echo. >> "%~dp0\out\%OUT_NAME%.txt"
123 | echo Redistribution and use in source and binary forms, with or without >> "%~dp0\out\%OUT_NAME%.txt"
124 | echo modification, are permitted according to the BSD-2-Clause license. >> "%~dp0\out\%OUT_NAME%.txt"
125 | echo. >> "%~dp0\out\%OUT_NAME%.txt"
126 |
127 | REM ///////////////////////////////////////////////////////////////////////////
128 | REM // Build the package
129 | REM ///////////////////////////////////////////////////////////////////////////
130 | pushd "%PACK_PATH%
131 | "%~dp0\..\Prerequisites\InfoZip\zip.exe" -9 -r -z "%~dp0\out\%OUT_NAME%.zip" "*.*" < "%~dp0\out\%OUT_NAME%.txt"
132 | popd
133 | rmdir /Q /S "%PACK_PATH%"
134 | attrib +R "%~dp0\out\%OUT_NAME%.zip"
135 | del "%~dp0\out\%OUT_NAME%.txt"
136 |
137 | REM ///////////////////////////////////////////////////////////////////////////
138 | REM // COMPLETE
139 | REM ///////////////////////////////////////////////////////////////////////////
140 | echo.
141 | echo Build completed.
142 | echo.
143 | pause
144 | goto:eof
145 |
146 | REM ///////////////////////////////////////////////////////////////////////////
147 | REM // FAILED
148 | REM ///////////////////////////////////////////////////////////////////////////
149 | :BuildError
150 | echo.
151 | echo Build has failed !!!
152 | echo.
153 | pause
154 |
--------------------------------------------------------------------------------