Skip to content

Commit 31cc0b8

Browse files
committed
fix: regression on type_2 format
1 parent 2c33c33 commit 31cc0b8

File tree

3 files changed

+7
-17
lines changed

3 files changed

+7
-17
lines changed

appimagebuilder/commands/create_appimage.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ def __call__(self, *args, **kwargs):
5050
raise RuntimeError(f"Unknown AppImage format {appimage_format}")
5151

5252
def _create_type_2_appimage(self):
53-
5453
update_information = self.recipe.AppImage["update-information"]() or "None"
5554

5655
sign_key = self.recipe.AppImage["sign-key"] or "None"

appimagebuilder/modules/prime/type_2.py

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,10 @@
3030

3131

3232
class Type2Creator:
33-
def __init__(self, recipe):
34-
self.app_dir = recipe.AppDir.path()
35-
self.target_arch = recipe.AppImage.arch()
36-
self.app_name = recipe.AppDir.app_info.name()
37-
self.app_version = recipe.AppDir.app_info.version()
38-
self.update_information = recipe.AppImage["update-information"]() or "None"
33+
def __init__(self, appdir, target_arch, update_information, sign_key, output_filename):
34+
self.app_dir = appdir
35+
self.target_arch = target_arch
36+
self.update_information = update_information
3937
self.guess_update_information = False
4038

4139
if self.update_information == "None":
@@ -47,15 +45,11 @@ def __init__(self, recipe):
4745
self.update_information = None
4846
self.guess_update_information = True
4947

50-
self.sing_key = recipe.AppImage["sign-key"]() or "None"
48+
self.sing_key = sign_key
5149
if self.sing_key == "None":
5250
self.sing_key = None
5351

54-
fallback_file_name = os.path.join(
55-
os.getcwd(),
56-
"%s-%s-%s.AppImage" % (self.app_name, self.app_version, self.target_arch),
57-
)
58-
self.target_file = recipe.AppImage.file_name() or fallback_file_name
52+
self.target_file = output_filename
5953

6054
def create(self):
6155
self._assert_target_architecture()
@@ -67,7 +61,7 @@ def create(self):
6761
self._generate_appimage(runtime_path)
6862

6963
def _generate_appimage(self, runtime_path):
70-
appimage_tool = AppImageToolCommand(self.app_dir, self.file_name)
64+
appimage_tool = AppImageToolCommand(self.app_dir, self.target_file)
7165
appimage_tool.target_arch = self.target_arch
7266
appimage_tool.update_information = self.update_information
7367
appimage_tool.guess_update_information = self.guess_update_information

examples/kcalc/AppImageBuilder.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,4 @@ AppDir:
7070

7171

7272
AppImage:
73-
update-information: None
74-
sign-key: None
7573
arch: x86_64
76-
format: 3

0 commit comments

Comments
 (0)