Removing conflicts
This commit is contained in:
parent
9e3f691519
commit
bdff22e1ea
|
@ -1,99 +0,0 @@
|
|||
name: Release
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'v*'
|
||||
|
||||
jobs:
|
||||
build-macos:
|
||||
runs-on: macos-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: stable
|
||||
- name: Rust Cache
|
||||
uses: Swatinem/rust-cache@v1.2.0
|
||||
- name: rust-cargo
|
||||
uses: actions-rs/cargo@v1.0.3
|
||||
with:
|
||||
command: install
|
||||
args: pyoxidizer
|
||||
- name: Build Hydrus
|
||||
run: |
|
||||
cd $GITHUB_WORKSPACE
|
||||
cp static/build_files/macos_pyoxidizer.bzl pyoxidizer.bzl
|
||||
basename $(rustc --print sysroot) | sed -e "s/^stable-//" > triple.txt
|
||||
pyoxidizer build --release
|
||||
cd build/$(head -n 1 triple.txt)/release
|
||||
mkdir -p "Hydrus Network.app/Contents/MacOS"
|
||||
mkdir -p "Hydrus Network.app/Contents/Resources"
|
||||
mkdir -p "Hydrus Network.app/Contents/Frameworks"
|
||||
mv install/static/icon.icns "Hydrus Network.app/Contents/Resources/icon.icns"
|
||||
cat > "Hydrus Network.app/Contents/Info.plist" <<EOF
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDisplayName</key>
|
||||
<string>client</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>MacOS/client</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string>icon.icns</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>client</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>client</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>0.0.0</string>
|
||||
<key>NSHighResolutionCapable</key>
|
||||
<string>True</string></dict>
|
||||
</plist>
|
||||
EOF
|
||||
cp install/static/build_files/ReadMeFirst.rtf ./ReadMeFirst.rtf
|
||||
ln -s /Applications ./Applications
|
||||
cp install/static/build_files/running_from_app "install/running_from_app"
|
||||
mv install/* "Hydrus Network.app/Contents/MacOS/"
|
||||
rm -rf install
|
||||
cd $GITHUB_WORKSPACE
|
||||
temp_dmg="$(mktemp).dmg"
|
||||
hdiutil create "$temp_dmg" -ov -volname "HydrusNetwork" -fs HFS+ -srcfolder "$GITHUB_WORKSPACE/build/$(head -n 1 triple.txt)/release"
|
||||
hdiutil convert "$temp_dmg" -format UDZO -o HydrusNetwork.dmg
|
||||
- name: Upload a Build Artifact
|
||||
uses: actions/upload-artifact@v2.2.1
|
||||
with:
|
||||
name: MacOS-DMG
|
||||
path: HydrusNetwork.dmg
|
||||
if-no-files-found: error
|
||||
retention-days: 2
|
||||
|
||||
create-release:
|
||||
name: Create Release Entry
|
||||
runs-on: ubuntu-20.04
|
||||
needs: [build-macos]
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
- name: Get All Artifacts
|
||||
uses: actions/download-artifact@v2
|
||||
- name: Extract version metadata
|
||||
id: meta
|
||||
run: |
|
||||
echo "::set-output name=version::${GITHUB_REF##*/}"
|
||||
echo "::set-output name=version_short::${GITHUB_REF##*/v}"
|
||||
- name: Rename Files
|
||||
run: |
|
||||
mv MacOS-DMG/HydrusNetwork.dmg Hydrus.Network.${{ steps.meta.outputs.version_short }}.-.macOS.-.App.dmg
|
||||
- name: Release new
|
||||
uses: softprops/action-gh-release@v1
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
with:
|
||||
files: |
|
||||
Hydrus.Network.${{ steps.meta.outputs.version_short }}.-.macOS.-.App.dmg
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
@ -1,99 +0,0 @@
|
|||
name: Release
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'v*'
|
||||
|
||||
jobs:
|
||||
build-macos:
|
||||
runs-on: macos-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: stable
|
||||
- name: Rust Cache
|
||||
uses: Swatinem/rust-cache@v1.2.0
|
||||
- name: rust-cargo
|
||||
uses: actions-rs/cargo@v1.0.3
|
||||
with:
|
||||
command: install
|
||||
args: pyoxidizer
|
||||
- name: Build Hydrus
|
||||
run: |
|
||||
cd $GITHUB_WORKSPACE
|
||||
cp static/build_files/macos_pyoxidizer.bzl pyoxidizer.bzl
|
||||
basename $(rustc --print sysroot) | sed -e "s/^stable-//" > triple.txt
|
||||
pyoxidizer build --release
|
||||
cd build/$(head -n 1 triple.txt)/release
|
||||
mkdir -p "Hydrus Network.app/Contents/MacOS"
|
||||
mkdir -p "Hydrus Network.app/Contents/Resources"
|
||||
mkdir -p "Hydrus Network.app/Contents/Frameworks"
|
||||
mv install/static/icon.icns "Hydrus Network.app/Contents/Resources/icon.icns"
|
||||
cat > "Hydrus Network.app/Contents/Info.plist" <<EOF
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDisplayName</key>
|
||||
<string>client</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>MacOS/client</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string>icon.icns</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>client</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>client</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>0.0.0</string>
|
||||
<key>NSHighResolutionCapable</key>
|
||||
<string>True</string></dict>
|
||||
</plist>
|
||||
EOF
|
||||
cp install/static/build_files/ReadMeFirst.rtf ./ReadMeFirst.rtf
|
||||
ln -s /Applications ./Applications
|
||||
cp install/static/build_files/running_from_app "install/running_from_app"
|
||||
mv install/* "Hydrus Network.app/Contents/MacOS/"
|
||||
rm -rf install
|
||||
cd $GITHUB_WORKSPACE
|
||||
temp_dmg="$(mktemp).dmg"
|
||||
hdiutil create "$temp_dmg" -ov -volname "HydrusNetwork" -fs HFS+ -srcfolder "$GITHUB_WORKSPACE/build/$(head -n 1 triple.txt)/release"
|
||||
hdiutil convert "$temp_dmg" -format UDZO -o HydrusNetwork.dmg
|
||||
- name: Upload a Build Artifact
|
||||
uses: actions/upload-artifact@v2.2.1
|
||||
with:
|
||||
name: MacOS-DMG
|
||||
path: HydrusNetwork.dmg
|
||||
if-no-files-found: error
|
||||
retention-days: 2
|
||||
|
||||
create-release:
|
||||
name: Create Release Entry
|
||||
runs-on: ubuntu-20.04
|
||||
needs: [build-macos]
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
- name: Get All Artifacts
|
||||
uses: actions/download-artifact@v2
|
||||
- name: Extract version metadata
|
||||
id: meta
|
||||
run: |
|
||||
echo "::set-output name=version::${GITHUB_REF##*/}"
|
||||
echo "::set-output name=version_short::${GITHUB_REF##*/v}"
|
||||
- name: Rename Files
|
||||
run: |
|
||||
mv MacOS-DMG/HydrusNetwork.dmg Hydrus.Network.${{ steps.meta.outputs.version_short }}.-.macOS.-.App.dmg
|
||||
- name: Release new
|
||||
uses: softprops/action-gh-release@v1
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
with:
|
||||
files: |
|
||||
Hydrus.Network.${{ steps.meta.outputs.version_short }}.-.macOS.-.App.dmg
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
@ -1,63 +0,0 @@
|
|||
def make_dist():
|
||||
return default_python_distribution()
|
||||
|
||||
def make_packaging_policy(dist):
|
||||
policy = dist.make_python_packaging_policy()
|
||||
policy.set_resource_handling_mode("files")
|
||||
policy.resources_location = "filesystem-relative:lib"
|
||||
policy.allow_files = True
|
||||
policy.bytecode_optimize_level_zero = True
|
||||
|
||||
return policy
|
||||
|
||||
def make_client(dist, policy):
|
||||
python_config = dist.make_python_interpreter_config()
|
||||
python_config.module_search_paths = ["$ORIGIN", "$ORIGIN/lib"]
|
||||
python_config.filesystem_importer = True
|
||||
python_config.sys_frozen = True
|
||||
python_config.run_command = "import os; import sys; exec(open(os.path.join(os.path.split(sys.executable)[0], 'client.py')).read())"
|
||||
|
||||
client = dist.to_python_executable(
|
||||
name="client",
|
||||
packaging_policy=policy,
|
||||
config=python_config,
|
||||
)
|
||||
|
||||
client.add_python_resources(client.pip_install(["--prefer-binary", "-r", "requirements_macos.txt"]))
|
||||
|
||||
return client
|
||||
|
||||
def make_embedded_resources(client):
|
||||
return client.to_embedded_resources()
|
||||
|
||||
def make_install(client, resources):
|
||||
files = FileManifest()
|
||||
files.add_python_resource(".", client)
|
||||
|
||||
static_resources = glob(["./*.py", "./*.md", "./*txt", "./static/**/*", "./help/**/*"], strip_prefix="{}/".format(CWD))
|
||||
files.add_manifest(static_resources)
|
||||
|
||||
hydrus_source = glob(["./hydrus/**/*.py"], strip_prefix="{}/".format(CWD))
|
||||
files.add_manifest(hydrus_source)
|
||||
|
||||
return files
|
||||
|
||||
print(BUILD_TARGET_TRIPLE)
|
||||
print(CWD)
|
||||
|
||||
# Tell PyOxidizer about the build targets defined above.
|
||||
register_target("dist", make_dist)
|
||||
register_target("policy", make_packaging_policy, depends=["dist"])
|
||||
register_target("client", make_client, depends=["dist", "policy"])
|
||||
register_target("resources", make_embedded_resources, depends=["client"], default_build_script=True)
|
||||
register_target("install", make_install, depends=["client", "resources"], default=True)
|
||||
|
||||
resolve_targets()
|
||||
|
||||
# END OF COMMON USER-ADJUSTED SETTINGS.
|
||||
#
|
||||
# Everything below this is typically managed by PyOxidizer and doesn't need
|
||||
# to be updated by people.
|
||||
|
||||
PYOXIDIZER_VERSION = "0.10.3"
|
||||
PYOXIDIZER_COMMIT = "UNKNOWN"
|
Loading…
Reference in New Issue