diff --git a/.github/workflows/linux-dev.yml b/.github/workflows/linux-dev.yml deleted file mode 100644 index 031a0ee4..00000000 --- a/.github/workflows/linux-dev.yml +++ /dev/null @@ -1,47 +0,0 @@ -name: Linux Dev - -on: - - workflow_dispatch - - workflow_call - -jobs: - build: - name: Build - runs-on: ubuntu-latest - - steps: - - name: Checkout repo - uses: actions/checkout@v3 - with: - lfs: true - - - name: Checkout LFS objects - run: git lfs checkout - - - name: Set up Haxe - uses: krdlab/setup-haxe@v1.5.1 - with: - haxe-version: 4.3.3 - - - name: Install dependencies - run: | - haxelib install hxcpp - haxelib git openfl https://github.com/openfl/openfl.git develop - haxelib run openfl setup - haxelib git feathersui https://github.com/feathersui/feathersui-openfl.git - haxelib git champaign https://github.com/Moonshine-IDE/Champaign.git - - - name: Build project - run: | - haxelib run openfl build project.xml linux -debug -Dlogverbose -Dlogcolor -Dgitsha=${{ github.sha }} -Dgitbranch=${{ github.ref_name }} - - - name: Compress artifacts - run: | - cd Export/Development/linux/bin/ - tar czfv SuperHumanInstallerDev.tar.gz * - - - name: Upload artifacts - uses: actions/upload-artifact@v3 - with: - name: SuperHumanInstallerDev - path: Export/Development/linux/bin/SuperHumanInstallerDev.tar.gz diff --git a/.github/workflows/linux-prod.yml b/.github/workflows/linux-prod.yml deleted file mode 100644 index 98b6e097..00000000 --- a/.github/workflows/linux-prod.yml +++ /dev/null @@ -1,47 +0,0 @@ -name: Linux Prod - -on: - - workflow_dispatch - - workflow_call - -jobs: - build: - name: Build - runs-on: ubuntu-latest - - steps: - - name: Checkout repo - uses: actions/checkout@v3 - with: - lfs: true - - - name: Checkout LFS objects - run: git lfs checkout - - - name: Set up Haxe - uses: krdlab/setup-haxe@v1.5.1 - with: - haxe-version: 4.3.3 - - - name: Install dependencies - run: | - haxelib install hxcpp - haxelib git openfl https://github.com/openfl/openfl.git develop - haxelib run openfl setup - haxelib git feathersui https://github.com/feathersui/feathersui-openfl.git - haxelib git champaign https://github.com/Moonshine-IDE/Champaign.git - - - name: Build project - run: | - haxelib run openfl build project.xml linux -Dgitsha=${{ github.sha }} -Dgitbranch=${{ github.ref_name }} - - - name: Compress artifacts - run: | - cd Export/Production/linux/bin/ - tar czfv SuperHumanInstaller.tar.gz * - - - name: Upload artifacts - uses: actions/upload-artifact@v3 - with: - name: SuperHumanInstaller - path: Export/Production/linux/bin/SuperHumanInstaller.tar.gz diff --git a/.github/workflows/linux-tmp.yml b/.github/workflows/linux-tmp.yml deleted file mode 100644 index 2e885dbc..00000000 --- a/.github/workflows/linux-tmp.yml +++ /dev/null @@ -1,43 +0,0 @@ -name: Linux Tmp Dev - -on: - - workflow_dispatch - - workflow_call - -jobs: - build: - name: Build - runs-on: ubuntu-latest - - steps: - - name: Checkout repo - uses: actions/checkout@v3 - with: - lfs: true - - - name: Checkout LFS objects - run: git lfs checkout - - - name: Set up Haxe - uses: krdlab/setup-haxe@v1 - with: - haxe-version: 4.2.5 - - - name: Install dependencies - run: | - haxelib install hxcpp - haxelib install openfl - haxelib run openfl setup - haxelib install feathersui - - - name: Build project - run: | - haxelib run openfl build project.xml linux -debug -Dlogverbose -Dlogcolor - - - name: Create AppImage - run: | - mkdir Templates/SuperHumanInstallerDev.AppDir/usr - mv Export/Development/linux/bin Templates/SuperHumanInstallerDev.AppDir/usr/ - mkdir Templates/SuperHumanInstallerDev.AppDir/usr/lib - appimagetool Templates/SuperHumanInstallerDev.AppDir/ - ls -R diff --git a/.github/workflows/macos-dev.yml b/.github/workflows/macos-dev.yml deleted file mode 100644 index c36c7791..00000000 --- a/.github/workflows/macos-dev.yml +++ /dev/null @@ -1,176 +0,0 @@ -name: MacOS Dev - -on: - - workflow_dispatch - - workflow_call - -jobs: - build: - name: Build - runs-on: macos-latest - - steps: - - name: Checkout repo - uses: actions/checkout@v3 - with: - lfs: true - - - name: Checkout LFS objects - run: git lfs checkout - - - name: Read version - id: readversion - uses: mavrosxristoforos/get-xml-info@1.1.1 - with: - xml-file: 'project.xml' - xpath: '/project/meta/@version' - - - name: Set up Haxe - uses: krdlab/setup-haxe@v1.5.1 - with: - haxe-version: 4.3.3 - - - name: Install dependencies - run: | - haxelib install hxcpp - git clone --recursive --depth 1 --branch develop https://github.com/openfl/lime - haxelib dev lime lime - haxelib install format - haxelib install hxp - haxelib git lime-samples https://github.com/openfl/lime-samples - haxelib git openfl https://github.com/openfl/openfl.git develop - haxelib run openfl setup - haxelib git feathersui https://github.com/feathersui/feathersui-openfl.git - haxelib git champaign https://github.com/Moonshine-IDE/Champaign.git - - - name: Build project - run: | - haxelib run openfl build project.xml mac -debug -Dlogverbose -Dlogcolor -Dverbose_process_logs -DCHAMPAIGN_DEBUG=true -Dgitsha=${{ github.sha }} -Dgitbranch=${{ github.ref_name }} - - - name: Create keychain - env: - MAC_KEYCHAIN_PASS: ${{ secrets.MAC_KEYCHAIN_PASS }} - run: | - security create-keychain -p "$MAC_KEYCHAIN_PASS" build.keychain - echo "Keychain created" - security set-keychain-settings -lut 21600 build.keychain - echo "Keychain settings set" - security default-keychain -s build.keychain - echo "Keychain made default" - security unlock-keychain -p "$MAC_KEYCHAIN_PASS" build.keychain - echo "Keychain unlocked" - - - name: Import certificates - env: - MAC_APPLICATION_CERTKEY: ${{ secrets.MAC_APPLICATION_CERTKEY }} - MAC_INSTALLER_CERTKEY: ${{ secrets.MAC_INSTALLER_CERTKEY }} - MAC_CERTKEY_PASS: ${{ secrets.MAC_CERTKEY_PASS }} - run: | - echo "$MAC_APPLICATION_CERTKEY" | base64 --decode > application_certkey.p12 - echo "$MAC_INSTALLER_CERTKEY" | base64 --decode > installer_certkey.p12 - - security import ./application_certkey.p12 \ - -k build.keychain \ - -f pkcs12 \ - -P "$MAC_CERTKEY_PASS" \ - -T /usr/bin/codesign \ - -T /usr/bin/productsign - - security import ./installer_certkey.p12 \ - -k build.keychain \ - -f pkcs12 \ - -P "$MAC_CERTKEY_PASS" \ - -T /usr/bin/codesign \ - -T /usr/bin/productsign - - - name: Allow codesign and productsign to use keychain - env: - MAC_KEYCHAIN_PASS: ${{ secrets.MAC_KEYCHAIN_PASS }} - run: | - security set-key-partition-list \ - -S apple-tool:,apple:,codesign:,productsign: \ - -s \ - -k "$MAC_KEYCHAIN_PASS" \ - build.keychain - - - name: Sign contents - run: | - codesign Export/Development/macos/bin/SuperHumanInstallerDev.app \ - --sign "Developer ID Application" \ - --options runtime \ - --force \ - --timestamp \ - --verbose \ - --deep - - - name: Verify singature - run: | - codesign Export/Development/macos/bin/SuperHumanInstallerDev.app \ - --display \ - --verbose \ - -r- - - codesign Export/Development/macos/bin/SuperHumanInstallerDev.app \ - --verify \ - --verbose - - - name: Create package - env: - VERSION: ${{ steps.readversion.outputs.info }} - run: | - productbuild \ - --version "$VERSION" \ - --product Templates/installer/SuperHumanInstaller.template.plist \ - --identifier net.prominic.genesis.superhumaninstallerdev \ - --component Export/Development/macos/bin/SuperHumanInstallerDev.app \ - /Applications \ - ./SuperHumanInstallerDev-Setup-Unsigned.pkg - - - name: Sign installer - run: | - productsign \ - --timestamp \ - --sign "Developer ID Installer" \ - ./SuperHumanInstallerDev-Setup-Unsigned.pkg \ - ./SuperHumanInstallerDev-Setup.pkg - - - name: "Notarize app bundle" - env: - MAC_NOTARIZATION_APPLE_ID: ${{ secrets.MAC_NOTARIZATION_APPLE_ID }} - MAC_NOTARIZATION_TEAM_ID: ${{ secrets.MAC_NOTARIZATION_TEAM_ID }} - MAC_NOTARIZATION_PASS: ${{ secrets.MAC_NOTARIZATION_PASS }} - run: | - # Store the notarization credentials so that we can prevent a UI password dialog - # from blocking the CI - echo "Create keychain profile" - xcrun notarytool \ - store-credentials "notarytool-profile" \ - --apple-id "$MAC_NOTARIZATION_APPLE_ID" \ - --team-id "$MAC_NOTARIZATION_TEAM_ID" \ - --password "$MAC_NOTARIZATION_PASS" - - echo "Notarize app" - xcrun notarytool \ - submit ./SuperHumanInstallerDev-Setup.pkg \ - --keychain-profile "notarytool-profile" \ - --wait - - echo "Attach staple" - xcrun stapler \ - staple ./SuperHumanInstallerDev-Setup.pkg - - - name: Verify installer signature - run: | - pkgutil --check-signature ./SuperHumanInstallerDev-Setup.pkg - spctl \ - --assess \ - --type install \ - --verbose \ - --verbose \ - ./SuperHumanInstallerDev-Setup.pkg - - - name: Upload artifacts - uses: actions/upload-artifact@v3 - with: - name: SuperHumanInstallerDev-Setup - path: ./SuperHumanInstallerDev-Setup.pkg diff --git a/.github/workflows/macos-prod.yml b/.github/workflows/macos-prod.yml deleted file mode 100644 index 25ebc15e..00000000 --- a/.github/workflows/macos-prod.yml +++ /dev/null @@ -1,174 +0,0 @@ -name: MacOS Prod - -on: - - workflow_dispatch - - workflow_call - -jobs: - build: - name: Build - runs-on: macOS-12 - - steps: - - name: Checkout repo - uses: actions/checkout@v3 - with: - lfs: true - - - name: Checkout LFS objects - run: git lfs checkout - - - name: Read version - id: readversion - uses: mavrosxristoforos/get-xml-info@1.1.1 - with: - xml-file: 'project.xml' - xpath: '/project/meta/@version' - - - name: Set up Haxe - uses: krdlab/setup-haxe@v1.5.1 - with: - haxe-version: 4.3.3 - - - name: Install dependencies - run: | - haxelib install hxcpp - git clone --recursive --depth 1 --branch develop https://github.com/openfl/lime - haxelib dev lime lime - haxelib install format - haxelib install hxp - haxelib git lime-samples https://github.com/openfl/lime-samples - haxelib git openfl https://github.com/openfl/openfl.git develop - haxelib run openfl setup - haxelib git feathersui https://github.com/feathersui/feathersui-openfl.git - haxelib git champaign https://github.com/Moonshine-IDE/Champaign.git - - - name: Build project - run: | - haxelib run openfl build project.xml mac -Dgitsha=${{ github.sha }} -Dgitbranch=${{ github.ref_name }} - - - name: Create keychain - env: - MAC_KEYCHAIN_PASS: ${{ secrets.MAC_KEYCHAIN_PASS }} - run: | - security create-keychain -p "$MAC_KEYCHAIN_PASS" build.keychain - echo "Keychain created" - security set-keychain-settings -lut 21600 build.keychain - echo "Keychain settings set" - security default-keychain -s build.keychain - echo "Keychain made default" - security unlock-keychain -p "$MAC_KEYCHAIN_PASS" build.keychain - echo "Keychain unlocked" - - - name: Import certificates - env: - MAC_APPLICATION_CERTKEY: ${{ secrets.MAC_APPLICATION_CERTKEY }} - MAC_INSTALLER_CERTKEY: ${{ secrets.MAC_INSTALLER_CERTKEY }} - MAC_CERTKEY_PASS: ${{ secrets.MAC_CERTKEY_PASS }} - run: | - echo "$MAC_APPLICATION_CERTKEY" | base64 --decode > application_certkey.p12 - echo "$MAC_INSTALLER_CERTKEY" | base64 --decode > installer_certkey.p12 - - security import ./application_certkey.p12 \ - -k build.keychain \ - -f pkcs12 \ - -P "$MAC_CERTKEY_PASS" \ - -T /usr/bin/codesign \ - -T /usr/bin/productsign - - security import ./installer_certkey.p12 \ - -k build.keychain \ - -f pkcs12 \ - -P "$MAC_CERTKEY_PASS" \ - -T /usr/bin/codesign \ - -T /usr/bin/productsign - - - name: Allow codesign and productsign to use keychain - env: - MAC_KEYCHAIN_PASS: ${{ secrets.MAC_KEYCHAIN_PASS }} - run: | - security set-key-partition-list \ - -S apple-tool:,apple:,codesign:,productsign: \ - -s \ - -k "$MAC_KEYCHAIN_PASS" \ - build.keychain - - - name: Sign contents - run: | - codesign Export/Production/macos/bin/SuperHumanInstaller.app \ - --sign "Developer ID Application" \ - --options runtime \ - --force \ - --timestamp \ - --verbose \ - --deep - - - name: Verify singature - run: | - codesign Export/Production/macos/bin/SuperHumanInstaller.app \ - --display \ - --verbose \ - -r- - - codesign Export/Production/macos/bin/SuperHumanInstaller.app \ - --verify \ - --verbose - - - name: Create package - run: | - productbuild \ - --version ${{ steps.readversion.outputs.info }} \ - --product Templates/installer/SuperHumanInstaller.template.plist \ - --identifier net.prominic.genesis.superhumaninstaller \ - --component Export/Production/macos/bin/SuperHumanInstaller.app \ - /Applications \ - ./SuperHumanInstaller-Setup-Unsigned.pkg - - - name: Sign installer - run: | - productsign \ - --timestamp \ - --sign "Developer ID Installer" \ - ./SuperHumanInstaller-Setup-Unsigned.pkg \ - ./SuperHumanInstaller-Setup.pkg - - - name: "Notarize app bundle" - env: - MAC_NOTARIZATION_APPLE_ID: ${{ secrets.MAC_NOTARIZATION_APPLE_ID }} - MAC_NOTARIZATION_TEAM_ID: ${{ secrets.MAC_NOTARIZATION_TEAM_ID }} - MAC_NOTARIZATION_PASS: ${{ secrets.MAC_NOTARIZATION_PASS }} - run: | - # Store the notarization credentials so that we can prevent a UI password dialog - # from blocking the CI - echo "Create keychain profile" - xcrun notarytool \ - store-credentials "notarytool-profile" \ - --apple-id "$MAC_NOTARIZATION_APPLE_ID" \ - --team-id "$MAC_NOTARIZATION_TEAM_ID" \ - --password "$MAC_NOTARIZATION_PASS" - - echo "Notarize app" - xcrun notarytool \ - submit ./SuperHumanInstaller-Setup.pkg \ - --keychain-profile "notarytool-profile" \ - --wait - - echo "Attach staple" - xcrun stapler \ - staple ./SuperHumanInstaller-Setup.pkg - - - name: Verify installer signature - run: | - pkgutil --check-signature ./SuperHumanInstaller-Setup.pkg - spctl \ - --assess \ - --type install \ - --verbose \ - --verbose \ - ./SuperHumanInstaller-Setup.pkg - - - name: Upload artifacts - uses: actions/upload-artifact@v3 - with: - name: SuperHumanInstaller-Setup - path: ./SuperHumanInstaller-Setup.pkg diff --git a/.github/workflows/man-release.yml b/.github/workflows/man-release.yml index 9779b0bb..ad738d21 100644 --- a/.github/workflows/man-release.yml +++ b/.github/workflows/man-release.yml @@ -2,13 +2,127 @@ name: Manual - Release on: workflow_dispatch: - workflow_call: + inputs: + env: + description: "An Environment" + required: true + type: choice + options: + - Development + - Production + version: + description: "A Version" + required: true + type: string + caching: + description: "Use caching" + required: true + type: boolean + default: false + +env: + app_name: ${{ inputs.env == 'Production' && 'SuperHumanInstaller' || 'SuperHumanInstallerDev' }} + app_id: net.prominic.genesis.${{ inputs.env == 'Production' && 'superhumaninstaller' || 'superhumaninstallerdev' }} + full_version: ${{ inputs.version }}.${{ github.run_number }} + tag: v${{ inputs.version }}${{ inputs.env == 'Production' && ' ' || '-dev' }} jobs: - build: + build-linux: + name: Build on Linux + uses: Moonshine-IDE/Super.Human.Installer/.github/workflows/sub-build-linux.yml@master + secrets: inherit + with: + env: ${{ inputs.env }} + version: ${{ inputs.version }} + caching: ${{ inputs.caching }} + + build-windows: + name: Build on Windows + uses: Moonshine-IDE/Super.Human.Installer/.github/workflows/sub-build-windows.yml@master + secrets: inherit + with: + env: ${{ inputs.env }} + version: ${{ inputs.version }} + caching: ${{ inputs.caching }} + + build-macos: + name: Build on MacOS + uses: Moonshine-IDE/Super.Human.Installer/.github/workflows/sub-build-macos.yml@master + secrets: inherit + with: + env: ${{ inputs.env }} + version: ${{ inputs.version }} + caching: ${{ inputs.caching }} + + release: + name: Draft Release + needs: [build-linux, build-windows, build-macos] runs-on: ubuntu-latest steps: - - name: Build info + - name: Print info run: | - echo "Stub flow" \ No newline at end of file + echo "Ref: ${{ github.ref_name }}" + echo "Env: ${{ inputs.env }}" + echo "Version: ${{ env.full_version }}" + echo "App Name: ${{ env.app_name }}" + echo "App ID: ${{ env.app_id }}" + echo "Tag: ${{ env.tag }}" + + - name: Checkout repo + uses: actions/checkout@v4 + + - name: Download linux installer + uses: actions/download-artifact@v4 + with: + name: ${{ env.app_name }}-linux-installer + + - name: Download windows installer + uses: actions/download-artifact@v4 + with: + name: ${{ env.app_name }}-windows-installer + + - name: Download windows chocolatey package + uses: actions/download-artifact@v4 + with: + name: ${{ env.app_name }}-Choco + + - name: Download macos installer + uses: actions/download-artifact@v4 + with: + name: ${{ env.app_name }}-macos-installer + + - name: Get Current Time + id: current-time + uses: josStorer/get-current-time@v2.1.1 + + - name: Generate buildinfo + uses: devops-actions/json-to-file@v1.0.3 + with: + json: | + { + "workflow": "development", + "version": "${{ env.full_version }}", + "branch": "${{ github.ref_name }}", + "commit_sha": "${{ github.sha }}", + "build_date": "${{ steps.current-time.outputs.readableTime }}" + } + filename: buildinfo.json + + - name: Create release + uses: softprops/action-gh-release@v1 + with: + name: Super.Human.Installer v${{ inputs.version }} ${{ inputs.env }} + tag_name: ${{ env.tag }} + target_commitish: ${{ github.sha }} + body: | + This is a ${{ inputs.env }} release of Super.Human.Installer. + draft: true + prerelease: ${{ inputs.env == 'Development' }} + files: | + ${{ env.app_name }}-x86_64.AppImage + ${{ env.app_name }}-Setup.pkg + ${{ env.app_name }}-Setup.exe + ${{ env.app_name }}-Choco.nupkg + buildinfo.json + fail_on_unmatched_files: true \ No newline at end of file diff --git a/.github/workflows/release-dev.yml b/.github/workflows/release-dev.yml deleted file mode 100644 index b9d87bcd..00000000 --- a/.github/workflows/release-dev.yml +++ /dev/null @@ -1,89 +0,0 @@ -name: Release Development -on: workflow_dispatch - -jobs: - build-linux: - name: Build on Linux - uses: Moonshine-IDE/Super.Human.Installer/.github/workflows/linux-dev.yml@master - secrets: inherit - - build-windows: - name: Build on Windows - uses: Moonshine-IDE/Super.Human.Installer/.github/workflows/windows-dev.yml@master - secrets: inherit - - build-macos: - name: Build on MacOS - uses: Moonshine-IDE/Super.Human.Installer/.github/workflows/macos-dev.yml@master - secrets: inherit - - release: - name: Draft Development Release - needs: [build-linux, build-windows, build-macos] - runs-on: ubuntu-latest - - steps: - - name: Checkout repo - uses: actions/checkout@v3 - - - name: Get Current Time - id: current-time - uses: josStorer/get-current-time@v2.0.2 - - - name: Read version - id: readversion - uses: mavrosxristoforos/get-xml-info@1.1.1 - with: - xml-file: 'project.xml' - xpath: '/project/meta/@version' - - - name: Download macOS installer - uses: actions/download-artifact@v3 - with: - name: SuperHumanInstallerDev-Setup - - - name: Download windows installer - uses: actions/download-artifact@v3 - with: - name: SuperHumanInstallerDev-Setup - - - name: Download choco package - uses: actions/download-artifact@v3 - with: - name: SuperHumanInstallerDev-Choco - - - name: Download linux installer - uses: actions/download-artifact@v3 - with: - name: SuperHumanInstallerDev - - - name: json-to-file - uses: devops-actions/json-to-file@v1.0.1 - with: - json: | - { - "workflow": "development", - "version": "${{ steps.readversion.outputs.info }}", - "branch": "${{ github.ref_name }}", - "commit_sha": "${{ github.sha }}", - "build_date": "${{ steps.current-time.outputs.readableTime }}" - } - filename: buildinfo.json - - - name: Create release - uses: softprops/action-gh-release@v1 - with: - name: Development Release - tag_name: ${{ steps.readversion.outputs.info }}-dev - body: | - This is a Development Release of Super.Human.Installer. - It is not intended for production use. - draft: false - prerelease: true - files: | - SuperHumanInstallerDev-Setup.pkg - SuperHumanInstallerDev-Setup.exe - SuperHumanInstallerDev.tar.gz - SuperHumanInstallerDev-Choco.nupkg - buildinfo.json - fail_on_unmatched_files: true diff --git a/.github/workflows/release-prod.yml b/.github/workflows/release-prod.yml deleted file mode 100644 index 272c7704..00000000 --- a/.github/workflows/release-prod.yml +++ /dev/null @@ -1,88 +0,0 @@ -name: Release Production -on: workflow_dispatch - -jobs: - build-linux: - name: Build on Linux - uses: Moonshine-IDE/Super.Human.Installer/.github/workflows/linux-prod.yml@master - secrets: inherit - - build-windows: - name: Build on Windows - uses: Moonshine-IDE/Super.Human.Installer/.github/workflows/windows-prod.yml@master - secrets: inherit - - build-macos: - name: Build on MacOS - uses: Moonshine-IDE/Super.Human.Installer/.github/workflows/macos-prod.yml@master - secrets: inherit - - release: - name: Draft Production Release - needs: [build-linux, build-windows, build-macos] - runs-on: ubuntu-latest - - steps: - - name: Checkout repo - uses: actions/checkout@v3 - - - name: Get Current Time - id: current-time - uses: josStorer/get-current-time@v2.0.2 - - - name: Read version - id: readversion - uses: mavrosxristoforos/get-xml-info@1.1.1 - with: - xml-file: 'project.xml' - xpath: '/project/meta/@version' - - - name: Download macOS installer - uses: actions/download-artifact@v3 - with: - name: SuperHumanInstaller-Setup - - - name: Download windows installer - uses: actions/download-artifact@v3 - with: - name: SuperHumanInstaller-Setup - - - name: Download choco package - uses: actions/download-artifact@v3 - with: - name: SuperHumanInstaller-Choco - - - name: Download linux installer - uses: actions/download-artifact@v3 - with: - name: SuperHumanInstaller - - - name: json-to-file - uses: devops-actions/json-to-file@v1.0.1 - with: - json: | - { - "workflow": "production", - "version": "${{ steps.readversion.outputs.info }}", - "branch": "${{ github.ref_name }}", - "commit_sha": "${{ github.sha }}", - "build_date": "${{ steps.current-time.outputs.readableTime }}" - } - filename: buildinfo.json - - - name: Create release - uses: softprops/action-gh-release@v1 - with: - name: "Production: Super.Human.Installer v${{ steps.readversion.outputs.info }}" - tag_name: ${{ steps.readversion.outputs.info }} - body: | - This is a Production Release of Super.Human.Installer. - draft: false - prerelease: false - files: | - SuperHumanInstaller-Setup.pkg - SuperHumanInstaller-Setup.exe - SuperHumanInstaller.tar.gz - SuperHumanInstaller-Choco.nupkg - buildinfo.json - fail_on_unmatched_files: true diff --git a/.github/workflows/sub-build-linux.yml b/.github/workflows/sub-build-linux.yml index 18a3e45c..4f3867b2 100644 --- a/.github/workflows/sub-build-linux.yml +++ b/.github/workflows/sub-build-linux.yml @@ -2,7 +2,47 @@ name: SUB - Build on Linux on: workflow_dispatch: + inputs: + env: + description: "An Environment" + required: true + type: choice + options: + - Development + - Production + version: + description: "A Version" + required: true + type: string + caching: + description: "Use caching" + required: true + type: boolean + default: false + workflow_call: + inputs: + env: + description: "An Environment" + required: true + type: string + version: + description: "A Version" + required: true + type: string + caching: + description: "Use caching" + required: true + type: boolean + default: false + +env: + app_name: ${{ inputs.env == 'Production' && 'SuperHumanInstaller' || 'SuperHumanInstallerDev' }} + app_id: net.prominic.genesis.${{ inputs.env == 'Production' && 'superhumaninstaller' || 'superhumaninstallerdev' }} + full_version: ${{ inputs.version }}.${{ github.run_number }} + haxe_flag: ${{ inputs.env == 'Production' && '-final' || '-debug' }} + haxe_version: 4.3.3 + bin_path: Export/${{ inputs.env }}/linux/bin jobs: build: @@ -11,4 +51,112 @@ jobs: steps: - name: Build info run: | - echo "Stub flow" \ No newline at end of file + echo "Ref: ${{ github.ref_name }}" + echo "Env: ${{ inputs.env }}" + echo "Version: ${{ env.full_version }}" + echo "App Name: ${{ env.app_name }}" + echo "App ID: ${{ env.app_id }}" + echo "Haxe Env Flag: ${{ env.haxe_flag }}" + + - name: Checkout repo + uses: actions/checkout@v4 + with: + lfs: true + + - name: Checkout LFS objects + run: git lfs checkout + + - name: Override project.xml version + uses: Moonshine-IDE/xml-replace-action@v2.0 + with: + filepath: "project.xml" + xpath: "/project/meta/@version" + replace: "${{ env.full_version }}" + + - name: Install missing system dependencies + run: | + sudo apt-get update + sudo apt-get install libxinerama-dev + sudo apt-get install libxrandr-dev + sudo apt-get install mesa-common-dev + sudo apt-get install libasound2-dev + sudo apt-get install gcc-multilib + sudo apt-get install g++-multilib + sudo apt-get install libfuse2 + + - name: Set up Haxe + uses: krdlab/setup-haxe@v1.5.1 + with: + haxe-version: ${{ env.haxe_version }} + + - name: Show haxe info + run: | + echo "Haxe version:" + haxe -version + echo "Haxe lib path:" + haxelib config + + - name: Update haxelib + run: haxelib --global update haxelib + + - name: Cache Binaries + id: cache-bin + if: ${{ inputs.caching }} + uses: actions/cache@v4 + with: + path: ${{ env.bin_path }} + key: ${{ env.app_name }}-linux-bin + + - name: Install dependencies + if: ${{ !inputs.caching || !steps.cache-bin.outputs.cache-hit }} + working-directory: Build + run: | + haxelib install hxcpp + git clone --recursive --depth 1 --branch develop https://github.com/openfl/lime + haxelib dev lime lime + haxelib install format + haxelib install hxp + haxelib git lime-samples https://github.com/openfl/lime-samples + haxelib git openfl https://github.com/openfl/openfl.git develop + haxelib run openfl setup + haxelib git feathersui https://github.com/feathersui/feathersui-openfl.git + haxelib git champaign https://github.com/Moonshine-IDE/Champaign.git + + - name: Build + if: ${{ !inputs.caching || !steps.cache-bin.outputs.cache-hit }} + run: > + haxelib run openfl build project.xml linux + ${{ env.haxe_flag }} + -Dlogverbose + -Dlogcolor + -Dgitsha=${{ github.sha }} + -Dgitbranch=${{ github.ref_name }} + + - name: Show Build + run: tree ${{ env.bin_path }} + + - name: Upload bin + uses: actions/upload-artifact@v4 + with: + name: ${{ env.app_name }}-linux-bin + path: ${{ env.bin_path }} + + - name: Create AppImage + uses: Moonshine-IDE/create-appimage-action@main + with: + app-name: ${{ env.app_name }} + app-version: ${{ env.full_version }} + app-icon-name: icon + app-categories: Utility + bin-paths: ${{ env.bin_path }}/* + appdir-paths: Assets/icon.png + lib-paths: + share-paths: + output-path: Build/${{ env.app_name }}-x86_64.AppImage + + - name: Upload AppImage + uses: actions/upload-artifact@v4 + with: + name: ${{ env.app_name }}-linux-installer + path: Build/${{ env.app_name }}-x86_64.AppImage + if-no-files-found: error \ No newline at end of file diff --git a/.github/workflows/sub-build-macos.yml b/.github/workflows/sub-build-macos.yml index f6d9b306..03c5195e 100644 --- a/.github/workflows/sub-build-macos.yml +++ b/.github/workflows/sub-build-macos.yml @@ -1,8 +1,48 @@ -name: SUB - Build on MacOS +name: SUB - Build on macOS on: workflow_dispatch: + inputs: + env: + description: "An Environment" + required: true + type: choice + options: + - Development + - Production + version: + description: "A Version" + required: true + type: string + caching: + description: "Use caching" + required: true + type: boolean + default: false + workflow_call: + inputs: + env: + description: "An Environment" + required: true + type: string + version: + description: "A Version" + required: true + type: string + caching: + description: "Use caching" + required: true + type: boolean + default: false + +env: + app_name: ${{ inputs.env == 'Production' && 'SuperHumanInstaller' || 'SuperHumanInstallerDev' }} + app_id: net.prominic.genesis.${{ inputs.env == 'Production' && 'superhumaninstaller' || 'superhumaninstallerdev' }} + full_version: ${{ inputs.version }}.${{ github.run_number }} + haxe_flag: ${{ inputs.env == 'Production' && '-final' || '-debug' }} + haxe_version: 4.3.3 + bin_path: Export/${{ inputs.env }}/macos/bin/ jobs: build: @@ -11,4 +51,123 @@ jobs: steps: - name: Build info run: | - echo "Stub flow" \ No newline at end of file + echo "Ref: ${{ github.ref_name }}" + echo "Env: ${{ inputs.env }}" + echo "Version: ${{ env.full_version }}" + echo "App Name: ${{ env.app_name }}" + echo "App ID: ${{ env.app_id }}" + echo "Haxe Env Flag: ${{ env.haxe_flag }}" + + - name: Checkout repo + uses: actions/checkout@v4 + with: + lfs: true + + - name: Checkout LFS objects + run: git lfs checkout + + - name: Override project.xml version + uses: Moonshine-IDE/xml-replace-action@v2.0 + with: + filepath: "project.xml" + xpath: "/project/meta/@version" + replace: "${{ env.full_version }}" + + - name: Set up Haxe + uses: krdlab/setup-haxe@v1.5.1 + with: + haxe-version: ${{ env.haxe_version }} + + - name: Show haxe info + run: | + echo "Haxe version:" + haxe -version + echo "Haxe lib path:" + haxelib config + + - name: Update haxelib + run: haxelib --global update haxelib + + - name: Cache Binaries + id: cache-bin + if: ${{ inputs.caching }} + uses: actions/cache@v4 + with: + path: ${{ env.bin_path }} + key: ${{ env.app_name }}-macos-bin + + - name: Install dependencies + if: ${{ !inputs.caching || !steps.cache-bin.outputs.cache-hit }} + working-directory: Build + run: | + haxelib install hxcpp + git clone --recursive --depth 1 --branch develop https://github.com/openfl/lime + haxelib dev lime lime + haxelib install format + haxelib install hxp + haxelib git lime-samples https://github.com/openfl/lime-samples + haxelib git openfl https://github.com/openfl/openfl.git develop + haxelib run openfl setup + haxelib git feathersui https://github.com/feathersui/feathersui-openfl.git + haxelib git champaign https://github.com/Moonshine-IDE/Champaign.git + + - name: Build + if: ${{ !inputs.caching || !steps.cache-bin.outputs.cache-hit }} + run: > + haxelib run openfl build project.xml mac + ${{ env.haxe_flag }} + -Dlogverbose + -Dlogcolor + -Dgitsha=${{ github.sha }} + -Dgitbranch=${{ github.ref_name }} + + - name: Show Build + run: ls -r ${{ env.bin_path }} + + - name: Upload bin + uses: actions/upload-artifact@v4 + with: + name: ${{ env.app_name }}-macos-bin + path: ${{ env.bin_path }} + + - name: Sign app + uses: Moonshine-IDE/macos-sign-app-action@main + with: + app-path: ${{ env.bin_path }}/${{ env.app_name }}.app + mac-keychain-pass: ${{ secrets.MAC_KEYCHAIN_PASS }} + mac-application-certkey: ${{ secrets.MAC_APPLICATION_CERTKEY }} + mac-certkey-pass: ${{ secrets.MAC_CERTKEY_PASS }} + + - name: Create installer + run: | + productbuild \ + --version ${{ inputs.version }} \ + --product Templates/installer/SuperHumanInstaller.template.plist \ + --identifier ${{ env.app_id }} \ + --component ${{ env.bin_path }}/${{ env.app_name }}.app \ + /Applications \ + ./${{ env.app_name }}-Setup-Unsigned.pkg + + - name: Sign installer + uses: Moonshine-IDE/macos-sign-installer-action@v1.0 + with: + unsigned-pkg-path: ./${{ env.app_name }}-Setup-Unsigned.pkg + signed-pkg-path: ./${{ env.app_name }}-Setup.pkg + mac-keychain-pass: ${{ secrets.MAC_KEYCHAIN_PASS }} + mac-installer-certkey: ${{ secrets.MAC_INSTALLER_CERTKEY }} + mac-certkey-pass: ${{ secrets.MAC_CERTKEY_PASS }} + + - name: Notarize installer + uses: Moonshine-ide/macos-notarize-action@v1.0 + with: + app-path: ./${{ env.app_name }}-Setup.pkg + mac-notarization-apple-id: ${{ secrets.MAC_NOTARIZATION_APPLE_ID }} + mac-notarization-team-id: ${{ secrets.MAC_NOTARIZATION_TEAM_ID }} + mac-notarization-pass: ${{ secrets.MAC_NOTARIZATION_PASS }} + + - name: Upload Installer + uses: actions/upload-artifact@v4 + with: + name: ${{ env.app_name }}-macos-installer + path: ./${{ env.app_name }}-Setup.pkg + if-no-files-found: error \ No newline at end of file diff --git a/.github/workflows/sub-build-windows.yml b/.github/workflows/sub-build-windows.yml index 74496603..6a61a895 100644 --- a/.github/workflows/sub-build-windows.yml +++ b/.github/workflows/sub-build-windows.yml @@ -2,7 +2,47 @@ name: SUB - Build on Windows on: workflow_dispatch: + inputs: + env: + description: "An Environment" + required: true + type: choice + options: + - Development + - Production + version: + description: "A Version" + required: true + type: string + caching: + description: "Use caching" + required: true + type: boolean + default: false + workflow_call: + inputs: + env: + description: "An Environment" + required: true + type: string + version: + description: "A Version" + required: true + type: string + caching: + description: "Use caching" + required: true + type: boolean + default: false + +env: + app_name: ${{ inputs.env == 'Production' && 'SuperHumanInstaller' || 'SuperHumanInstallerDev' }} + app_id: net.prominic.genesis.${{ inputs.env == 'Production' && 'superhumaninstaller' || 'superhumaninstallerdev' }} + full_version: ${{ inputs.version }}.${{ github.run_number }} + haxe_flag: ${{ inputs.env == 'Production' && '-final' || '-debug' }} + haxe_version: 4.3.3 + bin_path: Export/${{ inputs.env }}/windows/bin/ jobs: build: @@ -11,4 +51,140 @@ jobs: steps: - name: Build info run: | - echo "Stub flow" \ No newline at end of file + echo "Ref: ${{ github.ref_name }}" + echo "Env: ${{ inputs.env }}" + echo "Version: ${{ env.full_version }}" + echo "App Name: ${{ env.app_name }}" + echo "App ID: ${{ env.app_id }}" + echo "Haxe Env Flag: ${{ env.haxe_flag }}" + + - name: Checkout repo + uses: actions/checkout@v4 + with: + lfs: true + + - name: Checkout LFS objects + run: git lfs checkout + + - name: Override project.xml version + uses: Moonshine-IDE/xml-replace-action@v2.0 + with: + filepath: "project.xml" + xpath: "/project/meta/@version" + replace: "${{ env.full_version }}" + + - name: Set up Haxe + uses: krdlab/setup-haxe@v1.5.1 + with: + haxe-version: ${{ env.haxe_version }} + + - name: Show haxe info + run: | + echo "Haxe version:" + haxe -version + echo "Haxe lib path:" + haxelib config + + - name: Update haxelib + run: haxelib --global update haxelib + + - name: Cache Binaries + id: cache-bin + if: ${{ inputs.caching }} + uses: actions/cache@v4 + with: + path: ${{ env.bin_path }} + key: ${{ env.app_name }}-windows-bin + + - name: Install dependencies + if: ${{ !inputs.caching || !steps.cache-bin.outputs.cache-hit }} + working-directory: Build + run: | + haxelib install hxcpp + git clone --recursive --depth 1 --branch develop https://github.com/openfl/lime + haxelib dev lime lime + haxelib install format + haxelib install hxp + haxelib git lime-samples https://github.com/openfl/lime-samples + haxelib git openfl https://github.com/openfl/openfl.git develop + haxelib run openfl setup + haxelib git feathersui https://github.com/feathersui/feathersui-openfl.git + haxelib git champaign https://github.com/Moonshine-IDE/Champaign.git + + - name: Build + if: ${{ !inputs.caching || !steps.cache-bin.outputs.cache-hit }} + run: > + haxelib run openfl build project.xml windows + ${{ env.haxe_flag }} + -Dlogverbose + -Dlogcolor + -Dgitsha=${{ github.sha }} + -Dgitbranch=${{ github.ref_name }} + + - name: Show Build + run: ls -r ${{ env.bin_path }} + + - name: Upload bin + uses: actions/upload-artifact@v4 + with: + name: ${{ env.app_name }}-windows-bin + path: ${{ env.bin_path }} + + - name: Create NSIS installer + run: > + makensis + /DPRODUCT_NAME=${{ env.app_name }} + /DPRODUCT_VERSION=${{ env.full_version }} + /DPRODUCT_PUBLISHER="Prominic.NET" + /DPRODUCT_WEB_SITE="/https://superhumaninstaller.com/" + /DBIN_PATH="..\..\${{ env.bin_path }}\*.*" + /DPRODUCT_EXE=${{ env.app_name }}.exe + /DPRODUCT_INSTALLER=${{ env.app_name }}-Setup.exe + /DROOT_KEY=HKCU + Templates/installer/nsis-installer.nsi + + - name: Sign installer + uses: Moonshine-IDE/digicert-sign-action@v1.0 + with: + bin-path: Templates/installer/${{ env.app_name }}-Setup.exe + sm-host: ${{ secrets.SM_HOST }} + sm-api-key: ${{ secrets.SM_API_KEY }} + sm-client-cert-file-b64: ${{ secrets.SM_CLIENT_CERT_FILE_B64 }} + sm-client-cert-password: ${{ secrets.SM_CLIENT_CERT_PASSWORD }} + sm-code-signing-cert-sha1-hash: ${{ secrets.SM_CODE_SIGNING_CERT_SHA1_HASH }} + + - name: Upload installer + uses: actions/upload-artifact@v4 + with: + name: ${{ env.app_name }}-windows-installer + path: Templates/installer/${{ env.app_name }}-Setup.exe + if-no-files-found: error + + - name: Copy files to choco + env: + choco_dir: ${{ inputs.env == 'Production' && 'chocolatey' || 'chocolatey-dev' }} + nupkg: ${{ inputs.env == 'Production' && 'superhumaninstaller*.nupkg' || 'superhumaninstallerdev*.nupkg' }} + run: | + cp Templates/installer/${{ env.app_name }}-Setup.exe Templates/${{ env.choco_dir }}/tools/ + cp LICENSE.MD Templates/${{ env.choco_dir }}/ + + - name: Create chocko package + env: + choco_dir: ${{ inputs.env == 'Production' && 'chocolatey' || 'chocolatey-dev' }} + nupkg: ${{ inputs.env == 'Production' && 'superhumaninstaller*.nupkg' || 'superhumaninstallerdev*.nupkg' }} + run: | + choco pack ` + --version ${{ inputs.version }} ` + --out Templates/${{ env.choco_dir }}/ ` + Templates/${{ env.choco_dir }}/${{ env.app_name }}.nuspec + mv ` + .\Templates\${{ env.choco_dir }}\${{ env.nupkg }} ` + .\Templates\${{ env.choco_dir }}\${{ env.app_name }}-Choco.nupkg + + - name: Upload choco package + uses: actions/upload-artifact@v4 + env: + choco_dir: ${{ inputs.env == 'Production' && 'chocolatey' || 'chocolatey-dev' }} + with: + name: ${{ env.app_name }}-Choco + path: Templates/${{ env.choco_dir }}/${{ env.app_name }}-Choco.nupkg \ No newline at end of file diff --git a/.github/workflows/update-versioninfo.yml b/.github/workflows/update-versioninfo.yml index 82ae859f..fb0fa96e 100644 --- a/.github/workflows/update-versioninfo.yml +++ b/.github/workflows/update-versioninfo.yml @@ -34,7 +34,8 @@ jobs: run: | python DevOps/generate-vinfo.py mkdir site - mv versioninfo.json site/versioninfo.json + mkdir site/test + mv versioninfo.json site/test/versioninfo.json - name: Upload artifact uses: actions/upload-pages-artifact@v1 diff --git a/.github/workflows/windows-dev.yml b/.github/workflows/windows-dev.yml deleted file mode 100644 index 560c0aac..00000000 --- a/.github/workflows/windows-dev.yml +++ /dev/null @@ -1,91 +0,0 @@ -name: Windows Dev - -on: - - workflow_dispatch - - workflow_call - -jobs: - build: - name: Build - runs-on: windows-latest - - steps: - - name: Checkout repo - uses: actions/checkout@v3 - with: - lfs: true - - - name: Checkout LFS objects - run: git lfs checkout - - - name: Read version - id: readversion - uses: mavrosxristoforos/get-xml-info@1.1.1 - with: - xml-file: 'project.xml' - xpath: '/project/meta/@version' - - - name: Set up Haxe - uses: krdlab/setup-haxe@v1.5.1 - with: - haxe-version: 4.3.3 - - - name: Install dependencies - run: | - haxelib install hxcpp - git clone --recursive --depth 1 --branch develop https://github.com/openfl/lime - haxelib dev lime lime - haxelib install format - haxelib install hxp - haxelib git lime-samples https://github.com/openfl/lime-samples - haxelib git openfl https://github.com/openfl/openfl.git develop - haxelib run openfl setup - haxelib git feathersui https://github.com/feathersui/feathersui-openfl.git - haxelib git champaign https://github.com/Moonshine-IDE/Champaign.git - - - name: Build project - run: | - haxelib run openfl build project.xml windows -debug -Dlogverbose -Dlogcolor -Dverbose_process_logs -DCHAMPAIGN_DEBUG=true -Dgitsha=${{ github.sha }} -Dgitbranch=${{ github.ref_name }} - - - name: Create NSIS installer - run: | - makensis /DPRODUCT_VERSION=${{ steps.readversion.outputs.info }} Templates/installer/windows-installer-dev.nsi - - # Sign installer - - - name: Sign installer - uses: Moonshine-IDE/digicert-sign-action@v1.0 - with: - bin-path: Templates/installer/SuperHumanInstallerDev-Setup.exe - sm-host: ${{ secrets.SM_HOST }} - sm-api-key: ${{ secrets.SM_API_KEY }} - sm-client-cert-file-b64: ${{ secrets.SM_CLIENT_CERT_FILE_B64 }} - sm-client-cert-password: ${{ secrets.SM_CLIENT_CERT_PASSWORD }} - sm-code-signing-cert-sha1-hash: ${{ secrets.SM_CODE_SIGNING_CERT_SHA1_HASH }} - - - name: Upload installer - uses: actions/upload-artifact@v3 - with: - name: SuperHumanInstallerDev-Setup - path: Templates/installer/SuperHumanInstallerDev-Setup.exe - - - name: Copy files to choco - run: | - cp Templates/installer/SuperHumanInstallerDev-Setup.exe Templates/chocolatey-dev/tools/ - cp LICENSE.MD Templates/chocolatey-dev/ - - - name: Create chocko package - run: | - choco pack ` - --version ${{ steps.readversion.outputs.info }} ` - --out Templates/chocolatey-dev/ ` - Templates/chocolatey-dev/SuperHumanInstallerDev.nuspec - mv ` - .\Templates\chocolatey-dev\superhumaninstallerdev*.nupkg ` - .\Templates\chocolatey-dev\SuperHumanInstallerDev-Choco.nupkg - - - name: Upload choco package - uses: actions/upload-artifact@v3 - with: - name: SuperHumanInstallerDev-Choco - path: Templates/chocolatey-dev/SuperHumanInstallerDev-Choco.nupkg diff --git a/.github/workflows/windows-prod.yml b/.github/workflows/windows-prod.yml deleted file mode 100644 index b6906da9..00000000 --- a/.github/workflows/windows-prod.yml +++ /dev/null @@ -1,91 +0,0 @@ -name: Windows Prod - -on: - - workflow_dispatch - - workflow_call - -jobs: - build: - name: Build - runs-on: windows-latest - - steps: - - name: Checkout repo - uses: actions/checkout@v3 - with: - lfs: true - - - name: Checkout LFS objects - run: git lfs checkout - - - name: Read version - id: readversion - uses: mavrosxristoforos/get-xml-info@1.1.1 - with: - xml-file: 'project.xml' - xpath: '/project/meta/@version' - - - name: Set up Haxe - uses: krdlab/setup-haxe@v1.5.1 - with: - haxe-version: 4.3.3 - - - name: Install dependencies - run: | - haxelib install hxcpp - git clone --recursive --depth 1 --branch develop https://github.com/openfl/lime - haxelib dev lime lime - haxelib install format - haxelib install hxp - haxelib git lime-samples https://github.com/openfl/lime-samples - haxelib git openfl https://github.com/openfl/openfl.git develop - haxelib run openfl setup - haxelib git feathersui https://github.com/feathersui/feathersui-openfl.git - haxelib git champaign https://github.com/Moonshine-IDE/Champaign.git - - - name: Build project - run: | - haxelib run openfl build project.xml windows -Dgitsha=${{ github.sha }} -Dgitbranch=${{ github.ref_name }} - - - name: Create NSIS installer - run: | - makensis /DPRODUCT_VERSION=${{ steps.readversion.outputs.info }} Templates/installer/windows-installer.nsi - - # Sign installer - - - name: Sign installer - uses: Moonshine-IDE/digicert-sign-action@v1.0 - with: - bin-path: Templates/installer/SuperHumanInstaller-Setup.exe - sm-host: ${{ secrets.SM_HOST }} - sm-api-key: ${{ secrets.SM_API_KEY }} - sm-client-cert-file-b64: ${{ secrets.SM_CLIENT_CERT_FILE_B64 }} - sm-client-cert-password: ${{ secrets.SM_CLIENT_CERT_PASSWORD }} - sm-code-signing-cert-sha1-hash: ${{ secrets.SM_CODE_SIGNING_CERT_SHA1_HASH }} - - - name: Upload installer - uses: actions/upload-artifact@v3 - with: - name: SuperHumanInstaller-Setup - path: Templates/installer/SuperHumanInstaller-Setup.exe - - - name: Copy files to choco - run: | - cp Templates/installer/SuperHumanInstaller-Setup.exe Templates/chocolatey/tools/ - cp LICENSE.MD Templates/chocolatey/ - - - name: Create chocko package - run: | - choco pack ` - --version ${{ steps.readversion.outputs.info }} ` - --out Templates/chocolatey/ ` - Templates/chocolatey/SuperHumanInstaller.nuspec - mv ` - .\Templates\chocolatey\superhumaninstaller*.nupkg ` - .\Templates\chocolatey\SuperHumanInstaller-Choco.nupkg - - - name: Upload choco package - uses: actions/upload-artifact@v3 - with: - name: SuperHumanInstaller-Choco - path: Templates/chocolatey/SuperHumanInstaller-Choco.nupkg diff --git a/Build/InstallDependencies.hx b/Build/InstallDependencies.hx new file mode 100644 index 00000000..871e55c8 --- /dev/null +++ b/Build/InstallDependencies.hx @@ -0,0 +1,14 @@ +class InstallDependencies { + public static function main() { + Sys.command('haxelib install hxcpp'); + Sys.command('git clone --recursive --depth 1 --branch develop https://github.com/openfl/lime'); + Sys.command('haxelib dev lime lime'); + Sys.command('haxelib install format'); + Sys.command('haxelib git lime-samples https://github.com/openfl/lime-samples'); + Sys.command('haxelib git openfl https://github.com/openfl/openfl.git develop'); + Sys.command('haxelib run openfl setup'); + Sys.command('haxelib git feathersui https://github.com/feathersui/feathersui-openfl.git'); + Sys.command('haxelib git champaign https://github.com/Moonshine-IDE/Champaign.git'); + Sys.command('haxelib install hxp'); + } +} \ No newline at end of file diff --git a/Templates/SuperHumanInstallerDev.AppDir/AppRun b/Templates/SuperHumanInstallerDev.AppDir/AppRun deleted file mode 100755 index 10b13f82..00000000 --- a/Templates/SuperHumanInstallerDev.AppDir/AppRun +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -APPRUN=$(readlink -f "$0") -MOUNTPOINT=${APPRUN%/*} -BINDIR=${MOUNTPOINT}/usr/bin -cd ${BINDIR} -./SuperHumanInstallerDev diff --git a/Templates/SuperHumanInstallerDev.AppDir/SuperHumanInstaller.desktop b/Templates/SuperHumanInstallerDev.AppDir/SuperHumanInstaller.desktop deleted file mode 100755 index 906c5adb..00000000 --- a/Templates/SuperHumanInstallerDev.AppDir/SuperHumanInstaller.desktop +++ /dev/null @@ -1,6 +0,0 @@ -[Desktop Entry] -Name=SuperHumanInstallerDev -Exec=SuperHumanInstallerDev -Icon=SuperHumanInstaller -Type=Application -Categories=Utility; diff --git a/Templates/SuperHumanInstallerDev.AppDir/SuperHumanInstaller.svg b/Templates/SuperHumanInstallerDev.AppDir/SuperHumanInstaller.svg deleted file mode 100644 index a4125f0f..00000000 --- a/Templates/SuperHumanInstallerDev.AppDir/SuperHumanInstaller.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/Templates/installer/windows-installer.nsi b/Templates/installer/nsis-installer.nsi similarity index 65% rename from Templates/installer/windows-installer.nsi rename to Templates/installer/nsis-installer.nsi index c25ae80c..a0ea2da4 100644 --- a/Templates/installer/windows-installer.nsi +++ b/Templates/installer/nsis-installer.nsi @@ -1,101 +1,109 @@ -; Script generated by the HM NIS Edit Script Wizard. - -RequestExecutionLevel user - -; HM NIS Edit Wizard helper defines -!define PRODUCT_NAME "SuperHumanInstaller" -!define PRODUCT_PUBLISHER "Prominic.NET" -!define PRODUCT_WEB_SITE "https://www.prominic.net/" -!define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\SuperHumanInstaller.exe" -!define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" -!define PRODUCT_UNINST_ROOT_KEY "HKCU" - -; MUI 1.67 compatible ------ -!include "MUI.nsh" - -; MUI Settings -!define MUI_ABORTWARNING -!define MUI_ICON "${NSISDIR}\Contrib\Graphics\Icons\modern-install.ico" -!define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\modern-uninstall.ico" - -; Welcome page -!define MUI_WELCOMEPAGE_TITLE_3LINES -!insertmacro MUI_PAGE_WELCOME -; License page -!insertmacro MUI_PAGE_LICENSE "..\..\LICENSE.MD" -; Directory page -!insertmacro MUI_PAGE_DIRECTORY -; Instfiles page -!insertmacro MUI_PAGE_INSTFILES -; Finish page -!define MUI_FINISHPAGE_TITLE_3LINES -!define MUI_FINISHPAGE_RUN "$INSTDIR\SuperHumanInstaller.exe" -!insertmacro MUI_PAGE_FINISH - -; Uninstaller pages -!insertmacro MUI_UNPAGE_INSTFILES - -; Language files -!insertmacro MUI_LANGUAGE "English" - -; MUI end ------ - -Name "${PRODUCT_NAME} ${PRODUCT_VERSION}" -OutFile "SuperHumanInstaller-Setup.exe" -InstallDir "$LOCALAPPDATA\SuperHumanInstaller" -InstallDirRegKey HKCU "${PRODUCT_DIR_REGKEY}" "" -ShowInstDetails show -ShowUnInstDetails show - -Section "MainSection" SEC01 - RMDir /r "$INSTDIR" - SetOutPath "$INSTDIR" - SetOverwrite ifnewer - File /r "..\..\Export\Production\windows\bin\*.*" - CreateDirectory "$SMPROGRAMS\SuperHumanInstaller" - CreateShortCut "$SMPROGRAMS\SuperHumanInstaller\SuperHumanInstaller.lnk" "$INSTDIR\SuperHumanInstaller.exe" - CreateShortCut "$DESKTOP\SuperHumanInstaller.lnk" "$INSTDIR\SuperHumanInstaller.exe" -SectionEnd - -Section -AdditionalIcons - WriteIniStr "$INSTDIR\${PRODUCT_NAME}.url" "InternetShortcut" "URL" "${PRODUCT_WEB_SITE}" - CreateShortCut "$SMPROGRAMS\SuperHumanInstaller\Website.lnk" "$INSTDIR\${PRODUCT_NAME}.url" - CreateShortCut "$SMPROGRAMS\SuperHumanInstaller\Uninstall.lnk" "$INSTDIR\uninst.exe" -SectionEnd - -Section -Post - WriteUninstaller "$INSTDIR\uninst.exe" - WriteRegStr HKCU "${PRODUCT_DIR_REGKEY}" "" "$INSTDIR\SuperHumanInstaller.exe" - WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayName" "$(^Name)" - WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "UninstallString" "$INSTDIR\uninst.exe" - WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayIcon" "$INSTDIR\SuperHumanInstaller.exe" - WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayVersion" "${PRODUCT_VERSION}" - WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "URLInfoAbout" "${PRODUCT_WEB_SITE}" - WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "Publisher" "${PRODUCT_PUBLISHER}" -SectionEnd - - -Function un.onUninstSuccess - HideWindow - MessageBox MB_ICONINFORMATION|MB_OK "$(^Name) was successfully removed from your computer." -FunctionEnd - -Function un.onInit - MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "Are you sure you want to completely remove $(^Name) and all of its components?" IDYES +2 - Abort -FunctionEnd - -Section Uninstall - RMDir /r "$INSTDIR" - - Delete "$SMPROGRAMS\SuperHumanInstaller\Uninstall.lnk" - Delete "$SMPROGRAMS\SuperHumanInstaller\Website.lnk" - Delete "$DESKTOP\SuperHumanInstaller.lnk" - Delete "$SMPROGRAMS\SuperHumanInstaller\SuperHumanInstaller.lnk" - - RMDir "$SMPROGRAMS\SuperHumanInstaller" - - DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" - DeleteRegKey HKCU "${PRODUCT_DIR_REGKEY}" - SetAutoClose true +; Script generated by the HM NIS Edit Script Wizard. + +; Script inputs +; ${PRODUCT_NAME} +; ${PRODUCT_VERSION} +; ${PRODUCT_PUBLISHER} +; ${PRODUCT_WEB_SITE} +; ${BIN_PATH} +; ${PRODUCT_EXE} +; ${PRODUCT_INSTALLER} +; ${ROOT_KEY} + +RequestExecutionLevel user + +; HM NIS Edit Wizard helper defines + +!define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\${PRODUCT_EXE}" +!define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" +!define PRODUCT_UNINST_ROOT_KEY "${ROOT_KEY}" + +; MUI 1.67 compatible ------ +!include "MUI.nsh" + +; MUI Settings +!define MUI_ABORTWARNING +!define MUI_ICON "${NSISDIR}\Contrib\Graphics\Icons\modern-install.ico" +!define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\modern-uninstall.ico" + +; Welcome page +!define MUI_WELCOMEPAGE_TITLE_3LINES +!insertmacro MUI_PAGE_WELCOME +; License page +!insertmacro MUI_PAGE_LICENSE "..\..\LICENSE.MD" +; Directory page +!insertmacro MUI_PAGE_DIRECTORY +; Instfiles page +!insertmacro MUI_PAGE_INSTFILES +; Finish page +!define MUI_FINISHPAGE_TITLE_3LINES +!define MUI_FINISHPAGE_RUN "$INSTDIR\${PRODUCT_EXE}" +!insertmacro MUI_PAGE_FINISH + +; Uninstaller pages +!insertmacro MUI_UNPAGE_INSTFILES + +; Language files +!insertmacro MUI_LANGUAGE "English" + +; MUI end ------ + +Name "${PRODUCT_NAME} ${PRODUCT_VERSION}" +OutFile "${PRODUCT_INSTALLER}" +InstallDir "$LOCALAPPDATA\${PRODUCT_NAME}" +InstallDirRegKey "${ROOT_KEY}" "${PRODUCT_DIR_REGKEY}" "" +ShowInstDetails show +ShowUnInstDetails show + +Section "MainSection" SEC01 + RMDir /r "$INSTDIR" + SetOutPath "$INSTDIR" + SetOverwrite ifnewer + File /r "${BIN_PATH}" + CreateDirectory "$SMPROGRAMS\${PRODUCT_NAME}" + CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\${PRODUCT_NAME}.lnk" "$INSTDIR\${PRODUCT_EXE}" + CreateShortCut "$DESKTOP\S${PRODUCT_NAME}.lnk" "$INSTDIR\${PRODUCT_EXE}" +SectionEnd + +Section -AdditionalIcons + WriteIniStr "$INSTDIR\${PRODUCT_NAME}.url" "InternetShortcut" "URL" "${PRODUCT_WEB_SITE}" + CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\Website.lnk" "$INSTDIR\${PRODUCT_NAME}.url" + CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\Uninstall.lnk" "$INSTDIR\uninst.exe" +SectionEnd + +Section -Post + WriteUninstaller "$INSTDIR\uninst.exe" + WriteRegStr HKCU "${PRODUCT_DIR_REGKEY}" "" "$INSTDIR\${PRODUCT_EXE}" + WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayName" "$(^Name)" + WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "UninstallString" "$INSTDIR\uninst.exe" + WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayIcon" "$INSTDIR\${PRODUCT_EXE}" + WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayVersion" "${PRODUCT_VERSION}" + WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "URLInfoAbout" "${PRODUCT_WEB_SITE}" + WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "Publisher" "${PRODUCT_PUBLISHER}" +SectionEnd + + +Function un.onUninstSuccess + HideWindow + MessageBox MB_ICONINFORMATION|MB_OK "$(^Name) was successfully removed from your computer." +FunctionEnd + +Function un.onInit + MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "Are you sure you want to completely remove $(^Name) and all of its components?" IDYES +2 + Abort +FunctionEnd + +Section Uninstall + RMDir /r "$INSTDIR" + + Delete "$SMPROGRAMS\${PRODUCT_NAME}\Uninstall.lnk" + Delete "$SMPROGRAMS\${PRODUCT_NAME}\Website.lnk" + Delete "$DESKTOP\${PRODUCT_NAME}.lnk" + Delete "$SMPROGRAMS\${PRODUCT_NAME}\${PRODUCT_NAME}.lnk" + + RMDir "$SMPROGRAMS\${PRODUCT_NAME}" + + DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" + DeleteRegKey HKCU "${PRODUCT_DIR_REGKEY}" + SetAutoClose true SectionEnd \ No newline at end of file diff --git a/Templates/installer/windows-installer-dev.nsi b/Templates/installer/windows-installer-dev.nsi deleted file mode 100644 index 504045d6..00000000 --- a/Templates/installer/windows-installer-dev.nsi +++ /dev/null @@ -1,101 +0,0 @@ -; Script generated by the HM NIS Edit Script Wizard. - -RequestExecutionLevel user - -; HM NIS Edit Wizard helper defines -!define PRODUCT_NAME "SuperHumanInstallerDev" -!define PRODUCT_PUBLISHER "Prominic.NET" -!define PRODUCT_WEB_SITE "https://www.prominic.net/" -!define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\SuperHumanInstallerDev.exe" -!define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" -!define PRODUCT_UNINST_ROOT_KEY "HKCU" - -; MUI 1.67 compatible ------ -!include "MUI.nsh" - -; MUI Settings -!define MUI_ABORTWARNING -!define MUI_ICON "${NSISDIR}\Contrib\Graphics\Icons\modern-install.ico" -!define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\modern-uninstall.ico" - -; Welcome page -!define MUI_WELCOMEPAGE_TITLE_3LINES -!insertmacro MUI_PAGE_WELCOME -; License page -!insertmacro MUI_PAGE_LICENSE "..\..\LICENSE.MD" -; Directory page -!insertmacro MUI_PAGE_DIRECTORY -; Instfiles page -!insertmacro MUI_PAGE_INSTFILES -; Finish page -!define MUI_FINISHPAGE_TITLE_3LINES -!define MUI_FINISHPAGE_RUN "$INSTDIR\SuperHumanInstallerDev.exe" -!insertmacro MUI_PAGE_FINISH - -; Uninstaller pages -!insertmacro MUI_UNPAGE_INSTFILES - -; Language files -!insertmacro MUI_LANGUAGE "English" - -; MUI end ------ - -Name "${PRODUCT_NAME} ${PRODUCT_VERSION}" -OutFile "SuperHumanInstallerDev-Setup.exe" -InstallDir "$LOCALAPPDATA\SuperHumanInstallerDev" -InstallDirRegKey HKCU "${PRODUCT_DIR_REGKEY}" "" -ShowInstDetails show -ShowUnInstDetails show - -Section "MainSection" SEC01 - RMDir /r "$INSTDIR" - SetOutPath "$INSTDIR" - SetOverwrite ifnewer - File /r "..\..\Export\Development\windows\bin\*.*" - CreateDirectory "$SMPROGRAMS\SuperHumanInstallerDev" - CreateShortCut "$SMPROGRAMS\SuperHumanInstallerDev\SuperHumanInstallerDev.lnk" "$INSTDIR\SuperHumanInstallerDev.exe" - CreateShortCut "$DESKTOP\SuperHumanInstallerDev.lnk" "$INSTDIR\SuperHumanInstallerDev.exe" -SectionEnd - -Section -AdditionalIcons - WriteIniStr "$INSTDIR\${PRODUCT_NAME}.url" "InternetShortcut" "URL" "${PRODUCT_WEB_SITE}" - CreateShortCut "$SMPROGRAMS\SuperHumanInstallerDev\Website.lnk" "$INSTDIR\${PRODUCT_NAME}.url" - CreateShortCut "$SMPROGRAMS\SuperHumanInstallerDev\Uninstall.lnk" "$INSTDIR\uninst.exe" -SectionEnd - -Section -Post - WriteUninstaller "$INSTDIR\uninst.exe" - WriteRegStr HKCU "${PRODUCT_DIR_REGKEY}" "" "$INSTDIR\SuperHumanInstallerDev.exe" - WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayName" "$(^Name)" - WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "UninstallString" "$INSTDIR\uninst.exe" - WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayIcon" "$INSTDIR\SuperHumanInstallerDev.exe" - WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayVersion" "${PRODUCT_VERSION}" - WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "URLInfoAbout" "${PRODUCT_WEB_SITE}" - WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "Publisher" "${PRODUCT_PUBLISHER}" -SectionEnd - - -Function un.onUninstSuccess - HideWindow - MessageBox MB_ICONINFORMATION|MB_OK "$(^Name) was successfully removed from your computer." -FunctionEnd - -Function un.onInit - MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "Are you sure you want to completely remove $(^Name) and all of its components?" IDYES +2 - Abort -FunctionEnd - -Section Uninstall - RMDir /r "$INSTDIR" - - Delete "$SMPROGRAMS\SuperHumanInstallerDev\Uninstall.lnk" - Delete "$SMPROGRAMS\SuperHumanInstallerDev\Website.lnk" - Delete "$DESKTOP\SuperHumanInstallerDev.lnk" - Delete "$SMPROGRAMS\SuperHumanInstallerDev\SuperHumanInstallerDev.lnk" - - RMDir "$SMPROGRAMS\SuperHumanInstallerDev" - - DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" - DeleteRegKey HKCU "${PRODUCT_DIR_REGKEY}" - SetAutoClose true -SectionEnd \ No newline at end of file