Skip to content

Instantly share code, notes, and snippets.

@Anime4000
Forked from shilrobot/package.sh
Created September 23, 2015 13:30
Show Gist options
  • Select an option

  • Save Anime4000/349f8f8bae3d6f2a06b7 to your computer and use it in GitHub Desktop.

Select an option

Save Anime4000/349f8f8bae3d6f2a06b7 to your computer and use it in GitHub Desktop.

Revisions

  1. @shilrobot shilrobot revised this gist Jun 27, 2012. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion package.sh
    Original file line number Diff line number Diff line change
    @@ -36,7 +36,7 @@ export CC="i686-pc-mingw32-gcc -U _WIN32"
    # --deps tells it to gather dependencies.
    # -o specifies the output file name.
    # YourGame.exe and OpenTK.dll can be replaced with whatever assemblies you need to include.
    # You don't need to specify system assemblies, mkbundle will pick them up.
    # You don't need to specify system assemblies, mkbundle will pick them up because of --deps.
    mkbundle YourGame.exe OpenTK.dll --deps -o Output.exe

    # Copy mono-2.0.dll here since Output.exe depends on it.
  2. @shilrobot shilrobot revised this gist Jun 27, 2012. 1 changed file with 4 additions and 1 deletion.
    5 changes: 4 additions & 1 deletion package.sh
    Original file line number Diff line number Diff line change
    @@ -2,6 +2,9 @@
    # If this doesn't work, ensure you have UNIX line endings in this file
    # (\n, not \r\n.) You can use Notepad++ to switch them.

    # Cygwin package requirements: gcc-mingw, pkg-config
    # If you want to pass -z to mkbundle: mingw-zlib1, mingw-zlib-devel

    # crash immediately if anything bad happens
    set -o errexit
    set -o nounset
    @@ -17,7 +20,7 @@ export PKG_CONFIG_PATH=$MONO/lib/pkgconfig

    # On Cygwin you used to be able to use gcc -mno-cygwin to make binaries
    # that didn't depend on cygwin. That doesn't work with the current gcc 4.x,
    # so I'm explicitly using the compiler installed by the mingw-gcc package,
    # so I'm explicitly using the compiler installed by the gcc-mingw package,
    # in case the user has normal, non-mingw gcc installed too.
    #
    # Another alternative would be to use an older version of GCC, e.g:
  3. @shilrobot shilrobot revised this gist Jun 27, 2012. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions package.sh
    Original file line number Diff line number Diff line change
    @@ -6,9 +6,9 @@
    set -o errexit
    set -o nounset

    # Use progra~1 if you have a 32-bit install
    # progra~2 is Program Files (x86) on windows, except without spaces in it,
    # progra~2 is Program Files (x86) on Windows x64, except without spaces in it,
    # which mkbundle seems to like better.
    # Use progra~1 if you have a 32-bit install.
    export MONO=/cygdrive/c/progra~2/Mono-2.10.8
    # Required to find mkbundle
    export PATH=$PATH:$MONO/bin
  4. @shilrobot shilrobot revised this gist Jun 27, 2012. 1 changed file with 4 additions and 4 deletions.
    8 changes: 4 additions & 4 deletions package.sh
    Original file line number Diff line number Diff line change
    @@ -9,11 +9,11 @@ set -o nounset
    # Use progra~1 if you have a 32-bit install
    # progra~2 is Program Files (x86) on windows, except without spaces in it,
    # which mkbundle seems to like better.
    export MONO_PATH=/cygdrive/c/progra~2/Mono-2.10.8
    export MONO=/cygdrive/c/progra~2/Mono-2.10.8
    # Required to find mkbundle
    export PATH=$PATH:$MONO_PATH/bin
    export PATH=$PATH:$MONO/bin
    # Required for the pkg-config call that mkbundle causes to work
    export PKG_CONFIG_PATH=$MONO_PATH/lib/pkgconfig
    export PKG_CONFIG_PATH=$MONO/lib/pkgconfig

    # On Cygwin you used to be able to use gcc -mno-cygwin to make binaries
    # that didn't depend on cygwin. That doesn't work with the current gcc 4.x,
    @@ -37,4 +37,4 @@ export CC="i686-pc-mingw32-gcc -U _WIN32"
    mkbundle YourGame.exe OpenTK.dll --deps -o Output.exe

    # Copy mono-2.0.dll here since Output.exe depends on it.
    cp $MONO_PATH/bin/mono-2.0.dll .
    cp $MONO/bin/mono-2.0.dll .
  5. @shilrobot shilrobot revised this gist Jun 27, 2012. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion package.sh
    Original file line number Diff line number Diff line change
    @@ -11,7 +11,7 @@ set -o nounset
    # which mkbundle seems to like better.
    export MONO_PATH=/cygdrive/c/progra~2/Mono-2.10.8
    # Required to find mkbundle
    export PATH=$MONO_PATH:$MONO_PATH/bin
    export PATH=$PATH:$MONO_PATH/bin
    # Required for the pkg-config call that mkbundle causes to work
    export PKG_CONFIG_PATH=$MONO_PATH/lib/pkgconfig

  6. @shilrobot shilrobot created this gist Jun 27, 2012.
    40 changes: 40 additions & 0 deletions package.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,40 @@
    #!/bin/bash
    # If this doesn't work, ensure you have UNIX line endings in this file
    # (\n, not \r\n.) You can use Notepad++ to switch them.

    # crash immediately if anything bad happens
    set -o errexit
    set -o nounset

    # Use progra~1 if you have a 32-bit install
    # progra~2 is Program Files (x86) on windows, except without spaces in it,
    # which mkbundle seems to like better.
    export MONO_PATH=/cygdrive/c/progra~2/Mono-2.10.8
    # Required to find mkbundle
    export PATH=$MONO_PATH:$MONO_PATH/bin
    # Required for the pkg-config call that mkbundle causes to work
    export PKG_CONFIG_PATH=$MONO_PATH/lib/pkgconfig

    # On Cygwin you used to be able to use gcc -mno-cygwin to make binaries
    # that didn't depend on cygwin. That doesn't work with the current gcc 4.x,
    # so I'm explicitly using the compiler installed by the mingw-gcc package,
    # in case the user has normal, non-mingw gcc installed too.
    #
    # Another alternative would be to use an older version of GCC, e.g:
    #
    # export CC="gcc-3 -mno-gycgin -U _WIN32"
    #
    # The -U _WIN32 undefines the _WIN32 symbol. The source code mkbundle executes
    # is totally broken on Win32 but actually works if you don't let it know
    # that it is on Win32.
    export CC="i686-pc-mingw32-gcc -U _WIN32"

    # Call Mono's mkbundle with your assemblies.
    # --deps tells it to gather dependencies.
    # -o specifies the output file name.
    # YourGame.exe and OpenTK.dll can be replaced with whatever assemblies you need to include.
    # You don't need to specify system assemblies, mkbundle will pick them up.
    mkbundle YourGame.exe OpenTK.dll --deps -o Output.exe

    # Copy mono-2.0.dll here since Output.exe depends on it.
    cp $MONO_PATH/bin/mono-2.0.dll .