use strict;
use File::Copy;
#use File::Copy::Recursive qw(rcopy);
-use File::Find::Rule;
#use Getopt::Long;
use File::Basename;
use FindBin qw($Bin);
-#use File::Path qw(make_path remove_tree);
-use Data::Dumper;
-my $tag="";
+
# my $setup = "";
my $reppath = dirname($Bin);
chdir($reppath.'/desktopapp');
system('npm run package-macos');
-print "Copy Tools\n";
-#make_path($reppath.'/release-builds/pot-darwin-x64/pot.app/Contents/Resources/tools');
-#copy($reppath.'/Workspace/pot/tools/potsrv',$reppath.'/Workspace/'.$app.'/pot/release-builds/pot-darwin-x64/pot.app/Contents/Resources/tools/potsrv');
-# chmod(0755,$reppath.'/Workspace/'.$app.'/pot/release-builds/pot-darwin-x64/pot.app/Contents/Resources/tools/potsrv');
+print "Move some Files\n";
+move($reppath."/release-builds/pot-darwin-x64/LICENSE",$reppath."/release-builds/pot-darwin-x64/pot.app/Contents/Resources/LICENSE");
+move($reppath."/release-builds/pot-darwin-x64/LICENSES.chromium.html",$reppath."/release-builds/pot-darwin-x64/pot.app/Contents/Resources/LICENSES.chromium.html");
+move($reppath."/release-builds/pot-darwin-x64/version",$reppath."/release-builds/pot-darwin-x64/pot.app/Contents/Resources/version");
+
print "Sign App-Files\n";
-my @frm = ($reppath."/release-builds/pot-darwin-x64/pot.app/Contents/Frameworks/Electron Framework.framework",
-$reppath.'/release-builds/pot-darwin-x64/pot.app/Contents/Frameworks/Mantle.framework',
-$reppath.'/release-builds/pot-darwin-x64/pot.app/Contents/Frameworks/ReactiveCocoa.framework',
-$reppath.'/release-builds/pot-darwin-x64/pot.app/Contents/Frameworks/Squirrel.framework',
-$reppath.'/release-builds/pot-darwin-x64/pot.app/Contents/Frameworks/pot Helper.app',
+my @frm = ($reppath."/release-builds/pot-darwin-x64/pot.app/Contents/Frameworks/Electron Framework.framework/Versions/Current/Helpers/chrome_crashpad_handler",
+ $reppath."/release-builds/pot-darwin-x64/pot.app/Contents/Frameworks/Electron Framework.framework",
+$reppath."/release-builds/pot-darwin-x64/pot.app/Contents/Frameworks/Mantle.framework",
+$reppath."/release-builds/pot-darwin-x64/pot.app/Contents/Frameworks/ReactiveCocoa.framework",
+$reppath."/release-builds/pot-darwin-x64/pot.app/Contents/Frameworks/Squirrel.framework",
+$reppath."/release-builds/pot-darwin-x64/pot.app/Contents/Frameworks/pot Helper (GPU).app",
+$reppath."/release-builds/pot-darwin-x64/pot.app/Contents/Frameworks/pot Helper (Plugin).app",
+$reppath."/release-builds/pot-darwin-x64/pot.app/Contents/Frameworks/pot Helper (Renderer).app",
+$reppath."/release-builds/pot-darwin-x64/pot.app/Contents/Frameworks/pot Helper.app",
$reppath.'/release-builds/pot-darwin-x64/pot.app/Contents/MacOS/pot',
$reppath.'/release-builds/pot-darwin-x64/pot.app'
+
);
foreach my $fr (@frm){
my $cmd = 'codesign -s "Developer ID Application: DKS sarl" -fv --ignore-resources "'.$fr.'"';
}
print "Create DMG now\n";
-if (! -d $reppath.'/dmg'){
- make_path($reppath.'/dmg');
+if (! -d $reppath.'/website/downloads'){
+ make_path($reppath.'/website/downloads');
}
-if (-e $reppath.'/dmg/POT_Setup.dmg'){
- unlink($reppath.'/dmg/POT_Setup.dmg');
+if (-e $reppath.'/website/downloads/POT_Setup.dmg'){
+ unlink($reppath.'/website/downloads/POT_Setup.dmg');
}
-system('perl "'.$reppath.'/install/macos/pkg-dmg" --sourcefile --source "'.$reppath.'/release-builds/pot-darwin-x64/pot.app" --target "'.$reppath.'/dmg/pot_setup.dmg" --volname "POT_Setup" --symlink /Applications:"installer ici"');
-print "DMG created: ".$reppath.'/dmg/POT_Setup.dmg'."\n";
+system('perl "'.$reppath.'/install/macos/pkg-dmg" --sourcefile --source "'.$reppath.'/release-builds/pot-darwin-x64/pot.app" --target "'.$reppath.'/website/downloads/pot_setup.dmg" --volname "POT_Setup" --symlink /Applications:"installer ici"');
+print "DMG created: ".$reppath.'/website/downloads/POT_Setup.dmg'."\n";
print localtime()." Normal End!\n";