Continuing packaging with macos and windows, also fixing a few bugs in the process.
|
@ -122,7 +122,10 @@ def run():
|
||||||
if not engine.rootObjects():
|
if not engine.rootObjects():
|
||||||
print("No root object")
|
print("No root object")
|
||||||
exit(-1)
|
exit(-1)
|
||||||
app.exec_()
|
exit_code = app.exec_()
|
||||||
|
|
||||||
os.remove(tempfile)
|
os.remove(tempfile)
|
||||||
|
exit(exit_code)
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
run()
|
||||||
|
|
|
@ -29,7 +29,7 @@ D.Dialog {
|
||||||
|
|
||||||
Image {
|
Image {
|
||||||
id: logo
|
id: logo
|
||||||
source: "../logplotter.svg"
|
source: "../../logplotter.svg"
|
||||||
sourceSize.width: 64
|
sourceSize.width: 64
|
||||||
sourceSize.height: 64
|
sourceSize.height: 64
|
||||||
width: 64
|
width: 64
|
||||||
|
|
|
@ -438,7 +438,7 @@ ListView {
|
||||||
icon.name: modelData
|
icon.name: modelData
|
||||||
icon.width: 24
|
icon.width: 24
|
||||||
icon.height: 24
|
icon.height: 24
|
||||||
icon.color: 'white'//sysPalette.windowText
|
icon.color: sysPalette.windowText
|
||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
var newObj = Objects.createNewRegisteredObject(modelData)
|
var newObj = Objects.createNewRegisteredObject(modelData)
|
||||||
|
|
21
build-macosx.sh
Executable file
|
@ -0,0 +1,21 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
# Untested yet
|
||||||
|
rm $(find . -name "*.qmlc")
|
||||||
|
rm $(find . -name "*.pyc")
|
||||||
|
python3 -m pip install -U pyinstaller
|
||||||
|
iconutil -c icns "mac/logarithmplotter.iconset"
|
||||||
|
--add-data "AccountLogarithmPlotter/qml:qml" \
|
||||||
|
--add-data "LICENSE.md:." \
|
||||||
|
--add-data "README.md:." \
|
||||||
|
--exclude-module "FixTk" \
|
||||||
|
--exclude-module "tcl" \
|
||||||
|
--exclude-module "tk" \
|
||||||
|
--exclude-module "_tkinter" \
|
||||||
|
--exclude-module "tkinter" \
|
||||||
|
--exclude-module "Tkinter" \
|
||||||
|
--noconsole \
|
||||||
|
--noconfirm \
|
||||||
|
--icon=mac/logarithmplotter.icns \
|
||||||
|
--osx-bundle-identifier eu.ad5001.logarithmplotter \
|
||||||
|
-n LogarithmPlotter \
|
||||||
|
LogarithmPlotter/__init__.py
|
2
build-windows.bat
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
python -m pip install -U pyinstaller
|
||||||
|
pyinstaller --add-data "logplotter.svg;." --add-data "LogarithmPlotter/qml;qml" --noconsole LogarithmPlotter/__init__.py --icon=win/logarithmplotter.ico -n logarithmplotter
|
6
build-wine.sh
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# Giving pyinstaller another run
|
||||||
|
rm $(find . -name "*.qmlc")
|
||||||
|
rm $(find . -name "*.pyc")
|
||||||
|
wine python -m pip install -U pyinstaller
|
||||||
|
wine pyinstaller --add-data "logplotter.svg;." --add-data "LogarithmPlotter/qml;qml" --noconsole LogarithmPlotter/__init__.py --icon=win/logarithmplotter.ico -n logarithmplotter
|
|
@ -5,7 +5,7 @@ mkdir -p ~/.local/share/applications
|
||||||
sed "s+ROOTFOLDER+$APPROOT/+g" "$APPROOT/linux/logplotter.desktop" > ~/.local/share/applications/logarithmplotter.desktop
|
sed "s+ROOTFOLDER+$APPROOT/+g" "$APPROOT/linux/logplotter.desktop" > ~/.local/share/applications/logarithmplotter.desktop
|
||||||
echo "Installing mime-type..."
|
echo "Installing mime-type..."
|
||||||
mkdir -p ~/.local/share/applications
|
mkdir -p ~/.local/share/applications
|
||||||
sed "s+ROOTFOLDER+$APPROOT/+g" "$APPROOT/linux/x-logarithm-plotter-old.xml" > ~/.local/share/mime/packages/x-logarithm-plotter.xml
|
sed "s+ROOTFOLDER+$APPROOT/+g" "$APPROOT/linux/x-logarithm-plotter.xml" > ~/.local/share/mime/packages/x-logarithm-plotter.xml
|
||||||
mkdir -p ~/.local/share/icons/hicolor/scalable/mimetypes
|
mkdir -p ~/.local/share/icons/hicolor/scalable/mimetypes
|
||||||
cp "$APPROOT/logplotterfile.svg" ~/.local/share/icons/hicolor/scalable/mimetypes/application-x-logarithm-plotter.svg
|
cp "$APPROOT/logplotterfile.svg" ~/.local/share/icons/hicolor/scalable/mimetypes/application-x-logarithm-plotter.svg
|
||||||
update-mime-database ~/.local/share/mime/
|
update-mime-database ~/.local/share/mime/
|
||||||
|
|
|
@ -1,12 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
|
|
||||||
<mime-type xmlns="http://www.freedesktop.org/standards/shared-mime-info" type="application/x-logarithm-plotter">
|
|
||||||
<comment>Logarithm Plot File</comment>
|
|
||||||
<comment xml:lang="fr">Fichier Graphe Logarithmique</comment>
|
|
||||||
<icon name="ROOTFOLDER/logplotterfile.svg"/>
|
|
||||||
<glob-deleteall/>
|
|
||||||
<glob pattern="*.json"/>
|
|
||||||
<glob pattern="*.lgg"/>
|
|
||||||
<glob pattern="*.lpf"/>
|
|
||||||
</mime-type>
|
|
||||||
</mime-info>
|
|
BIN
mac/logarithmplotter.icns
Normal file
BIN
mac/logarithmplotter.iconset/icon_128x128.png
Normal file
After Width: | Height: | Size: 3 KiB |
BIN
mac/logarithmplotter.iconset/icon_16x16.png
Normal file
After Width: | Height: | Size: 631 B |
BIN
mac/logarithmplotter.iconset/icon_256x256.png
Normal file
After Width: | Height: | Size: 5.7 KiB |
BIN
mac/logarithmplotter.iconset/icon_32x32.png
Normal file
After Width: | Height: | Size: 995 B |
BIN
mac/logarithmplotter.iconset/icon_512x512.png
Normal file
After Width: | Height: | Size: 12 KiB |
4
package-windows.bat
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
cp win/* README.md LICENSE.md dist/logarithmplotter/
|
||||||
|
rem Creating installer
|
||||||
|
cd dist/logarithmplotter/
|
||||||
|
"C:\Program Files (x86)\NSIS\makensis" installer.nsi
|
6
package-wine.sh
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# Moving files
|
||||||
|
cp win/* README.md LICENSE.md dist/logarithmplotter/
|
||||||
|
# Creating installer
|
||||||
|
cd dist/logarithmplotter/
|
||||||
|
makensis installer.nsi
|
1
setup.py
|
@ -53,7 +53,6 @@ def package_data():
|
||||||
for d,folders,files in os.walk("LogarithmPlotter/qml"):
|
for d,folders,files in os.walk("LogarithmPlotter/qml"):
|
||||||
d = d[17:]
|
d = d[17:]
|
||||||
pkg_data += [os.path.join(d, f) for f in files]
|
pkg_data += [os.path.join(d, f) for f in files]
|
||||||
print("Pkgdata", pkg_data)
|
|
||||||
return pkg_data
|
return pkg_data
|
||||||
|
|
||||||
data_files = []
|
data_files = []
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
Unicode True
|
||||||
; Modern UI definitions
|
; Modern UI definitions
|
||||||
;--------------------------------
|
;--------------------------------
|
||||||
;Include Modern UI
|
;Include Modern UI
|
||||||
|
@ -8,10 +9,10 @@
|
||||||
;Definitions
|
;Definitions
|
||||||
!define APP_NAME "LogarithmPlotter"
|
!define APP_NAME "LogarithmPlotter"
|
||||||
!define DEV_NAME "Ad5001"
|
!define DEV_NAME "Ad5001"
|
||||||
!define WEBSITE "https://logarithmplotter.org"
|
!define WEBSITE "https://apps.ad5001.eu/LogarithmPlotter"
|
||||||
!define APP_VERSION "0.0.1.0"
|
!define APP_VERSION "0.0.1.0"
|
||||||
!define COPYRIGHT "Ad5001 © 2021"
|
!define COPYRIGHT "Ad5001 © 2021"
|
||||||
!define DESCRIPTION "Browse and use online services, free of account."
|
!define DESCRIPTION "Create graphs with logarithm scales."
|
||||||
|
|
||||||
!define REG_UNINSTALL "Software\Microsoft\Windows\CurrentVersion\Uninstall\LogarithmPlotter"
|
!define REG_UNINSTALL "Software\Microsoft\Windows\CurrentVersion\Uninstall\LogarithmPlotter"
|
||||||
|
|
||||||
|
@ -34,7 +35,7 @@ VIAddVersionKey "ProductName" "${APP_NAME}"
|
||||||
VIAddVersionKey "CompanyName" "${DEV_NAME}"
|
VIAddVersionKey "CompanyName" "${DEV_NAME}"
|
||||||
VIAddVersionKey "LegalCopyright" "${COPYRIGHT}"
|
VIAddVersionKey "LegalCopyright" "${COPYRIGHT}"
|
||||||
VIAddVersionKey "FileDescription" "${DESCRIPTION}"
|
VIAddVersionKey "FileDescription" "${DESCRIPTION}"
|
||||||
VIAddVersionKey "FileVersion" "${VERSION}"
|
VIAddVersionKey "FileVersion" "${APP_VERSION}"
|
||||||
|
|
||||||
|
|
||||||
;--------------------------------
|
;--------------------------------
|
||||||
|
@ -50,7 +51,7 @@ VIAddVersionKey "FileVersion" "${VERSION}"
|
||||||
;!insertmacro MUI_WELCOMEPAGE_TITLE_3LINES
|
;!insertmacro MUI_WELCOMEPAGE_TITLE_3LINES
|
||||||
|
|
||||||
;Icons
|
;Icons
|
||||||
Icon "logplotter.ico"
|
Icon "logarithmplotter.ico"
|
||||||
;!define MUI_HEADERIMAGE
|
;!define MUI_HEADERIMAGE
|
||||||
;!define MUI_HEADERIMAGE_BITMAP "logarithmplotter.bmp"
|
;!define MUI_HEADERIMAGE_BITMAP "logarithmplotter.bmp"
|
||||||
!define MUI_WELCOMEFINISHPAGE_BITMAP "inst_banner.bmp"
|
!define MUI_WELCOMEFINISHPAGE_BITMAP "inst_banner.bmp"
|
||||||
|
@ -167,7 +168,7 @@ Section ""
|
||||||
WriteRegStr HKLM ${REG_UNINSTALL} "UninstallString" "$INSTDIR\uninstall.exe"
|
WriteRegStr HKLM ${REG_UNINSTALL} "UninstallString" "$INSTDIR\uninstall.exe"
|
||||||
WriteRegStr HKLM ${REG_UNINSTALL} "QuietUninstallString" "$INSTDIR\uninstall.exe /S"
|
WriteRegStr HKLM ${REG_UNINSTALL} "QuietUninstallString" "$INSTDIR\uninstall.exe /S"
|
||||||
WriteRegStr HKLM ${REG_UNINSTALL} "DisplayIcon" "$INSTDIR\logarithmplotter.bmp"
|
WriteRegStr HKLM ${REG_UNINSTALL} "DisplayIcon" "$INSTDIR\logarithmplotter.bmp"
|
||||||
WriteRegStr HKLM ${REG_UNINSTALL} "DisplayVersion" "${VERSION}"
|
WriteRegStr HKLM ${REG_UNINSTALL} "DisplayVersion" "${APP_VERSION}"
|
||||||
WriteRegStr HKLM ${REG_UNINSTALL} "Readme" "$INSTDIR\README.md"
|
WriteRegStr HKLM ${REG_UNINSTALL} "Readme" "$INSTDIR\README.md"
|
||||||
WriteRegStr HKLM ${REG_UNINSTALL} "URLInfoAbout" "${WEBSITE}"
|
WriteRegStr HKLM ${REG_UNINSTALL} "URLInfoAbout" "${WEBSITE}"
|
||||||
|
|
||||||
|
|
Before Width: | Height: | Size: 181 KiB After Width: | Height: | Size: 181 KiB |