Skip to content

Commit 0ff365d

Browse files
committed
Added output folder in repository. Added 'media' folder for pictures and sounds. Now using the playsound library for playing the finish sound.
1 parent c7c1e6c commit 0ff365d

File tree

9 files changed

+11
-7
lines changed

9 files changed

+11
-7
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,5 @@ example_legacy_mods
66
__pycache__
77
build
88
dist
9-
Legacy Mod Converter.spec
9+
Legacy Mod Converter.spec
10+
.vscode

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33
## Introduction
44
This project automates ***most*** of the conversion work required to convert the legacy `Cortex Command` mods into `Cortex Command Community Project` compatible mods.
55

6-
![project-icon](cclmc-icon.png)
6+
![project-icon](media/cclmc-icon.png)
77

88
## Getting started
99
Download the [***Legacy Mod Converter***](http://www.mediafire.com/file/b2qdhe55b1ggy73/Legacy_Mod_Converter.exe/file) program. Create a new folder and put your legacy mods that you want to convert in it. Run the Legacy Mod Converter program.
1010

1111
If you get a "`Microsoft Defender SmartScreen prevented an unrecognized app from starting. Running this app might put your PC at risk.`" popup message when trying to run the program just press `More info` -> `Run anyway`. It may take a very long time for the program to appear, which is an issue with Windows' Antimalware Service Executable. We're looking into how we can fix both of these issues.
1212

13-
![Legacy mod converter program screenshot](cclmc-program-screenshot.png)
13+
![Legacy mod converter program screenshot](media/cclmc-program-screenshot.png)
1414

1515
## Disclaimer
1616
This program will do most of the conversion work for you, but some conversion steps are too hard to automate, so it's likely that `CCCP` will still crash or print errors in the console. If this happens you'll have to manually fix these issues in the legacy mod folder. If you want to properly fix these errors then you should download this repository and follow the instructions below so you can add your own conversion cases to `conversion_rules.py`.

convert.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
1-
import os, time, pathlib, shutil, math, re, sys, shutil, winsound, zipfile
1+
import os, time, pathlib, shutil, math, re, sys, shutil, zipfile
2+
from playsound import playsound
23
import config
34

45
from conversion_rules import conversion_rules
56

67

8+
finishSoundPath = "media/finish.wav"
9+
710
progress = 0
811
total_progress = 0
912

@@ -33,7 +36,7 @@ def main():
3336

3437
elapsed = math.floor(time.time() - time_start)
3538
if config.sg.user_settings_get_entry("play_finish_sound"):
36-
winsound.MessageBeep()
39+
playsound(finishSoundPath)
3740
print("Finished in {} {}".format(elapsed, pluralize("second", elapsed)))
3841

3942

gui.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Run: python gui.py
2-
# Build: pyinstaller --noconsole --onefile --icon=cclmc-icon.ico --name="Legacy Mod Converter" gui.py
2+
# Build: pyinstaller --noconsole --onefile --icon=media/cclmc-icon.ico --name="Legacy Mod Converter" gui.py
33

44
import os.path, pathlib
55
import PySimpleGUI as sg
@@ -65,7 +65,7 @@ def get_folder_containing_mods(mods_folder):
6565
]
6666

6767
config.sg = sg
68-
window = sg.Window("Legacy Mod Converter - v1.0", layout, icon="I:/Users/welfj/Documents/Programming/Python/cc-legacy-mod-converter/cclmc-icon.ico")
68+
window = sg.Window("Legacy Mod Converter - v1.0", layout, icon="media/cclmc-icon.ico")
6969
config.progress_bar = window["-PROGRESS BAR-"]
7070

7171

File renamed without changes.
File renamed without changes.
File renamed without changes.

media/finish.wav

209 KB
Binary file not shown.

output/.empty

Whitespace-only changes.

0 commit comments

Comments
 (0)