Compare commits
9 Commits
67d7ef1a18
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| a163c71a9b | |||
| ed9cbdbccd | |||
| fd512f0f8c | |||
| 67bd8f242a | |||
| 3428fd76fa | |||
| b310eda639 | |||
| 43b7bb2152 | |||
| 05e9981c7e | |||
| 3bdcec3443 |
3
.gitmodules
vendored
3
.gitmodules
vendored
@@ -1,3 +0,0 @@
|
|||||||
[submodule "Windows-10"]
|
|
||||||
path = Windows-10
|
|
||||||
url = https://github.com/B00merang-Project/Windows-10.git
|
|
||||||
@@ -6,7 +6,7 @@ RUN useradd -ms /bin/bash rust
|
|||||||
ADD peldd /usr/bin/peldd
|
ADD peldd /usr/bin/peldd
|
||||||
ADD package.sh /usr/bin/package.sh
|
ADD package.sh /usr/bin/package.sh
|
||||||
|
|
||||||
RUN dnf install -y mingw64-gcc mingw64-freetype mingw64-cairo mingw64-harfbuzz mingw64-pango mingw64-poppler mingw64-gtk3 mingw64-winpthreads-static mingw64-glib2-static gcc boost zip && dnf clean all -y
|
RUN dnf install -y mingw64-gcc mingw64-freetype mingw64-cairo mingw64-harfbuzz mingw64-pango mingw64-poppler mingw64-gtk3 mingw64-winpthreads-static mingw64-glib2-static gcc boost zip git cmake @development-tools && dnf clean all -y
|
||||||
|
|
||||||
USER rust
|
USER rust
|
||||||
|
|
||||||
@@ -18,7 +18,6 @@ RUN . ~/.cargo/env && \
|
|||||||
rustup target add x86_64-pc-windows-gnu
|
rustup target add x86_64-pc-windows-gnu
|
||||||
|
|
||||||
ADD cargo.config /home/rust/.cargo/config
|
ADD cargo.config /home/rust/.cargo/config
|
||||||
ADD Windows-10 /home/rust/Windows10
|
|
||||||
|
|
||||||
ENV PKG_CONFIG_ALLOW_CROSS=1
|
ENV PKG_CONFIG_ALLOW_CROSS=1
|
||||||
ENV PKG_CONFIG_PATH=/usr/x86_64-w64-mingw32/sys-root/mingw/lib/pkgconfig/
|
ENV PKG_CONFIG_PATH=/usr/x86_64-w64-mingw32/sys-root/mingw/lib/pkgconfig/
|
||||||
@@ -33,6 +32,6 @@ CMD ["/usr/bin/package.sh"]
|
|||||||
# $ docker build . -t PROJECTNAME-build-image
|
# $ docker build . -t PROJECTNAME-build-image
|
||||||
# 3) Creating a container with the source mounted the image (which kicks off the build):
|
# 3) Creating a container with the source mounted the image (which kicks off the build):
|
||||||
# $ docker create -v `pwd`:/home/rust/src --name PROJECTNAME-build PROJECTNAME-build-image
|
# $ docker create -v `pwd`:/home/rust/src --name PROJECTNAME-build PROJECTNAME-build-image
|
||||||
# 4) Each time you want to build the project, start the Docker container.
|
# 4) Each time you want to build the project, start the Docker container.
|
||||||
# Add "-ai" to watch the build progress.
|
# Add "-ai" to watch the build progress.
|
||||||
# $ docker start PROJECTNAME-build
|
# $ docker start PROJECTNAME-build
|
||||||
|
|||||||
14
README.md
Normal file
14
README.md
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
# docker-rust-cross
|
||||||
|
|
||||||
|
forked from https://github.com/etrombly/rust-crosscompile
|
||||||
|
|
||||||
|
adds git (anything else?)
|
||||||
|
|
||||||
|
## usage
|
||||||
|
|
||||||
|
```fish
|
||||||
|
docker pull synthruiner/rust-cross
|
||||||
|
cd /path/to/your/project
|
||||||
|
docker create -v (pwd):/home/rust/src --name YOURPROJECTNAME-build synthruiner/rust-cross
|
||||||
|
docker start YOURPROJECTNAME-build -ai
|
||||||
|
```
|
||||||
Submodule Windows-10 deleted from 06dd5b8778
21
package.sh
21
package.sh
@@ -1,29 +1,22 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
source ~/.cargo/env
|
source /home/rust/.cargo/env
|
||||||
cargo build --target=x86_64-pc-windows-gnu --release
|
cargo build --target=x86_64-pc-windows-gnu --release
|
||||||
|
|
||||||
mkdir package
|
mkdir package
|
||||||
cp target/x86_64-pc-windows-gnu/release/*.exe package
|
cp target/x86_64-pc-windows-gnu/release/*.exe package
|
||||||
|
|
||||||
export DLLS=`peldd package/*.exe -t --ignore-errors`
|
DLLS=$(peldd package/*.exe -t --ignore-errors)
|
||||||
|
export DLLS
|
||||||
|
|
||||||
for DLL in $DLLS
|
for DLL in $DLLS
|
||||||
do cp "$DLL" package
|
do cp "$DLL" package
|
||||||
done
|
done
|
||||||
|
|
||||||
mkdir -p package/share/{themes,gtk-3.0}
|
mkdir -p package/share/{themes,gtk-3.0}
|
||||||
cp -r $GTK_INSTALL_PATH/share/glib-2.0/schemas package/share/glib-2.0
|
cp -r "$GTK_INSTALL_PATH"/share/glib-2.0/schemas package/share/glib-2.0
|
||||||
cp -r $GTK_INSTALL_PATH/share/icons package/share/icons
|
cp -r "$GTK_INSTALL_PATH"/share/icons package/share/icons
|
||||||
cp -r ~/Windows10 package/share/themes
|
|
||||||
|
|
||||||
cat << EOF > package/share/gtk-3.0/settings.ini
|
|
||||||
[Settings]
|
|
||||||
gtk-theme-name = Windows10
|
|
||||||
gtk-font-name = Segoe UI 10
|
|
||||||
gtk-xft-rgba = rgb
|
|
||||||
gtk-xft-antialias = 1
|
|
||||||
EOF
|
|
||||||
|
|
||||||
mingw-strip package/*
|
mingw-strip package/*
|
||||||
|
|
||||||
zip -r package.zip package/*
|
zip -q -r package.zip package/*
|
||||||
|
|||||||
Reference in New Issue
Block a user