tangled
alpha
login
or
join now
dunkirk.sh
/
shortwave
a mega cool windows xp app
0
fork
atom
overview
issues
pulls
pipelines
Compare changes
Choose any two refs to compare.
base:
main
v0.1.2
v0.1.1
v0.1.0
compare:
main
v0.1.2
v0.1.1
v0.1.0
go
+48
-101
5 changed files
expand all
collapse all
unified
split
CMakeLists.txt
flake.nix
icon.aseprite
shortwave.ico
shortwave.rc
+8
-4
CMakeLists.txt
···
14
14
add_compile_options(-fno-threadsafe-statics)
15
15
add_compile_options(-D_GLIBCXX_HAS_GTHREADS=0)
16
16
17
17
-
add_executable(ShortwaveApp WIN32 main.cpp)
17
17
+
if(MINGW)
18
18
+
set(WIN32_ICON shortwave.rc)
19
19
+
endif()
20
20
+
21
21
+
add_executable(ShortwaveApp WIN32 main.cpp ${WIN32_ICON})
18
22
19
23
# Add BASS library from libs directory
20
24
target_include_directories(ShortwaveApp PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
···
24
28
target_include_directories(ShortwaveApp PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
25
29
26
30
# Minimal static linking and avoid threading dependencies
27
27
-
target_link_options(ShortwaveApp PRIVATE
28
28
-
-static-libgcc
31
31
+
target_link_options(ShortwaveApp PRIVATE
32
32
+
-static-libgcc
29
33
-static-libstdc++
30
34
-static
31
35
-Wl,--subsystem,windows:5.01
···
51
55
RUNTIME_OUTPUT_DIRECTORY_DEBUG "${OUTPUT_DIR}"
52
56
RUNTIME_OUTPUT_DIRECTORY_RELEASE "${OUTPUT_DIR}"
53
57
)
54
54
-
endif()
58
58
+
endif()
+39
-97
flake.nix
···
65
65
'';
66
66
};
67
67
68
68
-
installer = pkgs.stdenv.mkDerivation {
69
69
-
name = "shortwave-installer";
70
70
-
version = "1.0.0";
71
71
-
src = ./.;
72
72
-
73
73
-
nativeBuildInputs = with pkgs; [
74
74
-
nsis
75
75
-
];
76
76
-
77
77
-
buildInputs = [ self'.packages.shortwave ];
78
78
-
buildPhase = ''
79
79
-
# Create staging directory
80
80
-
mkdir -p staging
81
81
-
82
82
-
# Copy executable and DLLs
83
83
-
cp ${self'.packages.shortwave}/bin/Shortwave.exe staging/
84
84
-
85
85
-
cp libs/bass.dll staging/
86
86
-
87
87
-
cp shortwave.ico staging/
88
88
-
89
89
-
# Copy documentation
90
90
-
cp LICENSE.md staging/
91
91
-
cp README.md staging/
92
92
-
93
93
-
# Build installer
94
94
-
cd staging
95
95
-
makensis -NOCD ../installer.nsi
96
96
-
97
97
-
# Rename output to expected installer name
98
98
-
if [ -f ShortwaveRadioInstaller.exe ]; then
99
99
-
mv ShortwaveRadioInstaller.exe ../
100
100
-
else
101
101
-
echo "✗ Installer was not created by makensis"
102
102
-
exit 1
103
103
-
fi
104
104
-
cd ..
105
105
-
ls
106
106
-
'';
107
107
-
108
108
-
installPhase = ''
109
109
-
mkdir -p $out/bin
110
110
-
cp ShortwaveRadioInstaller.exe $out/bin/
111
111
-
'';
112
112
-
};
113
113
-
114
68
deploy-to-xp = pkgs.writeShellScriptBin "deploy-to-xp" ''
115
69
echo "rebuilding program"
116
70
nix build
···
172
126
];
173
127
174
128
shellHook = ''
175
175
-
echo "Shortwave Radio development environment loaded"
176
176
-
echo "Available commands:"
177
177
-
echo " nix build - Build the Shortwave Radio application"
178
178
-
echo " nix build .#installer - Build Windows installer"
179
179
-
echo " build-installer - Build installer (shortcut)"
180
180
-
echo " deploy-to-xp - Deploy to XP VM folder"
181
181
-
echo ""
182
182
-
echo "Setting up development environment..."
183
183
-
184
184
-
# Get dynamic paths from nix packages
185
185
-
GCC_BASE="${pkgs.pkgsCross.mingw32.buildPackages.gcc}/i686-w64-mingw32"
186
186
-
SYS_INCLUDE="$GCC_BASE/sys-include"
187
187
-
MINGW_MAIN_INCLUDE="${pkgs.pkgsCross.mingw32.windows.mingw_w64.dev}/include"
188
188
-
CPP_INCLUDE="${pkgs.lib.getDev pkgs.pkgsCross.mingw32.buildPackages.gcc}/include/c++/10.3.0"
189
189
-
CPP_TARGET_INCLUDE="$CPP_INCLUDE/i686-w64-mingw32"
190
190
-
191
191
-
# Auto-generate .clangd config with correct paths
192
192
-
cat > .clangd << EOF
193
193
-
CompileFlags:
194
194
-
Add:
195
195
-
- -target
196
196
-
- i686-w64-mingw32
197
197
-
- -DWINVER=0x0501
198
198
-
- -D_WIN32_WINNT=0x0501
199
199
-
- -DWIN32_LEAN_AND_MEAN
200
200
-
- -D_WIN32
201
201
-
- -DWIN32
202
202
-
- -std=c++17
203
203
-
- -fno-builtin
204
204
-
- -isystem
205
205
-
- $SYS_INCLUDE
206
206
-
- -isystem
207
207
-
- $MINGW_MAIN_INCLUDE
208
208
-
- -isystem
209
209
-
- $CPP_INCLUDE
210
210
-
- -isystem
211
211
-
- $CPP_TARGET_INCLUDE
212
212
-
Remove:
213
213
-
- -I*/gcc/*/include
214
214
-
EOF
129
129
+
# Get dynamic paths from nix packages
130
130
+
GCC_BASE="${pkgs.pkgsCross.mingw32.buildPackages.gcc}/i686-w64-mingw32"
131
131
+
SYS_INCLUDE="$GCC_BASE/sys-include"
132
132
+
MINGW_MAIN_INCLUDE="${pkgs.pkgsCross.mingw32.windows.mingw_w64.dev}/include"
133
133
+
CPP_INCLUDE="${pkgs.lib.getDev pkgs.pkgsCross.mingw32.buildPackages.gcc}/include/c++/10.3.0"
134
134
+
CPP_TARGET_INCLUDE="$CPP_INCLUDE/i686-w64-mingw32"
215
135
216
216
-
cat > compile_commands.json << EOF
217
217
-
[
218
218
-
{
219
219
-
"directory": "$(pwd)",
220
220
-
"command": "i686-w64-mingw32-g++ -DWINVER=0x0501 -D_WIN32_WINNT=0x0501 -DWIN32_LEAN_AND_MEAN -D_WIN32 -DWIN32 -std=c++17 -isystem \"$SYS_INCLUDE\" -isystem \"$MINGW_MAIN_INCLUDE\" -isystem \"$CPP_INCLUDE\" -isystem \"$CPP_TARGET_INCLUDE\" -c main.cpp",
221
221
-
"file": "main.cpp"
222
222
-
}
223
223
-
]
224
224
-
EOF
136
136
+
# Auto-generate .clangd config with correct paths
137
137
+
cat > .clangd <<EOF
138
138
+
CompileFlags:
139
139
+
Add:
140
140
+
- -target
141
141
+
- i686-w64-mingw32
142
142
+
- -DWINVER=0x0501
143
143
+
- -D_WIN32_WINNT=0x0501
144
144
+
- -DWIN32_LEAN_AND_MEAN
145
145
+
- -D_WIN32
146
146
+
- -DWIN32
147
147
+
- -std=c++17
148
148
+
- -fno-builtin
149
149
+
- -isystem
150
150
+
- $SYS_INCLUDE
151
151
+
- -isystem
152
152
+
- $MINGW_MAIN_INCLUDE
153
153
+
- -isystem
154
154
+
- $CPP_INCLUDE
155
155
+
- -isystem
156
156
+
- $CPP_TARGET_INCLUDE
157
157
+
Remove:
158
158
+
- -I*/gcc/*/include
159
159
+
EOF
225
160
226
226
-
echo "✓ Generated .clangd config and compile_commands.json with include paths"
227
227
-
echo "✓ Development environment ready for Shortwave Radio development"
161
161
+
cat > compile_commands.json <<EOF
162
162
+
[
163
163
+
{
164
164
+
"directory": "$(pwd)",
165
165
+
"command": "i686-w64-mingw32-g++ -DWINVER=0x0501 -D_WIN32_WINNT=0x0501 -DWIN32_LEAN_AND_MEAN -D_WIN32 -DWIN32 -std=c++17 -isystem \"$SYS_INCLUDE\" -isystem \"$MINGW_MAIN_INCLUDE\" -isystem \"$CPP_INCLUDE\" -isystem \"$CPP_TARGET_INCLUDE\" -c main.cpp",
166
166
+
"file": "main.cpp"
167
167
+
}
168
168
+
]
169
169
+
EOF
228
170
'';
229
171
};
230
172
};
icon.aseprite
This is a binary file and will not be displayed.
shortwave.ico
This is a binary file and will not be displayed.
+1
shortwave.rc
···
1
1
+
IDI_ICON1 ICON DISCARDABLE "shortwave.ico"