@@ -47,6 +47,11 @@ def connectSignalsSlots(self):
4747 self .pushButton_11 .clicked .connect (self .vhdMenu )
4848 self .pushButton_12 .clicked .connect (self .close )
4949
50+ # Page 2.4 (aarch64 machine preparation)
51+ self .pushButton_33 .clicked .connect (self .firstStage )
52+ self .pushButton_34 .clicked .connect (self .vhdMenu )
53+ self .pushButton_35 .clicked .connect (self .close )
54+
5055 # Page 3 (VHD creation)
5156 self .pushButton_13 .clicked .connect (self .vhdBrowseLocation )
5257 self .pushButton_16 .clicked .connect (self .archSystem )
@@ -62,6 +67,7 @@ def connectSignalsSlots(self):
6267 self .pushButton_25 .clicked .connect (self .vgaNetworkMenu )
6368 self .pushButton_23 .clicked .connect (self .close )
6469 self .pushButton_24 .clicked .connect (self .soundCard )
70+ self .pushButton_36 .clicked .connect (self .extBiosFileLocation )
6571
6672 # Page 6 (Sound card)
6773 self .pushButton_28 .clicked .connect (self .extBios )
@@ -137,6 +143,25 @@ def machineCpuMips64el(self, machine, cpu):
137143
138144 i += 1
139145
146+ def machineCpuAarch64 (self , machine , cpu ):
147+ i = 0
148+
149+ while i < self .comboBox_14 .count ():
150+ if self .comboBox_14 .itemText (i ) == machine :
151+ self .comboBox_14 .setCurrentIndex (i )
152+ break
153+
154+ i += 1
155+
156+ i = 0
157+
158+ while i < self .comboBox_15 .count ():
159+ if self .comboBox_15 .itemText (i ) == cpu :
160+ self .comboBox_15 .setCurrentIndex (i )
161+ break
162+
163+ i += 1
164+
140165 def readTempVmFile (self ):
141166 # Searching temporary files
142167 if platform .system () == "Windows" :
@@ -176,6 +201,11 @@ def readTempVmFile(self):
176201 self .machineCpuPpc (vmSpecs [2 ], vmSpecs [3 ])
177202 self .spinBox_2 .setValue (int (vmSpecs [4 ]))
178203
204+ elif vmSpecs [1 ] == "aarch64" :
205+ self .comboBox .setCurrentIndex (4 )
206+ self .machineCpuAarch64 (vmSpecs [2 ], vmSpecs [3 ])
207+ self .spinBox_5 .setValue (int (vmSpecs [4 ]))
208+
179209 self .lineEdit_6 .setText (vmSpecs [5 ])
180210
181211 i = 0
@@ -219,6 +249,18 @@ def readTempVmFile(self):
219249 self .lineEdit_5 .setText (vmSpecs [14 ])
220250 self .lineEdit_7 .setText (vmSpecs [15 ])
221251
252+ i = 0
253+
254+ while i < self .comboBox_13 .count ():
255+ if self .comboBox_13 .itemText (i ) == vmSpecs [16 ]:
256+ self .comboBox_13 .setCurrentIndex (i )
257+ break
258+
259+ i += 1
260+
261+ self .lineEdit_8 .setText (vmSpecs [18 ])
262+ self .spinBox_6 .setValue (int (vmSpecs [17 ]))
263+
222264 return vmSpecs
223265
224266 def archSystem (self ):
@@ -260,6 +302,9 @@ def archSystem(self):
260302 elif self .comboBox .currentText () == "mips64el" :
261303 self .stackedWidget .setCurrentIndex (3 )
262304
305+ elif self .comboBox .currentText () == "aarch64" :
306+ self .stackedWidget .setCurrentIndex (4 )
307+
263308 except :
264309 if self .comboBox .currentText () == "i386" :
265310 self .stackedWidget .setCurrentIndex (1 )
@@ -272,12 +317,15 @@ def archSystem(self):
272317
273318 elif self .comboBox .currentText () == "mips64el" :
274319 self .stackedWidget .setCurrentIndex (3 )
320+
321+ elif self .comboBox .currentText () == "aarch64" :
322+ self .stackedWidget .setCurrentIndex (4 )
275323
276324 except sqlite3 .Error as e :
277325 print (f"The SQLite module encountered an error: { e } ." )
278326
279327 def vhdMenu (self ):
280- self .stackedWidget .setCurrentIndex (4 )
328+ self .stackedWidget .setCurrentIndex (5 )
281329
282330 def vhdBrowseLocation (self ):
283331 filename , filter = QFileDialog .getSaveFileName (parent = self , caption = 'Save VHD file' , dir = '.' , filter = 'Hard disk file (*.img);;VirtualBox disk image (*.vdi);;VMware disk file (*.vmdk);;Virtual hard disk file with extra features (*.vhdx);;All files (*.*)' )
@@ -298,16 +346,22 @@ def firstStage(self):
298346 self .stackedWidget .setCurrentIndex (0 )
299347
300348 def vgaNetworkMenu (self ):
301- self .stackedWidget .setCurrentIndex (5 )
349+ self .stackedWidget .setCurrentIndex (6 )
302350
303351 def extBios (self ):
304- self .stackedWidget .setCurrentIndex (6 )
352+ self .stackedWidget .setCurrentIndex (7 )
353+
354+ def extBiosFileLocation (self ):
355+ filename , filter = QFileDialog .getOpenFileName (parent = self , caption = 'Select BIOS file' , dir = '.' , filter = 'BIN files (*.bin);;All files (*.*)' )
356+
357+ if filename :
358+ self .lineEdit_8 .setText (filename )
305359
306360 def soundCard (self ):
307- self .stackedWidget .setCurrentIndex (7 )
361+ self .stackedWidget .setCurrentIndex (8 )
308362
309363 def linuxVMSpecific (self ):
310- self .stackedWidget .setCurrentIndex (8 )
364+ self .stackedWidget .setCurrentIndex (9 )
311365
312366 def linuxKernelBrowseLocation (self ):
313367 filename , filter = QFileDialog .getOpenFileName (parent = self , caption = 'Select Linux kernel' , dir = '.' , filter = 'All files (*.*)' )
@@ -322,7 +376,7 @@ def linuxInitridBrowseLocation(self):
322376 self .lineEdit_5 .setText (filename )
323377
324378 def win2kHacker (self ):
325- self .stackedWidget .setCurrentIndex (9 )
379+ self .stackedWidget .setCurrentIndex (10 )
326380
327381 def finishCreation (self ):
328382 if platform .system () == "Windows" :
@@ -348,6 +402,11 @@ def finishCreation(self):
348402 cpu = self .comboBox_7 .currentText ()
349403 ram = self .spinBox_3 .value ()
350404
405+ elif self .comboBox .currentText () == "aarch64" :
406+ machine = self .comboBox_14 .currentText ()
407+ cpu = self .comboBox_15 .currentText ()
408+ ram = self .spinBox_5 .value ()
409+
351410 if self .lineEdit_6 .text () == "" :
352411 vhd = "NULL"
353412
@@ -426,7 +485,8 @@ def finishCreation(self):
426485 SET name = "{ self .lineEdit .text ()} ", architecture = "{ self .comboBox .currentText ()} ", machine = "{ machine } ", cpu = "{ cpu } ",
427486 ram = { ram } , hda = "{ vhd } ", vga = "{ self .comboBox_10 .currentText ()} ", net = "{ networkAdapter } ", usbtablet = { usbtablet } ,
428487 win2k = { win2k } , dirbios = "{ ext_bios_dir } ", additionalargs = "{ add_args } ", sound = "{ self .comboBox_12 .currentText ()} ",
429- linuxkernel = "{ self .lineEdit_4 .text ()} ", linuxinitrid = "{ self .lineEdit_5 .text ()} ", linuxcmd = "{ self .lineEdit_7 .text ()} "
488+ linuxkernel = "{ self .lineEdit_4 .text ()} ", linuxinitrid = "{ self .lineEdit_5 .text ()} ", linuxcmd = "{ self .lineEdit_7 .text ()} ",
489+ mousetype = "{ self .comboBox_13 .currentText ()} ", cores = { self .spinBox_6 .value ()} , filebios = "{ self .lineEdit_8 .text ()} "
430490 WHERE name = "{ self .vmSpecs [0 ]} ";
431491 """
432492
0 commit comments