Skip to content

Commit

Permalink
Merge pull request #83 from lucor/release/v1.1.3
Browse files Browse the repository at this point in the history
Release v1.1.3
  • Loading branch information
lucor authored Nov 2, 2021
2 parents dcb9528 + df5762e commit 72b92b1
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 13 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog - Fyne.io fyne-cross

## 1.1.3 - 02 Nov 2021

### Fixed

- Building for windows fails to add icon #66
- Fixes darwin image creation (SDK extraction) #80

## 1.1.2 - 05 Oct 2021

### Fixed
Expand Down
6 changes: 3 additions & 3 deletions docker/darwin/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ RUN curl -L https://github.com/tpoechtrager/osxcross/archive/${OSX_CROSS_COMMIT}
RUN ./tools/gen_sdk_package_tools_dmg.sh /tmp/command_line_tools_for_xcode.dmg

ARG SDK_VERSION
RUN echo "Available SDKs:" && ls -1 MacOSX*.tar.bz2 && \
RUN echo "Available SDKs:" && ls -1 MacOSX*.tar.* && \
if [ -z "$SDK_VERSION" ] ;\
then ls -1 MacOSX*.tar.bz2 | sort -Vr | head -1 | xargs -i mv {} tarballs ;\
else mv MacOSX*.tar.bz2 tarballs ; \
then ls -1 MacOSX*.tar.* | sort -Vr | head -1 | xargs -i mv {} tarballs ;\
else mv MacOSX*.tar.* tarballs ; \
fi

RUN UNATTENDED=yes SDK_VERSION=${SDK_VERSION} OSX_VERSION_MIN=${OSX_VERSION_MIN} ./build.sh
Expand Down
15 changes: 8 additions & 7 deletions internal/command/docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"fmt"
"os"
"os/user"
"path/filepath"
"runtime"
"strings"

Expand Down Expand Up @@ -330,8 +331,6 @@ func fyneRelease(ctx Context) error {
// that will be automatically linked by compliler during the build
func WindowsResource(ctx Context) (string, error) {

windres := ctx.Name + ".syso"

args := []string{
gowindresBin,
"-arch", ctx.Architecture.String(),
Expand All @@ -346,17 +345,19 @@ func WindowsResource(ctx Context) (string, error) {

err := Run(ctx.DockerImage, ctx.Volume, runOpts, args)
if err != nil {
return windres, fmt.Errorf("could not package the Fyne app: %v", err)
return "", fmt.Errorf("could not package the Fyne app: %v", err)
}

// copy the windows resource under the project root
// copy the windows resource under the package root
// it will be automatically linked by compiler during build
err = volume.Copy(volume.JoinPathHost(ctx.TmpDirHost(), ctx.ID, windres), volume.JoinPathHost(ctx.WorkDirHost(), windres))
windres := ctx.Name + ".syso"
out := filepath.Join(ctx.Package, windres)
err = volume.Copy(volume.JoinPathHost(ctx.TmpDirHost(), ctx.ID, windres), volume.JoinPathHost(ctx.WorkDirHost(), out))
if err != nil {
return windres, fmt.Errorf("could not copy windows resource under the project root: %v", err)
return "", fmt.Errorf("could not copy windows resource under the package root: %v", err)
}

return windres, nil
return out, nil
}

// pullImage attempts to pull a newer version of the docker image
Expand Down
6 changes: 3 additions & 3 deletions internal/resource/darwin_dockerfile.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ RUN curl -L https://github.com/tpoechtrager/osxcross/archive/${OSX_CROSS_COMMIT}
RUN ./tools/gen_sdk_package_tools_dmg.sh /tmp/command_line_tools_for_xcode.dmg
ARG SDK_VERSION
RUN echo "Available SDKs:" && ls -1 MacOSX*.tar.bz2 && \
RUN echo "Available SDKs:" && ls -1 MacOSX*.tar.* && \
if [ -z "$SDK_VERSION" ] ;\
then ls -1 MacOSX*.tar.bz2 | sort -Vr | head -1 | xargs -i mv {} tarballs ;\
else mv MacOSX*.tar.bz2 tarballs ; \
then ls -1 MacOSX*.tar.* | sort -Vr | head -1 | xargs -i mv {} tarballs ;\
else mv MacOSX*.tar.* tarballs ; \
fi
RUN UNATTENDED=yes SDK_VERSION=${SDK_VERSION} OSX_VERSION_MIN=${OSX_VERSION_MIN} ./build.sh
Expand Down

0 comments on commit 72b92b1

Please sign in to comment.