diff --git a/app/src/gambas3/.project b/app/src/gambas3/.project index dc3299bee..9a3615b60 100644 --- a/app/src/gambas3/.project +++ b/app/src/gambas3/.project @@ -39,13 +39,15 @@ Language=en CheckVariablePrefix=1 Maintainer=gambas Vendor=gambas -Address=gambas@users.sourceforge.net +Address=benoit.minisini@gambas-basic.org Url=www.endoftheinternet.com License=General Public License -PackageName=gambas3-3.13.90 +PackageName=gambas3-3.18.90 CreateEachDirectory=1 Packager=1 -Systems=debian +Systems=debian,appimage +SameDependencies=1 +SameFiles=1 ExtraAutoconfTest="\n" Menus=debian:"Applications/Programming" Groups=debian:"devel" diff --git a/app/src/gambas3/.src/Packager/FMakeInstall.class b/app/src/gambas3/.src/Packager/FMakeInstall.class index dbb0f7ae3..50bdb2524 100644 --- a/app/src/gambas3/.src/Packager/FMakeInstall.class +++ b/app/src/gambas3/.src/Packager/FMakeInstall.class @@ -116,9 +116,6 @@ Public Sub Form_Open() Project.SetEditorFont(txtDesktop) - 'InitSystemControls - InitSystems - If Project.Type <> Project.TYPE_NORMAL Then chkPrefix.Value = True chkPrefix.Enabled = False @@ -230,7 +227,7 @@ Private Sub InitSystemControls() Inc Application.Busy - Package.CheckProgram + Package.CheckPrograms() For Each hCtrl In panSystem.Children @@ -269,6 +266,8 @@ Private Sub InitSystemControls() txtMessage.Hide Endif + InitSystems + Dec Application.Busy End @@ -307,7 +306,7 @@ Private Function CheckSys(cCol As Collection) As Boolean Dim sSys As String For Each sSys In Project.Systems - If sSys = "autotools" Or If sSys = "self" Then Continue + If sSys = "autotools" Or If sSys = "self" Or If sSys = "appimage" Then Continue If Not cCol.Exist(sSys) Then Return True Next @@ -398,7 +397,7 @@ Public Sub wizInstall_BeforeChange() bEnabled = False For Each sSys In Project.Systems - If sSys <> "autotools" And If sSys <> "self" Then + If sSys <> "autotools" And If sSys <> "self" And If sSys <> "appimage" Then bEnabled = True Break Endif @@ -660,7 +659,7 @@ Private Sub FillComboWithSystems(hCombo As ComboBox) If hCombo = cmbDep Or If hCombo = cmbFile Then If sSys = "autotools" Then Continue Else If hCombo = cmbGroup Or If hCombo = cmbMenu Then - If sSys = "autotools" Or If sSys = "self" Then Continue + If sSys = "autotools" Or If sSys = "self" Or If sSys = "appimage" Then Continue Endif If hCtrl.Value Then hCombo.Add(GetSystemName(sSys)) Next diff --git a/app/src/gambas3/.src/Packager/FMakeInstall.form b/app/src/gambas3/.src/Packager/FMakeInstall.form index c431f019c..316c1d12a 100644 --- a/app/src/gambas3/.src/Packager/FMakeInstall.form +++ b/app/src/gambas3/.src/Packager/FMakeInstall.form @@ -1,7 +1,7 @@ # Gambas Form File 3.0 { Form Form - MoveScaled(0,0,129,79) + MoveScaled(0,0,113,79) Text = ("Make installation package") Icon = Picture["icon:/large/package"] Arrangement = Arrange.Vertical @@ -19,21 +19,27 @@ ActionPicture = Picture["icon:/small/package"] Index = 0 Text = ("Package information") - { TextLabel1 TextLabel - MoveScaled(1,0,64,4) - Font = Font["Bold"] - AutoResize = True - Text = ("Package name") - Alignment = Align.BottomNormal - } - { txtPackage Label - MoveScaled(1,5,70,4) - Font = Font["Bold,+2"] - Background = Color.TextBackground - Foreground = Color.TextForeground - Padding = 4 - AutoResize = True - Border = Border.Plain + { Panel19 HBox + MoveScaled(1,0,78,4) + Spacing = True + { TextLabel1 TextLabel + MoveScaled(0,0,15,3) + Font = Font["Bold"] + AutoResize = True + Text = ("Package name") + Alignment = Align.Normal + } + { txtPackage Label + MoveScaled(16,0,54,4) + Font = Font["Bold,+2"] + Background = Color.TextBackground + Foreground = Color.TextForeground + Expand = True + Padding = 4 + AutoResize = True + Border = Border.Plain + BorderRadius = 32 + } } { Panel3 HBox MoveScaled(1,10,87,8) @@ -59,7 +65,7 @@ Spacing = True { Label8 Label MoveScaled(0,0,16,4) - AutoResize = True + Expand = True Alignment = Align.Right Text = ("Package version") } @@ -217,7 +223,7 @@ Tag = "archlinux" Padding = 4 { PictureBox1 PictureBox - MoveScaled(0,0,8,8) + MoveScaled(2,1,6,6) Picture = Picture.Load("img/logo/archlinux.png") Stretch = True Alignment = Align.Center @@ -321,6 +327,28 @@ Text = "Mageia" } } + { HBox4 HBox panDistro + Name = "HBox4" + MoveScaled(43,20,42,9) + Tag = "slackware" + Padding = 4 + { PictureBox9 PictureBox + MoveScaled(1,1,6,6) + Picture = Picture.Load("img/logo/slackware.png") + Stretch = True + Alignment = Align.Center + } + { Panel15 Panel + MoveScaled(9,1,3,6) + } + { CheckBox2 CheckBox chkDistro + Name = "CheckBox2" + MoveScaled(14,2,26,4) + #Translate = False + Expand = True + Text = "Slackware" + } + } { HBox7 HBox panDistro Name = "HBox7" MoveScaled(0,30,42,9) @@ -343,26 +371,25 @@ Text = "OpenSUSE" } } - { HBox4 HBox panDistro - Name = "HBox4" + { HBox21 HBox panDistro + Name = "HBox21" MoveScaled(43,30,42,9) - Tag = "slackware" + Tag = "appimage" Padding = 4 - { PictureBox9 PictureBox + { PictureBox8 PictureBox MoveScaled(1,1,6,6) - Picture = Picture.Load("img/logo/slackware.png") + Picture = Picture.Load("img/logo/appimage.png") Stretch = True Alignment = Align.Center } - { Panel15 Panel + { Panel18 Panel MoveScaled(9,1,3,6) } - { CheckBox2 CheckBox chkDistro - Name = "CheckBox2" + { CheckBox8 CheckBox chkDistro + Name = "CheckBox8" MoveScaled(14,2,26,4) - #Translate = False Expand = True - Text = "Slackware" + Text = ("AppImage") } } { HBox9 HBox panDistro @@ -395,7 +422,7 @@ Padding = 4 { PictureBox10 PictureBox MoveScaled(1,1,6,6) - Picture = Picture.Load("img/logo/self-extractible.png") + Picture = Picture.Load("icon:/huge/tools") Stretch = True Alignment = Align.Center } diff --git a/app/src/gambas3/.src/Packager/Package.module b/app/src/gambas3/.src/Packager/Package.module index 1d880a1d7..af1852714 100644 --- a/app/src/gambas3/.src/Packager/Package.module +++ b/app/src/gambas3/.src/Packager/Package.module @@ -9,12 +9,12 @@ Public Const ALL_TARGETS As String = "*" Private RPMBUILD_PROG As String Private FAKEROOT_PROG As String -Private DKPG_PROG As String +Private DPKG_PROG As String Private TAR_1_13_PROG As String Private AUTOCONF_PROG As String Private AUTOMAKE_PROG As String Private MAKEPKG_PROG As String -'Private MAKESELF_PROG As String +Private APPIMAGE_PROG As String Private $sOutput As String Private $bEnd As Boolean @@ -58,24 +58,27 @@ Private DEBIAN_ICON_SIZES As Integer[] = [16, 22, 32, 48, 64, 128, 256, 512, 102 Private RUNTIME_COMPONENTS As String[] = ["gb.debug", "gb.draw", "gb.eval", "gb.geom", "gb.gui", "gb.gui.base", "gb.gui.opengl", "gb.gui.qt", "gb.gui.qt.opengl", "gb.gui.qt.webkit", "gb.gui.trayicon", "gb.gui.webview", "gb.hash", "gb.test"] -Public Sub CheckProgram() +Private Sub CheckProgram(sProg As String) As String - 'IF $bChecked THEN RETURN + If Not Project.CheckProgram(sProg) Then Return sProg + +End - '$bChecked = TRUE + +Public Sub CheckPrograms() - If Not Project.CheckProgram("dh_install") Then DKPG_PROG = "dh_install" - If Not Project.CheckProgram("rpmbuild") Then RPMBUILD_PROG = "rpmbuild" - If Not Project.CheckProgram("fakeroot") Then FAKEROOT_PROG = "fakeroot" - If Not Project.CheckProgram("tar-1.13") Then - TAR_1_13_PROG = "tar-1.13" - Else If Not Project.CheckProgram("tar") Then - TAR_1_13_PROG = "tar" - Endif - If Not Project.CheckProgram("autoconf") Then AUTOCONF_PROG = "autoconf" - If Not Project.CheckProgram("automake") Then AUTOMAKE_PROG = "automake" - If Not Project.CheckProgram("makepkg") Then MAKEPKG_PROG = "makepkg" + DPKG_PROG = CheckProgram("dh_install") + RPMBUILD_PROG = CheckProgram("rpmbuild") + FAKEROOT_PROG = CheckProgram("fakeroot") + TAR_1_13_PROG = CheckProgram("tar-1.13") + If Not TAR_1_13_PROG Then TAR_1_13_PROG = CheckProgram("tar") + AUTOCONF_PROG = CheckProgram("autoconf") + AUTOMAKE_PROG = CheckProgram("automake") + MAKEPKG_PROG = CheckProgram("makepkg") 'If Not Project.CheckProgram("makeself") Then MAKESELF_PROG = "makeself" + APPIMAGE_PROG = CheckProgram("appimage-builder-x86_64.AppImage") + If Not APPIMAGE_PROG Then APPIMAGE_PROG = CheckProgram("appimage-builder-x86_64") + If Not APPIMAGE_PROG Then APPIMAGE_PROG = CheckProgram("appimage-builder") End @@ -87,7 +90,7 @@ Public Sub CheckSystem(sSys As String) As String If Not RPMBUILD_PROG Then Return Subst(("'&1' is missing."), "rpmbuild") Case "debian", "ubuntu" - If Not DKPG_PROG Then Return Subst(("'&1' is missing."), "debhelper") + If Not DPKG_PROG Then Return Subst(("'&1' is missing."), "debhelper") If Not FAKEROOT_PROG Then Return Subst(("'&1' is missing."), "fakeroot") Case "slackware" @@ -103,6 +106,9 @@ Public Sub CheckSystem(sSys As String) As String 'Case "self" ' If Not MAKESELF_PROG Then Return Subst(("'&1' is missing."), "makeself") + + Case "appimage" + If Not APPIMAGE_PROG Then Return Subst(("'&1' is missing."), "appimage-builder") Case Else Return @@ -839,6 +845,9 @@ Private Function MakePackage(sSys As String) As Boolean Case "archlinux" MakeArchPackage(sSys) + + Case "appimage" + MakeAppImage(sSys) Default Return True @@ -2813,3 +2822,7 @@ Public Sub GetPackageFullName(sVendor As String, sVendorPrefix As String, bPrefi Return sText End + +Private Sub MakeAppImage(sSys As String) + +End diff --git a/app/src/gambas3/.src/Project.module b/app/src/gambas3/.src/Project.module index c53c658f0..cc061e54d 100644 --- a/app/src/gambas3/.src/Project.module +++ b/app/src/gambas3/.src/Project.module @@ -212,7 +212,7 @@ Public HasAdded As Integer Private $bTesting As Boolean ' All possible packager target systems -Private $aSystems As String[] = ["archlinux", "autotools", "debian", "fedora", "mageia", "slackware", "suse", "ubuntu"] +Private $aSystems As String[] = ["appimage", "archlinux", "autotools", "debian", "fedora", "mageia", "slackware", "suse", "ubuntu"] ' Pretty background Public DEFAULT_BACKGROUND As String = "gambas" diff --git a/app/src/gambas3/img/logo/appimage.png b/app/src/gambas3/img/logo/appimage.png new file mode 100644 index 000000000..21a0fcf2a Binary files /dev/null and b/app/src/gambas3/img/logo/appimage.png differ diff --git a/app/src/gambas3/install/AppImageBuilder.yml b/app/src/gambas3/install/AppImageBuilder.yml new file mode 100644 index 000000000..7d5372d3e --- /dev/null +++ b/app/src/gambas3/install/AppImageBuilder.yml @@ -0,0 +1,65 @@ +# appimage-builder recipe see https://appimage-builder.readthedocs.io for details +version: 1 +script: + - rm -rf AppDir || true + - mkdir -p AppDir/usr/bin AppDir/usr/share/icons/hicolor/$(icon-resolution)/apps/ + - cp $(icon-path) AppDir/usr/share/icons/hicolor/$(icon-resolution)/apps/ + - cp $(exec-path) AppDir/usr/bin/ +AppDir: + path: $(appdir) + app_info: + id: $(id) + name: $(name) + icon: $(icon) + version: latest + exec: usr/bin/gbr3 + exec_args: $APPDIR/usr/bin/$(exec-name) $@ + apt: + arch: amd64 + allow_unauthenticated: true + sources: + $(sources) + # - sourceline: deb http://fr.archive.ubuntu.com/ubuntu/ lunar main restricted + # - sourceline: deb http://fr.archive.ubuntu.com/ubuntu/ lunar-updates main restricted + # - sourceline: deb http://fr.archive.ubuntu.com/ubuntu/ lunar universe + # - sourceline: deb http://fr.archive.ubuntu.com/ubuntu/ lunar-updates universe + # - sourceline: deb http://fr.archive.ubuntu.com/ubuntu/ lunar multiverse + # - sourceline: deb http://fr.archive.ubuntu.com/ubuntu/ lunar-updates multiverse + # - sourceline: deb http://fr.archive.ubuntu.com/ubuntu/ lunar-backports main restricted universe multiverse + # - sourceline: deb http://security.ubuntu.com/ubuntu/ lunar-security main restricted + # - sourceline: deb http://security.ubuntu.com/ubuntu/ lunar-security universe + # - sourceline: deb http://security.ubuntu.com/ubuntu/ lunar-security multiverse + # - sourceline: deb http://ddebs.ubuntu.com/ lunar main restricted universe multiverse + # - sourceline: deb http://ppa.launchpad.net/gambas-team/gambas3/ubuntu lunar main + include: + $(packages) + files: + include: [] + exclude: + - usr/share/man + - usr/share/doc/*/README.* + - usr/share/doc/*/changelog.* + - usr/share/doc/*/NEWS.* + - usr/share/doc/*/TODO.* + runtime: + env: + GB_PATH: $APPDIR/usr/bin/gbr3 + test: + fedora-30: + image: appimagecrafters/tests-env:fedora-30 + command: ./AppRun + debian-stable: + image: appimagecrafters/tests-env:debian-stable + command: ./AppRun + archlinux-latest: + image: appimagecrafters/tests-env:archlinux-latest + command: ./AppRun + centos-7: + image: appimagecrafters/tests-env:centos-7 + command: ./AppRun + ubuntu-xenial: + image: appimagecrafters/tests-env:ubuntu-xenial + command: ./AppRun +AppImage: + arch: x86_64 + update-information: guess