Skip to content

Commit

Permalink
Windows support
Browse files Browse the repository at this point in the history
  • Loading branch information
ismyhc committed Sep 5, 2023
1 parent e369075 commit 8651bfd
Show file tree
Hide file tree
Showing 4 changed files with 71 additions and 6 deletions.
6 changes: 3 additions & 3 deletions chain_providers.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,13 @@ display_name="Thunder"
description="A high performance largeblock sidechain"
repo_url="https://github.com/nchashch/thunder"
download_file_linux="thunder-0.1.0-x86_64-linux-gnu.zip"
download_file_win=""
download_file_win="thunder-0.1.0-win64.zip"
download_file_mac="thunder-0.1.0-osx64.zip"
download_size_linux=7884005
download_size_win=0
download_size_win=58886135
download_size_mac=4820994
download_hash_linux="02d317aaaf5e52436caca67e7051ce3500139d91175760d3ae4644448ac022b8"
download_hash_win=""
download_hash_win="8c3131083ada9df21713789624a720864ac24a049db179dd8a0f7eda95356fcd"
download_hash_mac="7d1c6abe6d15aa39a96c9b9f9068747f2587a255fe2ff344c15ad4de6b9d10f7"
base_dir_linux=".thunder"
base_dir_win="Thunder"
Expand Down
62 changes: 62 additions & 0 deletions export_presets.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -142,3 +142,65 @@ open \"{temp_dir}/{exe_name}.app\" --args {cmd_args}"
ssh_remote_deploy/cleanup_script="#!/usr/bin/env bash
kill $(pgrep -x -f \"{temp_dir}/{exe_name}.app/Contents/MacOS/{exe_name} {cmd_args}\")
rm -rf \"{temp_dir}\""

[preset.2]

name="Windows Desktop"
platform="Windows Desktop"
runnable=true
dedicated_server=false
custom_features=""
export_filter="all_resources"
include_filter="*.cfg"
exclude_filter=""
export_path="../../Desktop/drivechain_launcher.exe"
encryption_include_filters=""
encryption_exclude_filters=""
encrypt_pck=false
encrypt_directory=false

[preset.2.options]

custom_template/debug=""
custom_template/release=""
debug/export_console_wrapper=1
binary_format/embed_pck=true
texture_format/bptc=true
texture_format/s3tc=true
texture_format/etc=false
texture_format/etc2=false
binary_format/architecture="x86_64"
codesign/enable=false
codesign/timestamp=true
codesign/timestamp_server_url=""
codesign/digest_algorithm=1
codesign/description=""
codesign/custom_options=PackedStringArray()
application/modify_resources=true
application/icon="res://icon.png"
application/console_wrapper_icon=""
application/icon_interpolation=4
application/file_version="1.0.0.0"
application/product_version="1.0.0.0"
application/company_name="Layer Two Labs"
application/product_name="Drivechain Launcher"
application/file_description=""
application/copyright=""
application/trademarks=""
ssh_remote_deploy/enabled=false
ssh_remote_deploy/host="user@host_ip"
ssh_remote_deploy/port="22"
ssh_remote_deploy/extra_args_ssh=""
ssh_remote_deploy/extra_args_scp=""
ssh_remote_deploy/run_script="Expand-Archive -LiteralPath '{temp_dir}\\{archive_name}' -DestinationPath '{temp_dir}'
$action = New-ScheduledTaskAction -Execute '{temp_dir}\\{exe_name}' -Argument '{cmd_args}'
$trigger = New-ScheduledTaskTrigger -Once -At 00:00
$settings = New-ScheduledTaskSettingsSet
$task = New-ScheduledTask -Action $action -Trigger $trigger -Settings $settings
Register-ScheduledTask godot_remote_debug -InputObject $task -Force:$true
Start-ScheduledTask -TaskName godot_remote_debug
while (Get-ScheduledTask -TaskName godot_remote_debug | ? State -eq running) { Start-Sleep -Milliseconds 100 }
Unregister-ScheduledTask -TaskName godot_remote_debug -Confirm:$false -ErrorAction:SilentlyContinue"
ssh_remote_deploy/cleanup_script="Stop-ScheduledTask -TaskName godot_remote_debug -ErrorAction:SilentlyContinue
Unregister-ScheduledTask -TaskName godot_remote_debug -Confirm:$false -ErrorAction:SilentlyContinue
Remove-Item -Recurse -Force '{temp_dir}'"
6 changes: 3 additions & 3 deletions models/chain_provider.gd
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,15 @@ func _init(dict: Dictionary):
if file_path != '':
self.download_url = dict.get('base_download_url') + "/" + file_path
self.binary_zip_path += ".exe"
self.binary_zip_hash = dict.get('download_hash_linux', '')
self.binary_zip_hash = dict.get('download_hash_win', '')
self.binary_zip_size = dict.get('download_size_linux', 0)
self.base_dir = Appstate.get_home() + "/AppData/Roaming/" + dict.get('base_dir_win', '')
Appstate.platform.MAC:
var file_path = dict.get('download_file_mac', '')
if file_path != '':
self.download_url = dict.get('base_download_url') + "/" + file_path
self.binary_zip_hash = dict.get('download_hash_linux', '')
self.binary_zip_size = dict.get('download_size_linux', 0)
self.binary_zip_hash = dict.get('download_hash_mac', '')
self.binary_zip_size = dict.get('download_size_mac', 0)
self.base_dir = Appstate.get_home() + "/Library/Application Support/" + dict.get('base_dir_mac', '')

self.executable_name = self.binary_zip_path.split("/")[-1]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ func show_running_state():


func show_executable_state():
settings_button.disabled = false
start_button.visible = true
start_button.disabled = false
stop_button.visible = false
Expand All @@ -112,6 +113,7 @@ func show_executable_state():


func show_download_state():
settings_button.disabled = false
start_button.visible = false
stop_button.visible = false
auto_mine_button.visible = false
Expand All @@ -122,6 +124,7 @@ func show_download_state():


func show_unsupported_state():
settings_button.disabled = true
download_button.visible = false
start_button.visible = false
stop_button.visible = false
Expand Down

0 comments on commit 8651bfd

Please sign in to comment.