Clean up windows directory; move most files into libexec (another approach)

This commit is contained in:
Alessandro Ranellucci 2017-05-21 19:59:14 +02:00
parent 6e2ffaf4ca
commit d27219e84b
2 changed files with 15 additions and 30 deletions

View File

@ -15,6 +15,7 @@
#ifdef WIN32 #ifdef WIN32
int main(int argc, char **argv, char **env) int main(int argc, char **argv, char **env)
{ {
SetCurrentDirectory("libexec");
// If the Slic3r is installed in a localized directory (containing non-iso // If the Slic3r is installed in a localized directory (containing non-iso
// characters), spaces or semicolons, use short file names. // characters), spaces or semicolons, use short file names.

View File

@ -2,9 +2,6 @@
# Licensed under the same license as the rest of Slic3r. # Licensed under the same license as the rest of Slic3r.
# ------------------------ # ------------------------
# You need to have Strawberry Perl 5.24.0.1 (or slic3r-perl) installed for this to work, # You need to have Strawberry Perl 5.24.0.1 (or slic3r-perl) installed for this to work,
param (
[switch]$exe = $false
)
echo "Make this is run from the perl command window." echo "Make this is run from the perl command window."
echo "Requires PAR." echo "Requires PAR."
@ -31,12 +28,17 @@ git branch | foreach {
} }
} }
} }
if ($exe) {
$output_file = "slic3r.exe" if ($env:APPVEYOR) {
$output_dir = "../../Slic3r-${current_branch}.${current_date}.${env:APPVEYOR_BUILD_NUMBER}.$(git rev-parse --short HEAD)"
} else { } else {
$output_file = "slic3r.par" $output_dir = "../../Slic3r-${current_branch}.${current_date}.$(git rev-parse --short HEAD)"
} }
copy slic3r.exe $output_dir\Slic3r.exe
copy slic3r-console.exe $output_dir\Slic3r-console.exe
copy slic3r-debug-console.exe $output_dir\Slic3r-debug-console.exe
# Change this to where you have Strawberry Perl installed. # Change this to where you have Strawberry Perl installed.
New-Variable -Name "STRAWBERRY_PATH" -Value "C:\Strawberry" New-Variable -Name "STRAWBERRY_PATH" -Value "C:\Strawberry"
@ -51,15 +53,10 @@ if ($env:ARCH -eq "32bit") {
$pthread= "pthreadGC2-w64.dll" $pthread= "pthreadGC2-w64.dll"
} }
pp ` pp `
-a "slic3r.exe;slic3r.exe" `
-a "slic3r-console.exe;slic3r-console.exe" `
-a "slic3r-debug-console.exe;slic3r-debug-console.exe" `
-a "../../lib;lib" ` -a "../../lib;lib" `
-a "../../local-lib;local-lib" ` -a "../../local-lib;local-lib" `
-a "../../slic3r.pl;slic3r.pl" ` -a "../../slic3r.pl;slic3r.pl" `
-a "../../utils;utils" `
-a "../../var;var" ` -a "../../var;var" `
-a "../../FreeGLUT/freeglut.dll;freeglut.dll" ` -a "../../FreeGLUT/freeglut.dll;freeglut.dll" `
-a "${STRAWBERRY_PATH}\perl\bin\perl${perlversion}.dll;perl${perlversion}.dll" ` -a "${STRAWBERRY_PATH}\perl\bin\perl${perlversion}.dll;perl${perlversion}.dll" `
@ -148,23 +145,10 @@ pp `
-M XSLoader ` -M XSLoader `
-B ` -B `
-M lib ` -M lib `
-p ..\..\slic3r.pl -o ..\..\${output_file} -p ..\..\slic3r.pl -o "${output_dir}\libexec.par"
# switch renaming based on whether or not using packaged exe or zip Add-Type -Assembly "System.IO.Compression.FileSystem"
if ($exe) { [System.IO.Compression.ZipFile]::ExtractToDirectory("${output_dir}\libexec.par", "${output_dir}\libexec")
if ($env:APPVEYOR) { del "${output_dir}\libexec.par"
copy ..\..\slic3r.exe "..\..\slic3r-${current_branch}.${current_date}.${env:APPVEYOR_BUILD_NUMBER}.$(git rev-parse --short HEAD).exe"
del ..\slic3r.exe [System.IO.Compression.ZipFile]::CreateFromDirectory(${output_dir}, "${output_dir}.zip")
} else {
copy ..\..\slic3r.exe "..\..\slic3r-${current_branch}.${current_date}.$(git rev-parse --short HEAD).exe"
del ..\..\slic3r.exe
}
} else {
# make this more useful for not being on the appveyor server
if ($env:APPVEYOR) {
copy ..\..\slic3r.par "..\..\slic3r-${current_branch}.${current_date}.${env:APPVEYOR_BUILD_NUMBER}.$(git rev-parse --short HEAD).$env:ARCH.zip"
} else {
copy ..\..\slic3r.par "..\..\slic3r-${current_branch}.${current_date}.$(git rev-parse --short HEAD).zip"
del ..\..\slic3r.par
}
}