Update README and project files for Windows export process and SDK version upgrade
This commit is contained in:
56
README.md
56
README.md
@@ -51,22 +51,58 @@ Projektet använder följande .NET dependencies:
|
|||||||
2. Tryck **F5** eller klicka på "Play"-knappen
|
2. Tryck **F5** eller klicka på "Play"-knappen
|
||||||
3. Första gången kommer du behöva välja `scenes/MainMenu.tscn` som main scene
|
3. Första gången kommer du behöva välja `scenes/MainMenu.tscn` som main scene
|
||||||
|
|
||||||
### Bygga för Distribution
|
### Skapa EXE-fil (Windows)
|
||||||
1. I Godot editorn, gå till **Project → Export**
|
|
||||||
2. Lägg till en export template för din målplattform (Windows, Linux, macOS)
|
#### Steg 1: Förbered Export Templates
|
||||||
3. Konfigurera export-inställningar
|
1. Öppna projektet i Godot 4.5
|
||||||
4. Klicka **Export Project** för att skapa en körbar fil
|
2. Gå till **Editor → Manage Export Templates**
|
||||||
|
3. Klicka **Download and Install** för att ladda ner templates för Godot 4.5
|
||||||
|
|
||||||
|
#### Steg 2: Konfigurera Windows Export
|
||||||
|
1. I Godot editorn, gå till **Project → Export...**
|
||||||
|
2. Klicka **Add...** och välj **Windows Desktop**
|
||||||
|
3. Konfigurera följande inställningar:
|
||||||
|
- **Export Path**: `TheGame.exe` (eller valfritt namn)
|
||||||
|
- **Runnable**: ✅ (aktiverad)
|
||||||
|
- **Dedicated Server**: ❌ (inaktiverad)
|
||||||
|
|
||||||
|
#### Steg 3: C# Specifika Inställningar
|
||||||
|
Under **Dotnet** sektionen:
|
||||||
|
- **Include Scripts Compilation**: ✅ (aktiverad)
|
||||||
|
- **Include Debug Symbols**: ❌ (inaktiverad för release)
|
||||||
|
|
||||||
|
#### Steg 4: Exportera EXE
|
||||||
|
1. Klicka **Export Project**
|
||||||
|
2. Välj destination och filnamn (t.ex. `TheGame.exe`)
|
||||||
|
3. Klicka **Save**
|
||||||
|
|
||||||
|
#### Steg 5: Testa EXE-filen
|
||||||
|
- Den skapade `.exe` filen kan köras direkt på Windows
|
||||||
|
- `saves/` mappen kommer att skapas bredvid exe-filen automatiskt
|
||||||
|
|
||||||
|
### Felsökning Export Problem
|
||||||
|
|
||||||
|
**Problem: "Export templates not found"**
|
||||||
|
- Lösning: Installera export templates via Editor → Manage Export Templates
|
||||||
|
|
||||||
|
**Problem: "Failed to export project"**
|
||||||
|
- Kontrollera att alla scripts kompilerar utan fel först
|
||||||
|
- Kör `dotnet build` i projektmappen för att verifiera
|
||||||
|
|
||||||
|
**Problem: "C# assemblies missing in export"**
|
||||||
|
- Se till att "Include Scripts Compilation" är aktiverad
|
||||||
|
- Kontrollera att .NET 8.0 runtime finns installerad på målmaskinen
|
||||||
|
|
||||||
### Alternativ Kompilering via Terminal
|
### Alternativ Kompilering via Terminal
|
||||||
```bash
|
```powershell
|
||||||
# Navigera till projektmappen
|
# Navigera till projektmappen
|
||||||
cd c:\Repo\TheGame
|
cd c:\Repo\TheGame
|
||||||
|
|
||||||
# Bygg projektet
|
# Bygg C# projektet
|
||||||
dotnet build
|
dotnet build --configuration Release
|
||||||
|
|
||||||
# Kör Godot projekt från kommandoraden (kräver Godot i PATH)
|
# Exportera via kommandoraden (kräver Godot i PATH)
|
||||||
godot --path . scenes/MainMenu.tscn
|
godot --headless --export-release "Windows Desktop" TheGame.exe
|
||||||
```
|
```
|
||||||
|
|
||||||
## Projektstruktur
|
## Projektstruktur
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
<Project Sdk="Godot.NET.Sdk/4.2.2">
|
<Project Sdk="Godot.NET.Sdk/4.5.1">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net6.0</TargetFramework>
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
<TargetFramework Condition=" '$(GodotTargetPlatform)' == 'android' ">net7.0</TargetFramework>
|
|
||||||
<TargetFramework Condition=" '$(GodotTargetPlatform)' == 'ios' ">net8.0</TargetFramework>
|
|
||||||
<EnableDynamicLoading>true</EnableDynamicLoading>
|
<EnableDynamicLoading>true</EnableDynamicLoading>
|
||||||
<RootNamespace>TheGame</RootNamespace>
|
<RootNamespace>TheGame</RootNamespace>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|||||||
9
TheGame.csproj.old
Normal file
9
TheGame.csproj.old
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
<Project Sdk="Godot.NET.Sdk/4.2.2">
|
||||||
|
<PropertyGroup>
|
||||||
|
<TargetFramework>net6.0</TargetFramework>
|
||||||
|
<TargetFramework Condition=" '$(GodotTargetPlatform)' == 'android' ">net7.0</TargetFramework>
|
||||||
|
<TargetFramework Condition=" '$(GodotTargetPlatform)' == 'ios' ">net8.0</TargetFramework>
|
||||||
|
<EnableDynamicLoading>true</EnableDynamicLoading>
|
||||||
|
<RootNamespace>TheGame</RootNamespace>
|
||||||
|
</PropertyGroup>
|
||||||
|
</Project>
|
||||||
43
icon.svg.import
Normal file
43
icon.svg.import
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://bcat1nya502fb"
|
||||||
|
path="res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://icon.svg"
|
||||||
|
dest_files=["res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=0
|
||||||
|
compress/high_quality=false
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/uastc_level=0
|
||||||
|
compress/rdo_quality_loss=0.0
|
||||||
|
compress/hdr_compression=1
|
||||||
|
compress/normal_map=0
|
||||||
|
compress/channel_pack=0
|
||||||
|
mipmaps/generate=false
|
||||||
|
mipmaps/limit=-1
|
||||||
|
roughness/mode=0
|
||||||
|
roughness/src_normal=""
|
||||||
|
process/channel_remap/red=0
|
||||||
|
process/channel_remap/green=1
|
||||||
|
process/channel_remap/blue=2
|
||||||
|
process/channel_remap/alpha=3
|
||||||
|
process/fix_alpha_border=true
|
||||||
|
process/premult_alpha=false
|
||||||
|
process/normal_map_invert_y=false
|
||||||
|
process/hdr_as_srgb=false
|
||||||
|
process/hdr_clamp_exposure=false
|
||||||
|
process/size_limit=0
|
||||||
|
detect_3d/compress_to=1
|
||||||
|
svg/scale=1.0
|
||||||
|
editor/scale_with_editor_scale=false
|
||||||
|
editor/convert_colors_with_editor_theme=false
|
||||||
@@ -12,19 +12,14 @@ config_version=5
|
|||||||
|
|
||||||
config/name="TheGame"
|
config/name="TheGame"
|
||||||
run/main_scene="res://scenes/MainMenu.tscn"
|
run/main_scene="res://scenes/MainMenu.tscn"
|
||||||
config/features=PackedStringArray("4.2", "C#", "Forward Plus")
|
config/features=PackedStringArray("4.5", "C#", "Forward Plus")
|
||||||
config/icon="res://icon.svg"
|
config/icon="res://icon.svg"
|
||||||
|
|
||||||
[display]
|
[display]
|
||||||
|
|
||||||
window/size/viewport_width=1280
|
window/size/viewport_width=1280
|
||||||
window/size/viewport_height=720
|
window/size/viewport_height=720
|
||||||
window/size/resizable=true
|
|
||||||
|
|
||||||
[dotnet]
|
[dotnet]
|
||||||
|
|
||||||
project/assembly_name="TheGame"
|
project/assembly_name="TheGame"
|
||||||
|
|
||||||
[rendering]
|
|
||||||
|
|
||||||
renderer/rendering_method="forward_plus"
|
|
||||||
1
scripts/Game.cs.uid
Normal file
1
scripts/Game.cs.uid
Normal file
@@ -0,0 +1 @@
|
|||||||
|
uid://b58rkdlq5w21m
|
||||||
1
scripts/GameState.cs.uid
Normal file
1
scripts/GameState.cs.uid
Normal file
@@ -0,0 +1 @@
|
|||||||
|
uid://bj2vys8c8nvvg
|
||||||
1
scripts/LoadGameMenu.cs.uid
Normal file
1
scripts/LoadGameMenu.cs.uid
Normal file
@@ -0,0 +1 @@
|
|||||||
|
uid://dt0pqnx0paqkj
|
||||||
1
scripts/MainMenu.cs.uid
Normal file
1
scripts/MainMenu.cs.uid
Normal file
@@ -0,0 +1 @@
|
|||||||
|
uid://cq88pp73k3b4
|
||||||
1
scripts/PauseMenu.cs.uid
Normal file
1
scripts/PauseMenu.cs.uid
Normal file
@@ -0,0 +1 @@
|
|||||||
|
uid://cre1pwcc5y5u3
|
||||||
1
scripts/SaveManager.cs.uid
Normal file
1
scripts/SaveManager.cs.uid
Normal file
@@ -0,0 +1 @@
|
|||||||
|
uid://ci407hx25v6nb
|
||||||
Reference in New Issue
Block a user