diff --git a/src/Commands/BuildCommand.php b/src/Commands/BuildCommand.php index 7732e692..4adce24a 100644 --- a/src/Commands/BuildCommand.php +++ b/src/Commands/BuildCommand.php @@ -7,10 +7,12 @@ use Illuminate\Support\Str; use Native\Electron\Concerns\LocatesPhpBinary; use Native\Electron\Facades\Updater; +use Native\Electron\Traits\InstallsAppIcon; use Native\Electron\Traits\OsAndArch; class BuildCommand extends Command { + use InstallsAppIcon; use LocatesPhpBinary; use OsAndArch; @@ -40,13 +42,15 @@ public function handle(): void // Added checks for correct input for os and arch $os = $this->selectOs($this->argument('os')); + $this->installIcon(); + $buildCommand = 'build'; if ($os != 'all') { $arch = $this->selectArchitectureForOs($os, $this->argument('arch')); $os .= $arch != 'all' ? "-{$arch}" : ''; - // Wether to publish the app or not + // Should we publish? if ($publish = ($this->option('publish'))) { $buildCommand = 'publish'; } diff --git a/src/Commands/DevelopCommand.php b/src/Commands/DevelopCommand.php index ed6954d8..faa9f712 100644 --- a/src/Commands/DevelopCommand.php +++ b/src/Commands/DevelopCommand.php @@ -5,13 +5,14 @@ use Illuminate\Console\Command; use Native\Electron\Traits\Developer; use Native\Electron\Traits\Installer; +use Native\Electron\Traits\InstallsAppIcon; use function Laravel\Prompts\intro; use function Laravel\Prompts\note; class DevelopCommand extends Command { - use Developer, Installer; + use Developer, Installer, InstallsAppIcon; protected $signature = 'native:serve {--no-queue} {--D|no-dependencies} {--installer=npm}'; @@ -36,6 +37,8 @@ public function handle(): void $this->patchPackageJson(); + $this->installIcon(); + $this->runDeveloper(installer: $this->option('installer'), skip_queue: $this->option('no-queue')); } diff --git a/src/Traits/InstallsAppIcon.php b/src/Traits/InstallsAppIcon.php new file mode 100644 index 00000000..d8e18e57 --- /dev/null +++ b/src/Traits/InstallsAppIcon.php @@ -0,0 +1,20 @@ +