Skip to content

Commit

Permalink
qtcreator: Fix windows deployment.
Browse files Browse the repository at this point in the history
  • Loading branch information
kwagyeman committed Oct 11, 2024
1 parent 93ce646 commit 5f32d5f
Show file tree
Hide file tree
Showing 17 changed files with 1,704 additions and 12 deletions.
13 changes: 13 additions & 0 deletions dist/installer/ifw/config/config-linux.xml.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0"?>
<Installer>
<Name>OpenMV IDE</Name>
<Version>{version}</Version>
<Title>OpenMV IDE {display_version}</Title>
<Publisher>OpenMV, LLC</Publisher>
<ProductUrl>https://openmv.io</ProductUrl>

<MaintenanceToolName>OpenMVIDEUninstaller</MaintenanceToolName>
<TargetDir>@homeDir@/openmvide</TargetDir>
<AdminTargetDir>/opt/openmvide</AdminTargetDir>
<ControlScript>controlscript.qs</ControlScript>
</Installer>
13 changes: 13 additions & 0 deletions dist/installer/ifw/config/config-mac.xml.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0"?>
<Installer>
<Name>OpenMV IDE</Name>
<Version>{version}</Version>
<Title>OpenMV IDE {display_version}</Title>
<Publisher>OpenMV, LLC</Publisher>
<ProductUrl>https://openmv.io</ProductUrl>

<MaintenanceToolName>Uninstall OpenMV IDE</MaintenanceToolName>
<TargetDir>@homeDir@/Applications/OpenMV IDE</TargetDir>
<AllowSpaceInPath>true</AllowSpaceInPath>
<ControlScript>controlscript.qs</ControlScript>
</Installer>
13 changes: 13 additions & 0 deletions dist/installer/ifw/config/config-windows.xml.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0"?>
<Installer>
<Name>OpenMV IDE</Name>
<Version>{version}</Version>
<Title>OpenMV IDE {display_version}</Title>
<Publisher>OpenMV, LLC</Publisher>
<ProductUrl>https://openmv.io</ProductUrl>

<MaintenanceToolName>OpenMVIDEUninst</MaintenanceToolName>
<TargetDir>@ApplicationsDir@/OpenMV IDE</TargetDir>
<StartMenuDir>OpenMV IDE</StartMenuDir>
<ControlScript>controlscript.qs</ControlScript>
</Installer>
25 changes: 25 additions & 0 deletions dist/installer/ifw/config/controlscript.qs
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
function Controller() {
if (installer.isUninstaller()) {
installer.setDefaultPageVisible(QInstaller.Introduction, true);
installer.setDefaultPageVisible(QInstaller.ComponentSelection, false);
installer.setDefaultPageVisible(QInstaller.LicenseCheck, false);
}
}

Controller.prototype.IntroductionPageCallback = function() {
if (installer.isUninstaller()) {
var widget = gui.currentPageWidget();
if (widget != null) {
widget.findChild("PackageManagerRadioButton").visible = false;
widget.findChild("UpdaterRadioButton").visible = false;
widget.findChild("UninstallerRadioButton").visible = false;
}
}
}

Controller.prototype.LicenseAgreementPageCallback = function() {
var widget = gui.currentPageWidget();
if (widget != null) {
widget.AcceptLicenseRadioButton.checked = true;
}
}

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>LaunchQtCreatorCheckBoxForm</class>
<widget class="QWidget" name="LaunchQtCreatorCheckBoxForm">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>112</width>
<height>17</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<property name="margin">
<number>0</number>
</property>
<item>
<widget class="QCheckBox" name="launchQtCreatorCheckBox">
<property name="text">
<string>Launch OpenMV IDE</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
<property name="tristate">
<bool>false</bool>
</property>
</widget>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>LinuxWidget</class>
<widget class="QWidget" name="LinuxWidget">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>491</width>
<height>190</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>491</width>
<height>190</height>
</size>
</property>
<property name="windowTitle">
<string/>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QCheckBox" name="installLibrariesCheck">
<property name="text">
<string>Install Supporting Libraries (requires root)</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="installLibrariesLabel">
<property name="text">
<string>Automatically install supporting libraries that may be required for OpenMV IDE if not already installed (via your package manager).</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="udevRulesCheck">
<property name="text">
<string>Install Udev Rules (requires root)</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="udevRulesLabel">
<property name="text">
<string>Udev Rules may be required to connect to your OpenMV Cam and update your OpenMV Cam's firmware if not already installed.</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>122</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version="1.0"?>
<Package>
<DisplayName>OpenMV IDE Application</DisplayName>
<Description>The IDE of choice for OpenMV Cam Development.</Description>
<Version>{version}</Version>
<ReleaseDate>{date}</ReleaseDate>
<Name>io.openmv.openmvide.application</Name>
<Script>installscript.qs</Script>
<Licenses>
<License name="GNU GPL version 3 (with exception clauses)" file="LICENSE.GPL3-EXCEPT" />
</Licenses>
<ForcedInstallation>true</ForcedInstallation>
<Default>true</Default>
<AutoDependOn>io.openmv.openmvide</AutoDependOn>
<UserInterfaces>
<UserInterface>launchopenmvidecheckboxform.ui</UserInterface>
<UserInterface>linuxwidget.ui</UserInterface>
<UserInterface>targetwidget.ui</UserInterface>
</UserInterfaces>
</Package>
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>TargetWidget</class>
<widget class="QWidget" name="TargetWidget">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>491</width>
<height>190</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>491</width>
<height>190</height>
</size>
</property>
<property name="windowTitle">
<string></string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QLabel" name="description">
<property name="text">
<string>Please specify the directory where OpenMV IDE will be installed.</string>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QLineEdit" name="targetDirectory">
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="targetChooser">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>Browse...</string>
</property>
<property name="toolTip">
<string>Browse file system to choose the installation directory.</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QLabel" name="warning">
<property name="text">
<string></string>
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>122</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0"?>
<Package>
<DisplayName>OpenMV IDE</DisplayName>
<Description>Installs OpenMV IDE.</Description>
<Version>{version}</Version>
<ReleaseDate>{date}</ReleaseDate>
<Name>io.openmv.openmvide</Name>
</Package>
16 changes: 14 additions & 2 deletions scripts/deploy.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,14 @@
import common

debug_build = False
encoding = locale.getdefaultlocale()[1]
# OPENMV-DIFF #
# encoding = locale.getdefaultlocale()[1]
# OPENMV-DIFF #
try:
encoding = locale.getencoding()
except:
encoding = locale.getdefaultlocale()[1]
# OPENMV-DIFF #

def get_args():
parser = argparse.ArgumentParser(description='Deploy Qt Creator dependencies for packaging')
Expand Down Expand Up @@ -92,6 +99,9 @@ def is_debug(fpath):

def is_ignored_windows_file(use_debug, basepath, filename):
ignore_patterns = ['.lib', '.pdb', '.exp', '.ilk']
# OPENMV-DIFF #
ignore_patterns.append(".debug")
# OPENMV-DIFF #
if use_debug:
ignore_patterns.extend(['libEGL.dll', 'libGLESv2.dll'])
else:
Expand Down Expand Up @@ -498,7 +508,9 @@ def main():

deploy_binary('qtdiag', qtcreator_binary_path, qt_install)
deploy_binary('qtplugininfo', qtcreator_binary_path, qt_install)
deploy_binary('qsb', qtcreator_binary_path, qt_install)
# OPENMV-DIFF #
# deploy_binary('qsb', qtcreator_binary_path, qt_install)
# OPENMV-DIFF #
deploy_plugins(qtcreator_binary_path, qt_install)
deploy_imports(qtcreator_binary_path, qt_install)
deploy_translations(qtcreator_binary_path, qt_install)
Expand Down
Loading

0 comments on commit 5f32d5f

Please sign in to comment.