78 |
Folder mode
79 |
This option is still in beta quality, so don't expect much.
80 |
The exe file needs to be inside the selected folder
81 | Folder mode allow you to package folders inside an AppImage.
82 | To package folders into an AppImage you have to select the main app executable as the app
executable, and then in the foldermode entry select the app folder.
83 | Also, it's recommended to use a
custom AppRun if you enable this option.
84 |
85 |
86 |
87 |
95 |
Why the name Immagini
96 |
First of all let's start by sying that I'm italian.
97 | The name Immagini is the italian translation for 'images'... you see where I'm going?
98 | Given that the app is made to manage .AppImage files and I wanted to give a name that has something to do with the app I came up with the name Immagini.
99 | Next step is making an icon
100 |
101 |
102 |
103 |
104 |
105 |
--------------------------------------------------------------------------------
/Immagini/ui/strings.py:
--------------------------------------------------------------------------------
1 | from gettext import gettext as _
2 |
3 | # ----- most used word ---- #
4 | globalImmagini = _("Immagini")
5 |
6 | globalName = _("Name")
7 | globalExecutable = _("Executable")
8 | globalIcon = _("Icon")
9 | globalPath = _("Path")
10 | globalCategory = _("Category")
11 | globalType = _("Type")
12 | globalDelete = _("Delete")
13 | globalClose = _("Close")
14 | globalRefresh = _("Refresh")
15 | globalConfirm = _("Confirm")
16 | globalTemplate = _("Template")
17 | globalShare = _('Share folder')
18 | globalLib = _('Libraries folder')
19 | globalInfo = _('Info')
20 | globalDesktop = _('Desktop file')
21 |
22 | globalApplication = _("Application")
23 | globalUtility = _("Utility")
24 |
25 | globalLibraryTitle = _("Immagini - Library")
26 | globalNewImageTitle = _("Immagini - New")
27 | globalInstalledFlatpaks = _("Immagini - Installed Flatpaks")
28 |
29 | # ----- MAIN WINDOW ----- #
30 | menuRefresh = _("Refresh")
31 | menuShowInFolder = _("Show in folder")
32 | menuPreferences = _("Preferences")
33 | menuShortcuts = _("Shortcuts")
34 | menuAbout = _("About Immagini")
35 |
36 | aboutWindowComment = _("Management tool for AppImage applications")
37 |
38 | # ----- PREFERENCES WINDOW ----- #
39 | prefrencesTitle = _("Preferences")
40 | newImagePreferencesTitle = _("New image options")
41 | libraryPreferencesTitle = _('Library options')
42 |
43 | libraryLocationTitle = _('Library location')
44 | libraryLocationSubtitle = _("To apply changes restart the app")
45 | librarySelectionTitle = _('Select library location')
46 |
47 | autoDeleteAppDirTitle = _('Auto delete AppDir')
48 | autoDeleteAppDirSubtitle = _('Deletes the .AppDir folder after creating an AppImage file')
49 |
50 | autoFolderModeTitle = _('Enable FolderMode by default')
51 | autoFolderModeSubtitle = _('Automatically enables the "Folder Mode" option when creating a new image file')
52 |
53 | autoCustomAppRunTitle = _('Enable custom AppRun by default')
54 | autoCustomAppRunSubtitle = _('Automatically enables the "Custom AppRun" option when creating a new image file')
55 |
56 | useLibraryPathTitle = _('Use library folder as default')
57 | useLibraryPathSubtitle = _('Uses library folder as default location when creating new apps')
58 |
59 | libraryPathChanged = _("Library path changed")
60 |
61 | # ----- NEW IMAGE WINDOW ----- #
62 |
63 | includeLibrariesTitle = _("Include libraries")
64 | includeLibrariesSubtitle = _('Select a library to include inside an AppImage')
65 | selectLibrariesTitle = _("Select libraries")
66 |
67 | useFolderModeTitle = _("Folder mode")
68 | useFolderModeSubtitle = _("Parent folder location")
69 |
70 | useCustomAppRunTitle = _("Custom AppRun")
71 | useCustomAppRunSubtitle = _("Custom AppRun location")
72 |
73 | includeDependeciesTitle = _("Include dependencies")
74 | installedIntepreters = _("Installed languages: ")
75 | selectManually = _('Select manually: ')
76 |
77 | createTemplateImage = _('Create template image')
78 |
79 | outputLocationTitle = _("Location")
80 | outputLocationSubtitle = _("App location")
81 |
82 | selectFiles = _("Select files ")
83 | selectFolders = _("Select folders ")
84 | selectedItems = _("Selected items: ")
85 |
86 | pleaseFillInAllInfoSubtitle = _("Please fill in all the informations")
87 | pleaseFillInAllInfoTitle = _("All the info are required")
88 |
89 | createNewOne = _('Create new')
90 | convertFromFlatpak = _('Convert from Flatpak')
91 |
92 | installedFlatpaks = _('Intalled Flatpaks')
93 |
94 | executableNotProvidedByManifest = _("Not provided by manifest, may be wrong")
95 | executableNotFoundInsideFlatpak = _("Can't locate binary inside flatpak application")
96 |
97 | convertButtonLabel = _('Convert')
98 |
99 | couldNotCopyFilesSubtilte = _('Could not copy the application files into the appimage')
100 | couldNotCopyFilesTitle = _('Could not copy files')
101 |
102 | # advanced options
103 | advancedTitle = _("Advanced")
104 |
105 | # ----- TERMINAL ----- #
106 | terminalTitle = _('Terminal')
107 |
108 |
109 | # ----- IMAGE OPTIONS ----- #
110 | imageOptionsTitle = _('Image Options')
111 | imageOptionsExecutable = _('Executable:')
112 | imageOptionsExtract = _('Extract image:')
113 | imageOptionsStartTerminal = _('Start in terminal:')
114 |
115 | askConfirmDeleting = _('Deleting an appimage file is not reversible')
116 | extractingImage = _("Extracting image")
117 |
118 |
119 | # ----- ERRORS ----- #
120 |
121 | okButton = "Ok"
122 |
123 | noExePermissionSubtitle = _("The app has no executable permissions")
124 | noExePermissionTitle = _("Permission denied")
125 |
126 | folderAlreadyExistsSubtitle = _(' alredy exists')
127 | folderAlreadyExistsTitle = _('Folder already exists')
128 |
129 | invalidAppRunSubTitle = _("Selected file must be named 'AppRun'")
130 | invalidAppRunTitle = _("AppRun file not valid")
131 |
132 | invalidAppFolderSubtitle = _("The Application folder does not contain the selected executable file")
133 | invalidAppFolderTitle = _("Application folder does not contain executable")
134 |
135 | invalidExeTitle = _('does not exists')
136 | invalidExeSubtitle = _("could not copy the exe file")
137 |
138 | invalidIconTitle = _("does't exist")
139 | invalidIconSubtitle = _("could not copy icon")
140 |
141 | invalidIconSizeSubtitle = _("The icon size must be 32x32, 48x48 etc.. not")
142 | invalidIconSizeTitle = _("Icon size not valid")
143 |
144 | invalidLibraryTitle = _("could not copy library")
145 | invalidLibrarySubtitle = _("Library does not exist")
--------------------------------------------------------------------------------
/Immagini/library/getContent.py:
--------------------------------------------------------------------------------
1 | import os
2 | import stat
3 | import pathlib
4 | import gi
5 | from .imageOptions import *
6 | from ..ui.strings import *
7 |
8 | gi.require_version(namespace='Gtk', version='4.0')
9 | gi.require_version(namespace='Adw', version='1')
10 |
11 | from gi.repository import Adw, Gtk
12 |
13 | class getImages(list):
14 | def __init__(self, list, loc):
15 |
16 | i = 0
17 | self.appimages = 0
18 | self.executable = []
19 | self.imageNames = []
20 |
21 | for x in list:
22 | file = pathlib.Path(list[i-1])
23 | i += 1
24 | self.file_extension = file.suffix
25 | if(self.file_extension == ".AppImage"):
26 | self.appimages += 1
27 | imageName = str(loc) + '/' + str(file).encode('utf-8').decode()
28 | self.imageNames.append(imageName)
29 |
30 | def createImageRow(appImage, refresh, mainWindow, setState, flatpak):
31 |
32 | adw_expander_row = Adw.ExpanderRow.new()
33 |
34 | imageName = os.path.splitext(appImage)[0]
35 |
36 | fullName = os.path.basename(imageName)
37 | baseName = fullName.replace("-x86_64", "")
38 |
39 | st = os.stat(appImage)
40 | executable = bool(st.st_mode & stat.S_IEXEC)
41 |
42 | rightBox = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL)
43 |
44 | rightBox.append(createElementButton('media-playback-start-symbolic','success',
45 |
46 | manageImages.startImage,
47 | appImage,
48 | None,
49 | mainWindow,
50 | flatpak,
51 | None,
52 | None))
53 |
54 | rightBox.append(createElementButton('org.gnome.Settings-symbolic', None,
55 |
56 | manageImages.imageOptions,
57 | appImage,
58 | fullName,
59 | refresh,
60 | mainWindow,
61 | setState,
62 | adw_expander_row))
63 |
64 | rightBox.append(createElementButton('user-trash-symbolic','error',
65 |
66 | manageImages.deleteImage,
67 | appImage,
68 | refresh,
69 | baseName,
70 | mainWindow,
71 | setState,
72 | adw_expander_row))
73 |
74 | leftBox = Gtk.Box(orientation=Gtk.Orientation.VERTICAL)
75 | leftBox.set_hexpand(True)
76 | leftBox.append(createElementLabel(globalName, fullName + ".AppImage"))
77 | leftBox.append(createElementLabel(globalPath, appImage))
78 |
79 | expandableLayout = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL)
80 | expandableLayout.append(leftBox)
81 | expandableLayout.append(rightBox)
82 |
83 | box = Adw.PreferencesGroup.new()
84 |
85 | adw_expander_row.set_title(title=baseName)
86 | adw_expander_row.add_row(child=expandableLayout)
87 |
88 | if not executable:
89 | setState(adw_expander_row, 'error')
90 |
91 |
92 | box.add(adw_expander_row)
93 |
94 | return box
95 |
96 | def createDirRow(appImage, refresh, mainWindow, setState, flatpak):
97 |
98 | adw_expander_row = Adw.ExpanderRow.new()
99 |
100 | imageName = os.path.splitext(appImage)[0]
101 |
102 | fullName = os.path.basename(imageName)
103 | baseName = fullName.replace("-x86_64", "")
104 |
105 | st = os.stat(appImage)
106 | executable = bool(st.st_mode & stat.S_IEXEC)
107 |
108 | rightBox = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL)
109 |
110 | rightBox.append(createElementButton('org.gnome.Settings-symbolic', None,
111 |
112 | manageImages.imageOptions,
113 | appImage,
114 | fullName,
115 | refresh,
116 | mainWindow,
117 | setState,
118 | adw_expander_row))
119 |
120 | rightBox.append(createElementButton('user-trash-symbolic','error',
121 |
122 | manageImages.deleteImage,
123 | appImage,
124 | refresh,
125 | baseName,
126 | mainWindow,
127 | setState,
128 | adw_expander_row))
129 |
130 | leftBox = Gtk.Box(orientation=Gtk.Orientation.VERTICAL)
131 | leftBox.set_hexpand(True)
132 | leftBox.append(createElementLabel(globalName, fullName + ".AppImage"))
133 | leftBox.append(createElementLabel(globalPath, appImage))
134 |
135 | expandableLayout = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL)
136 | expandableLayout.append(leftBox)
137 | expandableLayout.append(rightBox)
138 |
139 | box = Adw.PreferencesGroup.new()
140 |
141 | adw_expander_row.set_title(title=baseName)
142 | adw_expander_row.add_row(child=expandableLayout)
143 |
144 | if not executable:
145 | setState(adw_expander_row, 'error')
146 |
147 |
148 | box.add(adw_expander_row)
149 |
150 | return box
151 |
152 | def restart_count():
153 | global desktopCount
154 | global nameNum
155 | desktopCount = 0
156 | nameNum = 0
157 |
158 | def createElementButton(iconName, style, action, actionArg1, refresh, name, mainWindow, setRowState, row):
159 |
160 | b = Gtk.Button()
161 | b.set_size_request(30,30)
162 | b.set_halign(Gtk.Align.END)
163 | b.set_valign(Gtk.Align.CENTER)
164 | b.set_icon_name(icon_name=iconName)
165 | if style is not None:
166 | b.get_style_context().add_class(class_name=style)
167 | b.set_margin_start(3)
168 | b.set_margin_top(12)
169 | b.set_margin_end(6)
170 | b.set_margin_bottom(12)
171 | b.connect('clicked', action, actionArg1, refresh, name, mainWindow, setRowState, row)
172 |
173 | return b
174 |
175 | def createElementLabel(text, name):
176 |
177 | l = Gtk.Label()
178 | l.set_margin_start(12)
179 | l.set_margin_top(6)
180 | l.set_margin_end(12)
181 | l.set_margin_bottom(12)
182 | # l.set_ellipsize_status(12)
183 | l.set_text(text + name)
184 | l.set_halign(Gtk.Align.START)
185 | l.set_wrap(True)
186 |
187 | return l
188 |
189 | desktopCount=0
190 | names = []
191 | nameNum = 0
192 |
193 | def getFileNum(list, loc):
194 | return getImages(list, loc)
--------------------------------------------------------------------------------
/messages.po:
--------------------------------------------------------------------------------
1 | # SOME DESCRIPTIVE TITLE.
2 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
3 | # This file is distributed under the same license as the PACKAGE package.
4 | # FIRST AUTHOR