Skip to content

Commit 1555904

Browse files
committed
Add the full source of BambuStudio
using version 1.0.10
1 parent 30bcada commit 1555904

File tree

3,771 files changed

+1251328
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

3,771 files changed

+1251328
-0
lines changed

BambuStudio.mo

244 KB
Binary file not shown.

BambuStudio.sublime-project

+103
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
{
2+
"build_systems":
3+
[
4+
{
5+
"name": "List",
6+
//"file_regex": " at ([^-\\s]*) line ([0-9]*)",
7+
// "file_regex": " at (D\\:\\/src\\/Slic3r\\/.*?) line ([0-9]*)",
8+
"shell_cmd": "ls -l"
9+
},
10+
{
11+
"name": "Run",
12+
"working_dir": "$project_path",
13+
"file_regex": " at (.*?) line ([0-9]*)",
14+
// "shell_cmd": "chdir & perl slic3r.pl --DataDir \"C:\\Users\\Public\\Documents\\Prusa3D\\Slic3r settings MK2\" --gui \"..\\Slic3r-tests\\gap fill torture 20 -rt.stl\""
15+
"shell_cmd": "chdir & perl slic3r.pl"
16+
},
17+
{
18+
"name": "full",
19+
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
20+
"shell_cmd": "chdir & perl Build.pl"
21+
},
22+
{
23+
"name": "xs",
24+
"working_dir": "$project_path/build",
25+
// for Visual Studio:
26+
"file_regex": "^(..[^:]*)\\(([0-9]+)\\)(.*)$",
27+
// For GCC:
28+
// "file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
29+
"shell_cmd": "chdir & ninja -j 6 -v",
30+
"env": {
31+
// "PATH": "C:\\Program Files (x86)\\MSBuild\\12.0\\bin\\amd64;C:\\Program Files (x86)\\Microsoft Visual Studio 12.0\\VC\\BIN\\amd64;C:\\Program Files (x86)\\Microsoft Visual Studio 12.0\\Common7\\IDE;C:\\Program Files (x86)\\Microsoft Visual Studio 12.0\\Common7\\Tools;%PATH%;c:\\wperl64d\\site\\bin;c:\\wperl64d\\bin",
32+
// "PERL_CPANM_HOME": "c:\\wperl64d\\cpanm",
33+
// "WXDIR": "D:\\src-perl\\wxWidgets-3.0.3-beta1",
34+
// "BOOST_DIR": "D:\\src-perl\\boost_1_61_0",
35+
// "BOOST_INCLUDEDIR": "D:\\src-perl\\boost_1_61_0",
36+
// "BOOST_LIBRARYDIR": "D:\\src-perl\\boost_1_61_0\\stage\\x64\\lib",
37+
// "SLIC3R_STATIC": "1"
38+
}
39+
},
40+
{
41+
"name": "xs & run",
42+
"working_dir": "$project_path/build",
43+
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
44+
"shell_cmd": "chdir & ninja -j 6 & cd .. & perl slic3r.pl --gui \"..\\Slic3r-tests\\star3-big2.stl\""
45+
},
46+
{
47+
"name": "Slic3r - clean",
48+
"working_dir": "$project_path/build",
49+
"file_regex": "^(..[^:]*)(?::|\\()([0-9]+)(?::|\\))(?:([0-9]+):)?\\s*(.*)",
50+
"shell_cmd": ["chdir & ninja clean"]
51+
},
52+
{
53+
"name": "run tests",
54+
"working_dir": "$project_path/build",
55+
// for Visual Studio:
56+
"file_regex": "^(..[^:]*)\\(([0-9]+)\\)(.*)$",
57+
"shell_cmd": "chdir & ctest --verbose"
58+
},
59+
{
60+
"name": "Clean & Configure",
61+
"working_dir": "$project_path",
62+
// for Visual Studio:
63+
"file_regex": "^(..[^:]*)(?::|\\()([0-9]+)(?::|\\))(?:([0-9]+):)?\\s*(.*)",
64+
"shell_cmd": "chdir & rmdir /S /Q build & mkdir build & cd build & cmake -G Ninja .. -DCMAKE_COLOR_MAKEFILE=OFF -DCMAKE_RULE_PROGRESS=OFF -DCMAKE_RULE_MESSAGES=OFF -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo"
65+
},
66+
{
67+
"name": "Configure",
68+
"working_dir": "$project_path/build",
69+
// for Visual Studio:
70+
"file_regex": "^(..[^:]*)(?::|\\()([0-9]+)(?::|\\))(?:([0-9]+):)?\\s*(.*)",
71+
"shell_cmd": "cmake -G Ninja .. -DCMAKE_COLOR_MAKEFILE=OFF -DCMAKE_RULE_PROGRESS=OFF -DCMAKE_RULE_MESSAGES=OFF -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo"
72+
}
73+
],
74+
"folders":
75+
[
76+
{
77+
"path": ".",
78+
// "folder_exclude_patterns": [".svn", "._d", ".metadata", ".settings"],
79+
"file_exclude_patterns": ["XS.c", "*.pch", "*.ilk", "*.js" ]
80+
}
81+
],
82+
83+
"settings":
84+
{
85+
"sublimegdb_workingdir": "${folder:${project_path:run}}",
86+
// NOTE: You MUST provide --interpreter=mi for the plugin to work
87+
// "sublimegdb_commandline": "D:\\Qt\\Tools\\mingw492_32\\bin\\gdb.exe --interpreter=mi -ex 'target localhost:2345'",
88+
// "sublimegdb_commandline": "D:\\Qt\\Tools\\mingw492_32\\bin\\gdb.exe --interpreter=mi perl --args perl slic3r.pl",
89+
// "sublimegdb_commandline": "D:\\Qt\\Tools\\mingw492_32\\bin\\gdb.exe --interpreter=mi perl --args slic3r.pl ",
90+
// "sublimegdb_commandline": "D:\\Qt\\Tools\\mingw492_32\\bin\\gdb.exe --interpreter=mi -e C:\\Strawberry\\perl\\bin\\perl.exe -s C:\\Strawberry\\perl\\site\\lib\\auto\\Slic3r\\XS\\XS.xs.dll --args perl slic3r.pl -j 1 --gui D:\\src\\Slic3r-tests\\star3-big.stl",
91+
"sublimegdb_commandline": "D:\\Qt\\Tools\\mingw492_32\\bin\\gdb.exe --interpreter=mi perl.exe --args perl slic3r.pl -j 1 --gui", // D:\\src\\Slic3r-tests\\star3-big.stl",
92+
// "sublimegdb_commandline": "D:\\Qt\\Tools\\mingw492_32\\bin\\gdb.exe --interpreter=mi -x slic3r.gdb",
93+
// "arguments": "slic3r -j 1 --gui ../Slic3r-tests/star3-big.stl",
94+
// "arguments": "../slic3r.pl -j 1 --gui",
95+
// "sublimegdb_exec_cmd": "-exec-continue",
96+
97+
// Add "pending breakpoints" for symbols that are dynamically loaded from
98+
// external shared libraries
99+
"debug_ext" : true,
100+
"run_after_init": false,
101+
"close_views": false
102+
}
103+
}

Build.PL

+132
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
#!/usr/bin/perl
2+
3+
print "This script is currently used for installing Perl dependenices for running\n";
4+
print "the libslic3r unit / integration tests through Perl prove.\n";
5+
print "If you don't plan to run the unit / integration tests, you don't need to\n";
6+
print "install these dependencies to build and run BambuSlicer.\n";
7+
8+
use strict;
9+
use warnings;
10+
11+
use Config;
12+
use File::Spec;
13+
14+
my %prereqs = qw(
15+
Devel::CheckLib 0
16+
ExtUtils::MakeMaker 6.80
17+
ExtUtils::ParseXS 3.22
18+
ExtUtils::XSpp 0
19+
ExtUtils::XSpp::Cmd 0
20+
ExtUtils::CppGuess 0
21+
ExtUtils::Typemaps 0
22+
ExtUtils::Typemaps::Basic 0
23+
File::Basename 0
24+
File::Spec 0
25+
Getopt::Long 0
26+
Module::Build::WithXSpp 0.14
27+
Moo 1.003001
28+
POSIX 0
29+
Scalar::Util 0
30+
Test::More 0
31+
IO::Scalar 0
32+
Time::HiRes 0
33+
);
34+
my %recommends = qw(
35+
Class::XSAccessor 0
36+
Test::Harness 0
37+
);
38+
39+
my $sudo = grep { $_ eq '--sudo' } @ARGV;
40+
my $nolocal = grep { $_ eq '--nolocal' } @ARGV;
41+
42+
my @missing_prereqs = ();
43+
if ($ENV{SLIC3R_NO_AUTO}) {
44+
foreach my $module (sort keys %prereqs) {
45+
my $version = $prereqs{$module};
46+
next if eval "use $module $version; 1";
47+
push @missing_prereqs, $module if exists $prereqs{$module};
48+
print "Missing prerequisite $module $version\n";
49+
}
50+
foreach my $module (sort keys %recommends) {
51+
my $version = $recommends{$module};
52+
next if eval "use $module $version; 1";
53+
print "Missing optional $module $version\n";
54+
}
55+
} else {
56+
my @try = (
57+
$ENV{CPANM} // (),
58+
File::Spec->catfile($Config{sitebin}, 'cpanm'),
59+
File::Spec->catfile($Config{installscript}, 'cpanm'),
60+
);
61+
62+
my $cpanm;
63+
foreach my $path (@try) {
64+
if (-e $path) { # don't use -x because it fails on Windows
65+
$cpanm = $path;
66+
last;
67+
}
68+
}
69+
if (!$cpanm) {
70+
if ($^O =~ /^(?:darwin|linux)$/ && system(qw(which cpanm)) == 0) {
71+
$cpanm = 'cpanm';
72+
}
73+
}
74+
die <<'EOF'
75+
cpanm was not found. Please install it before running this script.
76+
77+
There are several ways to install cpanm, try one of these:
78+
79+
apt-get install cpanminus
80+
curl -L http://cpanmin.us | perl - --sudo App::cpanminus
81+
cpan App::cpanminus
82+
83+
If it is installed in a non-standard location you can do:
84+
85+
CPANM=/path/to/cpanm perl Build.PL
86+
87+
EOF
88+
if !$cpanm;
89+
my @cpanm_args = ();
90+
push @cpanm_args, "--sudo" if $sudo;
91+
92+
# install local::lib without --local-lib otherwise it's not usable afterwards
93+
if (!eval "use local::lib qw(local-lib); 1") {
94+
my $res = system $cpanm, @cpanm_args, 'local::lib';
95+
warn "Warning: local::lib is required. You might need to run the `cpanm --sudo local::lib` command in order to install it.\n"
96+
if $res != 0;
97+
}
98+
99+
push @cpanm_args, ('--local-lib', 'local-lib') if ! $nolocal;
100+
101+
# make sure our cpanm is updated (old ones don't support the ~ syntax)
102+
system $cpanm, @cpanm_args, 'App::cpanminus';
103+
104+
my %modules = (%prereqs, %recommends);
105+
foreach my $module (sort keys %modules) {
106+
my $version = $modules{$module};
107+
my @cmd = ($cpanm, @cpanm_args);
108+
109+
# temporary workaround for upstream bug in test
110+
push @cmd, '--notest'
111+
if $module =~ /^(?:OpenGL|Test::Harness)$/;
112+
113+
push @cmd, "$module~$version";
114+
115+
my $res = system @cmd;
116+
if ($res != 0) {
117+
if (exists $prereqs{$module}) {
118+
push @missing_prereqs, $module;
119+
} else {
120+
printf "Don't worry, this module is optional.\n";
121+
}
122+
}
123+
}
124+
}
125+
126+
print "\n";
127+
print "In the next step, you need to build the BambuStudio C++ library.\n";
128+
print "1) Create a build directory and change to it\n";
129+
print "2) run cmake .. -DCMAKE_BUILD_TYPE=Release\n";
130+
print "3) run make\n";
131+
print "4) to execute the automatic tests, run ctest --verbose\n";
132+
__END__

0 commit comments

Comments
 (0)