Issue #69 Add CSL2XSB to the installer

Uses PyInstaller to bundle together with a
self-contained minimal Python environment.
This commit is contained in:
Mat Sutcliffe
2020-08-09 01:45:16 +01:00
parent 2468f3cd81
commit c713294a07
4 changed files with 47 additions and 0 deletions

View File

@@ -176,6 +176,7 @@ jobs:
- name: Install dependencies
run: |
choco install jom --yes
pip install PyInstaller
- name: Checkout repository
uses: actions/checkout@v2
with:

View File

@@ -190,6 +190,18 @@ win32-g++ {
INSTALLS += vc_runtime_target
}
############### Install csl2xsb ###############
win32:swiftConfig(sims.xswiftbus) {
PYINST_BIN = $$system($$(SYSTEMROOT)\system32\where pyinstaller 2> nul)
!isEmpty(PYINST_BIN) {
CSL2XSB = $$shell_path($$SourceRoot/scripts/csl2xsb/CSL2XSB.py)
csl2xsb.path = $${PREFIX}/share/CSL2XSB
csl2xsb.extra = $$PYINST_BIN -y --distpath $$shell_path($${PREFIX}/share) --workpath $$shell_path($$(TEMP)) $$CSL2XSB
INSTALLS += csl2xsb
}
}
############### Install externals ##############
win32: externals_lib_target.path = $${PREFIX}/bin

View File

@@ -0,0 +1,31 @@
<component>
<name>csl2xsb</name>
<description>CSL2XSB script</description>
<canBeEdited>1</canBeEdited>
<detailedDescription>script needed to process X-CSL models for swift</detailedDescription>
<selected>1</selected>
<show>1</show>
<shouldPackRuleList>
<platformTest>
<type>windows</type>
</platformTest>
<compareText>
<logic>equals</logic>
<text>${architecture}</text>
<value>64</value>
</compareText>
</shouldPackRuleList>
<folderList>
<folder>
<description>share</description>
<destination>${installdir}/share</destination>
<name>share_windows</name>
<platforms>windows</platforms>
<distributionFileList>
<distributionFile>
<origin>../../dist/share/CSL2XSB</origin>
</distributionFile>
</distributionFileList>
</folder>
</folderList>
</component>

View File

@@ -22,6 +22,9 @@
<include>
<file>vcredist-x64.xml</file>
</include>
<include>
<file>csl2xsb.xml</file>
</include>
</componentList>
<functionDefinitionList>
<actionDefinition>