Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.package
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Carlos Ramos Carreño
slapos.package
Commits
3f0f7a79
Commit
3f0f7a79
authored
Apr 29, 2013
by
Jondy Zhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add scripts to build windows installer.
parent
1980ec6b
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
342 additions
and
0 deletions
+342
-0
windows/scripts/build-slapos.sh
windows/scripts/build-slapos.sh
+36
-0
windows/scripts/init-cygwin.sh
windows/scripts/init-cygwin.sh
+55
-0
windows/scripts/init-re6stnet.sh
windows/scripts/init-re6stnet.sh
+25
-0
windows/scripts/init-slapos-node.sh
windows/scripts/init-slapos-node.sh
+50
-0
windows/scripts/slapos-all-in-one.iss
windows/scripts/slapos-all-in-one.iss
+90
-0
windows/scripts/slapos.iss
windows/scripts/slapos.iss
+86
-0
No files found.
windows/scripts/build-slapos.sh
0 → 100755
View file @
3f0f7a79
#! /bin/bash
if
[[
!
-d
/opt/slapos
]]
;
then
mkdir
-p
/opt/slapos
fi
if
[[
!
-d
/opt/download-cache
]]
;
then
mkdir
-p
/opt/download-cache
fi
cd
/opt/slapos
if
[[
!
-f
buildout.cfg
]]
;
then
echo
"[buildout]
extends = http://git.erp5.org/gitweb/slapos.git/blob_plain/refs/tags/cygwin-0:/component/slapos/buildout.cfg
download-cache = /opt/download-cache
prefix =
${
buildout
:directory
}
"
>
buildout.cfg
fi
if
[[
!
-f
bootstrap.py
]]
;
then
python
-S
-c
'import urllib2;print urllib2.urlopen("http://git.erp5.org/gitweb/slapos.core.git/blob_plain/HEAD:/bootstrap.py").read()'
>
bootstrap.py
python
-S
bootstrap.py
fi
bin/buildout
-v
-N
if
((
!
$?
==
0
))
;
then
echo
"Error: buildout of slapos failed"
exit
1
fi
# apply patches
if
[[
-f
/etc/slapos/patches/slapos-core.patch
]]
;
then
(
cd
`
ls
-d
/opt/slapos/eggs/slapos.core-
*
-py2
.7.egg
`
/slapos
;
\
patch
-p1
< /etc/slapos/patches/slapos-core.patch
)
(
cd
/etc/slapos/patches
;
mv
slapos-core.patch slapos-core.patch.done
)
fi
windows/scripts/init-cygwin.sh
0 → 100755
View file @
3f0f7a79
#! /bin/bash
#
# When cygwin is installed, then call this script by Administrator:
#
# /bin/bash/ --login -i init-cygwin.sh
#
# It used to create root account.
#
if
[[
!
"
$(
whoami
)
"
==
"Administrator"
]]
;
then
exit
1
fi
if
[[
!
-f
/etc/passwd
]]
;
then
mkpasswd
>
/etc/passwd
else
cp
/etc/passwd /etc/passwd.orig
fi
grep
-q
"^root:"
/etc/passwd
if
((
$?
!=
0
))
;
then
myaccount
=
$(
grep
"^Administrator:"
/etc/passwd |
\
sed
-e
"s/500:/0:/"
-e
"s/Administrator:/root:/g"
)
if
[[
"
${
myaccount
:0:4
}
"
==
root
]]
;
then
echo
$myaccount
>>
/etc/passwd
else
exit
1
fi
fi
if
[[
!
-f
~/.minttyrc
]]
;
then
cat
<<
EOF
> ~/.minttyrc
BoldAsFont=no
Font=Courier New
FontHeight=16
Scrollbar=none
EOF
fi
if
[[
!
-f
/cygtty.bat
]]
;
then
cyghome
=
$(
cygpath
-w
/
)
cat
<<
EOF
> /cygtty.bat
@echo off
${
cyghome
:0:2
}
chdir
${
cyghome
}
\\
bin
start mintty.exe -i /Cygwin-Terminal.ico -
EOF
chmod
+x /cygtty.bat
fi
exit
0
windows/scripts/init-re6stnet.sh
0 → 100755
View file @
3f0f7a79
#! /bin/bash
cd
/opt
if
[[
-f
/miniupnpc.tar.gz
]]
;
then
tar
xzf miniupnpc.tar.gz
mv
$(
ls
miniupnpc-
*
)
miniupnpc
cd
/opt/miniupnpc
python setup.py
install
if
cd
/opt
if
[[
-f
/re6stnet.tar.gz
]]
;
then
tar
xzf re6stnet.tar.gz
mv
$(
ls
re6stnet-
*
)
re6stnet
else
git clone
-b
cygwin
-n
http://git.erp5.org/repos/re6stnet.git
if
cd
/opt/re6stnet
python setup.py
install
mkdir
/etc/re6stnet
cd
/etc/re6stnet
re6st-conf
--registry
http://re6st.example.com/
windows/scripts/init-slapos-node.sh
0 → 100755
View file @
3f0f7a79
#! /bin/bash
function
guid2name
()
{
if
[[
"
$1
"
==
""
]]
;
then
echo
else
netsh interface ipv6 show interface
level
=
verbose |
\
grep
-B
1
"{C8D7F065-AD35-4777-A768-122451282533}"
|
\
grep
"^Connection"
|
\
sed
-e
"s/^Connection Name
\\
s*:
\\
s*//g"
fi
}
cfilename
=
/etc/opt/slapos/slapos.cfg
if
[[
!
-f
$cfilename
]]
;
then
echo
"Error: no found configure file
$cfilename
, the computer "
echo
"need register as a SlapOS Node first."
exit
1
fi
interface
=
$(
grep
"^interface_name
\\
s*="
$cfilename
|
sed
-e
"s/^interface_name
\\
s*=
\\
s*//g"
)
if
((
$?
==
0
))
;
then
ifname
=
$(
guid2name
$interface
)
else
echo
"Error: no interface found in the configure file
$cfilename
"
exit
1
fi
if
[[
"
$ifname
"
==
""
]]
;
then
echo
"Error: no ipv6 interface found in the configure file
$cfilename
"
exit
1
fi
cd
/etc/re6stnet
re6stnet @re6stnet.conf
-I
$ifname
-i
$ifname
echo
Waiting Re6stent network work ...
while
true
;
do
ping6 slap.vifib.com
>
/dev/null
&&
break
done
if
((
$?
==
0
))
;
then
echo
Re6stnet network OK.
else
echo
SlapOS Node initialize failed, no any IPv6 connection.
exit
1
fi
/opt/slapos/bin/slapformat
-c
--now
/etc/opt/slapos/slapos.cfg
windows/scripts/slapos-all-in-one.iss
0 → 100755
View file @
3f0f7a79
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING .ISS SCRIPT FILES!
[Setup]
AppName=SlapOS
AppVersion=0.158
AppVerName=SlapOS Windows 0.158
DefaultDirName=C:\slapos
DefaultGroupName=SlapOS
OutputBaseFilename=slapos-0.158-windows-x86-all-in-one
OutputDir=D:\slapos\publish\Output
SourceDir=D:\slapos
Uninstallable=yes
[Dirs]
Name: "{app}\cygwin"
Name: "{app}\cygwin\opt\slapos"
Name: "{app}\cygwin\usr\local\bin"
Name: "{app}\cygwin\etc\slapos\driver"
Name: "{app}\cygwin\etc\slapos\scripts"
[Files]
Source: "cygwin-packages\*"; DestDir: "{app}\cygwin-packages"; Flags: recursesubdirs;
Source: "publish\buildout\slapos\*"; DestDir: "{app}\cygwin\opt\slapos"; Flags: recursesubdirs;
Source: "opt\git\re6stnet\dist\re6stnet-0.1.tar.gz"; DestDir: "{app}\cygwin"; DestName: "re6stnet.tar.gz"; Flags: deleteafterinstall;
Source: "opt\downloads\miniupnpc-1.8.tar.gz"; DestDir: "{app}\cygwin"; DestName: "miniupnpc.tar.gz"; Flags: deleteafterinstall;
Source: "opt\git\slapos.recipe.cmmi\dist\slapos.recipe.cmmi-0.1.tar.gz"; DestDir: "{app}\opt\download-cache\dist";
Source: "opt\git\qooxdoo\application\playground\build\*"; DestDir: "{app}\cygwin\etc\slapos\desktop";
Source: "opt\git\qooxdoo\application\showcase\build\*"; DestDir: "{app}\cygwin\etc\slapos\node";
Source: "cygwin\Cygwin-Terminal.ico"; DestDir: "{app}\images"; DestName: "terminal.ico";
Source: "images\configure.ico"; DestDir: "{app}\images";
Source: "images\register.ico"; DestDir: "{app}\images";
Source: "images\updater.ico"; DestDir: "{app}\images";
Source: "images\manager.ico"; DestDir: "{app}\images";
Source: "src\setup-cygwin.bat"; DestDir: "{app}";
Source: "setup.exe"; DestDir: "{app}\cygwin-packages";
Source: "src\win32\ip"; DestDir: "{app}\cygwin\usr\local\bin";
Source: "src\win32\useradd"; DestDir: "{app}\cygwin\usr\local\bin";
Source: "src\win32\usermod"; DestDir: "{app}\cygwin\usr\local\bin";
Source: "src\win32\groupadd"; DestDir: "{app}\cygwin\usr\local\bin";
Source: "src\win32\brctl"; DestDir: "{app}\cygwin\usr\local\bin";
Source: "src\win32\tunctl"; DestDir: "{app}\cygwin\usr\local\bin";
Source: "opt\git\babeld-1.3.4\babeld.exe"; DestDir: "{app}\cygwin\usr\local\bin";
Source: "opt\git\openvpn-2.3.0\src\openvpn\.libs\openvpn.exe"; DestDir: "{app}\cygwin\usr\local\bin";
Source: "src\docs\openvpn\devcon.exe"; DestDir: "{app}\cygwin\usr\local\bin";
Source: "src\docs\openvpn\driver\*"; DestDir: "{app}\cygwin\etc\slapos\driver";
Source: "src\win32\init-slapos-node.sh"; DestDir: "{app}\cygwin\etc\slapos\scripts";
Source: "src\win32\init-cygwin.sh"; DestDir: "{app}\cygwin\etc\slapos\scripts";
Source: "src\win32\build-slapos.sh"; DestDir: "{app}\cygwin\etc\slapos\scripts";
Source: "src\win32\init-re6stnet.sh"; DestDir: "{app}\cygwin\etc\slapos\scripts";
Source: "src\win32\build-slapos.sh"; DestDir: "{app}\cygwin\etc\slapos\scripts";
Source: "src\docs\using-slapos-in-windows.html"; DestDir: "{app}"; DestName: "user-guide.html";
Source: "src\win32\README.cygwin"; DestDir: "{app}"; DestName: "readme.txt";
[Icons]
Name: "{commondesktop}\SlapOS"; Filename: "{app}\cygwin\etc\slapos\desktop\index.html"; WorkingDir: "{app}\cygwin\etc\slapos\desktop"; IconFilename: "{app}\imapges\slapos.ico";
Name: "{group}\SlapOS"; Filename: "{app}\cygwin\etc\slapos\desktop\index.html"; WorkingDir: "{app}\cygwin\etc\slapos\desktop"; IconFilename: "{app}\imapges\slapos.ico";
Name: "{group}\Node Manager"; Filename: "{app}\cygwin\etc\slapos\node\index.html"; WorkingDir: "{app}\cygwin\etc\slapos\node"; IconFilename: "{app}\imapges\manager.ico";
Name: "{group}\Register Node"; Filename: "{app}\cygwin\bin\bash.exe"; Parameters: "--login -i /etc/slapos/scripts/register-node.sh"; WorkingDir: "{app}\cygwin\etc\slapos\scripts"; IconFilename: "{app}\imapges\register.ico";
; Name: "{group}\Resilient Configuration"; Filename: "{app}\cygwin\bin\bash.exe"; Parameters: "--login -i /etc/slapos/scripts/re6stnet-configure"; WorkingDir: "{app}\cygwin\etc\slapos\scripts"; IconFilename: "{app}\imapges\configure.ico";
Name: "{group}\Command Console"; Filename: "{app}\cygwin\bin\bash.exe"; Parameters: "--login -i /opt/slapos/bin/slapconsole /etc/opt/slapos/slapos.cfg"; WorkingDir: "{app}\cygwin\etc\slapos\scripts"; IconFilename: "{app}\imapges\terminal.ico";
Name: "{group}\Update Center"; Filename: "{app}\cygwin\bin\bash.exe"; Parameters: "--login -i /etc/slapos/scripts/build-slapos.sh"; WorkingDir: "{app}\cygwin\etc\slapos\scripts"; IconFilename: "{app}\imapges\updater.ico";
Name: "{group}\User Guide"; Filename: "{app}\user-guide.html";
Name: "{group}\Read Me"; Filename: "{app}\readme.txt";
Name: "{group}\SlapOS.org"; Filename: "http://www.slapos.org/";
Name: "{group}\Uninstall SlapOS"; Filename: "{uninstallexe}";
[Run]
Filename: "{app}\etc\slapos\scripts\setup-cygwin.bat"; Parameters: """{app}"""; StatusMsg: "Installing Cygwin...";
Filename: "{app}\cygwin\bin\bash.exe"; Parameters: "--login -i /etc/slapos/scripts/init-cygwin.sh"; WorkingDir: "{app}\cygwin\bin"; Description: "Configure Cygwin"; StatusMsg: "Configure Cygwin...";
Filename: "{app}\cygwin\bin\bash.exe"; Parameters: "--login -i /etc/slapos/scripts/init-re6stnet.sh"; WorkingDir: "{app}\cygwin\bin"; Description: "Configure Re6stnet"; StatusMsg: "Configure Re6stnet...";
Filename: "cmd.exe"; Parameters: "/c {app}\cygwin\etc\postinstall\autorebase.bat.done"; WorkingDir: "{app}\cygwin"; Flags: runhidden;
[UninstallDelete]
Type: filesandordirs; Name: "{app}\cygwin" ;
Type: files; Name: "*.pyc";
Type: files; Name: "*.pyo";
windows/scripts/slapos.iss
0 → 100755
View file @
3f0f7a79
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING .ISS SCRIPT FILES!
[Setup]
AppName=SlapOS
AppVersion=0.158
AppVerName=SlapOS Windows 0.158
DefaultDirName=C:\slapos
DefaultGroupName=SlapOS
OutputDir=D:\slapos\publish\Output
OutputBaseFilename=slapos-0.158-windows-x86
SourceDir=D:\slapos
Uninstallable=yes
[Dirs]
Name: "{app}\cygwin"
Name: "{app}\images"
Name: "{app}\cygwin\opt\slapos"
Name: "{app}\cygwin\usr\local\bin"
Name: "{app}\cygwin\etc\slapos\driver"
Name: "{app}\cygwin\etc\slapos\scripts"
Name: "{app}\cygwin\etc\slapos\patches"
[Files]
Source: "opt\git\slapos\component\cygwin\slapos-core.patch"; DestDir: "{app}\cygwin\etc\slapos\patches";
Source: "opt\git\slapos\component\cygwin\slapos-cookbook-inotifyx.patch"; DestDir: "{app}\cygwin\etc\slapos\patches";
Source: "opt\git\re6stnet\dist\re6stnet-0.1.tar.gz"; DestDir: "{app}\cygwin"; DestName: "re6stnet-0.1.tar.gz"; Flags: deleteafterinstall;
Source: "opt\downloads\miniupnpc-1.8.tar.gz"; DestDir: "{app}\cygwin"; DestName: "miniupnpc.tar.gz"; Flags: deleteafterinstall;
Source: "opt\git\slapos.recipe.cmmi\dist\slapos.recipe.cmmi-0.1.tar.gz"; DestDir: "{app}\opt\download-cache\dist";
Source: "opt\git\qooxdoo\application\playground\build\*"; DestDir: "{app}\cygwin\etc\slapos\desktop";
Source: "opt\git\qooxdoo\application\showcase\build\*"; DestDir: "{app}\cygwin\etc\slapos\node";
Source: "cygwin\Cygwin-Terminal.ico"; DestDir: "{app}\images"; DestName: "terminal.ico";
Source: "images\configure.ico"; DestDir: "{app}\images";
Source: "images\register.ico"; DestDir: "{app}\images";
Source: "images\updater.ico"; DestDir: "{app}\images";
Source: "images\manager.ico"; DestDir: "{app}\images";
Source: "src\win32\ip"; DestDir: "{app}\cygwin\usr\local\bin";
Source: "src\win32\useradd"; DestDir: "{app}\cygwin\usr\local\bin";
Source: "src\win32\usermod"; DestDir: "{app}\cygwin\usr\local\bin";
Source: "src\win32\groupadd"; DestDir: "{app}\cygwin\usr\local\bin";
Source: "src\win32\brctl"; DestDir: "{app}\cygwin\usr\local\bin";
Source: "src\win32\tunctl"; DestDir: "{app}\cygwin\usr\local\bin";
Source: "opt\git\babeld-1.3.4\babeld.exe"; DestDir: "{app}\cygwin\usr\local\bin";
Source: "opt\git\openvpn-2.3.0\src\openvpn\.libs\openvpn.exe"; DestDir: "{app}\cygwin\usr\local\bin";
Source: "src\docs\openvpn\devcon.exe"; DestDir: "{app}\cygwin\usr\local\bin";
Source: "src\docs\openvpn\driver\*"; DestDir: "{app}\cygwin\etc\slapos\driver";
Source: "src\win32\init-slapos-node.sh"; DestDir: "{app}\cygwin\etc\slapos\scripts";
Source: "src\win32\init-cygwin.sh"; DestDir: "{app}\cygwin\etc\slapos\scripts";
Source: "src\win32\build-slapos.sh"; DestDir: "{app}\cygwin\etc\slapos\scripts";
Source: "src\win32\init-re6stnet.sh"; DestDir: "{app}\cygwin\etc\slapos\scripts";
Source: "src\win32\build-slapos.sh"; DestDir: "{app}\cygwin\etc\slapos\scripts";
Source: "src\docs\using-slapos-in-windows.html"; DestDir: "{app}"; DestName: "user-guide.html";
Source: "src\win32\README.cygwin"; DestDir: "{app}"; DestName: "readme.txt";
[Icons]
Name: "{commondesktop}\SlapOS"; Filename: "{app}\cygwin\etc\slapos\desktop\index.html"; WorkingDir: "{app}\cygwin\etc\slapos\desktop"; IconFilename: "{app}\imapges\slapos.ico";
Name: "{group}\SlapOS"; Filename: "{app}\cygwin\etc\slapos\desktop\index.html"; WorkingDir: "{app}\cygwin\etc\slapos\desktop"; IconFilename: "{app}\imapges\slapos.ico";
Name: "{group}\Node Manager"; Filename: "{app}\cygwin\etc\slapos\node\index.html"; WorkingDir: "{app}\cygwin\etc\slapos\node"; IconFilename: "{app}\imapges\manager.ico";
Name: "{group}\Register Node"; Filename: "{app}\cygwin\bin\bash.exe"; Parameters: "--login -i /etc/slapos/scripts/register-node.sh"; WorkingDir: "{app}\cygwin\etc\slapos\scripts"; IconFilename: "{app}\imapges\register.ico";
; Name: "{group}\Resilient Configuration"; Filename: "{app}\cygwin\bin\bash.exe"; Parameters: "--login -i /etc/slapos/scripts/re6stnet-configure"; WorkingDir: "{app}\cygwin\etc\slapos\scripts"; IconFilename: "{app}\imapges\configure.ico";
Name: "{group}\Command Console"; Filename: "{app}\cygwin\bin\bash.exe"; Parameters: "--login -i /opt/slapos/bin/slapconsole /etc/opt/slapos/slapos.cfg"; WorkingDir: "{app}\cygwin\etc\slapos\scripts"; IconFilename: "{app}\imapges\terminal.ico";
Name: "{group}\Update Center"; Filename: "{app}\cygwin\bin\bash.exe"; Parameters: "--login -i /etc/slapos/scripts/build-slapos.sh"; WorkingDir: "{app}\cygwin\etc\slapos\scripts"; IconFilename: "{app}\imapges\updater.ico";
Name: "{group}\User Guide"; Filename: "{app}\user-guide.html";
Name: "{group}\Read Me"; Filename: "{app}\readme.txt";
Name: "{group}\SlapOS.org"; Filename: "http://www.slapos.org/";
Name: "{group}\Uninstall SlapOS"; Filename: "{uninstallexe}";
[Run]
Filename: "{app}\setup-cygwin.bat"; Parameters: """{app}"" network"; StatusMsg: "Installing Cygwin...";
Filename: "{app}\cygwin\bin\bash.exe"; Parameters: "--login -i /etc/slapos/scripts/init-cygwin.sh"; WorkingDir: "{app}\cygwin\bin"; Description: "Configure Cygwin"; StatusMsg: "Configure Cygwin...";
Filename: "{app}\cygwin\bin\bash.exe"; Parameters: "--login -i /etc/slapos/scripts/build-slapos.sh"; WorkingDir: "{app}\cygwin\bin"; Description: "Builout process"; StatusMsg: "Building SlapOS...";
Filename: "{app}\cygwin\bin\bash.exe"; Parameters: "--login -i /etc/slapos/scripts/init-re6stnet.sh"; WorkingDir: "{app}\cygwin\bin"; Description: "Configure Re6stnet"; StatusMsg: "Configure Re6stnet...";
Filename: "cmd.exe"; Parameters: "/c {app}\cygwin\etc\postinstall\autorebase.bat.done"; WorkingDir: "{app}\cygwin"; Flags: runhidden;
[UninstallDelete]
Type: filesandordirs; Name: "{app}\cygwin" ;
Type: files; Name: "*.pyc";
Type: files; Name: "*.pyo";
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment