3030
3131
3232class 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
0 commit comments